query_id
stringlengths
32
32
query
stringlengths
7
5.32k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
e7caffb60f669c1679494dc7bc25a069
Redirect to the API docs page.
[ { "docid": "432c29f2eccd09d7200ca2fbb6cd8c06", "score": "0.77284455", "text": "public function redirect()\n {\n return redirect('/api/docs');\n }", "title": "" } ]
[ { "docid": "18b7d18d18ad8ae9119490bc51ca8760", "score": "0.68866724", "text": "public function actionRedirect() {\n $node = Documentation::model()->findByPk($_GET['id']);\n $this->redirect($node->getViewUrl());\n }", "title": "" }, { "docid": "a237f52384be18bfa5dcb1821c08e056", "score": "0.67927665", "text": "public function actionRedirect()\n {\n $node = Docs::findOne(Yii::$app->request->get('id'));\n return $this->redirect($node->getViewUrl());\n }", "title": "" }, { "docid": "14d260769457dfff28088ab0ef15c574", "score": "0.6688197", "text": "public function index()\n {\n return redirect()->route('docs.show', $this->docs->lastVersion());\n }", "title": "" }, { "docid": "bd69a8bca006e52b29d21e40726969ea", "score": "0.66820055", "text": "public function documentsAction()\n {\n if ($this->loginHelper()) {\n $this->redirect('account/documents');\n } else {\n $this->redirect('shopgate/error');\n }\n }", "title": "" }, { "docid": "e6ee9994922fbaebca0b9719dbbfd797", "score": "0.6562593", "text": "public function apiAction (Request $request) {\n //select url to be redirected to\n }", "title": "" }, { "docid": "c54c31e76a3e648707f239f1755ed902", "score": "0.6441478", "text": "private function authorization_redirect() {\n\t\t\tself::authorization();\n\t\t\twp_safe_redirect( esc_url( pointfinder_apim()->get_page_url()) );\n\t\t\texit;\n\t\t}", "title": "" }, { "docid": "147ea8d6ea8ecb917ac00c02f30dfa74", "score": "0.63164073", "text": "public function index()\n\t{\n\t\tredirect(base_url('app'));\n\t}", "title": "" }, { "docid": "0c5747069e254e4edf94094392322d0f", "score": "0.6314164", "text": "public function testSwaggerRouting()\n {\n $client = static::createClient();\n\n $crawle = $client->request('GET', '/swagger/');\n\n\n $this->assertTrue( $client->getResponse()->isRedirect() );\n $this->assertRegExp('/swagger\\/ui\\/index.html/', $client->getResponse()->headers->get('Location'));\n\n\n $crawler = $client->request('GET', '/swagger/', array(\"filename\" => \"api-docs.json\"));\n\n $this->assertRegExp('/swagger\\/api-docs.json/', $client->getResponse()->headers->get('Location'));\n\n }", "title": "" }, { "docid": "19a837506060f7fb5150a8d96b74e53c", "score": "0.63065547", "text": "public function redirect();", "title": "" }, { "docid": "6ae904840a1f54cd50b224a972076432", "score": "0.62291425", "text": "public function redirect()\n\t{\n\t}", "title": "" }, { "docid": "69e66029fe378842f59b4db3a016a652", "score": "0.6142825", "text": "public function redirect() {\n echo $this->requestUrl;\n header('Location: '.$this->requestUrl);\n }", "title": "" }, { "docid": "740dd1f69a9646a4fa24506e825513ee", "score": "0.61174756", "text": "public function getIndex()\n {\n return \\Redirect::to($this->google->getAuthorizationUri());\n }", "title": "" }, { "docid": "d57f794fb256572a50f5c102abb78200", "score": "0.6111612", "text": "public function redirect() {return;}", "title": "" }, { "docid": "0136182c34617ce154150643f2fcf245", "score": "0.6035884", "text": "public function index()\n\t{\n redirect(base_url());\n\t}", "title": "" }, { "docid": "5dc05e7326f6392ce5b16c9b2a33fbea", "score": "0.60324854", "text": "public static function redirectIndex()\n {\n header('Location: /');\n }", "title": "" }, { "docid": "bbb12c750180cba376fbda8610ffef0b", "score": "0.59922093", "text": "function index()\r\n\t{\r\n\t\tredirect('');\r\n\t}", "title": "" }, { "docid": "2132e82c5f1ded869f1e3332adcf2130", "score": "0.59884155", "text": "public function indexAction()\n\t{\n\t\t$this->_redirectReferer();\n\t}", "title": "" }, { "docid": "7994f46b57b008b0c6aeb5118353729f", "score": "0.5987958", "text": "function index(){\n redirect('LearnClojure/tutorials/Clojure/Introduction');\n}", "title": "" }, { "docid": "6192f35fea495d2300f893a553d8e6b5", "score": "0.5940255", "text": "function index()\n\t{\n\t\tredirect('');\n\t}", "title": "" }, { "docid": "1fa0d7158bdca64ba84dbd5678c5267e", "score": "0.5935054", "text": "function redirect_to_wp_admin(){\n\n\n $auto_redirect = $this->settings_page->get_auto_redirect_to_admin_page();\n\n if ($auto_redirect) {\n\n $proxy_name = isset($_SERVER['HTTP_PROXY_SERVICE']) ? $_SERVER['HTTP_PROXY_SERVICE'] : '';\n $force_json = $_GET['json'];\n\n // If its an api request, or if we have ?json=true, then we just show the normal JSON response\n if ($proxy_name !== 'api' && $force_json !== 'true') {\n header(\"Location: /wp-admin\");\n die();\n }\n\n }\n\n }", "title": "" }, { "docid": "9115c1dcaef8ad68e34cc147617fe02c", "score": "0.59184384", "text": "public function display()\n {\n $docs = ApiDocsGenerator::generateConsideringCache();\n $this->setPageTitle(trans('settings.users_api_tokens_docs'));\n\n return view('api-docs.index', [\n 'docs' => $docs,\n ]);\n }", "title": "" }, { "docid": "5689ae88cb505f4a8ce747025674d729", "score": "0.5918246", "text": "private function redirect()\n\t{\n\t\theader('Location:' . $this->url);\n\t}", "title": "" }, { "docid": "c117b112c31bf3bd16b2b8e68e948ac8", "score": "0.59067184", "text": "public function redirectTo()\n {\n \n }", "title": "" }, { "docid": "db2409d4cb148fd5d02dd1c1b1673107", "score": "0.59039026", "text": "static public function redirectToLandingPage() {\n\t\tglobal $wgOut, $wgServer;\t\t\n\t\t$defaultUrl = self::getDefaultUrl();\t\t\n\t\t$wgOut->redirect( $wgServer . $defaultUrl ); \t\t\n\t}", "title": "" }, { "docid": "33aaeba135f7da51a81f3dfa9e271432", "score": "0.5896001", "text": "public function index() {\n header('Location: ' . site_url('authentication/login'));\n }", "title": "" }, { "docid": "e7675b42dd2daa6f6f7e48d2b06bbebd", "score": "0.5864988", "text": "function docs($_, $assoc)\n {\n //Get basic docs url\n $url = Package::get_config('docs');\n\n //Check Valid Url\n $web_url = filter_var($url, FILTER_VALIDATE_URL);\n if ($web_url === false) {\n $web_url = Package::get_config('docs');\n }\n\n //Show in browser\n \\WP_CLI_Helper::Browser($web_url);\n }", "title": "" }, { "docid": "43ce4bd230ab74a6a38acdc981dbda72", "score": "0.58532274", "text": "public function indexAction()\n {\n \t$this->_buildResponse(Api_BaseController::HTTP_FAILED, 'Invalid URL');\n }", "title": "" }, { "docid": "b8a1cbe7fd543348fcf4578af639664c", "score": "0.58303505", "text": "#[Route(\n '/api/{url}',\n requirements: [\n 'url' => '(?!doc).+',\n ],\n defaults: [\n 'url' => null,\n ],\n priority: -1,\n )]\n public function indexAction()\n {\n throw $this->createNotFoundException();\n }", "title": "" }, { "docid": "3b5a65300f7dcbc46291ef2eee60dd0e", "score": "0.5829569", "text": "public function index(){\n header(\"Location: \".BASE_URL);\n exit;\n }", "title": "" }, { "docid": "8d493598c7a475b2b04cf105c0ccf72d", "score": "0.5828749", "text": "public function index() {\n\t\tredirect($this->config->item('go_redirect_url'), 'refresh'); // home route from application/config/go_config.php \n\t}", "title": "" }, { "docid": "83462beefb78a3edc2ee693b74ed39cb", "score": "0.5819615", "text": "public function homeAction(): RedirectResponse\n {\n $this->denyAccessIfProfilerDisabled();\n\n return new RedirectResponse($this->generator->generate('_profiler_search_results', ['token' => 'empty', 'limit' => 10]), 302, ['Content-Type' => 'text/html']);\n }", "title": "" }, { "docid": "f987b8bf07185fb10d19ddaff5284ef9", "score": "0.57856625", "text": "public function view()\n {\n header('Location: ' . \"../../index.html\");\n\n exit();\n }", "title": "" }, { "docid": "b04f809639e9bd1246d6d858f766425c", "score": "0.5783416", "text": "function redirectToGoogleOAuthserver(){\n $auth_url = $this->client->createAuthUrl();\n header('Location: ' . filter_var($auth_url, FILTER_SANITIZE_URL));\n }", "title": "" }, { "docid": "1a4f9a983b5857069a35b32b8cbf2059", "score": "0.57663274", "text": "public static function redirect($path) {\n $index_path = Configuration::get_index();\n $api = Configuration::get_api();\n $api->redirect(\"$index_path$path\");\n }", "title": "" }, { "docid": "df70d346ce064c0fa3392f0382b2ea01", "score": "0.5763156", "text": "public function indexAction() {\n $this->_redirect('/g/auth/login');\n }", "title": "" }, { "docid": "76a72c4bd263c22ef78a0a5d83aa30f5", "score": "0.5759678", "text": "public function index()\n {\n return redirect(\"/\");\n }", "title": "" }, { "docid": "e6c7807588fb471ee6a68df9a2670991", "score": "0.57595915", "text": "public function test() {\n\t\t//Yaf_Response_Abstract::setRedirect(\"http://www.ibixiong.com/content/view/id/1\");\n\t}", "title": "" }, { "docid": "a854da71176e14a228a705d229982029", "score": "0.5751136", "text": "public function index()\r\n\t{\r\n\t\t$data = array();\r\n\r\n\t\t$data['sidebar'] = View::make('docs.sidebar');\r\n\r\n\t\t$this->layout->pageTitle = 'Documentation';\r\n\t\t$this->layout->content = View::make('docs.index', $data);\r\n\t}", "title": "" }, { "docid": "c9c5533f459881fd9f42e00d7695cd03", "score": "0.5736289", "text": "public function actionView($id) {\r\n $this->redirect(['document/index', 'project_id' => $id]);\r\n }", "title": "" }, { "docid": "6592eba1032ea9c9699eecd04cf6932f", "score": "0.5729955", "text": "protected function redirectToUrl() : void {}", "title": "" }, { "docid": "fc8da4056580a5a0d7244eee11ac8d23", "score": "0.57280326", "text": "function efPonyDocsSetup() {\n\t\t// Start session for anonymous traffic\n\t\tif ( session_id() == '' ) {\n\t\t\twfSetupSession();\n\t\t\tif ( PONYDOCS_DEBUG ) {\n\t\t\t\terror_log( \"DEBUG [\" . __METHOD__ . \"] started session\" );\n\t\t\t}\n\t\t}\n\n\t\t// This has the side effect of loading versions and manuals for the product\n\t\t$wiki = PonyDocsWiki::getInstance();\n\t\t\n\t\tif ( ( $wiki->getRequestType() == 'Topic' || $wiki->getRequestType() == 'TOC' )\n\t\t\t&& !PonyDocsProductVersion::GetSelectedVersion( $wiki->getProduct()->getShortName(), FALSE ) ) {\n\t\t\t// This version isn't available to this user; go away\n\t\t\t$defaultRedirect = PonyDocsExtension::getDefaultUrl();\n\t\t\tif ( PONYDOCS_DEBUG ) {\n\t\t\t\terror_log( \"DEBUG [\" . __METHOD__ . \":\" . __LINE__ . \"] redirecting to $defaultRedirect\" );\n\t\t\t}\n\t\t\theader( \"Location: \" . $defaultRedirect );\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "9274381398e80dafeac929380a579ee6", "score": "0.5724785", "text": "public function index()\n {\n redirect('cl');\n }", "title": "" }, { "docid": "669351aa025fb060ff087167bd979873", "score": "0.57187355", "text": "public function defaultPage()\n\t\t{\n\t\t\theader('Location: ' . BASE_PATH . '/categories/getList');\n\t\t}", "title": "" }, { "docid": "989b7033a445140477ea1321ae053f6b", "score": "0.5714703", "text": "function redirect_url()\t{\n\t\tif (isset($_GET['nexturl'])&&isset($_GET['id'])) {\n\t\t\t// var_dump($_GET['nexturl'].'&id='.$_GET['id']);\n\t\t\t$new_url = e($_GET['nexturl'].'&id='.$_GET['id']);\n\t\t\theader(\"Location: {$new_url}\");\n\t\t} else {\n\t\t\theader(\"Location: ./forms.php\");\n\t\t}\n\t}", "title": "" }, { "docid": "52e31c5dff05dd8805948d5294cf97b4", "score": "0.56970793", "text": "public function redirect()\n {\n\n $arguments = func_get_args();\n\n /*\n * Actual URL to redirect to\n */\n if (count($arguments) == 1)\n {\n $redirect_url = reset($arguments);\n }\n\n /*\n * Route to redirect to\n */\n else\n {\n $redirect_url = call_user_func_array([$this->_dependencies->router, 'generateUrl'], $arguments);\n }\n\n header('Location: ' . $redirect_url, true, 302);\n\n exit;\n\n }", "title": "" }, { "docid": "143b0927051c59f5c129ac52df97fd94", "score": "0.5679316", "text": "public function docent(){\n\t\tif($this->authex->checkLoginRedirectByType(2)){\n\t\t\t$data['titel'] = 'International Days';\n\t\t\t$partials = array('template_menu' => 'login-docent/template_menu', 'template_pagina' => 'login-docent/docent_home');\n\t\t\t$data['edition'] = $this->edition_model->getLastEdition();\n\n\t\t\t$this->template->load('template/template_master', $partials, $data);\n\t\t}\n\t}", "title": "" }, { "docid": "5a447565fd0b23ed8408aa893df9e3d0", "score": "0.5661757", "text": "public function index()\n {\n return redirect('/app');\n }", "title": "" }, { "docid": "2f0a5e06492baedcc4a986b16aeaaccf", "score": "0.56556165", "text": "function ShowAuthorisation()\n\t{\n\t\t$this->Session->set('expected_destination', Request::get_request_uri(TRUE, TRUE));\n\t\tResponse::redirect('index.php?module=' .CU_AUTH_MODULE . '&message=2&redirect=' . urlencode(Request::server('QUERY_STRING')));\n\t}", "title": "" }, { "docid": "aedaf92aa9e1037bd5a1d19a0491e1ed", "score": "0.56495124", "text": "public function index() \n {\n redirect('support/howtoplay');\n }", "title": "" }, { "docid": "4a457291b35ebd564cd31ce41316b6b0", "score": "0.5645032", "text": "public function redirect()\r\n {\r\n $this->getRedirectResponse()->send();\r\n exit;\r\n }", "title": "" }, { "docid": "9a07b940e9b332c787b460466057b0e3", "score": "0.5643471", "text": "public function indexAction() {\n\t\t$this->_helper->redirector('read');\n\t}", "title": "" }, { "docid": "5f30fe2fbdb2bc51e1d5c7ffa6074116", "score": "0.56428796", "text": "public function helpAction()\r\n {\r\n $this->view->setTitrePage('Gestion des documents de l\\'aide en ligne');\r\n // Lecture de la liste des documents\r\n $this->view->liste = $this->_helper->ListeDocuments('documents');\r\n $this->view->urlBase = $this->getUrlDocs('documents');\r\n }", "title": "" }, { "docid": "1f6fb12c5c8d37cabb116fff6fd31c90", "score": "0.5639623", "text": "public function index()\n {\n return Redirect::to('/');\n }", "title": "" }, { "docid": "d6852ad21ba47a61a7f12493c1ec7bf8", "score": "0.5631589", "text": "public function indexAction()\n {\n //$url = Mage::getBaseUrl('web') . 'downloader/?return=' . urlencode(Mage::getUrl('adminhtml'));\n $this->getResponse()->setRedirect(\"http://www.medialounge.co.uk/magento-support-actual/\");\n }", "title": "" }, { "docid": "7e50b4a5914873170839018146b18eb6", "score": "0.56264514", "text": "public static function home()\n\t{\n\t\t$config = require( APP_PATH . '/app/config/config.php' );\n\t\t$base_url = $config['base_url'];\n\t\theader(\"Location: \" . $base_url);\n\t\texit;\n\t}", "title": "" }, { "docid": "822e8767932e94a3a4ac4df247d34676", "score": "0.5620764", "text": "public function index(){\n\t\theader('location:/Exemple_mvc_pdo/index.php?rt=auth');\n\t}", "title": "" }, { "docid": "6d1c0702704c875df9140f8f1fa7a378", "score": "0.56195146", "text": "public function action_index()\n {\n // redirect to dashboard\n Request::current()->redirect(\"admin/dashboard\");\n }", "title": "" }, { "docid": "3bf97dbfbf84fff540dc748bc80d5b9e", "score": "0.5615865", "text": "public function externalDocumentsAction() {}", "title": "" }, { "docid": "826b64d965755469b98f2a3752617f12", "score": "0.55985314", "text": "public function index(Request $request)\n {\n return redirect(\"https://\" . $request->input('shop') . \"/admin/oauth/authorize?client_id=\" \n . env('SHOPIFY_API_KEY') . \"&scope=read_orders,write_products&redirect_uri=\" . urlencode(env('APP_URL')).\"/callback&grant_options[]=per-user\"); \n \n }", "title": "" }, { "docid": "54930a3d50b3d8764515de7d05fe7006", "score": "0.5587433", "text": "public function shortRedirect()\n {\n $realty = $this->queryFactory->createRealtyQuery()\n ->filterByPropertyNumber(get_query_var('ji_realty_id'))\n ->findOne();\n\n if (empty($realty)) {\n throw new NotFoundException('Could not find realty with property number: ' . get_query_var('ji_realty_id'));\n }\n\n header('Location: ' . Routing::getRealtyUrl($realty));\n }", "title": "" }, { "docid": "f8f2c426976c8c8e76ca942563bee1aa", "score": "0.5582084", "text": "public function index()\n {\n if (! Gate::allows('crm_document_access')) {\n return abort(401);\n }\n\n\n $crm_documents = CrmDocument::all();\n\n return view('admin.crm_documents.index', compact('crm_documents'));\n }", "title": "" }, { "docid": "cf297d3a0fe7115ea0886cb6c1de33b4", "score": "0.5578468", "text": "public function indexAction(){\n\t\t$this->redirect('index','Backend');\n\t}", "title": "" }, { "docid": "482756119786610f2a207f757ec52181", "score": "0.55674875", "text": "function index() {\n\t\tif(!empty($this->data['form']['destination'])) {\n\t\t\tredirect('/test/'.$this->data['form']['destination']);\n\t\t}\n\t}", "title": "" }, { "docid": "165e57248abdff75085b534357be6960", "score": "0.55651903", "text": "public function show() {\r\n // feel free to change this method if it is ever needed\r\n abort(404);\r\n }", "title": "" }, { "docid": "2a0cd22b39d02a2d74344b377de003ef", "score": "0.55542195", "text": "function redirect() {\n\t\tsession_write_close();\n\t\theader('Location: ' . t3lib_div::getIndpEnv('TYPO3_REQUEST_DIR').$this->cObject->typolink(null, $this->_makeConfig('url')));\n\t\texit();\n\t}", "title": "" }, { "docid": "0472370a0597dbc106c1dfd72267a4fc", "score": "0.55457574", "text": "public function index() {\r\n header('location:' . $this->data['base_url'] . \"index.php/backend/home\");\r\n }", "title": "" }, { "docid": "561647de06ec49b0038e4d2444aec24d", "score": "0.5539209", "text": "public function actionIndex()\n\t{\n\t\t$this->redirect('/');\n\t}", "title": "" }, { "docid": "7e9d1a0316f0db22182bf73b72448bf1", "score": "0.5538315", "text": "public static function go()\n\t{\n\t\treturn redirect(route('home'), 307, [\n\t\t\t'Cache-Control' => 'no-cache, must-revalidate',\n\t\t]);\n\t}", "title": "" }, { "docid": "a5d1d62162f182873276db1e6ee8148f", "score": "0.5526058", "text": "public function index()\n\t{\n\t\tredirect('report/booking_report','refresh');\n\t}", "title": "" }, { "docid": "f038ccd73792161468e5bf872063bc0d", "score": "0.5518371", "text": "public function index()\n {\n return redirect($this->http_build_query);\n }", "title": "" }, { "docid": "979d64d34b01c7604ba49d7d92e273d4", "score": "0.5513899", "text": "public function onRedirect(){}", "title": "" }, { "docid": "badd121711111d0ccb54bb69ee124194", "score": "0.5499729", "text": "function index(SS_HTTPRequest $request)\n\t{\n $current_election_page = $this->getCurrentElectionPage();\n if(!is_null($current_election_page))\n\t\t return $this->redirect($current_election_page->Link());\n $this->redirect('404');\n\t}", "title": "" }, { "docid": "057b28beecdfb006d5defd18a53b769e", "score": "0.54975104", "text": "public function __invoke() : RedirectResponse\n {\n return redirect()->route('employees.index');\n }", "title": "" }, { "docid": "6b9f86d4e8906eceee8828baba7ef0e6", "score": "0.5497457", "text": "public static function redirect_to_error_page() {\r\n\t\t$absolute_url = site_url('kkm/error');\r\n\t\twp_redirect($absolute_url); //Temporal redirect\r\n\t\tdie();\r\n\t}", "title": "" }, { "docid": "4ef56b6926bb8a1ac12cb9f5537bc1a4", "score": "0.5495286", "text": "public function indexAction()\n\t{\t\n\t\t$this->_helper->redirector( 'login' );\n\t}", "title": "" }, { "docid": "01e14dcf03e2b62b7fd25ed47cd672a4", "score": "0.54934746", "text": "public function index() {\r\n\tif (isset($this->Auth->user()['id'])){\r\n \treturn $this->redirect($this->Auth->redirect());\r\n }\r\n\t\treturn $this->redirect($this->Auth->redirect());\r\n\t}", "title": "" }, { "docid": "8a8439406972273d8abf6b4007d90bc3", "score": "0.54905164", "text": "public function getShow($id)\n {\n // redirect to the frontend\n }", "title": "" }, { "docid": "a8cee6d72a048239b5f530d39e174cdd", "score": "0.54896414", "text": "public function index()\n {\n return redirect('/');\n }", "title": "" }, { "docid": "a8cee6d72a048239b5f530d39e174cdd", "score": "0.54896414", "text": "public function index()\n {\n return redirect('/');\n }", "title": "" }, { "docid": "a8cee6d72a048239b5f530d39e174cdd", "score": "0.54896414", "text": "public function index()\n {\n return redirect('/');\n }", "title": "" }, { "docid": "a8cee6d72a048239b5f530d39e174cdd", "score": "0.54896414", "text": "public function index()\n {\n return redirect('/');\n }", "title": "" }, { "docid": "a5fd470374eacec6cb53513cc45d0d22", "score": "0.54877305", "text": "public function action_index()\r\n\t{\r\n // Just redirect to login page\r\n $this->request->redirect('admin/login');\r\n\t}", "title": "" }, { "docid": "68cb6905fa07cf7bdc63749e641f373b", "score": "0.54856", "text": "public function indexAction() {\n\t\t$this->redirect('dashboard');\n\t}", "title": "" }, { "docid": "179df783901d952ee16b841a19fa04eb", "score": "0.54832745", "text": "function index(){\n\t $this->redirect(array( \"action\" => \"manageClients\"));\n\t}", "title": "" }, { "docid": "bab40e75f4c052324e92fffa6a20c288", "score": "0.54800695", "text": "public function docuAction()\n {\n $this->init();\n $this->getLayout()->getBlock('head')->setTitle(Mage::helper('includekrexx')->__('kreXX quick docu'));\n $this->renderLayout();\n }", "title": "" }, { "docid": "0d0782b5e1149ba881b67800e73a3812", "score": "0.54797643", "text": "public function homeAction()\n {\n return $this->redirectToRoute('crm_app_company_list');\n }", "title": "" }, { "docid": "31c9b05a1b4e0013fc65d553d294a9da", "score": "0.54790866", "text": "private function returnToNav()\n {\n $url = $this->core->buildUrl(array());\n header('Location: ' . $url);\n }", "title": "" }, { "docid": "b451a0fdf7d5726f188c793923bbba7a", "score": "0.5475626", "text": "public function go()\n {\n foreach ($this->headers as $key => $header) {\n header(\"$key: $header\");\n }\n\n redirect($this->url, $this->status_code);\n }", "title": "" }, { "docid": "cdfb1d3dcf169496a3d4f516d1f8f821", "score": "0.54682606", "text": "public function index()\n {\n return view('modules.document_flow.document.index');\n }", "title": "" }, { "docid": "19ac37960ed8378e958c7d8f3a29752d", "score": "0.5465928", "text": "public function actionRedirect_to_main()\r\n\t{\r\n\t//\tprint ($redirect);\r\n\t//\tvar_dump(main_site);\r\n\t//\theader($redirect);\r\n\t\theader('Location: https://akademorto.kz/');\r\n\t//\tdie();\r\n\t\texit();\r\n\t\r\n\t//\treturn 0;\r\n\t\t\t\r\n }", "title": "" }, { "docid": "28646c5c551049fc527999c07c548a32", "score": "0.54654104", "text": "public function index() {\r\n\t\t$this->forward('..\\view\\overview.html');\r\n\t}", "title": "" }, { "docid": "090bce493115ae67d0ff2de67ddae559", "score": "0.5462424", "text": "public function show()\n {\n abort(404);\n }", "title": "" }, { "docid": "214418710c5807eefa0ebe0321931033", "score": "0.5458631", "text": "public function indexAction() {\n redirect(\"alias/list\");\n }", "title": "" }, { "docid": "4a5f5d2b00bc090e46c584db4d13eb73", "score": "0.5457186", "text": "public function loadDocsAction()\n {\n if (true === $result = GitProcess::updateModules()) {\n $result = 0 === $this->get('lin3s_knowledge_base.command.doc')->run(new ArrayInput([]), new NullOutput())\n ? 'The docs are successfully loaded'\n : 'Something wrong happens during the loading process';\n }\n\n return new Response($result);\n }", "title": "" }, { "docid": "952630c63173d5f8daaed76bd3bbb084", "score": "0.54561776", "text": "public function index()\n {\n\t\treturn \"Todo: redirection à faire\";\n }", "title": "" }, { "docid": "13e8e5e1cf284c59050e1e927a40a9df", "score": "0.54554427", "text": "function index() {\n return redirect(config_item('site_url') . 'points/list');\n }", "title": "" }, { "docid": "af52340a92e1e92988ec8c1f873a2d7d", "score": "0.544726", "text": "public function index()\n {\n redirect('cars/view');\n }", "title": "" }, { "docid": "f70c865fd57f56ecaa6dfc1dccf98b61", "score": "0.544531", "text": "public function index()\n {\n DB::beginTransaction();\n try {\n $docsList = Document::where('status', '=', \"true\")->orderBy('ID', 'DESC')->paginate(10);\n \n if (!empty($docsList)) {\n $response = APIResponse('200', 'Success', $docsList);\n } else {\n $response = APIResponse('201', 'No Documents found.');\n } \n return $response;\n } catch(\\Exception $e) {\n DB::rollBack();\n $response = APIResponse('201', 'Oops. Something went wrong.');\n return $response;\n }\n }", "title": "" }, { "docid": "7c27dd382160aa4bd22d23869b2453f4", "score": "0.54393554", "text": "function redirect() {\n\t\theader('Location: admin.php');\n\t\texit();\n\t}", "title": "" }, { "docid": "3296b99a1ef1fab06f70c31526dbe942", "score": "0.54385984", "text": "public function index()\n\t{\n\t\t$input = Request::all();\n\t\t$validator = Validator::make($input);\n\n if( $validator->fails()){\n\t\t\treturn ApiResponse::validation($validator);\n\t\t}\n\n try{\n $accessToHome = AccessToHome::where('company_id', getScopeId())->get();\n\n\t\t\t$response = $this->response->collection($accessToHome, new AccessToHomeTransformer);\n\n return ApiResponse::success($response);\n\t\t} catch(\\Exception $e){\n\n return ApiResponse::errorInternal(trans('response.error.internal'), $e);\n\t\t}\n\t}", "title": "" } ]
ae949cafa4870f8c85274780f1c78c56
Finds and fills language markers in given template code.
[ { "docid": "9be9e9d75664eee15cf23bd69e718734", "score": "0.54268855", "text": "public function getFilledLangMarkers(&$template,$langFiles) {\n\t\t$langMarkers = array();\n\t\tif (is_array($langFiles)) {\n\t\t\t$aLLMarkerList = array();\n\t\t\tpreg_match_all('/###LLL:.+?###/Ssm', $template, $aLLMarkerList);\n\n\t\t\tforeach ($aLLMarkerList[0] as $idx => $LLMarker){\n\t\t\t\t$llKey = substr($LLMarker, 7, strlen($LLMarker) - 10);\n\t\t\t\t$marker = $llKey;\n\t\t\t\t$message = '';\n\t\t\t\tforeach ($langFiles as $idx => $langFile) {\n\t\t\t\t\t$message = trim($GLOBALS['TSFE']->sL('LLL:' . $langFile . ':' . $llKey));\n\t\t\t\t}\n\t\t\t\t$langMarkers['###LLL:' . $marker . '###'] = $message;\n\t\t\t}\n\t\t}\n\t\treturn $langMarkers;\n\t}", "title": "" } ]
[ { "docid": "1b54e3f1d084987328e8696e2864c780", "score": "0.6249628", "text": "private function dynamicLocalLangMarker($array) {\n\t\tif (!empty($array[1])) {\n\t\t\t$string = $this->pi_getLL(strtolower($this->locallangmarker_prefix[1] . $array[1]), '<em>' . strtolower($array[1]) . '</em>'); // search for a fitting entry in locallang.xml or typoscript\n\t\t}\n \n\t\tif (!empty($string)) {\n\t\t\treturn $string;\n\t\t}\n }", "title": "" }, { "docid": "5034b044e199ef0ca767135a7388d9e2", "score": "0.60067356", "text": "public static function substituteLLMarkers($content) {\r\n\t\t$markerArray = array();\r\n\t\tpreg_match_all('/###__LL__[\\w|\\.]*###/', $content, $foundLLMarkers);\r\n\t\tfor ($i=0; $i < sizeof($foundLLMarkers[0]); $i++) {\r\n\t\t\t$foundLLMarkers[0][$i] = str_ireplace('###', '', $foundLLMarkers[0][$i]);\r\n\t\t\t$tmp = explode('__LL__', $foundLLMarkers[0][$i]);\r\n\t\t\t$markerArray['###'.$foundLLMarkers[0][$i].'###'] = self::getCObj()->stdWrap(self::getLL($tmp[1]), '');\r\n\t\t}\r\n\t\t$content = self::getCObj()->substituteMarkerArray($content, $markerArray,'',1);\r\n\t\treturn $content;\r\n\t}", "title": "" }, { "docid": "dfd28af3a55ce466018af586a21d6b68", "score": "0.5959132", "text": "private function replaceLangVars() {\n\t\t\t//$this->template = preg_replace(\"/\\{L_(.*)\\}/isUe\", \"\\$f_lang[strtolower('\\\\1')]\", $this->template);\n\t\t\t//$this->template = preg_replace_callback(\"/\\{L_(.*)\\}/isU\", \"\\$f_lang[strtolower('\\\\1')]\", $this->template);\n\t\t\t$this->template = preg_replace_callback('/\\{L_(.*)\\}/isU', array($this, 'preg_langVar'), $this->template);\n\t\t}", "title": "" }, { "docid": "aaeeb0c629685492b7928fcf45e61422", "score": "0.5865809", "text": "protected function resolveUsedMarkers($templateCode) {\n\t\tif (!strlen($templateCode)) return array();\n\n\t\t$markerArray = array();\n\t\t// find placeholders/markers for content\n\t\tif (preg_match_all('!(###|%%%)([A-Za-z0-9\\._-|]*)\\1!is', $templateCode, $matches)) {\n\t\t\t$usedMarkers = array_unique($matches[2]);\n\n\t\t\tif (count($usedMarkers)) {\n\t\t\t\tforeach ($usedMarkers as $key => $markerName) {\n\t\t\t\t\t$wrapper = $matches[1][$key];\n\t\t\t\t\t$marker = $wrapper . $markerName . $wrapper;\n\t\t\t\t\t// predefined? don't resolve new content for it \n\t\t\t\t\tif (isset($this->marker[$marker])) continue;\n\n\t\t\t\t\t// try to find the replacement content\n\t\t\t\t\t$replacement = $this->getMarkerContent($markerName, $wrapper);\n\t\t\t\t\tif($replacement == '' && isset($markerArray[$marker])) {\n\t\t\t\t\t\t$replacement = $markerArray[$marker];\n\t\t\t\t\t}\n\t\t\t\t\t$markerArray[$marker] = $replacement;\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t}\n\n\t\treturn $markerArray;\n\t}", "title": "" }, { "docid": "8ad80008521c4c5a050b7a1fedf4382f", "score": "0.5830343", "text": "public function _compile_text($code)\n {\n if (\\strlen($code) < 3) {\n return $code;\n }\n // change template varrefs into PHP varrefs\n // This one will handle varrefs WITH namespaces\n $varrefs = [];\n preg_match_all('#\\{(([a-z0-9\\-_]+?\\.)+)([a-z0-9\\-_]+?)\\}#is', $code, $varrefs);\n $varcount = is_countable($varrefs[1]) ? \\count($varrefs[1]) : 0;\n $search = [];\n $replace = [];\n for ($i = 0; $i < $varcount; $i++) {\n $namespace = $varrefs[1][$i];\n $varname = $varrefs[3][$i];\n $new = $this->generate_block_varref($namespace, $varname);\n $search[] = $varrefs[0][$i];\n $replace[] = $new;\n }\n if (\\count($search) > 0) {\n $code = str_replace($search, $replace, $code);\n }\n // This will handle the remaining root-level varrefs\n $code = preg_replace('#\\{(L_([a-z0-9\\-_]+?))\\}#i', '<?php echo isset($L[\\'$2\\']) ? $L[\\'$2\\'] : (isset($SL[\\'$2\\']) ? $SL[\\'$2\\'] : $V[\\'$1\\']); ?>', $code);\n $code = preg_replace('#\\{(\\$[a-z_][a-z0-9_$\\->\\'\\\"\\.\\[\\]]*?)\\}#i', '<?php echo isset($1) ? $1 : \\'\\'; ?>', $code);\n $code = preg_replace('#\\{(\\#([a-z_][a-z0-9_]*?)\\#)\\}#i', '<?php echo defined(\\'$2\\') ? $2 : \\'\\'; ?>', $code);\n $code = preg_replace('#\\{([a-z0-9\\-_]+?)\\}#i', '<?php echo isset($V[\\'$1\\']) ? $V[\\'$1\\'] : \\'\\'; ?>', $code);\n return $code;\n }", "title": "" }, { "docid": "73811e29f6e82c6fca2456333298e7fb", "score": "0.5660374", "text": "protected function lexData()\n {\n if ($this->position == count($this->positions[0]) - 1) {\n $this->pushToken(\\Twig_Token::TEXT_TYPE, substr($this->code, $this->cursor));\n $this->cursor = $this->end;\n\n return;\n }\n\n // Find the first token after the current cursor\n $position = $this->positions[0][++$this->position];\n while ($position[1] < $this->cursor) {\n if ($this->position == count($this->positions[0]) - 1) {\n return;\n }\n $position = $this->positions[0][++$this->position];\n }\n\n // push the template text first\n $text = $textContent = substr($this->code, $this->cursor, $position[1] - $this->cursor);\n $textArr = str_split($text);\n // keep \"import\" \" from\" like strings\n $pos = strrpos($text, \"\\n\"); // New rtrim\n $text = substr($text, 0, $pos+1).rtrim(substr($text, $pos+1)); // New rtrim\n //var_dump($text);\n // Replaced with upper\n //if (isset($this->positions[2][$this->position][0])) {\n //$text = rtrim($text);\n //}\n\n $areOnOneLine = function($position1, $position2) {\n $areOnOneLine = true;\n $textArray = str_split($this->code);\n // echo \"p1: \" . $position1;\n // echo \"p2: \" . $position2;\n // echo \"text: \" . $this->code;\n for($i = $position1; $i <= $position2; $i++) {\n if($textArray[$i] == \"\\n\") {\n $areOnOneLine = false;\n break;\n }\n }\n\n return $areOnOneLine;\n };\n\n\n // Find the next token after the current cursor\n $thisPosition = $this->position;\n $nextText = \"\";\n $pposition = null;\n if ($thisPosition < count($this->positions[0]) - 1) {\n $pposition = $this->positions[0][++$thisPosition];\n while ($pposition[1] < $this->cursor) {\n if ($thisPosition == count($this->positions[0]) - 1) {\n return;\n }\n\n $pposition = $this->positions[0][++$thisPosition];\n }\n $nextText = substr($this->code, $this->cursor, $pposition[1] - $this->cursor);\n // echo \"Cursor: \" . $this->cursor;\n // echo \"Position1: \"; var_dump($position);\n // echo \"Position2: \"; var_dump($pposition);\n // echo \"AreOnOneLine: \"; var_dump($areOnOneLine($position[1], $pposition[1]));\n\n $textArray = str_split($text);\n $nextTextArray = str_split($nextText);\n\n // var_dump(implode(\"\", $textArray));\n // var_dump(implode(\"\", $nextTextArray));\n // echo \"\\n\\n\\n\";\n $spacesCount = 0;\n // for($i = 0; $i < count($textArray); $i++) {\n // if($textArray[$i] != \" \")\n // break;\n // $spacesCount++;\n // }\n for($i = 0; $i < count($nextTextArray); $i++) {\n if($nextTextArray[$i] != \" \")\n break;\n $spacesCount++;\n }\n\n /*\n Check if end of curr string in nextString and new content\n of nextString are placed without any spaces between them.\n If no spaces -> cancel spaces insertion\n \" <RenderIf.\"\n \" <RenderIf.<%layout.renderIfComponentName%>>\n */\n $endOfTextArray = array();\n for($i = count($textArray) - 1; $i--; $i >= 0) {\n if($textArray[$i] == \" \")\n break;\n\n $endOfTextArray[] = $textArray[$i];\n }\n $endOfTextArray = array_reverse($endOfTextArray);\n\n $lastCharOfEndOfTextIndex = strrpos($text, implode(\"\", $endOfTextArray));\n if($lastCharOfEndOfTextIndex !== false) {\n $lastCharOfEndOfTextIndex += count($endOfTextArray);\n if($nextTextArray[$lastCharOfEndOfTextIndex + 1] != \" \")\n $spacesCount = 0;\n }\n\n // $textOnlySpaces = true;\n // for($i = 0; $i < count($textArray); $i++) {\n // if($textArray[$i] != \" \") {\n // $textOnlySpaces = false;\n // break;\n // }\n // }\n\n //if($textOnlySpaces && $spacesCount > 1)\n $spacesCount--;\n\n for($i = 0; $i < $spacesCount; $i++)\n $text .= \" \";\n \n // Check if ends with not space (import) and next with space ('path')\n // AND both tokens are on the same string\n if($textArray[count($textArray) - 1] != \" \" &&\n $nextTextArray[0] != \" \" &&\n $areOnOneLine($position[1], $pposition[1])) {\n // echo \"***********\\n\";\n // var_dump($text);\n // var_dump($nextText);\n // echo \"***********\\n\";\n $text .= \" \";\n }\n }\n\n\n\n $this->pushToken(\\Twig_Token::TEXT_TYPE, $text);\n $this->moveCursor($textContent.$position[0]);\n\n switch ($this->positions[1][$this->position][0]) {\n case $this->options['tag_comment'][0]:\n $this->lexComment();\n break;\n\n case $this->options['tag_block'][0]:\n // raw data?\n if (preg_match($this->regexes['lex_block_raw'], $this->code, $match, null, $this->cursor)) {\n $this->moveCursor($match[0]);\n $this->lexRawData($match[1]);\n // {% line \\d+ %}\n } elseif (preg_match($this->regexes['lex_block_line'], $this->code, $match, null, $this->cursor)) {\n $this->moveCursor($match[0]);\n $this->lineno = (int) $match[1];\n } else {\n $this->pushToken(\\Twig_Token::BLOCK_START_TYPE);\n $this->pushState(\\Twig_Lexer::STATE_BLOCK);\n $this->currentVarBlockLine = $this->lineno;\n }\n break;\n\n case $this->options['tag_variable'][0]:\n $this->pushToken(\\Twig_Token::VAR_START_TYPE);\n $this->pushState(\\Twig_Lexer::STATE_VAR);\n $this->currentVarBlockLine = $this->lineno;\n break;\n }\n }", "title": "" }, { "docid": "30ca5f1629751313e9eb3bf47cfd38dc", "score": "0.55640745", "text": "private function replaceTemplate(){\n $this->template = strtr($this->template, $this->makeTags($this->values));\n }", "title": "" }, { "docid": "1da8d105fa39ab7f88bbff59bbabfae2", "score": "0.55502385", "text": "function lang($key,$markers = NULL)\n{\n\tglobal $lang;\n\tif($markers == NULL)\n\t{\n\t\t$str = $lang[$key];\n\t}\n\telse\n\t{\n\t\t//Replace any dyamic markers\n\t\t$str = $lang[$key];\n\t\t$iteration = 1;\n\t\tforeach($markers as $marker)\n\t\t{\n\t\t\t$str = str_replace(\"%m\".$iteration.\"%\",$marker,$str);\n\t\t\t$iteration++;\n\t\t}\n\t}\n\t//Ensure we have something to return\n\tif($str == \"\")\n\t{\n\t\treturn (\"No language key found\");\n\t}\n\telse\n\t{\n\t\treturn $str;\n\t}\n}", "title": "" }, { "docid": "d1745eb07259fbd43ad346e14efd2afe", "score": "0.5347522", "text": "function update_101() {\n include_once 'includes/locale.inc';\n // get the language columns\n $result = db_query('SELECT * FROM {locales} LIMIT 1');\n $fields = array();\n if (db_num_rows($result)) {\n $columns = array_keys(db_fetch_array($result));\n foreach ($columns as $field) {\n $fields[$field] = 1;\n }\n\n // but not the fixed fields\n unset($fields['lid'], $fields['location'], $fields['string']);\n\n // insert locales\n $list = _locale_get_iso639_list();\n foreach ($fields as $key => $value) {\n if (db_result(db_query(\"SELECT COUNT(lid) FROM {locales} WHERE $key != ''\"))) {\n if (isset($list[$key])) {\n $name = $list[$key][0];\n if ($key == 'en') {\n $key = 'en-local';\n }\n db_query(\"INSERT INTO {locales_meta} (locale, name) VALUES ('%s', '%s')\", $key, $name);\n }\n else {\n db_query(\"INSERT INTO {locales_meta} (locale, name) VALUES ('%s', '%s')\", $key, $key);\n }\n }\n }\n\n // get all strings\n $result = db_query('SELECT * FROM {locales}');\n while ($entry = db_fetch_object($result)) {\n // insert string if at least one translation exists\n $test = 'return $entry->'. implode(' == \"\" && $entry->', array_keys($fields)) .' == \"\";';\n if (!eval($test)) {\n db_query(\"INSERT INTO {locales_source} (location, source) VALUES ('%s', '%s')\", $entry->location, $entry->string);\n $lid = db_fetch_object(db_query(\"SELECT lid FROM {locales_source} WHERE location = '%s' AND source = '%s'\", $entry->location, $entry->string));\n foreach ($fields as $key => $value) {\n // insert translation if non-empty\n if ($key == 'en') {\n $keynew = 'en-local';\n }\n else {\n $keynew = $key;\n }\n db_query(\"INSERT INTO {locales_target} (lid, translation, locale) VALUES (%d, '%s', '%s')\", $lid->lid, $entry->$key, $keynew);\n }\n }\n }\n }\n\n $ret = array();\n $ret[] = update_sql(\"DROP TABLE {locales}\");\n return $ret;\n}", "title": "" }, { "docid": "ecf332299781508564833ceac5c905ae", "score": "0.52828246", "text": "function fillMarkers($template)\r\n {\r\n\r\n $content = '';\r\n\r\n $where = '1 = 1' . $this->cObj->enableFields('tx_irfaq_q');\r\n $selectConf = $this->getSelectConf($where);\r\n $selectConf['selectFields'] = 'DISTINCT tx_irfaq_q.uid, tx_irfaq_q.pid, tx_irfaq_q.q, tx_irfaq_q.q_from, tx_irfaq_q.a, tx_irfaq_q.cat, tx_irfaq_q.expert, tx_irfaq_q.related, tx_irfaq_q.related_links, tx_irfaq_q.enable_ratings, tx_irfaq_q.sys_language_uid, tx_irfaq_q.l18n_parent, tx_irfaq_q.l18n_diffsource';\r\n $selectConf['orderBy'] = $this->conf['orderBy'] ? 'tx_irfaq_q.' . $this->conf['orderBy'] : 'tx_irfaq_q.sorting';\r\n\r\n $res = $this->getDatabaseConnection()->exec_SELECT_queryArray(\r\n [\r\n 'SELECT' => $selectConf['selectFields'],\r\n 'FROM' => 'tx_irfaq_q' . ($selectConf['leftjoin'] ? ' LEFT OUTER JOIN ' . $selectConf['leftjoin'] : ''),\r\n 'WHERE' => $selectConf['where'] . ' AND pid in (' . $selectConf['pidInList'] . ')',\r\n 'GROUPBY' => '',\r\n 'ORDERBY' => $selectConf['orderBy'],\r\n 'LIMIT' => '',\r\n ]\r\n );\r\n\r\n $this->faqCount = $this->getDatabaseConnection()->sql_num_rows($res);\r\n\r\n $i = 1;\r\n while (false != ($row = $this->getDatabaseConnection()->sql_fetch_assoc($res))) {\r\n $GLOBALS['TSFE']->sys_page->versionOL('tx_irfaq_q', $row);\r\n if (is_array($row)) {\r\n if (($row = $this->getLanguageOverlay('tx_irfaq_q', $row))) {\r\n $markerArray = $this->fillMarkerArrayForRow($row, $i);\r\n $markerArray['###FAQ_ID###'] = $row['uid'];\r\n $markerArray['###COUNT###'] = $i++;\r\n $markerArray['###TOTALCOUNT###'] = $this->faqCount;\r\n\r\n $subpart = $this->cObj->getSubPart($template, '###FAQ###');\r\n $content .= $this->cObj->substituteMarkerArrayCached($subpart, $markerArray);\r\n }\r\n }\r\n }\r\n $this->getDatabaseConnection()->sql_free_result($res);\r\n\r\n return $content;\r\n }", "title": "" }, { "docid": "ca062ab2cdf2ccb2bf6652ec2560844b", "score": "0.5262374", "text": "function render_codeblock_callback( $block )\n\t{\n\t\t// set the offset if present - default : 0\n\t\tpreg_match( '#line=(\"|\\'?)([0-9]+?)([\"\\']?)$#', $block[2], $match );\n\t\t$offset = ( empty( $match[2] ) ? 0 : $match[2] - 1 );\n\n\t\t// set the language if present - default : code\n\t\tpreg_match( '#lang=(\"|\\'?)([^\\1]+?)([\\s\"\\']+?)#', $block[2], $match );\n\t\t$language = strtolower( ( empty( $match[2] ) ? 'code' : $match[2] ) );\n\n\t\tif( $code = trim( $block[4] ) )\n\t\t{ // we have a code block\n\t\t\t// is the relevant language highlighter already cached?\n\t\t\tif( empty( $this->languageCache[ $language ] ) )\n\t\t\t{ // lets attempt to load the language\n\t\t\t\t$language_file = dirname(__FILE__).'/highlighters/'.$language.'.highlighter.php';\n\t\t\t\tif( is_file( $language_file ) )\n\t\t\t\t{ // language class exists, lets load and cache an instance of it\n\t\t\t\t\trequire_once $language_file;\n\t\t\t\t\t$class = 'am_'.$language.'_highlighter';\n\t\t\t\t\t$this->languageCache[ $language ] = new $class( $this );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ // language class doesn't exists, fallback to default highlighter\n\t\t\t\t\t$language = 'code';\n\t\t\t\t\tif( empty( $this->languageCache[ $language ] ) )\n\t\t\t\t\t{ // lets attempt to load the default language\n\t\t\t\t\t\t$language_file = dirname(__FILE__).'/highlighters/'.$language.'.highlighter.php';\n\t\t\t\t\t\tif( is_file( $language_file ) )\n\t\t\t\t\t\t{ // default lanugage exists\n\t\t\t\t\t\t\trequire_once $language_file;\n\t\t\t\t\t\t\t$class = 'am_'.$language.'_highlighter';\n\t\t\t\t\t\t\t// add the language to the cache\n\t\t\t\t\t\t\t$this->languageCache[ $language ] = new $class( $this );\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{ // if we hit this we might as well go to the pub ;)\n\t\t\t\t\t\t\t// echo '***** error ***** no language or default language file is present';\n\t\t\t\t\t\t\treturn $code;\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$this->languageCache[ $language ]->requested_language = $language;\n\t\t\t$this->languageCache[ $language ]->strict_mode = $this->Settings->get( 'strict' );\n\t\t\t$code = $this->languageCache[ $language ]->highlight_code( $code );\n\t\t\t// add the line numbers\n\t\t\t$code = $this->do_numbering( $code, $offset, $language );\n\t\t}\n\t\treturn $code;\n\t}", "title": "" }, { "docid": "de9f1d2690edaac0dd4d472e4ab1d660", "score": "0.52431124", "text": "function texto_template($template, $diccionario){\r\n $template_raw = file_get_contents($template);\r\n\r\n foreach ($diccionario as $clave => $valor) {\r\n $template_raw = str_replace('{' . $clave . '}', htmlentities($valor), $template_raw);\r\n }\r\n return $template_raw;\r\n}", "title": "" }, { "docid": "a6b414e5560cbc1dff91fec3e464b656", "score": "0.52255857", "text": "function get_code($find)\n\t{\n\t\t$languages = array(\n\t\t\t\"js\"=>\"999\",\n\t\t\t\"c\"=>\"101\",\n\t\t\t\"php\"=>\"555\"\n\t\t);\n\t\t\n\t\t//use foreach since it is with array.\n\t\tforeach($languages as $language=>$code)\n\t\t{\n\t\t\tif($language==$find)\n\t\t\t{\n\t\t\t\treturn $code;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "468f3c1f81dcac95170cc638972b20af", "score": "0.5212562", "text": "public function main($content, $pObj) {\n\t\t// config\n\t\t$this->conf = $pObj->conf['tx_powermailoptin.'];\n\t\t$this->cObj = $pObj->cObj;\n\t\t$this->content = $content;\n\t\t$this->pi_loadLL();\n\t\t\n\t\t// let's go\n\t\t// 1. replace locallang markers\n\t\t$this->content = preg_replace_callback ( // Automaticly fill locallangmarkers with fitting value of locallang.xml\n\t\t\t'#\\#\\#\\#' . $this->locallangmarker_prefix[0] . '(.*)\\#\\#\\##Uis', // regulare expression\n\t\t\tarray($this, 'dynamicLocalLangMarker'), // open function\n\t\t\t$this->content // current content\n\t\t);\n\t\t\n\t\t// 2. replace typoscript markers\n\t\t$this->content = preg_replace_callback ( // Automaticly fill locallangmarkers with fitting value of locallang.xml\n\t\t\t'#\\#\\#\\#' . $this->typoscriptmarker_prefix[0] . '(.*)\\#\\#\\##Uis', // regulare expression\n\t\t\tarray($this, 'dynamicTyposcriptMarker'), // open function\n\t\t\t$this->content // current content\n\t\t);\n\t\t\n\t\tif (!empty($this->content)) {\n\t\t\treturn $this->content;\n\t\t}\n\t}", "title": "" }, { "docid": "cf4b6915514855ed2ab92fa2013cd29b", "score": "0.5153638", "text": "abstract protected function extractLanguages() : self;", "title": "" }, { "docid": "39e59ecc9018d1cc7cfe04d932de7b87", "score": "0.51345074", "text": "private function discoverMarkupLanguages() {\n foreach ($this->markupLanguageServices->getIterator() as $mfService) {\n $class = get_class($mfService);\n $annotation = $this->annotationReader->getClassAnnotation(new \\ReflectionClass($class), 'Forum9000\\MarkupLanguage\\Annotation\\MarkupLanguage');\n if (!$annotation) {\n continue;\n }\n\n $this->markupLanguages[$annotation->getLanguage()] = array(\n 'class' => $class,\n 'annotation' => $annotation,\n 'service' => $mfService\n );\n }\n }", "title": "" }, { "docid": "799d817515b4687829af74a5c483a860", "score": "0.5131504", "text": "public function replace_code_with_tag($text)\n {\n \n //$text = $request->text;\n \n while(strpos($text, '**') !== false)\n {\n $sub_text = '**';\n $pos = strpos($text, $sub_text);\n $code = substr($text,$pos+2,3);\n if(substr($text,$pos+5,2) == '**')\n {\n $tag = DB::table('medica_max_tags')->where('code','=',$code)->first();\n \n $tag_text = $tag->tag_text;\n $tag_text = \"<span style='background-color:\".$tag->background_color.\"'>\".$tag_text.\"</span>\";//background_color\n $tag_text = $tag->italic == \"1\" ? \"<em>\".$tag_text.\"</em>\" : $tag_text; //italic\n $tag_text = $tag->under_line == \"1\" ? \"<u>\".$tag_text.\"</u>\" : $tag_text; //under line\n $tag_text = $tag->sub_text == \"1\" ? \"<sub>\".$tag_text.\"</sub>\" : $tag_text; //\n $tag_text = $tag->sup_text == \"1\" ? \"<sup>\".$tag_text.\"</sup>\" : $tag_text; //italic\n $tag_text = \"<span style='color:\".$tag->text_color.\"'>\".$tag_text.\"</span>\";//\n\n $text = str_replace(\"**\".$code.\"**\", $tag_text , $text);\n }\n elseif(substr($text,$pos+5,1) == '(')\n {\n $len = strlen($text);\n $old_str = substr($text,$pos,$len);\n $new_str = $this->change_style_by_code(substr($text,$pos,$len));\n $text = str_replace($old_str,$new_str,$text);\n }\n }\n return $text;\n }", "title": "" }, { "docid": "007c4cd5177943e11fcc2bdf6d3c7aa3", "score": "0.5130446", "text": "function i18n_substitute_text($tpl_output, &$smarty){\n\t//i18n_init();\n\treturn preg_replace_callback('/@@(.+?)@@/', 'BattlePHP\\Core\\i18n_substitute_text_token', $tpl_output); \n}", "title": "" }, { "docid": "7dc20f87c87afb2c13a9594220e69fac", "score": "0.5109881", "text": "static function find($type, $code, $arg = false) {\r\n \r\n if(isset(self::$lang[$type][$code])):\r\n $return = self::$lang[$type][$code];\r\n if(is_array($arg)):\r\n foreach($arg as $key => $value):\r\n if(!is_array($value)):\r\n $return = str_replace(\"[\".$key.\"]\", $value, $return);\r\n endif;\r\n endforeach;\r\n elseif(is_string($arg) || is_int($arg)):\r\n $return = str_replace(\"[]\", $arg, $return);\r\n endif;\r\n return (string) $return;\r\n else:\r\n $xml = simplexml_load_file(LANG.'/'.self::$pays.'/lang.'.$type.'.xml', 'SimpleXMLElement', LIBXML_NOCDATA);\r\n\r\n $lang = $xml->addChild('lang', '['.$code.']');\r\n $lang->addAttribute('id', $code);\r\n $lang->addAttribute('get', get());\r\n \r\n $var = array();\r\n if($arg):\r\n \tif(is_array($arg)):\r\n \t\tforeach($arg as $key => $value):\r\n if(!is_array($value)):\r\n $var[] = \"[\".$key.\"]\";\r\n endif;\r\n endforeach;\r\n \telse:\r\n \t\t$var = array('[]');\r\n \tendif;\r\n endif;\r\n $lang->addAttribute('var', implode('|', $var));\r\n \r\n $dom = new DOMDocument('1.0');\r\n $dom->preserveWhiteSpace = false;\r\n $dom->formatOutput = true;\r\n $dom->loadXML($xml->asXML());\r\n \r\n $dom->save(LANG.'/'.self::$pays.'/lang.'.$type.'.xml');\r\n \r\n self::$lang[$type][$code] = '['.$code.']';\r\n return '['.$code.']';\r\n endif;\r\n }", "title": "" }, { "docid": "2c18bd8b0a079f048d24bccceb2cb8fa", "score": "0.5109526", "text": "static function localiseTemplateStrings(&$in_template)\n {\n $local = ReporticoApp::get(\"locale\");\n if ($local) {\n foreach ($local[\"template\"] as $key => $string) {\n $in_template->assign($key, $string);\n }\n }\n\n // Now set the HTML META tag for identifying the HTML encoding character set\n $in_template->assign(\"OUTPUT_ENCODING\", ReporticoLocale::getOutputEncodingHtml());\n }", "title": "" }, { "docid": "e6822b312d73a9cd5404629f4e29b489", "score": "0.506284", "text": "private function dynamicTyposcriptMarker($array) {\n\t\tif ($this->conf[$this->typoscriptmarker_prefix[1] . '.'][strtolower($array[1])]) { // If there is a fitting entry in typoscript\n\t\t\t$string = $this->cObj->cObjGetSingle($this->conf[$this->typoscriptmarker_prefix[1] . '.'][strtolower($array[1])], $this->conf[$this->typoscriptmarker_prefix[1] . '.'][strtolower($array[1]) . '.']); // fill string with typoscript value\n\t\t}\n \n\t\tif (!empty($string)) {\n\t\t\treturn $string;\n\t\t}\n }", "title": "" }, { "docid": "976eaad6bbba63d7488de2db33f6ecf4", "score": "0.5048667", "text": "public function findShortcodes($content, $group = null){\n // process enlighter & language shortcodes\n return preg_replace_callback($this->getShortcodeRegex($this->_languageTags), function ($match) use ($group){\n\n // wordpress internal shortcode attribute parsing\n $attb = shortcode_parse_atts($match[2]);\n\n // language identifier (tagname)\n $lang = $match[1];\n\n // generic shortcode ?\n if (strtolower($match[1]) == 'enlighter') {\n // set language\n if ($attb['lang']) {\n $lang = $attb['lang'];\n }\n }\n\n // generate code fragment\n $this->_codeFragments[] = array(\n // the language identifier\n 'lang' => $lang,\n\n // shortcode attributes\n 'attb' => $attb,\n\n // code to highlight\n 'code' => $match[3],\n\n // auto codegroup\n 'group' => $group\n );\n\n // replace it with a placeholder\n return '{{EJS0-' . count($this->_codeFragments) . '}}';\n }, $content);\n }", "title": "" }, { "docid": "7a945c9b7bd8099553a887b4de82e8b3", "score": "0.5046134", "text": "private function initSubtemplates() {\n preg_match_all(self::SUB_PATTERN, $this->content, $matches);\n for ($i = 0; $i < sizeof($matches[0]); $i++) {\n $key = $matches[0][$i];\n $name = $matches[1][$i];\n $substring = $matches[2][$i];\n if (isset($this->subTemplates[$name])) {\n throw new Exception('This template contains more than one'\n . ' subtemplate with one name: ' . $name);\n }\n $this->subTemplateKeys[$name] = $key;\n $this->subTemplateSources[$name] = $substring;\n $this->subTemplates[$name] = array();\n }\n }", "title": "" }, { "docid": "287d386f8b02b01e8cd0188fd3c081a8", "score": "0.50420684", "text": "function listv ($file) { \n\t\t include $file;\n\t\t $lang->group = &$l;\n\t\t\n\t\t foreach ($lang->group as $k => $v) {\n\t\t\t $this->template = str_replace(\"<!--#$k#-->\", $v, $this->template);\n\t\t\t $this->template = str_replace(\"#$k#\", $v, $this->template);\n\t\t\t}\n \n\t}", "title": "" }, { "docid": "6a8b945d9ca58e0db5737e7a176f9d34", "score": "0.4997584", "text": "function read_template(){\n global $Randoms;\n global $template_file; //uri of the file to open\n global $templates,$dbaddr;\n global $ps, $np, $ul, $ul_arr, $o, $tag, $tag_arr, $m, $cat, $cat_arr, $wm, $wf;\n global $dt, $dp, $dx, $dm, $dy, $dd, $db, $de;\n global $clones,$lang,$lang_arr, $sp, $sy, $s, $resultslimit;\n global $affix_file, $spell_file, $spell_host;\n global $stopwordtable_arr, $stopwordfile_arr;\n global $synonym_arr, $searchd_arr;\n global $alias_arr,$type, $type_arr;\n \n $affix_file=array();\n $spell_file=array();\n $alias_arr=array();\n\n\t$dbaddr=array();\n\n $names=array('top', 'bottom', 'restop', 'resbot', 'navigator',\n\t\t\t\t 'res', 'ftpres', 'httpres', 'notfound', 'error', 'variables', \n\t\t\t\t 'clone', 'navleft_nop', 'navright_nop', 'navleft', \n\t\t\t\t 'navbar1', 'navbar0', 'navright', 'noquery', 'site_limit', \n\t\t\t\t 'storedoc_top','storedoc_bottom','storedoc','stored');\n\n $where='';\n \n //First check that the template file is available\n if (!($fp=fopen($template_file, 'r'))){\n\t\techo \"Can't open template file $template_file\";\n\t\texit_local(1);\n } do {\n \t//The template file is there, read it \n\t\t$str=fgets($fp, 1024);\n\n\t\t$param = array();\n if (preg_match('/value=\"(.*)\"[\\s\\t]+selected=\"\\$ps\"/i',$str,$param)) {\n \t\tif (($param[1]) == $ps) {\n \t\t$str=preg_replace('/selected=\"\\$ps\"/i',\"selected\",$str);\n \t\t} else {\n \t\t$str=preg_replace('/selected=\"\\$ps\"/i',\"\",$str);\n \t\t}\n \t\t} elseif (preg_match('/value=\"(.*)\"[\\s\\t]+selected=\"\\$ul\"/i',$str,$param)) {\n \t\t\t$found_param=0;\n \t\t\tfor($i=0; $i<count($ul_arr); $i++) {\n\t\t\t\t$temp_ul=$ul_arr[$i];\n \t\t\tif (($param[1]) == $temp_ul) {\n \t\t\t$str=preg_replace('/selected=\"\\$ul\"/i',\"selected\",$str);\n \t\t\t$found_param=1;\n \t\t\tbreak;\n \t\t}\n \t\t} \n \t\tif (!$found_param) $str=preg_replace('/selected=\"\\$ul\"/i',\"\",$str);\n \t\t} elseif (preg_match('/value=\"(.*)\"[\\s\\t]+selected=\"\\$type\"/i',$str,$param)) {\n \t\t\t$found_param=0;\n \t\t\tfor($i=0; $i<count($type_arr); $i++) {\n\t\t\t\t$temp_type=$type_arr[$i];\n \t\t\tif (($param[1]) == $temp_type) {\n \t\t\t$str=preg_replace('/selected=\"\\$type\"/i',\"selected\",$str);\n \t\t\t$found_param=1;\n \t\t\tbreak;\n \t\t}\n \t\t} \n \t\tif (!$found_param) $str=preg_replace('/selected=\"\\$type\"/i',\"\",$str);\n } elseif (preg_match('/value=\"(.*)\"[\\s\\t]+selected=\"\\$lang\"/i',$str,$param)) {\n\t \t\t$found_param=0;\n\t \t\tfor($i=0; $i<count($lang_arr); $i++) {\n\t\t\t\t$temp_lang=$lang_arr[$i];\n \t\t\tif (($param[1]) == $temp_lang) {\n \t\t\t$str=preg_replace('/selected=\"\\$lang\"/i',\"selected\",$str);\n \t\t\t$found_param=1;\n \t\t\tbreak;\n \t\t}\n \t\t} \n \t\tif (!$found_param) $str=preg_replace('/selected=\"\\$lang\"/i',\"\",$str);\n \t\t} elseif (preg_match('/value=\"(.*)\"[\\s\\t]+selected=\"\\$o\"/i',$str,$param)) {\n \t\tif (($param[1]) == $o) {\n \t\t$str=preg_replace('/selected=\"\\$o\"/i',\"selected\",$str);\n \t\t} else {\n \t\t$str=preg_replace('/selected=\"\\$o\"/i',\"\",$str);\n \t\t}\n \t\t} elseif (preg_match('/value=\"(.*)\"[\\s\\t]+selected=\"\\$m\"/i',$str,$param)) {\n \t\tif (($param[1]) == $m) {\n \t\t$str=preg_replace('/selected=\"\\$m\"/i',\"selected\",$str);\n \t\t} else {\n \t\t$str=preg_replace('/selected=\"\\$m\"/i',\"\",$str);\n \t\t}\n } elseif (preg_match('/value=\"(.*)\"[\\s\\t]+selected=\"\\$wm\"/i',$str,$param)) {\n \t\tif (($param[1]) == $wm) {\n \t\t$str=preg_replace('/selected=\"\\$wm\"/i',\"selected\",$str);\n \t\t} else {\n \t\t$str=preg_replace('/selected=\"\\$wm\"/i',\"\",$str);\n \t\t}\n } elseif (preg_match('/value=\"(.*)\"[\\s\\t]+selected=\"\\$s\"/i',$str,$param)) {\n \t\tif ($param[1] == $s) {\n \t\t$str=preg_replace('/selected=\"\\$s\"/i',\"selected\",$str);\n \t\t} else {\n \t\t$str=preg_replace('/selected=\"\\$s\"/i',\"\",$str);\n \t\t}\n } elseif (preg_match('/value=\"(.*)\"[\\s\\t]+selected=\"\\$sp\"/i',$str,$param)) {\n \t\tif ($param[1] == $sp) {\n \t\t$str=preg_replace('/selected=\"\\$sp\"/i',\"selected\",$str);\n \t\t} else {\n \t\t$str=preg_replace('/selected=\"\\$sp\"/i',\"\",$str);\n \t\t}\n } elseif (preg_match('/value=\"(.*)\"[\\s\\t]+selected=\"\\$sy\"/i',$str,$param)) {\n \t\tif ($param[1] == $sy) {\n \t\t$str=preg_replace('/selected=\"\\$sy\"/i',\"selected\",$str);\n \t\t} else {\n \t\t$str=preg_replace('/selected=\"\\$sy\"/i',\"\",$str);\n \t\t}\n } elseif (preg_match('/value=\"(.*)\"[\\s\\t]+selected=\"\\$wf\"/i',$str,$param)) {\n \t\tif (($param[1]) == $wf) {\n \t\t$str=preg_replace('/selected=\"\\$wf\"/i',\"selected\",$str);\n \t\t} else {\n \t\t$str=preg_replace('/selected=\"\\$wf\"/i',\"\",$str);\n \t\t}\n \t\t} elseif (preg_match('/value=\"(.*)\"[\\s\\t]+selected=\"\\$tag\"/i',$str,$param)) {\n \t\t$found_param=0;\n\t\t\tfor($i=0; $i<count($tag_arr); $i++) {\n\t\t\t\t$temp_tag=$tag_arr[$i];\n \t\t\tif (($param[1]) == $temp_tag) {\n \t\t\t$str=preg_replace('/selected=\"\\$tag\"/i',\"selected\",$str);\n \t\t\t$found_param=1;\n \t\t\tbreak;\n \t\t}\n \t\t} \n \t\tif (!$found_param) $str=preg_replace('/selected=\"\\$tag\"/i',\"\",$str);\n \t\t\t} elseif (preg_match('/type=radio[\\s\\t]+name=\"dt\"[\\s\\t]+value=\"(.*)\"/i',$str,$param)) {\n \t\tif (($param[1]) == $dt) {\n \t\t$str=preg_replace(\"/value=\\\"$dt\\\"/i\",\"value=\\\"$dt\\\" checked\",$str);\n \t\t} else { \n \t\t$str=preg_replace('/checked/i',\"\",$str);\n \t\t}\n \t \t} elseif (preg_match('/value=\"(.*)\"[\\s\\t]+selected=\"\\$dp\"/i',$str,$param)) {\n \t\tif (($param[1]) == $dp) {\n \t\t$str=preg_replace('/selected=\"\\$dp\"/i',\"selected\",$str);\n \t\t} else { \n \t\t$str=preg_replace('/selected=\"\\$dp\"/i',\"\",$str);\n \t\t}\n \t\t} elseif (preg_match('/value=\"(.*)\"[\\s\\t]+selected=\"\\$dx\"/i',$str,$param)) {\n \t\tif (($param[1]) == $dx) {\n \t\t$str=preg_replace('/selected=\"\\$dx\"/i',\"selected\",$str);\n \t\t} else { \n \t\t$str=preg_replace('/selected=\"\\$dx\"/i',\"\",$str);\n \t\t}\n \t\t} elseif (preg_match('/value=\"(.*)\"[\\s\\t]+selected=\"\\$dm\"/i',$str,$param)) {\n \t\tif (($param[1]) == $dm) {\n \t\t$str=preg_replace('/selected=\"\\$dm\"/i',\"selected\",$str);\n \t\t} else { \n \t\t$str=preg_replace('/selected=\"\\$dm\"/i',\"\",$str);\n \t\t}\n \t\t} elseif (preg_match('/value=\"(.*)\"[\\s\\t]+selected=\"\\$dy\"/i',$str,$param)) {\n \t\tif (($param[1]) == $dy) {\n \t\t$str=preg_replace('/selected=\"\\$dy\"/i',\"selected\",$str);\n \t\t} else { \n \t\t$str=preg_replace('/selected=\"\\$dy\"/i',\"\",$str);\n \t\t}\n \t\t}\n\n\t\tif (preg_match('/\\$g\\((\\d*)\\)/i',$str,$param)) {\t \t \n\t\t $str=str_replace(\"\\$g($param[1])\",substr($tag,0,strlen($tag)-$param[1]),$str);\n\t\t}\n\t\n\t\t//Replace date attributes\n $str=str_replace(\"\\$dd\",$dd,$str);\n $str=str_replace(\"\\$dy\",$dy,$str);\n $str=str_replace(\"\\$dm\",$dm,$str);\n $str=str_replace(\"\\$db\",$db,$str);\n $str=str_replace(\"\\$de\",$de,$str);\n\n\t\t//Replace page numbering\n $str=str_replace(\"\\$ps\",$ps,$str);\n\t\t$str=str_replace(\"\\$pn\",$ps*$np,$str);\n $str=str_replace(\"\\$cat\",$cat,$str);\n\n\t\t\n if (preg_match('/\\$IF\\s?\\((.+)\\)/i',$str,$param)) {\n\t\t $param[1]=trim($param[1]);\n\t\t $str=preg_replace('/\\$IF\\s?\\((.+)\\)/i',load_file($param[1]),$str);\t \n }\n\n\t\t$comment_flag=0;\n\t\t\n\t\t//If found comment tag, add empty field to the $templates array for the corresponding tag \n\t\tif (substr($str, 0, 4) == \"<!--\") {\n\t\t\treset($names);\n\t\t\twhile ($name=current($names)){\n\t\t\t if (strstr($str, \"<!--$name\")){\n\t\t\t\t\t$where=$name;\n\t\t\n\t\t\t\t\t$templates[\"$where\"][] = '';\n\t\t\t\t\t\n\t\t\t\t\t$comment_flag=1;\n\t\t\t\t\tbreak;\n\t\t\t } elseif (strstr($str, \"/$name-->\")) {\n\t\t\t\t\t$where='';\n\t\t\t\t\t$comment_flag=1;\n\t\t\t\t\tbreak;\n\t\t\t }\n\t\t\t next($names);\n\t\t\t}\n\t\t}\n\t\n\t\t//if found a comment on this line, skip to the next line (do{...})\n\t\tif ($comment_flag) continue;\n\n\t\t//if the previous line was a comment and contained 'variables'\n\t\t//'variables' is the section of the template where the configuration is\n\t\t//Once this section is over, the HTML template really begins\n\t\tif ($where=='variables') {\n\t\t\t//if the line starts with a #, it's a comment so skip to next line\n\t\t if (ereg(\"^#\",$str)) continue;\n\n\t\t\t//look for some characters not space or tab starting a line, \n\t\t\t//followed by spaces or tabs, followed by any chars (basically any var..value couple)\n\t\t if (preg_match(\"/^([^\\s\\t]+)[\\s\\t]+(.+)/\",$str,$param)) {\n\t $var=$param[1];\n\t\t\t $value=$param[2];\n\t\t\t $var=strtolower($var);\n\t\n\t\t\t $var=trim($var);\n\t\t\t $value=trim($value); \n\n\t\t\t //assign each value to the corresponding array, for reuse later\n\t\t\t if ($var=='affix') {\n\t\t\t \tif ($sp=='') $sp=1;\n\t\t\t \t$GLOBALS[\"ispellmode\"]=\"text\";\n\t\t \t\tif (preg_match(\"/([^\\s\\t]+)[\\s\\t]+([^\\s\\t]+)[\\s\\t]+(.+)/\",$value,$param)) {\n\t\t \t\t$t_lang=trim($param[1]);\n $t_charset=trim($param[2]);\n\t\t \t\t$file=trim($param[3]);\n\n\t\t \t\t$affix_file[$t_lang]=\"$t_charset;$file\";\n\t\t \t} else {\n\t\t \t\tprint \"Unsupported Affix command: Affix $value\\n<br>\";\n\t\t \t\texit;\n\t\t \t}\n\t\t\t } elseif ($var=='spell') {\n if ($sp=='') $sp=1;\n $GLOBALS[\"ispellmode\"]=\"text\";\n \t \t\tif (preg_match(\"/([^\\s\\t]+)[\\s\\t]+([^\\s\\t]+)[\\s\\t]+(.+)/\",$value,$param)) {\n\t\t\t \t\t$t_lang=trim($param[1]);\n $t_charset=trim($param[2]);\n\t\t\t \t\t$file=trim($param[3]);\n\t\n\t\t\t \t\t$spell_file[$t_lang][]=\"$t_charset;$file\";\n\t\t\t \t\t} else {\n\t\t\t \t\tprint \"Unsupported Spell command: Spell $value\\n<br>\";\n\t\t\t \t\texit;\n\t\t\t \t\t}\n\t\t\t\t} elseif ($var=='ispellmode') {\n if (preg_match(\"/^server[\\s\\t]+(.+)/i\",$value,$param)) {\n\t\t\t\t $spell_host=trim($param[1]);\n $GLOBALS[\"ispellmode\"]=\"server\";\n\t\t \t\t } else {\n\t\t \t \t\t \t $GLOBALS[\"$var\"]=\"$value\";\n\t\t \t\t\t }\n\t\t \t\t} elseif ($var=='alias') {\n if (preg_match(\"/^([^\\s]+)\\s+(.+)$/i\",$value,$param)) {\n \t $alias_arr[trim($param[1])]=trim($param[2]);\n\t\t \t\t\t} else {\n\t\t \t\t\t $GLOBALS[\"$var\"]=\"$value\";\n\t\t \t\t\t}\n\t } elseif ($var=='stopwordtable') {\n\t $stopwordtable_arr[]=$value;\n\t } elseif ($var=='stopwordfile') {\n\t $stopwordfile_arr[]=$value;\n\t } elseif ($var=='synonym') {\n\t if ($sy=='') $sy=1;\n\t $synonym_arr[]=$value;\n\t } elseif ($var=='searchdaddr') {\n\t $searchd_arr[]=$value;\n\t\t\t } elseif ($var=='r') {\n\t\t\t $rand=0+substr($var,1);\n\t\t\t $frand=rand();\n\t\t\t $frand=$frand/getrandmax()*$value;\n\t\t\t $Randoms[$rand]=floor($frand);\n\t\t\t } elseif ($var=='dbaddr') {\n\t\t \t\t$dbaddr[]=$value;\n\t\t\t } else {\n\t\t\t $GLOBALS[\"$var\"]=\"$value\";\n\t\t\t }\n\t }\n\t}\n\telse\n\tif ($where!=''){\n\t $templates[\"$where\"][count($templates[\"$where\"])-1] .= $str;\n\t}\n\t\n } while (!feof($fp));//do this big loop until we reach the end of the file\n\n fclose($fp);\n}", "title": "" }, { "docid": "93c25aeb5f9ed2319b70e915c4617a42", "score": "0.4967535", "text": "function i18n_substitute_text_token($token) {\n\tglobal $i18n_tokens;\n\t$a = trim($token[1]);\n\t//found\n\tif (isset($i18n_tokens[$a]))\n\t\treturn $i18n_tokens[$a];\n\telse {\n\t\t//not found, new entry in language file is created\n\t\t$f = 'app/'.Request::get_current_application().'/i18n/lang_'.i18n_get_language().'.php'; \n\t\tif (file_exists($f) && is_writeable($f)) {\n\t\t\t$s = file_get_contents($f);\n\t\t\teval($s);\n\t\t} else {\n\t\t\techo \"No file access for\".$f.\" von \".__FILE__.\"<br>\";\n\t\t\treturn $token;\n\t\t} \n\t\tif (isset($i18n_tokens[$a]))\n\t\t\treturn $i18n_tokens[$a]; \n\n\t\t$i18n_tokens[$a] = $a; \n\t\t$s = '$i18n_tokens'.\"['\".$a.\"']\".\"='\".$a.\"'; //neu\" . PHP_EOL;\n\t\tif ($handle = fopen($f,'a')){\n\t\t\tfwrite($handle, $s);\n\t\t\tfclose($handle);\n\t\t}\n\t\treturn $a;\n\t}\n}", "title": "" }, { "docid": "bf5993f7766568cee74723a5bc46acf7", "score": "0.4953276", "text": "function translateMarkUpString( $input , $lang )\n {\n if( $lang == $this->getOption('sourceLanguage') ) // we dont need to translate a string from the source language to the source language\n {\n \t// this would be a cool feature, if i get it done :-)\n $url=$this->getOption('translatorUrl');\n if( $url )\n {\n $this->getAll( $lang );\n return $this->addTranslatorLinks( $input , $url );\n }\n return $input;\n }\n\n $this->getAll( $lang ); // get all the possible strings from the DB\n \n $addModifier = $this->getOption('caseSensitive') ? '' : 'i';\n\n// FIXXME replace all spaces by something like this: (\\s*|<br>|<br/>|<font.*>|</font>|<i>|</i>|<b>|</b>|&nbsp;)\n// simply all those formatting tags which dont really cancel the phrase that should be translated\n// and put them back in the translated string\n// by filling $x in the right place and updating $lastSubpattern\n// then it will be really cool and the text to translate will be recognized with any kind of space inbetween\n// *NO* \n// we dont want to do the above thing, since the formatting inside a text needs to be taken care of\n// by the translator, this method here has no chance to know that 'this is a <b>user</b> from germany'\n// has to become 'dies ist ein <b>Benutzer</b> aus Deutschland', the grammar of languages might be so different,\n// that the marked part can be in a totally different place in the destination language string!\n\n if(is_array($this->_translated['strings']) && sizeof($this->_translated['strings']))\n foreach( $this->_translated['strings'] as $aString ) // search for each single string and try to translate it\n {\n $lastSubpattern = 2;\n // we use 2 strings that we search for, one is the real text as from the db\n // the second $htmlSourceString is the source string but with all non html characters\n // translated using htmlentities, in case someone has been programming proper html :-)\n \n // shall the translated string be converted to HTML, or does it may be contain HTML?\n if( isset($aString['convertToHtml']) && $aString['convertToHtml'] )\n $translated = htmlentities($aString['translated']);\n else\n $translated = $aString['translated'];\n\n if( $aString['numSubPattern'] )// if the string is a regExp, we need to update $lastSubpattern\n {\n \t// we dont preg_quote the strings which contain regExps's\n \t// if chars like '.' or alike which also appear in regExps they have to be \n \t// escaped by the person who enters the source-string (may be we do that better one day)\n $sourceString = $aString['string'];\n $htmlSourceString = htmlentities($aString['string']);// we should not preg_quote the string\n\n $lastSubpattern = 2 + $aString['numSubPattern']; // set $lastSubpattern properly\n\n // in the DB the spaceholders start with $1, but here we need it\n // to start with $2, that's what the following does\n preg_match_all ( '/\\$(\\d)/' , $translated , $res );\n $res[0] = array_reverse($res[0]); // reverse the arrays, since we replace $1 by $2 and then $2 by $3 ...\n $res[1] = array_reverse($res[1]); // ... if we wouldnt reverse all would become $<lastNumber>\n foreach( $res[0] as $index=>$aRes )\n {\n $aRes = preg_quote($aRes);\n $translated = preg_replace( '/'.$aRes.'/' , '\\$'.($res[1][$index]+1) , $translated );\n \t}\n }\n else\n {\n // in none regExp's source strings we better quote the chars which could be\n // mistakenly seen as regExp chars\n $sourceString = preg_quote(trim($aString['string']));\n $htmlSourceString = preg_quote(htmlentities(trim($aString['string'])));\n // escape all slashes, since preg_quote doenst do that :-(\n $sourceString = str_replace('/','\\/',$sourceString);\n $htmlSourceString = str_replace('/','\\/',$htmlSourceString);\n }\n\n foreach( $this->possibleMarkUpDelimiters as $delimiters ) // go thru all the delimiters and try to translate the strings\n {\n// FIXXME there might be a major problem:\n// <td\n// {if($currentPageIndex==$key)}\n// class=\"naviItemSelected\" this line will also be tried to translated, since the line before and the one after\n// will start/end with php tags, which also start/end with a < or > which are possible delimtier :-(\n// {else}\n// class=\"naviItem\"\n// nowrap>\n//\n// \n $numSubPatterns = array(0,0);\n $begin = $delimiters[0];\n $end = $delimiters[1];\n if( isset($delimiters[2]) ) $numSubPatterns[0] = $delimiters[2];\n if( isset($delimiters[3]) ) $numSubPatterns[1] = $delimiters[3];\n\n // replace all spaces in the source string by \\s* so that there can be spaces\n // as many as one wants \n // and even newlines (the modifier s in the preg_replace takes care of that)\n $sourceString = preg_replace('/\\s+/','\\\\s*',$sourceString);\n $htmlSourceString = preg_replace('/\\s+/s','\\\\s*',$htmlSourceString);\n\n $_hashCode = md5($input); \n \n $input = preg_replace( '/('.$begin.')'.$sourceString.'('.$end.')/sU'.$addModifier ,\n '$1'.$translated.'$'.($lastSubpattern+$numSubPatterns[0]) ,\n $input );\n\n // if the regExp above didnt have no effect try this one with all html characters translated\n // if we wouldnt check this i had the effect that something was translated twice ...\n // dont know exactly why but it did :-)\n if( $_hashCode == md5($input) )\n {\n // try also to translate the string with all non-HTML-characters translated using htmlentities\n // may be someone was creating proper html :-)\n $input = preg_replace( '/('.$begin.')'.$htmlSourceString.'('.$end.')/sU'.$addModifier ,\n '$1'.$translated.'$'.($lastSubpattern+$numSubPatterns[0]) ,\n $input );\n }\n\n }\n }\n return $input;\n }", "title": "" }, { "docid": "96744f953c07d0b3967f6a2c279d9729", "score": "0.49501348", "text": "function replaceMarkersInSQL($sql, $table, $row)\t{\n\n\t\t$TSconfig = t3lib_BEfunc::getTCEFORM_TSconfig($table, $row);\n\n\t\t/* Replace references to specific fields with value of that field */\n\t\tif (strstr($sql,'###REC_FIELD_'))\t{\n\t\t\t$sql_parts = explode('###REC_FIELD_',$sql);\n\t\t\twhile(list($kk,$vv)=each($sql_parts))\t{\n\t\t\t\tif ($kk)\t{\n\t\t\t\t\t$sql_subpart = explode('###',$vv,2);\n\t\t\t\t\t$sql_parts[$kk]=$TSconfig['_THIS_ROW'][$sql_subpart[0]].$sql_subpart[1];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$sql = implode('',$sql_parts);\n\t\t}\n\n\t\t/* Replace markers with TSConfig values */\n\t\t$sql = str_replace('###THIS_UID###',intval($TSconfig['_THIS_UID']),$sql);\n\t\t$sql = str_replace('###THIS_CID###',intval($TSconfig['_THIS_CID']),$sql);\n\t\t$sql = str_replace('###SITEROOT###',intval($TSconfig['_SITEROOT']),$sql);\n\t\t$sql = str_replace('###PAGE_TSCONFIG_ID###',intval($TSconfig[$field]['PAGE_TSCONFIG_ID']),$sql);\n\t\t$sql = str_replace('###PAGE_TSCONFIG_IDLIST###',$GLOBALS['TYPO3_DB']->cleanIntList($TSconfig[$field]['PAGE_TSCONFIG_IDLIST']),$sql);\n\t\t$sql = str_replace('###PAGE_TSCONFIG_STR###',$GLOBALS['TYPO3_DB']->quoteStr($TSconfig[$field]['PAGE_TSCONFIG_STR'], $table),$sql);\n\n\t\treturn $sql;\n\t}", "title": "" }, { "docid": "65a27a91085b3ad1bf5cae1baf877650", "score": "0.49426317", "text": "protected function fillTranslations()\n\t{\n\t\t/* @var EsModelLanguage $language */\n\t\tforeach ($this->languages as $language)\n\t\t{\n\t\t\t$sql = '\n\t\t\t\tSELECT `key`, `value`\n\t\t\t\tFROM translations\n\t\t\t\tWHERE languageId = '.sqlval($language->getLanguageId()).'\n\t\t\t\t\tAND !deleted\n\t\t\t';\n\t\t\t$translations = query($sql, true);\n\n\t\t\tforeach ($translations as $translation)\n\t\t\t{\n\t\t\t\t$this->translations[$language->getLanguageId()][$translation['key']]\n\t\t\t\t\t= $translation['value'];\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "82ce2da3300d676139b5abdd24a1bf65", "score": "0.49372596", "text": "function perform_search_replace($reps)\n{\n // Find directories to do replacements in...\n\n $target_dirs = array();\n\n $langs = find_all_langs();\n\n require_code('themes2');\n $themes = find_all_themes();\n foreach (array_keys($themes) as $theme) {\n $target_dirs[] = 'themes/' . $theme . '/templates_custom';\n $target_dirs[] = 'themes/' . $theme . '/css_custom';\n $target_dirs[] = 'themes/' . $theme . '/text_custom';\n $target_dirs[] = 'themes/' . $theme . '/xml_custom';\n $target_dirs[] = 'themes/' . $theme . '/javascript_custom';\n }\n\n $target_dirs[] = 'text_custom';\n foreach (array_keys($langs) as $lang) {\n $target_dirs[] = 'text_custom/' . $lang;\n }\n\n $zones = find_all_zones();\n foreach ($zones as $zone) {\n foreach (array_keys($langs) as $lang) {\n $target_dirs[] = $zone . (($zone == '') ? '' : '/') . 'pages/comcode_custom/' . $lang;\n }\n }\n\n // Do replacement...\n\n foreach ($target_dirs as $_dir) {\n $dir = get_custom_file_base() . '/' . $_dir;\n if (is_dir($dir)) {\n $dh = opendir($dir);\n if ($dh !== false) {\n while (($f = readdir($dh)) !== false) {\n $path = $dir . '/' . $f;\n $contents = file_get_contents($path);\n $contents_orig = $contents;\n $contents = preg_replace(array_keys($reps), array_values($reps), $contents);\n if ($contents != $contents_orig) {\n require_code('files');\n cms_file_put_contents_safe($path, $contents, FILE_WRITE_FIX_PERMISSIONS | FILE_WRITE_SYNC_FILE);\n }\n }\n closedir($dh);\n }\n }\n }\n}", "title": "" }, { "docid": "a0b852f018cf52e006926a8192841e0b", "score": "0.49319506", "text": "function translate_markup($data) {\n\tglobal $convert_revision_regexp;\n\tif (!empty($convert_revision_regexp)) {\n\t\t$data = preg_replace(array_keys($convert_revision_regexp), array_values ($convert_revision_regexp), $data);\n\t}\n\n // Replace code blocks with an associated language\n $data = preg_replace('/\\{\\{\\{(\\s*#!(\\w+))?/m', '```$2', $data);\n $data = preg_replace('/\\}\\}\\}/', '```', $data);\n\n // Replace title blocks\n $data = preg_replace(\"/^=(\\s.+\\s)=$/\", '#$1#', $data);\n $data = preg_replace(\"/^==(\\s.+\\s)==$/\", '##$1##', $data);\n $data = preg_replace(\"/^===(\\s.+\\s)===$/\", '###$1###', $data);\n $data = preg_replace(\"/^====(\\s.+\\s)====$/\", '####$1####', $data);\n\n\t// Do string replacement if required\n\tglobal $textReplacements;\n\tif ($textReplacements) {\n\t\t$data = strtr ($data, $textReplacements);\n\t}\n\n // Remove e-mail addresses out of courtesy\n global $removeEmailAddresses;\n if ($removeEmailAddresses) {\n $data = preg_replace('|([_\\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\\.)+[a-z]{2,6})|', '[e-mail address removed]', $data);\n }\n\n // Replace bold and italic\n $data = preg_replace(\"/'''(\\S.+\\S)'''/\", '**$1**', $data);\n $data = preg_replace(\"/''(\\S.+\\S)''/\", '*$1*', $data);\n\n // Avoid non-ASCII characters, as that will cause trouble with json_encode()\n $data = preg_replace('/[^(\\x00-\\x7F)]*/','', $data);\n\t\n // Possibly translate other markup as well?\n return $data;\n}", "title": "" }, { "docid": "a582299de3c88b51e19bd59265eec7a4", "score": "0.49303043", "text": "function wpml_post_languages_in_loop() {\n $thispostid = get_the_ID();\n $post_trid = apply_filters('wpml_element_trid', NULL, get_the_ID(), 'post_' . get_post_type());\n $languages = apply_filters( 'wpml_active_languages', NULL, 'skip_missing=0&orderby=code' );\n if (empty($post_trid))\n return;\n $translation = apply_filters('wpml_get_element_translations', NULL, $post_trid, 'post_' . get_post_type());\n if (1 < count($translation)) {\n echo '<p class=\"vf-summary__meta\">Other language(s): &nbsp;&nbsp;';\n foreach ($translation as $l) {\n if ($l->element_id != $thispostid) {\n $langs[] = '<a href=\"' . apply_filters('wpml_permalink', ( get_permalink($l->element_id)), $l->language_code) . '\"><img class=\"wpml-ls-flag iclflag\" src=\"'.$languages[$l->language_code]['country_flag_url'].'\" />' . '</a>';\n }\n }\n echo join(' &nbsp; ', $langs);\n echo '</p>';\n }\n}", "title": "" }, { "docid": "8c4ccf54e048f50a4f5760717e280b13", "score": "0.49164706", "text": "function rewriteTemplates()\n {\n if (!file_exists(\"arrays/rewriteTemplates.php\")) {\n die(\"Couldn't find arrays/rewriteTemplates.php\");\n }\n include_once \"arrays/rewriteTemplates.php\";\n\n $result = $this->Execute(\"select template_code from geodesic_templates where template_id = 133\", true) or $this->DBError(__LINE__);\n $row = $result->FetchRow();\n $code = str_replace($userManagement[\"search\"], $userManagement[\"replace\"], $row[\"template_code\"]);\n $this->Execute(\"update geodesic_templates set template_code = '\" . addslashes($code) . \"' where template_id = 133\");\n\n $query = \"select template_id,template_code from geodesic_templates\";\n $result = $this->Execute($query, true) or $this->DBError(__LINE__);\n\n while ($row = $result->FetchRow()) {\n $code = $row['template_code'];\n\n $code = str_replace($search, $replace, $code);\n\n $code = preg_replace_callback(\"/index\\.php\\?a=(1[0-9]{3})/\", function ($matches) {\n return \"index.php?a=\" . ($matches[1] > 1000 ? $matches[1] - 1000 : $matches[1]);\n }, $code);\n $code = preg_replace_callback(\"/index\\.php\\?a=28&b=(1[0-9]{4})/\", function ($matches) {\n return \"index.php?a=28&b=\" . ($matches[1] > 10000 ? $matches[1] - 10000 : $matches[1]);\n }, $code);\n\n $query = \"update geodesic_templates set template_code = '\" . addslashes($code) . \"' where template_id = '\" . $row['template_id'] . \"'\";\n $this->Execute($query) or $this->DBError(__LINE__);\n }\n }", "title": "" }, { "docid": "3cc8b5511ef9f26c6508ee9e5503e22b", "score": "0.49066156", "text": "function _comcode_lang_string($lang_code)\n{\n\tglobal $COMCODE_LANG_STRING_CACHE;\n\tif (array_key_exists($lang_code,$COMCODE_LANG_STRING_CACHE)) return $COMCODE_LANG_STRING_CACHE[$lang_code];\n\n\t$comcode_page=$GLOBALS['SITE_DB']->query_select('cached_comcode_pages p LEFT JOIN '.$GLOBALS['SITE_DB']->get_table_prefix().'translate t ON t.id=string_index AND '.db_string_equal_to('t.language',user_lang()),array('string_index','text_parsed'),array('the_page'=>$lang_code,'the_zone'=>'!'),'',1);\n\tif ((array_key_exists(0,$comcode_page)) && (!is_browser_decacheing()))\n\t{\n\t\tif ((!is_null($comcode_page[0]['text_parsed'])) && ($comcode_page[0]['text_parsed']!=''))\n\t\t{\n\t\t\t$parsed=new ocp_tempcode();\n\t\t\tif (!$parsed->from_assembly($comcode_page[0]['text_parsed'],true))\n\t\t\t{\n\t\t\t\t$ret=get_translated_tempcode($comcode_page[0]['string_index']);\n\t\t\t\tunset($GLOBALS['RECORDED_LANG_STRINGS_CONTENT'][$comcode_page[0]['string_index']]);\n\t\t\t}\n\t\t} else\n\t\t{\n\t\t\t$ret=get_translated_tempcode($comcode_page[0]['string_index'],NULL,NULL,true);\n\t\t\tif (is_null($ret)) // Not existent in our language, we'll need to lookup and insert, and get again\n\t\t\t{\n\t\t\t\t$looked_up=do_lang($lang_code,NULL,NULL,NULL,NULL,false);\n\t\t\t\t$GLOBALS['SITE_DB']->query_insert('translate',array('id'=>$comcode_page[0]['string_index'],'source_user'=>get_member(),'broken'=>0,'importance_level'=>1,'text_original'=>$looked_up,'text_parsed'=>'','language'=>user_lang()),true,false,true);\n\t\t\t\t$ret=get_translated_tempcode($comcode_page[0]['string_index']);\n\t\t\t}\n\t\t\tunset($GLOBALS['RECORDED_LANG_STRINGS_CONTENT'][$comcode_page[0]['string_index']]);\n\t\t\treturn $ret;\n\t\t}\n\t\t$COMCODE_LANG_STRING_CACHE[$lang_code]=$parsed;\n\t\treturn $parsed;\n\t} elseif (array_key_exists(0,$comcode_page))\n\t{\n\t\t$GLOBALS['SITE_DB']->query_delete('cached_comcode_pages',array('the_page'=>$lang_code,'the_zone'=>'!'));\n\t\tdelete_lang($comcode_page[0]['string_index']);\n\t}\n\n\t$nql_backup=$GLOBALS['NO_QUERY_LIMIT'];\n\t$GLOBALS['NO_QUERY_LIMIT']=true;\n\t$looked_up=do_lang($lang_code,NULL,NULL,NULL,NULL,false);\n\tif (is_null($looked_up)) return make_string_tempcode(escape_html('{!'.$lang_code.'}'));\n\t$index=insert_lang_comcode($looked_up,4,NULL,true,NULL,60,false,true);\n\t$GLOBALS['SITE_DB']->query_insert('cached_comcode_pages',array('the_zone'=>'!','the_page'=>$lang_code,'string_index'=>$index,'the_theme'=>$GLOBALS['FORUM_DRIVER']->get_theme(),'cc_page_title'=>NULL),false,true); // Race conditions\n\t$parsed=get_translated_tempcode($index);\n\t$COMCODE_LANG_STRING_CACHE[$lang_code]=$parsed;\n\n\t$GLOBALS['NO_QUERY_LIMIT']=$nql_backup;\n\n\treturn $parsed;\n}", "title": "" }, { "docid": "59bf36116559a361d4bda65acd86054c", "score": "0.49040517", "text": "protected function compile() {\r\n\r\n $objMap = LeafletMapsModel::findByPk($this->leaflet_map);\r\n\r\n if (!$objMap) {\r\n $this->Template->map = null;\r\n return;\r\n }\r\n\r\n $opt_in_needed = true;\r\n if (Input::cookie('leaflet_map')) {\r\n $opt_in_needed = null;\r\n if (empty($GLOBALS['TL_JAVASCRIPT']['leaflet_main_js'])) {\r\n $GLOBALS['TL_JAVASCRIPT']['leaflet_main_js'] = '/bundles/leafletmaps/leaflet/leaflet.js|static';\r\n }\r\n if (empty($GLOBALS['TL_CSS']['leaflet_main_css'])) {\r\n $GLOBALS['TL_CSS']['leaflet_main_css'] = '/bundles/leafletmaps/leaflet/leaflet.css|static';\r\n }\r\n }\r\n\r\n $objMarkers = LeafletMapsMarkerModel::findBy(\r\n ['pid=?', 'published=?'],\r\n [$objMap->id, '1']\r\n );\r\n\r\n $openedMarkers = 0;\r\n if ($objMarkers) {\r\n $arrMarkers = [];\r\n\r\n while ($objMarkers->next()) {\r\n $arrMarker = $objMarkers->row();\r\n $arrMarkers[] = $arrMarker;\r\n $openedMarkers += ($arrMarker['popup_open'] ? 1 : 0);\r\n }\r\n }\r\n\r\n $this->Template->opt_in_needed = $opt_in_needed;\r\n $this->Template->map = $objMap->row();\r\n $this->Template->markers = ($objMarkers ? $arrMarkers : null);\r\n $this->Template->multi_open_markers = ($openedMarkers > 1 ? true : null);\r\n \r\n $this->Template->mapWidth = \\Contao\\StringUtil::deserialize($objMap->map_size_width);\r\n $this->Template->mapHeight = \\Contao\\StringUtil::deserialize($objMap->map_size_height);\r\n }", "title": "" }, { "docid": "b690f830a299f116d4b217736e579f74", "score": "0.48937023", "text": "function SIT_i18n_template_fix($url){//\t\t\t\t\t\t\t\tFind the original template from the original file.\n\tglobal $SIT_COMPATIBILITY;\n\tif($SIT_COMPATIBILITY['i18n_base.php']){\n\t\t$language_list = return_i18n_available_languages();\n\t\t$split_template = explode('_', $url);\n\t\t$template_len = count($split_template);\n\t\t$template_lang = false;\n\t\t$check_template = $split_template[0];\n\t\tif($template_len>1){\n\t\t$template_lang = $split_template[$template_len-1];\n\t\tfor($i=1;$i<=($template_len-2);$i++){//\t\t\t\t\t\tReassemble any underscores.\n\t\t\t$check_template .= '_' . $split_template[$i];}}\n\t\tif($template_lang && in_array($template_lang, $language_list)){// make sure the file is a language file.\n\t\t\t$file = GSDATAPAGESPATH . $check_template . '.xml';\n\t\t\tif (file_exists($file)) {\n\t\t\t\t$data = getXML($file);\n\t\t\t\treturn $data->template;\n\t\t\t} else { return false; }\n\t\t} else { return false; }\n\t} else { return false; }\n}", "title": "" }, { "docid": "7343f5407e7c8e6c4cb6157f5ab275c1", "score": "0.48876515", "text": "function define_languages () {\n global $languages;\n\n $languages = array (\n translate ( 'English' ) => 'English-US', // translate ( 'English-US' )\n translate ( 'Afrikaans' ) => 'Afrikaans',\n translate ( 'Albanian' ) => 'Albanian',\n translate ( 'Arabic' ) . ' (UTF8)' => 'Arabic_utf8',\n translate ( 'Basque' ) => 'Basque',\n translate ( 'Bulgarian' ) => 'Bulgarian',\n translate ( 'Catalan' ) => 'Catalan',\n translate ( 'Chinese (Simplified/GB2312)' ) => 'Chinese-GB2312',\n translate ( 'Chinese (Traditional/Big5)' ) => 'Chinese-Big5',\n translate ( 'Croatian' ) . ' (UTF8)' => 'Croatian_utf8',\n translate ( 'Czech' ) => 'Czech',\n translate ( 'Czech' ) . ' (UTF8)' => 'Czech',\n translate ( 'Danish' ) => 'Danish',\n translate ( 'Dutch' ) => 'Dutch',\n translate ( 'Dutch' ) . ' (UTF-8)' => 'Dutch_utf8',\n translate ( 'Elven' ) => 'Elven',\n translate ( 'Estonian' ) => 'Estonian',\n translate ( 'Finnish' ) => 'Finnish',\n translate ( 'French' ) . ' (UTF8)' => 'French-UTF8',\n translate ( 'French' ) => 'French',\n translate ( 'Galician' ) => 'Galician',\n translate ( 'German' ) => 'German',\n translate ( 'German' ) . ' (UTF-8)' => 'German_utf8',\n translate ( 'Greek' ) => 'Greek',\n translate ( 'Hebrew' ) . ' (UTF-8)' => 'Hebrew_utf8',\n translate ( 'Holo (Taiwanese)' ) => 'Holo-Big5',\n translate ( 'Hungarian' ) => 'Hungarian',\n translate ( 'Icelandic' ) => 'Icelandic',\n translate ( 'Indonesian' ) => 'Bahasa_Indonesia',\n translate ( 'Italian' ) => 'Italian',\n translate ( 'Japanese' ) . ' (EUC-JP)' => 'Japanese-eucjp',\n translate ( 'Japanese' ) . ' (SHIFT JIS)' => 'Japanese-sjis',\n translate ( 'Japanese' ) . ' (UTF-8)' => 'Japanese',\n translate ( 'Korean' ) => 'Korean',\n translate ( 'Lithuanian' ) => 'Lithuanian',\n translate ( 'Norwegian' ) => 'Norwegian',\n translate ( 'Polish' ) => 'Polish',\n translate ( 'Polish' ) . ' (UTF-8)' => 'Polish-utf8',\n translate ( 'Portuguese' ) => 'Portuguese',\n translate ( 'Portuguese/Brazil' ) => 'Portuguese_BR',\n translate ( 'Portuguese/Brazil' ) . ' (UTF-8)' => 'Portuguese_BR_utf8',\n translate ( 'Romanian' ) => 'Romanian',\n translate ( 'Russian' ) . ' (UTF-8)' => 'Russian_utf8',\n translate ( 'Russian' ) => 'Russian',\n translate ( 'Serbian' ) . ' (UTF-8)' => 'Serbian_utf8',\n translate ( 'Slovak' ) . ' (UTF-8)' => 'Slovak_utf8',\n translate ( 'Slovenian' ) => 'Slovenian',\n translate ( 'Spanish' ) => 'Spanish',\n translate ( 'Swedish' ) => 'Swedish',\n translate ( 'Turkish' ) => 'Turkish',\n translate ( 'Welsh' ) => 'Welsh'\n // Add new languages here!\n );\n //Sort languages in translated order\n asort ( $languages );\n //make sure Browser Defined is first in list\n $browser_defined = array ( translate ( 'Browser-defined' ) => 'none');\n $languages = array_merge ( $browser_defined, $languages );\n}", "title": "" }, { "docid": "4877d41b457131819904b5d6f79f4440", "score": "0.4886983", "text": "function newtemplate($files, $temfilename, $styleidcode, $lang_zone, $nest = 4, $plugins = 0)\n{\n global $template, $template_filename, $template_html_content, $_tmp, $cachedstyle, $template_content, $language, $openstylereplace;\n $template_name_php = $plugins ? \"datafile/cache/themes/$styleidcode/$files-p-$temfilename-$language-$openstylereplace.php\" : \"datafile/cache/themes/$styleidcode/$files-$language-$openstylereplace.php\";\n \n $_tmp['langZone'] = $lang_zone;\n \n if($cachedstyle) {\n \t$htmfile = $plugins ? \"plugins/templates/$temfilename/$files.htm\" : \"newtem/$temfilename/$files.htm\";\n \tif(@filemtime($htmfile) > @filemtime($template_name_php)) {\n \t\t$cachedstyle = 0;\n \t}\n }\n \n if (!file_exists($template_name_php) || $cachedstyle == 0) {\n \t$file = $plugins ? \"plugins/templates/$temfilename/$files.htm\" : \"newtem/$temfilename/$files.htm\";\n \tif (!file_exists($file)) {\n \t\t$file = $plugins ? \"plugins/templates/bsd01/$files.htm\" : \"newtem/bsd01/$files.htm\";\n \t}\n \t$cache = 0;\n } else {\n \t$file = $template_name_php;\n \t$cache = 1;\n }\n $template = readfromfile($file);\n if ($cache == 0) {\n \tif (file_exists(str_replace(\"{language_pic}\", $language.\"/\", $lang_zone['npost']))) \n \t{\n \t\t$lang_zone['npost'] = str_replace(\"{language_pic}\", $language.\"/\", $lang_zone['npost']);\n \t\t$lang_zone['npollicon'] = str_replace(\"{language_pic}\", $language.\"/\", $lang_zone['npollicon']);\n \t\t$lang_zone['replyicon'] = str_replace(\"{language_pic}\", $language.\"/\", $lang_zone['replyicon']);\n \t} \n \telse \n \t{\n \t\t$lang_zone['npost'] = str_replace(\"{language_pic}\", \"\", $lang_zone['npost']);\n \t\t$lang_zone['npollicon'] = str_replace(\"{language_pic}\", \"\", $lang_zone['npollicon']);\n \t\t$lang_zone['replyicon'] = str_replace(\"{language_pic}\", \"\", $lang_zone['replyicon']);\n \t}\n \t\n\t\t$template_html_content = $template;\n } else {\n $template_content = readfromfile($file);\n } \n $template_filename = $file;\n\teval(load_hook('int_template_newtemplate'));\n if ($cache == 0){\n\t $wrtingcaches = nsubst($lang_zone, $nest);\n\t writetofile($template_name_php, $wrtingcaches);\n }\n \n return $template_name_php;\n}", "title": "" }, { "docid": "cad80851eb8b6be77b8a3a929a427491", "score": "0.4865052", "text": "protected function replaceMarker(array $marker, $template) {\n\t\treturn strtr($template, $marker);\n\t}", "title": "" }, { "docid": "1d26444c93b342d21200405246947e2e", "score": "0.48345613", "text": "public function install(): void\n {\n foreach ($this->replacements_english as $key => $value) {\n foreach (rex_clang::getAllIds() as $clang_id) {\n $lang_replacement = rex_config::get('d2u_news', 'lang_replacement_'. $clang_id, '');\n\n // Load values for input\n if ('chinese' === $lang_replacement && isset($this->replacements_chinese) && isset($this->replacements_chinese[$key])) {\n $value = $this->replacements_chinese[$key];\n } elseif ('czech' === $lang_replacement && isset($this->replacements_czech) && isset($this->replacements_czech[$key])) {\n $value = $this->replacements_czech[$key];\n } elseif ('dutch' === $lang_replacement && isset($this->replacements_dutch) && isset($this->replacements_dutch[$key])) {\n $value = $this->replacements_dutch[$key];\n } elseif ('french' === $lang_replacement && isset($this->replacements_french) && isset($this->replacements_french[$key])) {\n $value = $this->replacements_french[$key];\n } elseif ('german' === $lang_replacement && isset($this->replacements_german) && isset($this->replacements_german[$key])) {\n $value = $this->replacements_german[$key];\n } elseif ('italian' === $lang_replacement && isset($this->replacements_italian) && isset($this->replacements_italian[$key])) {\n $value = $this->replacements_italian[$key];\n } elseif ('polish' === $lang_replacement && isset($this->replacements_polish) && isset($this->replacements_polish[$key])) {\n $value = $this->replacements_polish[$key];\n } elseif ('portuguese' === $lang_replacement && isset($this->replacements_portuguese) && isset($this->replacements_portuguese[$key])) {\n $value = $this->replacements_portuguese[$key];\n } elseif ('russian' === $lang_replacement && isset($this->replacements_russian) && isset($this->replacements_russian[$key])) {\n $value = $this->replacements_russian[$key];\n } elseif ('spanish' === $lang_replacement && isset($this->replacements_spanish) && isset($this->replacements_spanish[$key])) {\n $value = $this->replacements_spanish[$key];\n } else {\n $value = $this->replacements_english[$key];\n }\n\n $overwrite = 'true' === rex_config::get('d2u_news', 'lang_wildcard_overwrite', false) ? true : false;\n parent::saveValue($key, $value, $clang_id, $overwrite);\n }\n }\n }", "title": "" }, { "docid": "694331c798946a24d99bd1a77539103d", "score": "0.48247454", "text": "private function processHtml()\n\t{\n\t\tif ($this->debug)\n\t\t{\n\t\t\t$unknown_search = array();\n\t\t\treset($this->replacements);\n\t\t\tforeach($this->replacements as $search => $replace)\n\t\t\t{\n\t\t\t\tif (!in_array('{'.$search.'}', $this->flags)) {\n\t\t\t\t\t$unknown_search[] = '{'.$search.'} ';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (count($unknown_search)) {\n\t\t\t\t$this->showDebug('$replacements keys wich doesn\\'t match any $tmpl_html flag', $unknown_search, 'implode');\n\t\t\t}\n\t\t}\n\n\t if (!count($this->flags )) {\n\t\t\treturn $this->tmpl_html; # Static template!\n\t\t}\n\n\t\t$flags_replaced \t\t= array();\n\t\t$flags_delimiter_errors = '';\n\n\t\t// $flags replacements\n\t\t$output = $this->tmpl_html;\n\t\tfor ($i=0; $i<count($this->flags); $i++)\n\t\t{\n\t\t\t$flag \t\t\t= $this->flags[$i];\n\t\t\t$flag_delimiter = \"<!-- $flag -->\";\n\t\t\t$search \t\t= preg_replace('~(\\{|\\})~', '', $flag);\n\n\t\t\t// Prepare current replacement\n\t\t\t$current_replacement = array();\n\t\t\tif (array_key_exists($search, $this->replacements))\n\t\t\t{\n\t\t\t\tif (is_scalar($this->replacements[$search]))\n\t\t\t\t{\n\t\t\t\t\tif ($this->replacements[$search] != '') {\n\t\t\t\t\t\t$current_replacement[] = $this->replacements[$search]; # Simple replacement\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\tfor ($j=0; $j<count($this->replacements[$search]); $j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($this->replacements[$search][$j] != '') {\n\t\t\t\t\t\t\t$current_replacement[] = $this->replacements[$search][$j]; # Multi replacement\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\tif (count($current_replacement)) {\n\t\t\t\t$flags_replaced[] = $flag;\n\t\t\t}\n\n\t\t\t$output_array = explode($flag_delimiter, $output);\n\t\t\tif (count($output_array) == 3)\n\t\t\t{\n\t\t\t\t// Remove from the output the $flag_delimiter itself\n\t\t\t\t$top \t\t= trim($output_array[0]);\n\t\t\t\t$middle \t= '';\n\t\t\t\t$bottom \t= trim($output_array[2]);\n\n\t\t\t\tif (count($current_replacement))\n\t\t\t\t{\n\t\t\t\t\t$middle_pattern = trim($output_array[1]);\n\n\t\t\t\t\tfor ($j=0; $j<count($current_replacement); $j++)\n\t\t\t\t\t{\n\t\t\t\t\t\t$middle .= str_replace($flag, $current_replacement[$j], $middle_pattern);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$output = $top.$middle.$bottom;\n\t\t\t}\n\t\t\telseif (count($output_array) == 1)\n\t\t\t{\n\t\t\t\t$middle = '';\n\t\t\t\tfor ($j=0; $j<count($current_replacement); $j++)\n\t\t\t\t{\n\t\t\t\t\t$middle .= $current_replacement[$j];\n\t\t\t\t}\n\t\t\t\t$output = str_replace($flag, $middle, $output);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t/**\n\t\t\t\t * Known limitation:\n\t\t\t\t * The html template can contain multiples occurences of any flag: <h2>{flag}</h2><h3>{flag}</h3>\n\t\t\t\t * But the flag delimiter can appear only once: <!-- {flag} --><p>{flag}</p><!-- {flag} -->\n\t\t\t\t */\n\t\t\t\t$flags_delimiter_errors .= \"&lt;!-- $flag --&gt; \";\n\t\t\t}\n\t\t}\n\n\t\t// $multi_flags_blocks process\n\t\treset($this->multi_flags_blocks);\n\t\tforeach($this->multi_flags_blocks as $multi_flag_delimiter => $flags)\n\t\t{\n\t\t\tif (strstr($multi_flag_delimiter, '[OR]')) \t\t# 'OR' condition\n\t\t\t{\n\t\t\t\t$empty = true;\n\t\t\t\t$i = 0;\n\t\t\t\twhile (($empty) && ($i<count($flags))) {\n\t\t\t\t\tin_array($flags[$i++], $flags_replaced) ? $empty = false : '';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse \t\t\t\t\t\t\t\t\t\t\t# 'AND' condition\n\t\t\t{\n\t\t\t\t$empty = false;\n\t\t\t\t$i = 0;\n\t\t\t\twhile ((!$empty) && ($i<count($flags))) {\n\t\t\t\t\t!in_array($flags[$i++], $flags_replaced) ? $empty = true : '';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($empty)\n\t\t\t{\n\t\t\t\t$output_array = explode($multi_flag_delimiter, $output);\n\t\t\t\tif (count($output_array) == 3) {\n\t\t\t\t\t$output = trim($output_array[0]).trim($output_array[2]);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$output = str_replace($multi_flag_delimiter, '', $output); # Simply remove from the output the $multi_flag_delimiter itself\n\t\t\t}\n\t\t}\n\n\t\tif ($this->debug)\n\t\t{\n\t\t\t// flags errors\n\t\t\tif ($flags_delimiter_errors) {\n\t\t\t\ttrigger_error($this->trig_err(\"Invalid number of \\$flags_delimiter:<br /><b>$flags_delimiter_errors</b>\"), E_USER_NOTICE);\n\t\t\t}\n\n\t\t\t// $output\n\t\t\t$this->showDebug('$output', $output, 'pre');\n\t\t\techo \"<hr />\\n\"; # Last debug output !\n\t\t}\n\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "60f6d7d286dfdccd0b7eafd2e43f22ef", "score": "0.4822601", "text": "function substituteMarkerArray($content, $markContentArray, $wrap='', $uppercase=0, $deleteUnused=0) {\r\n\t\tif (is_array($markContentArray)) {\r\n\t\t\t$wrapArr = t3lib_div::trimExplode('|', $wrap);\r\n\t\t\tforeach ($markContentArray as $marker => $markContent) {\r\n\t\t\t\tif ($uppercase) {\r\n\t\t\t\t\t\t// use strtr instead of strtoupper to avoid locale problems with Turkish\r\n\t\t\t\t\t$marker = strtr($marker,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ');\r\n\t\t\t\t}\r\n\t\t\t\tif (count($wrapArr) > 0) {\r\n\t\t\t\t\t$marker = $wrapArr[0].$marker.$wrapArr[1];\r\n\t\t\t\t}\r\n\t\t\t\t$content = str_replace($marker, $markContent, $content);\r\n\t\t\t}\r\n\r\n\t\t\tif ($deleteUnused) {\r\n\t\t\t\tif (empty($wrap)) {\r\n\t\t\t\t\t$wrapArr = array('###', '###');\r\n\t\t\t\t}\r\n\t\t\t\t$content = preg_replace('/'.preg_quote($wrapArr[0]).'([A-Z0-9_-|]*)'.preg_quote($wrapArr[1]).'/is', '', $content);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $content;\r\n\t}", "title": "" }, { "docid": "07d371a0d835c8e95c8ecdcb491e24d1", "score": "0.48098922", "text": "function lang(){\n\t\n\t$num_args = func_num_args();\n\t$arg_list = func_get_args();\n\t\n\tif ( $num_args > 0 ) {\n\t\t\n\t\t$line = $arg_list[ 0 ];\n\t\t$id = isset( $arg_list[ 1 ] ) ? $arg_list[ 1 ] : NULL;\n\t\t$vsprintf_args = $arg_list;\n\t\t\n\t\t$CI =& get_instance();\n\t\t$line = $CI->lang->line( $line ) ? $CI->lang->line( $line ) : $line;\n\t\t\n\t\tif ( $id ){\n\t\t\t\n\t\t\t$line = '<label for=\"' . $id . '\">' . $line . \"</label>\";\n\t\t\t\n\t\t}\n\t\t\n\t\tif ( $num_args > 2 ) {\n\t\t\t\n\t\t\tunset( $vsprintf_args[ 1 ] );\n\t\t\tunset( $vsprintf_args[ 0 ] );\n\t\t\t\n\t\t\t$line = vsprintf( $line, $vsprintf_args );\n\t\t\t\n\t\t}\n\t\t\n\t\tif ( isset( $CI->mcm->filtered_system_params[ $CI->mcm->environment . '_enable_translatable_terms_source' ] ) AND $CI->mcm->filtered_system_params[ $CI->mcm->environment . '_enable_translatable_terms_source' ] ) {\n\t\t\t\n\t\t\t$line = '<span class=\"sys-translatable-term-source\">' . $arg_list[ 0 ] . '</span>' . $line;\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $line;\n\t\t\n\t}\n\t\n}", "title": "" }, { "docid": "23a04e62308ddbb7db40a4c33a5c89c3", "score": "0.4793997", "text": "function wikitextTpl_tokenize($splitParams=TRUE) {\n\t\t$n=0;\n\t\t$tpls = array();\n\t\t$this->wikitext_tpls_allParams = array();\n\t\t$this->wikitext = preg_replace_callback(\n\t\t\t'~\\{\\{([a-z][\\w\\d_\\-]+)(.+?)\\}\\}~uis', // templates wikitext\n\t\t\tfunction ($m) use (&$n,&$tpls,$splitParams) {\n\t\t\t\t$name = $m[1];\n\t\t\t\t$content = $m[2];\n\t\t\t\tif ($splitParams) {\n\t\t\t\t\t$params=array('#name'=>$name, '#idx'=>$n); // idx reduntant\n\t\t\t\t\t$np = 0;\n\t\t\t\t\t$content = str_replace(\"\\t\",' ',$content); // remove tabs \n\t\t\t\t\tforeach( explode('|',$content) as $p) {\n\t\t\t\t\t\t$p = trim($p);\n\t\t\t\t\t\tif ($p) {\n\t\t\t\t\t\t\tif (preg_match('/^([a-z][_\\w\\-\\d]+)\\s*=\\s*(.+)$/is',$p,$mm))\n\t\t\t\t\t\t\t\t$params[$mm[1]]=$mm[2];\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t$np++; //1,2,3,...\n\t\t\t\t\t\t\t\t$params[\"#$np\"]=$p; // #1, #2, ...\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} // if p\n\t\t\t\t\t} // for\n\t\t\t\t\t// aqui $wikitext_tpls_allParams = array_merge($wikitext_tpls_allParams,array_keys($params));\n\t\t\t\t\t$tpls[$n] = $params;\n\t\t\t\t} else \n\t\t\t\t\t$tpls[$n] = $content;\n\t\t\t\t$ret = \"#_tpl_#$name#$n##\";\n\t\t\t\t$n++;\n\t\t\t\treturn $ret;\n\t\t\t},\n\t\t\t$this->wikitext\n\t\t);\n\t\t$this->wikitext_tpls = $tpls;\n\t}", "title": "" }, { "docid": "bffb48c40fc8e238b131e3d2d9faa26d", "score": "0.4782209", "text": "function _transliteration_replace($ord, $unknown = '?', $langcode = NULL) {\n if (!isset($langcode)) {\n global $language;\n $langcode = $language->language;\n }\n static $map = array(), $template = array();\n\n $bank = $ord >> 8;\n\n // Check if we need to load a new bank\n if (!isset($template[$bank])) {\n $file = DATADIR . sprintf('x%02x', $bank) . '.php';\n if (file_exists($file)) {\n $template[$bank] = include ($file);\n }\n else {\n $template[$bank] = array('en' => array());\n }\n }\n\n // Check if we need to create new mappings with language specific alterations\n if (!isset($map[$bank][$langcode])) {\n if ($langcode != 'en' && isset($template[$bank][$langcode])) {\n // Merge language specific mappings with the default transliteration table\n $map[$bank][$langcode] = $template[$bank][$langcode] + $template[$bank]['en'];\n }\n else {\n $map[$bank][$langcode] = $template[$bank]['en'];\n }\n }\n\n $ord = $ord & 255;\n\n return isset($map[$bank][$langcode][$ord]) ? $map[$bank][$langcode][$ord] : $unknown;\n}", "title": "" }, { "docid": "69afcb8c7e8c14406999195c2695187a", "score": "0.47804862", "text": "public function lbl_interpreter($line)\n {\n //remove mutlie line comments.\n // $line = preg_replace( '/\\/\\*(.*?)\\*\\//is', '', $line );\n if ($this->ce_using_comments($line))\n {}\n else {\n //grabs the TEMPLATE_CONTENT_EXT.\n $split = $this->t_c_e($line);\n $template = $split[0];\n $content = $split[1];\n $ext = $split[2];\n //calls to the template manager.\n $this->template_manage( $template, $content, $ext );\n }\n }", "title": "" }, { "docid": "b3d91255e4a0a2dd9e64688b66ec8a46", "score": "0.47760218", "text": "protected function runTemplatesProcessing () {\n\t\t$newPart = '';\n\t\tfor ($i = 0, $l = count($this->tokens); $i < $l;) {\n\t\t\t$token = $this->tokens[$i];\n\t\t\tif (is_array($token)) {\n\t\t\t\t//if ($debug) var_dump($token);\n\t\t\t\t$tokenId = $token[0];\n\t\t\t\t$oldPart = $token[1];\n\t\t\t\tif ($this->foreachState !== 2) {\n\t\t\t\t\tif ($tokenId == T_ISSET || $tokenId == T_UNSET) {\n\t\t\t\t\t\t//var_dump(\"isset/unset()\");\n\t\t\t\t\t\t$subTokens = [];\n\t\t\t\t\t\t$j = $i + 2;\n\t\t\t\t\t\t$bracketLevel = 1;\n\t\t\t\t\t\twhile (TRUE) {\n\t\t\t\t\t\t\t$subToken = & $this->tokens[$j];\n\t\t\t\t\t\t\tif (is_array($subToken)) {\n\t\t\t\t\t\t\t\t$subTokenValue = $subToken[1];\n\t\t\t\t\t\t\t\tif ($subToken[0] == T_VARIABLE && $subTokenValue != '$this') {\n\t\t\t\t\t\t\t\t\t$subTokens[] = '$this->' . mb_substr($subTokenValue, 1);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$subTokens[] = $subTokenValue;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if (is_string($subToken)) {\n\t\t\t\t\t\t\t\tif ($subToken == '(') {\n\t\t\t\t\t\t\t\t\t$bracketLevel += 1;\n\t\t\t\t\t\t\t\t} else if ($subToken == ')') {\n\t\t\t\t\t\t\t\t\t$bracketLevel -= 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$subTokens[] = $subToken;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ($bracketLevel == 0) break;\n\t\t\t\t\t\t\t$j += 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$newPart = ($tokenId == T_ISSET ? 'isset(' : 'unset(') . implode('', $subTokens);\n\t\t\t\t\t\t$i = $j;\n\t\t\t\t\t} else if ($tokenId == T_OPEN_TAG_WITH_ECHO) {\n\t\t\t\t\t\t$nextToken = isset($this->tokens[$i + 1]) ? $this->tokens[$i + 1] : NULL;\n\t\t\t\t\t\t$nextTokenId = is_array($nextToken) ? $nextToken[0] : NULL;\n\t\t\t\t\t\tif ($nextTokenId == T_VARIABLE && $nextToken[1] != '$this') {\n\t\t\t\t\t\t\t$oldPart = $nextToken[1];\n\t\t\t\t\t\t\t$nextToken = isset($this->tokens[$i + 2]) ? $this->tokens[$i + 2] : NULL;\n\t\t\t\t\t\t\t$openBracketToken = is_string($nextToken) && $nextToken == '(';\n\t\t\t\t\t\t\tif ($openBracketToken) {\n\t\t\t\t\t\t\t\t// \t<?=$helper( or <%=$helper(\n\t\t\t\t\t\t\t\t$newPart = '<' . '?php echo call_user_func($this->GetHelper(\\'' . mb_substr($oldPart, 1) . '\\'), ';\n\t\t\t\t\t\t\t\t$i += 2;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// \t<?=$variable or <%=$variable\n\t\t\t\t\t\t\t\t$newPart = '<' . '?php echo call_user_func(function($__val){return $__val;},isset(' . $oldPart . ')?' . $oldPart . ':$this->' . mb_substr($oldPart, 1) . ')';\n\t\t\t\t\t\t\t\t$i += 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// \t<?= or <%=\n\t\t\t\t\t\t\t$newPart = '<' . '?php echo ';\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if ($tokenId == T_VARIABLE && $oldPart != '$this') {\n\t\t\t\t\t\t$nextToken = isset($this->tokens[$i + 1]) ? $this->tokens[$i + 1] : NULL;\n\t\t\t\t\t\t$openBracketToken = is_string($nextToken) && $nextToken == '(';\n\t\t\t\t\t\tif ($openBracketToken) {\n\t\t\t\t\t\t\t// $helper(\n\t\t\t\t\t\t\t$newPart = 'call_user_func($this->GetHelper(\\'' . mb_substr($oldPart, 1) . '\\'),';\n\t\t\t\t\t\t\t$i += 1;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// $variable\n\t\t\t\t\t\t\t$newPart = 'call_user_func(function($__val){return $__val;},isset(' . $oldPart . ')?' . $oldPart . ':$this->' . mb_substr($oldPart, 1) . ')';\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// if there is not any part of php code for possible processing,\n\t\t\t\t\t\t// just add php code part into result code string:\n\t\t\t\t\t\t$newPart = $oldPart;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$newPart = $oldPart;\n\t\t\t\t}\n\t\t\t\t//if ($debug) var_dump(\"array;$tokenId;\".$newPart);\n\t\t\t} else if (is_string($token)) {\n\t\t\t\t$newPart = $token;\n\t\t\t\t//if ($debug) var_dump(\"string;\".$newPart);\n\t\t\t}\n\t\t\t$this->monitorForeachHead($token, $i);\n\t\t\t$this->result[] = $newPart;\n\t\t\t$i += 1;\n\t\t}\n\t\t/*if ($debug) {\n\t\t\techo '<pre>';\n\t\t\tvar_dump(implode('', $this->result));\n\t\t\tdie();\n\t\t}*/\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "8a9e1b2191f5cfd87c24a5729b35eac0", "score": "0.4772517", "text": "private function getTyposByMapping()\n {\n foreach ($this->hash as $position => $character) {\n $map = $this->Mapping->getMapping($character);\n \n if (! empty($map)) {\n foreach ($map as $typo) {\n $this->Result->addItem('typosByMapping', $this->mb_substr_replace($this->domain, $typo, $position, 1) .\n '.' . $this->tld);\n }\n }\n }\n }", "title": "" }, { "docid": "94d96e4a976d65e6293616236f141c06", "score": "0.47658896", "text": "function manageLabels($content) {\r\n\t\t$lang = $this->pi_getLL(\"LABELS\");\r\n\t\t$markers = explode(\",\", $lang);\r\n\t\tforeach ($markers as $marker) {\r\n\t\t\t$markerArray[\"###LABEL_\" . $marker . \"###\"] = $this->pi_getLL(\"LABEL_\" . $marker);\r\n\t\t}\r\n\t\t$content = $this->cObj->substituteMarkerArray($content, $markerArray);\r\n\r\n\t\treturn $content;\r\n\t}", "title": "" }, { "docid": "79f214febe12dec07f856dd39e22a64e", "score": "0.47472873", "text": "private function _fetchShortCodes() {\n\t\t$find = array();\n\t\t$replace = array();\n\n\t\t$data = $this->data;\n\n\t\tif(empty($this->emailtemplate_shortcodes)){\n\t\t\t$this->emailtemplate_shortcodes = $this->model->getTemplateShortcodes(array(\n\t\t\t\t'emailtemplate_id' => $this->emailtemplate_id\n\t\t\t));\n\t\t}\n\n\t\tforeach($this->emailtemplate_shortcodes as $row) {\n\t\t\tif (!isset($data[$row['emailtemplate_shortcode_code']])) {\n\t\t\t\t$data[$row['emailtemplate_shortcode_code']] = '';\n\t\t\t}\n\t\t}\n\n\t\tforeach($data as $key => $var) {\n\t\t\tif (is_array($var)) {\n\t\t\t\tforeach($var as $key2 => $var2) {\n\t\t\t\t\tif (is_string($var2) || is_int($var2)) {\n\t\t\t\t\t\t$find[] = '{$'.$key.'.'.$key2.'}';\n\t\t\t\t\t\t$replace[] = $var2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} elseif (is_string($var) || is_int($var)) {\n\t\t\t\t$find[] = '{$'.$key.'}';\n\t\t\t\t$replace[] = $var;\n\t\t\t}\n\t\t}\n\n\t\treturn array('find' => $find, 'replace' => $replace);\n\t}", "title": "" }, { "docid": "de87d2d08f911e78c422843def747d72", "score": "0.47392192", "text": "function find_template_place($codename, $lang, $theme, $suffix, $directory, $non_custom_only = false, $fallback_other_themes = true)\n{\n global $FILE_ARRAY, $CURRENT_SHARE_USER;\n\n static $tp_cache = array();\n $sz = serialize(array($codename, $lang, $theme, $suffix, $directory, $non_custom_only));\n if (isset($tp_cache[$sz])) {\n return $tp_cache[$sz];\n }\n\n if (addon_installed('less') && $suffix == '.css') {\n $test = find_template_place($codename, $lang, $theme, '.less', $directory, $non_custom_only, false);\n if (!is_null($test)) {\n $tp_cache[$sz] = $test;\n return $test;\n }\n }\n\n $prefix_default = get_file_base() . '/themes/';\n $prefix = ($theme == 'default' || $theme == 'admin') ? $prefix_default : (get_custom_file_base() . '/themes/');\n\n if (!isset($FILE_ARRAY)) {\n if ((is_file($prefix . $theme . '/' . $directory . '_custom/' . $codename . $suffix)) && (!in_safe_mode()) && (!$non_custom_only)) {\n $place = array($theme, '/' . $directory . '_custom/', $suffix);\n } elseif (is_file($prefix . $theme . '/' . $directory . '/' . $codename . $suffix)) {\n $place = array($theme, '/' . $directory . '/', $suffix);\n } elseif (($CURRENT_SHARE_USER !== null) && ($theme !== 'default') && (is_file(get_file_base() . '/themes/' . $theme . '/' . $directory . '_custom/' . $codename . $suffix)) && (!$non_custom_only)) {\n $place = array($theme, '/' . $directory . '_custom/', $suffix);\n } elseif (($CURRENT_SHARE_USER !== null) && ($theme !== 'default') && (is_file(get_file_base() . '/themes/' . $theme . '/' . $directory . '/' . $codename . $suffix))) {\n $place = array($theme, '/' . $directory . '/', $suffix);\n } elseif (($CURRENT_SHARE_USER !== null) && (is_file(get_custom_file_base() . '/themes/default/' . $directory . '_custom/' . $codename . $suffix)) && (!$non_custom_only)) {\n $place = array('default', '/' . $directory . '_custom/', $suffix);\n } elseif (($CURRENT_SHARE_USER !== null) && (is_file(get_custom_file_base() . '/themes/default/' . $directory . '/' . $codename . $suffix))) {\n $place = array('default', '/' . $directory . '/', $suffix);\n } elseif ((is_file($prefix_default . 'default' . '/' . $directory . '_custom/' . $codename . $suffix)) && (!in_safe_mode()) && (!$non_custom_only)) {\n $place = array('default', '/' . $directory . '_custom/', $suffix);\n } elseif (is_file($prefix_default . 'default' . '/' . $directory . '/' . $codename . $suffix)) {\n $place = array('default', '/' . $directory . '/', $suffix);\n } else {\n $place = null;\n }\n\n if (($place === null) && (!$non_custom_only) && ($fallback_other_themes)) { // Get desperate, search in themes other than current and default\n $dh = opendir(get_file_base() . '/themes');\n while (($possible_theme = readdir($dh))) {\n if (($possible_theme[0] !== '.') && ($possible_theme !== 'default') && ($possible_theme !== $theme) && ($possible_theme !== 'map.ini') && ($possible_theme !== 'index.html')) {\n $full_path = get_custom_file_base() . '/themes/' . $possible_theme . '/' . $directory . '_custom/' . $codename . $suffix;\n if (is_file($full_path)) {\n $place = array($possible_theme, '/' . $directory . '_custom/', $suffix);\n break;\n }\n }\n }\n closedir($dh);\n }\n } else {\n $place = array('default', '/' . $directory . '/', $suffix);\n }\n\n $tp_cache[$sz] = $place;\n return $place;\n}", "title": "" }, { "docid": "64824012642f9460490327829f761e16", "score": "0.47314882", "text": "function location_detect_multilingual($data)\n\t {\n\t $location_data = $this->location_tag_detect($data);\n\t\t\n\t\t//check if current tag is a location tag that input by other language\n\t\tif(empty($location_data))\n\t\t{\n\t\t\t$multilingual_code = $this->get_multilingual_code();\n\t\t\tforeach($multilingual_code as $country_code)\n\t\t\t{\n\t\t\t if($country_code != $data['country_code'])\n\t\t\t {\n\t\t\t $new_tag = $this->language_translate->translate(array('text'=>$data['tag'],'orignal_type'=>$data['country_code'],'local_type'=>$country_code));\n\t\t\t\t $location_data = $this->location_tag_detect(array('tag'=>$new_tag,'country_code'=>$country_code));\n\t\t\t\t \n\t\t\t\t //location tag matched\n\t\t\t\t if(!empty($location_data))\n\t\t\t\t {\n\t\t\t\t break;\n\t\t\t\t }\n\t\t\t }\n\t\t\t}\n\t }\n\t\treturn $location_data;\n\t }", "title": "" }, { "docid": "560738e4e86db7df21842463a992fadd", "score": "0.47231677", "text": "static function markRegions()\n {\n $word = self::$buffer;\n $vowel = static::$vowel;\n preg_match(\"/[$vowel][^$vowel]/u\", $word, $matches,\n PREG_OFFSET_CAPTURE);\n self::$r1 = \"\";\n $len = mb_strlen($word);\n self::$r1_index = isset($matches[0][1]) ? $matches[0][1] + 2 : $len;\n if(self::$r1_index != $len) {\n self::$r1 = mb_substr($word, self::$r1_index);\n }\n if(self::$r1_index != $len) {\n preg_match(\"/[$vowel][^$vowel]/u\", self::$r1, $matches,\n PREG_OFFSET_CAPTURE);\n self::$r2_index = isset($matches[0][1]) ? $matches[0][1] + 2 : $len;\n if(self::$r2_index != $len) {\n self::$r2 = mb_substr(self::$r1, self::$r2_index);\n self::$r2_index += self::$r1_index;\n }\n }\n if(self::$r1_index != $len && self::$r1_index < 3) {\n $tmp = mb_substr($word, 0, 2, \"UTF-8\");\n self::$r1_index = 3;\n if(strlen($tmp) == 3) {\n self::$r1_index = 4;\n }\n }\n }", "title": "" }, { "docid": "3a31ffb05a3230783d11df9673c6453e", "score": "0.47173566", "text": "static public function CaRepCode($d,$v,$in){return str_replace('{{'.$d.'}}', $v,$in);}", "title": "" }, { "docid": "7f3b579829f303738a241ff8d63a32c6", "score": "0.47158214", "text": "private function analyseTmplHtml()\n\t{\n\t\t$flag_pattern = '~\\{[\\.a-zA-Z_0-9\\-]+\\}~';\n\n\t\t// Get $flags property\n\t\t$flags = array();\n\t\tpreg_match_all($flag_pattern, $this->tmpl_html, $flags);\n\t\t$flags = $flags[0];\n\t\t$flags = array_unique($flags);\n\t\tsort($flags); # sort() is used only to assigns new ordered keys (0,1,2, ...) ; and it's also possible to use array_values() instead\n\t\t$this->flags = $flags; # That's it!\n\n\t\t// Find multi-flags delimiter\n\t\t$multi_flags_delimiter = array();\n\t\tpreg_match_all('~(!--)(\\s)+([\\.a-zA-Z_0-9\\-]+)(\\[)(OR|AND)(\\])(\\s)+(--)~', $this->tmpl_html, $multi_flags_delimiter);\n\t\t$multi_flags_delimiter = $multi_flags_delimiter[0];\n\t\t$multi_flags_delimiter = array_unique($multi_flags_delimiter);\n\t\tsort($multi_flags_delimiter); # That's it!\n\n\t\t// Get $multi_flags_blocks property\n\t\t$multi_flags_delimiter_errors = '';\n\t\tfor ($i=0; $i<count($multi_flags_delimiter); $i++)\n\t\t{\n\t\t\t$inside_flags_html = explode('<'.$multi_flags_delimiter[$i].'>', $this->tmpl_html);\n\t\t\tif (count($inside_flags_html) == 3)\n\t\t\t{\n\t\t\t\t$flags = array();\n\t\t\t\tpreg_match_all($flag_pattern, $inside_flags_html[1], $flags);\n\t\t\t\t$flags = $flags[0];\n\t\t\t\t$flags = array_unique($flags);\n\t\t\t\tsort($flags);\n\t\t\t \t$this->multi_flags_blocks['<'.$multi_flags_delimiter[$i].'>'] = $flags; # That's it!\n\t\t\t}\n\t\t\telseif ($this->debug) {\n\t\t\t\t$multi_flags_delimiter_errors .= \"&lt;{$multi_flags_delimiter[$i]}&gt;<br />\";\n\t\t\t}\n\t\t}\n\n\t\tif ($this->debug)\n\t\t{\n\t\t\t// $flags\n\t\t\tif (count($this->flags))\n\t\t\t{\n\t\t\t\t$this->showDebug('$flags', $this->flags, 'implode');\n\t\t\t} else {\n\t\t\t\ttrigger_error($this->trig_err(\"The \\$html_tmpl doesn't contain any flag replacement!\"), E_USER_NOTICE);\n\t\t\t}\n\n\t\t\t// $multi_flags_delimiter_errors\n\t\t\tif ($multi_flags_delimiter_errors)\n\t\t\t{\n\t\t\t\ttrigger_error($this->trig_err(\"Invalid number of \\$multi_flags_delimiter:<br /><b>$multi_flags_delimiter_errors</b>\"), E_USER_NOTICE);\n\t\t\t}\n\n\t\t\t// $multi_flags_blocks\n\t\t\tif (count($this->multi_flags_blocks))\n\t\t\t{\n\t\t\t\t$temp = array();\n\t\t\t\treset($this->multi_flags_blocks);\n\t\t\t\tforeach($this->multi_flags_blocks as $multi_flag_delimiter => $flags)\n\t\t\t\t{\n\t\t\t\t\t$temp[htmlentities($multi_flag_delimiter, ENT_COMPAT, 'UTF-8')] = implode('<br />', $flags);\n\t\t\t\t}\n\t\t\t\t$this->showDebug('$multi_flags_blocks', $temp);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "474e8d4da491eafa14514ddaa3e40ea2", "score": "0.4692246", "text": "function changeCodeSyntaxHighlighterTag(&$codes = array())\n{\n global $modSettings, $txt;\n\n foreach ($codes as $codeId => $code) {\n if ($code['tag'] == 'code' && $code['type'] == 'unparsed_equals_content') {\n $codes[$codeId] = array(\n 'tag' => 'code',\n 'type' => 'unparsed_equals_content',\n 'content' => '<div class=\"codeheader\">' . $txt['code'] . ': ($2) </div><div style=\"font-size: ' . $modSettings['code_syntax_highlighter_font_size'] . '\">' .\n ($modSettings['code_syntax_highlighter_engine'] == 'hljs' ? '<pre name=\"code\"><code class=\"$2\">$1</code></pre>' :\n ($modSettings['code_syntax_highlighter_engine'] == 'sh' ? '<pre name=\"code\" class=\"brush: $2\">$1</pre>' : '<pre>$1</pre>')) . '</div>',\n 'validate' => create_function('&$tag, &$data, $disabled', '\n if (!isset($disabled[\\'code\\']))\n\t\t\t\t\t $data[0] = rtrim($data[0], \"\\n\\r\");\n \t'),\n 'block_level' => true,\n 'disabled_content' => '<pre>$1</pre>',\n );\n } elseif ($code['tag'] == 'code' && $code['type'] == 'unparsed_content') {\n $codes[$codeId] = array(\n 'tag' => 'code',\n 'type' => 'unparsed_content',\n 'content' => '<div class=\"codeheader\">' . $txt['code'] . '</div><div style=\"font-size: ' . $modSettings['code_syntax_highlighter_font_size'] . '\">' .\n ($modSettings['code_syntax_highlighter_engine'] == 'hljs' ? '<pre name=\"code\"><code>$1</code></pre>' :\n ($modSettings['code_syntax_highlighter_engine'] == 'sh' ? '<pre name=\"code\" class=\"brush: text\">$1</pre>' : '<pre>$1</pre>')) . '</div>',\n 'validate' => create_function('&$tag, &$data, $disabled', '\n if (!isset($disabled[\\'code\\']))\n\t\t\t\t\t $data = rtrim($data, \"\\n\\r\");\n \t'),\n 'block_level' => true,\n 'disabled_content' => '<pre>$1</pre>',\n );\n } elseif ($code['tag'] == 'php' && $code['type'] == 'unparsed_content') {\n $codes[$codeId] = array(\n 'tag' => 'php',\n 'type' => 'unparsed_content',\n 'content' => '<div class=\"codeheader\">' . $txt['code'] . ': (php) </div><div style=\"font-size: ' . $modSettings['code_syntax_highlighter_font_size'] . '\">' .\n ($modSettings['code_syntax_highlighter_engine'] == 'hljs' ? '<pre name=\"code\"><code class=\"php\">$1</code></pre>' :\n ($modSettings['code_syntax_highlighter_engine'] == 'sh' ? '<pre name=\"code\" class=\"brush: php\">$1</pre>' : '<pre>$1</pre>')) . '</div>',\n\n 'validate' => create_function('&$tag, &$data, $disabled', '\n if (!isset($disabled[\\'php\\']))\n\t\t\t\t\t $data = rtrim($data, \"\\n\\r\");\n \t'),\n 'block_level' => true,\n 'disabled_content' => '<pre>$1</pre>',\n );\n }\n }\n}", "title": "" }, { "docid": "40111ff7dc843706cf9cbded489dcdda", "score": "0.46839926", "text": "function make_template(){\n if (!@fopen($this->deslash($this->path.\"/\".$this->template_dir.\"/\".$this->template_file),\"r\")){\n echo \"<b>Error</b>: The template \".$this->deslash($this->path.\"/\".$this->template_dir.\"/\".$this->template_file).\" could not be found.\";\n }else{\n \t\n \t//echo \"this is else\";\n \t\n $fp = @fopen($this->deslash($this->path.\"/\".$this->template_dir.\"/\".$this->template_file),\"r\");\n $regioncount=count($this->template_regions);\n for ($i=0; $i<$regioncount; $i++){\n if ($this->template_regions[$i]==\"headers\"){\n $page=$this->template_regionvalues[$i];\n }\n }\n $this->webpath=$this->deslash($this->webpath);\n if (substr($this->webpath,strlen($this->webpath)-1,1)<>\"/\"){$this->webpath.=\"/\";}\n while (!feof($fp)) {\n $line = fgets($fp,4096);\n $line = stripslashes($line);\n $line = preg_replace(\"/href=\\\"..\\//\",\"href=\\\"\".$this->webpath,$line);\n $line = preg_replace(\"/src=\\\"..\\//\",\"src=\\\"\".$this->webpath,$line);\n $line = preg_replace(\"/action=\\\"..\\//\",\"action=\\\"\".$this->webpath,$line);\n for ($i=0; $i<$regioncount; $i++){\n $line = preg_replace(\"/{\".$this->template_regions[$i].\"}/\",$this->template_regionvalues[$i],$line);\n }\n $page.=$line;\n //echo $page;\n }\n if ($this->template_debug==TRUE){\n $page.=\"<p><h3>Source:</h3><hr>\".highlight_string($page,TRUE);\n //echo $page;\n }\n \n //echo \"before reset\";\n \n reset ($GLOBALS);\n \n //echo \"after reset\";\n \n while (list ($key, $val) = each ($GLOBALS)){\n \t\n\n \t \n\n eval(\"$\".$key.\" = \\\"\".$val.\"\\\";\");\n //eval(\"\\$\" . \"\\$key = \\\"$val\\\";\");\n \n //print\"$\".$key.\" = \\\"\".$val.\"\\\";\\n\";\n //print\"$$key = $val\";\n //print\"<BR>\\n\";\n }\n \n //echo \"after while\";\n \n $questMark = \"?\";\n $phpOpenTag = \"<${questMark}php\";\n \n //echo \"phpOpenTag\".$phpOpenTag;\n \n $phpCloseTag = \"${questMark}>\";\n \n //echo \"ready to return\";\n \n return eval(\"$phpCloseTag\" . stripslashes($page) . \"$phpOpenTag \");\n }\n}", "title": "" }, { "docid": "1d1409c4d2f3c44ea9410268f5a5347a", "score": "0.46829066", "text": "function processLanguageFiles() \n\t{\n\t\tJRequest::checkToken( 'request' ) or jexit( 'Invalid Token' );\n\t\t\n\t\t$code \t= JRequest::getVar('code', 'en-GB');\n\t\t$method = JRequest::getVar('method', '');\n\t\t$name = JRequest::getVar('name', '');\n\t\t$email = JRequest::getVar('email', '');\n\t\t$web = JRequest::getVar('web', '');\n\t\t$message = JRequest::getVar('message', '');\n\t\t\n\t\t$formparams = array();\n\t\t$formparams['name'] \t= $name;\n\t\t$formparams['email'] \t= $email;\n\t\t$formparams['web'] \t\t= $web;\n\t\t$formparams['message'] \t= $message;\n\t\t\n\t\t$model \t= $this->getModel('flexicontent');\t\t\n\n\t\t$missing = $model->processLanguageFiles($code, $method, $formparams);\n\t\t\n\t\tif (is_array($missing) && $method != 'zip') {\n\t\t\tif (@$missing['admin']) {\n\t\t\t\techo '<h3>'.JText::_('Folder: administrator/languages/').$code.'/</h3>';\n\t\t\t\tforeach ($missing['admin'] as $a) {\n\t\t\t\t\techo '<p>'.$code.'.'.$a.'.ini'.(($method == 'create') ? ' <span class=\"lang-success\">created</span>' : ' <span class=\"lang-fail\">is missing</span>').'</p>';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (@$missing['site']) {\n\t\t\t\techo '<h3>'.JText::_('Folder: languages/').$code.'/</h3>';\n\t\t\t\tforeach ($missing['site'] as $s) {\n\t\t\t\t\techo '<p>'.$code.'.'.$s.'.ini'.(($method == 'create') ? ' <span class=\"lang-success\">created</span>' : ' <span class=\"lang-fail\">is missing</span>').'</p>';\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($method != 'create') {\n\t\t\t\techo '<style>#missing {display:block;}</style>';\n\t\t\t}\n\t\t} else {\n\t\t\techo $missing;\n\t\t\techo '<style>#missing {display:none;}</style>';\n\t\t}\n\t}", "title": "" }, { "docid": "65ab40dbf69180745230a0f36408f031", "score": "0.46662554", "text": "protected function _parseTemplate( $template, $assigned=array() )\n\t{\n\t\tforeach( $assigned as $word => $replace)\n\t\t{\n\t\t\t$template = preg_replace( \"/\\{$word\\}/i\", \"$replace\", $template );\n\t\t}\n\t\t\n\t\t$template = str_replace( '/ssi.php', '/index.php', $template );\n\t\t\n\t\treturn $this->registry->output->replaceMacros( $template );\n\t}", "title": "" }, { "docid": "342129977d2e6e11fe4ab3aa081c653e", "score": "0.46589175", "text": "function scan_twig($pathname, $line, $text) {\n global $trigger;\n global $str_reg;\n\n if (\n preg_match_all(\n \"/\\{\\{\\s*trigger\\.call\\($str_reg(,\\s*(.+))?\\)\\s*\\}\\}/\",\n $text,\n $matches,\n PREG_SET_ORDER\n )\n ) {\n foreach ($matches as $match) {\n $call = trim($match[1], \"'\\\"\");\n\n if (isset($trigger[\"call\"][$call]))\n $trigger[\"call\"][$call][\"places\"][] = make_place(\n $pathname,\n $line\n );\n else\n $trigger[\"call\"][$call] = array(\n \"places\" => array(make_place($pathname, $line)),\n \"arguments\" => trim(fallback($match[3], \"\"), \", \")\n );\n }\n }\n }", "title": "" }, { "docid": "b2ef85a865579363e14864e8cf55b34e", "score": "0.46588802", "text": "function llorix_one_companion_team_register_strings() {\n\tif ( ! defined( 'POLYLANG_VERSION' ) || ! function_exists( 'llorix_one_lite_pll_string_register_helper' ) ) {\n\t\treturn;\n\t}\n\n\t$default = llorix_one_companion_team_get_default_content();\n\tllorix_one_lite_pll_string_register_helper( 'llorix_one_lite_team_content', $default, 'Team section' );\n}", "title": "" }, { "docid": "6b300c590bd4352b6d5bc3e2b9b8d536", "score": "0.46582055", "text": "function getCountryMarker(& $template, & $sims, & $rems){\n\t\t$sims['###COUNTRY###'] = '';\n\t\t$sims['###COUNTRY_VALUE###'] = '';\n\t\tif($this->isAllowed('country')){\n\t\t\tif(t3lib_extMgm::isLoaded('static_info_tables')) {\n\t\t\t\trequire_once(t3lib_extMgm::extPath('static_info_tables').'pi1/class.tx_staticinfotables_pi1.php');\n\t\t\t\t$this->staticInfo = t3lib_div::makeInstance('tx_staticinfotables_pi1');\n\t\t\t\t$this->staticInfo->init();\t\t\t\n\t\t\t\t$sims['###COUNTRY###'] = $this->applyStdWrap($this->staticInfo->getStaticInfoName('COUNTRIES', $this->object->getCountry()), 'country_static_info_stdWrap');\n\t\t\t\t$sims['###COUNTRY_VALUE###'] = strip_tags($this->object->getCountry());\n\t\t\t} else {\n\t\t\t\t$sims['###COUNTRY###'] = $this->applyStdWrap($this->object->getCountry(), 'country_stdWrap');\n\t\t\t\t$sims['###COUNTRY_VALUE###'] = $this->object->getCountry();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "1e272de961c3b50e6a59634cc00c8e3f", "score": "0.46551365", "text": "function code_block_injection($content) {\n \t$pattern = '\\[(\\[?)(sw_embed_jscss)(?![\\w-])([^\\]\\/]*(?:\\/(?!\\])[^\\]\\/]*)*?)(?:(\\/)\\]|\\](?:([^\\[]*+(?:\\[(?!\\/\\2\\])[^\\[]*+)*+)\\[\\/\\2\\])?)(\\]?)';\n \tpreg_match_all('/'.$pattern.'/s', $content, $matches);\n \n \tif(!empty($matches) && is_array($matches)) {\n \t\tforeach($matches[0] as $key => $placeholder) {\n \t\t\tif(!empty($matches[3][$key])) $atts = shortcode_parse_atts($matches[3][$key]);\n \t\t\t$id = !empty($atts['uid']) ? $atts['uid'] : 0;\n \n \t\t\t$codeblock = !empty($codeblocks[$id]) ? $codeblocks[$id] : '';\n \t\t\t$content = str_replace($placeholder, $codeblock, $content);\n \t\t}\n \t}\n \n \treturn $content;\n }", "title": "" }, { "docid": "e3cbb554837658318a00239ed5d95f7d", "score": "0.46478483", "text": "function smarty_block_test2($params,$content){\n if ($params[\"replace\"] == \"true\"){\n $content = str_replace('a','b',$content);\n $content = str_replace('c','d',$content);\n }\n $content = substr($content,0,$params[\"maxnum\"]);\n return $content;\n}", "title": "" }, { "docid": "7031fb5dd73f155924e76da5f0e7063f", "score": "0.46430787", "text": "function main($content, $conf) {\n\t\t$this->conf = $GLOBALS['TSFE']->tmpl->setup['plugin.'][$this->prefixId . '.'];\n\t\t$this->parser = GeneralUtility::makeInstance('tx_contagged');\n\t\t$this->local_cObj = GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer');\n\t\t$this->local_cObj->setCurrentVal($GLOBALS['TSFE']->id);\n\t\tif (is_array($GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_contagged.'])) {\n\t\t\t$this->conf = $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_contagged.'];\n\t\t\t\\TYPO3\\CMS\\Core\\Utility\\ArrayUtility::mergeRecursiveWithOverrule($this->conf, $conf);\n\t\t}\n\t\t$this->pi_loadLL();\n\t\t$this->templateCode = $this->cObj->fileResource($this->conf['templateFile'] ? $this->conf['templateFile'] : $this->templateFile);\n\t\t$this->typolinkConf = is_array($this->conf['typolink.']) ? $this->conf['typolink.'] : array();\n\t\t$this->typolinkConf['parameter.']['current'] = 1;\n\t\tif (!empty($this->typolinkConf['additionalParams'])) {\n\t\t\t$this->typolinkConf['additionalParams'] = $this->cObj->stdWrap($typolinkConf['additionalParams'], $typolinkConf['additionalParams.']);\n\t\t\tunset($this->typolinkConf['additionalParams.']);\n\t\t}\n\t\t$this->typolinkConf['useCacheHash'] = 1;\n\t\t$this->backPid = $this->piVars['backPid'] ? intval($this->piVars['backPid']) : NULL;\n\t\t$this->pointer = $this->piVars['pointer'] ? intval($this->piVars['pointer']) : NULL;\n\t\t$this->indexChar = $this->piVars['index'] ? urldecode($this->piVars['index']) : NULL; // TODO The length should be configurable\n\t\tif (!is_null($this->piVars['source']) && !is_null($this->piVars['uid'])) {\n\t\t\t$dataSource = stripslashes($this->piVars['source']);\n\t\t\t$uid = intval($this->piVars['uid']);\n\t\t\t$termKey = stripslashes($this->piVars['source']) . '_' . intval($this->piVars['uid']);\n\t\t}\n\t\t$sword = $this->piVars['sword'] ? htmlspecialchars(urldecode($this->piVars['sword'])) : NULL;\n\n\t\t// get an array of all type configurations\n\t\t$this->typesArray = $this->conf['types.'];\n\n\t\t// get the model (an associated array of terms)\n\t\t$this->mapper = GeneralUtility::makeInstance('tx_contagged_model_mapper', $this);\n\t\t$this->model = GeneralUtility::makeInstance('tx_contagged_model_terms', $this);\n\n\t\tif (!is_null($termKey)) {\n\t\t\t$content .= $this->renderSingleItemByKey($dataSource, $uid);\n\t\t} elseif ((strtolower($this->conf['layout']) == 'minilist') || (strtolower($this->cObj->data['select_key']) == 'minilist')) {\n\t\t\t$content .= $this->renderMiniList();\n\t\t} elseif (is_null($termKey) && is_null($sword)) {\n\t\t\t$content .= $this->renderList();\n\t\t} elseif (is_null($termKey) && !is_null($sword)) {\n\t\t\t$content .= $this->renderListBySword($sword);\n\t\t}\n\n\t\t// TODO hook \"newRenderFunctionName\"\n\n\t\t$content = $this->removeUnfilledMarker($content);\n\n\t\treturn $this->pi_wrapInBaseClass($content);\n\t}", "title": "" }, { "docid": "f2dd228c6ba06e66b6e5d4d6fb26dff4", "score": "0.4638309", "text": "public function generateLanguageFiles(): void;", "title": "" }, { "docid": "868c909ae915eecd229ef82ba68ec176", "score": "0.4618417", "text": "function talkwikitomeTranslate($content) {\n global $wpdb, $post;\n $existing_tags = get_post_meta($post->ID, 'talkwikitome_tags', true);\n if (!$existing_tags) $existing_tags = array();\n $summaries = get_post_meta($post->ID, 'talkwikitome_wiki_summaries', true);\n\n // TODO: This should simply be a global variable.\n $db_linktable = $wpdb->prefix . \"talkwikitome_links\";\n\n // Load the style of bracketing from the database\n $talkwikitome_brackets = get_option(\"talkwikitome_brackets\");\n\n switch ($talkwikitome_brackets) {\n case \"1\":\n $pattern = \"!\\[\\[([^\\|]+)\\|([^\\|]+)\\|([^\\]]+)\\]\\]!isU\";\n break;\n case \"2\":\n $pattern = \"!\\(\\(([^\\)]*)\\|(.*)\\|(.*)\\)\\)!isU\";\n break;\n case \"3\":\n $pattern = \"!\\{\\{([^\\}]*)\\|(.*)\\|(.*)\\}\\}!isU\";\n break;\n default:\n $pattern = \"!\\[\\[([^\\]]*)\\|(.*)\\|(.*)\\]\\]!isU\";\n break;\n }\n\n // Look to see if the pattern is a match: (url)|(term)|(text)\n\n $match = array();\n\t$refBullets = array();\n\t$tags = array();\n $position = 0;\n\n // Continue to look through the content for all the matchnes, moving forward\n // and keeping track of the position...\n while (($position = preg_match($pattern, $content, $match, 0, $position))) {\n $tag = $wpdb->escape( $match[1] );\n $term = urlencode(str_replace(' ', '_', $match[2]));\n $text = $match[3];\n\n if (!strlen($text)) $text = $term;\n\n $link = $wpdb->get_row ( \"SELECT * FROM $db_linktable WHERE tag='$tag' \" );\n $url = $link->url . str_replace(' ', '_', $match[2]);\n $anchor = \"<a href=\\\"$url\\\" \";\n \n if ( $link->follow == 1 ) {\n $anchor .= \" nofollow \";\n }\n\n if ( $link->window == 0 ) {\n $anchor .= \"target=\\\"_blank\\\" \";\n } else {\n $anchor .= \"target=\\\"_top\\\" \";\n }\n\n if ( $link->alt_attribute == 0 ) {\n $anchor .= \"alt=\\\"$text\\\" \";\n }\n\n if ( $link->title_attribute == 0 ) {\n $anchor .= \"title=\\\"$text\\\" \";\n }\n\n if ( $link->style_override != null ) {\n $anchor .= \"style=\\\"\" . $link->style_override . \"\\\" \";\n }\n\n $ref = array(\n 'link' => $anchor,\n 'text' => $text\n );\n array_push($refBullets, $ref);\n array_push($tags, array(\n 'position' => $position,\n 'tag' => $term\n ));\n\n $content = str_replace($match[0],$anchor . \">$text</a>\",$content);\n }\n\n $check_new_data = false;\n if (count($tags) > 0) {\n if (count($summaries) == 0) {\n error_log('No summaries, should fetch...');\n $check_new_data = true;\n }\n $diff = array_diff_assoc($existing_tags, $tags);\n if (count($diff)) {\n update_post_meta($post->ID, 'talkwikitome_tags', $tags);\n $check_new_data = true;\n error_log('There looks to be new tags.');\n error_log('Old num: '.count($existing_tags).', new num: '.count($tags));\n }\n }\n \n // For debug\n //$check_new_data = true;\n if ($check_new_data) {\n /*\n * Should add some kind of check to make sure the wiki summaries are available on the server.\n * Should also make this server driven by the link table.\n */\n \t$feedURL = 'http://'.$_SERVER['SERVER_NAME'].'/wiki/api.php?action=summaries&format=json&pages=';\n \t\n \tfor ($i = 0; $i < count($tags); $i++) {\n \t\tif ($i == 0) {\n \t\t\t$feedURL .= $tags[$i]['tag'];\n \t\t} else {\n \t\t\t$feedURL .= '|'.$tags[$i]['tag'];\n \t\t} \n \t}\n \terror_log(\"wiki feed URL: \".$feedURL);\n \t\n \t$urlHandle = fopen($feedURL, \"r\");\n \tif ($urlHandle) {\n \t\t$jsonData = stream_get_contents($urlHandle);\n fclose($urlHandle);\n $data = json_decode($jsonData, true);\n $summaries = $data['summaries'];\n update_post_meta($post->ID, 'talkwikitome_wiki_summaries', $summaries);\n }\n }\n\n $leftRight = \"float: left;\";\n for ($i = 0; $i < count($summaries); $i++) {\n $summary = $summaries[$i];\n if (is_array($summary) && strlen($summary['summary'])) {\n $replacement = '<div class=\"wiki-info-sidebar\">\n <div class=\"wiki-info-sidebar-header\">\n <h3><a href=\"'.$summary['link'].'\">'.$summary['title'].'</a></h3>\n </div>\n <div class=\"wiki-info-sidebar-body\">\n '.trim($summary['summary']).'<a href=\"'.$summary['link'].'\" class=\"wiki-info-sidebar-and\">...</a>\n </div>\n </div>';\n\t\t\t\t\t\t\t\t\t\t\n $pos = strpos($content, '/wiki/index.php/'.$tags[$i]['tag']);\n $nextPos = strpos($content, \"</p>\", $pos);\n if ($nextPos > $pos) {\n $lastPos = strpos($content, \"</p>\", $nextPos+1);\n if ($lastPos > $nextPos) {\n $pos = $lastPos;\n } else {\n $pos = $nextPos;\n } \n }\n $content = substr_replace($content, '</p>'.$replacement, $pos, 4);\n }\n }\n\n return $content;\n }", "title": "" }, { "docid": "b94e7e6835f7ddc5bdbad761bee78f37", "score": "0.4614577", "text": "public function preRender( $template_buffer, $template_name, &$data ) {\n \n if ($template_name != 'design/layout_form.tpl') {\n return parent::preRender( $template_buffer, $template_name, $data );\n }\n $this->load->language('design/layout');\n $data['text_footer_right'] = $this->language->get('text_footer_right');\n $data['text_footer_bottom'] = $this->language->get('text_footer_bottom');\n \n\n$str_search=array('<?php if ($layout_module[\\'position\\'] == \\'column_right\\') { ?>\n <option value=\"column_right\" selected=\"selected\"><?php echo $text_column_right; ?></option>\n <?php } else { ?>\n <option value=\"column_right\"><?php echo $text_column_right; ?></option>\n <?php } ?>','html += \\' <option value=\"column_right\"><?php echo $text_column_right; ?></option>\\';');\n$str_replace=array('<?php if ($layout_module[\\'position\\'] == \\'column_right\\') { ?>\n <option value=\"column_right\" selected=\"selected\"><?php echo $text_column_right; ?></option>\n <?php } else { ?>\n <option value=\"column_right\"><?php echo $text_column_right; ?></option>\n <?php } ?>\n <?php if ($layout_module[\\'position\\'] == \\'footer_right\\') { ?>\n <option value=\"footer_right\" selected=\"selected\"><?php echo $text_footer_right; ?></option>\n <?php } else { ?>\n <option value=\"footer_right\"><?php echo $text_footer_right; ?></option>\n <?php } ?>\n <?php if ($layout_module[\\'position\\'] == \\'footer_bottom\\') { ?>\n <option value=\"footer_bottom\" selected=\"selected\"><?php echo $text_footer_bottom; ?></option>\n <?php } else { ?>\n <option value=\"footer_bottom\"><?php echo $text_footer_bottom; ?></option>\n <?php } ?>','html += \\' <option value=\"column_right\"><?php echo $text_column_right; ?></option>\\';\n html += \\' <option value=\"footer_right\"><?php echo $text_footer_right; ?></option>\\';\n html += \\' <option value=\"footer_bottom\"><?php echo $text_footer_bottom; ?></option>\\';');\n$template_buffer = str_replace($str_search,$str_replace,$template_buffer);\n\n \n\n // call parent method\n return parent::preRender( $template_buffer, $template_name, $data );\n }", "title": "" }, { "docid": "cc41e4a011c953060626d3f5bb9a7a88", "score": "0.46145", "text": "public function map(){\n $mapping = new HashMap();\n\n try {\n // ./src/php/Antlr/StringTemplate/Language/Group.g\n // ./src/php/Antlr/StringTemplate/Language/Group.g\n {\n $this->match($this->input,$this->getToken('LBRACK'),self::$FOLLOW_LBRACK_in_map478); \n $this->pushFollow(self::$FOLLOW_mapPairs_in_map480);\n $this->mapPairs($mapping);\n\n $this->state->_fsp--;\n\n $this->match($this->input,$this->getToken('RBRACK'),self::$FOLLOW_RBRACK_in_map483); \n\n }\n\n }\n catch (RecognitionException $re) {\n $this->reportError($re);\n $this->recover($this->input,$re);\n }\n catch(Exception $e) {\n throw $e;\n }\n\n return $mapping;\n }", "title": "" }, { "docid": "479dbc1b12e14b59543fd8ab125206d6", "score": "0.4606061", "text": "protected function fillLanguages()\n\t{\n\t\t$sql = '\n\t\t\tSELECT languageId\n\t\t\tFROM languages\n\t\t\tWHERE !deleted\n\t\t';\n\t\t$languages = query($sql, true);\n\n\t\tforeach ($languages as $language)\n\t\t{\n\t\t\t$this->languages[$language['languageId']] = \\Model\\Language::getLanguageById(\n\t\t\t\t$language['languageId']\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "eaede3e390ec3e6e4a467c610578f85e", "score": "0.46048838", "text": "function smarty_function_i18n($params, &$smarty)\n{\n\tglobal $localeFile, $locale;\n\t\n if ( !isset($localeFile) || empty($localeFile) )\n\t\t$localeFile = file(dirname(__FILE__) . \"/../../locale/$locale.i18n\");\n\t\t\n\t$ret = \"Undefined\";\n\t\t\n\t// Parse file\n\tforeach ( $localeFile as $line )\n\t{\n\t\tlist($name, $value) = explode(\"=\", $line, 2);\n\t\t\n\t\tif ( $name == $params[\"name\"] )\n\t\t{\t\n\t\t\t/**\n\t\t\t * Parse value\n\t\t\t * change {0} by smarty variable param0\n\t\t\t */\n\t\t\t$endpos = 0;\n\t\t\t\n\t\t\t$pos = strrpos($value, \"{\");\n\t\t\t\n\t\t\twhile ( $pos !== false )\n\t\t\t{\n\t\t\t\t$endpos = strrpos($value, \"}\", $pos);\n\n\t\t\t\tif ( $endpos !== false )\n\t\t\t\t{\n\t\t\t\t\t$num = intval(substr($value, $pos+1, $endpos - $pos -1));\n\t\t\t\t\t$value = substr($value, 0, $pos) . $params[\"param\".$num] . substr($value, $endpos + 1, strlen($value) - $endpos - 1);\n\t\t\t\t}\n\n\t\t\t\t$pos = strrpos($value, \"{\", $pos+1);\n\t\t\t}\n\t\t\t\n\t\t\t$ret = $value;\n\t\t\t\n\t\t\tbreak;\n\t\t}\n\t}\n\t\t\n\treturn $ret;\n}", "title": "" }, { "docid": "bacfe7b9b9e53dc0333f12a6e05e5ba9", "score": "0.460362", "text": "protected function _parse( $template, array & $data = null )\r\n\t{\r\n\t\t// Blocks\r\n\t\tif( preg_match_all( $this->blockPattern, $template, $blocks, PREG_SET_ORDER ) )\r\n\t\t{\r\n\t\t\t// ARRAY_KEYS to increase performance in case of large data\r\n\t\t\tforeach( array_keys( $blocks ) as $key )\r\n\t\t\t{\r\n\t\t\t\t$_replaceData \t\t= '';\r\n\t\t\t\t$_blockName \t\t= '/' . $blocks[$key][1];\r\n\r\n\t\t\t\t// Block data assigned?\r\n\t\t\t\tif( isset( $data[$_blockName] ) && is_array( $data[$_blockName] ) )\r\n\t\t\t\t{\r\n\t\t\t\t\t// Sort by key\r\n\t\t\t\t\tksort( $data[$_blockName] );\r\n\r\n\t\t\t\t\t// Loop through block data\r\n\t\t\t\t\tforeach( array_keys( $data[$_blockName] ) as $_blockKey )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif( ! isset( $data[$_blockName][$_blockKey] ) )\r\n\t\t\t\t\t\t\t$data[$_blockName][$_blockKey] = array();\r\n\r\n\t\t\t\t\t\t$_replaceData .= $this->_parse( $blocks[$key][2], $data[$_blockName][$_blockKey] );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Replace block with filled block(s)\r\n\t\t\t\t$template \t\t\t= substr_replace( $template, $_replaceData, strpos( $template, $blocks[$key][0] ), strlen( $blocks[$key][0] ) );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Variables\r\n\t\tif( preg_match_all( $this->variablePattern, $template, $variables, PREG_SET_ORDER ) )\r\n\t\t{\r\n\t\t\t// Replace variables\r\n\t\t\tforeach( $variables as & $variable )\r\n\t\t\t{\r\n\t\t\t\t$_replaceData = '';\r\n\r\n\t\t\t\t// Check for data variable\r\n\t\t\t\tif( isset( $data[$variable[2]] ) )\r\n\t\t\t\t\t$_replaceData \t= $data[$variable[2]];\r\n\r\n\t\t\t\t// Check for GLOBALS\r\n\t\t\t\telseif( isset( $this->_globals[$variable[2]] ) )\r\n\t\t\t\t\t$_replaceData \t= $this->_globals[$variable[2]];\r\n\r\n\t\t\t\t// Check match string, prepend first character of replace string again\r\n\t\t\t\tif( $variable[0][0] == \"\\r\" || $variable[0][0] == \"\\n\" )\r\n\t\t\t\t{\r\n\t\t\t\t\t$_replaceSearch = & $variable[1];\r\n\t\t\t\t\t//$_replaceData \t= str_replace( \"\\n\", $variable[0], $_replaceData );\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$_replaceSearch = & $variable[0];\r\n\t\t\t\t\t$_replaceData \t= $variable[0][0] . $_replaceData;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Only replace first occurence and escape certain characters\r\n\t\t\t\t$template \t\t\t= substr_replace( $template, str_replace( $this->escapeChars[0], $this->escapeChars[1], $_replaceData ), strpos( $template, $_replaceSearch ), strlen( $_replaceSearch ) );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Include blocks\r\n\t\tif( preg_match_all( $this->includeBlockPattern, $template, $includeBlocks, PREG_SET_ORDER ) )\r\n\t\t{\r\n\t\t\tforeach( $includeBlocks as & $includeBlock )\r\n\t\t\t{\r\n\t\t\t\t$_replaceData \t\t= '';\r\n\t\t\t\t$_includeBlockName \t= '+' . $includeBlock[1];\r\n\t\t\t\t$_indentation \t\t= '';\r\n\r\n\t\t\t\t// Check if indentation is added\r\n\t\t\t\tif( count( $includeBlock ) == 3 )\r\n\t\t\t\t{\r\n\t\t\t\t\t$_indentation \t= $includeBlock[1];\r\n\t\t\t\t\t$_includeBlockName = '+' . $includeBlock[2];\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Block data assigned?\r\n\t\t\t\tif( isset( $data[$_includeBlockName] ) && is_array( $data[$_includeBlockName] ) )\r\n\t\t\t\t{\r\n\t\t\t\t\t// Sort by key\r\n\t\t\t\t\tksort( $data[$_includeBlockName] );\r\n\r\n\t\t\t\t\t// Loop through block data\r\n\t\t\t\t\tforeach( $data[$_includeBlockName] as $key => & $_blockFile )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif( ! $_blockFile ) continue;\r\n\r\n\t\t\t\t\t\tif( file_exists( $_blockFile ) )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tunset( $data[$_includeBlockName][$key] ); // Prevent infinite include loop\r\n\r\n\t\t\t\t\t\t\t$_replaceData .= $this->_parse( \"\\r\\n\" . file_get_contents( $_blockFile ), $data );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tthrow new Exception( \"Can not find file '{$_blockFile}' for include block '[{$_includeBlockName}]'\" );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Replace block with filled block(s)\r\n\t\t\t\t$template = substr_replace( $template, $_replaceData, strpos( $template, $includeBlock[0] ), strlen( $includeBlock[0] ) );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Return parsed template (partial)\r\n\t\treturn $template;\r\n\t}", "title": "" }, { "docid": "c7bd920e47fa23b70a5a7d552742320c", "score": "0.46021292", "text": "abstract public function languageManager();", "title": "" }, { "docid": "ec3532d06c68c03bd8ea403963ac4ad4", "score": "0.45916927", "text": "function _insert_lang($text,$level,$connection=NULL,$comcode=false,$id=NULL,$lang=NULL,$insert_as_admin=false,$pass_id=NULL,$text2=NULL,$wrap_pos=60,$preparse_mode=true,$save_as_volatile=false)\n{\n\tif (is_null($connection)) $connection=$GLOBALS['SITE_DB'];\n\n\tif (get_page_name()=='admin_import') $comcode=false; // For speed, and to avoid instantly showing Comcode errors from sloppy bbcode\n\n\tif (is_null($lang)) $lang=user_lang();\n\t$_text2=NULL;\n\n\tif (running_script('stress_test_loader'))\n\t{\n\t\t$comcode=false;\n\t}\n\n\tif ($comcode)\n\t{\n\t\tif (is_null($text2))\n\t\t{\n\t\t\tif ((function_exists('get_member')) && (!$insert_as_admin))\n\t\t\t{\n\t\t\t\t$member=get_member();\n\t\t\t} else\n\t\t\t{\n\t\t\t\t$member=is_object($GLOBALS['FORUM_DRIVER'])?$GLOBALS['FORUM_DRIVER']->get_guest_id():0;\n\t\t\t\t$insert_as_admin=true;\n\t\t\t}\n\t\t\t$_text2=comcode_to_tempcode($text,$member,$insert_as_admin,$wrap_pos,$pass_id,$connection,false,$preparse_mode);\n\t\t\t$text2=$_text2->to_assembly();\n\t\t}\n\t} else $text2='';\n\n\t$source_member=(function_exists('get_member'))?get_member():$GLOBALS['FORUM_DRIVER']->get_guest_id();\n\n\tif ((is_null($id)) && (multi_lang()) && (strpos(get_db_type(),'mysql')!==false)) // Needed as MySQL auto-increment works separately for each combo of other key values (i.e. language in this case). We can't let a language string ID get assigned to something entirely different in another language. This MySQL behaviour is not well documented, it may work differently on different versions.\n\t{\n\t\t$id=$connection->query_value('translate','MAX(id)');\n\t\t$id=is_null($id)?NULL:($id+1);\n\t}\n\n\tif ($lang=='Gibb') // Debug code to help us spot language layer bugs. We expect &keep_lang=EN to show EnglishEnglish content, but otherwise no EnglishEnglish content.\n\t{\n\t\tif (is_null($id))\n\t\t{\n\t\t\t$id=$connection->query_insert('translate',array('source_user'=>$source_member,'broken'=>0,'importance_level'=>$level,'text_original'=>'EnglishEnglishWarningWrongLanguageWantGibberishLang','text_parsed'=>'','language'=>'EN'),true,false,$save_as_volatile);\n\t\t} else\n\t\t{\n\t\t\t$connection->query_insert('translate',array('id'=>$id,'source_user'=>$source_member,'broken'=>0,'importance_level'=>$level,'text_original'=>'EnglishEnglishWarningWrongLanguageWantGibberishLang','text_parsed'=>'','language'=>'EN'),false,false,$save_as_volatile);\n\t\t}\n\t}\n\tif ((is_null($id)) || ($id===0)) //==0 because unless MySQL NO_AUTO_VALUE_ON_ZERO is on, 0 insertion is same as NULL is same as \"use autoincrement\"\n\t{\n\t\t$id=$connection->query_insert('translate',array('source_user'=>$source_member,'broken'=>0,'importance_level'=>$level,'text_original'=>$text,'text_parsed'=>$text2,'language'=>$lang),true,false,$save_as_volatile);\n\t} else\n\t{\n\t\t$connection->query_insert('translate',array('id'=>$id,'source_user'=>$source_member,'broken'=>0,'importance_level'=>$level,'text_original'=>$text,'text_parsed'=>$text2,'language'=>$lang),false,false,$save_as_volatile);\n\t}\n\n\tif (count($connection->text_lookup_cache)<5000)\n\t{\n\t\tif (!is_null($_text2))\n\t\t{\n\t\t\t$connection->text_lookup_cache[$id]=$_text2;\n\t\t} else\n\t\t{\n\t\t\t$connection->text_lookup_original_cache[$id]=$text;\n\t\t}\n\t}\n\n\treturn $id;\n}", "title": "" }, { "docid": "b5c23bc3b52a64532996d0d1d68e4f89", "score": "0.45856684", "text": "public function insertPhpCode($code)\n {\n $this->current_buffer->append_subtree($this, new Smarty_Internal_ParseTree_Tag($this, $code));\n }", "title": "" }, { "docid": "b60402246efb1c889ad7cf35cf65ddba", "score": "0.4582687", "text": "function _l($line, $label = '', $log_errors = true)\n{\n $CI =& get_instance();\n\n $hook_data = do_action('before_get_language_text', array('line'=>$line, 'label'=>$label));\n $line = $hook_data['line'];\n $label = $hook_data['label'];\n\n if (is_array($label) && count($label) > 0) {\n $_line = vsprintf($CI->lang->line(trim($line), $log_errors), $label);\n } else {\n $_line = @sprintf($CI->lang->line(trim($line), $log_errors), $label);\n }\n\n $hook_data = do_action('after_get_language_text', array('line'=>$line, 'label'=>$label, 'formatted_line'=>$_line));\n $_line = $hook_data['formatted_line'];\n $line = $hook_data['line'];\n\n if ($_line != '') {\n if (preg_match('/\"/', $_line) && !is_html($_line)) {\n $_line = htmlspecialchars($_line, ENT_COMPAT);\n }\n\n return $CI->encoding_lib->toUTF8($_line);\n }\n\n if (mb_strpos($line, '_db_') !== false) {\n return 'db_translate_not_found';\n }\n\n return $CI->encoding_lib->toUTF8($line);\n}", "title": "" }, { "docid": "d835afa1f8d2014be9ab1fabbc8094b6", "score": "0.4577779", "text": "function compile_code($filename, $code, $use_isset = false)\n\t{\n\t\t//\t$code - tpl code\n\t\t//\t$use_isset - if false then compiled code looks more beautiful and easier\n\t\t// to understand and it adds error_reporting() to supress php warnings.\n\t\t// if true then isset() is used to check variables instead of supressing\n\t\t//\t php warnings.\n\n\t\t// load code from file\n\t\tif(!$code && !empty($filename))\n\t\t{\n\t\t\t$code = implode(\"\", @file($filename));\n\t\t}\n\n\t\t// Replace phpBB 2.2 <!-- (END)PHP --> tags\n\t\t$search = array('<!-- PHP -->', '<!-- ENDPHP -->');\n\t\t$replace = array('<'.'?php ', ' ?'.'>');\n\t\t$code = str_replace($search, $replace, $code);\n\n\t\t// change template varrefs into PHP varrefs\n\t\t// This one will handle varrefs WITH namespaces\n\t\t$varrefs = array();\n\t\tpreg_match_all('#\\{(([a-z0-9\\-_]+?\\.)+?)([a-z0-9\\-_]+?)\\}#is', $code, $varrefs);\n\t\t$varcount = sizeof($varrefs[1]);\n\t\tfor ($i = 0; $i < $varcount; $i++)\n\t\t{\n\t\t\t$namespace = $varrefs[1][$i];\n\t\t\t$varname = $varrefs[3][$i];\n\t\t\t$new = $this->generate_block_varref($namespace, $varname, $use_isset);\n\t\t\t$code = str_replace($varrefs[0][$i], $new, $code);\n\t\t}\n\t\t// This will handle the remaining root-level varrefs\n\t\tif($use_isset)\n\t\t{\n\t\t\t$code = preg_replace('#\\{([a-z0-9\\-_]*?)\\}#is', '<'.'?php echo isset($this->vars[\\'\\1\\']) ? $this->vars[\\'\\1\\'] : \\'\\'; ?'.'>', $code);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$code = preg_replace('#\\{([a-z0-9\\-_]*?)\\}#is', '<'.'?php echo $this->vars[\\'\\1\\']; ?'.'>', $code);\n\t\t}\n\n\t\t// Break it up into lines and put \"\\n\" back.\n\t\t$code_lines = explode(\"\\n\", $code);\n\t\tfor ($i = 0; $i < count($code_lines); $i++)\n\t\t{\n\t\t\t$code_lines[$i] .= \"\\n\";\n\t\t}\n\n\t\t$block_nesting_level = 0;\n\t\t$block_names = array();\n\t\t$block_names[0] = \".\";\n\t\t$block_items = array();\n\n\t\t// count lines and prepare array for compiled code\n\t\t$line_count = count($code_lines);\n\t\t$compiled = array();\n\n\t\t// array of switches\n\t\t$sw = array();\n\n\t\t// main loop\n\t\tfor ($i = 0; $i < $line_count; $i++)\n\t\t{\n\t\t\t$line = $code_lines[$i];\n\t\t\t// resetting variables\n\t\t\t$keyword_type = 0; // 1 for 'BEGIN', 2 for 'END', 3 for short php tag, 4 for 'INCLUDE'\n\t\t\t// check if we have valid keyword in current line\n\t\t\t$pos1 = strpos($line, '<!-- BEGIN ');\n\t\t\t$pos2 = strpos($line, '<!-- END ');\n\t\t\t$pos3 = strpos($line, '<'.'?');\n\t\t\t$pos4 = strpos($line, '<!-- INCLUDE ');\n\t\t\tif(($pos1 !== false) || ($pos2 !== false) || ($pos3 !== false) || ($pos4 !== false))\n\t\t\t{\n\t\t\t\t// checking which one is first\n\t\t\t\t$max = max(intval($pos1), intval($pos2), intval($pos3), intval($pos4)) + 1;\n\t\t\t\tif(($pos1 !== false) && ($pos1 < $max))\n\t\t\t\t{\n\t\t\t\t\t$keyword_type = 1;\n\t\t\t\t\t$max = $pos = $pos1;\n\t\t\t\t}\n\t\t\t\tif(($pos2 !== false) && ($pos2 < $max))\n\t\t\t\t{\n\t\t\t\t\t$keyword_type = 2;\n\t\t\t\t\t$max = $pos = $pos2;\n\t\t\t\t}\n\t\t\t\tif(($pos3 !== false) && ($pos3 < $max))\n\t\t\t\t{\n\t\t\t\t\t$keyword_type = 3;\n\t\t\t\t\t$max = $pos = $pos3;\n\t\t\t\t}\n\t\t\t\tif(($pos4 !== false) && ($pos4 < $max))\n\t\t\t\t{\n\t\t\t\t\t$keyword_type = 4;\n\t\t\t\t\t$max = $pos = $pos4;\n\t\t\t\t}\n\t\t\t\t// remove keyword from line - it will be processed on next for()\n\t\t\t\tif($pos > 0)\n\t\t\t\t{\t\n\t\t\t\t\t$line = substr($line, 0, $pos);\n\t\t\t\t\t$code_lines[$i] = substr($code_lines[$i], $pos, strlen($code_lines[$i]) - $pos);\n\t\t\t\t\t$i--;\n\t\t\t\t\t$keyword_type = 0;\n\t\t\t\t}\n\t\t\t\t// remove everything after keyword from line\n\t\t\t\telse\n\t\t\t\t{\t\n\t\t\t\t\t// find end of keyword\n\t\t\t\t\tif(($keyword_type == 1) || ($keyword_type == 2) || ($keyword_type == 4))\n\t\t\t\t\t{\n\t\t\t\t\t\t$pos = strpos($line, '-->') + 3;\n\t\t\t\t\t}\n\t\t\t\t\telseif($keyword_type == 3)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(substr($line, 0, 5) === '<'.'?php')\n\t\t\t\t\t\t{\t// valid php code tag\n\t\t\t\t\t\t\t$keyword_type = 0;\n\t\t\t\t\t\t\t$pos = 5;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\t// short php tag or something like that\n\t\t\t\t\t\t\t$pos = 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// remove everything after key - it will be processed on next for()\n\t\t\t\t\t$line = substr($line, 0, $pos);\n\t\t\t\t\t$code_lines[$i] = substr($code_lines[$i], $pos, strlen($code_lines[$i]) - $pos);\n\t\t\t\t\t$i--;\n\t\t\t\t\t// getting variable name\n\t\t\t\t\tif($keyword_type == 1)\t// BEGIN\n\t\t\t\t\t{\n\t\t\t\t\t\t$var = trim(substr($line, 11, $pos-15));\n\t\t\t\t\t\tif(strpos($var, ' '))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$keyword_type = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif($this->xs_check_switches)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// checking if variable is closed\n\t\t\t\t\t\t\t$found = 0;\n\t\t\t\t\t\t\t$str = '<!-- END ' . $var . ' -->';\n\t\t\t\t\t\t\tfor ($j = $i+1; ($j < $line_count) && !$found; $j++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$pos = strpos($code_lines[$j], $str);\n\t\t\t\t\t\t\t\tif($pos !== false)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$found = 1;\n\t\t\t\t\t\t\t\t\t$found_var = $var;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(!$found && ($this->xs_check_switches == 1))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// checking list of known buggy switches\n\t\t\t\t\t\t\t\t$item = -1;\n\t\t\t\t\t\t\t\tfor($j=0; $j<count($this->bugs); $j++)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif($this->bugs[$j][0] === $var)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$item = $j;\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\tif($item >= 0)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$str1 = '<!-- END ' . $this->bugs[$item][1] . ' -->';\n\t\t\t\t\t\t\t\t\tfor ($j = $i+1; ($j < $line_count) && !$found; $j++)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$pos = strpos($code_lines[$j], $str1);\n\t\t\t\t\t\t\t\t\t\tif($pos !== false)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$found_var = $this->bugs[$item][1];\n\t\t\t\t\t\t\t\t\t\t\t$found = 1;\n\t\t\t\t\t\t\t\t\t\t\t$code_lines[$j] = str_replace($str, $str1, $code_lines[$j]);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(!$found)\n\t\t\t\t\t\t\t{\t// invalid switch\n\t\t\t\t\t\t\t\t$keyword_type = 0;\n\t\t\t\t\t\t\t\t$line = '';\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// adding to list of switches\n\t\t\t\t\t\t\t\tif(isset($sw[$found_var]))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$sw[$found_var] ++;\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{\n\t\t\t\t\t\t\t\t\t$sw[$found_var] = 1;\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\telseif($keyword_type == 2)\t// END\n\t\t\t\t\t{\n\t\t\t\t\t\t$var = trim(substr($line, 9, $pos-13));\n\t\t\t\t\t\tif(strpos($var, ' '))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$keyword_type = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif($this->xs_check_switches)\n\t\t\t\t\t\t{\t// checking if this switch was opened\n\t\t\t\t\t\t\tif(!isset($sw[$var]) || ($sw[$var] < 1))\n\t\t\t\t\t\t\t{\t// there is no opening switch\n\t\t\t\t\t\t\t\t$keyword_type = 0;\n\t\t\t\t\t\t\t\t$line = '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$sw[$var] --;\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\telseif($keyword_type == 4)\t// INCLUDE\n\t\t\t\t\t{\n\t\t\t\t\t\t$var = trim(substr($line, 13, $pos-17));\n\t\t\t\t\t\tif(strpos($var, ' '))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$keyword_type = 0;\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// find key if we have it on current line (should be on line start)\n\t\t\tif($keyword_type == 1) // <!-- BEGIN $var -->\n\t\t\t{\n\t\t\t\t// We have the start of a block.\n\t\t\t\t$block_nesting_level++;\n\t\t\t\t$block_names[$block_nesting_level] = $var;\n\t\t\t\tif(isset($block_items[$var]))\n\t\t\t\t{\n\t\t\t\t\t$block_items[$var] ++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$block_items[$var] = 1;\n\t\t\t\t}\n\t\t\t\tif ($block_nesting_level < 2)\n\t\t\t\t{\n\t\t\t\t\t// Block is not nested.\n\t\t\t\t\t$line = '<'.\"?php\\n\\n\";\n\t\t\t\t\tif($use_isset)\n\t\t\t\t\t{\n\t\t\t\t\t\t$line .= '$'. $var. '_count = ( isset($this->_tpldata[\\''. $var. '.\\']) ) ? sizeof($this->_tpldata[\\''. $var. '.\\']) : 0;';\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$line .= '$'. $var. '_count = sizeof($this->_tpldata[\\''. $var. '.\\']);';\n\t\t\t\t\t}\n\t\t\t\t\t$line .= \"\\n\" . 'for ($'. $var. '_i = 0; $'. $var. '_i < $'. $var. '_count; $'. $var. '_i++)';\n\t\t\t\t\t$line .= \"\\n\". '{'. \"\\n\";\n\t\t\t\t\t$line .= ' $'. $var. '_item = &$this->_tpldata[\\''. $var. '.\\'][$'. $var. '_i];';\n\t\t\t\t\t$line .= \"\\n\\n?\".\">\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// This block is nested.\n\t\t\t\t\t// Generate a namespace string for this block.\n\t\t\t\t\t$namespace = implode('.', $block_names);\n\t\t\t\t\t// strip leading period from root level..\n\t\t\t\t\t$namespace = substr($namespace, 2);\n\t\t\t\t\t// Get a reference to the data array for this block that depends on the\n\t\t\t\t\t// current indices of all parent blocks.\n\t\t\t\t\t$varref = $this->generate_block_data_ref($namespace, false);\n\t\t\t\t\t// Create the for loop code to iterate over this block.\n\t\t\t\t\t$line = '<'.\"?php\\n\\n\";\n\t\t\t\t\tif($use_isset)\n\t\t\t\t\t{\n\t\t\t\t\t\t$line .= '$'. $var. '_count = ( isset('. $varref. ') ) ? sizeof('. $varref. ') : 0;';\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$line .= '$'. $var. '_count = sizeof('. $varref. ');';\n\t\t\t\t\t}\n\t\t\t\t\t$line .= \"\\n\". 'for ($'. $var. '_i = 0; $'. $var. '_i < $'. $var. '_count; $'. $var. '_i++)';\n\t\t\t\t\t$line .= \"\\n\". '{'. \"\\n\";\n\t\t\t\t\t$line .= ' $'. $var. '_item = &'. $varref. '[$'. $var. '_i];';\n\t\t\t\t\t$line .= \"\\n\\n?\".\">\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif ($keyword_type == 2) // <!-- END $var -->\n\t\t\t{\n\t\t\t\t// We have the end of a block.\n\t\t\t\t$line = '<'.\"?php\\n\\n\";\n\t\t\t\t$line .= '} // END ' . $var;\n\t\t\t\t$line .= \"\\n\\n?\".\">\";\n\t\t\t\tif(isset($block_items[$var]))\n\t\t\t\t{\n\t\t\t\t\t$block_items[$var] --;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$block_items[$var] = -1;\n\t\t\t\t}\n\t\t\t\tunset($block_names[$block_nesting_level]);\n\t\t\t\t$block_nesting_level--;\n\t\t\t}\n\t\t\telseif ($keyword_type == 3) // short php tag\n\t\t\t{\n\t\t\t\t$line = '<'.'?php echo \\'<\\',\\'?\\'; ?'.'>';\n\t\t\t\t$php_tags ++;\n\t\t\t}\n\t\t\telseif ($keyword_type == 4) // <!-- INCLUDE file -->\n\t\t\t{\n\t\t\t\t$str = str_replace(array('/', '\\\\', '.', ':'), array(), $var);\n\t\t\t\t$line = '<'.'?php ';\n\t\t\t\t$line .= '$this->set_filename(\\'xs_include' . $this->include_count . '\\', \\'' . $var .'\\', true); ';\n\t\t\t\t$line .= '$this->pparse(\\'xs_include' . $this->include_count . '\\'); ';\n\t\t\t\t$line .= ' ?'.'>';\n\t\t\t\t$this->include_count++;\n\t\t\t}\n\t\t\t/*else // usual html/php\n\t\t\t{\n\t\t\t\t// do nothing.\n\t\t\t}*/\n\t\t\t$compiled[] = $line;\n\t\t}\n\n\t\t// Bring it back into a single string of lines of code.\n\t\t$code_header = '';\n\t\t$code_footer = '';\n\t\tif(!$use_isset)\n\t\t{\n\t\t\t$code_header .=\t\"<\". \"?php\\n\\$old_level = @error_reporting(E_ERROR | E_WARNING | E_PARSE); \\n?\".\">\";\n\t\t\t$code_footer .= '<'.\"?php @error_reporting(\\$old_level); ?\".'>';\n\t\t}\n\n\t\t// add warning if error detected. uncomment it if you are developing phpBB theme - might be heliful to detect errors in template\n\t\t/*if($block_nesting_level > 0)\n\t\t{\n\t\t\t$str = '<'.'?php ';\n\t\t\tfor($i=0; $i<$block_nesting_level; $i++)\n\t\t\t{\n\t\t\t\t$str .= '} ';\n\t\t\t}\n\t\t\t$str .= '?'.'>';\n\t\t\t$compiled[] = $str;\n\t\t\t$code_header .= '<center><span class=\"gen\"><b>Warning:</b> these blocks don\\'t have match in template file: ';\n\t\t\tforeach($block_items as $var => $value)\n\t\t\t{\n\t\t\t\tif($value > 0)\n\t\t\t\t{\n\t\t\t\t\t$code_header .= '&lt;-- BEGIN <b>'. $var. '</b> --&gt; ';\n\t\t\t\t}\n\t\t\t\telseif($value < 0)\n\t\t\t\t{\n\t\t\t\t\t$code_header .= '&lt;-- END <b>'. $var. '</b> --&gt; ';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$code_header .= '</span></center><br clear=\"all\" />';\n\t\t}*/\n\n\t\t$code = implode('', $compiled);\n\t\treturn $code_header . $code . $code_footer;\n\t}", "title": "" }, { "docid": "d83a2e582ed7e206b7ff85d48f02eb40", "score": "0.45703524", "text": "function phorum_mod_spellerpages_javascript_register($data)\n{\n global $PHORUM;\n\n // Check what languages are candidate for loading a translated version.\n $languages = array();\n\n // For Phorum 5.3, we can have a list of compatible languages as setup\n // by the main language file. Check for each of this languages if we\n // can find a translated interface.\n if (!empty($PHORUM['compat_languages'])) {\n $languages = $PHORUM['compat_languages'];\n }\n // Before Phorum 5.3, we can only check the configured language.\n else {\n $languages[] = $PHORUM['language'];\n }\n\n // Check if a language-specific module template is available for one\n // of the languages. If yes, we will use that one. Otherwise, we\n // use the basic English version.\n $template = 'spellerpages::spellChecker.js';\n foreach ($languages as $language)\n {\n $check_template = \"spellerpages::{$language}-spellChecker.js\";\n $tpl = phorum_get_template_file($check_template);\n if (file_exists($tpl[2])) {\n $template = $check_template;\n break;\n }\n }\n\n $data[] = array(\n \"module\" => \"spellerpages\",\n \"where\" => \"after\",\n \"source\" => \"template($template)\"\n );\n\n return $data;\n}", "title": "" }, { "docid": "f199fa08da232ce38fcbd54e0161186a", "score": "0.45693502", "text": "function template ( $template, $data ) {\n\n\t\tglobal $tmpl_dir;\n\n\t\t// ex: {{ domain }}, or {{ cache-control }}\n\t\t$pattern = \"/{{\\s?([a-z-]+)\\s?}}/i\";\n\n\t\treturn preg_replace_callback( $pattern, function ( $m ) use ($data) {\n\t\t\t\n\t\t\t$return = \"\";\n\n\t\t\tif ( array_key_exists( $m[1], $data ) ) {\n\t\t\t\t$return = $data[ $m[1] ];\n\t\t\t\tif ( is_array( $return ) ) {\n\t\t\t\t\t$return = join( \"<br>\\r\\n\", $return );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $return;\n\n\t\t}, file_get_contents( $tmpl_dir . $template . \".tmpl\" ) );\n\n\t}", "title": "" }, { "docid": "1b2693dc8cb463071dc9380bdf6f1928", "score": "0.4566423", "text": "function replaceInitTag($tag,$replace,$content){\n\n\t\treturn preg_replace( \"/<( \\t\\n\\r)*$tag(>|[^>]*>)/i\", $replace,$content);\n\n\t}", "title": "" }, { "docid": "a6cafec8c37caceb293ff43bc1f0faca", "score": "0.45642465", "text": "function ct_syntax($tags, $source)\n\t{\n\t\tstatic $geshi_required;\n\t\tif(!$geshi_required)\n\t\t{\n\t\t\trequire_once 'geshi/geshi.php';\n\t\t\t$geshi_required = true;\n\t\t}\n// \t\tloop through all the tags and capture the block source and the \n// \t\treplacement value so they can be bulk replaced\n\t\t$replacements = array();\n\t\tforeach ($tags as $tag)\n\t\t{\n\t\t\t$language = isset($tag['attributes']['lang']) ? $tag['attributes']['lang'] : 'php';\n\t\t\t$use_lines = isset($tag['attributes']['lines']) ? $tag['attributes']['lines'] === 'true' : false;\n\t\t\t$content = isset($tag['attributes']['src']) ? file_get_contents($tag['attributes']['src']) : $tag['content'];\n\t\t\t$geshi = new GeSHi(trim($content), $language);\n// \t\t\t$geshi->set_header_type(GESHI_HEADER_PRE);\n\t\t\tif($use_lines === true)\n\t\t\t{\n\t\t\t\t$geshi->set_line_style('background: #fcfcfc;', 'background: #f0f0f0;');\n\t\t\t\t$geshi->enable_line_numbers(GESHI_NORMAL_LINE_NUMBERS);\n\t\t\t}\n\t\t\t$geshi->set_tab_width(500);\n\t\t\t$code = $geshi->parse_code();\n\t\t\t$code .= '<span style=\"font-size:10px;\"><a href=\"http://qbnz.com/highlighter/\" title=\"GeSHi - Generic Syntax Highlighter :: Home\" style=\"color:#898989;\">Geshi syntax highlighter</a></span><br />';\n\t\t\t$replacements[$tag['tag']] = $code;\n\t\t}\n\t\treturn strtr($source, $replacements);\n\t}", "title": "" }, { "docid": "4f2edcfe925d10ccd95f64d678b539a8", "score": "0.4552838", "text": "protected function compile() {\n $this->num_optional_placeholders = 0;\n $this->num_placeholders = 0;\n $this->placeholders = Array();\n\n // make references to pass use() them in closures\n $optional = &$this->num_optional_placeholders;\n $num_placeholders = &$this->num_placeholders;\n $default_delimiter = $this->default_delimiter;\n $placeholders = &$this->placeholders;\n\n $offset = 0;\n $match_length = 0;\n $subject = $this->expression;\n\n $this->replacement_template = preg_replace_callback(\"/\" . self::PLACEHOLDER_FINDER_REGEX . \"/\",\n function($match) use (&$placeholders, $default_delimiter, &$num_placeholders, &$optional, $subject, &$offset, &$match_length) {\n // count number of matches/placeholders\n $offset = strpos($subject, $match[0], $offset);\n\n // rename/initialize variables for better readability\n $delimiter = empty($match[3]) ? $default_delimiter : $match[3] ;\n $allowed_chars = empty($match[1]) ? \"^\" . $delimiter : $match[1];\n $quantity = empty($match[2]) ? \"{1}\" : $match[2];\n $placeholder_name = $match[4];\n\n $placeholders[$num_placeholders] = $placeholder = new SimpleExpressionPlaceholder($num_placeholders, $offset - $match_length, $placeholder_name, $allowed_chars, $quantity, $delimiter);\n \n if($placeholder->isOptional()) {\n $optional++;\n }\n\n $match_length += strlen($match[0]);\n\n $num_placeholders++;\n return \"\";\n }, $this->expression);\n\n $this->pattern = \"/^\" . $this->replacement(array_map(function($placeholder) {\n return $placeholder->getExpression();\n }, $this->placeholders), function($part) {\n return preg_quote($part, '/'); \n }) . \"$/D\";\n }", "title": "" }, { "docid": "ecb8b9485a70b8d0adf89dd1e4433cba", "score": "0.45500067", "text": "function highlightCode($content)\r\n {\r\n $content = preg_replace_callback('#\\[code\\](.*?)\\[/code\\]#si', function ($matches) {\r\n $this->performHighlight($matches[1], false, $content);\r\n }, $content);\r\n $content = preg_replace_callback('#\\[code lang=\"(.*?)\"\\](.*?)\\[/code\\]#si', function ($matches) {\r\n $this->performHighlight($matches[2], $matches[1], $content);\r\n }, $content);\r\n $content = preg_replace_callback('#\\<code\\>(.*?)\\</code\\>#si', function ($matches) {\r\n $this->performHighlight($matches[1], false, $content);\r\n }, $content);\r\n $content = preg_replace_callback('#\\<code lang=\"(.*?)\"\\>(.*?)\\</code\\>#si', function ($matches) {\r\n $this->performHighlight($matches[2], $matches[1], $content);\r\n }, $content);\r\n\r\n return $content;\r\n }", "title": "" }, { "docid": "d7549590c3af0d09d90778c7e6b90ab5", "score": "0.4547095", "text": "public function initialize_replacements()\n {\n $exts=[\n 'css',\n 'js'\n ];\n if($this->read_need_file()['replaceDirection']=='forward'){\n foreach($exts as $ext){\n foreach($this->read_need_file()['replacement'] as $to_be_replace => $replaced){\n $this->replace_sign($ext,$to_be_replace,trim($replaced));\n }\n }\n }elseif ($this->read_need_file()['replaceDirection']=='reverse'){\n foreach($exts as $ext){\n foreach($this->read_need_file()['replacement'] as $to_be_replace => $replaced){\n $this->replace_sign_reverse($ext,trim($replaced),$to_be_replace);\n }\n }\n }\n\n }", "title": "" }, { "docid": "36b4d41c56527f908db6b195fe2724be", "score": "0.4541108", "text": "function substituteSMZ_Placement($template, $smzdata, $smzinfo) {\n\t\t$markers = array();\n\t\t$ct = preg_match_all(\"/\\#\\#\\#SMZSM_(\\d+)_([^#]*)\\#\\#\\#/\", $template, $tmplMarkersSM, PREG_PATTERN_ORDER);\n\t\t$ct += preg_match_all(\"/\\#\\#\\#SMZNODE_(\\d+)_([^#]*)\\#\\#\\#/\", $template, $tmplMarkersNode, PREG_PATTERN_ORDER);\n\t\tif ($ct == 0) {\n\t\t\treturn array();\n\t\t}\n\n\t\t// Restructure to mapping from PlacementNr => Tags (unique)\n\t\t$markers = array();\n\t\t$i = 0;\n\t\tforeach ($tmplMarkersSM[1] as $placenr) {\n\t\t\tif (!array_key_exists($placenr, $markers)) {\n\t\t\t\t$markers[$placenr] = array();\n\t\t\t}\n\n\t\t\t$markers[$placenr][] = $tmplMarkersSM[2][$i];\n\t\t\t$markers[$placenr] = array_unique($markers[$placenr]);\n\t\t\t$i++;\n\t\t}\n\n\t\tforeach ($tmplMarkersNode[1] as $placenr) {\n\t\t\tif (!array_key_exists($placenr, $markers)) {\n\t\t\t\t$markers[$placenr] = array();\n\t\t\t}\n\n\t\t\t$markers[$placenr][] = $tmplMarkersNode[2][$i];\n\t\t\t$markers[$placenr] = array_unique($markers[$placenr]);\n\t\t\t$i++;\n\t\t}\n\n\t\t// Sort by PlacementNr\n\t\tksort($markers);\n\n\t\t$i = 1;\n\t\t$subsArray = array();\n\t\t\n\t\t\n\t\t// Skip non-composed root nodes (skip it in SMZ array)\n\t\tif ($smzdata[0]['IsComposed'] == 0) {\n\t\t\t$fix = 0;\n\t\t} else {\n\t\t\t$fix = -1;\n\t\t}\n\n\t\tforeach ($markers as $nr => $m) {\n\t\t\tif ($nr >= count($smzdata)) {\n\t\t\t\tforeach ($m as $tag) {\n\t\t\t\t\t$subsArray['###SMZSM_' . $nr . '_' . $tag . '###'] = '';\n\t\t\t\t\t$subsArray['###SMZNODE_' . $nr . '_' . $tag . '###'] = '';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tforeach ($m as $tag) {\n\t\t\t\t\t$discard = false;\n\t\t\t\t\t$row = $smzdata[$nr + $fix];\n\t\t\t\t\t$smzsmConstraints = $row['UserRights'];\n\t\t\t\t\t$visible = $this->template->tplutils->checkFeatureVisibility($row['FeatureId'],$smzsmConstraints);\n\t\t\t\t\tif(!$visible){\t\t\n\t\t\t\t\t\t$discard = true;\n\t\t\t\t\t\tif($tag == 'VALUEEXISTS'||$tag == 'EXISTS'){\n\t\t\t\t\t\t\t$subsArray['###SMZSM_' . $nr . '_' . $tag . '###'] = '###REMOVE_SUBPART###';\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tif ($row['IsNode']) {\n\t\t\t\t\t\tif (strpos(strtolower($tag), 'includeview_') === 0) {\n\t\t\t\t\t\t\t// Include SMZ View\n\t\t\t\t\t\t\t$view = substr($tag, 12);\n\t\t\t\t\t\t\t$subsArray['###SMZNODE_' . $nr . '_' . $tag . '###'] = $this->includeNodeSMZ($view, $row['FeatureName'], $smzinfo);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$subsArray['###SMZNODE_' . $nr . '_' . $tag . '###'] = $this->replaceSMZSMTag($tag, $row);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//if not visible discard block\n\t\t\t\t\t\tif($discard){\n\t\t\t\t\t\t\tif(key_exists('###SMZSM_' . $nr . '_VALUEEXISTS###', $subsArray)|| key_exists('###SMZSM_' . $nr . '_EXISTS###', $subsArray)){\n\t\t\t\t\t\t\t$subsArray['###SMZSM_' . $nr . '_' . $tag . '###'] = '';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$subsArray['###SMZSM_' . $nr . '_' . $tag . '###'] = $this->replaceSMZSMTag($tag, $row);\t\n\t\t\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\treturn $subsArray;\n\t}", "title": "" }, { "docid": "3c48dd13a10c163c595b03ae595fd136", "score": "0.4535653", "text": "function load_template(){\n\t$CI =& get_instance();\n\t$CI->load->library('sistema');\n\t$CI->parser->parse($CI->sistema->tema['template'], get_tema());\n}", "title": "" }, { "docid": "2aa9db28b918676e83474be741dcaf65", "score": "0.4533698", "text": "private function subparse_replace()\n\t{\n\t\tif ($this->file_open)\n\t\t{\n\t\t\t$code = str_replace(array(\"\\r\\n\", \"\\r\"), array(\"\\n\", \"\\n\"), $this->handler->code[0]->getData());\n\t\t\t$this->file_content = $this->replace_code($this->file_content, $this->find_code, $code);\n\t\t}\n\t}", "title": "" }, { "docid": "fef320531f8b3f782f0ac624fdf7893b", "score": "0.45310587", "text": "function findTranslationsInPhpFile($filepath)\n{\n $content = file_get_contents($filepath);\n\n preg_match_all('~\\$this-\\>l\\(\\'(.*?)\\'\\)~', $content, $matches);\n\n if (isset($matches[1]) && count($matches[1]) > 0)\n return $matches[1];\n\n return array();\n}", "title": "" }, { "docid": "893681b9218b6f05c53d42ef3a543637", "score": "0.45309973", "text": "private function assignForeach()\n {\n // find all 'for' tag initials\n if (preg_match_all('/#{for:(.*)}/', $this->content, $matches))\n {\n $patterns = $matches[0];\n $values = $matches[1];\n\n // iterate over 'for' tags found\n foreach ($patterns as $key1 => $pattern)\n {\n // if 'for' name equals key in values go further\n if (array_key_exists($values[$key1], $this->values))\n {\n // get full content of particular 'for' tag\n if (preg_match_all('/'.$pattern.'(.*)#{for}/s', $this->content, $matches2))\n {\n $replacement = '';\n foreach ($matches2[0] as $tagToReplace2)\n {\n $fragment = $matches2[1][$key1];\n foreach ($this->values[$values[$key1]] as $value)\n {\n $f = $fragment;\n foreach ($value as $key2 => $val)\n {\n $f = str_replace('#{'.$key2.'}', $val, $f);\n }\n $replacement .= $f;\n }\n }\n // replace full content of particular 'for' tag\n $this->content = str_replace($tagToReplace2, $replacement, $this->content);\n }\n }\n }\n }\n }", "title": "" }, { "docid": "44e118de851adfd111ccd2f786e0fe48", "score": "0.4530379", "text": "function includeLocalLang() {\n\t\t$llFile = \\TYPO3\\CMS\\Core\\Utility\\ExtensionManagementUtility::extPath('imagemap_wizard') . 'locallang.xml';\n\t\t/** @var $localizationParser TYPO3\\CMS\\Core\\Localization\\Parser\\LocallangXmlParser */\n\t\t$localizationParser = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Localization\\Parser\\LocallangXmlParser');\n\t\t$LOCAL_LANG = $localizationParser->getParsedData($llFile, $GLOBALS['LANG']->lang);\n\t\treturn $LOCAL_LANG;\n\t}", "title": "" }, { "docid": "0833783eb9fd58593c30c12d28d4743a", "score": "0.4527183", "text": "function parseVal($code,$TPL,$varTag='')\r\n\t{\r\n\t\t\r\n\t\t$newstr='';\r\n\t\twhile (ereg('\\{([-A-Za-z0-9_\\.]+)\\[?([-A-Za-z0-9_]*)\\]?\\}',$code,$det))\r\n\t\t{\r\n\t\t\t\r\n\t\t\t$val =$det[0];\r\n\t\t\t$pos1 =strpos($code,$val);\r\n\t\t\t$pos2 =strpos($val,'[');\r\n\r\n\t\t\tif ($pos2 > 0)\r\n\t\t\t{\r\n\t\t\t\t$varName = $det[1];\r\n\t\t\t\t$key = $det[2];\r\n\t\t\t\t\r\n\t\t\t\tif (!empty($varName) and !empty($key))\r\n\t\t\t\t{\r\n\t\t\t\t\tif ($varName==$varTag)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$newstr=$newstr.substr($code,0,$pos1).$this->_rows1[$key];\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$newstr=$newstr.substr($code,0,$pos1).$this->_rows2[$key];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$key = $det[1];\r\n\t\t\t\t$newstr=$newstr.substr($code,0,$pos1).@$TPL[$key];\r\n\t\t\t}\r\n\r\n\t\t\t$code=substr($code,$pos1+strlen($val));\r\n\t\t}\r\n\t\treturn $newstr.$code;\r\n\r\n\t}", "title": "" }, { "docid": "e3c07795f45045e37d14ec2ac41c5b9e", "score": "0.4524488", "text": "function set_langtrans_UTF8 () {\n global $LANGLOOKUP, $LANGSUBS, $SITE, $forwardTrans, $reverseTrans;\n if($SITE['charset'] == 'UTF-8') {\n\t if (isset($_REQUEST['debug']) ) { echo \"<!-- set_langtrans_UTF8 no conversion performed -- already in UTF-8 -->\\n\"; }\n\t $SITE['origCharset'] = $SITE['charset'];\n\t return; // nothing to do\n }\n $Debug = '';\n // convert the existing $LANGLOOKUP array to UTF-8\n $sceCharset = $SITE['charset'];\n $SITE['convertJS'] = true; // indicate that the language-LL.js is to be converted too\n \n foreach ($LANGLOOKUP as $english => $trans) {\n\t $LANGLOOKUP[$english] = iconv($sceCharset,'UTF-8//TRANSLIT',$trans);\n }\n $Debug .= \"<!-- set_langtrans_UTF8 - converted '$sceCharset' to 'UTF-8' for \".count($LANGLOOKUP). \" langtrans entries -->\\n\";\n // now convert the other likely used items created by load_langtrans\n $langEntries = array(\n\t 'langMonths',\n\t 'langDays',\n\t 'langUVWords',\n\t 'langBaroTrend',\n\t 'langBeaufort',\n\t 'langHeatWords',\n\t 'langWindDir'\n\t );\n\n foreach ($langEntries as $idx => $key) {\n\t \n\t if(isset($SITE[$key])) {\n\t\t foreach ($SITE[$key] as $n => $val) {\n\t\t\t $SITE[$key][$n] = iconv($sceCharset,'UTF-8//TRANSLIT',$val);\n\t\t }\n\t\t $Debug .= \"<!-- set_langtrans_UTF8 - converted \".count($SITE[$key]).\" SITE $key for UTF-8 -->\\n\";\n\t }\n }\n if(count($forwardTrans)>0) {\n\tforeach ($forwardTrans as $english => $trans) {\n\t\t$forwardTrans[$english] = iconv($sceCharset,'UTF-8//TRANSLIT',$trans);\n\t}\n\t$Debug .= \"<!-- set_langtrans_UTF8 - converted forwardTrans to 'UTF-8' for \".count($forwardTrans). \" langtrans entries -->\\n\";\n }\n \n $SITE['origCharset'] = $sceCharset; // remember the original character set\n $SITE['charset'] = 'UTF-8'; // change our default character set\n if (isset($_REQUEST['debug']) ) { echo $Debug; }\n\t\n}", "title": "" }, { "docid": "62bbe98ec5b22e7e500990a8ff12eb2c", "score": "0.45229715", "text": "public function generate() {\n\n\t\tif( TL_MODE == 'BE' ) {\n\n\t\t\t$objTemplate = new BackendTemplate('be_wildcard');\n\n\t\t\t$objTemplate->wildcard = '### STORELOCATOR MAP ###';\n\t\t\t$objTemplate->title = $this->headline;\n\t\t\t$objTemplate->id = $this->id;\n\t\t\t$objTemplate->link = $this->name;\n\t\t\t$objTemplate->href = 'contao/main.php?do=themes&amp;table=tl_module&amp;act=edit&amp;id=' . $this->id;\n\n\t\t\treturn $objTemplate->parse();\n\t\t}\n\n\n\n\t\treturn parent::generate();\n\t}", "title": "" }, { "docid": "2b274c557eaddbe0e6a93de8d1cee23a", "score": "0.45185852", "text": "private function _populate_template( $template , $input , $line = '')\n {\n $full_path = PRINT_TEMPLATE_DIR.'print_'.$template.'.pstpl';\n $full_constant = 'TEMPLATE'.$template.'.pstpl';\n if(!defined($full_constant))\n {\n if(is_file($full_path))\n {\n define( $full_constant , file_get_contents($full_path));\n\n $template_content = constant($full_constant);\n $test_empty = trim($template_content);\n if(empty($test_empty))\n {\n return \"<!--\\n\\t$full_path\\n\\tThe template was empty so is useless.\\n-->\";\n }\n }\n else\n {\n define($full_constant , '');\n return \"<!--\\n\\t$full_path is not a propper file or is missing.\\n-->\";\n }\n }\n else\n {\n $template_content = constant($full_constant);\n $test_empty = trim($template_content);\n if(empty($test_empty))\n {\n return \"<!--\\n\\t$full_path\\n\\tThe template was empty so is useless.\\n-->\";\n }\n }\n\n if(is_array($input))\n {\n foreach($input as $key => $value)\n {\n $find[] = '{'.$key.'}';\n $replace[] = $value;\n }\n return str_replace( $find , $replace , $template_content );\n }\n else\n {\n if(Yii::app()->getConfig('debug') > 0)\n {\n if(!empty($line))\n {\n $line = 'LINE '.$line.': ';\n }\n return '<!-- '.$line.'There was nothing to put into the template -->'.\"\\n\";\n }\n }\n }", "title": "" }, { "docid": "9f98cc23fcf6c6ef5d54ce54bcc88ce4", "score": "0.45144925", "text": "protected function parse_lang($s_raw_content)\r\n {\r\n try\r\n {\r\n $lng=array();\r\n $s_locallang=$s_raw_content;\r\n\t\t\t\r\n if(SITE_FOR_LIVE)\r\n {\r\n\t\t\t\t$dir = ($this->i_default_language==1)?'english':'french';\r\n $lng= $this->lang->load('common', $dir,TRUE);\r\n }\r\n else\r\n {\r\n $lng= $this->lang->load('common', 'english',TRUE);\r\n }\r\n\r\n //$this->lang->line('be_invalid_connection_str')\r\n if(!empty($lng))\r\n {\r\n /***\r\n * ex- in the raw content the language key must be used like :- ###LBL_CITY###\r\n */\r\n foreach($lng as $s_lng_key=>$s_lng_content)\r\n {\r\n $s_locallang=str_replace(\"###\".strtoupper($s_lng_key).\"###\",$s_lng_content,$s_locallang);\r\n }///end for\r\n }\r\n unset($s_raw_content,$lng);\r\n return $s_locallang;\r\n }\r\n catch(Exception $err_obj)\r\n {\r\n show_error($err_obj->getMessage());\r\n } \r\n }", "title": "" }, { "docid": "8cb93924e3ca78a8d708c00c5ab46984", "score": "0.45086205", "text": "function sb_language( $page =\"\") {\n\t\tglobal $lang_string;\t\t\t\n\n\t\t// Language: Czech\n\t\t$lang_string['language'] = 'czech';\n\t\t$lang_string['locale'] = array('cs_CZ', 'cs','czech');\n\t\t$lang_string['rss_locale'] = 'cs-CZ'; // New 0.4.8\n\n\t\t// Windows Charset: CP1250\n\t\t$lang_string['html_charset'] = 'CP1250';\n\t\t$lang_string['php_charset'] = 'CP1250';\n\t\tsetlocale( LC_TIME, $lang_string['locale'] );\t\t\n\n\t}", "title": "" }, { "docid": "35b23677c484a0f19a11f3f796f87c99", "score": "0.45061326", "text": "function _variableReplace($stream){\n $cnt = preg_match_all(\"/\\s*\\(.*[^\\\\\\\\]\\)\\s*Tj\\s*/msU\", $stream, $old_text_list);\n if ($cnt > 0){\n $new_text_list = $old_text_list;\n if (is_array($this->template_variables)){\n $keys = array_keys($this->template_variables);\n for ($pos=0; $pos < count($keys); $pos++){\n $value = $this->template_variables[$keys[$pos]];\n $search = $this->delimiters[\"start\"].$keys[$pos].$this->delimiters[\"end\"];\n for($i=0; $i<count($old_text_list); $i++){\n $new_text_list[$i] = str_replace($search, $value, $new_text_list[$i]);\n }\n }\n }\n for($i=0; $i<count($old_text_list); $i++){\n $stream = str_replace($old_text_list[$i], $new_text_list[$i], $stream);\n }\n }\n return $stream;\n }", "title": "" }, { "docid": "3c69dcd316fb3e93c1024ec4ced82632", "score": "0.45047247", "text": "public function loadLocallang()\n {\n $this->getLanguageService()->includeLLFile('EXT:tc_beuser/Resources/Private/Language/locallangOverview.xlf');\n $this->getLanguageService()->includeLLFile('EXT:lang/locallang_alt_doc.xml');\n }", "title": "" }, { "docid": "f2741b68ac1f49e00b6407cade5e78a1", "score": "0.45023927", "text": "function sb_language( $page =\"\") {\n\t\tglobal $lang_string;\n\t\t\t\n\t\t// Language: Tamil\n\t\t$lang_string['language'] = 'tamil';\n\t\t\n\t\t$lang_string[ 'locale' ] = array('ta_IN', 'tamil');\n\t\t$lang_string['rss_locale'] = 'ta-IN'; // New 0.4.8\n\t\t\n\t\t// ISO Charset: UTF-8\n\t\t$lang_string['html_charset'] = 'UTF-8';\n\t\t$lang_string['php_charset'] = 'UTF-8';\t\t\n\n\t\tsetlocale(LC_TIME, $lang_string['locale'] ); // <-- New 0.3.7\n\t\t\n\t}", "title": "" }, { "docid": "5177d1cd983e1c9557b4b6a5dabfe7e3", "score": "0.4500927", "text": "function display_highlight( $lang = 'php', $code = null )\n{\n\n if( is_null( $code ) )\n {\n $code = trim(ob_get_contents()) ;\n ob_end_clean();\n }\n \n if( class_exists('GeSHi') )\n {\n $geshi = new GeSHi($code, $lang);\n $geshi->enable_line_numbers(GESHI_FANCY_LINE_NUMBERS, 10);\n $geshi->set_line_style( 'background: #fcfcfc;', 'background: #f0f0f0;' );\n \n echo '<div style=\"width:750px;margin-bottom:10px;\" >'.$geshi->parse_code().'</div>';\n }\n else \n {\n echo '<pre style=\"width:750px;margin-bottom:10px;\" >'.htmlentities($code,ENT_QUOTES,'utf-8').'</pre>';\n }\n\n \n \n \n}", "title": "" } ]
a234eaef87352ba02d510a679a78dc3f
Set the number of decimals to use for percent values
[ { "docid": "8945bd75fbc0b6b5a9d1535f8807f9e4", "score": "0.6967384", "text": "public static function setPercentDecimals(int $percentDecimals): void\n {\n self::$percentDecimals = $percentDecimals;\n }", "title": "" } ]
[ { "docid": "694825db5b7ab1f38fd078eae69e161d", "score": "0.6932091", "text": "abstract protected function percent();", "title": "" }, { "docid": "273f545b14ec4cd404aa1a0dc68e4c15", "score": "0.68922764", "text": "public function testGetPercent()\n {\n $this->assertSame(1000, (new Decimal(100))->getPercent(10)->getCents());\n $this->assertSame(3000, (new Decimal(100))->getPercent(30)->getCents());\n $this->assertSame(1875, (new Decimal(75))->getPercent(25)->getCents());\n $this->assertSame(263, (new Decimal(10.50))->getPercent(25)->getCents());\n $this->assertSame(0, (new Decimal(75))->getPercent(0)->getCents());\n }", "title": "" }, { "docid": "e95eab0f7ad0d6dc1baa71f4aa015fd3", "score": "0.6802979", "text": "public static function getPercentDecimals(): int\n {\n return self::$percentDecimals;\n }", "title": "" }, { "docid": "761fa9217fb173019f4240baaf23a944", "score": "0.6772448", "text": "public function testAddPercent()\n {\n $this->assertSame(11000, (new Decimal(100))->addPercent(10)->getCents());\n $this->assertSame(13000, (new Decimal(100))->addPercent(30)->getCents());\n $this->assertSame(9375, (new Decimal(75))->addPercent(25)->getCents());\n $this->assertSame(1313, (new Decimal(10.50))->addPercent(25)->getCents());\n $this->assertSame(7500, (new Decimal(75))->addPercent(0)->getCents());\n }", "title": "" }, { "docid": "5c03e2cefefbbf02217f762bd0fee97c", "score": "0.656608", "text": "public function convertPercentToDecimal($value){\n return floatval(\"60\") / 100.00;\n }", "title": "" }, { "docid": "6ffec87f7a3da837a18405bba43f93d7", "score": "0.6563184", "text": "function percent(int $number) {\n return number_format($number, 4, '.', '.'); \n}", "title": "" }, { "docid": "882561536e2a39d0c194919129e987ee", "score": "0.641265", "text": "public static function percent($value)\r\n {\r\n return FormRules::intervalnr($value, array(0 => '', 1 => '0', 2 => '100'));\r\n }", "title": "" }, { "docid": "0af9f9307522f071387dc8b8908b0542", "score": "0.6361304", "text": "function pct(int $number){\n return number_format($number*100, 2, ',', '.').'%';\n}", "title": "" }, { "docid": "00fc13bcc62194a70f0eaf23442618c8", "score": "0.62559104", "text": "function percentage($number, $p = 100)\n {\n return $number * $p / 100;\n }", "title": "" }, { "docid": "dfa899832c04b049ba3466f6d4fc2ccd", "score": "0.6253402", "text": "function pct( $a , $b )\n{\nif( $b == 0 )\n{\nreturn \"N/A\";\n}\nelse\n{\n$res = ( round( ( $a * 1000 / $b ) ) / 10 );\nreturn $res;\n}\n}", "title": "" }, { "docid": "aa7a8e6bf3bcc2352a45c8db6cd6d446", "score": "0.62361693", "text": "public function setDecimals($decimals)\n {\n $this->decimals = $decimals;\n }", "title": "" }, { "docid": "b43ede7bc8a26cc8fb41e7894862f4be", "score": "0.61952406", "text": "public static function gf_convert_dec_perc($val){\n\n $percent = $val * 100;\n\n return $percent;\n\n }", "title": "" }, { "docid": "499472799de0f9fab413c98a6b8c0658", "score": "0.6160786", "text": "public function setFractionDigits($fraction_digits);", "title": "" }, { "docid": "6f806afaee0925ad8256a3952d62bdde", "score": "0.6152378", "text": "public function getPercentageRate()\n\t{\n\t\treturn 0.00;\n\t}", "title": "" }, { "docid": "bfd67148c924945bd96f9fe3c9d82b74", "score": "0.607602", "text": "private function setPercentageFields()\n {\n $simplePercentageFields = array(\n 'starting_level' => 'configAndInitiateGraphDraw();',\n 'saturation_level' => 'configAndInitiateGraphDraw();',\n 'dense_urban_territory' => 'setGeographyAreas();',\n 'urban_territory' => 'setGeographyAreas();',\n 'suburban_territory' => 'setGeographyAreas();',\n 'rural_territory' => 'setGeographyAreas();',\n 'dense_urban_distribution' => 'setDemographyPopulation();',\n 'urban_distribution' => 'setDemographyPopulation();',\n 'suburban_distribution' => 'setDemographyPopulation();',\n 'rural_distribution' => 'setDemographyPopulation();',\n 'packages_erosion_rate' => '',\n 'depreciation_rate' => '',\n 'interest_rate' => '',\n );\n\n foreach ($simplePercentageFields as $percentageField => $jsOnSlide) {\n $this->setWidget($percentageField, new amWidgetFormSlider(array(\n 'units' => '%',\n 'step' => 0.5,\n //'strict_limits' => false, // Set to false to allow proper edition of input\n 'js_on_slide' => $jsOnSlide,\n )));\n }\n }", "title": "" }, { "docid": "c0bbc8f29017d3fc0b67c8724672f61d", "score": "0.6072573", "text": "public function getFormattedPercentAttribute()\n {\n return NumberFormatter::format($this->attributes['percent'], null, 3) . '%';\n }", "title": "" }, { "docid": "f5c327a43e6ed8ef5e74fa0eb4c3312c", "score": "0.605538", "text": "public function setUsagePercent($v)\n\t{\n\t\tif(!isset($this->oldColumnsValues[PartnerPeer::USAGE_PERCENT]))\n\t\t\t$this->oldColumnsValues[PartnerPeer::USAGE_PERCENT] = $this->usage_percent;\n\n\t\tif ($v !== null) {\n\t\t\t$v = (int) $v;\n\t\t}\n\n\t\tif ($this->usage_percent !== $v || $this->isNew()) {\n\t\t\t$this->usage_percent = $v;\n\t\t\t$this->modifiedColumns[] = PartnerPeer::USAGE_PERCENT;\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "bf84d334fd7ff8477a1b36c8722712d7", "score": "0.5934066", "text": "function get_percentage($total, $number)\r\n\t {\r\n\t $ci =& get_instance();\r\n\t if ( $total > 0 ) {\r\n\t\t\t return round($number * ($total / 100),2);\r\n\t\t\t} else {\r\n\t\t\t return 0;\r\n\t\t\t}\r\n\t }", "title": "" }, { "docid": "cacdc5341bbab8020026328a83603824", "score": "0.5894968", "text": "public function setPercents(array $percents): self\n {\n return $this->setParam('percents', $percents);\n }", "title": "" }, { "docid": "d39e8a1065a73b6f65953f5298c1b2c4", "score": "0.5849763", "text": "public function percentages(int $round = null) : Statistics\r\n {\r\n $this->type = 'PERCENT';\r\n $this->round = $round;\r\n return $this;\r\n }", "title": "" }, { "docid": "73fd360c2f1b4fc4539ff30edb7c4892", "score": "0.58461666", "text": "function percentage_format($number,$decimal=2,$is_show_sign=1){\n //[]-> optional\n //use-> echo percentage_format($value,[$decimal,$is_show_sign]);\n return ($is_show_sign==1)?number_format($number,$decimal).\"%\":number_format($number,$decimal);\n }", "title": "" }, { "docid": "1dbd2081722d05b8a8a7fba43789832d", "score": "0.576923", "text": "public function getPercentage()\n {\n return $this->percentage;\n }", "title": "" }, { "docid": "1759e4c6ba046a5439c061af55354027", "score": "0.574438", "text": "public static function getPercentFromPart($amount, $all, $precision = 0)\n\t{\n\t\tif ($all === 0) return 0;\n\t\treturn round($amount / self::getOnePercent($all), $precision);\n\t}", "title": "" }, { "docid": "9cdf401182ebcaf1343f0bd8ceecfa27", "score": "0.57212555", "text": "function csscrush_fn__percent ( $input ) {\n $input = preg_replace( '![^\\d\\.\\s,]!S', '', $input );\n\n $args = preg_split( CssCrush_Regex::$patt->argListSplit, $input, -1, PREG_SPLIT_NO_EMPTY );\n\n // Use precision argument if it exists, use default otherwise\n $precision = isset( $args[2] ) ? $args[2] : 5;\n\n // Output zero on failure\n $result = 0;\n\n // Need to check arguments or we may see divide by zero errors\n if ( count( $args ) > 1 && ! empty( $args[0] ) && ! empty( $args[1] ) ) {\n\n // Use bcmath if it's available for higher precision\n\n // Arbitary high precision division\n if ( function_exists( 'bcdiv' ) ) {\n $div = bcdiv( $args[0], $args[1], 25 );\n }\n else {\n $div = $args[0] / $args[1];\n }\n\n // Set precision percentage value\n if ( function_exists( 'bcmul' ) ) {\n $result = bcmul( (string) $div, '100', $precision );\n }\n else {\n $result = round( $div * 100, $precision );\n }\n\n // Trim unnecessary zeros and decimals\n $result = trim( (string) $result, '0' );\n $result = rtrim( $result, '.' );\n }\n\n return $result . '%';\n}", "title": "" }, { "docid": "cc5cda0346dbd633bd7c54f3e2678989", "score": "0.57021934", "text": "public function getPercent()\n {\n return $this->percent;\n }", "title": "" }, { "docid": "cc5cda0346dbd633bd7c54f3e2678989", "score": "0.57021934", "text": "public function getPercent()\n {\n return $this->percent;\n }", "title": "" }, { "docid": "c6212c0169e174113dd7b35f90b96817", "score": "0.5697291", "text": "public function percent(int $value) : int\n {\n return $this->result = round($value * $this->result / 100);\n }", "title": "" }, { "docid": "655f5b61aad50b715fa1852c0d4c4112", "score": "0.56924033", "text": "private function updatePercentOfGoodAnswers()\n\t{\n\t\t$this->percent_of_good_answers = $this->calculatePercentOfGoodAnswers();\n\t\tDB::table($this->table)->\n\t\t\twhere('id', $this->id)->\n\t\t\tupdate([\n\t\t\t\t'percent_of_good_answers' => $this->percent_of_good_answers\n\t\t]);\n\t}", "title": "" }, { "docid": "5efed6b42b7ab811393ad5f961528e14", "score": "0.56809783", "text": "public function getPercentageOffAttribute($value)\n {\n return $value ? $value : 0;\n }", "title": "" }, { "docid": "b74126593dfff30a1353e92e853dc392", "score": "0.56742007", "text": "public function quantityAsPercentage()\n\t{\n\t\t$maxValue = $this->findMaxValue();\n\n\t\tarray_walk($this->_data, function(&$value, &$key) use ($maxValue){\n\t\t\t$value = round($value / $maxValue, 2);\n\t\t});\n\t\t\n\t\treturn $this->_data;\n\t}", "title": "" }, { "docid": "b59332e8a6154e71dc0956fa4922687c", "score": "0.5671945", "text": "function mkpercent($a, $b) {\n\t\t\tif ($a == 0) { return 0; }\n\t\t elseif ($b == 0) { return '---'; }\n\t\t\telse { return number_format(($a*100/$b),0,'',','); }\t\t\n\t\t}", "title": "" }, { "docid": "7faf15fe523a1caed47f37883cc8e04d", "score": "0.56676036", "text": "public function setPercentSign($percentSign);", "title": "" }, { "docid": "4b41b9aec07dbf44bf28e118b9dc5449", "score": "0.56635946", "text": "public function SetValue( $value ) {\n $this->_value = round( floatval($value), 2 );\n }", "title": "" }, { "docid": "561f7ca7037b9d4f148bf96a901803cd", "score": "0.5657678", "text": "public function get_percentage() {\n $id = intval($this->get_post_value('user_id'));\n\t $nasabah = $this->db->get_where('nasabah', array(\n\t 'user_id' => $id\n\t ))->row_array();\n\t $noAnggota = $nasabah['no_anggota'];\n\t $investor = $this->db->get_where('investor', array(\n\t 'no_anggota' => $noAnggota\n\t ))->row_array();\n\t $modal = intval($investor['porsi_modal']);\n $cmd = \"SUM(porsi_modal)\";\n\t $totalModal = intval($this->db->query(\"SELECT \" . $cmd . \" FROM investor\")->row_array()[$cmd]);\n\t //echo \"\" . $modal . \",\" . $totalModal;\n\t echo intval($modal*100/$totalModal);\n\t}", "title": "" }, { "docid": "b1a0b3f4a6978b869a176d93c6d5e1c6", "score": "0.56494534", "text": "function print_td_pct( $numer , $denom , $bold = false , $attributes = null )\n{\nglobal $vbar;\nglobal $vbbar;\nglobal $diff_mode;\n$class = get_print_class( $numer , $bold );\nif( $denom == 0 )\n{\n$pct = \"N/A%\";\n}\nelse\n{\n$pct = xhprof_percent_format( $numer / abs( $denom ) );\n}\nprint ( \"<td $attributes $class>$pct</td>\\n\" ) ;\n}", "title": "" }, { "docid": "0ed47d108500b3441b41a5c33ec171e9", "score": "0.56453264", "text": "function getVatPercent()\t{\n\t\treturn $this->tax/100;\n\t}", "title": "" }, { "docid": "23072fc4ad31c491c0fd44a9d94b8c1e", "score": "0.56284434", "text": "public function calcPercentages($fBrut = null, $fNet = null, $fPercent = null);", "title": "" }, { "docid": "00cac449972fdb2d8c3e289c2789aaa0", "score": "0.5616187", "text": "function Porcentaje($varx, $varTotal)\n {\n return round( ($varx/$varTotal)*100,0 ); \n }", "title": "" }, { "docid": "0b75e005b813b1a571a460685aa3862a", "score": "0.56102306", "text": "public function percent($data = null, $digits = 0)\r\n {\r\n // Return this if no parameters were passed\r\n if (null === $data) {\r\n return $this;\r\n }\r\n \r\n // Determine percent value\r\n if (is_array($data)) {\r\n list($val, $maxval) = $data;\r\n $percent = $this->calcPercent($val, $maxval);\r\n } else if (is_numeric($data)) {\r\n $percent = (float) $data;\r\n } else {\r\n throw new Zend_View_Exception(\"Data must be a numeric or array of value, maxvalue.\");\r\n }\r\n \r\n $percent = $percent * 100;\r\n \r\n $percent = (string) number_format($percent, (int) $digits, $this->_decPoint, $this->_thousandsSep);\r\n \r\n // Remove trailing zeroes and dot\r\n if ($this->_trimTrail AND $digits > 0) {\r\n $percent = rtrim($percent, '0');\r\n $percent = rtrim($percent, $this->_decPoint);\r\n }\r\n \r\n // Append percent symbol\r\n $percent .= $this->_symbol;\r\n \r\n return $percent;\r\n }", "title": "" }, { "docid": "47bcebd3bc0adf1971a379a86bc0d0da", "score": "0.5598983", "text": "public function getDefaultPercent(): float|null;", "title": "" }, { "docid": "ecd81570b589f20640e1376ebd6e494b", "score": "0.559394", "text": "private function change_percent($v1, $v2) {\n\t\tif($v1 > 0 && $v2 == 0) return '&#8734'; /* infinity */\n\n\t\tif($v1 == $v2) return '-'; /* no change */\n\t\t\n\t\treturn $this->number_format(round((($v1 - $v2) / $v2) * 100, 1), 1) . '%';\n\t}", "title": "" }, { "docid": "869f4a437df1ce0cd6b4a0bd84ebc87c", "score": "0.55892617", "text": "function calculatePercentage($fps)\n\t{\n\t\t$ratio = (float) $fps * 100 / 200.0;\n\t\tif ($fps >= 200) {\n\t\t\t$ratio = 100;\n\t\t}\n\t\treturn $ratio . \"%\";\n\t}", "title": "" }, { "docid": "b1a5fc1e87f407bd89bd1aa2bbafee1a", "score": "0.5588222", "text": "public function testCheckPercentTierPrice(): void\n {\n $priceHtml = $this->getProductPriceHtml('simple-product-tax-none');\n $this->assertFinalPrice($priceHtml, 205.00);\n $this->assertAsLowAsPrice($priceHtml, 102.50);\n }", "title": "" }, { "docid": "5334cc4c542f89ddc59e93d71926969a", "score": "0.5577137", "text": "private function set_precision() {\n\t\tif(!isset($this->group_function_field) || !isset($this->table)) return;\n\t\t$this->precision = sqlValue(\"SELECT NUMERIC_SCALE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='{$this->table}' AND COLUMN_NAME='{$this->group_function_field}'\");\n\t}", "title": "" }, { "docid": "1a2a6b7719ced6397f790c73d176c80a", "score": "0.55655557", "text": "public function getGroupCachePercent(){}", "title": "" }, { "docid": "1d4340a1374ba5e52dee8f2854684b38", "score": "0.55530316", "text": "private function is_percentage( $value ) {\n\t\treturn is_string( $value ) ? (bool) preg_match( '/(\\d+\\.?\\d*)%/', $value, $matches ) : false;\n\t}", "title": "" }, { "docid": "d7e82314b87c6dfd849b26827542f974", "score": "0.5550398", "text": "public function getDiscountPercent();", "title": "" }, { "docid": "ddcb3700bce2477a6ae5a24cb235a2e2", "score": "0.554767", "text": "public function renderSalePercent()\n {\n if($this->model->price && $this->model->old_price)\n return round((($this->model->old_price - $this->model->price) / ($this->model->old_price)) * 100);\n\n return 0;\n }", "title": "" }, { "docid": "40da825e8540b2b1ac05627eb2a86b6c", "score": "0.55394626", "text": "public function setAmountAttribute($amount)\n {\n if (!isset($this->attributes['is_percentage']))\n $this->attributes['amount'] = $amount;\n\n else\n $this->attributes['amount'] = $this->attributes['is_percentage']\n ? floor($amount)\n : round($amount, 2);\n }", "title": "" }, { "docid": "1238c98d54adcd86450c4bfeeed88f74", "score": "0.55371207", "text": "public function getPopularityAsPercent() {\n return round($this->popularity * 100);\n }", "title": "" }, { "docid": "213bbc8c01d32f69699d82c6595c15db", "score": "0.55240095", "text": "public function setPercentages(&$var)\n {\n $arr = GPBUtil::checkMapField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING, \\Google\\Protobuf\\Internal\\GPBType::DOUBLE);\n $this->percentages = $arr;\n }", "title": "" }, { "docid": "26181eb4d1c902246a708e397e417ee2", "score": "0.5523984", "text": "public function getDecimals() : int\n {\n return 0;\n }", "title": "" }, { "docid": "202f618bbf77804f5cba310bb8202eff", "score": "0.5523855", "text": "public function setDecimals($decimals)\n {\n $this->fields['decimals'] = $decimals;\n return $this;\n }", "title": "" }, { "docid": "aaf4fc55be06e02c9ed65e01c47f2b4a", "score": "0.55083877", "text": "public function testSubtractPercent()\n {\n $this->assertSame(9000, (new Decimal(100))->subtractPercent(10)->getCents());\n $this->assertSame(7000, (new Decimal(100))->subtractPercent(30)->getCents());\n $this->assertSame(5625, (new Decimal(75))->subtractPercent(25)->getCents());\n $this->assertSame(787, (new Decimal(10.50))->subtractPercent(25)->getCents());\n $this->assertSame(7500, (new Decimal(75))->subtractPercent(0)->getCents());\n }", "title": "" }, { "docid": "e2845f5d5f91b9887e2c33226f6d1dc3", "score": "0.5508028", "text": "public function getProgressPercent()\n {\n return $this->percent;\n }", "title": "" }, { "docid": "0870afa06a1428711a7c28d9b99a3902", "score": "0.5491083", "text": "public function getProfitPercentAttribute()\n {\n if ($this->all_price > 0 && $this->purchase_price > 0) :\n $profit = $this->all_price - $this->purchase_price;\n $profit_percent = $profit * 100 / $this->purchase_price;\n return number_format($profit_percent, 2);\n endif;\n }", "title": "" }, { "docid": "dfc0c1131dfb5632ac43b57900a87b10", "score": "0.5485995", "text": "public function getPercentages()\n {\n return $this->percentages;\n }", "title": "" }, { "docid": "dfc0c1131dfb5632ac43b57900a87b10", "score": "0.5485995", "text": "public function getPercentages()\n {\n return $this->percentages;\n }", "title": "" }, { "docid": "ef8c26cb0d3550e0f00fc30bcca82935", "score": "0.5482022", "text": "function ajs_spb_convert_decimal_to_fraction($imagemeta) {\n\tif ((1 / $imagemeta['image_meta']['shutter_speed']) > 1) {\n\techo \"1/\";\n\t\tif (number_format((1 / $imagemeta['image_meta']['shutter_speed']), 1) == number_format((1 / $imagemeta['image_meta']['shutter_speed']), 0)) {\n\t\t\techo number_format((1 / $imagemeta['image_meta']['shutter_speed']), 0, '.', '') . ' sec';\n\t\t} else {\n\t\t\techo number_format((1 / $imagemeta['image_meta']['shutter_speed']), 1, '.', '') . ' sec';\n\t\t}\n\t} else {\n\t\techo $imagemeta['image_meta']['shutter_speed'].' sec';\n\t}\n}", "title": "" }, { "docid": "a60767224320f1a030f6b45c7e4687fb", "score": "0.5475812", "text": "public function getPercentage() : int\n {\n return (int) $this->feature->getPercentage();\n }", "title": "" }, { "docid": "ee61f79f1227506ac5b58a17594c8d95", "score": "0.54657865", "text": "public function shoesTenpercent(){\n $offerPrice = $this->prices['Shoes'] * 10 / 100;\n return $offerPrice;\n }", "title": "" }, { "docid": "8d6081cc2ebf9c45217840024f8d75d1", "score": "0.5461206", "text": "public function setPercent($var)\n {\n GPBUtil::checkInt32($var);\n $this->percent = $var;\n\n return $this;\n }", "title": "" }, { "docid": "13352fb76d30f6fa818c01307c595687", "score": "0.54602736", "text": "public function getNumberOfDecimals(): int;", "title": "" }, { "docid": "a1f1ef2c6f849ca8bc95fb53f8320e5b", "score": "0.5459082", "text": "protected function setPrecision($value)\n\t{\n\t\t$this->_p=TPropertyValue::ensureInteger($value);\n\t}", "title": "" }, { "docid": "7e8b4bdeb72e20b9dc713fa1f979be11", "score": "0.54526097", "text": "public function setPercentage(float $percentage){\n\n $this->percentage = $percentage;\n\n $attribute = Attribute::getAttribute(Attribute::HEALTH);\n $attribute->setMaxValue(1000);\n $attribute->setValue(1000 * $this->percentage);\n $upk = new UpdateAttributesPacket();\n $upk->entries = [$attribute];\n $upk->entityRuntimeId = $this->eid;\n $this->owner->dataPacket($upk);\n\n $bpk = new BossEventPacket();\n $bpk->bossEid = $this->eid;\n $bpk->eventType = BossEventPacket::TYPE_HEALTH_PERCENT;\n $bpk->title = $this->title;\n $bpk->healthPercent = $this->percentage;\n $bpk->unknownShort = 0;\n $bpk->color = 0;\n $bpk->overlay = 0;\n $bpk->playerEid = 0;\n $this->owner->dataPacket($bpk);\n\n $this->owner->dataPacket($bpk);\n }", "title": "" }, { "docid": "1c923d06298d1de0df8e849cce107844", "score": "0.54458827", "text": "public static function setAmountDecimals(int $amountDecimals): void\n {\n self::$amountDecimals = $amountDecimals;\n }", "title": "" }, { "docid": "87d96e300cf2db3d33ba3c7a8c68669a", "score": "0.5439588", "text": "public function calcPercent($val, $maxval)\r\n {\r\n $maxval = (float) $maxval;\r\n if (0 == $maxval) {\r\n throw new Zend_View_Exception(\"Maxval must be a non-zero value.\");\r\n }\r\n \r\n return (float) $val / $maxval * 100;\r\n }", "title": "" }, { "docid": "abc5dfd6503c5e19919393274646d23e", "score": "0.543515", "text": "public function getPricePercent()\n\t{\n\t\treturn $this->get('SalesOrPurchase PricePercent');\n\t}", "title": "" }, { "docid": "19564a7f186c9f30aa568c2adb0e66ff", "score": "0.5428881", "text": "public function addPercent(float $percent): self\n {\n return $this->addParam('percents', $percent);\n }", "title": "" }, { "docid": "f98fae6c0c5903f8f40e3a9e068b7a13", "score": "0.54241526", "text": "function generatePerc($percentage){\n\n}", "title": "" }, { "docid": "753ed49a1afdd187cc42fa8ebc81d94d", "score": "0.5410344", "text": "public function setGroupCachePercent($percent){}", "title": "" }, { "docid": "6d3bd1a5fcbddf029285ccb4c2566bb8", "score": "0.54075307", "text": "public function getTotalAttribute($value) {\n\n return round($value / 100, 2);\n\n }", "title": "" }, { "docid": "acce9ab5fd1cebb9d0682b43ad5b0e12", "score": "0.54042083", "text": "public function setCpuPercent(int $value): void\n {\n $this->body['CpuPercent'] = $value;\n }", "title": "" }, { "docid": "0c17845ca39364b705fbe5ec006263cb", "score": "0.5403038", "text": "function scaleByPercentage($size)\r\n {\r\n return $this->scaleByFactor($size / 100);\r\n }", "title": "" }, { "docid": "cc6b88d6c0c6c633ea71ca781c6720e5", "score": "0.540303", "text": "public static function percent_unit_type_class($str) {\n \n if( false !== strpos($str,'%') ) {\n return str_replace('%','pct', $str);\n } else if( false !== strpos($str,'vh') ) {\n return intval($str) . 'vh';\n } else if( false !== strpos($str,'vw') ) {\n return intval($str) . 'vw';\n } else if( 'auto' === $str ) {\n\t\t\treturn 'auto';\n\t\t}\n \n return intval($str) . 'px';\n }", "title": "" }, { "docid": "8027aed10f88b28e241316b5f70a04e5", "score": "0.53937596", "text": "public function getPercent(): float|null;", "title": "" }, { "docid": "ec3378a8529d2646fce5f00315678eb3", "score": "0.53705406", "text": "function vatPercentage()\r\n {\r\n $vatType =& $this->vatType();\r\n if ( $vatType )\r\n return $vatType->value();\r\n }", "title": "" }, { "docid": "cb27e515b478ad6fc75b7ef52a20eb46", "score": "0.53662634", "text": "public function setKortingspercentage($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (string) $v;\n }\n\n if ($this->kortingspercentage !== $v) {\n $this->kortingspercentage = $v;\n $this->modifiedColumns[] = GsArtikelenPeer::KORTINGSPERCENTAGE;\n }\n\n\n return $this;\n }", "title": "" }, { "docid": "a4009e6df2f1f0be83e767812c29af89", "score": "0.53658146", "text": "public function setPercent($percent)\n\t{\n\t\t$column = self::COL_PERCENT;\n\t\t$this->$column = $percent;\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "96d5519a80c991bdc83b390fdb17a947", "score": "0.53642005", "text": "function calculate($value)\n {\n return $value - number_format((20 * 100) / $value);\n }", "title": "" }, { "docid": "0fcf693148409fda034217879c19bb12", "score": "0.53484225", "text": "function getPercentStyle($percent) {\n \n\n if ($percent > 0) { $style = \"mt-delta-trend-up\"; }\n elseif ($percent < 0) { $style = \"mt-delta-trend-down\"; }\n else { $style = \"\"; }\n\n \n return $style;\n}", "title": "" }, { "docid": "ade3a0cc836975ee1d6f6c966292ee58", "score": "0.5347637", "text": "public function Pagar() {\n $this->setValor( ($this->getValor() / 100) * 100 - $this->getDesconto() );\n parent::Pagar();\n }", "title": "" }, { "docid": "a5bbf89954c22e481cebee83dab16415", "score": "0.5341187", "text": "function test_percentage($no_questions,$mark)\r\n{\r\n\t$percentage = (double) (($mark/$no_questions) * 100);\r\n\treturn $percentage;\r\n}", "title": "" }, { "docid": "8e7ce334dcbf9794c0011ee9e101b1da", "score": "0.53359014", "text": "public function setPercentages($var)\n {\n $arr = GPBUtil::checkMapField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING, \\Google\\Protobuf\\Internal\\GPBType::DOUBLE);\n $this->percentages = $arr;\n\n return $this;\n }", "title": "" }, { "docid": "02ee26b181c7fca0a3da95a1fababb78", "score": "0.53297395", "text": "public function setPricePercent($percent)\n\t{\n\t\t$this->remove('SalesOrPurchase Price');\n\t\t\n\t\treturn $this->set('SalesOrPurchase PricePercent', $percent);\n\t}", "title": "" }, { "docid": "34551f09a27c9f1addbcd6962ba48eef", "score": "0.53274786", "text": "public function getPercent()\n {\n return $this->scopeConfig->getValue(self::XML_PATH_PERCENT, ScopeInterface::SCOPE_STORE);\n }", "title": "" }, { "docid": "745e614ac1adef2488b4aaf3f059012b", "score": "0.53269494", "text": "public function setAmount($cents)\n {\n $this->amount = $cents;\n }", "title": "" }, { "docid": "8474f623c45f42584cc470ded781b03a", "score": "0.53244656", "text": "public function rateAsPercent($actual, $target){\n\t\tif ($actual==0) echo \"<span class=\\\"work-rate\\\">--</span>\";\n\t\telse {\n\t\t\t$pct = number_format( -1 * ($actual-$target)/$target*100, 1);\n\t\t\t$pct = sprintf(\"%+d%%\",$pct);\n\t\t\t$class = $pct > 0 ? 'important' : 'success'; \t// lower is better, takes less time\n\t\t\techo \"<span class=\\\"work-rate label label-{$class}\\\">{$pct}</span>\";\n\t\t}\t\n\t}", "title": "" }, { "docid": "a0ea44bdf907abde36a1e055b892fd6a", "score": "0.53205776", "text": "function setPercentage($percentage, $extended = FALSE) {\r\n\t\t\t//If $percentage is TRUE or FALSE, it will set the $isPercentage without setting $time to any percentage digits.\r\n\t\t\tif ($percentage === TRUE || $percentage === FALSE) {\r\n\t\t\t\t$this->isPercentage = $percentage;\r\n\t\t\t\t$this->isExtended = $extended;\r\n\t\t\t\treturn TRUE;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (!is_numeric(preg_replace('/%/', '', $percentage))) {\r\n\t\t\t\treturn FALSE; //ERROR: Percentage is not numeric!\r\n\t\t\t} else {\r\n\t\t\t\t$this->time = preg_replace('/%/', '', $percentage);\r\n\t\t\t\t$this->isPercentage = TRUE;\r\n\t\t\t\t$this->isExtended = $extended;\r\n\t\t\t\treturn TRUE;\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "a53cdc66b21df6df16651c3e74e42d50", "score": "0.5318057", "text": "function poll_get_bar_width($percent)\n{\n $percent = (int) $percent;\n $max_bar_width = sfConfig::get('app_sfPolls_bar_max_width', 400);\n return $max_bar_width / 100 * $percent;\n}", "title": "" }, { "docid": "721495c1430b5ae22e93d99a5e01bf5f", "score": "0.5302032", "text": "public function get_vat_percent()\n\t{\n\t\treturn $this->vat_percent;\n\t}", "title": "" }, { "docid": "b71d455964c8f79b93af4abce44fa1d0", "score": "0.52994204", "text": "protected function adjusted_fraction($fraction, $penalty) {\r\n return $fraction;\r\n }", "title": "" }, { "docid": "36102d707a266ecf89fe00310557cea5", "score": "0.529713", "text": "public function getPercentSign();", "title": "" }, { "docid": "3dc1346b02118c4e7d32d8f04f316449", "score": "0.5296555", "text": "public function scale($percentage);", "title": "" }, { "docid": "96731b2cf87aea55aebb972300d23897", "score": "0.52958226", "text": "public function testCheckPriceRendersCorrectlyWithAdjustFinalPriceToThisPercentageRule(): void\n {\n $priceHtml = $this->getProductPriceHtml('simple-product-tax-none');\n $this->assertFinalPrice($priceHtml, 20.50);\n $this->assertRegularPrice($priceHtml, 205.00);\n }", "title": "" }, { "docid": "9873100b7f6eb036d0e178fb611f2ae1", "score": "0.5294408", "text": "function totinterest(){\nreturn sprintf(\"%01.2f\",$this->tint);\n}", "title": "" }, { "docid": "5e279b22d207d676b370d6dbe1fe7b31", "score": "0.5289661", "text": "public function getPriceAttribute($value)\n {\n return $value / 100;\n }", "title": "" }, { "docid": "035456c4a5315e930e43fa2beb7189f5", "score": "0.52850837", "text": "function setNumberOfPages(){\n $this->pages = ceil($this->getTotal()/$this->getPerPage());\n }", "title": "" }, { "docid": "d2ccdebdb1f6b84bbda86be7e0d683a2", "score": "0.5284177", "text": "public function percentSoldOut()\n {\n return number_format(($this->ticketsSold() / $this->totalTickets()) * 100, 2);\n }", "title": "" }, { "docid": "b0373590550340bd9c15c98893cf2954", "score": "0.52789783", "text": "public function providerTestPercentages() {\n // Set up an array of test cases.\n return [\n // array(total, current, expected).\n // 1/2 is 50%.\n [2, 1, '50'],\n // Though we should never encounter a case where the current set is set\n // 0, if we did, we should get 0%.\n [3, 0, '0'],\n // 1/3 is closer to 33% than to 34%.\n [3, 1, '33'],\n // 2/3 is closer to 67% than to 66%.\n [3, 2, '67'],\n // 1/199 should round up to 1%.\n [199, 1, '1'],\n // 198/199 should round down to 99%.\n [199, 198, '99'],\n // 199/200 would have rounded up to 100%, which would give the false\n // impression of being finished, so we add another digit and should get\n // 99.5%.\n [200, 199, '99.5'],\n // The same logic holds for 1/200: we should get 0.5%.\n [200, 1, '0.5'],\n // Numbers that come out evenly, such as 50/200, should be forced to have\n // extra digits for consistency.\n [200, 50, '25.0'],\n // Regardless of number of digits we're using, 100% should always just be\n // 100%.\n [200, 200, '100'],\n // 1998/1999 should similarly round down to 99.9%.\n [1999, 1998, '99.9'],\n // 1999/2000 should add another digit and go to 99.95%.\n [2000, 1999, '99.95'],\n // 19999/20000 should add yet another digit and go to 99.995%.\n [20000, 19999, '99.995'],\n // The next five test cases simulate a batch with a single operation\n // ('total' equals 1) that takes several steps to complete. Within the\n // operation, we imagine that there are 501 items to process, and 100 are\n // completed during each step. The percentages we get back should be\n // rounded the usual way for the first few passes (i.e., 20%, 40%, etc.),\n // but for the last pass through, when 500 out of 501 items have been\n // processed, we do not want to round up to 100%, since that would\n // erroneously indicate that the processing is complete.\n ['total' => 1, 'current' => 100 / 501, '20'],\n ['total' => 1, 'current' => 200 / 501, '40'],\n ['total' => 1, 'current' => 300 / 501, '60'],\n ['total' => 1, 'current' => 400 / 501, '80'],\n ['total' => 1, 'current' => 500 / 501, '99.8'],\n ];\n }", "title": "" } ]
07af04871e98bf64aa468b4135797e00
Obtener la cantidad de jugadores registrados
[ { "docid": "85d2e3900ada3945d577605eaf975361", "score": "0.0", "text": "public function get_registered_characters_count()\n\t{\n\t\t$count = 0;\n\n\t\t$registeredClans = $this->get_registered_clans()->get();\n\n\t\tforeach ( $registeredClans as $registeredClan )\n\t\t{\n\t\t\t$clan = $registeredClan->clan()->select(array('id'))->first();\n\t\t\t$count += $clan->members()->count();\n\t\t}\n\n\t\treturn $count;\n\t}", "title": "" } ]
[ { "docid": "f822f2dc2ee02ad7a91f513d2267ab9f", "score": "0.652606", "text": "function numUsuarios(){\n\tnuevaConexionBd();\n\t$num=\"\";\n\t$consulta=\"SELECT COUNT(*) FROM USUARIOS WHERE ROL='registrado';\";\n\t$resultado=mysql_query($consulta);\n\twhile($fila=mysql_fetch_array($resultado)){\n\t\t$num=$fila[0];\n\t}\n\treturn $num;\n}", "title": "" }, { "docid": "4c903663a5184a5d26724cf3cb2adb91", "score": "0.6328564", "text": "function numregistros(){\n\n\t\treturn mysql_num_rows($this->consulta_ID);\n\t}", "title": "" }, { "docid": "82787a0c02912d346b529f0c809c08bc", "score": "0.62543666", "text": "function numregistros(){\n\t\treturn mysql_num_rows($this->consulta_ID);\n\t}", "title": "" }, { "docid": "a3fe344117b6f99688cff9a68b057a8c", "score": "0.61443615", "text": "public function countListDerivacion(){\n\n\t\t$usuario=Yii::app()->user->id_usuario;\n\n\t $connection= Yii::app()->db;\n\t\t$row=Yii::app()->db->createCommand(\"SELECT count(id_lista_derivacion) as cantidad FROM lista_derivacion WHERE usuario_origen=$usuario\")->query()->read();\n\t\treturn $row['cantidad']; \n\n\t}", "title": "" }, { "docid": "a7b16fab71d928e5352c563d40000b72", "score": "0.5969295", "text": "public function cantidad_instalaciones(){\n\t\t$query=\"SELECT count(id_instalacion) as numeroInstalaciones \n\t\t\t\tfrom instalacion\";\n\t\t$rs=mysql_query($query);\n\t\t$array=array();\n\t\twhile($fila=mysql_fetch_assoc($rs)){\n\t\t\t$array[]=$fila;\n\t\t}\n\t\t\treturn $array;\n\t\t}", "title": "" }, { "docid": "c4016d6014c543aafef0be3acd174ea0", "score": "0.5966976", "text": "public function totalUsuarios(){\n $stmt = $this->_conn->query(\"SELECT count(*) CONT FROM ge_usuario\");\n return $resultado = $stmt->fetch();\n }", "title": "" }, { "docid": "90a5703c307581bb450341b14a5b0e49", "score": "0.59612703", "text": "private function atualizaNumRegistros($sql){\r\n $this->dao = new AtaDao();\r\n $result = $this->conexao->consultaDB($sql);\r\n $this->numTotalDeRegistros = mysql_num_rows($result);\r\n }", "title": "" }, { "docid": "14ac323730b7513fe359e436f36d28c0", "score": "0.5936899", "text": "public function contarUsuarios(){\n\t\t\t$conn = $this->conexionBD();\n\t\t\t//Consulta con el metodo count() que cuenta el total de los registros\n\t\t\t$sql = \"SELECT count(*) total FROM user\";\n\t\t\t//Ejecutamos la consulta\n\t\t\t$result = $conn->query($sql);\n\t\t\t//Establecemos el array en un auxiliar\n\t\t\t$aux= $result->fetch_assoc();\n\t\t\t//Retornamos el total de registros contados\n\t\t\treturn $aux['total'];\n\t\t}", "title": "" }, { "docid": "9a29a2f23f4af2f9288114090e0b8ed1", "score": "0.5917869", "text": "function numregistros(){\r\n\t\treturn mysqli_num_rows($this->Consulta_ID);\r\n\t}", "title": "" }, { "docid": "d86ac461bdf4aa4adf10f31530c7b95f", "score": "0.58787894", "text": "function contarRegistrosMySQL() {\n\t\t\t\t\t\t\t$cnx = conectar_mysql(\"Salud\");\n\t\t\t\t\t\t\t$cons = \"SELECT COUNT(*) AS conteoMySQL FROM Salud.Usuarios\";\n\t\t\t\t\t\t\t$res = mysql_query($cons);\n\t\t\t\t\t\t\t$fila = mysql_fetch_array($res);\n\t\t\t\t\t\t\t$res = $fila['conteoMySQL'];\n\t\t\t\t\t\t\treturn $res; \t\n\t\t\t\t\t\t\n\t\t\t\t\t\t}", "title": "" }, { "docid": "78a0a41e77c4502663cb98e7915042c6", "score": "0.58477634", "text": "public function countUsers()\n {\n try\n {\n if($_SESSION['id_role']==3)\n {\n $sql = 'SELECT * FROM korisnik';\n }\n else{\n $sql = 'SELECT * FROM korisnik WHERE ID_ORGANIZACIONE_JEDINICE='.$_SESSION['id_organization'];\n }\n $query = database::Connect()->prepare($sql);\n $query->execute();\n $result = $query->fetchAll();\n return count($result);\n }\n catch(PDOException $e)\n {\n echo $e->getMessage();\n }\n }", "title": "" }, { "docid": "ee58f453ddce7691524646e7c6f8421f", "score": "0.5829475", "text": "function limit_login_reg_error_msg() {\r\n\t$msg = __('<strong>ERROR</strong>: Too many new user registrations.', 'limit-login-attempts') . ' ';\r\n\treturn limit_login_error_msg('registrations_valid', $msg);\r\n}", "title": "" }, { "docid": "a8748b0c015cbc4e7ce7bd14d8ae8a7a", "score": "0.57483333", "text": "public function cantidad() {\n $usuarioanteproyectos = array();\n try {\n $sql = 'SELECT e.idequipo ,concat( u.nombre,\" \",u.apellido ) as nombres, r.status FROM tb_anteproyecto r INNER join tb_equipo e on e.idequipo = r.idequipo INNER join tb_usuario u on u.idUsuario = e.idUsuario and r.status = 2 GROUP by r.idequipo ORDER by r.status ASC';\n $cn = DataBase::getInstancia();\n $stmp = $cn->prepare($sql);\n $stmp->execute();\n foreach ($stmp->fetchAll(PDO::FETCH_OBJ) as $obj) {\n $usuarioanteproyectos[] = new UsuarioAnteproyecto($obj->idequipo, $obj->nombres, $obj->status);\n }\n } catch (PDOException $ex) {\n echo $ex->getMessage();\n }\n return $usuarioanteproyectos;\n }", "title": "" }, { "docid": "67be342cf3a42373ae47606b67cfd6a7", "score": "0.57475877", "text": "function tot_homi_caroni_mes_ant() {\n\t\t//include_once 'connections/guayana_s.php';\n\t\t$conexion=new Conexion();\n\t\t$db=$conexion->getDbConn();\n\t\t$db->debug = false;\n\t\t$db->SetFetchMode(ADODB_FETCH_ASSOC);\n\t\t$muni_id = 3;\n\t\t$delito_deta = 7;\n\n\t\t$mes = mes_act();\n\n\t\t$query_sucesos = $db->Prepare(\"SELECT COUNT(fecha_suceso) AS tot_car_homi_mes_ant\n\t\t\tFROM sucesos AS s\n\t\t\tWHERE YEAR(fecha_suceso) = YEAR(now()) AND MONTH(fecha_suceso) = MONTH(DATE_ADD(CURDATE(),INTERVAL -1 MONTH))\n\t\t\tAND municipio_id = $muni_id AND delito_detalle_id = 7\");\n\n\t\t//solo mes 1\n\t\tif ($mes==1){\n\t\t\t$query_sucesos = $db->Prepare(\"SELECT COUNT(fecha_suceso) AS tot_car_homi_mes_ant\n\t\t\tFROM sucesos AS s\n\t\t\tWHERE YEAR(fecha_suceso) = YEAR(now())-1 AND MONTH(fecha_suceso) = MONTH(DATE_ADD(CURDATE(),INTERVAL -1 MONTH))\n\t\t\tAND municipio_id = $muni_id AND delito_detalle_id = $delito_deta\");\n\n\t\t}\n\t\t//San Felix\n\t\t$query_homici_mes_ant_sf = $db->Prepare(\"SELECT count(*) AS acu_mes_ant_sf\n\t\t\tFROM `sucesos` AS s\n\t\t\tINNER JOIN parroquias AS p ON s.parroquia_id = p.parroquia_id\n\t\t\tWHERE year(fecha_suceso) =year(now()) AND MONTH(fecha_suceso)=(Month(now())-1)\n\t\t\tAND s.municipio_id = $muni_id AND delito_detalle_id = $delito_deta AND capital_sector = 'sf'\");\n\n\t\t//solo mes 1\n\t\tif ($mes==1){\n\t\t\t$query_homici_mes_ant_sf = $db->Prepare(\"SELECT count(*) AS acu_mes_ant_sf\n\t\t\tFROM `sucesos` AS s\n\t\t\tINNER JOIN parroquias AS p ON s.parroquia_id = p.parroquia_id\n\t\t\tWHERE YEAR(fecha_suceso) = YEAR(now())-1 AND MONTH(fecha_suceso) = MONTH(DATE_ADD(CURDATE(),INTERVAL -1 MONTH))\n\t\t\tAND s.municipio_id = $muni_id AND delito_detalle_id = $delito_deta AND capital_sector = 'sf'\");\n\n\t\t}\n\t\t//Puerto Ordaz\n\t\t$query_homici_mes_ant_poz = $db->Prepare(\"SELECT count(*) AS acu_mes_ant_poz\n\t\t\tFROM `sucesos` AS s\n\t\t\tINNER JOIN parroquias AS p ON s.parroquia_id = p.parroquia_id\n\t\t\tWHERE year(fecha_suceso) =year(now()) AND MONTH(fecha_suceso)=(Month(now())-1)\n\t\t\tAND s.municipio_id = $muni_id AND delito_detalle_id = $delito_deta AND capital_sector = 'poz'\");\n\n\t\t//solo mes 1\n\t\tif ($mes==1){\n\t\t\t$query_homici_mes_ant_poz = $db->Prepare(\"SELECT count(*) AS acu_mes_ant_poz\n\t\t\tFROM `sucesos` AS s\n\t\t\tINNER JOIN parroquias AS p ON s.parroquia_id = p.parroquia_id\n\t\t\tWHERE YEAR(fecha_suceso) = YEAR(now())-1 AND MONTH(fecha_suceso) = MONTH(DATE_ADD(CURDATE(),INTERVAL -1 MONTH))\n\t\t\tAND s.municipio_id = $muni_id AND delito_detalle_id = $delito_deta AND capital_sector = 'poz'\");\n\n\t\t}\n\n\t\t$rs_sucesos = $db->Execute($query_sucesos);\n\t\t//4-1-17, devuelve varias campos tipo endpoint, en un array, para no tener q llamar varias funciones\n\t\t$rs_homici_mes_ant_sf = $db->Execute($query_homici_mes_ant_sf);\n\t\t$rs_homici_mes_ant_poz = $db->Execute($query_homici_mes_ant_poz);\n\t\t\n\n\t\t$homi_car_mes_ant = $rs_sucesos->Fields('tot_car_homi_mes_ant');\n\t\t$homi_car_mes_ant_sf = $rs_homici_mes_ant_sf->Fields('acu_mes_ant_sf');\n\t\t$homi_car_mes_ant_poz = $rs_homici_mes_ant_poz->Fields('acu_mes_ant_poz');\n\t\treturn array($homi_car_mes_ant,$homi_car_mes_ant_sf,$homi_car_mes_ant_poz);\n\t\t//return $homi_car_mes_ant;\n\t}", "title": "" }, { "docid": "568cc5a07b02dac40c4f0dff706bdf73", "score": "0.57464683", "text": "function tot_homi_caroni_mes() {\n\t\tinclude_once 'connections/guayana_s.php';\n\t\t$conexion=new Conexion();\n\t\t$db=$conexion->getDbConn();\n\t\t$db->debug = false;\n\t\t$db->SetFetchMode(ADODB_FETCH_ASSOC);\n\t\t$muni_id = 3;\n\t\t$delito_deta = 7;\n\t\t$query_sucesos = $db->Prepare(\"SELECT COUNT(fecha_suceso) AS tot_homi_me, YEAR(now()) AS an, MONTH(now()) AS me\n\t\t\tFROM sucesos AS s\n\t\t\tWHERE YEAR(fecha_suceso) = YEAR(now()) AND MONTH(fecha_suceso) = MONTH(now()) AND municipio_id = $municipio_id AND delito_detalle_id = $delito_deta\");\n\t\t$rs_sucesos = $db->Execute($query_sucesos);\n\t\t$i = 0;\n\t\t$sucesos = array();\n\t\tforeach ($rs_sucesos as $suceso) {\n\t\t\t$sucesos[$i][1] = $suceso['tot_homi_me'];\n\t\t\t$sucesos[$i][2] = $suceso['an'];\n\t\t\t$sucesos[$i][3] = $suceso['me'];\n\t\t\t$i++;\n\t\t}\n\t\t//$sucesos[$i][\"tot_homi_mes\"] = $rs_sucesos->Fields('tot_homi_me');\n\t\t//$sucesos[$i][\"ano\"] = $rs_sucesos->Fields('an');\n\t\t//$sucesos[$i][\"mes\"] = $rs_sucesos->Fields('me');\n\n\t\treturn $sucesos;\n\t}", "title": "" }, { "docid": "07d16ff269898750e4c4652871ce6ebc", "score": "0.573505", "text": "function getMaxIdBoletosAvulsos(){\n\t\t\t// Monta a query\n\t\t\t$consulta = mysql_query(\"SELECT id FROM `boletos_registrados` ORDER BY id DESC LIMIT 0,1\");\n\t\t\t\n\t\t\t// Pega o ultimo id do boleto.\n\t\t\t$id = mysql_fetch_array($consulta);\n\t\t\t\n\t\t\t// Retorna o proximo numero para gerar o boleto.\n\t\t\treturn $id['id'] + 1;\t\t\t\n\t\t\t\n\t\t\t// Este código foi comentado para evitar erro que excluir o boleto e ele sobre escrever o ultimo boleto avulso. \n\t\t\t//$consulta = mysql_query(\"SELECT id FROM `boletos_registrados` \");\n\t\t\t//return mysql_num_rows($consulta) + 1;\n\t\t}", "title": "" }, { "docid": "6efdcf4d9fbcf40ddfaf92e9eebc5f73", "score": "0.5717163", "text": "public static function obtenerCantidadClientes(){\n try {\n $conexion = new Conexion();\n $sql = \"SELECT count(*) as cantidad FROM \".self::TABLA.\" WHERE estado = 1\";\n $consulta = $conexion->prepare($sql);\n $consulta->execute();\n $registros = $consulta->fetch();\n return $registros;\n } catch (Exception $e) {\n }\n }", "title": "" }, { "docid": "7642add593562aa79a41b92ed00d34fc", "score": "0.57034695", "text": "public function getnumregistros($_ID_cuestionario){\n\t\t$realizado=$this->db->select(\"count(*) as numero\")->where(\"IDCuestionario='$_ID_cuestionario'\")->get(\"tbcalificaciones\");\n\t\treturn (int)$realizado->row_array()[\"numero\"];\n\t}", "title": "" }, { "docid": "5890617e6cd5a838c04d39bc6128ac52", "score": "0.5694884", "text": "public function countRecetas(){\n $result=$this->getAllRecetas();\n $recetas=[];\n while(($receta=mysqli_fetch_array($result))){\n array_push($recetas, $receta[nombre]);\n }\n return count($recetas);\n }", "title": "" }, { "docid": "c82bbebc6518dd00ed92c70c9cb43e71", "score": "0.5689478", "text": "function numNoticias(){\n\tnuevaConexionBd();\n\t$num=\"\";\n\t$consulta=\"SELECT COUNT(*) FROM NOTICIAS;\";\n\t$resultado=mysql_query($consulta);\n\twhile($fila=mysql_fetch_array($resultado)){\n\t\t$num=$fila[0];\n\t}\n\treturn $num;\n}", "title": "" }, { "docid": "02769568a5f3260ff6a04589654cde58", "score": "0.5672055", "text": "public function total_registros()\n {\n $tmp = @mysqli_num_rows($this->result);\n return ($tmp);\n }", "title": "" }, { "docid": "1fb08c474be927ad313a2df6f6d599a0", "score": "0.5656009", "text": "public static function getCountAllTblclientesRegistrados(){ \n\t\t$invitado=1;\n\t\t$check = \"SELECT COUNT(*) FROM tblcliente WHERE tbltipocliente_idtbltipocliente= ? \";\n\n\t\ttry{\n\t\t\t$resultado = ConexionDB::getInstance()->getDb()->prepare($check);\n\t\t\t$resultado->bindParam(1,$invitado,PDO::PARAM_INT);\t\t\t\n\t\t\t$resultado->execute();\n\t\t\treturn $resultado->fetchColumn(); //retorna el numero de count\n\t\t}catch(PDOException $e){\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "f859e813fbb73e9228f9dba1c8bc1a6f", "score": "0.56491977", "text": "public function getCantidadTransacciones() {\r\n $q = \"SELECT * FROM transaction WHERE completed=1 and user_id=\" . $this->getId();\r\n $query = Doctrine_Query::create()->query($q);\r\n $transacciones = $query->toArray();\r\n\r\n $cantidad = count($transacciones);\r\n\r\n // $q = \"SELECT * FROM transaction t, car c WHERE t.completed=1 and c.id=t.car and t.user_id=\".$this->getId();\r\n // $query = Doctrine_Query::create()->query($q);\r\n// $transacciones = $query->toArray();\r\n\r\n\r\n $q = Doctrine_Manager::getInstance()->getCurrentConnection();\r\n $query = \"SELECT t.id FROM Transaction t left join Reserve r on t.reserve_id=r.id inner join Car c on r.car_id=c.id WHERE c.user_id=\" . $this->getId() . \" and t.completed='1'\";\r\n $stmt = $q->prepare($query);\r\n $stmt->execute();\r\n $transacciones = $stmt->fetchAll();\r\n\r\n\r\n $cantidad+= count($transacciones);\r\n\r\n return $cantidad;\r\n }", "title": "" }, { "docid": "4bbcecb6b0a3cf6e27be8b6bce55ddd5", "score": "0.5640282", "text": "public function countMouvement(){\n\t\t\t\t\t return count($this->listeMouvement());\n\t\t\t\t\t }", "title": "" }, { "docid": "bc69f810435863c0d150e087775b27ea", "score": "0.56264615", "text": "public function getAttendeesNeededForPossibleMaximumReturnsACorrectIntegerWhenAnyRegistrationsArePresent() {\n $this->subject->setMaximumAttendanceEnabled(TRUE);\n $this->subject->setMaximumAttendance(4);\n \n $registration = new \\NIMIUS\\Workshops\\Domain\\Model\\Registration;\n $this->subject->addRegistration($registration);\n \n $this->assertEquals(3, $this->subject->getAttendeesNeededForPossibleMaximum());\n }", "title": "" }, { "docid": "a69cc142809de878072a47e88919dc9c", "score": "0.5613597", "text": "public function getTotalInstitutes()\n {\n $query = (new \\yii\\db\\Query())\n ->select('instituto.id')\n ->leftJoin('grupo', 'instituto.id = grupo.instituto_id')\n ->from('instituto')\n ->where([\n 'instituto.status' => $this->instituteStatus,\n 'instituto.borrado' => 0,\n 'instituto.pruebas' => 0,\n 'grupo.status' => 1,\n 'grupo.ciclo_escolar_id' => $this->schoolYear,\n ])\n ->groupBy('instituto.id');\n if (isset($this->program)) {\n $query->andWhere(['instituto.programa_id' => $this->program]);\n }\n return $query->count();\n }", "title": "" }, { "docid": "7865f102c64ba5388a3796ab7144643f", "score": "0.56062037", "text": "function jugadas_cantidad(){\r\n\t\t//$_SESSION['cmapd']=numero_registros(\"select idventa from ventas where idtaquilla='\".$_SESSION['datos']['idtaquilla'].\"' and fecha='\".date('Y-m-d').\"' and cantidad_apuesta='1'\");\r\n\t\t$_SESSION['cmapd']=numero_registros(\"select sum(total_ganar) as acum from ventas where idtaquilla='\".$_SESSION['datos']['idtaquilla'].\"' and fecha='\".date('Y-m-d').\"' and cantidad_apuesta='1'\");\r\n\t\t\r\n\t\t//calculo para logros a partir de dos hasta diez\r\n\t\tfor($r=2;$r<11;$r++){\r\n\t\t\t//$_SESSION['cma'.$r]=numero_registros(\"select idventa from ventas where idtaquilla='\".$_SESSION['datos']['idtaquilla'].\"' and fecha='\".date('Y-m-d').\"' and cantidad_apuesta='\".$r.\"'\");\r\n\t\t\t$_SESSION['cma'.$r]=numero_registros(\"select sum(total_ganar) as acum from ventas where idtaquilla='\".$_SESSION['datos']['idtaquilla'].\"' and fecha='\".date('Y-m-d').\"' and cantidad_apuesta='\".$r.\"'\");\r\n\t\t}\r\n\t\t/*$_SESSION['cdpp']=numero_registros(\"select idventa from ventas where idtaquilla='\".$_SESSION['datos']['idtaquilla'].\"' and fecha='\".date('Y-m-d').\"' and cantidad_apuesta>'1'\");\r\n\t\t$_SESSION['cdpd']=numero_registros(\"select idventa from ventas where idtaquilla='\".$_SESSION['datos']['idtaquilla'].\"' and fecha='\".date('Y-m-d').\"' and cantidad_apuesta='1'\");*/\r\n\t\t\r\n\t\t$_SESSION['cdpp']=suma_registros(\"select sum(apuesta) as acum from ventas where idtaquilla='\".$_SESSION['datos']['idtaquilla'].\"' and fecha='\".date('Y-m-d').\"' and cantidad_apuesta>'1'\");\r\n\t\t$_SESSION['cdpd']=suma_registros(\"select sum(apuesta) as acum from ventas where idtaquilla='\".$_SESSION['datos']['idtaquilla'].\"' and fecha='\".date('Y-m-d').\"' and cantidad_apuesta='1'\");\r\n\t\t\r\n\t}", "title": "" }, { "docid": "1d79e2a7e8cb12067c244f928deb47e7", "score": "0.55980176", "text": "public function traer_cant_hijos($id_padre){\n $query = \"SELECT count(*) as cantidad FROM herencia WHERE padre = \".$id_padre;\n $result = $this->db->getData($query);\n if(count($result)>0){\n return $result[0][\"cantidad\"];\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "b07c1add683a377e518a84f81d8ec40e", "score": "0.5586012", "text": "public function number_of_registrants_last($params)\n {\n if ((!$params['days']) || (!is_numeric($params['days']))) {\n $days = 1;\n } else {\n $days = $params['days'];\n }\n return $this->_get_user_count($days);\n }", "title": "" }, { "docid": "f9b89232af01c5729eaceada28060d7b", "score": "0.5570139", "text": "public function countMentors()\n {\n return $this->doctrine->getRepository('UserBundle:User')->countMentorTotal();\n }", "title": "" }, { "docid": "893867a42e51d35dc9d831eadb6f56e8", "score": "0.5557403", "text": "public function primeiroDados()\n {\n $this->registro = 1;\n }", "title": "" }, { "docid": "84cf30b1d619062256a7aedfdcda2608", "score": "0.55557024", "text": "function numVentas(){\n\tnuevaConexionBd();\n\t$num=\"\";\n\t$consulta=\"SELECT COUNT(*) FROM VENTAS GROUP BY FECHA_HORA;\";\n\t$resultado=mysql_query($consulta);\n\t$num=mysql_num_rows($resultado);\n\treturn $num;\n}", "title": "" }, { "docid": "16ffd71efa5b74a3e33cdb1ba1782df2", "score": "0.55554885", "text": "function contarRegistros($datos_comic_personaje_id){\n\t\t//$pedido = 1 -> Resueltos\n\t\t//$pedido = 2 -> Cancelados\n\t\t$queryCount \t= \"SELECT COUNT(*) FROM datos_comics WHERE datos_comic_personaje_id = $datos_comic_personaje_id\";\n\t\t$resultado \t\t= mysql_query($queryCount);\n\t\t$numero_pedidos = mysql_result($resultado, 0);\n\n\t\treturn $numero_pedidos;\n\n\t}", "title": "" }, { "docid": "c183563b7e97463a64651ceb29773989", "score": "0.5552676", "text": "function cantidad($can,$id,$tipo){\n $u = date(\"Y-m-d\", mktime(0, 0, 0, $can+1, 1, date(\"Y\")));\n $e = date(\"Y-m-d\", mktime(0, 0, 0, $can, 1, date(\"Y\")));\n if($tipo==\"ventas\")\n $lsjfl = ventasxalum($id,$e,$u);\n if($tipo==\"compras\")\n $lsjfl = comprasxalum($id,$e,$u);\n if($tipo==\"publicaciones\")\n $lsjfl = publicacionesxalum($id,$e,$u);\n settype($lsjfl, \"integer\");\n return $lsjfl;\n}", "title": "" }, { "docid": "4429f40ed2a79a6f44c19bca2be2e1a6", "score": "0.5531655", "text": "public function contarUsuariosConectados(){\n\t\t\t$conn = $this->conexionBD();\n\t\t\t//Consulta con el metodo count() que cuenta el total de los registros\n\t\t\t$sql = \"SELECT count(*) total FROM user WHERE status_id=1\";\n\t\t\t//Ejecutamos la consulta\n\t\t\t$result = $conn->query($sql);\n\t\t\t//Establecemos el array en un auxiliar\n\t\t\t$aux= $result->fetch_assoc();\n\t\t\t//Retornamos el total de registros contados\n\t\t\treturn $aux['total'];\n\t\t}", "title": "" }, { "docid": "8917730d73935175aeb57f517e65a167", "score": "0.553144", "text": "function getUserAttemptsCount(): int\n{\n return ATTEMPTS;\n}", "title": "" }, { "docid": "4d8778610bab1305b981946de8fab8b8", "score": "0.55210775", "text": "public function create() {\n $total_registros=Autor::where('estado',1)->count();\n return $total_registros;\n\t}", "title": "" }, { "docid": "e9aaf624a0e4534e3389b3caee5a8e6a", "score": "0.55155087", "text": "public function getMonthlyUserCountEvolution()\n {\n $nbUser = array();\n for ($i = 0; $i <= 11; $i++) {\n $date = new \\DateTime('now');\n $date->modify('-' . $i . ' month');\n $query = $this->getEntityManager()\n ->createQuery(\"SELECT COUNT(u) FROM IMRIMLmsBundle:User u WHERE u.creationTime < :creationTime\");\n $query->setParameter('creationTime', $date);\n $nbUser[12 - $i] = array(\n 'nb' => $query->getSingleScalarResult(),\n 'date' => $date->format('m-Y'),\n );\n }\n return $nbUser;\n }", "title": "" }, { "docid": "4081d3b56077e2189fdd3222d2636cbe", "score": "0.55012226", "text": "public function getCountSeguindo()\n\t{\n\t\t$query = \"SELECT COUNT(*) AS total_seguindo FROM usuarios_seguidores WHERE id_usuario = :id_usuario\";\n\t\t$stmt = $this->db->prepare($query);\n\t\t$stmt->bindValue(':id_usuario', $this->__get('id'));\n\t\t$stmt->execute();\n\n\t\treturn $stmt->fetch(\\PDO::FETCH_ASSOC);\n\t}", "title": "" }, { "docid": "ebe6f6449640b9a3bb2d54c7fb9e5e22", "score": "0.5500251", "text": "public function nexitos(){\n if(count($this->nregistros()) >0 ){\n return ImportLogCargamasiva::find()->\n where(['level'=>'1','user_id'=>h::userId()])->count();\n }else{\n return 0;\n }\n }", "title": "" }, { "docid": "56e7ada1da9a6280d09c26cfcbcf247d", "score": "0.5499252", "text": "function getGerarNossoNumeroBoletoMensalidadeSegundaVia(){\n\t\t\t$consulta = mysql_query(\"SELECT * FROM boletos_registrados WHERE nosso_numero LIKE '%\".$this->getid_historico().\"%' \");\n\t\t\t$via = mysql_num_rows($consulta);\n\t\t\tif( $via > 5)\n\t\t\t\t$via = 5;\n\t\t\treturn str_pad($via.str_pad( $this->getid_historico() , 5 , \"0\" , STR_PAD_LEFT ), 10 , \"0\" , STR_PAD_RIGHT );\t\n\t\t}", "title": "" }, { "docid": "88b662ddf961434b2b792b19455804b8", "score": "0.5495482", "text": "function verification0(){\r\n \tglobal $bd;\r\n\r\n \t$rst = $bd->query(\"SELECT COUNT(*) as nbre FROM facture \");\r\n \t$data = $rst->fetch();\r\n \treturn $data['nbre'];\r\n }", "title": "" }, { "docid": "7e3ed45501301eeab6eb1f0742ecfdad", "score": "0.5488921", "text": "function cantidad($r)\n{\n\treturn @mysql_num_rows($r); \n}", "title": "" }, { "docid": "83642e40a34f1d8c893a9581bd1e65ea", "score": "0.5487939", "text": "function getMaxIdBoletosCertificados(){\n\t\t\t$consulta = mysql_query(\"SELECT id FROM `boletos_registrados` ORDER BY id DESC LIMIT 0,1\");\n\t\t\t\n\t\t\t// Pega o ultimo id do boleto.\n\t\t\t$id = mysql_fetch_array($consulta);\n\t\t\t\n\t\t\t// Retorna o proximo numero para gerar o boleto.\n\t\t\treturn $id['id'] + 1;\n\t\t}", "title": "" }, { "docid": "85075362fbe30c49c0cfcb596b8fa2e4", "score": "0.548434", "text": "function f_get_cod_empresa(){\n\t\t\tglobal $db;\n\n\t\t\t$query = \"select count(*) as num, cod_empresa from seg_empresa group by cod_empresa\";\n\t\t\t\n\t\t\t$row = $db->consultar_registro($query);\n\n\t\t\t$num_registros = $row['num'];\n\n\t\t\tif($num_registros>0){\n\t\t\t\treturn $row['cod_empresa'];\n\t\t\t}else return false;\n\t\t}", "title": "" }, { "docid": "2b2a18a2899c68c7a1930daf945590e1", "score": "0.5483538", "text": "public function obtenerCantidad() {\n return $this->cant;\n }", "title": "" }, { "docid": "26c17d65e7e774ebcc9085a5c7715980", "score": "0.5481229", "text": "function nbre_colonnes_tab_edt(){\r\n\t//global $compter_colonnes;\r\n\t$compter_colonnes = mysqli_query($GLOBALS[\"mysqli\"], \"SELECT jour_horaire_etablissement FROM horaires_etablissement\");\r\n\t$nbre_colonnes = (mysqli_num_rows($compter_colonnes)) + 1;\r\n\treturn $nbre_colonnes;\r\n}", "title": "" }, { "docid": "34cda6284b55fc35d170aff578d1acb8", "score": "0.5477465", "text": "function totalConsultar() {\n\t\t\t\t\t\t\t$miConexionBd = new ConexionBd();\n\t\t\t\t\t\t\t$datos = $this->getDatos();\n\t\t\t\t\t\t\t$strWhere = \"1=1\";\n\t\t\t\t\t\t\tforeach ($datos as $campo=>$valor) {\n\t\t\t\t\t\t\t\tif (comprobarVar($valor)) {\n\t\t\t\t\t\t\t\t\t$strWhere .= \" AND $campo = '\".strMayus($valor).\"'\";\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$resultado = $miConexionBd->hacerSelect(\"COUNT(*) AS cantidad\",\n\t\t\t\t\t\t\t\"usuario\",$strWhere);\n\t\t\t\t\t\t\treturn comprobarVar($resultado[0]['cantidad']) ?\n\t\t\t\t\t\t\tintval($resultado[0]['cantidad']) : 0;\n\t\t\t\t\t\t}", "title": "" }, { "docid": "2f853bf115e5642eab0a70daee616c49", "score": "0.5464137", "text": "public function buscar( ) {\n\t\t$sql = \"SELECT\n\t\t\t\t\tCOUNT( idtrabajodegrado ) as existe\n\t\t\t\tFROM\n\t\t\t\t\ttrabajodegrado\n\t\t\t\tWHERE\n\t\t\t\t\tcodigoestudiante = ?\n\t\t\t\tAND codigoestado LIKE '1%'\";\n\t\t$this->persistencia->crearSentenciaSQL( $sql );\n\t\t$this->persistencia->setParametro( 0 , $this->getEstudiante( )->getCodigoEstudiante( ) , false );\n\t\t$this->persistencia->ejecutarConsulta( );\n\t\tif( $this->persistencia->getNext( ) ){\n\t\t\treturn $this->persistencia->getParametro( \"existe\" );\n\t\t}\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "37c0e13c4ba6ae25d2e60c1ed9ef2fe3", "score": "0.544502", "text": "function numActores(){\n\tnuevaConexionBd();\n\t$num=\"\";\n\t$consulta=\"SELECT COUNT(*) FROM ACTORES;\";\n\t$resultado=mysql_query($consulta);\n\twhile($fila=mysql_fetch_array($resultado)){\n\t\t$num=$fila[0];\n\t}\n\treturn $num;\n}", "title": "" }, { "docid": "5303b77e6bdddf5ca4748a686ba3c7bd", "score": "0.5442965", "text": "public function count(){\n return count($this->_aRegisters);\n }", "title": "" }, { "docid": "6a7ef7803cded465ec3bb749ee02e049", "score": "0.5434889", "text": "function enseignements_prof($login_prof, $rep){\r\n\r\n\t$req = mysqli_query($GLOBALS[\"mysqli\"], \"SELECT id_groupe FROM j_groupes_professeurs WHERE login ='\".$login_prof.\"'\");\r\n\t$enseignements_prof_num = mysqli_num_rows($req);\r\n\r\n\tif ($rep === 1) {\r\n\t\t// on renvoie alors le nombre d'enseignements\r\n\t\treturn $enseignements_prof_num;\r\n\t} else {\r\n\t\t$result = array();\r\n\t\twhile($enseignements_prof = mysqli_fetch_array($req)) {\r\n\t\t\t// on renvoie alors la liste des enseignements\r\n\t\t\t$result[] = $enseignements_prof;\r\n\t\t}\r\n\t\treturn $result;\r\n\t}\r\n}", "title": "" }, { "docid": "74611be3432a882415f2d8bc03c01f54", "score": "0.54319304", "text": "public function numcuestionarios($_ID_Empresa){\n\t\t$respuesta=$this->db->select(\"count(*) as numcuestionarios\")->where(\"IDEmpresa='$_ID_Empresa'\")->get(\"cuestionario\");\n\t\treturn $respuesta->row();\n\t}", "title": "" }, { "docid": "e06ab3cc080bc9101a59480d882107da", "score": "0.54299366", "text": "public function cantidad_asi(){\n\t\t$query=\"SELECT count(id_instalacion) as numeroAsi from instalacion where estado='a'\";\n\t\t$rs=mysql_query($query);\n\t\t$array=array();\n\t\twhile($fila=mysql_fetch_assoc($rs)){\n\t\t\t$array[]=$fila;\n\t\t}\n\t\t\treturn $array;\n\t\t}", "title": "" }, { "docid": "cdd9637afaa4be2e859ea39652891185", "score": "0.5427425", "text": "public function CountGejala()\n {\n $query = $this->db->get('tbl_gejala');\n if ($query->num_rows() > 0) {\n return $query->num_rows();\n } else {\n return 0;\n }\n }", "title": "" }, { "docid": "aebc014201b8e1181891f002753da6f0", "score": "0.5426326", "text": "public function numTotalDeRegistros(){\r\n return $this->numTotalDeRegistros;\r\n }", "title": "" }, { "docid": "865b1f04dd3929e8514778a0b955a824", "score": "0.54243374", "text": "public function CountKerusakan()\n {\n $query = $this->db->get('tbl_kerusakan');\n if ($query->num_rows() > 0) {\n return $query->num_rows();\n } else {\n return 0;\n }\n }", "title": "" }, { "docid": "2ccb9f2255e3583db6f976501455b74f", "score": "0.5422855", "text": "public function findUserCount();", "title": "" }, { "docid": "05c81abab229e099d329713448a9113d", "score": "0.5418733", "text": "public function count($criterio=\"\"){\n\t\t$sql = 'SELECT COUNT(id) AS qtd FROM grupo_usuario_menus '.$criterio.'';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$rs=$this->execute($sqlQuery);\n return $rs[0][\"qtd\"];\n\t}", "title": "" }, { "docid": "a622422f49ee29aba590cee124e306d5", "score": "0.54152167", "text": "public function contarUsuariosDesconectados(){\n\t\t\t$conn = $this->conexionBD();\n\t\t\t//Consulta con el metodo count() que cuenta el total de los registros\n\t\t\t$sql = \"SELECT count(*) total FROM user WHERE status_id=2\";\n\t\t\t//Ejecutamos la consulta\n\t\t\t$result = $conn->query($sql);\n\t\t\t//Establecemos el array en un auxiliar\n\t\t\t$aux= $result->fetch_assoc();\n\t\t\t//Retornamos el total de registros contados\n\t\t\treturn $aux['total'];\n\t\t}", "title": "" }, { "docid": "53f34737b4f958e2bf8ef50b807e5dd9", "score": "0.5413715", "text": "function numPeliculas(){\n\tnuevaConexionBd();\n\t$num=\"\";\n\t$consulta=\"SELECT COUNT(*) FROM PELICULAS;\";\n\t$resultado=mysql_query($consulta);\n\twhile($fila=mysql_fetch_array($resultado)){\n\t\t$num=$fila[0];\n\t}\n\treturn $num;\n}", "title": "" }, { "docid": "27c27f921e3a85526dbb7eba1bcf8c5d", "score": "0.5407446", "text": "static function nbErreurs() {\r\n if (!isset($_REQUEST['erreurs'])) {\r\n return 0;\r\n } else {\r\n return count($_REQUEST['erreurs']);\r\n }\r\n }", "title": "" }, { "docid": "db97a1a5aafcb486a21df24cdfa18a48", "score": "0.5406854", "text": "public function nbListesPub() : int\n {\n $query='SELECT COUNT(*) FROM liste WHERE privee=:priv';\n $this->co->executeQuery($query,array(':priv' => array('NON',PDO::PARAM_STR)));\n $resultats=$this->co->getResultats();\n return $resultats[0]['COUNT(*)'];\n }", "title": "" }, { "docid": "2ac4b25127ca9913361a4db8e454f77b", "score": "0.54032856", "text": "public function cantidad_fin(){\n\t\t$query=\"SELECT count(id_instalacion) as numeroFin from instalacion where estado='f'\";\n\t\t$rs=mysql_query($query);\n\t\t$array=array();\n\t\twhile($fila=mysql_fetch_assoc($rs)){\n\t\t\t$array[]=$fila;\n\t\t}\n\t\t\treturn $array;\n\t\t}", "title": "" }, { "docid": "fd1a0e0f60e0e74a2a2083371a941c4c", "score": "0.540098", "text": "function NumeroDeRegistros(){\r\n //creamos el objeto $con a partir de la clase ConexionBD\r\n $con = new ConexionBD;\r\n //usamos el metodo conectar para realizar la conexion\r\n if($con->conectar()==true){\r\n $query = \"SELECT * FROM lab_antibioticos \";\r\n\t $numreg = pg_num_rows(pg_query($query));\r\n\t if (!$numreg )\r\n\t return false;\r\n\t else\r\n\t return $numreg ;\r\n }\r\n}", "title": "" }, { "docid": "56460a37556344f8fca1894587378359", "score": "0.53960466", "text": "public function countFiche_de_jours_ferier(){\n\t\t\t\t\t return count($this->listeFiche_de_jours_ferier());\n\t\t\t\t\t }", "title": "" }, { "docid": "e71fef82afbfe770c6411cf8fcdf55e0", "score": "0.5395013", "text": "public function getCountSpekunDipinjam()\n\t\t{\n\t\t\t$query = $this->db->query('SELECT * FROM PEMINJAMAN WHERE Status IS NULL');\n\t\t\treturn $query->num_rows();\n\t\t}", "title": "" }, { "docid": "d60df22dd62bf6913117a7e5ffd5865b", "score": "0.5392038", "text": "function getTotalSeguimiento()\n\t{\t\n\n\t\t$query = $this->db->get('seguimiento');\n\t\treturn $query->num_rows();\n\t}", "title": "" }, { "docid": "46c3f82bfce985aa0c986c29fec884b6", "score": "0.5391869", "text": "public static function countUsers(){\n // Connection à la base de donnees\n $bdd = new DatabaseConnector('root','root.mysql.db', 'root','password');\n\n $req = $req = $bdd->getDb()->query(\"SELECT COUNT(id) FROM admins\");\n return $req->fetch();\n }", "title": "" }, { "docid": "5c5f3b16d717bcba493c215608a9f08e", "score": "0.5383918", "text": "public function count() {\n $sql = \"SELECT COUNT(*) FROM orden;\";\n $resultado = mysql_query($sql);\n if($resultado){\n $resultado = mysql_fetch_row($resultado);\n return $resultado[0];\n } else {\n return 0;\n }\n }", "title": "" }, { "docid": "6887e4aa19bb45e8195bc46963d78d2c", "score": "0.5377668", "text": "function nr_echipe($username) {\n $query=\"select count(*) from echipe where apartinator='$username';\";\n $nr_echipe=numarare($query);\n return $nr_echipe;\n}", "title": "" }, { "docid": "3a905035ae04be270fb54b38979f54d4", "score": "0.5355632", "text": "public function countType_projet(){\n\t\t\t\t\t return count($this->listeType_projet());\n\t\t\t\t\t }", "title": "" }, { "docid": "995b624ce2b16e9cb66fb591d821d979", "score": "0.53467184", "text": "public function getNewuserCount()//for all pending quires\n\t\t{\n\t\t\t\n\t\t\t\t$this->load->model('admin/Users_model', 'users');\n\t\t\t\t$data['queryCount'] = $this->users->getNuCount();\n\t\t\t\techo $data['queryCount'];\n\t\t\t\n\t\t}", "title": "" }, { "docid": "720a1577bfd02006a2d082de7831fd9b", "score": "0.5344572", "text": "function countSession($numSession){\n\t$db = gestionnaireDeConnexionMysqli();\n\tif ($db != NULL) {\n\t\t$req\t\t = \"SELECT COUNT(idUtilisateur) AS nbInscrit FROM sinscrire WHERE numSession = $numSession;\";\n\t\t$exec_requete = mysqli_query($db, $req);\n\t\t$count\t\t = mysqli_fetch_array($exec_requete, MYSQLI_ASSOC);\n\t}else {\n\t\techo \"Une erreur est survenue.\";\n\t}\n\treturn $count;\n}", "title": "" }, { "docid": "8b4e84036739284b0be43965bf17f17c", "score": "0.53365487", "text": "function bukutidaklaris($con,$maksimal){\n\t\treturn mysqli_query($con,\"SELECT id_buku,COUNT(id_peminjaman) as jumpembuku from buku left join peminjaman on peminjaman.id_buku_peminjaman=buku.id_buku group by id_buku having count(id_peminjaman)<=$maksimal order by jumpembuku desc \");\n\t}", "title": "" }, { "docid": "bf38682788ee5730044c1e674be261de", "score": "0.5335138", "text": "public function count(){\n $obj=TipoUsuario::all();\n $col=collect(['registros'=>$obj->count()]);\n return $col->toJson();\n }", "title": "" }, { "docid": "29b3513e1c5a664dce9f7ee3c9eae297", "score": "0.5333789", "text": "public function getNbProduitsInFacture ()\n\t\t{\n\t\t\t$this->Sql = \"SELECT COUNT(*) AS nb_produits FROM t_produits_achats\";\n\t\t\t$res = $this->FetchRow();\n\t\t\treturn $res [\"nb_produits\"];\n\t\t}", "title": "" }, { "docid": "b9c6e8c1f2227e0882fad7ce905c9e75", "score": "0.5331741", "text": "public function numero_de_justificaciones($grupo_id, $user_id, $motivo){\n\t\t$sql = \"SELECT COUNT(*) \n\t\t\t\tFROM grupos_horarios GH, justificaciones J \n\t\t\t\tWHERE \n\t\t\t\t\tGH.grupo_id=$grupo_id AND\n\t\t\t\t GH.id=J.grupo_horario_id AND\n\t\t\t\t J.user_id=$user_id AND\n\t\t\t\t J.motivo_de_justificacion='$motivo' \";\n $result = $this->conexion->query($sql); \n $resultado = $result->fetch_all(MYSQLI_ASSOC); \n parent::cerrar();\n return $resultado;\n }", "title": "" }, { "docid": "5fb6d49635bc3a76b1d758390c8515fa", "score": "0.5331242", "text": "function cantidadSegundos($parts,$horas,$minutos,$segundos){\n \t\t$acumulado=0;\n \t\t$acumulado=(($horas*3600)+($minutos*60)+$segundos)/$parts;\n \t return $acumulado;\n\t}", "title": "" }, { "docid": "3267e26a600745dbfbce71b429a3723c", "score": "0.5330869", "text": "public function Cantidad(){\n return mysql_num_rows($this->RESULT);\n }", "title": "" }, { "docid": "61997aefc2ca77c39502cf7c8c726a37", "score": "0.5325802", "text": "function nbre_lignes_tab_edt(){\r\n\t$compter_lignes = mysqli_query($GLOBALS[\"mysqli\"], \"SELECT nom_definie_periode FROM edt_creneaux\");\r\n\t$nbre_lignes = (mysqli_num_rows($compter_lignes)) + 1;\r\n\treturn $nbre_lignes;\r\n}", "title": "" }, { "docid": "46d9b26affb5e04df198c4f239875d6e", "score": "0.5325006", "text": "public function count()\n {\n $cantPlacas = VTPlacasSinDatos::count();\n return response()->json(['cantPlacas' => $cantPlacas]);\n }", "title": "" }, { "docid": "25de047cee67011ce52629d9d7658f43", "score": "0.53243023", "text": "function countMembers()\n {\n $query = \"SELECT count(*) AS count FROM users WHERE userPermissions < '4' AND userConfirm='1' AND deleted='0' \";\n $data = $this->SelectData($query, PDO::FETCH_ASSOC);\n\n return $data[0]['count'];\n }", "title": "" }, { "docid": "9b4fc6ecfe1a42847eb2e93b1b1b5330", "score": "0.53230697", "text": "public function getCantidad(){\n return $this->cantidad;\n }", "title": "" }, { "docid": "ae0063d72531749f98d2ef2242bacf3b", "score": "0.53228366", "text": "public function CantPreguntas($idx) {\n $result = mysql_query(\"SELECT COUNT(*) AS cantidad FROM PREGUNTA WHERE IdTema= '$idx'\");\n $num_rows = mysql_num_rows($result); \n if ($num_rows > 0) {\n return $result;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "aeeac0568e23fa9cd5385b1a7b2bd568", "score": "0.532274", "text": "public function num_productos_cantidades(){ \t\t\r\n\t\t\t$sql = \"SELECT count(productos_traspasos.cve) as cantidades FROM catalogos,catalogos_productos,productos_traspasos,productos,traspasos WHERE traspasos.folio=productos_traspasos.folio and catalogos_productos.id_catalogo=catalogos.id_catalogo and productos_traspasos.cve=catalogos_productos.cve and productos.cve=productos_traspasos.cve and tipo=0 and traspasos.folio=\".$_POST['folio'];\r\n\t\t\treturn $this->query($sql);\r\n\t\t}", "title": "" }, { "docid": "23bb921be7a13a04d70648113e83132b", "score": "0.5321556", "text": "public function count () {\n\t\treturn 7;\n\t}", "title": "" }, { "docid": "6ddb1ccda73b14da2571d1aaf0b3df40", "score": "0.53180605", "text": "public function suggerisciProssimaTessera(){\n $ultimaTessera = $this->irDAO->getUltimaTessera();\n return $ultimaTessera+1;\n }", "title": "" }, { "docid": "363008b0b07d27226a8186d39dee27b2", "score": "0.53168076", "text": "function nbErreurs() {\r\n if (!isset($_REQUEST['erreurs'])) {\r\n return 0;\r\n } else {\r\n return count($_REQUEST['erreurs']);\r\n }\r\n}", "title": "" }, { "docid": "e5e2af20ff4e2725c4e718f8df5b3cd8", "score": "0.5314354", "text": "public function getcantidad()\r\n\t{\r\n\t\treturn $this->cantidad;\r\n\t}", "title": "" }, { "docid": "ec5fecd277c24e09e806dcdd542debc4", "score": "0.5313525", "text": "function cantAvisos(){\n $pdo = Database::connect();\n $sql = \"SELECT count(id) as count from aviso\";\n \n $result = $pdo->query($sql);\n Database::disconnect();\n\n $arr = 0;\n foreach ($result as $row) {\n $arr = $row['count'];\n break;\n }\n // Return json array containing data from the database\n return $arr;\n \n }", "title": "" }, { "docid": "0249bbef21c07efbe479e2fd5113bed5", "score": "0.5307105", "text": "public function getCantEjes()\n {\n return $this->cantEjes;\n }", "title": "" }, { "docid": "ed719cd82682d90a1e1f461b909a14fb", "score": "0.53045", "text": "public function nombreJours(): int\n {\n\n $debutMois = $this->premierJourduMois();\n $finMois = (clone $debutMois)->modify('+1 month -1 day');\n\n $debuSemaine = intval($debutMois->format('W'));\n $finSemaine = intval($finMois->format('W'));\n\n if ($finSemaine === 1) {\n $finSemaine = intval((clone $finMois)->modify('-7 days')->format('W')) + 1;\n }\n $jours = $finSemaine - $debuSemaine + 1;\n if ($jours < 0) {\n $jours = $finMois->format('W');\n }\n return $jours;\n }", "title": "" }, { "docid": "8e1b43d7ba919ae8b542ba6b9b407cb5", "score": "0.52996874", "text": "function getMaxIdBoletos(){\n\t\t\t$consulta = mysql_query(\"SELECT id FROM `boletos_registrados` ORDER BY id DESC LIMIT 0,1\");\n\t\t\t\n\t\t\t// Pega o ultimo id do boleto.\n\t\t\t$id = mysql_fetch_array($consulta);\n\t\t\t\n\t\t\t// Retorna o proximo numero para gerar o boleto.\n\t\t\treturn $id['id'] + 1;\n\t\t}", "title": "" }, { "docid": "38eb058e192d3efac688e80ec6c9d9f4", "score": "0.5297613", "text": "public function nbActeurs(){\n $query = $this->db->query('\n SELECT COUNT(id) AS nb\n FROM actors');\n\n return $query->row();\n }", "title": "" }, { "docid": "f8455d255811aab847a8460b2f4b7a7d", "score": "0.5296654", "text": "public function JQGRIDCountDigitacionTelefonos(dto_cliente $dtoCliente, dto_cartera $dtoCartera) {\n//\t\t\t\tFROM ca_referencia_cliente refcli INNER JOIN ca_telefono tel INNER JOIN ca_tipo_referencia tipref INNER JOIN ca_origen org\n//\t\t\t\tON org.idorigen=refcli.idorigen AND tipref.idtipo_referencia=refcli.idtipo_referencia \n//\t\t\t\tAND tel.idreferencia_cliente=refcli.idreferencia_cliente \n//\t\t\t\tWHERE refcli.idcliente=? AND refcli.estado=1 AND refcli.idclase=1 \";\n //$sql=\" SELECT COUNT(*) AS 'COUNT'\n//\t\t\t\tFROM ca_telefono tel INNER JOIN ca_origen org INNER JOIN ca_tipo_referencia tipref INNER JOIN ca_tipo_telefono tiptel\n//\t\t\t\tON tiptel.idtipo_telefono=tel.idtipo_telefono AND tipref.idtipo_referencia=tel.idtipo_referencia AND org.idorigen=tel.idorigen\n//\t\t\t\tWHERE tel.idcliente = ? AND tel.idcartera = ? \";\n\n $sql = \" SELECT COUNT(*) AS 'COUNT'\n\t\t\t\tFROM ca_telefono tel INNER JOIN ca_origen org INNER JOIN ca_tipo_referencia tipref INNER JOIN ca_tipo_telefono tiptel\n\t\t\t\tON tiptel.idtipo_telefono=tel.idtipo_telefono AND tipref.idtipo_referencia=tel.idtipo_referencia AND org.idorigen=tel.idorigen\n\t\t\t\tWHERE tel.codigo_cliente = ? AND tel.idcartera = ? \";\n\n //$cliente=$dtoCliente->getId();\n /* * ******* */\n $codigo_cliente = $dtoCliente->getCodigo();\n /* * ******* */\n $cartera = $dtoCartera->getId();\n\n $factoryConnection = FactoryConnection::create('mysql');\n $connection = $factoryConnection->getConnection();\n\n //$connection->beginTransaction();\n\n $pr = $connection->prepare($sql);\n //$pr->bindParam(1,$cliente);\n /* * ****** */\n $pr->bindParam(1, $codigo_cliente);\n /* * ****** */\n $pr->bindParam(2, $cartera);\n if ($pr->execute()) {\n //$connection->commit();\n return $pr->fetchAll(PDO::FETCH_ASSOC);\n } else {\n //$connection->rollBack();\n return array(array('COUNT' => 0));\n }\n }", "title": "" }, { "docid": "acc5047757528a6d9f7a5c095ea3571e", "score": "0.5292453", "text": "function idkas() {\n $con = mysqli_connect('localhost','root','','sikati');\n $query = mysqli_query($con,\"select id_kas from bayar_kas order by id_kas desc limit 0,1\") or die(mysql_error());\n\tlist ($no_temp) = mysqli_fetch_row($query);\n\n\tif ($no_temp == '') {\n\t\t$no_urut = 'K00001';\n\n\t\t} else {\n\t\t$jum = substr($no_temp,1,6);\n\t\t$jum++;\n\t\tif($jum <= 9) {\n\t\t\t$no_urut = 'K0000' . $jum;\n\t\t}\n elseif ($jum <= 99) {\n\t\t\t$no_urut = 'K000' . $jum;\n\t\t}\n elseif ($jum <= 999) {\n\t\t\t$no_urut = 'K00' . $jum;\n\t\t}\n elseif ($jum <= 9999) {\n\t\t\t$no_urut = 'K0' . $jum;\n\t\t}\n elseif ($jum <= 99999) {\n\t\t\t$no_urut = 'K' . $jum;\n\t\t}\n else {\n\t\t\tdie(\"Nomor urut melebih batas\");\n\t\t}\n\t}\n\t\treturn $no_urut;\n}", "title": "" }, { "docid": "33e2934ab1c3e2948db0d101bbb0c31b", "score": "0.52888274", "text": "function Int_Get_nuevosUsuarios()\r\n{\r\n\t$usuario = consultar(\"SELECT * FROM `tb_usuarios` WHERE estado='procesando' \");\r\n\treturn mysqli_num_rows($usuario);\r\n}", "title": "" }, { "docid": "a9da3a8e630ea9e481aaa2a668658b4e", "score": "0.5285073", "text": "public function cantidadMensajesSinLeerModel(){\n $conec = @Conexion::conectar();\n $sql = \"SELECT count(*) AS CANTIDAD from mensajes WHERE estado = false\";\n $statement = $conec->prepare($sql);\n $statement->execute();\n $respuesta = $statement->fetch();\n return $respuesta;\n $conec = '';\n }", "title": "" }, { "docid": "f9b11195f8c0fa8095f76c18a15393fe", "score": "0.5279138", "text": "public function count() {\n $sql = \"SELECT COUNT(*) FROM tipoproblema;\";\n $resultado = mysql_query($sql);\n if($resultado){\n $resultado = mysql_fetch_row($resultado);\n return $resultado[0];\n } else {\n return 0;\n }\n }", "title": "" }, { "docid": "d8c295c514ca26ae7f6c659e09abd157", "score": "0.5278333", "text": "static function cantidad_procesos_totales_finalizados(){\n return $cantidad_procesos = DB::table('proceso_contractuals')\n ->Where('estado','Finalizado')\n ->count();\n }", "title": "" } ]
32d391644afed045d13e61ed5a5c6394
First, validate the input data
[ { "docid": "d8e68ff664b7649c97764ba02101eb0f", "score": "0.0", "text": "public function generate(Request $request) {\n $this->validate($request, [\n 'paragraphs' => 'required|numeric|min:1|max:33',\n ]);\n\n // getting input parameters\n $paragraphs = $request->input('paragraphs', '3');\n $paragraphsize = $request->input('paragraphsize');\n $linkorlist = $request->input('linkorlist');\n\n // dd($paragraphsize);\n switch ($paragraphsize) {\n case \"short\":\n $text = Lipsum::short()->html($paragraphs);\n if($linkorlist == \"link\") {\n $text = Lipsum::link()->short()->html($paragraphs);\n } elseif ($linkorlist == \"list\") {\n $text = Lipsum::ul()->short()-> html($paragraphs);\n }\n break;\n case \"medium\":\n $text = Lipsum::medium()->html($paragraphs);\n if($linkorlist == \"link\") {\n $text = Lipsum::link()->medium()->html($paragraphs);\n } elseif ($linkorlist == \"list\") {\n $text = Lipsum::ul()->medium()-> html($paragraphs);\n }\n break;\n case 'long':\n $text = Lipsum::verylong()->html($paragraphs);\n if($linkorlist == \"link\") {\n $text = Lipsum::link()->verylong()->html($paragraphs);\n } elseif ($linkorlist == \"list\") {\n $text = Lipsum::ul()->verylong()-> html($paragraphs);\n }\n break;\n default:\n $text = Lipsum::html(3);\n }\n\n return view('lorem-ipsum.generate')\n // ->with('paragraphs', $paragraphs)\n // ->with('paragraphsize', $paragraphsize)\n // ->with('link', $link)\n // ->with('list', $list)\n ->with('text', $text);\n\n\n // return view('lorem-ipsum.generate')->with('paragraphs', $paragraphs);\n // return 'hi';\n }", "title": "" } ]
[ { "docid": "52b4cca01794892e3ec9a5bad7272a12", "score": "0.81598747", "text": "public function validateData();", "title": "" }, { "docid": "0cf46da5afc77621f744c6ce785d54de", "score": "0.7470097", "text": "private function validateData()\n {\n $this->validateMerchantId();\n $this->validateSharedSecret();\n $this->validateBaseApiUrl();\n }", "title": "" }, { "docid": "2cf099d15e3b003d7a4ee33a7f591566", "score": "0.73950255", "text": "private function _validate_inputdata()\n\t{\n\n\t\tif(isset($this->_input_data['billing_address_id']))\n\t\t{\n\n\t\t\tif(isset($this->_input_data['shipping_address_id']))\n\t\t\t{\n\n\t\t\t\tif(isset($this->_input_data['cost_items']))\n\t\t\t\t{\t\t\t\t\n\n\t\t\t\t\tif(isset($this->_input_data['ip_address']))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn TRUE;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\techo 'end';\n\n\t\treturn FALSE;\n\n\t}", "title": "" }, { "docid": "432bcb1fe688a1ad056479db9eff36ea", "score": "0.72690004", "text": "protected function validate()\n {\n $data = $this->data;\n if (($data != 0) && ($data != 1)) $this->setError(self::CODE_UNKNOWN);\n }", "title": "" }, { "docid": "5d458fce1b89d8f01d3d61c82dc5490e", "score": "0.7132451", "text": "protected abstract function _validate();", "title": "" }, { "docid": "b053bac8695a2ca8e80ddf7fcdcaa084", "score": "0.709988", "text": "private function validateInfo()\n {\n\n }", "title": "" }, { "docid": "f3a492b66a9443723e166c9fff806b4e", "score": "0.7098542", "text": "protected function check_input_data() {\n\t\n\t\tif (!$this->title->val) {\n\t\t\n\t\t\tnew q2w3_table_sys_msg(__('You must input Description field!', self::$plugin_id));\n\t\t\t\n\t\t\treturn false;\n\t\t\n\t\t} elseif (!intval($this->priority->val)) {\n\t\t\n\t\t\tnew q2w3_table_sys_msg(__('Priority number must be integer!', self::$plugin_id));\n\t\t\t\n\t\t\treturn false;\n\t\t\t\t\n\t\t} elseif (!$this->inc_pages->val) {\n\t\t\n\t\t\tnew q2w3_table_sys_msg(__('You must select at least one page where to place included code!', self::$plugin_id));\n\t\t\t\n\t\t\treturn false;\n\t\t\t\t\n\t\t} elseif (!$this->code->val) {\n\t\t\n\t\t\tnew q2w3_table_sys_msg(__('You must enter included code!', self::$plugin_id));\n\t\t\t\n\t\t\treturn false;\n\t\t\t\n\t\t}\n\t\t\n\t\treturn true;\n\t\n\t}", "title": "" }, { "docid": "1d25128cd641c51516f5cced6b434672", "score": "0.7093036", "text": "public function validate( $data );", "title": "" }, { "docid": "c7cf90062afa7cf184a45998a4928f6e", "score": "0.7044665", "text": "public function validateLogic($data)\n {\n }", "title": "" }, { "docid": "5299af517ce4082b779d25fdd1daf8d4", "score": "0.7043696", "text": "abstract protected function validate();", "title": "" }, { "docid": "75265175599b08d2bb4f7ecc06cf6e8d", "score": "0.704125", "text": "protected function validate($data)\n {\n // Nothing to validate\n }", "title": "" }, { "docid": "7b15c1e6a5210a1f38687662027d404d", "score": "0.7033847", "text": "protected function _validate_data() {\n\t\t$required = array(\n\t\t\t'id',\n\t\t\t'title',\n\t\t\t'output'\n\t\t);\n\n\t\tforeach ( $this->_data as $i => $column ) :\n\t\t\t$is_valid = true;\n\n\t\t\tif ( ! $column['id'] ) :\n\t\t\t\ttrigger_error( 'A column must have an ID', E_USER_WARNING );\n\t\t\t\t$is_valid = false;\n\t\t\telse :\n\t\t\t\tforeach ( $required as $key ) :\n\t\t\t\t\tif ( ! $column[$key] ) :\n\t\t\t\t\t\ttrigger_error( sprintf( 'Column \"%s\" is missing key \"%s\"', $column['id'], $key ), E_USER_WARNING );\n\t\t\t\t\t\t$is_valid = false;\n\t\t\t\t\telseif ( 'output' == $key && ! is_callable( $column[$key] ) ) :\n\t\t\t\t\t\ttrigger_error( sprintf( '\"output\" in column \"%s\" must be a callable function', $column['id'] ), E_USER_WARNING );\n\t\t\t\t\t\t$is_valid = false;\n\t\t\t\t\tendif;\n\t\t\t\tendforeach;\n\t\t\tendif;\n\n\t\t\t$this->_data[$i]['is_valid'] = $is_valid;\n\t\tendforeach;\n\t}", "title": "" }, { "docid": "033ee0c4d1b05aa1ce84925b9803bebc", "score": "0.7010259", "text": "protected abstract function validate();", "title": "" }, { "docid": "006e934773a06d054f93026751def454", "score": "0.7003259", "text": "private function __validate_data_payload() {\n if (isset($this->initial_data[\"data_payload\"])) {\n # Require data payload to be greater than 1\n if ($this->initial_data[\"data_payload\"] >= 1) {\n $this->validated_data[\"data_payload\"] = intval($this->initial_data[\"data_payload\"]);\n } else {\n $this->errors[] = APIResponse\\get(6016);\n }\n } else {\n $this->validated_data[\"data_payload\"] = 1;\n }\n }", "title": "" }, { "docid": "f9a15d7e58e0a5a66816e4c187753191", "score": "0.70012695", "text": "abstract public function validateSource($data);", "title": "" }, { "docid": "859e767d261eb6232061844aa667f5be", "score": "0.6997075", "text": "private function checkDataValidity() {\n if(empty($_POST['description']))\n {\n $_POST['description'] = 'none';\n }\n if(empty($_POST['price']))\n {\n $_POST['price'] = 0;\n }\n if ($_POST[\"price\"] > 999999999) {\n $_POST[\"price\"] = 999999999;\n }\n else if ($_POST[\"price\"] < 0) {\n $_POST[\"price\"] = 0;\n }\n }", "title": "" }, { "docid": "5e326257ef50876bf969d22da1e87861", "score": "0.698076", "text": "public function validate($data);", "title": "" }, { "docid": "5e326257ef50876bf969d22da1e87861", "score": "0.698076", "text": "public function validate($data);", "title": "" }, { "docid": "5e326257ef50876bf969d22da1e87861", "score": "0.698076", "text": "public function validate($data);", "title": "" }, { "docid": "5e326257ef50876bf969d22da1e87861", "score": "0.698076", "text": "public function validate($data);", "title": "" }, { "docid": "0efd62aa7717cff7c82f3995b5fb18ae", "score": "0.6926138", "text": "abstract public function validate();", "title": "" }, { "docid": "0efd62aa7717cff7c82f3995b5fb18ae", "score": "0.6926138", "text": "abstract public function validate();", "title": "" }, { "docid": "675035501e4e261ac8d01e7922cff3e7", "score": "0.6923413", "text": "protected function ValidateInputs(){\n // Tolerate \"limit\" param not given\n if ((isset($this->input_format['limit'])) and (!array_key_exists('limit', $this->input_data)) ) $this->input_data['limit'] = 100;\n // Add default input format keys for paged mode\n if ($this->paged) {\n if (!isset($this->input_format['page_offset'])) $this->input_format['page_offset']= \"optional:number\";\n if (!isset($this->input_format['page_count']) ) $this->input_format['page_count'] = \"optional:number\";\n }\n // Validate each parameter\n foreach ($this->input_format as $key => $val){\n // Check if parameter is optional\n if (strpos(strtoupper($val),'OPTIONAL:')===false) {\n //Not Optional => check this one\n if (!array_key_exists($key, $this->input_data)) {\n $this->EQ(\"Paramètre manquant. On s'attend a avoir le paramètre suivant : \" . $key);\n }\n }\n }\n }", "title": "" }, { "docid": "a335a390e4266234748a72e3d4969afb", "score": "0.69123375", "text": "private function validateData(): void\n {\n if (is_null($this->userId) || is_null($this->apiKey) || is_null($this->startDate) || is_null($this->endDate)) {\n throw new InvalidArgumentException(\"All object variables must have a value\");\n }\n }", "title": "" }, { "docid": "b215e5d22c9f3cafc8881ab84877c1fe", "score": "0.68470514", "text": "private function validate($data) {\n\t \n\t if (strlen(trim($data['name'])) < 1) {\n\t \n\t\t$this->error['name'] = 'Поле Имя автора обязательно для заполнения!';\n\t }\n\t \n\t if (strlen(trim($data['text'])) < 1) {\n\t \n\t\t$this->error['text'] = 'Поле Текст комментария обязательно для заполнения!';\n\t }\n\t \n\t if (!is_numeric(intval($data['news_id']))) {\n\t \n\t\t$this->error['news_id'] = 'Внутренняя ошибка. Попробуйте позже!';\n\t }\n\t \n\t return !$this->error;\n\t}", "title": "" }, { "docid": "539cccdf92a956cc1283e6bde1d483c8", "score": "0.6819889", "text": "public static function validate($data);", "title": "" }, { "docid": "95b543f5ab887ce8c61ef1f5977b5dd3", "score": "0.67673206", "text": "private function checkData($data)\n {\n // check date strings are in correct format\n if (isset($data['start'])) {\n $this->validateDate($data['start']);\n }\n\n if (isset($data['end'])) {\n $this->validateDate($data['end']);\n }\n\n // Check if start date is less than end date.\n if (isset($data['start']) && isset($data['end'])) {\n if (strtotime($data['start']) > strtotime($data['end'])) {\n throw new RequestException(\"Error with provided parameters: Start date is greater than end date.\", 400);\n }\n }\n\n // check if aggregateData is either true or false\n if (isset($data['aggregateData']) && $data['aggregateData'] != \"true\" && $data['aggregateData'] != \"false\") {\n throw new RequestException(\"Error with provided parameters: aggregateData must either be 'true' or 'false'.\", 400);\n }\n\n return;\n }", "title": "" }, { "docid": "beb9d63f1f1e9461bf68d657c100f526", "score": "0.6764252", "text": "function validate_data($data) {\n if(!isset($this->sports[$this->path])) {\n $this->errors['sports'] = get_string('sports_error', 'block_student_gradeviewer');\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "07e4036596c6ae49f7912c0b293b057b", "score": "0.67608774", "text": "function readInputData() {\n\t\t$this->readUserVars(array('name', 'description', 'cost', 'currency', 'nonExpiring', 'duration', 'format', 'institutional', 'membership', 'disable_public_display'));\n\n\t\t// If expiring subscription type, ensure duration is provided and valid\n\t\tif ($this->getData('nonExpiring') === 0) {\n\t\t\t$this->addCheck(new FormValidator($this, 'duration', 'required', 'manager.subscriptionTypes.form.durationRequired'));\t\n\t\t\t$this->addCheck(new FormValidatorCustom($this, 'duration', 'required', 'manager.subscriptionTypes.form.durationNumeric', create_function('$duration', 'return (is_numeric($duration) && $duration >= 0);')));\n\t\t}\n\t}", "title": "" }, { "docid": "b9eb03dae0464ef80ef1342fa9ca15fc", "score": "0.6748946", "text": "public function validate();", "title": "" }, { "docid": "b9eb03dae0464ef80ef1342fa9ca15fc", "score": "0.6748946", "text": "public function validate();", "title": "" }, { "docid": "b9eb03dae0464ef80ef1342fa9ca15fc", "score": "0.6748946", "text": "public function validate();", "title": "" }, { "docid": "b9eb03dae0464ef80ef1342fa9ca15fc", "score": "0.6748946", "text": "public function validate();", "title": "" }, { "docid": "b9eb03dae0464ef80ef1342fa9ca15fc", "score": "0.6748946", "text": "public function validate();", "title": "" }, { "docid": "b9eb03dae0464ef80ef1342fa9ca15fc", "score": "0.6748946", "text": "public function validate();", "title": "" }, { "docid": "b9eb03dae0464ef80ef1342fa9ca15fc", "score": "0.6748946", "text": "public function validate();", "title": "" }, { "docid": "698afddf7099f072fcbdeced7adbaeaf", "score": "0.6711502", "text": "public function validate()\n\t{\n\t\t$tmpRgxp = $this->arrConfiguration['rgxp'];\n\t\t$tmpMandatory = $this->arrConfiguration['mandatory'];\n\t\t$tmpLabel = $this->strLabel;\n\t\t$arrInput = deserialize($this->getPost($this->strName));\n\t\tif (!is_array($arrInput)) $arrInput = array();\n\n\t\tforeach ($arrInput as $row => $rowdata)\n\t\t{\n\t\t\tforeach ($rowdata as $col => $value)\n\t\t\t{\n\t\t\t\tif ($this->arrColumns[$col]['unique'] && count(array_unique($allvalues[$col])) != count($allvalues[$col]))\n\t\t\t\t{\n\t\t\t\t\t$this->addError(sprintf($GLOBALS['TL_LANG']['ERR']['notunique'], $this->strLabel));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (count($this->arrQueryErrors))\n\t\t{\n\t\t\t$this->class = 'error';\n\t\t\t$this->arrErrors[] = '';\n\t\t}\n\n\t\t$this->strLabel = $tmpLabel;\n\t\t$this->varValue = $arrInput;\n\t}", "title": "" }, { "docid": "b61c4d7523fe472b2542f16437766842", "score": "0.6690333", "text": "public function validate()\n\t{\n\t}", "title": "" }, { "docid": "a8a44395e5f7a2d439c910eea5ca6fa2", "score": "0.6657413", "text": "function validate(&$data){\n\t\t$GLOBALS['core.application']->init_module('validator_module', true);\n\t\tforeach ($this->field_validation as $key => $value){\n\t\t\tif(!isset($data[$key]))\n\t\t\t\t$data[$key] = '';\n\t\t\t$GLOBALS['core.validator']->add($key, $data[$key], '', $value);\n\t\t}\n\t\t$err = $GLOBALS['core.validator']->check();\t\n\t\treturn $err;\n\t}", "title": "" }, { "docid": "2acacb8b9e6cfda22101c26e648eab84", "score": "0.66556114", "text": "function validate()\r\n {\r\n \t//get data model's name\r\n \t$modelName = $this->getModelNameForValidation();\r\n\r\n \t\t//validate each field\r\n \t\tforeach($this->data[$modelName] as $modelField=>$modelValue)\r\n \t\t{\r\n \t\t\t//do we have rules for this field?\r\n \t\t\tif(array_key_exists($modelField, $this->patterns))\r\n \t\t\t{\r\n \t\t\t\t//match each pattern with this field\r\n \t\t\t\tforeach($this->patterns[$modelField] as $pattern)\r\n \t\t\t\t{\r\n \t\t\t\t\t//if matched, the data is SPAM\r\n \t\t\t\t\tif(ereg($pattern, $this->data[$modelName][$modelField]))\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\t//add the field to $this->invalidFields\r\n \t\t\t\t\t\t$this->invalidFields[] = $modelField;\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//now we just check $this->invalidFields, if it had any elements, the data must be SPAM\r\n \t\treturn count($this->invalidFields()) ? false : true;\r\n }", "title": "" }, { "docid": "4fc605c2b5a31f26fd5177634c1aac17", "score": "0.66477287", "text": "public abstract function validate();", "title": "" }, { "docid": "d5761328ab6f9687df4069b9e7ca2364", "score": "0.66363966", "text": "public function __validate();", "title": "" }, { "docid": "9dd24cc0ab261f4f8a93191611045a23", "score": "0.66262996", "text": "public function valid () {}", "title": "" }, { "docid": "9dd24cc0ab261f4f8a93191611045a23", "score": "0.66262996", "text": "public function valid () {}", "title": "" }, { "docid": "9dd24cc0ab261f4f8a93191611045a23", "score": "0.66262996", "text": "public function valid () {}", "title": "" }, { "docid": "4c99eca1e8f7f688f0687822fa9714f6", "score": "0.6613586", "text": "private function checkData() {\n if (!$this->seoData):\n $this->getSeo();\n endif;\n }", "title": "" }, { "docid": "e252c48d14d8cc20fcbb1074c6e10877", "score": "0.6612992", "text": "public function valid() {}", "title": "" }, { "docid": "e252c48d14d8cc20fcbb1074c6e10877", "score": "0.66110027", "text": "public function valid() {}", "title": "" }, { "docid": "e252c48d14d8cc20fcbb1074c6e10877", "score": "0.66110027", "text": "public function valid() {}", "title": "" }, { "docid": "e252c48d14d8cc20fcbb1074c6e10877", "score": "0.66110027", "text": "public function valid() {}", "title": "" }, { "docid": "e252c48d14d8cc20fcbb1074c6e10877", "score": "0.66110027", "text": "public function valid() {}", "title": "" }, { "docid": "e252c48d14d8cc20fcbb1074c6e10877", "score": "0.66110027", "text": "public function valid() {}", "title": "" }, { "docid": "fa673e1aeba07a02e7cad5c516f9d719", "score": "0.6588003", "text": "private function validateAndCollectData($data)\n {\n static $row = 0;\n $num = count($data);\n\n if ($this->asciiEncodingValidate($data) && $this->ratingValidate($data) && $this->urlValidate($data)) {\n for ($col = 0; $col < $num; $col++) {\n $this->fileData[$row][$this->header[$col]] = $data[$col];\n }\n $row++;\n }\n }", "title": "" }, { "docid": "8f0b00a7e07e1f16b135a1fcf3608117", "score": "0.65661776", "text": "protected function validate()\n {\n //Must be overridden.\n }", "title": "" }, { "docid": "d4ea399587f1a82bc83a5ead49d25587", "score": "0.6561125", "text": "abstract public function Validate();", "title": "" }, { "docid": "c71da4631b08f7230757f29f63bb3135", "score": "0.65550077", "text": "public function validate()\n {\n $submit = $this->getPost(\"question\");\n $submit_other = $this->getPost(\"other_question\");\n $value = [];\n $value[\"value\"] = $submit[$this->id];\n $value[\"other\"] = $submit_other[$this->id];\n $varInput = $this->validator($value);\n $this->value = $varInput;\n }", "title": "" }, { "docid": "6d35d4daaa24cbdffff3ec7eb9b43bb5", "score": "0.6553565", "text": "public function validateAndLoadData($data) {\r\n $this->email = $data['email'];\r\n $this->category = $data['category'];\r\n $this->content = $data['content'];\r\n $this->userAgent = $data['userAgent'];\r\n return true;\r\n }", "title": "" }, { "docid": "679a68bea37c69fd430f30ac392388bc", "score": "0.65494424", "text": "function validateData($request) {\n\tglobal $amessages;\n\tinclude_once(ROOT_PATH.'classes/data/validate.class.php');\n\t$error = array();\n\t$validate = new Validate();\n\t$error['INPUT']['parent_id'] = $validate->pasteString($request->element('parent_id'));\n\t$error['INPUT']['cat_id'] = $validate->pasteString($request->element('cat_id'));\n\t$error['INPUT']['position'] = $validate->validNumber($request->element('position'),$amessages['position']);\n\t$error['INPUT']['name'] = $validate->validString($request->element('name'),$amessages['name']);\n\t$error['INPUT']['url'] = $validate->pasteString($request->element('url'));\n\t$error['INPUT']['status'] = $validate->pasteString($request->element('status'));\n\tif($error['INPUT']['name']['error'] || $error['INPUT']['position']['error']) {\n\t\t$error['invalid'] = 1;\n\t\treturn $error;\n\t}\n\t$error['invalid'] = 0;\n\treturn $error;\n}", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.6545624", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.6545624", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.6545624", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.6545624", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.6545624", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.6545624", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.6545624", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.6545624", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.6545624", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.6545624", "text": "public function valid();", "title": "" }, { "docid": "6c3d3b1afee9c4237a0e2b039d5592c3", "score": "0.6545624", "text": "public function valid();", "title": "" }, { "docid": "9cfc5f6fe9c6c5c02a42939a84032939", "score": "0.65416914", "text": "public function run($data) {\n foreach($this->required_fields as $field => $message) {\n //check to see that the field exists and not empty\n if(!isset($data[$field]) || trim($data[$field]) == \"\")\n $errors[$field] = $message;\n }\n\n return $errors;\n }", "title": "" }, { "docid": "63771997f8a0c9a2027d4129760e8e6b", "score": "0.65380967", "text": "private function validateAllOfTheInput(){\n\t\t/** First validate the coordinates that were given. **/\n\t\t$latitude = null; \n\t\t$longitude = null;\n\t\tif(isset($this->_req['location_lat']) && isset($this->_req['location_lon'])){\n\t\t\t$latitude = $this->_req['location_lat'];\n\t\t\t$longitude = $this->_req['location_lon'];\n\t\t\tif(!$this->validateCoordinates($latitude,$longitude)){\n\t\t\t\t$this->setResult(STATUS_ERROR,'The latitude or longitude provided appear to be invalid!');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/** Question answer cleansing **/\n\t\t$characteristic = $this->_req['characteristic'];\n\t\tif(strlen($characteristic) > MEET_REQUEST_CHARACTERISTIC_LENGTH){\n\t\t\t$this->setResult(STATUS_ERROR,'The submitted characteristic is too long!');\n\t\t\treturn false;\n\t\t}\n\t\t$characteristic = cleanInput($characteristic,1,MEET_REQUEST_CHARACTERISTIC_LENGTH);\n\t\tif($characteristic === false){\n\t\t\t$this->setResult(STATUS_ERROR,'The submitted answer appears to be invalid!');\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$person_id = $this->_req['person_id'];\n\t\tif(strlen($person_id) > 11){\n\t\t\t$this->setResult(STATUS_ERROR,'The person ID entered appears to be too long!');\n\t\t\treturn false;\n\t\t}\n\t\tif(!ctype_digit($person_id)){\n\t\t\t$this->setResult(STATUS_ERROR,'The person ID does not appear to be valid!');\n\t\t\treturn false;\n\t\t}\n\t\tif(!$this->isUserId($person_id)){\n\t\t\t$this->setResult(STATUS_ERROR,'The person ID does not appear to be valid!');\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t/** Test if the optional location label is valid **/\n\t\t$location = \"\";\n\t\tif(isset($this->_req['location_label'])){\n\t\t\t$tempLoc = $this->_req['location_label'];\n\t\t\tif(strlen($tempLoc) > MEET_LOCATION_MAX_LENGTH){\n\t\t\t\t$this->setResult(STATUS_ERROR,'The location name appears to be too long!');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$tempLoc = cleanInput($tempLoc,0,MEET_LOCATION_MAX_LENGTH);\n\t\t\tif($tempLoc === false){\n\t\t\t\t$this->setResult(STATUS_ERROR,'The location name appears to be invalid!');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$location = $tempLoc;\n\t\t}\n\t\treturn array('location_lat'=>$latitude, 'location_lon'=>$longitude, 'person_id'=>$person_id, 'location_label' => $location, 'characteristic' => $characteristic);\n\t}", "title": "" }, { "docid": "bc114c5388e46ae820e0f718ed3d27d7", "score": "0.653804", "text": "abstract public function dataValidation ($form=null, $data);", "title": "" }, { "docid": "681829f85c240d2edc1638d11333c049", "score": "0.652753", "text": "public function validate_data(array $data)\n {\n // If the data wasn't set, throw PBX401 Inappropriate Data Supplied\n if (! ( isset($data['playerName']) &&\n isset($data['dateTime' ]) &&\n isset($data['gameID' ]) &&\n isset($data['achivID' ]) )) \n throw new Exception(\"PBX401\");\n }", "title": "" }, { "docid": "8fe56ccc51c615c35dade92e1fd129d3", "score": "0.652224", "text": "protected function validateGetData()\n\t{\n\t\t//\n\t\t// Assert submitter.\n\t\t//\n\t\tif( $this->offsetExists( kAPI_REQUEST_USER ) )\n\t\t{\n\t\t\t//\n\t\t\t// Check roles.\n\t\t\t//\n\t\t\t$user = $this->offsetGet( kAPI_REQUEST_USER );\n\t\t\t$roles = $user->offsetGet( kTAG_ROLES );\n\t\t\tif( $roles !== NULL )\n\t\t\t{\n\t\t\t\t//\n\t\t\t\t// Check if he can edit pages.\n\t\t\t\t//\n\t\t\t\tif( in_array( kTYPE_ROLE_EDIT, $roles ) )\n\t\t\t\t{\n\t\t\t\t\t//\n\t\t\t\t\t// Check data object.\n\t\t\t\t\t//\n\t\t\t\t\tif( ! $this->offsetExists( kAPI_PARAM_ID ) )\n\t\t\t\t\t\tthrow new \\Exception(\n\t\t\t\t\t\t\t\"Missing object identifier.\" );\t\t\t\t\t\t// !@! ==>\n\t\t\t\t\n\t\t\t\t} // User can upload.\n\t\t\n\t\t\t\telse\n\t\t\t\t\tthrow new \\Exception(\n\t\t\t\t\t\t\"Requestor cannot edit.\" );\t\t\t\t\t\t\t\t// !@! ==>\n\t\t\n\t\t\t} // User has roles.\n\t\t\n\t\t\telse\n\t\t\t\tthrow new \\Exception(\n\t\t\t\t\t\"Requestor has no roles.\" );\t\t\t\t\t\t\t\t// !@! ==>\n\t\t\n\t\t} // Provided submitter.\n\t\t\n\t\telse\n\t\t\tthrow new \\Exception(\n\t\t\t\t\"Missing requestor.\" );\t\t\t\t\t\t\t\t\t\t\t// !@! ==>\n\t\t\n\t}", "title": "" }, { "docid": "2b707898c6826465964b172e68793add", "score": "0.65167", "text": "public function dataValid(/* $_POST data */)\r\n {\r\n\r\n //return true or false\r\n }", "title": "" }, { "docid": "3c300a9cfaaeb26ce24a9b36373d42e6", "score": "0.6513726", "text": "protected function preValidate() {}", "title": "" }, { "docid": "35f372c4b4aabc807457831cd0418fb8", "score": "0.6497824", "text": "public function validateStepData()\n {\n \tif (is_null($this->production)) {\n \t\treturn false;\n \t}\n\n \t$rules = [\n \t\t'option' => 'required'\n \t];\n\n\t\t$option = array_get($this->production->data, 'option', '');\n\n\t\t\n\t\tif ($option == 'input') {\n\t\t\t$rules = array_merge($rules, [\n\t\t\t\t'data.number_of_nets' => 'required',\n\t\t\t\t'data.number_BGA_components' => 'required',\n\t\t\t\t'data.number_impedance' => 'required',\n\t\t\t\t'data.number_BGA_balls' => 'required',\n\t\t\t]);\n\t\t}elseif ($option == 'file') {\n\t\t\t$rules = array_merge($rules, [\n\t\t\t\t'data' => 'file',\n\t\t\t]);\n\t\t}\n\n\t\treturn $this->validate($rules, $this->production->data);\n }", "title": "" }, { "docid": "49c8d6e7bd06d1617b418859a567496a", "score": "0.6493596", "text": "public abstract function prepareInputData();", "title": "" }, { "docid": "1847a48943fc029a6a939dd51e0ab703", "score": "0.6493434", "text": "function validateData($request) {\n\tglobal $messages;\n\tinclude_once(ROOT_PATH.'classes/data/validate.class.php');\n\t$error = array();\n\t$validate = new Validate();\n\t$error['INPUT']['username'] = $validate->validUsername($request->element('username'));\n\t$error['INPUT']['password'] = $validate->validPassword($request->element('password'));\n\t$error['INPUT']['retype_pass'] = $validate->validPassword($request->element('retype_pass'),$messages['confirm']);\n\t$error['INPUT']['fullname'] = $validate->validString($request->element('fullname'),$messages['fullname']);\n\t$error['INPUT']['address'] = $validate->validString($request->element('address'),$messages['address']);\n\t$error['INPUT']['tel'] = $validate->pasteString($request->element('tel'),$messages['tel']);\n\t$error['INPUT']['email'] = $validate->pasteString($request->element('email'));\n\t$error['INPUT']['website_company'] = $validate->pasteString($request->element('website_company'));\n\t$error['INPUT']['about_company'] = $validate->pasteString($request->element('about_company'));\n\t\n\t$error['INPUT']['name_contact'] = $validate->validString($request->element('name_contact'),$messages['name_contact']);\n\t$error['INPUT']['address_contact'] = $validate->validString($request->element('address_contact'),$messages['address_contact']);\n\t$error['INPUT']['tel_contact'] = $validate->validString($request->element('tel_contact'),$messages['tel_contact']);\n\t$error['INPUT']['email_contact'] = $validate->validEmail($request->element('email_contact'));\n\t\n\t$code = strtolower($request->element('code'));\n\t$error['INPUT']['code'] = $validate->validCode($code,$messages['security']);\n\tif($error['INPUT']['username']['error'] || $error['INPUT']['password']['error'] || $error['INPUT']['retype_pass']['error'] || $error['INPUT']['fullname']['error'] || $error['INPUT']['address']['error'] || $error['INPUT']['name_contact']['error'] || $error['INPUT']['address_contact']['error'] || $error['INPUT']['tel_contact']['error'] || $error['INPUT']['email_contact']['error'] || $error['INPUT']['code']['error'] ) {\n\t\t$error['invalid'] = 1;\n\t\treturn $error;\n\t}\n\t$error['invalid'] = 0;\n\treturn $error;\n}", "title": "" }, { "docid": "f7c18d0015e9a4f2dc22a13e21eb7df2", "score": "0.6488004", "text": "function validInputs() {\n global $template_data_post, $template_id_post, $last_modified_post;\n global $responseObject;\n\n // Is email empty\n // does not check template count because field may be null\n if(empty($template_id_post) || empty($template_data_post) || empty($last_modified_post)) {\n $responseObject['message']=\"One of more fields are missing. Please complete. \";\n return false; // invalid\n }\n\n //$template_data_post = filter_var($template_data_post,FILTER_SANITIZE_STRING);\n\n return true; // tests passed -> valid\n}", "title": "" }, { "docid": "72abfd8d35bc809eef7bbd02d01ec906", "score": "0.647918", "text": "public function preprocess_data() {\n assert(1);\n }", "title": "" }, { "docid": "f8581dc686342241a4d8df8a00430f84", "score": "0.64781934", "text": "protected function prepareForValidation()\n {\n }", "title": "" }, { "docid": "83a6841699a9152ebbff68e47e32f1e7", "score": "0.6474878", "text": "public function validateInput($input)\n {\n }", "title": "" }, { "docid": "ebbdb1e48ee76301bdd26463fbd7fdaf", "score": "0.64706993", "text": "public function validate()\n {\n $this->prepare();\n parent::validate();\n }", "title": "" }, { "docid": "76f4e2059c252a152ef993db8c39730b", "score": "0.64541817", "text": "function validateInput($data, $fieldNum) {\n global $errorCount;\n //if error then fail\n if (empty($data)) {\n displayRequired($fieldNum);\n ++$errorCount;\n $retval = \"\";\n }\n // if no error then succeed\n else {\n $retval = trim($data);\n $retval = stripslashes($retval);\n }\n return $retval;\n }", "title": "" }, { "docid": "4230cf91656102621dcbb5374ab07985", "score": "0.6442686", "text": "protected function validate_data() {\n parent::validate_data();\n\n if (!isset($this->other['format'])) {\n throw new \\coding_exception('The \\'format\\' must be set in \\'other\\'.');\n }\n }", "title": "" }, { "docid": "0ec5b75a8cae4359105e121d508a0631", "score": "0.64421266", "text": "private function _validate()\n\t{\n\t\t$data = array();\n\t\t$data['error_string'] = array();\n\t\t$data['inputerror'] = array();\n\t\t$data['status'] = TRUE;\n\n\t\tif($this->input->post('VillageName') == '')\n\t\t{\n\t\t\t$data['inputerror'][] = 'VillageName';\n\t\t\t$data['error_string'][] = 'Village name is required';\n\t\t\t$data['status'] = FALSE;\n\t\t}\n\t\tif($data['status'] === FALSE)\n\t\t{\n\t\t\techo json_encode($data);\n\t\t\texit();\n\t\t}\n\t}", "title": "" }, { "docid": "0b49613ff46898f8a67c9c2ad2423093", "score": "0.6436848", "text": "function process_fields($obj, $data, $required=array(), $allowChars=array())\n{ \n\t$disallowChars = array(\"'\", \"\\\"\", \"\\\\\", \"(\", \")\", \"/\", \"<\", \">\", \"!\", \"#\", \"%\", \"&\", \"?\", \"$\", \":\", \";\", \"=\", \"*\");\n\tif(!empty($allowChars)) $disallowChars = array_diff($disallowChars, $allowChars);\n\t# Did the data set pass the requried check\n\t$hasPassed = true;\n\t$finalData = array();\n\t$msg = \"\";\n\n\tforeach($data AS $key=>$value)\n\t{\n\t\t# Do not validate arrays\n\t\tif(!is_array($value))\n\t\t{\n\t\t\t$value = htmlentities(trim($value), ENT_QUOTES);\n\t\t\t# Add if the string is not empty and does not contain any of the disallowed characters\n\t\t\tif(!empty($value) && !(0 < count(array_intersect(str_split(strtolower($value)), $disallowChars))) )\n\t\t\t{\n\n\t\t\t\t# If this is a birthday, check to see whether they are above 18 years of age\n\t\t\t\tif($key == 'birthday'){\n\t\t\t\t\t$userDate = new DateTime($value);\n\t\t\t\t\t$today = new DateTime('now');\n\t\t\t\t\t$difference = $userDate->diff($today);\n\n\t\t\t\t\tif(!($difference->y >= 18)){\n\t\t\t\t\t\t$msg = \"WARNING: The submitted birth date is not valid for a teacher.\";\n\t\t\t\t\t\t$hasPassed = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($key =='averageworkload')\n\t\t\t\t{\n\t\t\t\t\tif($value > 45)\n\t\t\t\t\t{\n\t\t\t\t\t\t$msg = \"WARNING: Average weekly workload exceeds the set maximum \";\n\t\t\t\t\t\t$hasPassed = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$obj->native_session->set($key, $value);\n\t\t\t\t$finalData[$key] = $value;\n\t\t\t}\n\t\t\t# Catch the case where a required field was not entered\n\t\t\telse if(in_array($key, $required))\n\t\t\t{\n\t\t\t\t$hasPassed = false;\n\t\t\t\t$msg = \"WARNING: Invalid Characters Entered.\";\n\t\t\t\t$finalData[$key] = $value;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn array('boolean'=>$hasPassed, 'data'=>$finalData, 'msg'=>$msg);\n}", "title": "" }, { "docid": "fb37bbb926cf51a36a00be38b3c6cbdf", "score": "0.6427473", "text": "protected function validate(){\n $this->validateRequiredFields();\n $this->validateNumericFields();\n $this->validateNameFields();\n $this->validateFieldLengths();\n $this->validateStrictPosInts();\n $this->validateFieldBoundaries();\n }", "title": "" }, { "docid": "6afaf4142c4bb951b3b7198b9fd4df2f", "score": "0.6422223", "text": "public function checkGenericInputData($data): void\n {\n if (! isset($data['idSession'], $data['hour'], $data['dealerTip'])) {\n throw BaseException::incompleteDataException();\n }\n\n if (!is_numeric($data['dealerTip']) || $data['dealerTip'] < 0) {\n throw DealerTipExceptions::dealerTipInvalidException();\n }\n }", "title": "" }, { "docid": "371361cb57fe7b967c70a56774f1ec6d", "score": "0.6413761", "text": "public function validate()\n\t{\n\t\t$mandatory = $this->mandatory;\n\t\t$options = deserialize($this->getPost($this->strName));\n\n\t\t// Check labels only (values can be empty)\n\t\tif (is_array($options))\n\t\t{\n\t\t\tforeach ($options as $key=>$option)\n\t\t\t{\n\t\t\t\t// Unset empty rows\n\t\t\t\tif ($option['label'] == '')\n\t\t\t\t{\n\t\t\t\t\tunset($options[$key]);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$options[$key]['label'] = trim($option['label']);\n\t\t\t\t$options[$key]['value'] = trim($option['value']);\n\n\t\t\t\tif ($options[$key]['label'] != '')\n\t\t\t\t{\n\t\t\t\t\t$this->mandatory = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$options = is_array($options) ? array_values($options) : array();\n\t\t$varInput = $this->validator($options);\n\n\t\tif (!$this->hasErrors())\n\t\t{\n\t\t\t$this->varValue = $varInput;\n\t\t}\n\n\t\t// Reset the property\n\t\tif ($mandatory)\n\t\t{\n\t\t\t$this->mandatory = true;\n\t\t}\n\t}", "title": "" }, { "docid": "d8a649cc7a275eb9a614976b06cb9825", "score": "0.64088637", "text": "public function validateUserData(&$data) {\n $result = true;\n\n if(array_key_exists('ErrorIdentifierMessage', $data)) {\n if(!empty($data['ErrorIdentifierMessage'])) $result = false;\n } else {\n $data['ErrorIdentifierMessage'] = '';\n }\n\n $data['ErrorTitleMessage'] = '';\n $data['ErrorAuthorMessage'] = '';\n $data['ErrorContentMessage'] = '';\n $data['ErrorGenreMultiSelectMessage'] = '';\n\n $identifierEmpty = false;\n //checks to see if identifier is empty\n if(empty($data['Identifier'])) {\n $data['ErrorIdentifierMessage'] = 'Identifier cannot be empty';\n $result = false;\n $identifierEmpty = true;\n }\n\n if(strlen($data['Title']) > 75) {\n $data['ErrorTitleMessage'] = 'Title length exceeds limit of 75';\n $result = false;\n }\n\n if(strlen($data['Author']) > 35) {\n $data['ErrorAuthorMessage'] = 'Author length exceeds limit of 35';\n $result = false;\n }\n\n if(strlen($data['Content']) > 5000) {\n $data['ErrorContentMessage'] = 'Content length exceeds limit of 5000';\n $result = false;\n }\n\n if(empty($data['genremultiselect'])) {\n $data['ErrorGenreMultiSelectMessage'] = 'Error. Select at least one genre';\n $result = false;\n }\n return $result;\n }", "title": "" }, { "docid": "bd51fa3014644b74cf1df3bd0d826a52", "score": "0.6407218", "text": "private function check_input() {\n\t\t$error_array = array();\n\t\tif (!isset($_POST['title_sr']) || empty($_POST['title_sr'])) {\n\t\t\t$error_array['title_sr'] = \"Morate uneti naslov usluge.\";\n\t\t}\n\t\tif (!isset($_POST['body_sr']) || empty($_POST['body_sr'])) {\n\t\t\t$error_array['body_sr'] = \"Morate uneti opis usluge.\";\n\t\t}\n\n\t\treturn $error_array;\n\t}", "title": "" }, { "docid": "fbc58607486fa7df951607d1e61a47b1", "score": "0.63999784", "text": "protected function validate_request() {\n\n\t\t}", "title": "" }, { "docid": "5813efb681941436d3a7bd9b54a7d323", "score": "0.6397437", "text": "protected function verify_statistics_input(){\n if(isset($_POST['format'])){\n switch($_POST['format']){\n case 'Map':{\n \n if(!isset($_POST['input-x']) || strcmp($_POST['input-x'],'None')==0){\n \n return false;\n }\n break;\n }\n case 'Graph':{\n if(!isset($_POST['input-x']) || strcmp($_POST['input-x'],'None')==0){\n return false;\n }\n if(!isset($_POST['input-y']) || strcmp($_POST['input-y'],'None')==0){\n return false;\n }\n break;\n }\n case 'BarChart':{\n if(!isset($_POST['input-x']) || strcmp($_POST['input-x'],'None')==0){\n return false;\n }\n if(!isset($_POST['input-y']) || strcmp($_POST['input-y'],'None')==0){\n return false;\n }\n break;\n }\n case 'PieChart':{\n if(!isset($_POST['input-x']) || strcmp($_POST['input-x'],'None')==0){\n return false;\n }\n break;\n }\n }\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "0060bb1b5886325b3e008a7931fbab93", "score": "0.6395511", "text": "public function checkParams(){\n\t\t$this->params->switchContext();\n\t\t//check year is an integer\n\t\t$this->params->checkYearIsNotNull($this->year);\n\t\t//check year is an integer\n\t\t$this->params->checkYearIsNumeric($this->year);\n\t\t//check year is in the valid yer list\n\t\t$this->params->checkYearValid($this->year,$this->datasource,$this->logger);\n\t\t\n\t}", "title": "" }, { "docid": "db9a28b89fb06e11170779e8d481acf9", "score": "0.63891816", "text": "public function validateEmpty($data)\n {\n }", "title": "" }, { "docid": "dbeac2fd2e71e24e9cfaad56c173ddfa", "score": "0.6386433", "text": "public function beforeValidate(array &$data)\n {\n }", "title": "" }, { "docid": "1cc2447c89ac0bee4ce82bb4d66dde6b", "score": "0.6371879", "text": "protected function pre_validate($data) {\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "2095fb299202b58579d449f4af40c750", "score": "0.6368244", "text": "function validate_data($params) {\n $msg = \"\";\n if(strlen($params[0]) == 0)\n $msg .= \"Please enter your first name<br />\"; \n elseif(strlen($params[2]) == 0)\n $msg .= \"Please enter your last name<br />\"; \n elseif(strlen($params[3]) == 0)\n $msg .= \"Please enter your Address<br />\"; \n elseif(strlen($params[5]) == 0)\n $msg .= \"Please enter your City<br />\"; \n elseif(strlen($params[5]) == 0)\n $msg .= \"The city appears to be invalid, please use only characters<br />\"; \t\t\n elseif(strlen($params[6]) == 0)\n $msg .= \"Please enter your State<br />\";\n\telseif(strlen($params[6]) != 2)\n $msg .= \"The state appears to be invalid, please use the two letter state abbreviation<br />\";\n\telseif(strlen($params[7]) == 0)\n $msg .= \"Please enter your zip code<br />\";\n\telseif(!is_numeric($params[7]))\n $msg .= \"The zip code appears to be invalid, numbers only please<br />\";\n\telseif(strlen($params[7]) != 5)\n $msg .= \"The zip code must have exactly five digits<br />\";\n\telseif(strlen($params[8]) == 0)\n $msg .= \"Please enter your area code<br />\"; \n\telseif(!is_numeric($params[8]))\n $msg .= \"The area code appears to be invalid, numbers only please<br />\"; \n\telseif(strlen($params[8]) != 3)\n $msg .= \"The area code must have exactly three digits<br />\"; \n elseif(strlen($params[9]) == 0)\n $msg .= \"Please enter your phone number prefix<br />\";\n\telseif(!is_numeric($params[9]))\n $msg .= \"The phone number prefix appears to be invalid, numbers only please<br />\";\n elseif(strlen($params[9]) != 3)\n $msg .= \"The phone number prefix must have exactly three digits<br />\";\n elseif(strlen($params[10]) == 0)\n $msg .= \"Please enter your phone number<br />\";\n elseif(!is_numeric($params[10]))\n $msg .= \"The phone number appears to be invalid, numbers only please<br />\";\n elseif(strlen($params[10]) != 4)\n $msg .= \"The phone number must have exactly four digits<br />\";\n elseif(strlen($params[11]) == 0)\n $msg .= \"Please enter your Email address<br />\";\n elseif(!filter_var($params[11], FILTER_VALIDATE_EMAIL))\n $msg .= \"The email address appears to be invalid<br/>\"; \n\telseif(strlen($params[14]) == 0)\n $msg .= \"Please select your gender<br />\";\n elseif(strlen($params[12]) == 0) \n $msg .= \"Please enter your Date of Birth<br />\";\n \telseif(isValidDob($params[12]) == false)\n $msg .= \"Please enter valid date in yyyy/mm/dd format<br />\";\n\telseif(isValidAge($params[12]) == false)\n $msg .= \"Sorry, you should be atleast 16 years old to enter the Marathon<br />\";\n\telseif(strlen($params[15]) == 0)\n $msg .= \"Please select your experience level<br />\";\n\telseif(strlen($params[16]) == 0)\n $msg .= \"Please select your category<br />\";\n\telseif(strlen($params[17]) == 0)\n $msg .= \"Please select your image<br />\";\n\n if($msg) \n\t{\n write_form_error_page($msg);\n exit;\n }\n }", "title": "" }, { "docid": "16750e02da18edf62c9d147064937f16", "score": "0.63655436", "text": "abstract public function validateRequired();", "title": "" } ]
f196657d45df643e805aedf92f38f815
Constructor to set initial or default values of member properties
[ { "docid": "0f8abbef600d4bcc4db4be1b5a5ea167", "score": "0.0", "text": "public function __construct()\n {\n if (2 == func_num_args()) {\n $this->perPax = func_get_arg(0);\n $this->perBooking = func_get_arg(1);\n }\n }", "title": "" } ]
[ { "docid": "c1f11ded387a33d8126af329dfe35e1b", "score": "0.75892276", "text": "function __construct(){\n\t\t\t$this->initPropertiesFromArray(array());\n\t\t}", "title": "" }, { "docid": "1f5e9f3d91de3b58b322101c2d651b8c", "score": "0.7372358", "text": "function __construct() {\r\n\t\t\t$this->properties = func_get_arg(0);\r\n\t\t}", "title": "" }, { "docid": "1f5e9f3d91de3b58b322101c2d651b8c", "score": "0.7372358", "text": "function __construct() {\r\n\t\t\t$this->properties = func_get_arg(0);\r\n\t\t}", "title": "" }, { "docid": "1c830d837793d43b67dba09aac78e05d", "score": "0.7212517", "text": "public function __construct()\n\t{\n\t\t// loop through the model's properties\n\t\tforeach (static::$properties as $property) {\n\t\t\t// initialize each property to null\n\t\t\t$this->data[$property] = null;\n\t\t}\n\t\t\n\t\treturn;\n\t}", "title": "" }, { "docid": "dfbfa3b38024a46d0d88532f2e142d84", "score": "0.71779066", "text": "public function __construct()\n {\n $this->applyDefaultValues();\n }", "title": "" }, { "docid": "dfbfa3b38024a46d0d88532f2e142d84", "score": "0.71779066", "text": "public function __construct()\n {\n $this->applyDefaultValues();\n }", "title": "" }, { "docid": "dfbfa3b38024a46d0d88532f2e142d84", "score": "0.71779066", "text": "public function __construct()\n {\n $this->applyDefaultValues();\n }", "title": "" }, { "docid": "e4f790c9cbc3deb61c644a8a1891c2f3", "score": "0.7102612", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "title": "" }, { "docid": "e4f790c9cbc3deb61c644a8a1891c2f3", "score": "0.7102612", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "title": "" }, { "docid": "e4f790c9cbc3deb61c644a8a1891c2f3", "score": "0.7102612", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "title": "" }, { "docid": "e4f790c9cbc3deb61c644a8a1891c2f3", "score": "0.7102612", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "title": "" }, { "docid": "e4f790c9cbc3deb61c644a8a1891c2f3", "score": "0.7102612", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "title": "" }, { "docid": "e4f790c9cbc3deb61c644a8a1891c2f3", "score": "0.7102612", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "title": "" }, { "docid": "e4f790c9cbc3deb61c644a8a1891c2f3", "score": "0.7102612", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "title": "" }, { "docid": "e4f790c9cbc3deb61c644a8a1891c2f3", "score": "0.7102612", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "title": "" }, { "docid": "e4f790c9cbc3deb61c644a8a1891c2f3", "score": "0.7102612", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "title": "" }, { "docid": "e4f790c9cbc3deb61c644a8a1891c2f3", "score": "0.7102612", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "title": "" }, { "docid": "e4f790c9cbc3deb61c644a8a1891c2f3", "score": "0.7102612", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}", "title": "" }, { "docid": "a2ffc745fc1cfc0e1624ea116c75db2e", "score": "0.70935595", "text": "public function __construct() {\r\n\t\t$this->properties = array();\r\n\t}", "title": "" }, { "docid": "a2ffc745fc1cfc0e1624ea116c75db2e", "score": "0.70935595", "text": "public function __construct() {\r\n\t\t$this->properties = array();\r\n\t}", "title": "" }, { "docid": "8516bfc8a8ae75d29ecc129cf9dd1be9", "score": "0.6857871", "text": "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "title": "" }, { "docid": "8516bfc8a8ae75d29ecc129cf9dd1be9", "score": "0.6857871", "text": "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "title": "" }, { "docid": "8516bfc8a8ae75d29ecc129cf9dd1be9", "score": "0.6857871", "text": "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "title": "" }, { "docid": "8516bfc8a8ae75d29ecc129cf9dd1be9", "score": "0.6857871", "text": "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "title": "" }, { "docid": "8516bfc8a8ae75d29ecc129cf9dd1be9", "score": "0.6857871", "text": "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "title": "" }, { "docid": "8516bfc8a8ae75d29ecc129cf9dd1be9", "score": "0.6857871", "text": "public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }", "title": "" }, { "docid": "43eb3ddcf0b1b58d676698725c02260f", "score": "0.68191326", "text": "public function __construct()\n {\n $this->setDefaults();\n }", "title": "" }, { "docid": "bf62190dcc36dfaf49b3598355c82841", "score": "0.68115866", "text": "protected function init_properties()\n\t{\n\t}", "title": "" }, { "docid": "83557a4d037bbacff15da27863deb992", "score": "0.6754772", "text": "public function __construct() {\n $this->propIndexes = array_flip([\n \"Mn\", \"Mc\", \"Me\", \"Nd\", \"Nl\", \"No\",\n \"Zs\", \"Zl\", \"Zp\", \"Cc\", \"Cf\", \"Cs\",\n \"Co\", \"Cn\", \"Lu\", \"Ll\", \"Lt\", \"Lm\",\n \"Lo\", \"Pc\", \"Pd\", \"Ps\", \"Pe\", \"Po\",\n \"Sm\", \"Sc\", \"Sk\", \"So\", \"L\", \"R\",\n \"EN\", \"ES\", \"ET\", \"AN\", \"CS\", \"B\",\n \"S\", \"WS\", \"ON\", \"Pi\", \"Pf\", \"AL\",\n \"Cased\", \"Case_Ignorable\"\n ]);\n $this->numProps = count($this->propIndexes);\n\n $this->propRanges = array_fill(0, $this->numProps, []);\n $this->caseMaps = [\n 'upper' => [],\n 'lower' => [],\n 'title' => [],\n 'fold' => [],\n ];\n $this->extraCaseData = [];\n }", "title": "" }, { "docid": "babf6c26e40a2b346647dd80f096911f", "score": "0.67158175", "text": "public function __construct($properties=array()) {\r\n \t$this->populate( $properties );\r\n }", "title": "" }, { "docid": "51497a6a32b99a03817494721e821ece", "score": "0.6699234", "text": "public function __construct() {\n $this->name = null;\n $this->dataType = null;\n $this->firstLength = null;\n $this->secondLength = null;\n $this->allowsNull = false;\n $this->isReadOnly = false;\n $this->referencedTableName = null;\n }", "title": "" }, { "docid": "38636781a315385ead0cd1a699f7e2ea", "score": "0.66936636", "text": "abstract public function initialize_properties();", "title": "" }, { "docid": "8512c5e9bb77d3a1d94c43279da97d4f", "score": "0.6627589", "text": "public function __construct() {\n\t\t\t$this->setFields(array());\n\t\t}", "title": "" }, { "docid": "a3d3d939ff414be83db1ff2c774b3e3a", "score": "0.6621481", "text": "public function __construct()\n {\n if($this->get() === null)\n $this->set($this->empty());\n }", "title": "" }, { "docid": "ca36c3f96d610691a41532926f6b75ca", "score": "0.6612246", "text": "function __construct(array $properties = array())\n {\n // Set properties\n $this->fill($properties);\n }", "title": "" }, { "docid": "058307173857adab08ad9d8e7cf82a03", "score": "0.6608638", "text": "public function __construct(Properties $prop) {\n $this->prop= $prop;\n }", "title": "" }, { "docid": "17d75389e1cfb9239ed06cd23ae49750", "score": "0.6583739", "text": "function __construct ($data = array()) {\r\n if (count($data)) {\r\n foreach ($data as $key => $value) {\r\n if (property_exists($this, $key)) {\r\n $this->{$key} = $value;\r\n }\r\n }\r\n }\r\n\r\n // Defaults\r\n if ($this->title === null) $this->title = '';\r\n if ($this->value === null) $this->value = '';\r\n if ($this->short === null) $this->short = 'false';\r\n }", "title": "" }, { "docid": "311782428593bb71e5a5a034cc5a77d7", "score": "0.65720624", "text": "function __construct($data = array()) {\n if (count($data)) {\n foreach ($data as $key => $value) {\n if (property_exists($this, $key)) {\n $this->{$key} = $value;\n }\n }\n }\n\n // Set some more defaults.\n if (!empty(static::$fields_int)) {\n foreach (static::$fields_int as $field) {\n if (empty($this->{$field})) $this->{$field} = 0;\n else if (!empty($this->{$field}) && !is_int($this->{$field})) $this->{$field} = (int)$this->{$field};\n }\n }\n }", "title": "" }, { "docid": "58a6176bea0b3b4feb31a09abafb1263", "score": "0.65623313", "text": "private function __construct()\n {\n if ($this->properties === NULL) {\n $this->properties = \\config::get_instance()\n ->get_config('polls2');\n }\n }", "title": "" }, { "docid": "dee27a976ace45694e561a8848d50358", "score": "0.6525067", "text": "public function __construct()\n {\n $this->setProductID();\n $this->setPayItemID();\n $this->setMacKey();\n $this->setCurrency();\n $this->setBaseUrls();\n }", "title": "" }, { "docid": "906a551a8379358f7c0c2a475b40acac", "score": "0.6520554", "text": "public function __construct()\r\n {\r\n //set validations on field\r\n $this->validations = [\r\n '',\r\n ];\r\n\r\n //set live validations on field\r\n $this->liveValidations = [\r\n ];\r\n\r\n //set field info\r\n $this->fieldInfo = [\r\n 'help' => '',\r\n ];\r\n\r\n //set presentation view\r\n $this->setPresentation('select_default');\r\n }", "title": "" }, { "docid": "bf7f14f31ae102cab48fe2e4f952bed0", "score": "0.6501184", "text": "private final function _setDefaults() {\n\t\tforeach ( $this->getModel() as $property => $definition ) {\n\t\t\tif ( !property_exists($this, $property) ) {\n\t\t\t\t$this->$property = isset($definition->default) ? $definition->default : null;\n\t\t\t}\n\t\t} // foreach\n\t}", "title": "" }, { "docid": "743e5caad342d1fb86163e2bc0bba1f0", "score": "0.6483402", "text": "protected function init()\n\t{\n\t\t// The public field mapping to the local properties.\n\t\t$this->_public_fields = array(\n\t\t\t'id' => 'UserID',\n\t\t\t'username' => 'Username',\n\t\t\t'email' => 'Email',\n\t\t\t'name' => 'Name',\n\t\t\t'profile' => 'profile',\n\t\t);\n\t}", "title": "" }, { "docid": "52b32f70377214973d84b512cb9a95f2", "score": "0.64302534", "text": "public function __construct()\n {\n $this->settings = $this->getDefaultSettings();\n }", "title": "" }, { "docid": "270f1a34402c4bd6e715daa3e153ff18", "score": "0.64209414", "text": "function __construct()\r\n {\r\n $this->property_info_data = new property_info_data;\r\n parent::__construct();\r\n }", "title": "" }, { "docid": "7e942dd0b57d2d666c86ac3ffa79d7ba", "score": "0.6416226", "text": "function __construct($data = array()) {\r\n if (count($data)) {\r\n foreach ($data as $key => $value) {\r\n if (property_exists($this, $key)) {\r\n $this->{$key} = $value;\r\n }\r\n }\r\n }\r\n\r\n // 4. Set any defaults.\r\n $all_mods = static::$all_modifiers;\r\n foreach ($all_mods as $mod) {\r\n switch ($mod) {\r\n default:\r\n if (empty($this->{$mod}))\r\n $this->{$mod} = $this->__create_modifier_list();\r\n break;\r\n }\r\n }\r\n }", "title": "" }, { "docid": "a04d16058e0fe9bbebe70ee7bc132780", "score": "0.641504", "text": "function __construct() {\n $this->form_detailed_presentation_id = 0;\n $this->uploads = '';\n $this->created_date_time = '0000-00-00 00:00:00';\n $this->updated_date_time = '0000-00-00 00:00:00';\n }", "title": "" }, { "docid": "9e21ce033758965cfcf6349ce7019ca2", "score": "0.64081794", "text": "function __construct() {\n\t\t$this->set_default_props( array(\n\t\t\t'vertical' => false,\n\t\t\t'center' => false,\n\t\t\t'dark' => false,\n\t\t\t'menu_items' => array(),\n\t\t\t'current_page_id' => 0,\n\t\t\t'icon_menu' => false\n\t\t));\n\t}", "title": "" }, { "docid": "f5ca509a9ec52ef50fcfa9b1ad5eb187", "score": "0.6400278", "text": "function __construct() {\n\t\t$this->set_default_props( array(\n\t\t\t'posts' => array()\n\t\t));\n\t}", "title": "" }, { "docid": "1f3fe5719d53e3e9490a552605e97238", "score": "0.6395358", "text": "public function __construct()\r\n {\r\n $this->validations = [\r\n 'required',\r\n ];\r\n\r\n //set live validations on field\r\n $this->liveValidations = [\r\n ];\r\n\r\n //set field info\r\n $this->fieldInfo = [\r\n 'help' => '',\r\n ];\r\n\r\n //set presentation view\r\n $this->setPresentation('select_default');\r\n }", "title": "" }, { "docid": "4030a29876cd2d29e53bb39c3ecac945", "score": "0.6395252", "text": "protected function pre_init_properties()\n\t{\n\t}", "title": "" }, { "docid": "909e64e2ce826c286dda67f4ec38e4b1", "score": "0.63804734", "text": "public function __construct()\n\t{\n\t\tDinklyDataConfig::setActiveConnection('super_admin');\n\n\t\t//Prep for messaging\n\t\t$this->good = null;\n\t\t$this->bad = null;\n\n\t\t//Get our settings\n\t\t$this->setting_keys = CmsSettingKeyCollection::getKeys();\n\t\t$this->setting_values = CmsSettingCollection::getAll(true);\n\t}", "title": "" }, { "docid": "1d18154557981ae9ed6ea67ef9efe2a9", "score": "0.6378301", "text": "public function __construct() {\n\t\t$this->setApiKey();\n\t\t$this->setSmartsendLicensekey();\n\t\t$this->setSmartsendUsername();\n\t\t$this->setCmsVersion();\n\t\t$this->setCmsSystem();\n\t\t$this->setModuleVersion();\n\t\t$this->setCmsLanguage();\n\t\t$this->setMessageStringArray();\n\t\t$this->setSettings();\n\t}", "title": "" }, { "docid": "b43dc85dafdf031edd9156d8046096eb", "score": "0.63718283", "text": "public function init()\n {\n foreach($this->attributes() as $attribute) {\n $this->$attribute = Settings::get(explode('_', $attribute));\n }\n }", "title": "" }, { "docid": "05c9eacae16956f078038608bdeb6c6b", "score": "0.63662815", "text": "protected function __construct()\n {\n $this->name = null;\n $this->type = null;\n $this->typeSize = null;\n $this->autoIncrement = false;\n $this->nullable = true;\n $this->uniqueIndex = false;\n $this->primaryKey = false;\n $this->foreignKey = false;\n $this->foreignKeyReferencedSchema = null;\n $this->foreignKeyReferencedTable = null;\n $this->foreignKeyReferencedColumn = null;\n $this->onDelete = \"restrict\";\n $this->onUpdate = \"restrict\";\n }", "title": "" }, { "docid": "918d3b9bd075e646048eb0174af6341c", "score": "0.63631344", "text": "public function __construct()\n {\n if (self::$missing === null) {\n self::$missing = new stdClass();\n }\n if (self::$present === null) {\n self::$present = new stdClass();\n }\n }", "title": "" }, { "docid": "3b1e87a41da2db37b65d8d910c52dff8", "score": "0.6358842", "text": "function __construct(array $data=[])\n {\n foreach($data as $key => $value)\n {\n $this->__create_property($key, $value);\n }\n }", "title": "" }, { "docid": "730fc851d44852d59a0d318a8e66fbc1", "score": "0.6354465", "text": "public function __construct($properties) {\n \n foreach($properties as $key => $value) {\n\n $this->$key = $value;\n\n }\n\n }", "title": "" }, { "docid": "395df7678d0809edb89d9a72b90ec99e", "score": "0.63533217", "text": "public function __construct( array $properties = array() )\n {\n foreach ( $properties as $property => $value )\n {\n $this->__isset($property) && $this->$property = $value;\n }\n }", "title": "" }, { "docid": "2b3195110b23c4ef87c1802a0dcf480c", "score": "0.6345006", "text": "public function __construct()\n\t{\n\t\tif ( !$this->_attrdefs ) \n\t\t\t$this->_attrdefs = $this->attrdefs();\n\n\t\tforeach ( $this->_attrdefs as $name => & $attr ) {\n\t\t\t$this->_init_attrdef( $name );\n\t\t}\n\t}", "title": "" }, { "docid": "5f3acc03d9a6af7e4c167a24528e283a", "score": "0.6340019", "text": "public function __construct($properties)\n {\n\n $properties = wp_parse_args($properties, self::getDefaults());\n foreach ($properties as $k => $v) {\n $this->$k = $v;\n }\n\n }", "title": "" }, { "docid": "6036f51b2794163092173f9a0c119925", "score": "0.6330724", "text": "public function __construct() {\n\t\tglobal $wpdb;\n\n\t\tself::$_wpdb =& $wpdb;\n\t\tself::$_wpdb->show_errors();\n\n\t\tforeach ($this->dbMapping as $prop => $dbField) {\n\t\t\t$this->properties[ $prop ] = '';\n\t\t}\n\t\tforeach ($this->externalProperties as $prop => $dbField) {\n\t\t\t$this->properties[ $prop ] = '';\n\t\t}\n\n\t\tif (method_exists($this, 'init')) {\n\t\t\t$this->init();\n\t\t}\n\t}", "title": "" }, { "docid": "d76af26f0f0233e2a9c168247a37dbb4", "score": "0.62993366", "text": "public function __construct()\n\t{\n\t\t// Make sure that parent constructor is always invoked, since that\n\t\t// is where any default values for this object are set.\n\t\tparent::__construct();\n\t}", "title": "" }, { "docid": "d76af26f0f0233e2a9c168247a37dbb4", "score": "0.62993366", "text": "public function __construct()\n\t{\n\t\t// Make sure that parent constructor is always invoked, since that\n\t\t// is where any default values for this object are set.\n\t\tparent::__construct();\n\t}", "title": "" }, { "docid": "d76af26f0f0233e2a9c168247a37dbb4", "score": "0.62993366", "text": "public function __construct()\n\t{\n\t\t// Make sure that parent constructor is always invoked, since that\n\t\t// is where any default values for this object are set.\n\t\tparent::__construct();\n\t}", "title": "" }, { "docid": "d76af26f0f0233e2a9c168247a37dbb4", "score": "0.62993366", "text": "public function __construct()\n\t{\n\t\t// Make sure that parent constructor is always invoked, since that\n\t\t// is where any default values for this object are set.\n\t\tparent::__construct();\n\t}", "title": "" }, { "docid": "d76af26f0f0233e2a9c168247a37dbb4", "score": "0.62993366", "text": "public function __construct()\n\t{\n\t\t// Make sure that parent constructor is always invoked, since that\n\t\t// is where any default values for this object are set.\n\t\tparent::__construct();\n\t}", "title": "" }, { "docid": "d76af26f0f0233e2a9c168247a37dbb4", "score": "0.62993366", "text": "public function __construct()\n\t{\n\t\t// Make sure that parent constructor is always invoked, since that\n\t\t// is where any default values for this object are set.\n\t\tparent::__construct();\n\t}", "title": "" }, { "docid": "a85531a336e6d5e3f30249a4670f7a70", "score": "0.62748754", "text": "public function __construct()\n {\n $this->setMouvement(new Mouvement());\n $this->setCompteModel(new CompteModel());\n }", "title": "" }, { "docid": "f180ee9690f03d128e54c8d938cd9c06", "score": "0.62726396", "text": "public function __construct()\n {\n $this->initDefaultUri();\n $this->initDefaultParams();\n $this->initDefaultMethod();\n $this->initDefaultHeaders();\n $this->initDefaultIp();\n }", "title": "" }, { "docid": "38bfafeb01019ed0f9738deda69c5450", "score": "0.6223521", "text": "public function __construct()\n {\n $this->_arr = array();\n $this->_default_val = null;\n }", "title": "" }, { "docid": "40edda2e6a72bbb21524d2988918318d", "score": "0.62205267", "text": "public function __construct() {\n // include transfer channel check.\n// $this->transferChannelRef = new TransferChannel();\n $this->backupDataRef = new BackupData();\n $this->date = Utils::getDateInstance();\n $this->enableMirror = false;\n }", "title": "" }, { "docid": "d544e25e6145c63279d1bdb4ebb37894", "score": "0.621832", "text": "public function __construct()\n {\n $this->alignment = new Alignment();\n $this->font = new Font();\n $this->bulletStyle = new Bullet();\n }", "title": "" }, { "docid": "c161609d8d229ea397f7f730337448a5", "score": "0.6213958", "text": "public function __construct()\n {\n $this->amount = 0;\n $this->recurring = false;\n $this->sended = false;\n $this->donations = new ArrayCollection();\n }", "title": "" }, { "docid": "ecbc12fe904205589c0eed70813acfa0", "score": "0.62138426", "text": "public function __construct(Array $props = array())\r\n {\r\n $this->reset();\r\n\r\n foreach ($props AS $key => $val)\r\n {\r\n $method_name = 'set_' .$key;\r\n\r\n if (method_exists($this, $method_name))\r\n {\r\n $this->$method_name($val);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "ecbc12fe904205589c0eed70813acfa0", "score": "0.62138426", "text": "public function __construct(Array $props = array())\r\n {\r\n $this->reset();\r\n\r\n foreach ($props AS $key => $val)\r\n {\r\n $method_name = 'set_' .$key;\r\n\r\n if (method_exists($this, $method_name))\r\n {\r\n $this->$method_name($val);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "d8ab03b81edf40bf4493beceef1c2de2", "score": "0.62069386", "text": "public function __construct()\n {\n foreach (config('datatablecruds') as $key => $value) {\n if (empty($this->$key)) {\n $this->$key = $value;\n }\n }\n }", "title": "" }, { "docid": "a2a7f8695c4d4002db17c2ce39708b2e", "score": "0.6203551", "text": "public function __construct($properties = array()) {\n $this->properties = $properties;\n }", "title": "" }, { "docid": "d0beb7f941cc593bad1af81cada1a1c8", "score": "0.62004745", "text": "public function __construct() {\n if (isset($this->id) === false) {\n $this->id = '0';\n $this->description = '';\n $this->autogen = 0;\n }\n }", "title": "" }, { "docid": "a19b77a5a8fd89bdc4707119eff71160", "score": "0.6186206", "text": "protected function __construct() {\n\n // Set user status\n $this->_setUserInfo();\n }", "title": "" }, { "docid": "3577660a58c6ff8e5350c874aca075ff", "score": "0.61836225", "text": "protected function __construct() {\n\t\t//Generated by ManagerGenerator::generateConstruct() on 02/08/2017 14:24:29\n\t}", "title": "" }, { "docid": "d5458c8105b587a3a1d7b3359ce62596", "score": "0.6179089", "text": "public function __construct(array $properties = array())\n {\n }", "title": "" }, { "docid": "600ee325904bdbaa8f8db7be43afed6f", "score": "0.6169122", "text": "protected function __construct() {\n\t\t//Generated by ManagerGenerator::generateConstruct() on 03/10/2017 14:32:14\n\t}", "title": "" }, { "docid": "b39d1b30b54ae795f5bd071cb6ac335e", "score": "0.61611927", "text": "public function __construct() {\n $this->customer_id = '';\n $this->created_date = new DateTime();\n $this->fulfilled_date = new DateTime();\n $this->items = [];\n $this->total_price = 0.00;\n }", "title": "" }, { "docid": "9bd573b5170689ef1fd886b32ca375e4", "score": "0.6154728", "text": "public function __construct() {\n $this->setCreated(new \\DateTime());\n if ($this->getModified() == null) {\n $this->setModified(new \\DateTime());\n }\n }", "title": "" }, { "docid": "a38eddaa6419cc9a3f992d101b5655d7", "score": "0.61533034", "text": "public function __construct()\n {\n $this->setColumnsMeta(array(\n 'pass'=> array('password'),\n ));\n\n $this->setMultiLangColumnsList(array(\n ));\n\n $this->setAvailableLangs(array('eu'));\n\n $this->setParentList(array(\n ));\n\n $this->setDependentList(array(\n ));\n\n\n\n\n $this->_defaultValues = array(\n 'active' => '0',\n 'createdOn' => 'CURRENT_TIMESTAMP',\n );\n\n $this->_initFileObjects();\n parent::__construct();\n }", "title": "" }, { "docid": "bc711b5473c3c1bbfff904b8afac12fb", "score": "0.61520207", "text": "public function __construct()\n {\n $this->calculatedAmount = [\n 'subtotal' => 0,\n 'tax' => 0,\n 'total' => 0\n ];\n }", "title": "" }, { "docid": "2d77b31951ff03522723302a0e387609", "score": "0.614629", "text": "public function __construct()\n {\n $this->type = new Type();\n $this->author = new Persons();\n $this->editor = new Persons();\n $this->collectionEditor = new Persons();\n $this->composer = new Persons();\n $this->containerAuthor = new Persons();\n $this->director = new Persons();\n $this->editorialDirector = new Persons();\n $this->illustrator = new Persons();\n $this->interviewer = new Persons();\n $this->originalAuthor = new Persons();\n $this->recipient = new Persons();\n $this->reviewedAuthor = new Persons();\n $this->translator = new Persons();\n $this->accessed = new Dates();\n $this->eventDate = new Dates();\n $this->issued = new Dates();\n $this->originalDate = new Dates();\n $this->submitted = new Dates();\n $this->pages = new Pages();\n $this->keyword = array();\n }", "title": "" }, { "docid": "c3bb7d1b79877026fdce62e17eba716f", "score": "0.6137948", "text": "public function __construct()\n\t{\n\t\t$this->props = array();\n\t\t$this->props['alpha_lower'] = 5;// 1 = read, 2 = write, 4 = isset\n\t\t$this->props['alpha_upper'] = 5;\n\n\t\t$this->alpha_lower = array_map('strtolower', str_split(self::BASE_26_ALPHA));\n\t\t$this->alpha_upper = str_split(self::BASE_26_ALPHA);\n\t}", "title": "" }, { "docid": "88a5d745ec062e453e0f751cbb4fe1e1", "score": "0.6136634", "text": "public function __construct($options) {\n foreach($options as $key => $value) {\n $this->$key = $value;\n }\n $this->build();\n\t}", "title": "" }, { "docid": "62b2b81c0147f5a391ecc0f5d85ba83e", "score": "0.6134237", "text": "public function __construct() {\n $this->price = 1;\n $this->name = 'Tomato';\n }", "title": "" }, { "docid": "313b96db633c8cc2eb5a4d2f1fa2708f", "score": "0.6128622", "text": "public function __construct()\n {\n parent::__construct(); // code smell: https://martinfowler.com/bliki/CallSuper.html\n $this->load->database();\n $this->_table_name = 'contacts';\n $this->_soft_delete = TRUE; // currently always true - I'm setting a default on the property *and* in the constructor\n // which is non-sensical, but thinking ahead to when this might be an option on a generic controller\n //$this->_order_by = 'last_name'; // same deal here, however this can be user-specified\n //$this->_order_direction = 'ASC';\n }", "title": "" }, { "docid": "d672ecac5d013e138a641b250f3f6e5c", "score": "0.6127513", "text": "private function __construct()\n {\n $this->id = '';\n $this->date = '';\n $this->title = '';\n $this->name = '';\n $this->parent = '';\n $this->key = '';\n $this->enabled = true;\n $this->code = '';\n }", "title": "" }, { "docid": "0374c13c66809e05570fcab59bf92a1b", "score": "0.61226547", "text": "private function __construct() {\n $this->constructParameters();\n }", "title": "" }, { "docid": "a8809629c8e70fb6a611d800a94519ad", "score": "0.6121393", "text": "function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->m_sFieldName;\n\t\t//\t...\n\t\t$this->m_oFile\t\t\t\t= null;\n\t\t$this->m_ArrAllowFileExt\t= Array( 'jpg', 'jpeg', 'png' ,'bmp');\n\t\t$this->m_nLmtMaxSize\t\t= 1024*1024*2;\t//\t2M\n\t\t$this->m_bOverwrite\t\t\t= true;\n\n\t}", "title": "" }, { "docid": "b858d0a62ad477fe503eac34e97bb0c5", "score": "0.61074406", "text": "protected function initDefaultValues()\n {\n parent::initDefaultValues();\n\n $this\n ->attributes([])\n ->permissions([])\n ;\n }", "title": "" }, { "docid": "d9d67a39586ab946911219222cf54d78", "score": "0.6104678", "text": "public function onConstruct()\n {\n $this->id = NULL;\n $this->userId = NULL;\n $this->dealId = NULL;\n $this->amount = NULL;\n $this->paySpId = NULL;\n $this->status = '0';\n $this->ctime = '0001-01-01 00:00:00';\n $this->mtime = '0001-01-01 00:00:00';\n }", "title": "" }, { "docid": "02b228a4b202ddc9d74403291c69c4b3", "score": "0.610183", "text": "public function __construct()\n {\n $this->defaultMessage = 'value is not set';\n }", "title": "" }, { "docid": "7d3f2c197609a7e15a36755ed8971fe6", "score": "0.610041", "text": "protected function initProperties($properties = array()) {\n\t\t$this->properties = $properties;\n\t}", "title": "" }, { "docid": "db8c6bbb3487c00f2daad745d7ce9125", "score": "0.6099593", "text": "public function __construct() {\n// $this->session = false;\n $this->store = false;\n $this->storeName = false;\n $this->notifications = true;\n $this->changesSink = false;\n $this->changesSinkFolders = array();\n $this->changesSinkStores = array();\n }", "title": "" }, { "docid": "db255decf784596db79803f087c32ea7", "score": "0.6092272", "text": "function __construct()\n {\n $this->user_id = 0;\n $this->resturant_id = 0;\n $this->cart = null;\n $this->date_added = date(\"Y-m-d H:i:s\");\n $this->referral_source = \"\";\n $this->session_duration_in_seconds = 0;\n $this->last_user_action = \"\";\n $this->cart_total_amount = 0.00;\n $this->reason = \"\";\n $this->platform_used = 1;\n $this->status = 0;\n }", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "7d56ba702b0f53bfb287a0a271448f5e", "score": "0.0", "text": "public function update(Request $request, $id)\n {\n //\n }", "title": "" } ]
[ { "docid": "f545a797c88e6fde5b59e76b35b0e4dd", "score": "0.74549645", "text": "public function update($id, $resource);", "title": "" }, { "docid": "e3f351fcd5ab99bae755f96203d9604b", "score": "0.7443162", "text": "public function updated(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "3ec7b0acf0381980ced680019309568a", "score": "0.6744378", "text": "public function update() {\n\n // Does the Resource object have an ID?\n if ( is_null( $this->id ) ) trigger_error ( \"Resource::update(): Attempt to update an Resource object that does not have its ID property set.\", E_USER_ERROR );\n \n // Update the Resource\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n $sql = \"UPDATE resource SET url=:url, themeId=:themeId, contact=:contact WHERE id = :id\";\n $st = $conn->prepare ( $sql );\n $st->bindValue( \":url\", $this->url, PDO::PARAM_STR );\n $st->bindValue( \":themeId\", $this->themeId, PDO::PARAM_INT );\n $st->bindValue( \":contact\", $this->contact, PDO::PARAM_STR );\n $st->bindValue( \":id\", $this->id, PDO::PARAM_INT );\n $st->execute();\n $conn = null;\n }", "title": "" }, { "docid": "7eab299ac25f58662eb17a6207bbdeef", "score": "0.67144877", "text": "private function updateResource($resource): void\n\t{\n\t\timagedestroy($this->resource);\n\t\t$this->resource = $resource;\n\n\t\timagealphablending($this->resource, false);\n\t\timagesavealpha($this->resource, true);\n\n\t\t$this->updateSizeInfo();\n\t}", "title": "" }, { "docid": "337a73fafa9c60c109d0e0fb18b16428", "score": "0.6513111", "text": "public function update(Storages $request, $id)\n {\n $entry = Storage::findOrFail($id);\n\n $entry->fill($request->all());\n\n $entry->save();\n\n return redirect('/storages/'.$id.'/edit');\n }", "title": "" }, { "docid": "2a532e323886cdeee4fdc191ad2a127e", "score": "0.64721876", "text": "public function update(ResourceRequest $request, Resource $resource)\n {\n //\n\t\t\t\t$resource->name= $request->name;\n\t\t\t\t$resource->url= $request->url;\n\n\t\t\t\t\treturn response()->json([\n\t\t\t\t\t\t'updated'=>$resource->save()\n\t\t\t\t\t]);\n }", "title": "" }, { "docid": "b4a169f9a3d901a01f32f1071fdf2091", "score": "0.6462599", "text": "public function update(Request $request, Storage $storage)\n {\n \n $storage->name = $request->input('name');\n $storage->codigo = $request->input('codigo');\n $storage->active = $request->input('active');\n $storage->save();\n\n return redirect('/storages')->with('message','update');\n }", "title": "" }, { "docid": "dde275288f11a04dfd12a4da06e0b6b6", "score": "0.6404118", "text": "public function put($resource, $arOptions);", "title": "" }, { "docid": "d14f3b67a32851152c09abd22392f6ca", "score": "0.6295373", "text": "public function update(OurResourceRequest $request,OurResource $ourResource)\n {\n try {\n $file = $request->file('images');\n $inputs = $request->all();\n\n if($file) {\n $inputs['images'] = $this->uploadImages($request->file('images'));\n } else {\n $inputs['images'] = $ourResource->images;\n $inputs['images']['thumb'] = $inputs['imagesThumb'];\n\n }\n\n unset($inputs['imagesThumb']);\n $ourResource->update();\n\n return redirect(route('ourresource.index'));\n } catch (\\Exception $exception) {\n Log::error($exception);\n }\n }", "title": "" }, { "docid": "3f88464873b841b9046a2a5852122431", "score": "0.6265043", "text": "public function update(Request $request, LibResource $resource)\n {\n $this->abort_if_not_permited();\n $data = $this->validate($request, [\n 'res_title' => 'required',\n 'res_subject' => 'required',\n 'res_author' => 'required',\n 'res_department_id' => 'required',\n 'res_type_id' => 'required'\n ]);\n\n if($request->res_type_id != $resource->res_type_id) {\n $oldFolder = LibResourceType::find($resource->res_type_id)->res_type;\n $newFolder = LibResourceType::find($request->res_type_id)->res_type;\n\n Storage::disk('library')->move($oldFolder.'/'.$resource->res_files, \n $newFolder.'/'.$resource->res_files);\n\n Storage::disk('library')->move($oldFolder.'/' .'cover/'.$resource->res_cover, \n $newFolder.'/' .'cover/'.$resource->res_cover);\n }\n \n $resource->update($data);\n return $resource;\n }", "title": "" }, { "docid": "37aa707a5d1cf3d2b73c5d32bea86169", "score": "0.62426656", "text": "public function update($resource, array $data)\n {\n $this->validate($data, $resource);\n return $resource->update($data);\n }", "title": "" }, { "docid": "96f9e6fdcf8c5b9b43c1f9a96134f2bf", "score": "0.6203198", "text": "public function updateStream(string $path, $resource, array $config = []): void;", "title": "" }, { "docid": "0b9df105daf9d4dddca1b265bf150fd3", "score": "0.6093648", "text": "public function updateResource($res, Request $request) {\n $rules = array(\n 'details' => 'required|string|max:1000',\n 'image' => 'image|max:4096',\n 'link' => 'string|nullable'\n );\n\n $error = Validator::make($request->all(), $rules)->validate();\n\n $resource = SiteImage::findOrFail($res);\n\n \n\n if(!$request->hasFile('image')) {\n \n // IMAGE NOT CHANGED\n \n $data = array(\n 'image_details' => $request->details\n );\n\n } else {\n \n // IMAGE CHANGED\n \n // UPLOAD IMAGE\n $image = $request->file('image');\n $new_name = rand() . '.' . $image->getClientOriginalExtension(); // Name of new Image\n $destination_path = \"/images/static\";\n\n\n \n $resize_image = Image::make($image->getRealPath());\n\n //return response()->json(['errors' => [$destination_path . '/' . $new_name]]);\n $resize_image->save(public_path($destination_path . '/' . $new_name));\n\n\n $old_image_path = $resource->image_ref;\n\n /*if(File::exists(public_path() . $old_image_path)) {\n File::delete(public_path() . $old_image_path);\n }*/\n\n $data = array(\n 'image_ref' => '/images/static/' . $new_name,\n 'image_details' => $request->details\n ); \n\n \n }\n\n if($request->link) $data['link'] = $request->link;\n $resource->update($data);\n\n return View('backoffice.pages.edit_resource', ['resource' => $resource]);\n \n }", "title": "" }, { "docid": "0f413897f49a592f566edc4499283b2c", "score": "0.603257", "text": "public function storageUpdateAction(){\n\t\t$this->setDialogAction();\n\t\t$storage_id = $this->getParam('storage_id');\n\t\t$filename = $this->getParam('filename');\n\t\t$ext = $this->getParam('ext');\n\t\t$type = $this->getParam('type');\n\t\t\n\t\t$storage = $this->fileSources->get($storage_id);\n\t\t$sources = $this->fileSources->getList();\n\t\t$this->view->sources = $sources;\n\t\t$this->view->storage = $storage;\n\t\tif(!empty($ext)) $filename = $filename.\".\".$ext;\n\t\t$this->view->filename = $filename;\n\t\t$this->view->type = $type;\n\t}", "title": "" }, { "docid": "3c13e0ec8368dde371325db1b8b227e5", "score": "0.5949601", "text": "public function update(Request $request, $id)\n {\n //\n // si exxiste la array de recursos\n if ( $request->session()->exists('resources')){\n \n // obtenemos los valores del array de recursos\n $resources = $request->session()->get('resources');\n \n if(isset($resources[$id])){\n \n $resource = $resources[$id];\n \n // Elimina la posicion del array, y se reajusta el array\n ;\n $nameInput=$request->input('name');\n $priceInput=$request->input('price');\n \n // si no has editado nada, vuelve de nuevo\n if($nameInput==$resource['name'] && $priceInput==$resource['price']){\n // return redirect('store')->with('message', 'You have not applied any changes to the product!');\n return back()->withInput();\n }\n \n $resource['id']=$id;\n $resource['name']=$nameInput;\n $resource['price']=$priceInput;\n \n $resources[$id]=$resource; \n \n // meter ese array en tu sesion \n $request->session()->put('resources', $resources);\n \n return redirect('store')->with('message', 'The product has been edited successfully!'); // es lo mismo que resource ¿ que hace el redirect)\n }\n }\n return back()->withInput();\n }", "title": "" }, { "docid": "47f5a0f9058e305083b50269e28fc738", "score": "0.59487104", "text": "public function update(Request $request, $resource)\n {\n try { \n $resource->update($request->all());\n watch(__('update card type'), \"fa fa-card\");\n return responseJson(1, __('done'), $resource);\n } catch (\\Exception $e) {\n return responseJson(0, $e->getMessage());\n }\n }", "title": "" }, { "docid": "776da8c96f4aa34eec52175bc485cecd", "score": "0.59405017", "text": "public function update($id, UpdateResourceRequest $request)\n {\n $resource = $this->service->find($id);\n if(empty($resource))\n {\n Flash::error('Resource não encontrado');\n return redirect(route('resources.index'));\n }\n\n $resource = $this->service->update($request->all(), $id);\n Flash::success('Resource atualizado com sucesso.');\n return redirect(route('resources.index'));\n }", "title": "" }, { "docid": "1967dfef2308a54917abee94f5fb2fe9", "score": "0.5922663", "text": "public function updateStream($path, $resource, Config $config) {\n // TODO: Implement updateStream() method.\n }", "title": "" }, { "docid": "d3213bec1042b484f9e7c8a52c4ef16a", "score": "0.58999914", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "b5bcf23d212ba01a7fca11f3cf632111", "score": "0.5896195", "text": "public function update(ResourceRequest $request, $id)\n {\n try {\n $resource = $this->resource->find($id);\n $resource->update($request->all());\n\n flash('Recurso atualizado com sucesso!')->success();\n return redirect()->route('resources.index');\n\n } catch (\\Exception$e) {\n $message = env('APP_DEBUG') ? $e->getMessage() : 'Erro ao processar atualização...';\n\n flash($message)->error();\n return redirect()->back();\n }\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5890722", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "1b6228f28970b633590b97318fca00a2", "score": "0.5875679", "text": "function resource_update($id, $options) {\n $options['id'] = $id;\n return $this->_post_request('resource_update', $options);\n }", "title": "" }, { "docid": "f2c455344d9c8883e1e991918cdb4313", "score": "0.586725", "text": "public function update(Request $request, $id)\n {\n request()->validate([\n 'title' => ['required', 'string'],\n 'description' => ['required', 'string'],\n 'image' => 'required',\n ]);\n\n $imageName = time().'.'.request()->image->getClientOriginalExtension();\n request()->image->move(public_path('images'), $imageName);\n\n resource::find($id)->update([\n 'title' => $request->title,\n 'description' => $request->description,\n 'image' => $imageName\n ]);\n return back()->with('success','You have successfully update the resource.');\n }", "title": "" }, { "docid": "4316a587c5ca6fb49a7ce41a46a24ed8", "score": "0.5850647", "text": "public function update( $resourcePath, Array $body=[]) {\n return $this->callResource( 'put', $resourcePath, ['body'=>$body]);\n }", "title": "" }, { "docid": "59c6239c448624b3108c46073757b01e", "score": "0.58493763", "text": "public function update(StoreProductRequest $request, $id)\n {\n DB::beginTransaction();\n try {\n $product = Product::find($id);\n if ($product) {\n $data = $request->safe()->except(['image']);\n\n $imageUrl = $this->storeFile($request, $product->id);\n if (!empty($imageUrl))\n $data['image_url'] = $imageUrl;\n\n $product->update($data);\n DB::commit();\n\n return new ProductResource($product);\n }\n return response()->json(['data' => 'Product not found.'], 404);\n } catch (Exception $e) {\n DB::rollback();\n\n return response()->json($e->getMessage());\n }\n }", "title": "" }, { "docid": "500de3817809ac92f35634ac93419bfe", "score": "0.58382034", "text": "public static function update($resource, $request)\n {\n static::fillAttributes($resource, $request);\n static::fillBoolean($resource, $request);\n\n static::updateBelongsTo($resource, $request);\n\n $resource->save();\n\n static::updateBelongsToMany($resource, $request);\n\n return $resource;\n }", "title": "" }, { "docid": "e8f642c1357eaca6a51e747722c28e9a", "score": "0.58338976", "text": "protected function save($resource) {\n if (isset($resource['public_id'])) {\n $this->redis->set($resource['public_id'], $resource);\n }\n }", "title": "" }, { "docid": "2cf80d6b1d66cb9fd56bf8c18c026e8f", "score": "0.5824176", "text": "public function update(Request $request, $id)\n {\n $path = Product::find($id)->filename;\n $filename = $request->file('image');\n\n if(!($filename === null)) {\n $path = $request->file('image')->store('id/'.$request->input('user_id').'/products/images', 's3');\n }\n\n Product::find($id)->update([\n 'name' => $request->input('name'),\n 'description' => $request->input('description'),\n 'price' => $request->input('price'),\n 'amount' => $request->input('amount'),\n 'filename' => basename($path),\n 'url' => Storage::disk('s3')->url($path),\n ]);\n return redirect()->route('products.index');\n\n\n\n\n\n\n\n\n\n\n }", "title": "" }, { "docid": "07c7bceecf971da3d703020e3b86857c", "score": "0.57805496", "text": "public function update ($data) {}", "title": "" }, { "docid": "07c7bceecf971da3d703020e3b86857c", "score": "0.57805496", "text": "public function update ($data) {}", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.57525045", "text": "public function update($entity);", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.57525045", "text": "public function update($entity);", "title": "" }, { "docid": "01a05836a30a03daa266194238513ef3", "score": "0.5742325", "text": "public function update(Request $request, $id){\n $slider = Slider::find($id);\n \n if($request->hasFile('image')){\n $slider->image = $request->image->store('sliders',['disk' => 'public']); \n }\n \n $slider->link = $request->link;\n $slider->save();\n\n return new JsonResponse([\n 'status' => 'success',\n 'message' => 'Slider updated successfully'\n ]);\n }", "title": "" }, { "docid": "bb8e19272e0561c14ce70c3a793ec51a", "score": "0.57381696", "text": "public function update(Request $request, $id)\n {\n\n $data = Product::where('id', $id)->first();\n // 判斷是否上傳圖片\n if ($request->hasFile('img')) {\n\n // 刪除照片\n // 用一個變數代替要刪除的圖片名\n $old_image = $data->img;\n //public_path()指從public這個路徑開始\n File::delete(public_path() . '/storage/' . $old_image);\n // 儲存新照片\n $file_name = $request->file('img')->store('', 'public');\n // 將新照片的路徑存起來 回存\n $data->img = $file_name;\n }\n\n $data->kinds = $request->kinds;\n $data->sort = $request->sort;\n $data->save();\n return redirect('home/product');\n\n // 這筆request 含有 method 與token 這兩筆欄位資料\n // except 例外處理 將括號內的欄位去除\n // $tt = $request->except('_token','_method');\n // where(指定) id =$id 這筆 進行 更新內容($tt)\n // Product::where('id',$id)->update($tt);\n // $data = Product::where('id', $id)->first();\n // // 先做賦值得動作 在做儲存\n // $data->img = $request->img;\n // $data->kinds = $request->kinds;\n // $data->save();\n // return redirect('home/product');\n }", "title": "" }, { "docid": "30790b56c47f44ba2fcdcad444e0ebf5", "score": "0.57262063", "text": "public function update(Stock $request, $id)\n {\n $stock_cosmetic = StockCosmetic::find($id);\n\n $stock_cosmetic->product = $request->input('product');\n $stock_cosmetic->color = $request->input('color');\n $stock_cosmetic->brand = $request->input('brand');\n $stock_cosmetic->price = $request->input('price');\n $stock_cosmetic->save();\n // image\n if ($request->hasFile('image') && $request->file('image')->isValid()) {\n $path = $request->image->storePubliclyAs('/stock', $stock_cosmetic->id . '.jpg', ['disk' => 's3']);\n $stock_cosmetic->image = $path;\n $stock_cosmetic->save();\n }\n\n return redirect('stock_cosmetics/list_of_stock/{user_id}/stock_cosmetics');\n }", "title": "" }, { "docid": "68611877d8742448025a8506ebac8d13", "score": "0.5723295", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "title": "" }, { "docid": "7ed06fd4c3033e66778142b41027c241", "score": "0.57009596", "text": "public function editResource($resource, array $data)\r\n\t{\r\n\t\t$resourceType = __NAMESPACE__.'\\\\Driver\\\\'.$this->identify($resource);\r\n\t\t$cr = new $resourceType($resource);\r\n\t\t$cr->save($data);\r\n\t}", "title": "" }, { "docid": "98ed855cdf6798411cf49ba631a664ec", "score": "0.56952107", "text": "public function setResource($resource)\n {\n }", "title": "" }, { "docid": "1d541312c2378377a67b8bc814d61521", "score": "0.5689462", "text": "public function update(Request $request, $id)\n {\n $update = Project::find($id); \n\n Storage::disk('public')->delete('img/'. $update->src);\n $update->nom = $request->nom; \n $update->description = $request->description; \n $update->tag = $request->tags; \n \n $update->save();\n $request->file('src')->storePublicly('img','public');\n \n return redirect()->back(); \n }", "title": "" }, { "docid": "15c077d64c9ceb586f671a09513b8246", "score": "0.5682459", "text": "public function update(Request $request, $id)\n {\n $row = Product::find($id);\n if($row) {\n $oldimage = $row->image;\n $row->title = $request->title;\n $row->slug = str_replace(' ', '-', strtolower($request->title));\n $row->category_id = $request->category_id;\n $row->brand_id = $request->brand_id;\n $row->price = $request->price;\n $row->content = $request->content;\n $row->image = $oldimage;\n\n if($request->image){\n if($_FILES['image']['error'] == 0) {\n $filename = time() . '_' . $_FILES['image']['name'];\n\n $image = 'uploads/' . $filename;\n\n $destination = public_path($image) ;\n\n $is_uploaded = move_uploaded_file($_FILES['image']['tmp_name'], $destination);\n\n if($is_uploaded) {\n if(is_file(public_path($oldimage))) {\n unlink(public_path($oldimage));\n }\n $row->image = '/' . $image;\n }\n }\n }\n\n $row->save();\n }\n return redirect()->back();\n\n }", "title": "" }, { "docid": "359f6b66cab79746b3c9bb9ba71db220", "score": "0.56804216", "text": "public function update(ProductRequest $request, Product $product)\n {\n// $product->productsHistory()->save($product->except('image', 'vendor_id'));\n tap($product)->update([\n 'name' => $request->input('product.name'),\n 'vendor_id' => $request->input('product.vendor_id'),\n 'description' => $request->input('product.description'),\n 'price' => $request->input('product.price'),\n 'cost' => $request->input('product.cost'),\n 'image' => $request->input('product.image'),\n ]);\n dispatch(new CacheData(auth()->user()));\n return new ProductAllDataResource($product);\n }", "title": "" }, { "docid": "e08e873b4ef207afab432dfb5491c0cf", "score": "0.5677409", "text": "public function update(Request $request, $id)\n {\n $producto = Producto::findOrFail($id);\n $dataProducto=json_decode($request->producto,true);\n if($producto->foto != $dataProducto['foto']){\n Storage::delete($producto->foto);\n $file=$request->file('archivo');\n $ruta=$file->storeAs('img',time() . $file->getClientOriginalName(),'public');\n $producto->foto=$ruta;\n }\n $producto->nombre=$dataProducto['nombre'];\n $producto->detalle=$dataProducto['detalle'];\n $producto->precio=$dataProducto['precio'];\n $producto->asociado_id=$dataProducto['asociado_id'];\n if($producto->save()){\n return new ProductoResource($producto);\n }\n }", "title": "" }, { "docid": "77c5abc6b152e12d927f19d28ebfa590", "score": "0.5673537", "text": "public function updateStorageService($name, $options);", "title": "" }, { "docid": "9025ceea51e126c303a0cefd6bb34e4e", "score": "0.56732917", "text": "public function update(Request $request, Product $product)\n {\n $product->update($request->all());\n\n if($request->file('file')){\n $url = Storage::put('products', $request->file('file'));\n if($product->image){\n Storage::delete($product->image->url);\n\n $product->image()->update([\n 'url' => $url\n ]);\n }\n else{\n $product->image()->create([\n 'url' => $url\n ]);\n }\n }\n return redirect()->route('admin.products.index', $product)->with('Exito2','¡Se ha actualizado el producto con exito! ');\n}", "title": "" }, { "docid": "5b824457eb3318778d2a67f1f5dfc4ff", "score": "0.5671616", "text": "public function update(Request $request, $id)\n {\n //actualizar procducts\n\n $product =Product::findOrFail($id,);\n $product-> name=$request->input('name');\n $product-> price=$request->input('price');\n $product-> save();\n return new ProductResource($product);\n\n\n\n }", "title": "" }, { "docid": "09bd4dd53076527911b91beb82f9c3a4", "score": "0.56539524", "text": "public function update(Request $request, $id)\n {\n //\n $product_data=request()->except(['_token','_method']);\n \n if ($request->hasFile('Image_path')) {\n # code...\n $product = Products::findOrFail($id);\n Storage::delete('public/'.$product->Image_path);\n $product_data['Image_path']=$request->file('Image_path')->store('uploads', 'public');\n \n }\n Products::where('id','=',$id)->update($product_data);\n\n //$product = Products::findOrFail($id);\n //return view('products.edit', compact('product'));\n return redirect('productos')->with('Message','Producto modifiado con exito.');\n }", "title": "" }, { "docid": "d1bfc26f51571559d08876ca1ee1e3c3", "score": "0.565382", "text": "public function updateStream($path, $resource, $config = null)\n {\n return $this->uploadStream($path, $resource, WriteMode::force());\n }", "title": "" }, { "docid": "bd335a6afd825ec9c0e9d48a8ae6ad74", "score": "0.56527406", "text": "public function update(Request $request, $id)\n {\n $product = Product::findOrFail($id);\n\n $product->description = $request->description;\n $product->price = $request->price;\n $product->type = $request->type;\n $product->qty = $request->qty;\n\n if($request->hasFile('imglink')){\n $avatar = $request->file('imglink');\n $filename = time(). '.' . $avatar->getClientOriginalExtension();\n Image::make($avatar)->resize(300, 300)->save( public_path('/img/' . $filename ) );\n\n $product->imglink = $filename;\n }\n\n $product->update();\n\n //$product = Product::paginate(10);\n //return view('products.products', compact('products'));\n return redirect('products');\n }", "title": "" }, { "docid": "b12ae77c453a22ab164b3b8004dd9fdf", "score": "0.56446284", "text": "public function update($name, $object);", "title": "" }, { "docid": "792447dfa646026b3e9533c56a80e725", "score": "0.564", "text": "public function updateStream ($path, $resource, Config $config)\n {\n return $this->writeStream ($path, $resource, $config);\n }", "title": "" }, { "docid": "6120bba94c23aff61a9143580e98d499", "score": "0.5634615", "text": "public function update(Request $request, $id)\n {\n $resource = Resource::find($id);\n if ($resource) {\n if ($request->user()->cannot('update-resource', $resource)) {\n abort(403);\n }\n\n $this->sanitizeInput($request);\n $validator = $this->validator($request->all(), $id);\n\n if ($validator->fails()) {\n return redirect(route('resource.edit', ['id' =>$resource->id]))\n ->withInput()\n ->withErrors($validator);\n }\n\n $resource->title = $request->input('title');\n $resource->link = $request->input('url');\n $resource->cat_id = $request->input('category');\n $resource->description = $request->input('description');\n $resource->save();\n\n return redirect(route('index'))->with('status', 'Resource Updated Successfully');\n }\n abort(404);\n }", "title": "" }, { "docid": "e975cdf5e9d326eb5b73dc2a9ed53878", "score": "0.5629534", "text": "public function updateResource(string $link, array $data = null): string\n {\n $payload = ['json' => $data];\n\n $this->connectToFiken($link, 'PUT', $payload);\n\n // Fiken returns an empty body on successful updates, so we just return the link to the updated resource\n return $link;\n }", "title": "" }, { "docid": "6bbc6190ab101a78c810c8657a536fb8", "score": "0.56255704", "text": "public function update( $params = array() ) {\n\t\tif ( !is_array( $params ) ) {\n\t\t\terror_log( __METHOD__ . '() $params provided are not an array' );\n\t\t\tthrow new Exception( 'parameter type error', 1 );\n\t\t}\n\n\t\t$mode = 'a';\n\n\t\tif ( !empty( $params['mode'] ) && is_string( $params['mode'] ) ) {\n\t\t\t$mode = filter_var( $params['mode'], FILTER_SANITIZE_STRING );\n\t\t}\n\n\t\t$fp = @fopen( $params['storage_path'] . '/' . $params['filename'], $mode );\n\n\t\tif ( $fp ) {\n\t\t\t$bytes = fwrite( $fp, $params['content'] );\n\t\t} else {\n\t\t\terror_log( __METHOD__ . '(), could not update [' . $params['filename'] . ']' );\n\t\t\tthrow new Exception( 'could not update a resource', 12 );\n\t\t}\n\n\t\treturn fclose( $fp );\n\t}", "title": "" }, { "docid": "b0976d68e90a64aa5595f98c7a413119", "score": "0.5621308", "text": "public function update(QStore $request, $id)\n {\n //\n }", "title": "" }, { "docid": "1ca4d9d9f232ed11815a13afa8452939", "score": "0.56211114", "text": "public function update(Request $request, $id)\n {\n $request->validate([ \n 'title' => 'required|min:10|max:190',//specify the table name in the database for unique validation \n 'file_path'=>'required', \n 'body' => 'required|min:50' \n ]);\n $res = Ressource::findOrFail($id);\n $res->title = $request['title'];\n $res->image_path = $request['image_path'];\n $res->file_path = $request['file_path'];\n $res->body = $request['body'];\n $res->update();\n\n return redirect('manage_ressources');\n }", "title": "" }, { "docid": "1e16c5691c8e2eef352403af3df19b93", "score": "0.561985", "text": "public static function update($resources){\n\t\t$db=Db::getConnect();\n\t\t$update=$db->prepare('UPDATE resources SET name=:name, description=:description,\n\t\t\tlocation=:location, image=:image WHERE id=:id');\n\t\t$update->bindValue('name', $resources->getName());\n\t\t$update->bindValue('description',$resources->getDescription());\n\t\t$update->bindValue('location',$resources->getLocation());\n\t\t$update->bindValue('image',$resources->obtenerImagen());\n\t\t$update->bindValue('id',$resources->getId());\n\t\t$update->execute();\n\t}", "title": "" }, { "docid": "ad1ca99be415c735a2ef2f4128a1f1c0", "score": "0.56082803", "text": "public function update(StorageProductRule $request, Product $product)\n {\n $this->product->UpdateProduct($request,$product);\n return redirect()->route('product.index')->with('message','Product updated successfully!');\n }", "title": "" }, { "docid": "a2ddcd85128f60ff32a767eb3d311bd4", "score": "0.56082344", "text": "public function update(Request $request, $id)\n {\n $this->validate(request(),[\n 'title' => 'required',\n 'desc' => 'required',\n 'category_id' => 'required|integer',\n 'price' => 'required|regex:/^[0-9]+(\\.[0-9][0-9]?)?$/',\n 'image' => 'image|max:2000',\n ]);\n\n $product = Product::findOrFail($id);\n\n $s3 = Storage::disk('s3');\n $image = request()->image;\n\n $product->title = $request->get('title');\n $product->desc = $request->get('desc');\n $product->category_id = $request->get('category_id');\n $product->price = $request->get('price');\n\n if ($image != null)\n {\n $path = $s3->putFileAs('product_images/'.$product->user_id, $image, $image->getClientOriginalName() , 'public');\n $product->imageLocation = Storage::disk('s3')->url($path);\n }\n $product->save();\n return redirect(\"/userproducts/$product->user_id\");\n }", "title": "" }, { "docid": "1ceaeb30b587b555369c4247fb10e594", "score": "0.5603278", "text": "public function putAction()\n {\n $t = $this->createTable();\n $this->record = $t->load($this->getRequest()->getInt('_id'));\n $vars = $this->getRequest()->getParams();\n if (!empty($vars['nested']))\n {\n $this->_nestedInput = $vars['nested'];\n unset($vars['nested']);\n }\n $this->setForUpdate($this->record, $vars);\n $this->record->update();\n $this->updateNested($this->record, $vars);\n $this->apiOutRecords(array($this->record));\n }", "title": "" }, { "docid": "4a62a78ed2019e37a1f11273a9e45c02", "score": "0.55921906", "text": "public function putAction() {\n $token = $this->_getParam('token', 0);\n $id = $this->_getParam('id', 0);\n if (ZendX_Utilities_SecurityWSCheck::isValid($token)) {\n $id = $this->_getParam('id', 0);\n\n $this->view->id = $id;\n $this->view->params = $this->_request->getParams();\n $this->view->message = sprintf('Resource #%s was Updated', $id);\n $this->_response->ok();\n } else {\n// $this->view->message = sprintf('Forbidden', $id);\n $this->_response->forbidden();\n }\n }", "title": "" }, { "docid": "ab9ec1cab0ba86404b7b85cde684c6b8", "score": "0.558271", "text": "public function update(Request $request, $id)\n {\n $image = Image::findOrfail($id);\n $image->fill($request->all());\n\n if($request->hasFile('path'))\n {\n $path = $request->file('path')->store('public');\n $image->fill(['path' => $path]);\n \n }\n $image->save();\n\n return redirect()->route('images.index')->with('info', 'Imagen editada exitosamente');\n }", "title": "" }, { "docid": "1571f300ade8156825f5ac0eb703bea0", "score": "0.5582257", "text": "public function testResourcesCanBeUpdated(): void\n {\n $admin = User::factory()->admin()->create();\n $resource = Resource::factory()->create();\n\n $response = $this->actingAs($admin)->put('resources/'.$resource->id, [\n 'name' => 'New Resource Name',\n ]);\n\n $response->assertRedirect('/resources');\n $this->assertDatabaseHas('resources', [\n 'name' => 'New Resource Name',\n ]);\n }", "title": "" }, { "docid": "b493f0ac75566bd77b9da4733fecab90", "score": "0.5582209", "text": "public function updateResource(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'resource_id' => 'required|exists:trip_resources,id',\n 'user_id' => 'required|exists:publishers,id',\n 'type' => 'required|in:vedio,image',\n 'desc' => 'nullable',\n 'resource' => 'nullable|max:30000000',\n 'lat' => 'required',\n 'lng' => 'required',\n 'address' => 'required'\n\n ]);\n if ($validator->passes()) {\n $resource = TripResource::find($request['resource_id']);\n\n if ($resource->trip->publisher_id == $request['user_id']) {\n $resource->type = $request['type'];\n $resource->desc = $request['desc'];\n $resource->lat = $request['lat'];\n $resource->lng = $request['lng'];\n $resource->address = $request['address'];\n if ($request['resource']) {\n File::delete('uploads/tripResources/' . $resource->resource);\n if ($request['type'] == \"image\") {\n $photo = $request->resource;\n $name = date('d-m-y') . time() . rand() . '.' . $photo->getClientOriginalExtension();\n Image::make($photo)->save('uploads/tripResources/' . $name);\n } else {\n $vedio = $request->resource;\n $name = date('d-m-y') . time() . rand() . '.' . $vedio->getClientOriginalExtension();\n $vedio->move(public_path('uploads/tripResources'), $name);\n }\n $resource->resource = $name;\n }\n $resource->update();\n $msg = $request['lang'] == 'ar' ? ' تم التعديل.' : ' update sucessful.';\n return response()->json(\n [\n 'status' => true,\n 'data' => \"\",\n 'msg' => $msg\n ]\n );\n } else {\n $msg = $request['lang'] == 'ar' ? ' المستخدم لايملك هذه الرحله.' : ' user not owner the trip.';\n return response()->json(\n [\n 'status' => false,\n 'data' => \"\",\n 'msg' => $msg\n ]\n );\n }\n\n } else {\n foreach ((array)$validator->errors() as $key => $value) {\n foreach ($value as $msg) {\n return response()->json(['status' => false, 'msg' => $msg[0]]);\n }\n }\n }\n }", "title": "" }, { "docid": "4016847dea9b55e59a4acd18600a30f5", "score": "0.55813426", "text": "public function update($request, $id);", "title": "" }, { "docid": "9d8cba34413cd6e6b48618c3db86055c", "score": "0.55810744", "text": "public function update(Request $request, $id)\n {\n $im = Image::find($id);\n $im->product_id = $request->product_id;\n $im->img_path = $request->img_path;\n \n $im->update();\n\n return redirect(route('image.show',$im->id));\n }", "title": "" }, { "docid": "2f36f1d4154ef1a2d8557fd96028dafb", "score": "0.55801266", "text": "public function updateStream($path, $resource, Config $config)\n {\n try {\n $result = $this->client->post('update', [\n 'query' => ['path' => $path],\n 'body' => $resource\n ]);\n\n $response = json_decode($result->getBody()->getContents(), true);\n\n if ($response['response']) {\n return true;\n }\n\n throw new Exception($response['message']);\n\n } catch (RequestException $e) {\n throw new Exception($e->getMessage(), $e->getCode(), $e);\n }\n }", "title": "" }, { "docid": "b34e21aac9031dd439acaadc48395628", "score": "0.5579814", "text": "public function update(Request $request, $id)\n {\n\n $this->validate($request, [\n \"name\" => 'required',\n \"description\" => 'required',\n \"genre_id\" => 'required',\n \"category_id\" => 'required',\n \"price\" => 'required|integer',\n \"size_id\" => \"required\",\n \"stock\" => \"required|integer\",\n \"imageLoc\" => \"image|dimensions:min_width=340,max_width=366,min_height=440,max_height=466\",\n \"imageLoc2\" => \"image|dimensions:min_width=340,max_width=366,min_height=440,max_height=466\",\n ]);\n\n $product = Product::find($id);\n\n $product->name = $request->input(\"name\");\n $product->description = $request->input(\"description\");\n $product->genre_id = $request->input(\"genre_id\");\n $product->category_id = $request->input(\"category_id\");\n $product->price = $request->input(\"price\");\n $product->size_id = $request->input(\"size_id\");\n $product->stock = $request->input(\"stock\");\n\n $path = $request->file('imageLoc');\n $path2 = $request->file('imageLoc2');\n\n $extension = $request->file('imageLoc')->extension();\n $extension2 = $request->file('imageLoc2')->extension();\n\n\n if (!is_null($path)) {\n $path->storeAs('public/products', '1'.$request->user()->id.'.'.$extension);\n $product->imageLoc = 'storage/products/1'.$request->user()->id.'.'.$extension2;\n }\n if (!is_null($path2)) {\n $path2->storeAs('public/products', '2'.$request->user()->id);\n $product->imageLoc2 = 'storage/products/2'.$request->user()->id;\n }\n\n\n $product->save();\n\n\n return redirect()->route('products.show',['id' => $id]);\n }", "title": "" }, { "docid": "60b9f0eec9bbbce5da5e2b8796798a94", "score": "0.5576629", "text": "public function update(SitioUpdateRequest $request)\n { \n\n $sitio = Sitio::find(1);\n $sitio->name = $request->name;\n\n if($request->hasFile('picture')){\n\n $oldFile = $sitio->picture;\n $file = $request->file('picture');\n $destination_path = public_path().'/file/';\n $name = 'sitio_' . time() . '.' . $file->getClientOriginalName();\n \\Storage::disk('local')->put($name, \\File::get($file));\n unlink($destination_path.$oldFile);\n $sitio->picture = $name;\n }\n\n $sitio->save();\n\n \\Session::flash('success', 'Sitio actualizado exitosamente.');\n\n return redirect()->to('/admin/home'); \n }", "title": "" }, { "docid": "d6f71bb85fc7a75982a80e5421b6054e", "score": "0.55763113", "text": "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n\n $product->product_name = $request->product_name;\n $product->product_description = $request->product_description;\n $product->brand_id = $request->brand_id;\n $product->product_price = $request->product_price;\n $product->area_id = $request->area_id;\n $product->subcategory_id = $request->subcategory_id;\n $product->condition = $request->condition;\n\n // if($request->hasFile('product_image'))\n // {\n // $path = $request->product_image->store('images');\n // // $product->product_image = $request->product_image->hashName();\n // }\n // }\n\n $product->save();\n\n flash('Product successfully updated')->success();\n\n return redirect()->route('products.edit',$product->id);\n\n }", "title": "" }, { "docid": "f8cd6649bfa223d8861db5374702fc62", "score": "0.5569909", "text": "public function updateFromResource(\n $resourceResource,\n $exerciseResource\n )\n {\n parent::updateFromSharedResource($resourceResource, $exerciseResource, 'resource_storage');\n $exerciseResource = $this->computeRequirements($exerciseResource, $resourceResource);\n\n if (!is_null($resourceResource->getArchived())) {\n $exerciseResource->setArchived($resourceResource->getArchived());\n }\n\n return $exerciseResource;\n }", "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": "8c6acbc80b9bce2875ae52d0218c6db7", "score": "0.5556945", "text": "public function update(Request $request, ImagesStorage $imagesStorage)\n {\n //\n }", "title": "" }, { "docid": "9c16790d9595ec15edbb9f90b1a893da", "score": "0.55535865", "text": "public function update(Request $request, Product $product)\n {\n // error_log($request);\n \n $product->category_id=$request->category_id;\n $product->user_id=$request->user()->id;\n\n $product->name=$request->name;\n $product->description=$request->description;\n $product->price= $request->price;\n\n //$product->photo= \"/storage/\".$request->file('photo')->store(\"photos\");\n\n $product->stock= $request->stock;\n\n $product->save();\n // error_log($product);\n return response()->json([\n 'status' => '201',\n 'message' => 'Product updated',\n 'product'=>$product\n ]);\n }", "title": "" }, { "docid": "4d9a8860c5c0baa27686ce3d50c1577f", "score": "0.5530968", "text": "public function update(Request $request, Product $product)\n {\n $validation = Validator::make($request->all(), [\n 'name' => 'min:3|max:100',\n 'description' => 'min:5',\n 'price' => 'integer',\n 'quantity' => 'integer',\n 'image_path' => 'image|mimes:jpg,jpeg,svg,png'\n ]);\n\n $newPath = \"\";\n if ($request->hasFile('image_path')) {\n Storage::delete('products/' . $product->image_path);\n $newPath = $request->file('image_path')->store('public/products');\n }\n\n if ($validation->fails()) {\n return response()->json($validation->errors(), 422);\n }\n\n $product->name = $request->get('name', $product->name);\n $product->description = $request->get('description', $product->description);\n $product->price = $request->get('price', $product->price);\n $product->quantity = $request->get('quantity', $product->quantity);\n $product->image_path = $request->get($newPath, $product->image_path);\n\n $product->save();\n return new ProductIndexResource($product);\n }", "title": "" }, { "docid": "416eb5614de4e6fedf65c1c8ec3c5924", "score": "0.5518426", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'name'=>'required',\n 'category_id'=>'required|integer',\n 'status'=> 'required|boolean',\n 'picture'=> 'required',\n 'gender' => 'required',\n ]);\n $pic = null;\n if ($request->hasFile('picture')) {\n\n $image = $request->file('picture');\n $name = uniqid().'.'.$image->getClientOriginalExtension();\n $destinationPath = public_path('/images');\n $image->move($destinationPath, $name);\n $pic = \"images/{$name}\";\n }\n $product = \\App\\Product::find($id);\n $product->name = $request->get('name');\n $product->category_id = $request->get('category_id');\n $product->status = $request->get('status');\n $product->picture = $pic;\n $product->gender = $request->get('gender');\n $product->save();\n\n return redirect('/products')->with('success', 'Stock has been updated');\n\n\n }", "title": "" }, { "docid": "9e68af5ab6e6fd50f6b3af43fa9adffb", "score": "0.5518285", "text": "public function update(Request $request, $id)\n {\n //\n\n $specialOffers = SpecialOffer::find($id);\n $specialOffers->product_title = $request->sliderTitle;\n $specialOffers->product_price = $request->sliderDetails;\n $specialOffers->product_available = $request->productPrice;\n $specialOffers->product_sold = $request->product_sold;\n \n \n if($request->file('image')){\n $image = $request->file('image');\n Storage::putFile('public/img/',$image);\n $specialOffers->image =\"storage/img/\".$image->hashName();\n }\n $specialOffers->save();\n \n return redirect()->route('admin.specialOffers.create')->with('success','specialOffers details updated Successfully');\n }", "title": "" }, { "docid": "7fcc3e1a5efb0809a329cb304b469001", "score": "0.55178463", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, Product::validate());\n\n if ($request->hasFile('image')) {\n\n $file = $request->file('image');\n $path = $file->store('/',\n [\n 'disk' => 'uploads'\n ]);\n $request->merge([\n 'image_path' => $path\n ]);\n }\n $data = request()->except(['_token', '_method', 'image']);\n $product = Product::where('id', $id)->update($data);\n return redirect()->route('products.index')->with([\n 'success' => 'Product Updated Successfully'\n ]);\n }", "title": "" }, { "docid": "055d9a75bb90fd4afdce24cc7ce3d70d", "score": "0.5517729", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $product->sizes()->sync($request->sizes);\n $product->update([\n 'name' => $request->input('name'),\n 'description' => $request->input('description'),\n 'price' => $request->input('price'),\n 'published' => $request->input('published'),\n 'discount' => $request->input('discount'),\n 'category_id' => $request->input('category_id'),\n 'ref' => $request->input('ref')\n ]);\n\n return redirect('/admin/products');\n }", "title": "" }, { "docid": "f5b4408354bfa9c8612fac65129c141b", "score": "0.5516778", "text": "public function update(StoreProductRequest $request, $id)\n {\n //\n $request->validated();\n\n $obj = Product::find($id);\n $obj->name = Input::get('name');\n $obj->categoryId = Input::get('categoryId');\n $obj->price = Input::get('price');\n $obj->discount = Input::get('discount');\n if(Input::hasFile('thumbnail')) {\n $image_id = time();\n Cloudder::upload(Input::file('thumbnail')->getRealPath(), $image_id);\n $obj->thumbnail = Cloudder::secureShow($image_id);\n }\n $obj->description = Input::get('description');\n $obj->save();\n return redirect('admin/product');\n }", "title": "" }, { "docid": "864750e43aa4e758ff3496700f1f1f1e", "score": "0.55164015", "text": "public function update(Request $request, Path $path)\n {\n //\n \n $data = $request->all();\n \n if($request->file('image')){\n $data['image'] = $request->file('image')->store('assets/path', 'public');\n }\n\n $path->update($data);\n \n return redirect()->route('paths.index');\n }", "title": "" }, { "docid": "7fd319ddde01606213623cf2e0b3cd4d", "score": "0.55120105", "text": "public function putAction() \n\t\t{\n\t\t\t$this->logger->log($this->tableName.\" Put (UPDATE) Action Called: \", Zend_Log::DEBUG);\n\t\t\t$id = $this->_getParam('id');\n\t\t\t$idName = $this->idName;\n\t\t\t$where = $this->restTable->getAdapter()->quoteInto(\"$idName=?\",$id);\n\t\t\t$data = Zend_Json::decode($this->getRequest()->getRawBody() );\n\t\t\t$this->boolToString($data);\n\t\t\t$this->logger->log(\"Put Data: \".print_r($data,true), Zend_Log::DEBUG);\n\t\t\t$this->restTable->update($data, $where);\n\n\t\t\t$this->getResponse()->appendBody(Zend_Json::encode($data));\n\t\t\t$this->getResponse()->setHttpResponseCode(200);\n\t\t\treturn;\n\t\t}", "title": "" }, { "docid": "d0000a29e08a3caea99d0d7a508a62b5", "score": "0.55111337", "text": "public function update(Request $request, $id)\n {\n $product = Product::findOrFail($id);\n $product->year = $request->year;\n $product->term = $request->term;\n $product->category = $request->category;\n $product->description = $request->description;\n $product->amount = $request->amount;\n if($product->save())\n {\n return new ProductResource($product); \n }\n }", "title": "" }, { "docid": "b9649f8d6cb9c4ee8bb3abe05e064755", "score": "0.5510288", "text": "public function setResource(string $resource): void;", "title": "" }, { "docid": "e181d2272099f0db207ddf129f5df092", "score": "0.550741", "text": "public function update(StoreBlogPost $request, $id)\n {\n $validated = $request->validated();\n $article = Article::find($id);\n\n if(array_key_exists('image',$validated)){\n $path = $validated['image']->store('public');\n $filename = str_replace(\"public/\",\"\",$path);\n $contents = Storage::get('public/'.$filename);\n Storage::disk('s3')->put($filename, $contents, 'public');\n $article->image = Storage::disk('s3')->url($filename);\n}\n $article->article = $validated['article'];\n $article->title = $validated['title'];\n $article->writer = Auth::user()->name;\n $article->save();\n return redirect('/article/');\n }", "title": "" }, { "docid": "e7cb685cc382abd24083c8b13d97a179", "score": "0.5507017", "text": "public function put() : Resource {\n try{\n \n $this->method = 'PUT';\n return $this;\n\n } catch (\\Throwable $t){\n new ErrorTracer($t);\n }\n }", "title": "" }, { "docid": "0b37c1df43abb728d7b1dd5cd037ea17", "score": "0.55022466", "text": "public function update($id)\n\t{\n $modelname = $this->modelname;\n $resource = $modelname::find($id);\n if($resource)\n {\n $resource->update(Input::json()->all());\n return $resource;\n }\n\t}", "title": "" }, { "docid": "08757cc2c81b23ca63469f255efa2060", "score": "0.5502139", "text": "protected function update() {\n $this->client->sendRequest('POST', $this->name . ($this->key ? : (string) $this->id), $this->prepareRequestData());\n }", "title": "" }, { "docid": "73d0372fbd1136bccf7139013889818a", "score": "0.5499022", "text": "public function update(SliderimageRequest $request, $id)\n {\n if (! Gate::allows('full')) {\n return redirect( url('admin') )->with('failed', 'Sorry, You are not authorized');\n }\n $update = Sliderimage::getItem($id);\n if($update){\n $uploadFile = $this->articleService->uploadFile('image','uploads/sliders/');\n if($uploadFile != ''){\n $this->articleService->delFile($update->image);\n }\n $update->title = $request->title; \n $update->key = $request->key;\n $update->content = $request->content;\n $update->html = $request->html;\n $update->image = ($uploadFile == '') ? $update->image : $uploadFile;\n $update->save();\n return redirect()->route('sliderimages.index')->with('update_succeeded',config('admin.update_succeeded') );\n }\n }", "title": "" }, { "docid": "4d6dd204fb19a2d6fc40011791b9128d", "score": "0.54963744", "text": "public function update(Request $request, $id)\n {\n //\n $promotion = Promotion::findOrFail($id);\n\n if ($request->hasFile('photo')) {\n $photo = $request->photo;\n\n $path = 'images/promotion';\n $filename = $id . '.' . $photo->extension();\n $photo->storeAs($path, $filename);\n\n $promotion->image = 'storage/app/public/' . $path . '/' . $filename;\n }\n\n $input = $request->all();\n\n $validField = $promotion->fillable;\n\n foreach ($input as $key=>$data) {\n if (in_array($key, $validField)) {\n $promotion[$key] = $data;\n }\n }\n\n $promotion->save();\n\n return new PromotionResource($promotion);\n\n }", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "7c08d21dd4b1755fd5741490a1848a10", "score": "0.5493504", "text": "public function update(Request $request, $id)\n {\n $store = Store::find($id);\n $store->name = $request->name;\n $store->phone = $request->phone;\n $store->email = $request->email;\n $store->address = $request->address;\n $store->description = $request->description;\n $store->product_id = $request->product_id;\n if($request->hasFile('image')){\n $imageFile = $request->file('image');\n $filename = microtime().'-'.$imageFile->getClientOriginalName();\n $imageFile->move(public_path('image\\store'), $filename);\n $store->image = \"image\\store\\\\\".$filename;\n }\n $store->save();\n\n return response()->json([\n 'message' => \"Update successfully store\",\n 'data' => $store\n ], 201);\n }", "title": "" }, { "docid": "f7ab1c5db894b7225c3f202ae4974bc5", "score": "0.54868174", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $requestData = $request->all();\n\n if ($request->hasFile('image_url')) {\n $old_image = $product->image_url;\n File::delete(public_path() . $old_image);\n\n $file = $request->file('image_url');\n $path = $this->fileUpload($file, 'product');\n $requestData['image_url'] = $path;\n }\n\n $product->update($requestData);\n //快閃資料\n return redirect('/admin/product')->with('update','更新成功!');\n }", "title": "" }, { "docid": "f6cc867169101865f07b0dad1605b01d", "score": "0.54849625", "text": "protected function update()\n {\n // TODO: unlink existing $image file\n $image_location = File::storeImage('image');\n\n $data = [\n ':title' => request('title'),\n ':slug' => request('slug'),\n ':has_flowers' => request('has_flowers'),\n ':introduction' => request('introduction'),\n ':description' => request('description'),\n ':colour' => request('colour'),\n ':growth_location' => request('growth_location'),\n ':ripe_season' => request('ripe_season'),\n ':average_years' => request('average_years'),\n ':average_height' => request('average_height'),\n ':average_width' => request('average_width'),\n ':user_id' => $_SESSION['user']['id']\n ];\n\n if (file_error_ok('image')) {\n $data[':image'] = $image_location;\n }\n\n try {\n Vegetable::update((int) request('vegetable_id'), $data);\n } catch (Exception $exception) {\n dd('Exception message:' . $exception->getMessage());\n }\n\n redirect('/admin/vegetables');\n }", "title": "" }, { "docid": "fc5db9e752584d0ec2d27578be79f65f", "score": "0.5470857", "text": "public function update($entity)\n {\n\n }", "title": "" }, { "docid": "cb574ee109ef0c4933aff2189613ba88", "score": "0.5467008", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (!$product) return new Response([\n 'result' => 'fail',\n 'message' => 'product not found'\n ]);\n\n $data = Input::all();\n\n foreach ($data as $key => $value) {\n if ($key === 'price') {\n $product->$key = $value*100;\n } else {\n $product->$key = $value;\n }\n }\n $product->save();\n return new Response(new ProductResource($product));\n }", "title": "" }, { "docid": "2f39a69c894818b4cdcdf93157a2f3e2", "score": "0.54660195", "text": "public static function putForResource($resource, $key, $value)\n {\n if (self::notEnoughResourceInfo($resource, $key)) {\n return;\n }\n self::$resource_registry[self::getResourceKey($resource)][$key] = $value;\n }", "title": "" }, { "docid": "e69ca8d6b4021523c67416bb5a8e3871", "score": "0.54627603", "text": "public function update($newpaht){}", "title": "" }, { "docid": "e328097d6411f857ba6a7cc2aad5a70a", "score": "0.54620916", "text": "public function update(ResourceCreator $listener, $resourceId, array $inputs);", "title": "" }, { "docid": "62614676e3e3e48351f4169c6b96fbbe", "score": "0.5461824", "text": "public function update(Request $request, $id)\n {\n //\n $datosproducto=request()->except('_token','_method');\n\n if($request->hasFile('Foto')){\n\n $producto=Productos::findOrFail($id);\n\n Storage::delete('public/'.$producto->Foto);\n\n $datosproducto['Foto']=$request->file('Foto')->store('uploads','public');\n }\n\n productos::where('id','=',$id)->update($datosproducto);\n\n //return response()->json($datosUsuario);\n\n $producto=productos::findOrFail($id);\n //return view('usuarios.edit', compact('usuario'));\n\n return redirect('productos')->with('Mensaje', 'Producto modificado con exito');\n }", "title": "" }, { "docid": "13060cd318eed312852c00ed17885787", "score": "0.5460793", "text": "public function update($object)\n {\n }", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "b6712b48909eb794b5be751c31e6c2a5", "score": "0.0", "text": "public function store(Request $request)\n {\n $validatedData = $request->validate([\n 'product_name' => 'required|string|unique:products,name',\n 'product_desc' => 'required|string',\n 'product_quantity' => 'required|numeric|min:1',\n 'product_category' => 'required|numeric',\n 'product_supplier' => 'required|numeric',\n 'product_sale_price' => 'required|numeric',\n 'product_cost' => 'required|numeric',\n 'product_desc' => 'required|string|max:255',\n 'product_tax_rate' => 'required|numeric|max:1|min:0',\n 'barcode' => 'required|string|max:15|unique:products,barcode',\n\n //TODO add validation for product image \n ]);\n $product = new Product;\n $product->name = $request->get('product_name');\n $product->description = $request->get('product_desc');\n $product->category_id = $request->get('product_category');\n $product->supplier_id = $request->get('product_supplier');\n $product->quantity_left = $request->get('product_quantity');\n $product->selling_price = $request->get('product_sale_price');\n $product->cost_price = $request->get('product_cost');\n $product->description = $request->get('product_desc');\n $product->barcode = $request->get('barcode');\n $product->tax_rate = $request->get('product_tax_rate');\n $product->save();\n return redirect(route('admin.product.create'))->with('success',$product->name.\" Added successfully\");\n }", "title": "" } ]
[ { "docid": "70f839d67344487e3780c8ca780ec59c", "score": "0.78113544", "text": "public function store(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "df5c676a539300d5a45f989e772221a5", "score": "0.70093644", "text": "public function store()\n {\n return $this->storeResource();\n }", "title": "" }, { "docid": "56a1d1d00b789bcc32f6ce99932cc19b", "score": "0.65499157", "text": "public function store(Request $request)\n {\n //Validate request\n $this->validate($request, [\n 'name' => 'required|max:255|unique:resources',\n 'url' => 'required|max:255|unique:resources|active_url',\n 'description' => 'required|max:10000',\n 'tags.*' => 'exists:tags,id'\n ]);\n //Create the resource\n $newResourceData = [\n 'name' => $request->name,\n 'url' => $request->url,\n 'description' => $request->description,\n 'is_published' => Auth::user() && Auth::user()->isAdmin()\n ];\n if (Auth::user()){\n $resource = Auth::user()->resources()->create($newResourceData);\n }\n else{\n $resource = Resource::create($newResourceData);\n }\n //Add the tags for this resource to the pivot table\n $resource->tags()->attach($request->tags);\n $responseText = 'Resource created';\n $responseText .= Auth::user() && Auth::user()->isAdmin() ? ' and published!' : ' and awaiting review.';\n //Take them back to the resource form so they can add more resources\n return redirect('/resources/create')->with('success', $responseText);\n }", "title": "" }, { "docid": "d5deceebf787a137745e10078f88a17c", "score": "0.6420354", "text": "public function store(StorageRequest $request)\n {\n try {\n $this->service->addStorage($request);\n return $this->Created('Successfully added new storage');\n } catch (\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch (Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "title": "" }, { "docid": "55b375ea7c339e8f0e9c38919b53b1db", "score": "0.637569", "text": "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "2a46fdbfc8cb01983bb03691388f0169", "score": "0.0", "text": "public function create()\n {\n //\n }", "title": "" } ]
[ { "docid": "cb267e3ebbd54b9945858b4232a6e394", "score": "0.7782105", "text": "public function create()\n {\n return view('admin.resource.create');\n }", "title": "" }, { "docid": "03bfd9797acc7936efbf149267039e5d", "score": "0.77260846", "text": "public function create()\n {\n return view('resource.create');\n }", "title": "" }, { "docid": "64a6a51cb4e4b962408e448d0c1399e9", "score": "0.74687606", "text": "public function actionCreate()\r\n {\r\n $model = new Resource();\r\n\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n return $this->redirect(['view', 'id' => $model->id]);\r\n } else {\r\n return $this->render('create', [\r\n 'model' => $model,\r\n ]);\r\n }\r\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": "eefd3a34279d87bd94753b0beae69b0d", "score": "0.7391348", "text": "public function create()\n {\n return view('humanresources::create');\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": "9332c37244dbc51a6ec587579d9cd246", "score": "0.72882813", "text": "public function create()\n {\n //\n return view('forms.create');\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "78824716ffe303654b7c00562ec87847", "score": "0.72740334", "text": "public function create() {\n $viewData = $this->getDefaultFormViewData();\n $viewData[\"mode\"] = \"create\";\n $viewData[\"supplier\"] = new Supplier();\n\n $viewData[\"supplier\"]->supplier_number = NumberSeries::getNextNumber(Supplier::MODULE_CODE);\n\n return view(\"{$this->viewPath}.form\", $viewData);\n }", "title": "" }, { "docid": "aa37b9385ad38984404b3f4097565c00", "score": "0.72529656", "text": "public function newAction()\n {\n $request = $this->container->get('request');\n $options = $request->get('options');\n $alias = $request->get('alias');\n\n $metadata = $this->getMetadata($options['class']);\n $entity = $this->newEntityInstance($metadata);\n\n $fields = $this->getFields($metadata, $options, 'new');\n $type = $this->getCustomFormType($options, 'new');\n\n $form = $this->createCreateForm($entity, $alias, $fields, $type);\n\n return $this->render(\n 'SgDatatablesBundle:Crud:new.html.twig',\n array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'list_action' => DatatablesRoutingLoader::PREF . $alias . '_index',\n 'heading' => $this->getHeading()\n )\n );\n }", "title": "" }, { "docid": "755e91a474eae625dfda22659e4c1f6c", "score": "0.72203404", "text": "public function create()\n {\n return view('form.create');\n }", "title": "" }, { "docid": "56ed6a0676abf46597af78526cddcbf9", "score": "0.7215597", "text": "public function create()\n {\n return view( 'forms/car' );\n }", "title": "" }, { "docid": "7e6cbda13a4d6999c8e363f25258eeb1", "score": "0.7208485", "text": "public function showCreateForm()\n {\n return view('user.create');\n }", "title": "" }, { "docid": "570432e9bac5bbbd5f03f49d8c84f384", "score": "0.7178891", "text": "public function create()\n {\n return view('core.admin.form.create');\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": "7cda6fe62fc1ec4947ab520926c7eca6", "score": "0.7148757", "text": "public function create()\n {\n return View::make(self::CID.'.form');\n }", "title": "" }, { "docid": "95739848366d87216fcc63cf6199aa8c", "score": "0.71411735", "text": "public function create()\n {\n \treturn view('form');\n }", "title": "" }, { "docid": "56dd0677c79549ae44b2b1cc8d7bd0db", "score": "0.713852", "text": "public function create()\n {\n return view('backEnd.formisian.create');\n }", "title": "" }, { "docid": "53163536d5d151380894ed516baf152c", "score": "0.71345985", "text": "public function actionCreate() {\n $this->render('create');\n }", "title": "" }, { "docid": "7d27d715128bcec59bea3173b77f3e80", "score": "0.7130929", "text": "public function create()\n {\n \n return view('admin.forms.create');\n }", "title": "" }, { "docid": "8e8000021c431ea72dcb74907ce2583e", "score": "0.71173835", "text": "public function create()\n {\n return view('crud.new');\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": "f26dda2bfcba89d5cc0857ab1ea11689", "score": "0.71150076", "text": "public function create()\n {\n return view($this->sPath.'/form', ['sPageTitle' => $this->sName]);\n }", "title": "" }, { "docid": "74cc4ed8fa057c0f0734c751db297540", "score": "0.71074176", "text": "public function create()\n {\n return view('curso.form');\n }", "title": "" }, { "docid": "76b4745b537106a5513b06d8ab3e4928", "score": "0.7075148", "text": "public function create()\n {\n //\n return view('submit.create');\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": "0f2dac59601869fb2c54ce811c4650aa", "score": "0.70675695", "text": "public function create()\n {\n return view('pages.forms.addProduct');\n }", "title": "" }, { "docid": "cd26d7c620bd493d734a18664ac56a6d", "score": "0.70457923", "text": "public function create()\n\t{\n\t\treturn view('formation/create');\n\t}", "title": "" }, { "docid": "a23e51d12b5252adcb8123deec223f18", "score": "0.7040961", "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\n return view(GetViewAdminResource($this->resourceView, 'create'))->with($this->data);\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": "59db2ec2bb6338f023d72461ca432a6e", "score": "0.7014469", "text": "public function create()\n {\n //form showing by modal, without controller or ajax\n }", "title": "" }, { "docid": "b7740989974ec89d90c4ded59d8de5c3", "score": "0.7008361", "text": "public function create()\n {\n \n return view ('studentform');\n }", "title": "" }, { "docid": "06f183ff6cd0bb720144b6bfd1f60c58", "score": "0.70045805", "text": "public function create()\n {\n return view('admin.catalog.edit_form', [\n 'route_base_url' => 'catalog',\n 'model_name' => '\\App\\Models\\Catalog'\n ]);\n }", "title": "" }, { "docid": "67dbcb9d8cbfbf80f7870af19e54acc7", "score": "0.69976735", "text": "public function create()\n {\n return view('student_form');\n }", "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": "e58f17523277fc6c291ecbf3f817eb22", "score": "0.6986169", "text": "public function create()\n {\n return view('radars.create');\n }", "title": "" }, { "docid": "3dc360473dabcb08b5169d4443b754b3", "score": "0.6984008", "text": "public function create()\n {\n $form = $this->form;\n $route = $this->route;\n return view($this->rCreate,compact('form','route'));\n }", "title": "" }, { "docid": "d992b460ca7fa75fae06c92431ea0040", "score": "0.69780463", "text": "public function create()\n {\n View::share(\"pageTitle\", $this->pageTitle);\n View::share(\"pageUrl\", $this->pageUrl);\n View::share(\"formTitle\", \"Create category\");\n View::share(\"formFields\", $this->form->getFields());\n return View::make('admin.form.form');\n }", "title": "" }, { "docid": "8d7b1185b59117c1c7138b85525adfa3", "score": "0.69766605", "text": "public function create()\n {\n return view(\"add\");\n }", "title": "" }, { "docid": "faad50701ca209b09853100eea7791d6", "score": "0.69652027", "text": "public function ShowForm()\n\t{\n\t\treturn view('marcas.new');\n\t}", "title": "" }, { "docid": "f15b831e674279eeed6c926d7fc775f4", "score": "0.69635683", "text": "public function showForm()\n {\n return view('backend.employee.new');\n\n }", "title": "" }, { "docid": "4e37d311d6990013b0ed72549d9fd35f", "score": "0.69635546", "text": "public function create()\n {\n return view('product.form');\n }", "title": "" }, { "docid": "4e37d311d6990013b0ed72549d9fd35f", "score": "0.69635546", "text": "public function create()\n {\n return view('product.form');\n }", "title": "" }, { "docid": "94b9216c661234b749248be69f855da2", "score": "0.69630045", "text": "public function makeCreateForm()\n {\n return View::make('backend.role.create')\n ->with('module', $this->module);\n }", "title": "" }, { "docid": "9cb057d0f77e53e0cce5708d50a6481b", "score": "0.6962359", "text": "public function create()\n {\n return view('new');\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": "ec1387b33a439043065a5a57c6b204dc", "score": "0.695659", "text": "public function create()\n {\n $title = trans('student.new');\n $this->generateParams();\n $custom_fields = CustomFormUserFields::getCustomUserFields('student');\n return view('layouts.create', compact('title', 'custom_fields'));\n }", "title": "" }, { "docid": "f0a4e435f6bebfce6162cc1be7c7ee0f", "score": "0.6954809", "text": "public function create()\n {\n return view('conceptos.create');\n }", "title": "" }, { "docid": "f0580571ff41736a9b6d64685969976e", "score": "0.6953423", "text": "public function create()\n {\n return view('forms.addJobForm');\n\n }", "title": "" }, { "docid": "7b8c9d5cbe582eab2f28c216421a2719", "score": "0.6951232", "text": "public function create()\n {\n return view('proyek.add');\n }", "title": "" }, { "docid": "234165e0547ce18212545035d0a268e8", "score": "0.6939794", "text": "public function create()\r\n {\r\n return view('backend/frame_management/create_form');\r\n }", "title": "" }, { "docid": "ba70ddc190000d3806bc08fdef63dba4", "score": "0.69371575", "text": "public function create()\n {\n return view('news.forms.create');\n }", "title": "" }, { "docid": "a9ea97d1b5f9c3b156c14f4c667cf591", "score": "0.69358236", "text": "public function create()\n {\n $data = array();\n $data['btn'] = trans('main.save');\n return view('employee.form', $data);\n }", "title": "" }, { "docid": "04fb02f1ffa4d6ad9db381edaa1ef950", "score": "0.6935629", "text": "public function create()\n {\n return view('marketing.eduzz.form',[\n 'title_postfix' => $this->configs['new'],\n 'navigation' => $this->navigation,\n ]);\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": "70b9293351aa11656c59414a77fe44bf", "score": "0.6923899", "text": "public function create()\n {\n\t $title = 'TITC - Payment Receipts Form';\n\n return view('layouts.register', compact( 'title' ) );\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": "c4416390a701ec4941a20dc3ab095a2a", "score": "0.6919174", "text": "public function create()\n\t{\n\t\treturn view('create');\n\t}", "title": "" }, { "docid": "4bf33424414f342096092b367153c3ff", "score": "0.6918515", "text": "public function create()\n {\n return view('webinars.create');\n }", "title": "" }, { "docid": "005d56adb8003598d74448ff694072a8", "score": "0.6917995", "text": "public function showNewForm()\n {\n return view('admin.user_new_form');\n }", "title": "" }, { "docid": "bfe25b751c8db9345d0c10f2b43ea766", "score": "0.6916618", "text": "public function create()\n {\n //the create form\n return view('cmsCRUD.create');\n }", "title": "" }, { "docid": "a56ae1a4e831d9137638253cc26e259a", "score": "0.6914903", "text": "public function create()\n {\n return view('supir.create');\n }", "title": "" }, { "docid": "e90d65170f9bc3dd1e2b969826600c53", "score": "0.6914271", "text": "public function create()\n {\n return view('ekskul.create');\n }", "title": "" }, { "docid": "92df450167a97fdf17ebd5b83c28b09a", "score": "0.69129646", "text": "public function create()\n\t{\n\t\t\n\t\treturn View::make('back.Conceptos.create');\n\t}", "title": "" }, { "docid": "a8868117c6271a1bf9acf9032ad876bd", "score": "0.6908564", "text": "public function create()\n {\n return view('admin.new');\n }", "title": "" }, { "docid": "d440c94efd1950e00b13ca9c0042a9b5", "score": "0.69047606", "text": "public function create()\n\t{\n\t\treturn View::make('furnizori.create');\n\t}", "title": "" }, { "docid": "50b63a26044f8f6e8ce183a0f169edb5", "score": "0.6899591", "text": "public function create()\n {\n //Form in views\\forms\\add-teacher\n }", "title": "" }, { "docid": "fe5a9905dc7a54f058401299c6181831", "score": "0.6898638", "text": "public function create() {\n return view(\"create\");\n }", "title": "" }, { "docid": "c17c042b94a24f7301adf6c1bccdccb4", "score": "0.68974555", "text": "public function create()\n {\n return view('akun.form');\n }", "title": "" }, { "docid": "3da29d431813cb53ced72193b8b7a8b3", "score": "0.6896062", "text": "public function create()\n {\n return view('info_bank_forms.create');\n }", "title": "" }, { "docid": "7851cc68e170265f04d4bef0fc5bc722", "score": "0.68953085", "text": "public function create()\n {\n $this->data['mode'] = 'create';\n $this->data['headline'] = 'Create New Product';\n $this->data['button'] = 'Save';\n\n $this->data['categories'] = Category::arrayForSelect();\n \n return view('products.form',$this->data);\n }", "title": "" }, { "docid": "6df26b4d414a58d611f86b22b775e1e1", "score": "0.6891878", "text": "public function create(){\n\t\treturn view('person.new');\n\t}", "title": "" }, { "docid": "a951f648a57c67c0069eeda1c6d6aa92", "score": "0.68887526", "text": "public function create()\n\t{\t\t\n\t\treturn view('syllabi.create');\n\t}", "title": "" }, { "docid": "8f40254b10bc1c3e9879e99a307263d1", "score": "0.6888498", "text": "public function create()\n {\n return view(\"contratistas.create\");\n }", "title": "" }, { "docid": "bdb0161d2f2f44cdaea93bf890a4c02e", "score": "0.68880934", "text": "public function create()\n {\n return view(\"create\");\n }", "title": "" }, { "docid": "f77ac1ad153be30f346944682eb2f804", "score": "0.6884337", "text": "public function create()\n {\n return view('programas.form');\n }", "title": "" }, { "docid": "4e920599445d082e866e30214e83ff15", "score": "0.6883745", "text": "public function create()\n {\n return view('company.create'); //return empty form\n }", "title": "" }, { "docid": "0c01c590097437f9d4700db1096060fa", "score": "0.6879102", "text": "public function create()\n {\n return view($this->view_path.'.form',['form_type' => 'create']);\n }", "title": "" }, { "docid": "b65c57b64c6e408c0c27dff7f53b5b58", "score": "0.687882", "text": "public function create()\n {\n return view('pemilih::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": "aba2162f4c6ac04e84bdec140bd9b6d8", "score": "0.68743026", "text": "public function create()\n {\n return view('vitri.create');\n }", "title": "" }, { "docid": "e893ea639bb3313c113e9ac5cb2ad8d1", "score": "0.6870653", "text": "public function actionCreate()\n {\n $model = new ResourceManagement();\n $transaction = Yii::$app->getDb()->beginTransaction();\n if (Yii::$app->request->isPost) {\n try{\n if (!$model->load(Yii::$app->request->post()) || !$model->save()) {\n throw new Exception(Yii::t('app', $model->getFirstErrorMessage()));\n }\n $transaction->commit();\n return $this->redirect(['view', 'id' => $model->id]);\n }catch (Exception $e) {\n $transaction->rollBack();\n Helper::Alert(Yii::t('app', $e->getMessage()));\n }\n }\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "0262071f01deb3bd4ca7aa624b922b9c", "score": "0.68705153", "text": "public function newAction()\n {\n if(!$this->get('security.context')->isGranted('ROLE_ADMIN')){\n throw new AccessDeniedException('Accès limité aux administrateurs!');\n }\n\n $entity = new Associate();\n $form = $this->createCreateForm($entity);\n\n return $this->render('MPTimeSheetBundle:Associate:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "2a2d5c7decbde95e55524a71972f118f", "score": "0.68689495", "text": "public function createAction() : object\n {\n // $userSecurity = new UserSecurity($this->di);\n // $userSecurity->auth();\n $page = $this->di->get(\"page\");\n $form = new CreateForm($this->di);\n $form->check();\n\n $page->add(\"question/crud/create\", [\n \"form\" => $form->getHTML(),\n ]);\n\n return $page->render([\n \"title\" => \"Ask a question\",\n ]);\n }", "title": "" }, { "docid": "1fc26c3847b4a579aa5212f09fb5a3ad", "score": "0.6868636", "text": "public function create()\n {\n //\n return view(\"pages.buku.form\");\n }", "title": "" }, { "docid": "e8a872ac2676790caa81e881be3f96da", "score": "0.6866793", "text": "public function create()\n\t{\n\t\t\n\t\treturn view('arbitro.create');\n\t}", "title": "" }, { "docid": "0c86a3bb52729202de25828ebfccd4f9", "score": "0.68618274", "text": "public function create()\n {\n return view('honnbus.create');\n }", "title": "" }, { "docid": "f7d9d429540409085821ae3a8cc377e9", "score": "0.6860699", "text": "public function create()\n {\n //\n\treturn view ('rumah.create');\n }", "title": "" }, { "docid": "451c07a3106f3c6e3d62757717bfa763", "score": "0.6860251", "text": "public function create()\n\t{\n\t\treturn view('horas.create');\n\t}", "title": "" }, { "docid": "60bdecfc6ffd19a36bc113519ea81603", "score": "0.685967", "text": "public function create()\n {\n //\n return view('products.form');\n }", "title": "" }, { "docid": "3d7bc8bb3b893c8acc93454aa41e36a4", "score": "0.68593067", "text": "public function create()\n\t{\n\n\t\treturn view('admin.oficinas.create');\n\t}", "title": "" }, { "docid": "5ac05ec4af3247a2fffa1aede51592e8", "score": "0.6858492", "text": "public function create()\n {\n return view('ringan.create');\n }", "title": "" }, { "docid": "17dc479c63e9567096e96d737df7c124", "score": "0.6857442", "text": "public function create() {\n $data = [\n 'title' => 'site_name',\n 'page_title' => 'add_admin',\n 'type' => 'add',\n 'form_title' => 'admin_form',\n 'submit_button' => 'save',\n ];\n return view(AD . '.brands_form')->with($data);\n }", "title": "" } ]
069251e5d7a67ccc07aae728743b1570
Displays alternate table row colors
[ { "docid": "e199227ba0585f4343d9b7888f4ce52f", "score": "0.6908294", "text": "function row_color($i)\n{ \n $bg1 = \"#EEEEEE\"; // color one \n $bg2 = \"#DDDDDD\"; // color two \n\n if ( $i%2 ) \n return $bg1; \n else \n return $bg2; \n \n}", "title": "" } ]
[ { "docid": "e58b6766bda87051ee43893e0f299ad2", "score": "0.7196669", "text": "function adminRowColor($rowNum) {\r\n\r\n\r\n\r\n if ($rowNum % 2) {\r\n\r\n\r\n\r\n return \"#FFFFFF\";\r\n }\r\n\r\n\r\n\r\n return \"\";\r\n}", "title": "" }, { "docid": "bb4a60a15920ca03dd596be05d8e8e78", "score": "0.6381746", "text": "function alternate_row($tdrow,$tdClass1,$tdClass2)\n{\n\tif(($tdrow%2)==0)\n\t{\n\t\t$tdClass=$tdClass1;\n\t}\n\telse\n\t{\n\t\t$tdClass=$tdClass2;\n\t}\n\n\treturn $tdClass;\n}", "title": "" }, { "docid": "3893180428ac289064589cc3f8c08b91", "score": "0.6301988", "text": "function alternate_row($tdrow=0,$tdClass1,$tdClass2)\r\n{\r\n\tif(($tdrow%2)==0)\r\n\t{\r\n\t\t$tdClass=$tdClass1;\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$tdClass=$tdClass2;\r\n\t}\r\n\treturn $tdClass;\r\n}", "title": "" }, { "docid": "8132eaad2a1b45ba6c94bb569445732d", "score": "0.6289554", "text": "function acf_repeater_even() {\n $scheme = get_user_option( 'admin_color' );\n $color = '';\n if($scheme == 'fresh') {\n $color = '#0073aa';\n } else if($scheme == 'light') {\n $color = '#d64e07';\n } else if($scheme == 'blue') {\n $color = '#52accc';\n } else if($scheme == 'coffee') {\n $color = '#59524c';\n } else if($scheme == 'ectoplasm') {\n $color = '#523f6d';\n } else if($scheme == 'midnight') {\n $color = '#e14d43';\n } else if($scheme == 'ocean') {\n $color = '#738e96';\n } else if($scheme == 'sunrise') {\n $color = '#dd823b';\n }\n echo '<style>.acf-repeater>.acf-input-table > tbody > tr:nth-child(even)>.order {color: #fff !important;background-color: '.$color.' !important; text-shadow: none}</style>';\n}", "title": "" }, { "docid": "5e5b1f30ec53d50b395b28d4534cadab", "score": "0.6108262", "text": "function printRow($rowName, $values, $bgn, $end, $suffix, $highlight) {\n\techo '<tr';\n\tif ($highlight) {\n\t\techo ' class=\\'info\\'';\n\t}\n\techo '>';\n\techo '<th>', $rowName, '</th>';\n\t\n\tfor ($iter = $bgn; $iter < $end; $iter++) {\n\t\techo '<td>', volume_conv_metric($values[$iter]), $suffix, '</td>';\n\t}\n\t\n\techo '</tr>';\n}", "title": "" }, { "docid": "e355cf55e7adadb8677720c8ce807e1f", "score": "0.6035379", "text": "function set_alternate_row_class($class) {\n $this->alternate_row_class = $class;\n }", "title": "" }, { "docid": "71e530fdc2b6f76c65f019e0565e3eb1", "score": "0.601914", "text": "public static function trColor($colors){\n\t\tstatic $i;\n\t\tif(func_num_args()>1){\n\t\t\t$numberArgs = func_num_args();\n\t\t\t$params = Utils::getParams(func_get_args(), $numberArgs);\n\t\t}\n\t\tif(!$i) {\n\t\t\t$i = 1;\n\t\t}\n\t\techo \"<tr bgcolor=\\\"\".$colors[$i-1].\"\\\"\";\n\t\tif(count($colors)==$i) {\n\t\t\t$i = 1;\n\t\t} else {\n\t\t\t++$i;\n\t\t}\n\t\tif(isset($params)){\n\t\t\tif(is_array($params)){\n\t\t\t\tforeach($params as $key => $value){\n\t\t\t\t\tif(!is_integer($key)){\n\t\t\t\t\t\techo \" $key = '$value'\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\techo \">\";\n\t}", "title": "" }, { "docid": "29837af06dc0e13a4a87b7b3c98b7bf6", "score": "0.60158634", "text": "function listo_format_zebra_row($row, $index)\n {\n if ($index % 2 == 0)\n {\n return new Tr(''.$index, 'zebra');\n }\n }", "title": "" }, { "docid": "b70f5ca65d6bd9b6e2ad3e0ac309fbf8", "score": "0.60094446", "text": "function displayResults($db)\n {\n \n $counter=0;\n while($rows = $db->result->fetch_assoc())\n {\n\n $counter+=1;\n echo\"\n <tr align = 'center' id = '$counter' onmouseover = 'changeRowColor(this,true);' onmouseout = 'changeRowColor(this,false);'\n onclick='pageRedirect($counter);'>\n <td>$rows[id]</td>\n <td>$rows[first_name]</td>\n <td>$rows[last_name]</td>\n <td>&nbsp $rows[email] &nbsp</td>\n </tr>\n \";\n\n }\n \n\n\n }", "title": "" }, { "docid": "ba941ee5c53668bcb88abd29da16e18d", "score": "0.59959835", "text": "public function display_rows()\n {\n }", "title": "" }, { "docid": "ba941ee5c53668bcb88abd29da16e18d", "score": "0.59959835", "text": "public function display_rows()\n {\n }", "title": "" }, { "docid": "ba941ee5c53668bcb88abd29da16e18d", "score": "0.59959835", "text": "public function display_rows()\n {\n }", "title": "" }, { "docid": "bfaee2085a9fdc6f8e07fd6e76f762e0", "score": "0.5992768", "text": "function Row_Rendering() {\n\n\t\t// Enter your code here\t\n\t}", "title": "" }, { "docid": "196f2891c010f8245cc811b7c91a1c7c", "score": "0.5989053", "text": "function display_rows() {\n\n\t\t//Get the records registered in the prepare_items method\n\t\t$records = $this->items;\n\n\t\t//Get the columns registered in the get_columns and get_sortable_columns methods\n\t\tlist( $columns, $hidden ) = $this->get_column_info();\n\n\t\t//Loop for each record\n\t\tif(!empty($records)){foreach($records as $rec){\n\n\t\t\t//Open the line\n\t echo '<tr id=\"record_'.$rec->id.'\">';\n\t\t\tforeach ( $columns as $column_name => $column_display_name ) {\n\n\t\t\t\t//Style attributes for each col\n\t\t\t\t$class = \"class='$column_name column-$column_name'\";\n\t\t\t\t$style = \"\";\n\t\t\t\tif ( in_array( $column_name, $hidden ) ) $style = ' style=\"display:none;\"';\n\t\t\t\t$attributes = $class . $style;\n\n\t\t\t\t$div = strtoupper(get_division($rec->home_team));\n\n\t\t\t\t//edit link\n\t\t\t\t$editlink = admin_url('admin.php?page=scores-admin&edit=1&id='.(int)$rec->id);\n\t\t\t\t$divlink = admin_url('admin.php?page=scores-admin&div='.(string)$div);\n\n\t\t\t\t//Display the cell\n\t\t\t\tswitch ( $column_name ) {\n\t\t\t\t\tcase \"col_datetime\": echo '<td '.$attributes.'><strong>'.date('D M jS, g:i A',strtotime($rec->datetime)).'</strong> <a href=\"'.$editlink.'\" title=\"Edit\">[edit]</a></td>'; break;\n\t\t\t\t\tcase \"col_diamond\": echo '<td '.$attributes.'>'.$rec->diamond.'</td>'; break;\n\t\t\t\t\tcase \"col_division\": echo '<td '.$attributes.'>'.$div.' <a href=\"'.$divlink.'\" title=\"View only '.$div.' division\">[View '.$div.']</a></td>'; break;\n\t\t\t\t\tcase \"col_home_team\": echo '<td '.$attributes.'>'.get_team_name($rec->home_team).'</td>'; break;\n\t\t\t\t\tcase \"col_home_score\": echo '<td '.$attributes.'>'.$rec->home_score.'</td>'; break;\n\t\t\t\t\tcase \"col_away_team\": echo '<td '.$attributes.'>'.get_team_name($rec->away_team).'</td>'; break;\n\t\t\t\t\tcase \"col_away_score\": echo '<td '.$attributes.'>'.$rec->away_score.'</td>'; break;\n\t\t\t\t\t// case \"col_forfeit\": echo '<td '.$attributes.'>'.$rec->forfeit.'</td>'; break;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Close the line\n\t\t\techo'</tr>';\n\t\t}}\n\t}", "title": "" }, { "docid": "2c7a982369f1c161ea0720736471cc6d", "score": "0.5933396", "text": "function getTable($dbResults,$fields){\n\t\t\n\t\t//html for generating table header the way we want\n\t\t//html for generating table body\n\t\t$j = 0;\n\t\twhile ( $dbField = mysql_fetch_assoc($dbResults) ) {\n\t\t\tif($j%2 == 0){\n\t\t\t\techo \"<tr>\";\n\t\t\t\tfor ($i = 0; $i < count($fields); $i++) {\n\t\t\t\t\techo '<td>'.$dbField[$fields[$i]].'</td>';\n \t\t\t}\n\t\t\t\techo \"</tr>\";\n\t\t\t\t$j++;\n\t\t\t}\n\t\t\telse{\n\t\t\techo \"<tr style='background-color:#ccc;'>\";\n\t\t\t\tfor ($i = 0; $i < count($fields); $i++) {\n\t\t\t\t\techo '<td>'.$dbField[$fields[$i]].'</td>';\n \t\t\t}\n\t\t\t\techo \"</tr>\";\n\t\t\t\t$j++;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "44eafd1af0794f115f0190fdfd186322", "score": "0.58861184", "text": "function helper_alternate_colors( $p_index, $p_odd_color, $p_even_color ) {\r\n\t\tstatic $t_index = 1;\r\n\r\n\t\tif ( null !== $p_index ) {\r\n\t\t\t$t_index = $p_index;\r\n\t\t}\r\n\r\n\t\tif ( 1 == $t_index++ % 2 ) {\r\n\t\t\treturn $p_odd_color;\r\n\t\t} else {\r\n\t\t\treturn $p_even_color;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "839458ab5af14e26d5b046a307dee9a4", "score": "0.5864779", "text": "function looTabel($ridadeArv,$veergudeArv){\n echo '<table border=\"1\">';\n for ($reaNr = 1; $reaNr <= $ridadeArv; $reaNr++){\n echo '<tr>';\n for ($veeruNr = 1; $veeruNr <= $veergudeArv; $veeruNr++){\n echo '<td style=\"background-color: '.genereeriVarv().'\">';\n echo rand(10,99);\n echo '</td>';\n }\n echo '</tr>';\n }\n echo '</table>';\n}", "title": "" }, { "docid": "1f8717b9cc2d4705de25399cbe7a272e", "score": "0.5796056", "text": "function get_row_color($counter, $no_of_steps, $row_borders = '', $dark_color = '#F0F0E1', $light_color = '#FFFFFF', $color_only = 'N')\n{\n if (($counter % $no_of_steps) == 0) {\n if ($row_borders == 'row_borders') {\n if ($color_only == 'Y') {\n $rowclass = $light_color;\n } else {\n $rowclass = 'background-color: '.$light_color.'; border-bottom: 1px solid #AAAAAA;';\n }\n } else {\n if ($color_only == 'Y') {\n $rowclass = $light_color;\n } else {\n $rowclass = 'background-color: '.$light_color.';';\n }\n }\n } else {\n if ($row_borders == 'row_borders') {\n if ($color_only == 'Y') {\n $rowclass = $dark_color;\n } else {\n $rowclass = 'background-color: '.$dark_color.'; border-bottom: 1px solid #AAAAAA;';\n }\n } else {\n if ($color_only == 'Y') {\n $rowclass = $dark_color;\n } else {\n $rowclass = 'background-color: '.$dark_color.';';\n }\n }\n }\n\n return $rowclass;\n}", "title": "" }, { "docid": "07fae78e04bfbd714791d90861174a91", "score": "0.57935447", "text": "private function _renderRow($row){\n\t\t$output = \"\\t\\t\\t<tr>\\n\";\n\t\tif($row['_type']=='normal'){\n\t\t\tunset($row['_type']);\n\t\t\tif($this->_numberColumns===null){\n\t\t\t\t$this->_numberColumns = count($row);\n\t\t\t}\n\t\t\tforeach($row as $numberColumn => $value){\n\t\t\t\tif(isset($this->_totalizeColumns[$numberColumn])){\n\t\t\t\t\tif(!isset($this->_totalizeValues[$numberColumn])){\n\t\t\t\t\t\t$this->_totalizeValues[$numberColumn] = 0;\n\t\t\t\t\t}\n\t\t\t\t\t$this->_totalizeValues[$numberColumn]+=$value;\n\t\t\t\t}\n\t\t\t\tif(isset($this->_columnFormats[$numberColumn])){\n\t\t\t\t\t$value = $this->_columnFormats[$numberColumn]->apply($value);\n\t\t\t\t}\n\t\t\t\t$output.=\"\\t\\t\\t\\t<td class='c$numberColumn'>$value</td>\\n\";\n\t\t\t}\n\t\t} else {\n\t\t\tif($row['_type']=='raw'){\n\t\t\t\tunset($row['_type']);\n\t\t\t\tforeach($row as $numberColumn => $rawColumn){\n\t\t\t\t\t$output.=\"\\t\\t\\t\\t<td colspan='\".$rawColumn->getSpan().\"'\";\n\t\t\t\t\t$styles = $rawColumn->getStyle();\n\t\t\t\t\tif($styles){\n\t\t\t\t\t\t$style = $this->_prepareStyle($styles);\n\t\t\t\t\t\t$output.=\" style='\".join(';', $style).\"'\t\";\n\t\t\t\t\t}\n\t\t\t\t\t$output.=\">\".$rawColumn->getValue().\"</td>\\n\";\n\t\t\t\t\tunset($rawColumn);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$output.=\"\\t\\t\\t</tr>\\n\";\n\t\t$this->_appendToOutput($output);\n\t}", "title": "" }, { "docid": "a780e1a9fa35a0dd16f0a46155946203", "score": "0.57833433", "text": "public function display_rows() {}", "title": "" }, { "docid": "a780e1a9fa35a0dd16f0a46155946203", "score": "0.57833433", "text": "public function display_rows() {}", "title": "" }, { "docid": "a780e1a9fa35a0dd16f0a46155946203", "score": "0.57823145", "text": "public function display_rows() {}", "title": "" }, { "docid": "a780e1a9fa35a0dd16f0a46155946203", "score": "0.57811904", "text": "public function display_rows() {}", "title": "" }, { "docid": "5f91da3010a9bbf8792c6563cfa4be4d", "score": "0.57781744", "text": "public function showInRow(){\n echo \"<tr><td>\".$this->CLIENTID.\"</td><td>\".$this->Nom.\"</td><td>\".$this->Prenom.\"</td><td>\".$this->NTel.\"</td><td>\".$this->EMail.\"</td><td>\".$this->IDType.\"</td><td>\".$this->IDNumber.\"</td></tr>\";\n }", "title": "" }, { "docid": "cd2c06bf054076684b43325b9467bada", "score": "0.5774651", "text": "function RenderRow() {\n\t\tglobal $conn, $Security, $reporte_rubros;\n\n\t\t// Call Row_Rendering event\n\t\t$reporte_rubros->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// idMer\n\n\t\t$reporte_rubros->idMer->CellCssStyle = \"\";\n\t\t$reporte_rubros->idMer->CellCssClass = \"\";\n\t\tif ($reporte_rubros->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t\t// idMer\n\t\t\t$reporte_rubros->idMer->ViewValue = $reporte_rubros->idMer->CurrentValue;\n\t\t\t$reporte_rubros->idMer->CssStyle = \"\";\n\t\t\t$reporte_rubros->idMer->CssClass = \"\";\n\t\t\t$reporte_rubros->idMer->ViewCustomAttributes = \"\";\n\n\t\t\t// idMer\n\t\t\t$reporte_rubros->idMer->HrefValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\t$reporte_rubros->Row_Rendered();\n\t}", "title": "" }, { "docid": "2a70e05f9e5621b07117098c0b1a3967", "score": "0.57719374", "text": "function buildRows() {\n $alt = '1';\n while ( $row = $this->collection->fetch() ) {\n $this->table.=\" <tr id=\\\"\".$this->idPre.\"Row\".$alt.\"\\\">\\n\";\n if ( is_array($row) ) {\n foreach ( $row as $col ) {\n $this->table.=\" <td id=\\\"\".$this->idPre.\"Col\\\">\".\n $col.\"</td>\\n\";\n }\n } else {\n $this->table.=\" <td id=\\\"\".$this->idPre.\"Col\\\">\".\n $row.\"</td>\\n\";\n }\n $this->table.=\" </tr>\\n\";\n $alt = ( $alt == 1 ) ? 2 : 1;\n }\n\n }", "title": "" }, { "docid": "81c65c710f39df9a8ad519a01bad72db", "score": "0.57681644", "text": "public function renderTable()\n {\n }", "title": "" }, { "docid": "16f011275463a98d4e9cfe8d9d9adb16", "score": "0.5763848", "text": "public function renderTableRow($row)\n\t{\n\t\tif($this->rowCssClassExpression!==null)\n\t\t{\n\t\t\t$data=$this->dataProvider->data[$row];\n\t\t\techo '<tr class=\"'.$this->evaluateExpression($this->rowCssClassExpression,array('row'=>$row,'data'=>$data)).'\">';\n\t\t}\n\t\telse if(is_array($this->rowCssClass) && ($n=count($this->rowCssClass))>0)\n\t\t\techo '<tr class=\"'.$this->rowCssClass[$row%$n].'\">';\n\t\telse\n\t\t\techo '<tr>';\n\t\tforeach($this->columns as $column)\n\t\t\t$column->renderDataCell($row);\n\t\techo \"</tr>\\n\";\n\t}", "title": "" }, { "docid": "b946c476743be6aded99dab312a030dd", "score": "0.5761346", "text": "public function renderTableRow($row)\r\n\t{\r\n\t\tif($this->rowCssClassExpression!==null) {\r\n\t\t\t$data=$this->dataProvider->data[$row];\r\n\t\t\techo '<tr class=\"' . $this->evaluateExpression($this->rowCssClassExpression,array('row' => $row, 'data' => $data)).'\">';\r\n\t\t}\r\n\t\telse if(is_array($this->rowCssClass) && ($n=count($this->rowCssClass))>0)\r\n\t\t\techo '<tr class=\"'.$this->rowCssClass[$row%$n].'\">';\r\n\t\telse\r\n\t\t\techo '<tr>';\r\n\t\tforeach($this->columns as $column)\r\n\t\t\t$column->renderDataCell($row);\r\n\t\techo \"</tr>\\n\";\r\n\t}", "title": "" }, { "docid": "f4c0ebb70a8859d8e2bea4ec2ccdb909", "score": "0.5750115", "text": "function printReportTableRows($rows) {\r\n foreach ($rows as $row) {\r\n print '<tr class=\"highlight\">' . \"\\n\";\r\n foreach ($row as $column) {\r\n print '<td>' . $column . '</td>' . \"\\n\";\r\n }\r\n print '</tr>' . \"\\n\";\r\n }\r\n}", "title": "" }, { "docid": "a1e91c1872a0d79ce73d0ace90fcc28f", "score": "0.57312363", "text": "function display_rows() {\n\n //Get the records registered in the prepare_items method\n $records = $this->items;\n\n //Get the columns registered in the get_columns and get_sortable_columns methods\n list( $columns, $hidden ) = $this->get_column_info();\n\n //Loop for each record\n if (!empty($records)) {\n //Open the line\n echo '<tr id=\"record_' . $records['id'] . '\">';\n foreach ($columns as $column_name => $column_display_name) {\n\n //Style attributes for each col\n $class = \"class='$column_name column-$column_name'\";\n $style = \"\";\n if (in_array($column_name, $hidden))\n $style = ' style=\"display:none;\"';\n $attributes = $class . $style;\n\n //Display the cell\n switch ($column_name) {\n case \"col_memberships_id\": echo '<td ' . $attributes . '>' . $records['id'] . '</td>';\n break;\n case \"col_memberships_name\": echo '<td ' . $attributes . '>' . $this->column_title($records) . '</td>';\n break;\n case \"col_memberships_price\": echo '<td ' . $attributes . '>' . number_format($records['price'], 0, ',', '.') . ' đ</td>';\n break;\n case \"col_memberships_time\": echo '<td ' . $attributes . '>' . $records['time'] . ' tháng</td>';\n break;\n case \"col_memberships_amount\": echo '<td ' . $attributes . '>' . number_format($records['amount'], 0, ',', '.') . ' đ</td>';\n break;\n }\n }\n\n //Close the line\n echo'</tr>';\n }\n }", "title": "" }, { "docid": "be85cd827e2ff15772d83dced36b0961", "score": "0.57291424", "text": "public function showRow($row, $trformat = self::tr, $tdformat = self::td)\n {\n print $trformat;\n foreach ( $row as $element )\n {\n if (empty ( $element ))\n {\n $element = self::blank;\n }\n printf ( $tdformat, $element );\n }\n print self::etr;\n }", "title": "" }, { "docid": "bd82fa97eaa18cb27f8a7a9994764930", "score": "0.5720862", "text": "function RenderRow() {\r\n\tglobal $conn, $Security, $urls;\r\n\r\n\t// Call Row Rendering event\r\n\t$urls->Row_Rendering();\r\n\r\n\t// Common render codes for all row types\r\n\t// id\r\n\r\n\t$urls->id->CellCssStyle = \"\";\r\n\t$urls->id->CellCssClass = \"\";\r\n\r\n\t// url\r\n\t$urls->url->CellCssStyle = \"\";\r\n\t$urls->url->CellCssClass = \"\";\r\n\r\n\t// digest\r\n\t$urls->digest->CellCssStyle = \"\";\r\n\t$urls->digest->CellCssClass = \"\";\r\n\r\n\t// type\r\n\t$urls->type->CellCssStyle = \"\";\r\n\t$urls->type->CellCssClass = \"\";\r\n\tif ($urls->RowType == EW_ROWTYPE_VIEW) { // View row\r\n\r\n\t\t// id\r\n\t\t$urls->id->ViewValue = $urls->id->CurrentValue;\r\n\t\t$urls->id->CssStyle = \"\";\r\n\t\t$urls->id->CssClass = \"\";\r\n\t\t$urls->id->ViewCustomAttributes = \"\";\r\n\r\n\t\t// url\r\n\t\t$urls->url->ViewValue = $urls->url->CurrentValue;\r\n\t\t$urls->url->CssStyle = \"\";\r\n\t\t$urls->url->CssClass = \"\";\r\n\t\t$urls->url->ViewCustomAttributes = \"\";\r\n\r\n\t\t// digest\r\n\t\t$urls->digest->ViewValue = $urls->digest->CurrentValue;\r\n\t\t$urls->digest->CssStyle = \"\";\r\n\t\t$urls->digest->CssClass = \"\";\r\n\t\t$urls->digest->ViewCustomAttributes = \"\";\r\n\r\n\t\t// type\r\n\t\t$urls->type->ViewValue = $urls->type->CurrentValue;\r\n\t\t$urls->type->CssStyle = \"\";\r\n\t\t$urls->type->CssClass = \"\";\r\n\t\t$urls->type->ViewCustomAttributes = \"\";\r\n\r\n\t\t// id\r\n\t\t$urls->id->HrefValue = \"\";\r\n\r\n\t\t// url\r\n\t\t$urls->url->HrefValue = \"\";\r\n\r\n\t\t// digest\r\n\t\t$urls->digest->HrefValue = \"\";\r\n\r\n\t\t// type\r\n\t\t$urls->type->HrefValue = \"\";\r\n\t} elseif ($urls->RowType == EW_ROWTYPE_ADD) { // Add row\r\n\t} elseif ($urls->RowType == EW_ROWTYPE_EDIT) { // Edit row\r\n\t} elseif ($urls->RowType == EW_ROWTYPE_SEARCH) { // Search row\r\n\t}\r\n\r\n\t// Call Row Rendered event\r\n\t$urls->Row_Rendered();\r\n}", "title": "" }, { "docid": "732ceb81d5c588813bee73bc854f5493", "score": "0.570184", "text": "function setRowColor($row,$color) {\r\n\t\t$this->row_fgColor[$row] = $color;\r\n\t}", "title": "" }, { "docid": "a8c232cb470b307499255557613ee09f", "score": "0.5682938", "text": "function helper_alternate_class( $p_index=null, $p_odd_class=\"row-1\", $p_even_class=\"row-2\" ) {\r\n\t\tstatic $t_index = 1;\r\n\r\n\t\tif ( null !== $p_index ) {\r\n\t\t\t$t_index = $p_index;\r\n\t\t}\r\n\r\n\t\tif ( 1 == $t_index++ % 2 ) {\r\n\t\t\treturn \"class=\\\"$p_odd_class\\\"\";\r\n\t\t} else {\r\n\t\t\treturn \"class=\\\"$p_even_class\\\"\";\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "4e1db964dcccd8cd0e142bc5074eff73", "score": "0.564594", "text": "function display_rows() {\n $records = $this->items;\n \n //Get the columns registered in the get_columns and get_sortable_columns methods\n list( $columns, $hidden ) = $this->get_column_info();\n //shit wordpress works for shit, so put this here and we do get the right results\n $columns = $this->get_columns();\n //Loop for each record\n if(!empty($records)){foreach($records as $rec){\n //Open the line\n echo '<tr id=\"record_'.$rec->id.'\">';\n foreach ( $columns as $column_name => $column_display_name ) {\n\n //Style attributes for each col\n $class = \"class='$column_name column-$column_name'\";\n $style = \"\";\n if ( in_array( $column_name, $hidden ) ) $style = ' style=\"display:none;\"';\n $attributes = $class . $style;\n\n //edit link\n $editlink = '/wp-admin/link.php?action=edit&link_id='.(int)$rec->id;\n\n //Display the cell\n switch ( $column_name ) {\n case \"col_id\":\techo '<td '.$attributes.'>'.stripslashes($rec->id).'</td>';\tbreak;\n case \"col_country\": echo '<td '.$attributes.'>'.countryToString($rec->country).'</td>'; break;\n case \"col_title\": echo '<td '.$attributes.'>'.stripslashes($rec->title).'</td>'; break;\n case \"col_remove\": echo '<td '.$attributes.'><a href=\"?page=oneguyandacat-manage-distributor&edit='.$rec->id.'\">Edit</a> - <a onclick=\"return confirm(\\'Delete the record?\\');\" href=\"?page=oneguyandacat-manage-distributor&remove='.$rec->id.'\">Delete</a></td>'; break;\n// case \"col_link_description\": echo '< td '.$attributes.'>'.$rec->link_description.'< /td>'; break;\n// case \"col_link_visible\": echo '< td '.$attributes.'>'.$rec->link_visible.'< /td>'; break;\n }\n }\n\n //Close the line\n echo'</tr>';\n }}\n }", "title": "" }, { "docid": "83d7c152a02b31d7f69db38e09bbce5d", "score": "0.5644629", "text": "private function table_rows( $data = array(), $alt_class = null ) {\n\t\t\n\t\t//Init vars\n\t\t$output = '<tbody><tr><td></td></tr></tbody>';\n\t\t$class\t= null;\n\t\t\n\t\tif( !empty($data) ) {\n\t\t\t\n\t\t\t//Override default output\n\t\t\t$output = '<tbody>';\n\t\t\t\n\t\t\t//Loop data array and create each row\n\t\t\t$i = 0;\n\t\t\tforeach( $data as $row ) {\n\t\t\t\t\n\t\t\t\t//Setup row alt class\n\t\t\t\tif( $i % 3 ) {\n\t\t\t\t\t$class = $alt_class;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$output.= \"<tr class='{$class}'>\";\n\t\t\t\t\n\t\t\t\t//Loop row data\n\t\t\t\tforeach( $row as $td ) {\n\t\t\t\t\t$output.= \"<td>{$td}</td>\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$output.= '</tr>';\n\t\t\t\t\n\t\t\t\t$i ++;\n\t\t\t}\n\t\t\t\n\t\t\t//Close tbody\n\t\t\t$output.= '</tbody>';\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "c0171a00868f0e6fbe618ca96162f3aa", "score": "0.56260735", "text": "function printTable($data) \n {\n printf(\"<h3 class='center' style='margin-bottom: -45px;'>%s</h3>\", $data[0]['fromladder']);\n $i = 1;\n \tforeach ($data as $key => $value)\n {\n if ($data[$key]['laddermaster'] == 1)\n {\n $color = \"#F9C9C9\";\n } else\n {\n $color = \"#fff\";\n }\n $country = strtolower($data[$key]['country']);\n printf(\"<tr style='background: %s;'>\n <td>%s</td>\n <td><a href='https://osu.ppy.sh/u/%s'>%s</a> <img class='flag' src='/ladder/img/$country.png' name='$country' alt='($country)'></td>\n <td>%s</td>\n <td>%s</td>\n <td>%s</td>\n <td>%s</td>\n </tr>\",\n $color,\n $i,\n $data[$key]['username'],\n $data[$key]['username'],\n number_format($data[$key]['pp_raw']),\n number_format($data[$key]['pp_rank']),\n round($data[$key]['accuracy'], 2),\n number_format($data[$key]['playcount']\n ));\n $i++;\n }\n }", "title": "" }, { "docid": "1ef284994a56eb609bb110939d68e7ed", "score": "0.56243175", "text": "function doRows($i) {\n switch (abs($i) % 2) {\n case 0: return \"row1\";\n break;\n case 1: return \"row2\";\n break;\n }\n }", "title": "" }, { "docid": "377af44265a48d73642d7ae51d08c77e", "score": "0.5610163", "text": "function RenderRow() {\n\t\tglobal $conn, $Security, $Language, $contadores;\n\n\t\t// Initialize URLs\n\t\t$this->ExportPrintUrl = $this->PageUrl() . \"export=print&\" . \"id=\" . urlencode($contadores->id->CurrentValue);\n\t\t$this->ExportHtmlUrl = $this->PageUrl() . \"export=html&\" . \"id=\" . urlencode($contadores->id->CurrentValue);\n\t\t$this->ExportExcelUrl = $this->PageUrl() . \"export=excel&\" . \"id=\" . urlencode($contadores->id->CurrentValue);\n\t\t$this->ExportWordUrl = $this->PageUrl() . \"export=word&\" . \"id=\" . urlencode($contadores->id->CurrentValue);\n\t\t$this->ExportXmlUrl = $this->PageUrl() . \"export=xml&\" . \"id=\" . urlencode($contadores->id->CurrentValue);\n\t\t$this->ExportCsvUrl = $this->PageUrl() . \"export=csv&\" . \"id=\" . urlencode($contadores->id->CurrentValue);\n\t\t$this->AddUrl = $contadores->AddUrl();\n\t\t$this->EditUrl = $contadores->EditUrl();\n\t\t$this->CopyUrl = $contadores->CopyUrl();\n\t\t$this->DeleteUrl = $contadores->DeleteUrl();\n\t\t$this->ListUrl = $contadores->ListUrl();\n\n\t\t// Call Row_Rendering event\n\t\t$contadores->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// id\n\n\t\t$contadores->id->CellCssStyle = \"\"; $contadores->id->CellCssClass = \"\";\n\t\t$contadores->id->CellAttrs = array(); $contadores->id->ViewAttrs = array(); $contadores->id->EditAttrs = array();\n\n\t\t// op\n\t\t$contadores->op->CellCssStyle = \"\"; $contadores->op->CellCssClass = \"\";\n\t\t$contadores->op->CellAttrs = array(); $contadores->op->ViewAttrs = array(); $contadores->op->EditAttrs = array();\n\n\t\t// zona\n\t\t$contadores->zona->CellCssStyle = \"\"; $contadores->zona->CellCssClass = \"\";\n\t\t$contadores->zona->CellAttrs = array(); $contadores->zona->ViewAttrs = array(); $contadores->zona->EditAttrs = array();\n\n\t\t// descripcion\n\t\t$contadores->descripcion->CellCssStyle = \"\"; $contadores->descripcion->CellCssClass = \"\";\n\t\t$contadores->descripcion->CellAttrs = array(); $contadores->descripcion->ViewAttrs = array(); $contadores->descripcion->EditAttrs = array();\n\n\t\t// programa\n\t\t$contadores->programa->CellCssStyle = \"\"; $contadores->programa->CellCssClass = \"\";\n\t\t$contadores->programa->CellAttrs = array(); $contadores->programa->ViewAttrs = array(); $contadores->programa->EditAttrs = array();\n\n\t\t// diahasta\n\t\t$contadores->diahasta->CellCssStyle = \"\"; $contadores->diahasta->CellCssClass = \"\";\n\t\t$contadores->diahasta->CellAttrs = array(); $contadores->diahasta->ViewAttrs = array(); $contadores->diahasta->EditAttrs = array();\n\n\t\t// objetivo\n\t\t$contadores->objetivo->CellCssStyle = \"\"; $contadores->objetivo->CellCssClass = \"\";\n\t\t$contadores->objetivo->CellAttrs = array(); $contadores->objetivo->ViewAttrs = array(); $contadores->objetivo->EditAttrs = array();\n\n\t\t// op2\n\t\t$contadores->op2->CellCssStyle = \"\"; $contadores->op2->CellCssClass = \"\";\n\t\t$contadores->op2->CellAttrs = array(); $contadores->op2->ViewAttrs = array(); $contadores->op2->EditAttrs = array();\n\n\t\t// horahasta\n\t\t$contadores->horahasta->CellCssStyle = \"\"; $contadores->horahasta->CellCssClass = \"\";\n\t\t$contadores->horahasta->CellAttrs = array(); $contadores->horahasta->ViewAttrs = array(); $contadores->horahasta->EditAttrs = array();\n\n\t\t// material\n\t\t$contadores->material->CellCssStyle = \"\"; $contadores->material->CellCssClass = \"\";\n\t\t$contadores->material->CellAttrs = array(); $contadores->material->ViewAttrs = array(); $contadores->material->EditAttrs = array();\n\n\t\t// orden\n\t\t$contadores->orden->CellCssStyle = \"\"; $contadores->orden->CellCssClass = \"\";\n\t\t$contadores->orden->CellAttrs = array(); $contadores->orden->ViewAttrs = array(); $contadores->orden->EditAttrs = array();\n\t\tif ($contadores->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t\t// id\n\t\t\t$contadores->id->ViewValue = $contadores->id->CurrentValue;\n\t\t\t$contadores->id->CssStyle = \"\";\n\t\t\t$contadores->id->CssClass = \"\";\n\t\t\t$contadores->id->ViewCustomAttributes = \"\";\n\n\t\t\t// op\n\t\t\t$contadores->op->ViewValue = $contadores->op->CurrentValue;\n\t\t\t$contadores->op->CssStyle = \"\";\n\t\t\t$contadores->op->CssClass = \"\";\n\t\t\t$contadores->op->ViewCustomAttributes = \"\";\n\n\t\t\t// zona\n\t\t\t$contadores->zona->ViewValue = $contadores->zona->CurrentValue;\n\t\t\t$contadores->zona->CssStyle = \"\";\n\t\t\t$contadores->zona->CssClass = \"\";\n\t\t\t$contadores->zona->ViewCustomAttributes = \"\";\n\n\t\t\t// descripcion\n\t\t\t$contadores->descripcion->ViewValue = $contadores->descripcion->CurrentValue;\n\t\t\t$contadores->descripcion->CssStyle = \"\";\n\t\t\t$contadores->descripcion->CssClass = \"\";\n\t\t\t$contadores->descripcion->ViewCustomAttributes = \"\";\n\n\t\t\t// programa\n\t\t\t$contadores->programa->ViewValue = $contadores->programa->CurrentValue;\n\t\t\t$contadores->programa->CssStyle = \"\";\n\t\t\t$contadores->programa->CssClass = \"\";\n\t\t\t$contadores->programa->ViewCustomAttributes = \"\";\n\n\t\t\t// diahasta\n\t\t\tif (strval($contadores->diahasta->CurrentValue) <> \"\") {\n\t\t\t\tswitch ($contadores->diahasta->CurrentValue) {\n\t\t\t\t\tcase \"Lunes\":\n\t\t\t\t\t\t$contadores->diahasta->ViewValue = \"Lunes\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Martes\":\n\t\t\t\t\t\t$contadores->diahasta->ViewValue = \"Martes\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Miercoles\":\n\t\t\t\t\t\t$contadores->diahasta->ViewValue = \"Miercoles\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Jueves\":\n\t\t\t\t\t\t$contadores->diahasta->ViewValue = \"Jueves\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Viernes\":\n\t\t\t\t\t\t$contadores->diahasta->ViewValue = \"Viernes\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Sabado\":\n\t\t\t\t\t\t$contadores->diahasta->ViewValue = \"Sabado\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Domingo\":\n\t\t\t\t\t\t$contadores->diahasta->ViewValue = \"Domingo\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$contadores->diahasta->ViewValue = $contadores->diahasta->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$contadores->diahasta->ViewValue = NULL;\n\t\t\t}\n\t\t\t$contadores->diahasta->CssStyle = \"\";\n\t\t\t$contadores->diahasta->CssClass = \"\";\n\t\t\t$contadores->diahasta->ViewCustomAttributes = \"\";\n\n\t\t\t// objetivo\n\t\t\t$contadores->objetivo->ViewValue = $contadores->objetivo->CurrentValue;\n\t\t\t$contadores->objetivo->CssStyle = \"\";\n\t\t\t$contadores->objetivo->CssClass = \"\";\n\t\t\t$contadores->objetivo->ViewCustomAttributes = \"\";\n\n\t\t\t// op2\n\t\t\t$contadores->op2->ViewValue = $contadores->op2->CurrentValue;\n\t\t\t$contadores->op2->CssStyle = \"\";\n\t\t\t$contadores->op2->CssClass = \"\";\n\t\t\t$contadores->op2->ViewCustomAttributes = \"\";\n\n\t\t\t// horahasta\n\t\t\t$contadores->horahasta->ViewValue = $contadores->horahasta->CurrentValue;\n\t\t\t$contadores->horahasta->CssStyle = \"\";\n\t\t\t$contadores->horahasta->CssClass = \"\";\n\t\t\t$contadores->horahasta->ViewCustomAttributes = \"\";\n\n\t\t\t// material\n\t\t\t$contadores->material->ViewValue = $contadores->material->CurrentValue;\n\t\t\t$contadores->material->CssStyle = \"\";\n\t\t\t$contadores->material->CssClass = \"\";\n\t\t\t$contadores->material->ViewCustomAttributes = \"\";\n\n\t\t\t// orden\n\t\t\t$contadores->orden->ViewValue = $contadores->orden->CurrentValue;\n\t\t\t$contadores->orden->CssStyle = \"\";\n\t\t\t$contadores->orden->CssClass = \"\";\n\t\t\t$contadores->orden->ViewCustomAttributes = \"\";\n\n\t\t\t// id\n\t\t\t$contadores->id->HrefValue = \"\";\n\t\t\t$contadores->id->TooltipValue = \"\";\n\n\t\t\t// op\n\t\t\t$contadores->op->HrefValue = \"\";\n\t\t\t$contadores->op->TooltipValue = \"\";\n\n\t\t\t// zona\n\t\t\t$contadores->zona->HrefValue = \"\";\n\t\t\t$contadores->zona->TooltipValue = \"\";\n\n\t\t\t// descripcion\n\t\t\t$contadores->descripcion->HrefValue = \"\";\n\t\t\t$contadores->descripcion->TooltipValue = \"\";\n\n\t\t\t// programa\n\t\t\t$contadores->programa->HrefValue = \"\";\n\t\t\t$contadores->programa->TooltipValue = \"\";\n\n\t\t\t// diahasta\n\t\t\t$contadores->diahasta->HrefValue = \"\";\n\t\t\t$contadores->diahasta->TooltipValue = \"\";\n\n\t\t\t// objetivo\n\t\t\t$contadores->objetivo->HrefValue = \"\";\n\t\t\t$contadores->objetivo->TooltipValue = \"\";\n\n\t\t\t// op2\n\t\t\t$contadores->op2->HrefValue = \"\";\n\t\t\t$contadores->op2->TooltipValue = \"\";\n\n\t\t\t// horahasta\n\t\t\t$contadores->horahasta->HrefValue = \"\";\n\t\t\t$contadores->horahasta->TooltipValue = \"\";\n\n\t\t\t// material\n\t\t\t$contadores->material->HrefValue = \"\";\n\t\t\t$contadores->material->TooltipValue = \"\";\n\n\t\t\t// orden\n\t\t\t$contadores->orden->HrefValue = \"\";\n\t\t\t$contadores->orden->TooltipValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($contadores->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$contadores->Row_Rendered();\n\t}", "title": "" }, { "docid": "79ab4cd9bab98932474687e0f0b111dd", "score": "0.55268", "text": "function RenderRow() {\n\t\tglobal $conn, $Security, $Language, $usersadmin;\n\n\t\t// Initialize URLs\n\t\t// Call Row_Rendering event\n\n\t\t$usersadmin->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// C_TENDANGNHAP\n\n\t\t$usersadmin->C_TENDANGNHAP->CellCssStyle = \"\"; $usersadmin->C_TENDANGNHAP->CellCssClass = \"\";\n\t\t$usersadmin->C_TENDANGNHAP->CellAttrs = array(); $usersadmin->C_TENDANGNHAP->ViewAttrs = array(); $usersadmin->C_TENDANGNHAP->EditAttrs = array();\n\n\t\t// C_MATKHAU\n\t\t$usersadmin->C_MATKHAU->CellCssStyle = \"\"; $usersadmin->C_MATKHAU->CellCssClass = \"\";\n\t\t$usersadmin->C_MATKHAU->CellAttrs = array(); $usersadmin->C_MATKHAU->ViewAttrs = array(); $usersadmin->C_MATKHAU->EditAttrs = array();\n\n\t\t// C_HOTEN\n\t\t$usersadmin->C_HOTEN->CellCssStyle = \"\"; $usersadmin->C_HOTEN->CellCssClass = \"\";\n\t\t$usersadmin->C_HOTEN->CellAttrs = array(); $usersadmin->C_HOTEN->ViewAttrs = array(); $usersadmin->C_HOTEN->EditAttrs = array();\n\n\t\t// C_DIACHI\n\t\t$usersadmin->C_DIACHI->CellCssStyle = \"\"; $usersadmin->C_DIACHI->CellCssClass = \"\";\n\t\t$usersadmin->C_DIACHI->CellAttrs = array(); $usersadmin->C_DIACHI->ViewAttrs = array(); $usersadmin->C_DIACHI->EditAttrs = array();\n\n\t\t// C_TEL\n\t\t$usersadmin->C_TEL->CellCssStyle = \"\"; $usersadmin->C_TEL->CellCssClass = \"\";\n\t\t$usersadmin->C_TEL->CellAttrs = array(); $usersadmin->C_TEL->ViewAttrs = array(); $usersadmin->C_TEL->EditAttrs = array();\n\n\t\t// C_TEL_HOME\n\t\t$usersadmin->C_TEL_HOME->CellCssStyle = \"\"; $usersadmin->C_TEL_HOME->CellCssClass = \"\";\n\t\t$usersadmin->C_TEL_HOME->CellAttrs = array(); $usersadmin->C_TEL_HOME->ViewAttrs = array(); $usersadmin->C_TEL_HOME->EditAttrs = array();\n\n\t\t// C_TEL_MOBILE\n\t\t$usersadmin->C_TEL_MOBILE->CellCssStyle = \"\"; $usersadmin->C_TEL_MOBILE->CellCssClass = \"\";\n\t\t$usersadmin->C_TEL_MOBILE->CellAttrs = array(); $usersadmin->C_TEL_MOBILE->ViewAttrs = array(); $usersadmin->C_TEL_MOBILE->EditAttrs = array();\n\n\t\t// C_FAX\n\t\t$usersadmin->C_FAX->CellCssStyle = \"\"; $usersadmin->C_FAX->CellCssClass = \"\";\n\t\t$usersadmin->C_FAX->CellAttrs = array(); $usersadmin->C_FAX->ViewAttrs = array(); $usersadmin->C_FAX->EditAttrs = array();\n\n\t\t// C_EMAIL\n\t\t$usersadmin->C_EMAIL->CellCssStyle = \"\"; $usersadmin->C_EMAIL->CellCssClass = \"\";\n\t\t$usersadmin->C_EMAIL->CellAttrs = array(); $usersadmin->C_EMAIL->ViewAttrs = array(); $usersadmin->C_EMAIL->EditAttrs = array();\n\n\t\t// FK_USERLEVELID\n\t\t$usersadmin->FK_USERLEVELID->CellCssStyle = \"\"; $usersadmin->FK_USERLEVELID->CellCssClass = \"\";\n\t\t$usersadmin->FK_USERLEVELID->CellAttrs = array(); $usersadmin->FK_USERLEVELID->ViewAttrs = array(); $usersadmin->FK_USERLEVELID->EditAttrs = array();\n\t\tif ($usersadmin->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t\t// PK_NGUOIDUNG_ID\n\t\t\t$usersadmin->PK_NGUOIDUNG_ID->ViewValue = $usersadmin->PK_NGUOIDUNG_ID->CurrentValue;\n\t\t\t$usersadmin->PK_NGUOIDUNG_ID->CssStyle = \"\";\n\t\t\t$usersadmin->PK_NGUOIDUNG_ID->CssClass = \"\";\n\t\t\t$usersadmin->PK_NGUOIDUNG_ID->ViewCustomAttributes = \"\";\n\n\t\t\t// C_TENDANGNHAP\n\t\t\t$usersadmin->C_TENDANGNHAP->ViewValue = $usersadmin->C_TENDANGNHAP->CurrentValue;\n\t\t\t$usersadmin->C_TENDANGNHAP->CssStyle = \"\";\n\t\t\t$usersadmin->C_TENDANGNHAP->CssClass = \"\";\n\t\t\t$usersadmin->C_TENDANGNHAP->ViewCustomAttributes = \"\";\n\n\t\t\t// C_MATKHAU\n\t\t\t$usersadmin->C_MATKHAU->ViewValue = \"********\";\n\t\t\t$usersadmin->C_MATKHAU->CssStyle = \"\";\n\t\t\t$usersadmin->C_MATKHAU->CssClass = \"\";\n\t\t\t$usersadmin->C_MATKHAU->ViewCustomAttributes = \"\";\n\n\t\t\t// FK_MACONGTY\n\t\t\t$usersadmin->FK_MACONGTY->ViewValue = $usersadmin->FK_MACONGTY->CurrentValue;\n\t\t\t$usersadmin->FK_MACONGTY->CssStyle = \"\";\n\t\t\t$usersadmin->FK_MACONGTY->CssClass = \"\";\n\t\t\t$usersadmin->FK_MACONGTY->ViewCustomAttributes = \"\";\n\n\t\t\t// C_HOTEN\n\t\t\t$usersadmin->C_HOTEN->ViewValue = $usersadmin->C_HOTEN->CurrentValue;\n\t\t\t$usersadmin->C_HOTEN->CssStyle = \"\";\n\t\t\t$usersadmin->C_HOTEN->CssClass = \"\";\n\t\t\t$usersadmin->C_HOTEN->ViewCustomAttributes = \"\";\n\n\t\t\t// C_DIACHI\n\t\t\t$usersadmin->C_DIACHI->ViewValue = $usersadmin->C_DIACHI->CurrentValue;\n\t\t\t$usersadmin->C_DIACHI->CssStyle = \"\";\n\t\t\t$usersadmin->C_DIACHI->CssClass = \"\";\n\t\t\t$usersadmin->C_DIACHI->ViewCustomAttributes = \"\";\n\n\t\t\t// C_TEL\n\t\t\t$usersadmin->C_TEL->ViewValue = $usersadmin->C_TEL->CurrentValue;\n\t\t\t$usersadmin->C_TEL->CssStyle = \"\";\n\t\t\t$usersadmin->C_TEL->CssClass = \"\";\n\t\t\t$usersadmin->C_TEL->ViewCustomAttributes = \"\";\n\n\t\t\t// C_TEL_HOME\n\t\t\t$usersadmin->C_TEL_HOME->ViewValue = $usersadmin->C_TEL_HOME->CurrentValue;\n\t\t\t$usersadmin->C_TEL_HOME->CssStyle = \"\";\n\t\t\t$usersadmin->C_TEL_HOME->CssClass = \"\";\n\t\t\t$usersadmin->C_TEL_HOME->ViewCustomAttributes = \"\";\n\n\t\t\t// C_TEL_MOBILE\n\t\t\t$usersadmin->C_TEL_MOBILE->ViewValue = $usersadmin->C_TEL_MOBILE->CurrentValue;\n\t\t\t$usersadmin->C_TEL_MOBILE->CssStyle = \"\";\n\t\t\t$usersadmin->C_TEL_MOBILE->CssClass = \"\";\n\t\t\t$usersadmin->C_TEL_MOBILE->ViewCustomAttributes = \"\";\n\n\t\t\t// C_FAX\n\t\t\t$usersadmin->C_FAX->ViewValue = $usersadmin->C_FAX->CurrentValue;\n\t\t\t$usersadmin->C_FAX->CssStyle = \"\";\n\t\t\t$usersadmin->C_FAX->CssClass = \"\";\n\t\t\t$usersadmin->C_FAX->ViewCustomAttributes = \"\";\n\n\t\t\t// C_EMAIL\n\t\t\t$usersadmin->C_EMAIL->ViewValue = $usersadmin->C_EMAIL->CurrentValue;\n\t\t\t$usersadmin->C_EMAIL->CssStyle = \"\";\n\t\t\t$usersadmin->C_EMAIL->CssClass = \"\";\n\t\t\t$usersadmin->C_EMAIL->ViewCustomAttributes = \"\";\n\n\t\t\t// FK_USERLEVELID\n\t\t\tif (strval($usersadmin->FK_USERLEVELID->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`userlevelid` = \" . ew_AdjustSql($usersadmin->FK_USERLEVELID->CurrentValue) . \"\";\n\t\t\t$sSqlWrk = \"SELECT `userlevelname` FROM `userlevels`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$usersadmin->FK_USERLEVELID->ViewValue = $rswrk->fields('userlevelname');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$usersadmin->FK_USERLEVELID->ViewValue = $usersadmin->FK_USERLEVELID->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$usersadmin->FK_USERLEVELID->ViewValue = NULL;\n\t\t\t}\n\t\t\t$usersadmin->FK_USERLEVELID->CssStyle = \"\";\n\t\t\t$usersadmin->FK_USERLEVELID->CssClass = \"\";\n\t\t\t$usersadmin->FK_USERLEVELID->ViewCustomAttributes = \"\";\n\n\t\t\t// C_TENDANGNHAP\n\t\t\t$usersadmin->C_TENDANGNHAP->HrefValue = \"\";\n\t\t\t$usersadmin->C_TENDANGNHAP->TooltipValue = \"\";\n\n\t\t\t// C_MATKHAU\n\t\t\t$usersadmin->C_MATKHAU->HrefValue = \"\";\n\t\t\t$usersadmin->C_MATKHAU->TooltipValue = \"\";\n\n\t\t\t// C_HOTEN\n\t\t\t$usersadmin->C_HOTEN->HrefValue = \"\";\n\t\t\t$usersadmin->C_HOTEN->TooltipValue = \"\";\n\n\t\t\t// C_DIACHI\n\t\t\t$usersadmin->C_DIACHI->HrefValue = \"\";\n\t\t\t$usersadmin->C_DIACHI->TooltipValue = \"\";\n\n\t\t\t// C_TEL\n\t\t\t$usersadmin->C_TEL->HrefValue = \"\";\n\t\t\t$usersadmin->C_TEL->TooltipValue = \"\";\n\n\t\t\t// C_TEL_HOME\n\t\t\t$usersadmin->C_TEL_HOME->HrefValue = \"\";\n\t\t\t$usersadmin->C_TEL_HOME->TooltipValue = \"\";\n\n\t\t\t// C_TEL_MOBILE\n\t\t\t$usersadmin->C_TEL_MOBILE->HrefValue = \"\";\n\t\t\t$usersadmin->C_TEL_MOBILE->TooltipValue = \"\";\n\n\t\t\t// C_FAX\n\t\t\t$usersadmin->C_FAX->HrefValue = \"\";\n\t\t\t$usersadmin->C_FAX->TooltipValue = \"\";\n\n\t\t\t// C_EMAIL\n\t\t\t$usersadmin->C_EMAIL->HrefValue = \"\";\n\t\t\t$usersadmin->C_EMAIL->TooltipValue = \"\";\n\n\t\t\t// FK_USERLEVELID\n\t\t\t$usersadmin->FK_USERLEVELID->HrefValue = \"\";\n\t\t\t$usersadmin->FK_USERLEVELID->TooltipValue = \"\";\n\t\t} elseif ($usersadmin->RowType == EW_ROWTYPE_EDIT) { // Edit row\n\n\t\t\t// C_TENDANGNHAP\n\t\t\t$usersadmin->C_TENDANGNHAP->EditCustomAttributes = \"\";\n\t\t\t$usersadmin->C_TENDANGNHAP->EditValue = $usersadmin->C_TENDANGNHAP->CurrentValue;\n\t\t\t$usersadmin->C_TENDANGNHAP->CssStyle = \"\";\n\t\t\t$usersadmin->C_TENDANGNHAP->CssClass = \"\";\n\t\t\t$usersadmin->C_TENDANGNHAP->ViewCustomAttributes = \"\";\n\n\t\t\t// C_MATKHAU\n\t\t\t$usersadmin->C_MATKHAU->EditCustomAttributes = \"\";\n\t\t\t$usersadmin->C_MATKHAU->EditValue = ew_HtmlEncode($usersadmin->C_MATKHAU->CurrentValue);\n\n\t\t\t// C_HOTEN\n\t\t\t$usersadmin->C_HOTEN->EditCustomAttributes = \"\";\n\t\t\t$usersadmin->C_HOTEN->EditValue = ew_HtmlEncode($usersadmin->C_HOTEN->CurrentValue);\n\n\t\t\t// C_DIACHI\n\t\t\t$usersadmin->C_DIACHI->EditCustomAttributes = \"\";\n\t\t\t$usersadmin->C_DIACHI->EditValue = ew_HtmlEncode($usersadmin->C_DIACHI->CurrentValue);\n\n\t\t\t// C_TEL\n\t\t\t$usersadmin->C_TEL->EditCustomAttributes = \"\";\n\t\t\t$usersadmin->C_TEL->EditValue = ew_HtmlEncode($usersadmin->C_TEL->CurrentValue);\n\n\t\t\t// C_TEL_HOME\n\t\t\t$usersadmin->C_TEL_HOME->EditCustomAttributes = \"\";\n\t\t\t$usersadmin->C_TEL_HOME->EditValue = ew_HtmlEncode($usersadmin->C_TEL_HOME->CurrentValue);\n\n\t\t\t// C_TEL_MOBILE\n\t\t\t$usersadmin->C_TEL_MOBILE->EditCustomAttributes = \"\";\n\t\t\t$usersadmin->C_TEL_MOBILE->EditValue = ew_HtmlEncode($usersadmin->C_TEL_MOBILE->CurrentValue);\n\n\t\t\t// C_FAX\n\t\t\t$usersadmin->C_FAX->EditCustomAttributes = \"\";\n\t\t\t$usersadmin->C_FAX->EditValue = ew_HtmlEncode($usersadmin->C_FAX->CurrentValue);\n\n\t\t\t// C_EMAIL\n\t\t\t$usersadmin->C_EMAIL->EditCustomAttributes = \"\";\n\t\t\t$usersadmin->C_EMAIL->EditValue = ew_HtmlEncode($usersadmin->C_EMAIL->CurrentValue);\n\n\t\t\t// FK_USERLEVELID\n\t\t\t$usersadmin->FK_USERLEVELID->EditCustomAttributes = \"\";\n\t\t\t\t$sFilterWrk = \"\";\n\t\t\t$sSqlWrk = \"SELECT `userlevelid`, `userlevelname`, '' AS Disp2Fld, '' AS SelectFilterFld FROM `userlevels`\";\n\t\t\t$sWhereWrk = \"`userleveltype` = 1 AND `userlevelid` not in (-1,0)\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\")));\n\t\t\t$usersadmin->FK_USERLEVELID->EditValue = $arwrk;\n\n\t\t\t// Edit refer script\n\t\t\t// C_TENDANGNHAP\n\n\t\t\t$usersadmin->C_TENDANGNHAP->HrefValue = \"\";\n\n\t\t\t// C_MATKHAU\n\t\t\t$usersadmin->C_MATKHAU->HrefValue = \"\";\n\n\t\t\t// C_HOTEN\n\t\t\t$usersadmin->C_HOTEN->HrefValue = \"\";\n\n\t\t\t// C_DIACHI\n\t\t\t$usersadmin->C_DIACHI->HrefValue = \"\";\n\n\t\t\t// C_TEL\n\t\t\t$usersadmin->C_TEL->HrefValue = \"\";\n\n\t\t\t// C_TEL_HOME\n\t\t\t$usersadmin->C_TEL_HOME->HrefValue = \"\";\n\n\t\t\t// C_TEL_MOBILE\n\t\t\t$usersadmin->C_TEL_MOBILE->HrefValue = \"\";\n\n\t\t\t// C_FAX\n\t\t\t$usersadmin->C_FAX->HrefValue = \"\";\n\n\t\t\t// C_EMAIL\n\t\t\t$usersadmin->C_EMAIL->HrefValue = \"\";\n\n\t\t\t// FK_USERLEVELID\n\t\t\t$usersadmin->FK_USERLEVELID->HrefValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($usersadmin->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$usersadmin->Row_Rendered();\n\t}", "title": "" }, { "docid": "26b4a98dacfc143b2a85c2d0c2ea0680", "score": "0.5515333", "text": "function display_rows() {\n\n\t\tforeach ( $this->items as $field ) {\n\t\t\t$this->single_row( $field );\n\t\t}\n\n\t}", "title": "" }, { "docid": "dd8ad796c051b9d7d7a4913b2481143a", "score": "0.55080134", "text": "private function getColoursTable(){\n $existing=wc_get_order_statuses();\n $colours=$this->getMarkerColours();\n\n $cTab='<table><tr><td>Status</td><td>Colour in RGB Hex (e.g. 00CCFF)</td></tr>';\n foreach($existing as $status){\n $col=@$colours[$status];\n if(!$col) {\n $col='FF6340';\n }\n $cTab.=\"<tr><td>$status</td><td><input type='text' id='cu_mc_$status' name='cu_mapcolour' value='$col'></td></tr>\";\n }\n $cTab.='</table>';\n return $cTab;\n }", "title": "" }, { "docid": "7a13899059e46efb263730761a9d1a7b", "score": "0.54974216", "text": "public static function PrintTableRow(array $values)\n {\n echo \"<tr>\";\n foreach ($values as $value) {\n echo \"<td>$value</td>\";\n }\n echo \"</tr>\";\n }", "title": "" }, { "docid": "83cb0ea2d2677eae8fe29303cdf2f62a", "score": "0.5488834", "text": "function RenderRow() {\n\t\tglobal $conn, $Security, $user_profile;\n\n\t\t// Call Row_Rendering event\n\t\t$user_profile->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// UserProfileNo\n\n\t\t$user_profile->UserProfileNo->CellCssStyle = \"\";\n\t\t$user_profile->UserProfileNo->CellCssClass = \"\";\n\n\t\t// UserID\n\t\t$user_profile->zUserID->CellCssStyle = \"\";\n\t\t$user_profile->zUserID->CellCssClass = \"\";\n\n\t\t// UserUID\n\t\t$user_profile->UserUID->CellCssStyle = \"\";\n\t\t$user_profile->UserUID->CellCssClass = \"\";\n\n\t\t// PassWord\n\t\t$user_profile->PassWord->CellCssStyle = \"\";\n\t\t$user_profile->PassWord->CellCssClass = \"\";\n\n\t\t// UserName\n\t\t$user_profile->UserName->CellCssStyle = \"\";\n\t\t$user_profile->UserName->CellCssClass = \"\";\n\n\t\t// Level\n\t\t$user_profile->Level->CellCssStyle = \"\";\n\t\t$user_profile->Level->CellCssClass = \"\";\n\n\t\t// DepartNo\n\t\t$user_profile->DepartNo->CellCssStyle = \"\";\n\t\t$user_profile->DepartNo->CellCssClass = \"\";\n\n\t\t// DepartNameC\n\t\t$user_profile->DepartNameC->CellCssStyle = \"\";\n\t\t$user_profile->DepartNameC->CellCssClass = \"\";\n\n\t\t// Status\n\t\t$user_profile->Status->CellCssStyle = \"\";\n\t\t$user_profile->Status->CellCssClass = \"\";\n\t\tif ($user_profile->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t\t// UserProfileNo\n\t\t\t$user_profile->UserProfileNo->ViewValue = $user_profile->UserProfileNo->CurrentValue;\n\t\t\t$user_profile->UserProfileNo->CssStyle = \"\";\n\t\t\t$user_profile->UserProfileNo->CssClass = \"\";\n\t\t\t$user_profile->UserProfileNo->ViewCustomAttributes = \"\";\n\n\t\t\t// UserID\n\t\t\t$user_profile->zUserID->ViewValue = $user_profile->zUserID->CurrentValue;\n\t\t\t$user_profile->zUserID->CssStyle = \"\";\n\t\t\t$user_profile->zUserID->CssClass = \"\";\n\t\t\t$user_profile->zUserID->ViewCustomAttributes = \"\";\n\n\t\t\t// UserUID\n\t\t\t$user_profile->UserUID->ViewValue = $user_profile->UserUID->CurrentValue;\n\t\t\t$user_profile->UserUID->CssStyle = \"\";\n\t\t\t$user_profile->UserUID->CssClass = \"\";\n\t\t\t$user_profile->UserUID->ViewCustomAttributes = \"\";\n\n\t\t\t// PassWord\n\t\t\t$user_profile->PassWord->ViewValue = $user_profile->PassWord->CurrentValue;\n\t\t\t$user_profile->PassWord->CssStyle = \"\";\n\t\t\t$user_profile->PassWord->CssClass = \"\";\n\t\t\t$user_profile->PassWord->ViewCustomAttributes = \"\";\n\n\t\t\t// UserName\n\t\t\t$user_profile->UserName->ViewValue = $user_profile->UserName->CurrentValue;\n\t\t\t$user_profile->UserName->CssStyle = \"\";\n\t\t\t$user_profile->UserName->CssClass = \"\";\n\t\t\t$user_profile->UserName->ViewCustomAttributes = \"\";\n\n\t\t\t// Level\n\t\t\t$user_profile->Level->ViewValue = $user_profile->Level->CurrentValue;\n\t\t\t$user_profile->Level->CssStyle = \"\";\n\t\t\t$user_profile->Level->CssClass = \"\";\n\t\t\t$user_profile->Level->ViewCustomAttributes = \"\";\n\n\t\t\t// DepartNo\n\t\t\t$user_profile->DepartNo->ViewValue = $user_profile->DepartNo->CurrentValue;\n\t\t\t$user_profile->DepartNo->CssStyle = \"\";\n\t\t\t$user_profile->DepartNo->CssClass = \"\";\n\t\t\t$user_profile->DepartNo->ViewCustomAttributes = \"\";\n\n\t\t\t// DepartNameC\n\t\t\t$user_profile->DepartNameC->ViewValue = $user_profile->DepartNameC->CurrentValue;\n\t\t\t$user_profile->DepartNameC->CssStyle = \"\";\n\t\t\t$user_profile->DepartNameC->CssClass = \"\";\n\t\t\t$user_profile->DepartNameC->ViewCustomAttributes = \"\";\n\n\t\t\t// Status\n\t\t\t$user_profile->Status->ViewValue = $user_profile->Status->CurrentValue;\n\t\t\t$user_profile->Status->CssStyle = \"\";\n\t\t\t$user_profile->Status->CssClass = \"\";\n\t\t\t$user_profile->Status->ViewCustomAttributes = \"\";\n\n\t\t\t// UserProfileNo\n\t\t\t$user_profile->UserProfileNo->HrefValue = \"\";\n\n\t\t\t// UserID\n\t\t\t$user_profile->zUserID->HrefValue = \"\";\n\n\t\t\t// UserUID\n\t\t\t$user_profile->UserUID->HrefValue = \"\";\n\n\t\t\t// PassWord\n\t\t\t$user_profile->PassWord->HrefValue = \"\";\n\n\t\t\t// UserName\n\t\t\t$user_profile->UserName->HrefValue = \"\";\n\n\t\t\t// Level\n\t\t\t$user_profile->Level->HrefValue = \"\";\n\n\t\t\t// DepartNo\n\t\t\t$user_profile->DepartNo->HrefValue = \"\";\n\n\t\t\t// DepartNameC\n\t\t\t$user_profile->DepartNameC->HrefValue = \"\";\n\n\t\t\t// Status\n\t\t\t$user_profile->Status->HrefValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\t$user_profile->Row_Rendered();\n\t}", "title": "" }, { "docid": "71078499e4a4ed979f10114f6ddeb4e3", "score": "0.54827666", "text": "function RenderRow() {\n\t\tglobal $conn, $Security, $Language, $contadores;\n\n\t\t// Initialize URLs\n\t\t// Call Row_Rendering event\n\n\t\t$contadores->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// op\n\n\t\t$contadores->op->CellCssStyle = \"\"; $contadores->op->CellCssClass = \"\";\n\t\t$contadores->op->CellAttrs = array(); $contadores->op->ViewAttrs = array(); $contadores->op->EditAttrs = array();\n\n\t\t// zona\n\t\t$contadores->zona->CellCssStyle = \"\"; $contadores->zona->CellCssClass = \"\";\n\t\t$contadores->zona->CellAttrs = array(); $contadores->zona->ViewAttrs = array(); $contadores->zona->EditAttrs = array();\n\n\t\t// descripcion\n\t\t$contadores->descripcion->CellCssStyle = \"\"; $contadores->descripcion->CellCssClass = \"\";\n\t\t$contadores->descripcion->CellAttrs = array(); $contadores->descripcion->ViewAttrs = array(); $contadores->descripcion->EditAttrs = array();\n\n\t\t// programa\n\t\t$contadores->programa->CellCssStyle = \"\"; $contadores->programa->CellCssClass = \"\";\n\t\t$contadores->programa->CellAttrs = array(); $contadores->programa->ViewAttrs = array(); $contadores->programa->EditAttrs = array();\n\n\t\t// diahasta\n\t\t$contadores->diahasta->CellCssStyle = \"\"; $contadores->diahasta->CellCssClass = \"\";\n\t\t$contadores->diahasta->CellAttrs = array(); $contadores->diahasta->ViewAttrs = array(); $contadores->diahasta->EditAttrs = array();\n\n\t\t// objetivo\n\t\t$contadores->objetivo->CellCssStyle = \"\"; $contadores->objetivo->CellCssClass = \"\";\n\t\t$contadores->objetivo->CellAttrs = array(); $contadores->objetivo->ViewAttrs = array(); $contadores->objetivo->EditAttrs = array();\n\n\t\t// op2\n\t\t$contadores->op2->CellCssStyle = \"\"; $contadores->op2->CellCssClass = \"\";\n\t\t$contadores->op2->CellAttrs = array(); $contadores->op2->ViewAttrs = array(); $contadores->op2->EditAttrs = array();\n\n\t\t// horahasta\n\t\t$contadores->horahasta->CellCssStyle = \"\"; $contadores->horahasta->CellCssClass = \"\";\n\t\t$contadores->horahasta->CellAttrs = array(); $contadores->horahasta->ViewAttrs = array(); $contadores->horahasta->EditAttrs = array();\n\n\t\t// material\n\t\t$contadores->material->CellCssStyle = \"\"; $contadores->material->CellCssClass = \"\";\n\t\t$contadores->material->CellAttrs = array(); $contadores->material->ViewAttrs = array(); $contadores->material->EditAttrs = array();\n\n\t\t// orden\n\t\t$contadores->orden->CellCssStyle = \"\"; $contadores->orden->CellCssClass = \"\";\n\t\t$contadores->orden->CellAttrs = array(); $contadores->orden->ViewAttrs = array(); $contadores->orden->EditAttrs = array();\n\t\tif ($contadores->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t\t// id\n\t\t\t$contadores->id->ViewValue = $contadores->id->CurrentValue;\n\t\t\t$contadores->id->CssStyle = \"\";\n\t\t\t$contadores->id->CssClass = \"\";\n\t\t\t$contadores->id->ViewCustomAttributes = \"\";\n\n\t\t\t// op\n\t\t\t$contadores->op->ViewValue = $contadores->op->CurrentValue;\n\t\t\t$contadores->op->CssStyle = \"\";\n\t\t\t$contadores->op->CssClass = \"\";\n\t\t\t$contadores->op->ViewCustomAttributes = \"\";\n\n\t\t\t// zona\n\t\t\t$contadores->zona->ViewValue = $contadores->zona->CurrentValue;\n\t\t\t$contadores->zona->CssStyle = \"\";\n\t\t\t$contadores->zona->CssClass = \"\";\n\t\t\t$contadores->zona->ViewCustomAttributes = \"\";\n\n\t\t\t// descripcion\n\t\t\t$contadores->descripcion->ViewValue = $contadores->descripcion->CurrentValue;\n\t\t\t$contadores->descripcion->CssStyle = \"\";\n\t\t\t$contadores->descripcion->CssClass = \"\";\n\t\t\t$contadores->descripcion->ViewCustomAttributes = \"\";\n\n\t\t\t// programa\n\t\t\t$contadores->programa->ViewValue = $contadores->programa->CurrentValue;\n\t\t\t$contadores->programa->CssStyle = \"\";\n\t\t\t$contadores->programa->CssClass = \"\";\n\t\t\t$contadores->programa->ViewCustomAttributes = \"\";\n\n\t\t\t// diahasta\n\t\t\tif (strval($contadores->diahasta->CurrentValue) <> \"\") {\n\t\t\t\tswitch ($contadores->diahasta->CurrentValue) {\n\t\t\t\t\tcase \"Lunes\":\n\t\t\t\t\t\t$contadores->diahasta->ViewValue = \"Lunes\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Martes\":\n\t\t\t\t\t\t$contadores->diahasta->ViewValue = \"Martes\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Miercoles\":\n\t\t\t\t\t\t$contadores->diahasta->ViewValue = \"Miercoles\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Jueves\":\n\t\t\t\t\t\t$contadores->diahasta->ViewValue = \"Jueves\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Viernes\":\n\t\t\t\t\t\t$contadores->diahasta->ViewValue = \"Viernes\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Sabado\":\n\t\t\t\t\t\t$contadores->diahasta->ViewValue = \"Sabado\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Domingo\":\n\t\t\t\t\t\t$contadores->diahasta->ViewValue = \"Domingo\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$contadores->diahasta->ViewValue = $contadores->diahasta->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$contadores->diahasta->ViewValue = NULL;\n\t\t\t}\n\t\t\t$contadores->diahasta->CssStyle = \"\";\n\t\t\t$contadores->diahasta->CssClass = \"\";\n\t\t\t$contadores->diahasta->ViewCustomAttributes = \"\";\n\n\t\t\t// objetivo\n\t\t\t$contadores->objetivo->ViewValue = $contadores->objetivo->CurrentValue;\n\t\t\t$contadores->objetivo->CssStyle = \"\";\n\t\t\t$contadores->objetivo->CssClass = \"\";\n\t\t\t$contadores->objetivo->ViewCustomAttributes = \"\";\n\n\t\t\t// op2\n\t\t\t$contadores->op2->ViewValue = $contadores->op2->CurrentValue;\n\t\t\t$contadores->op2->CssStyle = \"\";\n\t\t\t$contadores->op2->CssClass = \"\";\n\t\t\t$contadores->op2->ViewCustomAttributes = \"\";\n\n\t\t\t// horahasta\n\t\t\t$contadores->horahasta->ViewValue = $contadores->horahasta->CurrentValue;\n\t\t\t$contadores->horahasta->CssStyle = \"\";\n\t\t\t$contadores->horahasta->CssClass = \"\";\n\t\t\t$contadores->horahasta->ViewCustomAttributes = \"\";\n\n\t\t\t// material\n\t\t\t$contadores->material->ViewValue = $contadores->material->CurrentValue;\n\t\t\t$contadores->material->CssStyle = \"\";\n\t\t\t$contadores->material->CssClass = \"\";\n\t\t\t$contadores->material->ViewCustomAttributes = \"\";\n\n\t\t\t// orden\n\t\t\t$contadores->orden->ViewValue = $contadores->orden->CurrentValue;\n\t\t\t$contadores->orden->CssStyle = \"\";\n\t\t\t$contadores->orden->CssClass = \"\";\n\t\t\t$contadores->orden->ViewCustomAttributes = \"\";\n\n\t\t\t// op\n\t\t\t$contadores->op->HrefValue = \"\";\n\t\t\t$contadores->op->TooltipValue = \"\";\n\n\t\t\t// zona\n\t\t\t$contadores->zona->HrefValue = \"\";\n\t\t\t$contadores->zona->TooltipValue = \"\";\n\n\t\t\t// descripcion\n\t\t\t$contadores->descripcion->HrefValue = \"\";\n\t\t\t$contadores->descripcion->TooltipValue = \"\";\n\n\t\t\t// programa\n\t\t\t$contadores->programa->HrefValue = \"\";\n\t\t\t$contadores->programa->TooltipValue = \"\";\n\n\t\t\t// diahasta\n\t\t\t$contadores->diahasta->HrefValue = \"\";\n\t\t\t$contadores->diahasta->TooltipValue = \"\";\n\n\t\t\t// objetivo\n\t\t\t$contadores->objetivo->HrefValue = \"\";\n\t\t\t$contadores->objetivo->TooltipValue = \"\";\n\n\t\t\t// op2\n\t\t\t$contadores->op2->HrefValue = \"\";\n\t\t\t$contadores->op2->TooltipValue = \"\";\n\n\t\t\t// horahasta\n\t\t\t$contadores->horahasta->HrefValue = \"\";\n\t\t\t$contadores->horahasta->TooltipValue = \"\";\n\n\t\t\t// material\n\t\t\t$contadores->material->HrefValue = \"\";\n\t\t\t$contadores->material->TooltipValue = \"\";\n\n\t\t\t// orden\n\t\t\t$contadores->orden->HrefValue = \"\";\n\t\t\t$contadores->orden->TooltipValue = \"\";\n\t\t} elseif ($contadores->RowType == EW_ROWTYPE_ADD) { // Add row\n\n\t\t\t// op\n\t\t\t$contadores->op->EditCustomAttributes = \"\";\n\t\t\t$contadores->op->EditValue = ew_HtmlEncode($contadores->op->CurrentValue);\n\n\t\t\t// zona\n\t\t\t$contadores->zona->EditCustomAttributes = \"\";\n\t\t\t$contadores->zona->EditValue = ew_HtmlEncode($contadores->zona->CurrentValue);\n\n\t\t\t// descripcion\n\t\t\t$contadores->descripcion->EditCustomAttributes = \"\";\n\t\t\t$contadores->descripcion->EditValue = ew_HtmlEncode($contadores->descripcion->CurrentValue);\n\n\t\t\t// programa\n\t\t\t$contadores->programa->EditCustomAttributes = \"\";\n\t\t\t$contadores->programa->EditValue = ew_HtmlEncode($contadores->programa->CurrentValue);\n\n\t\t\t// diahasta\n\t\t\t$contadores->diahasta->EditCustomAttributes = \"\";\n\t\t\t$arwrk = array();\n\t\t\t$arwrk[] = array(\"Lunes\", \"Lunes\");\n\t\t\t$arwrk[] = array(\"Martes\", \"Martes\");\n\t\t\t$arwrk[] = array(\"Miercoles\", \"Miercoles\");\n\t\t\t$arwrk[] = array(\"Jueves\", \"Jueves\");\n\t\t\t$arwrk[] = array(\"Viernes\", \"Viernes\");\n\t\t\t$arwrk[] = array(\"Sabado\", \"Sabado\");\n\t\t\t$arwrk[] = array(\"Domingo\", \"Domingo\");\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\")));\n\t\t\t$contadores->diahasta->EditValue = $arwrk;\n\n\t\t\t// objetivo\n\t\t\t$contadores->objetivo->EditCustomAttributes = \"\";\n\t\t\t$contadores->objetivo->EditValue = ew_HtmlEncode($contadores->objetivo->CurrentValue);\n\n\t\t\t// op2\n\t\t\t$contadores->op2->EditCustomAttributes = \"\";\n\t\t\t$contadores->op2->EditValue = ew_HtmlEncode($contadores->op2->CurrentValue);\n\n\t\t\t// horahasta\n\t\t\t$contadores->horahasta->EditCustomAttributes = \"\";\n\t\t\t$contadores->horahasta->EditValue = ew_HtmlEncode($contadores->horahasta->CurrentValue);\n\n\t\t\t// material\n\t\t\t$contadores->material->EditCustomAttributes = \"\";\n\t\t\t$contadores->material->EditValue = ew_HtmlEncode($contadores->material->CurrentValue);\n\n\t\t\t// orden\n\t\t\t$contadores->orden->EditCustomAttributes = \"\";\n\t\t\t$contadores->orden->EditValue = ew_HtmlEncode($contadores->orden->CurrentValue);\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($contadores->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$contadores->Row_Rendered();\n\t}", "title": "" }, { "docid": "9f308ee345fc008fe57e091ed4b238e9", "score": "0.54813033", "text": "function load_color_table($u_color_tab){\n\n\t\tif ($u_color_tab) {\n\t\t\t$buff = explode(\"^\",$u_color_tab);\n\t\t\t$arr_col_tab = (array) null;\n\t\t\tfor($i = 0; $i < count($buff); $i++) {\n\t\t\t\t$arr_col_tab[] = \"\\\\red\".hexdec(substr($buff[$i],0,2)).\"\\\\green\".hexdec(substr($buff[$i],2,2)).\"\\\\blue\".hexdec(substr($buff[$i],4,2));\n\t\t\t}\n\t\t\t$this->MyRTF.=\"{\\\\colortbl;\".implode(\";\",$arr_col_tab).\"}\";\n\t\t} else {\n\t\t\t$this->MyRTF.=\"{\\\\colortbl;\\n\".\n\t\t\t\t\t\t \"\\\\red70\\\\green70\\\\blue70;\\\\red0\\\\green0\\\\blue255;\\\\red0\\\\green255\\\\blue255;\\n\".\n\t\t\t\t\t\t \"\\\\red0\\\\green255\\\\blue0;\\\\red255\\\\green0\\\\blue255;\\\\red255\\green0\\\\blue0;\\n\".\n\t\t\t\t\t\t \"\\\\red255\\\\green255\\\\blue0;\\\\red255\\\\green255\\\\blue255;\\\\red0\\green0\\\\blue128;\\n\".\n\t\t\t\t\t\t \"\\\\red0\\\\green128\\\\blue128;\\\\red0\\\\green128\\\\blue0;\\\\red128\\\\green0\\\\blue128;\\n\".\n\t\t\t\t\t\t \"\\\\red128\\\\green0\\\\blue0;\\\\red128\\\\green128\\\\blue0;\\\\red128\\\\green128\\\\blue128;\\n\".\n\t\t\t\t\t\t \"\\\\red192\\\\green192\\\\blue192;\\n\".\n\t\t\t\t\t\t \"\\\\red80\\\\green80\\\\blue80;\\\\red0\\\\green0\\\\blue240;\\\\red0\\\\green200\\\\blue200;\\n\".\n\t\t\t\t\t\t \"\\\\red0\\\\green200\\\\blue0;\\\\red200\\\\green0\\\\blue200;\\\\red200\\green0\\\\blue0;\\n\".\n\t\t\t\t\t\t \"\\\\red200\\\\green200\\\\blue0;\\\\red200\\\\green200\\\\blue200;\\\\red0\\green0\\\\blue200;\\n\".\n\t\t\t\t\t\t \"\\\\red0\\\\green90\\\\blue90;\\\\red0\\\\green90\\\\blue0;\\\\red90\\\\green0\\\\blue90;\\n\".\n\t\t\t\t\t\t \"\\\\red90\\\\green0\\\\blue0;\\\\red90\\\\green90\\\\blue0;\\\\red90\\\\green90\\\\blue90;\\n\".\n\t\t\t\t\t\t \"\\\\red150\\\\green150\\\\blue150;\\\\red220\\\\green220\\\\blue220;\\n\".\n\t\t\t\t\t\t \"}\\n\";\n\t\t}\n\t}", "title": "" }, { "docid": "0d73add76efb945cc8ae69ae38bb7cc0", "score": "0.5472733", "text": "function RenderRow() {\n global $conn, $Security, $avance_producto;\n\n // Call Row_Rendering event\n $avance_producto->Row_Rendering();\n\n // Common render codes for all row types\n // idConsultoria\n\n $avance_producto->idConsultoria->CellCssStyle = \"\";\n $avance_producto->idConsultoria->CellCssClass = \"\";\n\n // idCronograma\n $avance_producto->idCronograma->CellCssStyle = \"\";\n $avance_producto->idCronograma->CellCssClass = \"\";\n if ($avance_producto->RowType == EW_ROWTYPE_VIEW) { // View row\n\n // idConsultoria\n $avance_producto->idConsultoria->ViewValue = $avance_producto->idConsultoria->CurrentValue;\n $avance_producto->idConsultoria->CssStyle = \"\";\n $avance_producto->idConsultoria->CssClass = \"\";\n $avance_producto->idConsultoria->ViewCustomAttributes = \"\";\n\n // idCronograma\n $avance_producto->idCronograma->ViewValue = $avance_producto->idCronograma->CurrentValue;\n $avance_producto->idCronograma->CssStyle = \"\";\n $avance_producto->idCronograma->CssClass = \"\";\n $avance_producto->idCronograma->ViewCustomAttributes = \"\";\n\n // idConsultoria\n $avance_producto->idConsultoria->HrefValue = \"\";\n\n // idCronograma\n $avance_producto->idCronograma->HrefValue = \"\";\n }\n\n // Call Row Rendered event\n $avance_producto->Row_Rendered();\n }", "title": "" }, { "docid": "e6f579ca083fcf93975d05e32836bbfc", "score": "0.54653126", "text": "public function RenderItemRows() {\n\t$tbl = $this->LineTable();\n\treturn $tbl->Table_forCart($this->GetKeyValue());\n }", "title": "" }, { "docid": "644f33fa9283f97e03cd5b1359212e4f", "score": "0.5462571", "text": "function RenderRow() {\n\t\tglobal $conn, $Security, $Language, $calculo;\n\n\t\t// Initialize URLs\n\t\t// Call Row_Rendering event\n\n\t\t$calculo->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// fechahoy\n\n\t\t$calculo->fechahoy->CellCssStyle = \"\"; $calculo->fechahoy->CellCssClass = \"\";\n\t\t$calculo->fechahoy->CellAttrs = array(); $calculo->fechahoy->ViewAttrs = array(); $calculo->fechahoy->EditAttrs = array();\n\n\t\t// fechahasta\n\t\t$calculo->fechahasta->CellCssStyle = \"\"; $calculo->fechahasta->CellCssClass = \"\";\n\t\t$calculo->fechahasta->CellAttrs = array(); $calculo->fechahasta->ViewAttrs = array(); $calculo->fechahasta->EditAttrs = array();\n\n\t\t// diasresta\n\t\t$calculo->diasresta->CellCssStyle = \"\"; $calculo->diasresta->CellCssClass = \"\";\n\t\t$calculo->diasresta->CellAttrs = array(); $calculo->diasresta->ViewAttrs = array(); $calculo->diasresta->EditAttrs = array();\n\n\t\t// diaslleva\n\t\t$calculo->diaslleva->CellCssStyle = \"\"; $calculo->diaslleva->CellCssClass = \"\";\n\t\t$calculo->diaslleva->CellAttrs = array(); $calculo->diaslleva->ViewAttrs = array(); $calculo->diaslleva->EditAttrs = array();\n\n\t\t// diasllevalab\n\t\t$calculo->diasllevalab->CellCssStyle = \"\"; $calculo->diasllevalab->CellCssClass = \"\";\n\t\t$calculo->diasllevalab->CellAttrs = array(); $calculo->diasllevalab->ViewAttrs = array(); $calculo->diasllevalab->EditAttrs = array();\n\t\tif ($calculo->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t\t// fechahoy\n\t\t\tif (strval($calculo->fechahoy->CurrentValue) <> \"\") {\n\t\t\t\tswitch ($calculo->fechahoy->CurrentValue) {\n\t\t\t\t\tcase \"Lunes\":\n\t\t\t\t\t\t$calculo->fechahoy->ViewValue = \"Lunes\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Martes\":\n\t\t\t\t\t\t$calculo->fechahoy->ViewValue = \"Martes\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Miercoles\":\n\t\t\t\t\t\t$calculo->fechahoy->ViewValue = \"Miercoles\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Jueves\":\n\t\t\t\t\t\t$calculo->fechahoy->ViewValue = \"Jueves\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Viernes\":\n\t\t\t\t\t\t$calculo->fechahoy->ViewValue = \"Viernes\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Sabado\":\n\t\t\t\t\t\t$calculo->fechahoy->ViewValue = \"Sabado\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Domingo\":\n\t\t\t\t\t\t$calculo->fechahoy->ViewValue = \"Domingo\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$calculo->fechahoy->ViewValue = $calculo->fechahoy->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$calculo->fechahoy->ViewValue = NULL;\n\t\t\t}\n\t\t\t$calculo->fechahoy->CssStyle = \"\";\n\t\t\t$calculo->fechahoy->CssClass = \"\";\n\t\t\t$calculo->fechahoy->ViewCustomAttributes = \"\";\n\n\t\t\t// fechahasta\n\t\t\t$calculo->fechahasta->ViewValue = $calculo->fechahasta->CurrentValue;\n\t\t\t$calculo->fechahasta->CssStyle = \"\";\n\t\t\t$calculo->fechahasta->CssClass = \"\";\n\t\t\t$calculo->fechahasta->ViewCustomAttributes = \"\";\n\n\t\t\t// diasresta\n\t\t\t$calculo->diasresta->ViewValue = $calculo->diasresta->CurrentValue;\n\t\t\t$calculo->diasresta->CssStyle = \"\";\n\t\t\t$calculo->diasresta->CssClass = \"\";\n\t\t\t$calculo->diasresta->ViewCustomAttributes = \"\";\n\n\t\t\t// diaslleva\n\t\t\t$calculo->diaslleva->ViewValue = $calculo->diaslleva->CurrentValue;\n\t\t\t$calculo->diaslleva->CssStyle = \"\";\n\t\t\t$calculo->diaslleva->CssClass = \"\";\n\t\t\t$calculo->diaslleva->ViewCustomAttributes = \"\";\n\n\t\t\t// diasllevalab\n\t\t\t$calculo->diasllevalab->ViewValue = $calculo->diasllevalab->CurrentValue;\n\t\t\t$calculo->diasllevalab->CssStyle = \"\";\n\t\t\t$calculo->diasllevalab->CssClass = \"\";\n\t\t\t$calculo->diasllevalab->ViewCustomAttributes = \"\";\n\n\t\t\t// fechahoy\n\t\t\t$calculo->fechahoy->HrefValue = \"\";\n\t\t\t$calculo->fechahoy->TooltipValue = \"\";\n\n\t\t\t// fechahasta\n\t\t\t$calculo->fechahasta->HrefValue = \"\";\n\t\t\t$calculo->fechahasta->TooltipValue = \"\";\n\n\t\t\t// diasresta\n\t\t\t$calculo->diasresta->HrefValue = \"\";\n\t\t\t$calculo->diasresta->TooltipValue = \"\";\n\n\t\t\t// diaslleva\n\t\t\t$calculo->diaslleva->HrefValue = \"\";\n\t\t\t$calculo->diaslleva->TooltipValue = \"\";\n\n\t\t\t// diasllevalab\n\t\t\t$calculo->diasllevalab->HrefValue = \"\";\n\t\t\t$calculo->diasllevalab->TooltipValue = \"\";\n\t\t} elseif ($calculo->RowType == EW_ROWTYPE_ADD) { // Add row\n\n\t\t\t// fechahoy\n\t\t\t$calculo->fechahoy->EditCustomAttributes = \"\";\n\t\t\t$arwrk = array();\n\t\t\t$arwrk[] = array(\"Lunes\", \"Lunes\");\n\t\t\t$arwrk[] = array(\"Martes\", \"Martes\");\n\t\t\t$arwrk[] = array(\"Miercoles\", \"Miercoles\");\n\t\t\t$arwrk[] = array(\"Jueves\", \"Jueves\");\n\t\t\t$arwrk[] = array(\"Viernes\", \"Viernes\");\n\t\t\t$arwrk[] = array(\"Sabado\", \"Sabado\");\n\t\t\t$arwrk[] = array(\"Domingo\", \"Domingo\");\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\")));\n\t\t\t$calculo->fechahoy->EditValue = $arwrk;\n\n\t\t\t// fechahasta\n\t\t\t$calculo->fechahasta->EditCustomAttributes = \"\";\n\t\t\t$calculo->fechahasta->EditValue = ew_HtmlEncode($calculo->fechahasta->CurrentValue);\n\n\t\t\t// diasresta\n\t\t\t$calculo->diasresta->EditCustomAttributes = \"\";\n\t\t\t$calculo->diasresta->EditValue = ew_HtmlEncode($calculo->diasresta->CurrentValue);\n\n\t\t\t// diaslleva\n\t\t\t$calculo->diaslleva->EditCustomAttributes = \"\";\n\t\t\t$calculo->diaslleva->EditValue = ew_HtmlEncode($calculo->diaslleva->CurrentValue);\n\n\t\t\t// diasllevalab\n\t\t\t$calculo->diasllevalab->EditCustomAttributes = \"\";\n\t\t\t$calculo->diasllevalab->EditValue = ew_HtmlEncode($calculo->diasllevalab->CurrentValue);\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($calculo->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$calculo->Row_Rendered();\n\t}", "title": "" }, { "docid": "9042b5e64cd20be01344a6c3498adc70", "score": "0.54573226", "text": "function RenderRow() {\n\t\tglobal $conn, $Security, $Language, $users;\n\n\t\t// Initialize URLs\n\t\t$this->ExportPrintUrl = $this->PageUrl() . \"export=print&\" . \"zuserid=\" . urlencode($users->zuserid->CurrentValue);\n\t\t$this->ExportHtmlUrl = $this->PageUrl() . \"export=html&\" . \"zuserid=\" . urlencode($users->zuserid->CurrentValue);\n\t\t$this->ExportExcelUrl = $this->PageUrl() . \"export=excel&\" . \"zuserid=\" . urlencode($users->zuserid->CurrentValue);\n\t\t$this->ExportWordUrl = $this->PageUrl() . \"export=word&\" . \"zuserid=\" . urlencode($users->zuserid->CurrentValue);\n\t\t$this->ExportXmlUrl = $this->PageUrl() . \"export=xml&\" . \"zuserid=\" . urlencode($users->zuserid->CurrentValue);\n\t\t$this->ExportCsvUrl = $this->PageUrl() . \"export=csv&\" . \"zuserid=\" . urlencode($users->zuserid->CurrentValue);\n\t\t$this->AddUrl = $users->AddUrl();\n\t\t$this->EditUrl = $users->EditUrl();\n\t\t$this->CopyUrl = $users->CopyUrl();\n\t\t$this->DeleteUrl = $users->DeleteUrl();\n\t\t$this->ListUrl = $users->ListUrl();\n\n\t\t// Call Row_Rendering event\n\t\t$users->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// userid\n\n\t\t$users->zuserid->CellCssStyle = \"\"; $users->zuserid->CellCssClass = \"\";\n\t\t$users->zuserid->CellAttrs = array(); $users->zuserid->ViewAttrs = array(); $users->zuserid->EditAttrs = array();\n\n\t\t// username\n\t\t$users->username->CellCssStyle = \"\"; $users->username->CellCssClass = \"\";\n\t\t$users->username->CellAttrs = array(); $users->username->ViewAttrs = array(); $users->username->EditAttrs = array();\n\n\t\t// password\n\t\t$users->password->CellCssStyle = \"\"; $users->password->CellCssClass = \"\";\n\t\t$users->password->CellAttrs = array(); $users->password->ViewAttrs = array(); $users->password->EditAttrs = array();\n\n\t\t// userlevelid\n\t\t$users->userlevelid->CellCssStyle = \"\"; $users->userlevelid->CellCssClass = \"\";\n\t\t$users->userlevelid->CellAttrs = array(); $users->userlevelid->ViewAttrs = array(); $users->userlevelid->EditAttrs = array();\n\n\t\t// groupid\n\t\t$users->groupid->CellCssStyle = \"\"; $users->groupid->CellCssClass = \"\";\n\t\t$users->groupid->CellAttrs = array(); $users->groupid->ViewAttrs = array(); $users->groupid->EditAttrs = array();\n\n\t\t// parentid\n\t\t$users->parentid->CellCssStyle = \"\"; $users->parentid->CellCssClass = \"\";\n\t\t$users->parentid->CellAttrs = array(); $users->parentid->ViewAttrs = array(); $users->parentid->EditAttrs = array();\n\n\t\t// programarea_programarea_id\n\t\t$users->programarea_programarea_id->CellCssStyle = \"\"; $users->programarea_programarea_id->CellCssClass = \"\";\n\t\t$users->programarea_programarea_id->CellAttrs = array(); $users->programarea_programarea_id->ViewAttrs = array(); $users->programarea_programarea_id->EditAttrs = array();\n\t\tif ($users->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t\t// userid\n\t\t\t$users->zuserid->ViewValue = $users->zuserid->CurrentValue;\n\t\t\t$users->zuserid->CssStyle = \"\";\n\t\t\t$users->zuserid->CssClass = \"\";\n\t\t\t$users->zuserid->ViewCustomAttributes = \"\";\n\n\t\t\t// username\n\t\t\t$users->username->ViewValue = $users->username->CurrentValue;\n\t\t\t$users->username->CssStyle = \"\";\n\t\t\t$users->username->CssClass = \"\";\n\t\t\t$users->username->ViewCustomAttributes = \"\";\n\n\t\t\t// password\n\t\t\t$users->password->ViewValue = \"********\";\n\t\t\t$users->password->CssStyle = \"\";\n\t\t\t$users->password->CssClass = \"\";\n\t\t\t$users->password->ViewCustomAttributes = \"\";\n\n\t\t\t// userlevelid\n\t\t\tif ($Security->CanAdmin()) { // System admin\n\t\t\tif (strval($users->userlevelid->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`userlevelid` = \" . ew_AdjustSql($users->userlevelid->CurrentValue) . \"\";\n\t\t\t$sSqlWrk = \"SELECT `userlevelname` FROM `userlevels`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$users->userlevelid->ViewValue = $rswrk->fields('userlevelname');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$users->userlevelid->ViewValue = $users->userlevelid->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$users->userlevelid->ViewValue = NULL;\n\t\t\t}\n\t\t\t} else {\n\t\t\t\t$users->userlevelid->ViewValue = \"********\";\n\t\t\t}\n\t\t\t$users->userlevelid->CssStyle = \"\";\n\t\t\t$users->userlevelid->CssClass = \"\";\n\t\t\t$users->userlevelid->ViewCustomAttributes = \"\";\n\n\t\t\t// groupid\n\t\t\tif (strval($users->groupid->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`userlevelid` = \" . ew_AdjustSql($users->groupid->CurrentValue) . \"\";\n\t\t\t$sSqlWrk = \"SELECT `userlevelname` FROM `userlevels`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$users->groupid->ViewValue = $rswrk->fields('userlevelname');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$users->groupid->ViewValue = $users->groupid->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$users->groupid->ViewValue = NULL;\n\t\t\t}\n\t\t\t$users->groupid->CssStyle = \"\";\n\t\t\t$users->groupid->CssClass = \"\";\n\t\t\t$users->groupid->ViewCustomAttributes = \"\";\n\n\t\t\t// parentid\n\t\t\tif (strval($users->parentid->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`userlevelid` = \" . ew_AdjustSql($users->parentid->CurrentValue) . \"\";\n\t\t\t$sSqlWrk = \"SELECT `userlevelname` FROM `userlevels`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$users->parentid->ViewValue = $rswrk->fields('userlevelname');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$users->parentid->ViewValue = $users->parentid->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$users->parentid->ViewValue = NULL;\n\t\t\t}\n\t\t\t$users->parentid->CssStyle = \"\";\n\t\t\t$users->parentid->CssClass = \"\";\n\t\t\t$users->parentid->ViewCustomAttributes = \"\";\n\n\t\t\t// programarea_programarea_id\n\t\t\tif (strval($users->programarea_programarea_id->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`programarea_id` = \" . ew_AdjustSql($users->programarea_programarea_id->CurrentValue) . \"\";\n\t\t\t$sSqlWrk = \"SELECT `programarea_name` FROM `programarea`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$users->programarea_programarea_id->ViewValue = $rswrk->fields('programarea_name');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$users->programarea_programarea_id->ViewValue = $users->programarea_programarea_id->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$users->programarea_programarea_id->ViewValue = NULL;\n\t\t\t}\n\t\t\t$users->programarea_programarea_id->CssStyle = \"\";\n\t\t\t$users->programarea_programarea_id->CssClass = \"\";\n\t\t\t$users->programarea_programarea_id->ViewCustomAttributes = \"\";\n\n\t\t\t// userid\n\t\t\t$users->zuserid->HrefValue = \"\";\n\t\t\t$users->zuserid->TooltipValue = \"\";\n\n\t\t\t// username\n\t\t\t$users->username->HrefValue = \"\";\n\t\t\t$users->username->TooltipValue = \"\";\n\n\t\t\t// password\n\t\t\t$users->password->HrefValue = \"\";\n\t\t\t$users->password->TooltipValue = \"\";\n\n\t\t\t// userlevelid\n\t\t\t$users->userlevelid->HrefValue = \"\";\n\t\t\t$users->userlevelid->TooltipValue = \"\";\n\n\t\t\t// groupid\n\t\t\t$users->groupid->HrefValue = \"\";\n\t\t\t$users->groupid->TooltipValue = \"\";\n\n\t\t\t// parentid\n\t\t\t$users->parentid->HrefValue = \"\";\n\t\t\t$users->parentid->TooltipValue = \"\";\n\n\t\t\t// programarea_programarea_id\n\t\t\t$users->programarea_programarea_id->HrefValue = \"\";\n\t\t\t$users->programarea_programarea_id->TooltipValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($users->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$users->Row_Rendered();\n\t}", "title": "" }, { "docid": "ee605d7a287a4b95e9b855dd10a9e88d", "score": "0.54304326", "text": "function ShowMultiRow($contentArr){\n $this->arrayuse = true;\n\n //$this->app->Table->CreateTable($this->datasetssql, $this->parsetarget, 400);\n //$contentArr = $this->app->DB->SelectArr( $this->datasetssql );\n $this->app->Table->CreateTableFromArray($contentArr, $this->parsetarget, 450);\n //$this->app->Table->FormatCondition(1, \"\", \"<span style=\\\"color:red;\\\"class=\\\"inactive\\\">%value%</span>\", array(5,6));\n\n $this->Show();\n }", "title": "" }, { "docid": "44be7ed8d16c508b40b15fd5debe563c", "score": "0.54225343", "text": "function RenderRow() {\n\t\tglobal $conn, $Security, $Language, $entrenadores_items;\n\n\t\t// Initialize URLs\n\t\t// Call Row_Rendering event\n\n\t\t$entrenadores_items->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// item\n\n\t\t$entrenadores_items->item->CellCssStyle = \"\"; $entrenadores_items->item->CellCssClass = \"\";\n\t\t$entrenadores_items->item->CellAttrs = array(); $entrenadores_items->item->ViewAttrs = array(); $entrenadores_items->item->EditAttrs = array();\n\n\t\t// entrenador\n\t\t$entrenadores_items->entrenador->CellCssStyle = \"\"; $entrenadores_items->entrenador->CellCssClass = \"\";\n\t\t$entrenadores_items->entrenador->CellAttrs = array(); $entrenadores_items->entrenador->ViewAttrs = array(); $entrenadores_items->entrenador->EditAttrs = array();\n\n\t\t// cantidad\n\t\t$entrenadores_items->cantidad->CellCssStyle = \"\"; $entrenadores_items->cantidad->CellCssClass = \"\";\n\t\t$entrenadores_items->cantidad->CellAttrs = array(); $entrenadores_items->cantidad->ViewAttrs = array(); $entrenadores_items->cantidad->EditAttrs = array();\n\t\tif ($entrenadores_items->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t\t// id\n\t\t\t$entrenadores_items->id->ViewValue = $entrenadores_items->id->CurrentValue;\n\t\t\t$entrenadores_items->id->CssStyle = \"\";\n\t\t\t$entrenadores_items->id->CssClass = \"\";\n\t\t\t$entrenadores_items->id->ViewCustomAttributes = \"\";\n\n\t\t\t// item\n\t\t\tif (strval($entrenadores_items->item->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`id` = \" . ew_AdjustSql($entrenadores_items->item->CurrentValue) . \"\";\n\t\t\t$sSqlWrk = \"SELECT `nombre` FROM `items`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `nombre` Desc\";\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$entrenadores_items->item->ViewValue = $rswrk->fields('nombre');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$entrenadores_items->item->ViewValue = $entrenadores_items->item->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$entrenadores_items->item->ViewValue = NULL;\n\t\t\t}\n\t\t\t$entrenadores_items->item->CssStyle = \"\";\n\t\t\t$entrenadores_items->item->CssClass = \"\";\n\t\t\t$entrenadores_items->item->ViewCustomAttributes = \"\";\n\n\t\t\t// entrenador\n\t\t\t$entrenadores_items->entrenador->ViewValue = $entrenadores_items->entrenador->CurrentValue;\n\t\t\t$entrenadores_items->entrenador->CssStyle = \"\";\n\t\t\t$entrenadores_items->entrenador->CssClass = \"\";\n\t\t\t$entrenadores_items->entrenador->ViewCustomAttributes = \"\";\n\n\t\t\t// cantidad\n\t\t\t$entrenadores_items->cantidad->ViewValue = $entrenadores_items->cantidad->CurrentValue;\n\t\t\t$entrenadores_items->cantidad->CssStyle = \"\";\n\t\t\t$entrenadores_items->cantidad->CssClass = \"\";\n\t\t\t$entrenadores_items->cantidad->ViewCustomAttributes = \"\";\n\n\t\t\t// item\n\t\t\t$entrenadores_items->item->HrefValue = \"\";\n\t\t\t$entrenadores_items->item->TooltipValue = \"\";\n\n\t\t\t// entrenador\n\t\t\t$entrenadores_items->entrenador->HrefValue = \"\";\n\t\t\t$entrenadores_items->entrenador->TooltipValue = \"\";\n\n\t\t\t// cantidad\n\t\t\t$entrenadores_items->cantidad->HrefValue = \"\";\n\t\t\t$entrenadores_items->cantidad->TooltipValue = \"\";\n\t\t} elseif ($entrenadores_items->RowType == EW_ROWTYPE_ADD) { // Add row\n\n\t\t\t// item\n\t\t\t$entrenadores_items->item->EditCustomAttributes = \"\";\n\t\t\t\t$sFilterWrk = \"\";\n\t\t\t$sSqlWrk = \"SELECT `id`, `nombre`, '' AS Disp2Fld, '' AS SelectFilterFld FROM `items`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `nombre` Desc\";\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\")));\n\t\t\t$entrenadores_items->item->EditValue = $arwrk;\n\n\t\t\t// entrenador\n\t\t\t$entrenadores_items->entrenador->EditCustomAttributes = \"\";\n\t\t\tif ($entrenadores_items->entrenador->getSessionValue() <> \"\") {\n\t\t\t\t$entrenadores_items->entrenador->CurrentValue = $entrenadores_items->entrenador->getSessionValue();\n\t\t\t$entrenadores_items->entrenador->ViewValue = $entrenadores_items->entrenador->CurrentValue;\n\t\t\t$entrenadores_items->entrenador->CssStyle = \"\";\n\t\t\t$entrenadores_items->entrenador->CssClass = \"\";\n\t\t\t$entrenadores_items->entrenador->ViewCustomAttributes = \"\";\n\t\t\t} else {\n\t\t\t$entrenadores_items->entrenador->EditValue = ew_HtmlEncode($entrenadores_items->entrenador->CurrentValue);\n\t\t\t}\n\n\t\t\t// cantidad\n\t\t\t$entrenadores_items->cantidad->EditCustomAttributes = \"\";\n\t\t\t$entrenadores_items->cantidad->EditValue = ew_HtmlEncode($entrenadores_items->cantidad->CurrentValue);\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($entrenadores_items->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$entrenadores_items->Row_Rendered();\n\t}", "title": "" }, { "docid": "73553ebe5309a47d665d9199094835a8", "score": "0.54166764", "text": "function display_rows() {\n\t \n\t // Get the records registered in the prepare_items method\n\t $records = $this->items;\n\t \n\t // Get the columns registered in the get_columns and get_sortable_columns methods\n\t list( $columns, $hidden ) = $this->get_column_info();\n\t \n\t // Loop for each record\n\t if( !empty( $records ) ) {\n\t foreach($records as $rec){\n\t \n \t // Open the row\n \t echo '<tr id=\"sms_'.$rec->id.'\">';\n \t foreach ( $columns as $column_name => $column_display_name ) {\n \t \n \t // Style attributes for each col\n \t $class = \"class='$column_name column-$column_name'\";\n \t $style = \"\";\n \t if ( in_array( $column_name, $hidden ) ) $style = ' style=\"display:none;\"';\n \t $attributes = $class . $style;\n \t \n \t // Display the cell\n \t switch ( $column_name ) {\n \t case \"cb\":\n \t echo '<th scope=\"row\" class=\"check-column\">';\n\t\t\t\t echo $this->column_cb( $rec );\n\t\t\t\t echo '</th>';\n \t break;\n \t case \"id\": \n \t echo \"<td $attributes>\";\n \t echo $this->column_default( $rec, $column_name ) . '</td>'; \n \t break;\n \t case \"updated\":\n \t echo \"<td $attributes>\";\n \t echo $this->column_default( $rec, $column_name ) . '</td>';\n \t break;\n \t case \"txt_msg\": \n \t echo \"<td $attributes>\";\n \t echo $this->column_default( $rec, $column_name ) . '</td>'; \n \t break;\n \t case \"full_txt_msg\": \n \t echo \"<td $attributes>\";\n \t echo $this->column_default( $rec, $column_name ) . '</td>'; \n \t break;\n \t case 'coupon_code':\n \t echo \"<td $attributes>\";\n \t echo $this->column_default( $rec, $column_name ) . '</td>';\n \t break;\n \t case \"sent_time\": \n \t echo \"<td $attributes>\";\n \t echo $this->column_default( $rec, $column_name ) . '</td>'; \n \t break;\n \t case \"sms_sent\": \n \t echo \"<td $attributes>\";\n \t echo $this->column_default( $rec, $column_name ) . '</td>'; \n \t break;\n \t case \"activate\": \n \t echo \"<td $attributes>\";\n \t echo $this->column_default( $rec, $column_name ) .'</td>'; \n \t break;\n\t case \"actions\":\n\t echo \"<td $attributes>\";\n\t echo $this->column_default( $rec, $column_name ) . '</td>';\n\t break;\n \t }\n \t }\n \t \n \t // Complete the row\n \t echo'</tr>';\n }\n\t }\n\t}", "title": "" }, { "docid": "c913a074665deac0651ee54ae144be7a", "score": "0.5410946", "text": "function display() {\n echo \"<table cols=\\\"3\\\" style=\\\"font-size:large; font-weight:bold\\\">\";\n echo \"<tr>\"; //open first row\n for ($pos = 0; $pos < 9; $pos++) {\n echo $this->show_cell($pos);\n if ($pos % 3 == 2)\n echo \"</tr><tr>\"; //start a new row for the next square\n }\n echo \"</tr>\"; //close the last row\n echo \"</table>\";\n }", "title": "" }, { "docid": "c8c64c693d1f1c65aa99f46933a8a9bc", "score": "0.54096085", "text": "function bgCol($n, $mod = 0) {\n\t\t$color = $this->color [$n - 1];\n\t\tif ($mod)\n\t\t\t$color = t3lib_div::modifyHTMLcolor ( $color, $mod, $mod, $mod );\n\t\treturn ' bgcolor=\"' . $color . '\"';\n\t}", "title": "" }, { "docid": "94b6388fc6ee2d497d6ba1faab06d360", "score": "0.5405544", "text": "function RenderRow() {\n\t\tglobal $Security, $Language, $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t// Call Row_Rendering event\n\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// IDXDAFTAR\n\n\t\t$this->IDXDAFTAR->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// PASIENBARU\n\t\t$this->PASIENBARU->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// NOMR\n\t\t$this->NOMR->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// TGLREG\n\t\t$this->TGLREG->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// KDDOKTER\n\t\t$this->KDDOKTER->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// KDPOLY\n\t\t$this->KDPOLY->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// KDRUJUK\n\t\t$this->KDRUJUK->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// KDCARABAYAR\n\t\t$this->KDCARABAYAR->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// NOJAMINAN\n\t\t$this->NOJAMINAN->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// SHIFT\n\t\t$this->SHIFT->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// STATUS\n\t\t$this->STATUS->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// KETERANGAN_STATUS\n\t\t$this->KETERANGAN_STATUS->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// NIP\n\t\t$this->NIP->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// MASUKPOLY\n\t\t$this->MASUKPOLY->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// KELUARPOLY\n\t\t$this->KELUARPOLY->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// KETRUJUK\n\t\t$this->KETRUJUK->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// KETBAYAR\n\t\t$this->KETBAYAR->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// PENANGGUNGJAWAB_NAMA\n\t\t$this->PENANGGUNGJAWAB_NAMA->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// PENANGGUNGJAWAB_HUBUNGAN\n\t\t$this->PENANGGUNGJAWAB_HUBUNGAN->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// PENANGGUNGJAWAB_ALAMAT\n\t\t$this->PENANGGUNGJAWAB_ALAMAT->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// PENANGGUNGJAWAB_PHONE\n\t\t$this->PENANGGUNGJAWAB_PHONE->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// JAMREG\n\t\t$this->JAMREG->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// BATAL\n\t\t$this->BATAL->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// NO_SJP\n\t\t$this->NO_SJP->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// NO_PESERTA\n\t\t$this->NO_PESERTA->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// NOKARTU\n\t\t$this->NOKARTU->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// TOTAL_BIAYA_OBAT\n\t\t$this->TOTAL_BIAYA_OBAT->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// biaya_obat\n\t\t$this->biaya_obat->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// biaya_retur_obat\n\t\t$this->biaya_retur_obat->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// TOTAL_BIAYA_OBAT_RAJAL\n\t\t$this->TOTAL_BIAYA_OBAT_RAJAL->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// biaya_obat_rajal\n\t\t$this->biaya_obat_rajal->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// biaya_retur_obat_rajal\n\t\t$this->biaya_retur_obat_rajal->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// TOTAL_BIAYA_OBAT_IGD\n\t\t$this->TOTAL_BIAYA_OBAT_IGD->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// biaya_obat_igd\n\t\t$this->biaya_obat_igd->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// biaya_retur_obat_igd\n\t\t$this->biaya_retur_obat_igd->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// TOTAL_BIAYA_OBAT_IBS\n\t\t$this->TOTAL_BIAYA_OBAT_IBS->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// biaya_obat_ibs\n\t\t$this->biaya_obat_ibs->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// biaya_retur_obat_ibs\n\t\t$this->biaya_retur_obat_ibs->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// TANGGAL_SEP\n\t\t$this->TANGGAL_SEP->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// TANGGALRUJUK_SEP\n\t\t$this->TANGGALRUJUK_SEP->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// KELASRAWAT_SEP\n\t\t$this->KELASRAWAT_SEP->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// MINTA_RUJUKAN\n\t\t$this->MINTA_RUJUKAN->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// NORUJUKAN_SEP\n\t\t$this->NORUJUKAN_SEP->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// PPKRUJUKANASAL_SEP\n\t\t$this->PPKRUJUKANASAL_SEP->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// NAMAPPKRUJUKANASAL_SEP\n\t\t$this->NAMAPPKRUJUKANASAL_SEP->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// PPKPELAYANAN_SEP\n\t\t$this->PPKPELAYANAN_SEP->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// JENISPERAWATAN_SEP\n\t\t$this->JENISPERAWATAN_SEP->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// CATATAN_SEP\n\t\t$this->CATATAN_SEP->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// DIAGNOSAAWAL_SEP\n\t\t$this->DIAGNOSAAWAL_SEP->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// NAMADIAGNOSA_SEP\n\t\t$this->NAMADIAGNOSA_SEP->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// LAKALANTAS_SEP\n\t\t$this->LAKALANTAS_SEP->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// LOKASILAKALANTAS\n\t\t$this->LOKASILAKALANTAS->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// USER\n\t\t$this->USER->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// cek_data_kepesertaan\n\t\t$this->cek_data_kepesertaan->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// generate_sep\n\t\t$this->generate_sep->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// PESERTANIK_SEP\n\t\t$this->PESERTANIK_SEP->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// PESERTANAMA_SEP\n\t\t$this->PESERTANAMA_SEP->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// PESERTAJENISKELAMIN_SEP\n\t\t$this->PESERTAJENISKELAMIN_SEP->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// PESERTANAMAKELAS_SEP\n\t\t$this->PESERTANAMAKELAS_SEP->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// PESERTAPISAT\n\t\t$this->PESERTAPISAT->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// PESERTATGLLAHIR\n\t\t$this->PESERTATGLLAHIR->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// PESERTAJENISPESERTA_SEP\n\t\t$this->PESERTAJENISPESERTA_SEP->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// PESERTANAMAJENISPESERTA_SEP\n\t\t$this->PESERTANAMAJENISPESERTA_SEP->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// PESERTATGLCETAKKARTU_SEP\n\t\t$this->PESERTATGLCETAKKARTU_SEP->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// POLITUJUAN_SEP\n\t\t$this->POLITUJUAN_SEP->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// NAMAPOLITUJUAN_SEP\n\t\t$this->NAMAPOLITUJUAN_SEP->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// KDPPKRUJUKAN_SEP\n\t\t$this->KDPPKRUJUKAN_SEP->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// NMPPKRUJUKAN_SEP\n\t\t$this->NMPPKRUJUKAN_SEP->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// UPDATETGLPLNG_SEP\n\t\t$this->UPDATETGLPLNG_SEP->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// bridging_upt_tglplng\n\t\t$this->bridging_upt_tglplng->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// mapingtransaksi\n\t\t$this->mapingtransaksi->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// bridging_no_rujukan\n\t\t$this->bridging_no_rujukan->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// bridging_hapus_sep\n\t\t$this->bridging_hapus_sep->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// bridging_kepesertaan_by_no_ka\n\t\t$this->bridging_kepesertaan_by_no_ka->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// NOKARTU_BPJS\n\t\t$this->NOKARTU_BPJS->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// counter_cetak_kartu\n\t\t$this->counter_cetak_kartu->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// bridging_kepesertaan_by_nik\n\t\t$this->bridging_kepesertaan_by_nik->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// NOKTP\n\t\t$this->NOKTP->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// bridging_by_no_rujukan\n\t\t$this->bridging_by_no_rujukan->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// maping_hapus_sep\n\t\t$this->maping_hapus_sep->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// counter_cetak_kartu_ranap\n\t\t$this->counter_cetak_kartu_ranap->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// BIAYA_PENDAFTARAN\n\t\t$this->BIAYA_PENDAFTARAN->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// BIAYA_TINDAKAN_POLI\n\t\t$this->BIAYA_TINDAKAN_POLI->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// BIAYA_TINDAKAN_RADIOLOGI\n\t\t$this->BIAYA_TINDAKAN_RADIOLOGI->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// BIAYA_TINDAKAN_LABORAT\n\t\t$this->BIAYA_TINDAKAN_LABORAT->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// BIAYA_TINDAKAN_KONSULTASI\n\t\t$this->BIAYA_TINDAKAN_KONSULTASI->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// BIAYA_TARIF_DOKTER\n\t\t$this->BIAYA_TARIF_DOKTER->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// BIAYA_TARIF_DOKTER_KONSUL\n\t\t$this->BIAYA_TARIF_DOKTER_KONSUL->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// INCLUDE\n\t\t$this->INCLUDE->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_kelas_rawat_rajal\n\t\t$this->eklaim_kelas_rawat_rajal->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_adl_score\n\t\t$this->eklaim_adl_score->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_adl_sub_acute\n\t\t$this->eklaim_adl_sub_acute->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_adl_chronic\n\t\t$this->eklaim_adl_chronic->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_icu_indikator\n\t\t$this->eklaim_icu_indikator->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_icu_los\n\t\t$this->eklaim_icu_los->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_ventilator_hour\n\t\t$this->eklaim_ventilator_hour->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_upgrade_class_ind\n\t\t$this->eklaim_upgrade_class_ind->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_upgrade_class_class\n\t\t$this->eklaim_upgrade_class_class->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_upgrade_class_los\n\t\t$this->eklaim_upgrade_class_los->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_birth_weight\n\t\t$this->eklaim_birth_weight->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_discharge_status\n\t\t$this->eklaim_discharge_status->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_diagnosa\n\t\t$this->eklaim_diagnosa->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_procedure\n\t\t$this->eklaim_procedure->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_tarif_rs\n\t\t$this->eklaim_tarif_rs->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_tarif_poli_eks\n\t\t$this->eklaim_tarif_poli_eks->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_id_dokter\n\t\t$this->eklaim_id_dokter->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_nama_dokter\n\t\t$this->eklaim_nama_dokter->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_kode_tarif\n\t\t$this->eklaim_kode_tarif->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_payor_id\n\t\t$this->eklaim_payor_id->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_payor_cd\n\t\t$this->eklaim_payor_cd->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_coder_nik\n\t\t$this->eklaim_coder_nik->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_los\n\t\t$this->eklaim_los->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_patient_id\n\t\t$this->eklaim_patient_id->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_admission_id\n\t\t$this->eklaim_admission_id->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_hospital_admission_id\n\t\t$this->eklaim_hospital_admission_id->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// bridging_hapussep\n\t\t$this->bridging_hapussep->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// user_penghapus_sep\n\t\t$this->user_penghapus_sep->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// BIAYA_BILLING_RAJAL\n\t\t$this->BIAYA_BILLING_RAJAL->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// STATUS_PEMBAYARAN\n\t\t$this->STATUS_PEMBAYARAN->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// BIAYA_TINDAKAN_FISIOTERAPI\n\t\t$this->BIAYA_TINDAKAN_FISIOTERAPI->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_reg_pasien\n\t\t$this->eklaim_reg_pasien->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_reg_klaim_baru\n\t\t$this->eklaim_reg_klaim_baru->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_gruper1\n\t\t$this->eklaim_gruper1->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_gruper2\n\t\t$this->eklaim_gruper2->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_finalklaim\n\t\t$this->eklaim_finalklaim->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_sendklaim\n\t\t$this->eklaim_sendklaim->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_flag_hapus_pasien\n\t\t$this->eklaim_flag_hapus_pasien->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_flag_hapus_klaim\n\t\t$this->eklaim_flag_hapus_klaim->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_kemkes_dc_Status\n\t\t$this->eklaim_kemkes_dc_Status->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_bpjs_dc_Status\n\t\t$this->eklaim_bpjs_dc_Status->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_cbg_code\n\t\t$this->eklaim_cbg_code->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_cbg_descprition\n\t\t$this->eklaim_cbg_descprition->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_cbg_tariff\n\t\t$this->eklaim_cbg_tariff->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_sub_acute_code\n\t\t$this->eklaim_sub_acute_code->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_sub_acute_deskripsi\n\t\t$this->eklaim_sub_acute_deskripsi->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_sub_acute_tariff\n\t\t$this->eklaim_sub_acute_tariff->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_chronic_code\n\t\t$this->eklaim_chronic_code->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_chronic_deskripsi\n\t\t$this->eklaim_chronic_deskripsi->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_chronic_tariff\n\t\t$this->eklaim_chronic_tariff->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_inacbg_version\n\t\t$this->eklaim_inacbg_version->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// BIAYA_TINDAKAN_IBS_RAJAL\n\t\t$this->BIAYA_TINDAKAN_IBS_RAJAL->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// VERIFY_ICD\n\t\t$this->VERIFY_ICD->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// bridging_rujukan_faskes_2\n\t\t$this->bridging_rujukan_faskes_2->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_reedit_claim\n\t\t$this->eklaim_reedit_claim->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// KETERANGAN\n\t\t$this->KETERANGAN->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// TGLLAHIR\n\t\t$this->TGLLAHIR->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// USER_KASIR\n\t\t$this->USER_KASIR->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_tgl_gruping\n\t\t$this->eklaim_tgl_gruping->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_tgl_finalklaim\n\t\t$this->eklaim_tgl_finalklaim->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// eklaim_tgl_kirim_klaim\n\t\t$this->eklaim_tgl_kirim_klaim->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// BIAYA_OBAT_RS\n\t\t$this->BIAYA_OBAT_RS->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// EKG_RAJAL\n\t\t$this->EKG_RAJAL->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// USG_RAJAL\n\t\t$this->USG_RAJAL->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// FISIOTERAPI_RAJAL\n\t\t$this->FISIOTERAPI_RAJAL->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// BHP_RAJAL\n\t\t$this->BHP_RAJAL->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// BIAYA_TINDAKAN_ASKEP_IBS_RAJAL\n\t\t$this->BIAYA_TINDAKAN_ASKEP_IBS_RAJAL->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// BIAYA_TINDAKAN_TMNO_IBS_RAJAL\n\t\t$this->BIAYA_TINDAKAN_TMNO_IBS_RAJAL->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// TOTAL_BIAYA_IBS_RAJAL\n\t\t$this->TOTAL_BIAYA_IBS_RAJAL->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// ORDER_LAB\n\t\t$this->ORDER_LAB->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// BILL_RAJAL_SELESAI\n\t\t$this->BILL_RAJAL_SELESAI->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// INCLUDE_IDXDAFTAR\n\t\t$this->INCLUDE_IDXDAFTAR->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// INCLUDE_HARGA\n\t\t$this->INCLUDE_HARGA->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// TARIF_JASA_SARANA\n\t\t$this->TARIF_JASA_SARANA->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// TARIF_PENUNJANG_NON_MEDIS\n\t\t$this->TARIF_PENUNJANG_NON_MEDIS->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// TARIF_ASUHAN_KEPERAWATAN\n\t\t$this->TARIF_ASUHAN_KEPERAWATAN->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// KDDOKTER_RAJAL\n\t\t$this->KDDOKTER_RAJAL->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// KDDOKTER_KONSUL_RAJAL\n\t\t$this->KDDOKTER_KONSUL_RAJAL->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// BIAYA_BILLING_RS\n\t\t$this->BIAYA_BILLING_RS->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// BIAYA_TINDAKAN_POLI_TMO\n\t\t$this->BIAYA_TINDAKAN_POLI_TMO->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// BIAYA_TINDAKAN_POLI_KEPERAWATAN\n\t\t$this->BIAYA_TINDAKAN_POLI_KEPERAWATAN->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// BHP_RAJAL_TMO\n\t\t$this->BHP_RAJAL_TMO->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// BHP_RAJAL_KEPERAWATAN\n\t\t$this->BHP_RAJAL_KEPERAWATAN->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// TARIF_AKOMODASI\n\t\t$this->TARIF_AKOMODASI->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// TARIF_AMBULAN\n\t\t$this->TARIF_AMBULAN->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// TARIF_OKSIGEN\n\t\t$this->TARIF_OKSIGEN->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// BIAYA_TINDAKAN_JENAZAH\n\t\t$this->BIAYA_TINDAKAN_JENAZAH->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// BIAYA_BILLING_IGD\n\t\t$this->BIAYA_BILLING_IGD->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// BIAYA_TINDAKAN_POLI_PERSALINAN\n\t\t$this->BIAYA_TINDAKAN_POLI_PERSALINAN->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// BHP_RAJAL_PERSALINAN\n\t\t$this->BHP_RAJAL_PERSALINAN->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// TARIF_BIMBINGAN_ROHANI\n\t\t$this->TARIF_BIMBINGAN_ROHANI->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// BIAYA_BILLING_RS2\n\t\t$this->BIAYA_BILLING_RS2->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// BIAYA_TARIF_DOKTER_IGD\n\t\t$this->BIAYA_TARIF_DOKTER_IGD->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// BIAYA_PENDAFTARAN_IGD\n\t\t$this->BIAYA_PENDAFTARAN_IGD->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// BIAYA_BILLING_IBS\n\t\t$this->BIAYA_BILLING_IBS->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// TARIF_JASA_SARANA_IGD\n\t\t$this->TARIF_JASA_SARANA_IGD->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// BIAYA_TARIF_DOKTER_SPESIALIS_IGD\n\t\t$this->BIAYA_TARIF_DOKTER_SPESIALIS_IGD->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// BIAYA_TARIF_DOKTER_KONSUL_IGD\n\t\t$this->BIAYA_TARIF_DOKTER_KONSUL_IGD->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// TARIF_MAKAN_IGD\n\t\t$this->TARIF_MAKAN_IGD->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// TARIF_ASUHAN_KEPERAWATAN_IGD\n\t\t$this->TARIF_ASUHAN_KEPERAWATAN_IGD->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// pasien_TITLE\n\t\t$this->pasien_TITLE->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// pasien_NAMA\n\t\t$this->pasien_NAMA->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// pasien_TEMPAT\n\t\t$this->pasien_TEMPAT->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// pasien_TGLLAHIR\n\t\t$this->pasien_TGLLAHIR->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// pasien_JENISKELAMIN\n\t\t$this->pasien_JENISKELAMIN->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// pasien_ALAMAT\n\t\t$this->pasien_ALAMAT->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// pasien_KELURAHAN\n\t\t$this->pasien_KELURAHAN->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// pasien_KDKECAMATAN\n\t\t$this->pasien_KDKECAMATAN->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// pasien_KOTA\n\t\t$this->pasien_KOTA->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// pasien_KDPROVINSI\n\t\t$this->pasien_KDPROVINSI->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// pasien_NOTELP\n\t\t$this->pasien_NOTELP->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// pasien_NOKTP\n\t\t$this->pasien_NOKTP->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// pasien_SUAMI_ORTU\n\t\t$this->pasien_SUAMI_ORTU->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// pasien_PEKERJAAN\n\t\t$this->pasien_PEKERJAAN->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// pasien_AGAMA\n\t\t$this->pasien_AGAMA->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// pasien_PENDIDIKAN\n\t\t$this->pasien_PENDIDIKAN->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// pasien_ALAMAT_KTP\n\t\t$this->pasien_ALAMAT_KTP->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// pasien_NO_KARTU\n\t\t$this->pasien_NO_KARTU->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// pasien_JNS_PASIEN\n\t\t$this->pasien_JNS_PASIEN->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// pasien_nama_ayah\n\t\t$this->pasien_nama_ayah->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// pasien_nama_ibu\n\t\t$this->pasien_nama_ibu->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// pasien_nama_suami\n\t\t$this->pasien_nama_suami->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// pasien_nama_istri\n\t\t$this->pasien_nama_istri->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// pasien_KD_ETNIS\n\t\t$this->pasien_KD_ETNIS->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// pasien_KD_BHS_HARIAN\n\t\t$this->pasien_KD_BHS_HARIAN->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// BILL_FARMASI_SELESAI\n\t\t$this->BILL_FARMASI_SELESAI->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// TARIF_PELAYANAN_SIMRS\n\t\t$this->TARIF_PELAYANAN_SIMRS->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// USER_ADM\n\t\t$this->USER_ADM->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// TARIF_PENUNJANG_NON_MEDIS_IGD\n\t\t$this->TARIF_PENUNJANG_NON_MEDIS_IGD->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// TARIF_PELAYANAN_DARAH\n\t\t$this->TARIF_PELAYANAN_DARAH->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// penjamin_kkl_id\n\t\t$this->penjamin_kkl_id->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// asalfaskesrujukan_id\n\t\t$this->asalfaskesrujukan_id->CellCssStyle = \"white-space: nowrap;\";\n\n\t\t// peserta_cob\n\t\t// poli_eksekutif\n\t\t// status_kepesertaan_BPJS\n\n\t\t$this->status_kepesertaan_BPJS->CellCssStyle = \"white-space: nowrap;\";\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t// PASIENBARU\n\t\tif (strval($this->PASIENBARU->CurrentValue) <> \"\") {\n\t\t\t$this->PASIENBARU->ViewValue = $this->PASIENBARU->OptionCaption($this->PASIENBARU->CurrentValue);\n\t\t} else {\n\t\t\t$this->PASIENBARU->ViewValue = NULL;\n\t\t}\n\t\t$this->PASIENBARU->ViewCustomAttributes = \"\";\n\n\t\t// NOMR\n\t\t$this->NOMR->ViewValue = $this->NOMR->CurrentValue;\n\t\t$this->NOMR->ViewCustomAttributes = \"\";\n\n\t\t// TGLREG\n\t\t$this->TGLREG->ViewValue = $this->TGLREG->CurrentValue;\n\t\t$this->TGLREG->ViewValue = ew_FormatDateTime($this->TGLREG->ViewValue, 7);\n\t\t$this->TGLREG->ViewCustomAttributes = \"\";\n\n\t\t// KDDOKTER\n\t\tif (strval($this->KDDOKTER->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`kddokter`\" . ew_SearchString(\"=\", $this->KDDOKTER->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `kddokter`, `NAMADOKTER` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `vw_lookup_dokter_poli`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->KDDOKTER->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->KDDOKTER, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->KDDOKTER->ViewValue = $this->KDDOKTER->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->KDDOKTER->ViewValue = $this->KDDOKTER->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->KDDOKTER->ViewValue = NULL;\n\t\t}\n\t\t$this->KDDOKTER->ViewCustomAttributes = \"\";\n\n\t\t// KDPOLY\n\t\tif (strval($this->KDPOLY->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`kode`\" . ew_SearchString(\"=\", $this->KDPOLY->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `kode`, `nama` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `m_poly`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->KDPOLY->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->KDPOLY, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->KDPOLY->ViewValue = $this->KDPOLY->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->KDPOLY->ViewValue = $this->KDPOLY->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->KDPOLY->ViewValue = NULL;\n\t\t}\n\t\t$this->KDPOLY->ViewCustomAttributes = \"\";\n\n\t\t// KDRUJUK\n\t\tif (strval($this->KDRUJUK->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`KODE`\" . ew_SearchString(\"=\", $this->KDRUJUK->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `KODE`, `NAMA` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `m_rujukan`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->KDRUJUK->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->KDRUJUK, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->KDRUJUK->ViewValue = $this->KDRUJUK->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->KDRUJUK->ViewValue = $this->KDRUJUK->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->KDRUJUK->ViewValue = NULL;\n\t\t}\n\t\t$this->KDRUJUK->ViewCustomAttributes = \"\";\n\n\t\t// KDCARABAYAR\n\t\tif (strval($this->KDCARABAYAR->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`KODE`\" . ew_SearchString(\"=\", $this->KDCARABAYAR->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `KODE`, `NAMA` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `m_carabayar`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->KDCARABAYAR->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->KDCARABAYAR, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->KDCARABAYAR->ViewValue = $this->KDCARABAYAR->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->KDCARABAYAR->ViewValue = $this->KDCARABAYAR->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->KDCARABAYAR->ViewValue = NULL;\n\t\t}\n\t\t$this->KDCARABAYAR->ViewCustomAttributes = \"\";\n\n\t\t// SHIFT\n\t\tif (strval($this->SHIFT->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id_shift`\" . ew_SearchString(\"=\", $this->SHIFT->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id_shift`, `shift` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `l_shift`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->SHIFT->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->SHIFT, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->SHIFT->ViewValue = $this->SHIFT->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->SHIFT->ViewValue = $this->SHIFT->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->SHIFT->ViewValue = NULL;\n\t\t}\n\t\t$this->SHIFT->ViewCustomAttributes = \"\";\n\n\t\t// NIP\n\t\t$this->NIP->ViewValue = $this->NIP->CurrentValue;\n\t\t$this->NIP->ViewCustomAttributes = \"\";\n\n\t\t// MASUKPOLY\n\t\t$this->MASUKPOLY->ViewValue = $this->MASUKPOLY->CurrentValue;\n\t\t$this->MASUKPOLY->ViewValue = ew_FormatDateTime($this->MASUKPOLY->ViewValue, 4);\n\t\t$this->MASUKPOLY->ViewCustomAttributes = \"\";\n\n\t\t// KELUARPOLY\n\t\t$this->KELUARPOLY->ViewValue = $this->KELUARPOLY->CurrentValue;\n\t\t$this->KELUARPOLY->ViewValue = ew_FormatDateTime($this->KELUARPOLY->ViewValue, 4);\n\t\t$this->KELUARPOLY->ViewCustomAttributes = \"\";\n\n\t\t// pasien_NAMA\n\t\t$this->pasien_NAMA->ViewValue = $this->pasien_NAMA->CurrentValue;\n\t\t$this->pasien_NAMA->ViewCustomAttributes = \"\";\n\n\t\t// pasien_TEMPAT\n\t\t$this->pasien_TEMPAT->ViewValue = $this->pasien_TEMPAT->CurrentValue;\n\t\t$this->pasien_TEMPAT->ViewCustomAttributes = \"\";\n\n\t\t// peserta_cob\n\t\t$this->peserta_cob->ViewValue = $this->peserta_cob->CurrentValue;\n\t\t$this->peserta_cob->ViewCustomAttributes = \"\";\n\n\t\t// poli_eksekutif\n\t\t$this->poli_eksekutif->ViewValue = $this->poli_eksekutif->CurrentValue;\n\t\t$this->poli_eksekutif->ViewCustomAttributes = \"\";\n\n\t\t\t// PASIENBARU\n\t\t\t$this->PASIENBARU->LinkCustomAttributes = \"\";\n\t\t\t$this->PASIENBARU->HrefValue = \"\";\n\t\t\t$this->PASIENBARU->TooltipValue = \"\";\n\n\t\t\t// NOMR\n\t\t\t$this->NOMR->LinkCustomAttributes = \"\";\n\t\t\t$this->NOMR->HrefValue = \"\";\n\t\t\t$this->NOMR->TooltipValue = \"\";\n\n\t\t\t// TGLREG\n\t\t\t$this->TGLREG->LinkCustomAttributes = \"\";\n\t\t\t$this->TGLREG->HrefValue = \"\";\n\t\t\t$this->TGLREG->TooltipValue = \"\";\n\n\t\t\t// KDDOKTER\n\t\t\t$this->KDDOKTER->LinkCustomAttributes = \"\";\n\t\t\t$this->KDDOKTER->HrefValue = \"\";\n\t\t\t$this->KDDOKTER->TooltipValue = \"\";\n\n\t\t\t// KDPOLY\n\t\t\t$this->KDPOLY->LinkCustomAttributes = \"\";\n\t\t\t$this->KDPOLY->HrefValue = \"\";\n\t\t\t$this->KDPOLY->TooltipValue = \"\";\n\n\t\t\t// KDRUJUK\n\t\t\t$this->KDRUJUK->LinkCustomAttributes = \"\";\n\t\t\t$this->KDRUJUK->HrefValue = \"\";\n\t\t\t$this->KDRUJUK->TooltipValue = \"\";\n\n\t\t\t// KDCARABAYAR\n\t\t\t$this->KDCARABAYAR->LinkCustomAttributes = \"\";\n\t\t\t$this->KDCARABAYAR->HrefValue = \"\";\n\t\t\t$this->KDCARABAYAR->TooltipValue = \"\";\n\n\t\t\t// SHIFT\n\t\t\t$this->SHIFT->LinkCustomAttributes = \"\";\n\t\t\t$this->SHIFT->HrefValue = \"\";\n\t\t\t$this->SHIFT->TooltipValue = \"\";\n\n\t\t\t// NIP\n\t\t\t$this->NIP->LinkCustomAttributes = \"\";\n\t\t\t$this->NIP->HrefValue = \"\";\n\t\t\t$this->NIP->TooltipValue = \"\";\n\n\t\t\t// MASUKPOLY\n\t\t\t$this->MASUKPOLY->LinkCustomAttributes = \"\";\n\t\t\t$this->MASUKPOLY->HrefValue = \"\";\n\t\t\t$this->MASUKPOLY->TooltipValue = \"\";\n\n\t\t\t// KELUARPOLY\n\t\t\t$this->KELUARPOLY->LinkCustomAttributes = \"\";\n\t\t\t$this->KELUARPOLY->HrefValue = \"\";\n\t\t\t$this->KELUARPOLY->TooltipValue = \"\";\n\n\t\t\t// pasien_NAMA\n\t\t\t$this->pasien_NAMA->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_NAMA->HrefValue = \"\";\n\t\t\t$this->pasien_NAMA->TooltipValue = \"\";\n\n\t\t\t// pasien_TEMPAT\n\t\t\t$this->pasien_TEMPAT->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_TEMPAT->HrefValue = \"\";\n\t\t\t$this->pasien_TEMPAT->TooltipValue = \"\";\n\n\t\t\t// peserta_cob\n\t\t\t$this->peserta_cob->LinkCustomAttributes = \"\";\n\t\t\t$this->peserta_cob->HrefValue = \"\";\n\t\t\t$this->peserta_cob->TooltipValue = \"\";\n\n\t\t\t// poli_eksekutif\n\t\t\t$this->poli_eksekutif->LinkCustomAttributes = \"\";\n\t\t\t$this->poli_eksekutif->HrefValue = \"\";\n\t\t\t$this->poli_eksekutif->TooltipValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "title": "" }, { "docid": "3e945f576a8a4ea962eb34a84e78edeb", "score": "0.540479", "text": "public function getColorFor($row)\n {\n if (0 != $row && 0 != $row % 2) {\n return Color::rgb(Color::LightBlue);\n } elseif (0 == $row) {\n return Color::rgb(Color::LightGreen);\n } else {\n return Color::rgb(Color::LightGray);\n }\n }", "title": "" }, { "docid": "e813cd8d931d9ec5683c216203978856", "score": "0.53934747", "text": "function RenderRow() {\r\n\t\tglobal $conn, $Security, $fsstat;\r\n\r\n\t\t// Call Row_Rendering event\r\n\t\t$fsstat->Row_Rendering();\r\n\r\n\t\t// Common render codes for all row types\r\n\t\t// fsid\r\n\r\n\t\t$fsstat->fsid->CellCssStyle = \"\";\r\n\t\t$fsstat->fsid->CellCssClass = \"\";\r\n\r\n\t\t// dirid\r\n\t\t$fsstat->dirid->CellCssStyle = \"\";\r\n\t\t$fsstat->dirid->CellCssClass = \"\";\r\n\r\n\t\t// checked\r\n\t\t$fsstat->checked->CellCssStyle = \"\";\r\n\t\t$fsstat->checked->CellCssClass = \"\";\r\n\r\n\t\t// latest\r\n\t\t$fsstat->latest->CellCssStyle = \"\";\r\n\t\t$fsstat->latest->CellCssClass = \"\";\r\n\r\n\t\t// uid\r\n\t\t$fsstat->uid->CellCssStyle = \"\";\r\n\t\t$fsstat->uid->CellCssClass = \"\";\r\n\r\n\t\t// type\r\n\t\t$fsstat->type->CellCssStyle = \"\";\r\n\t\t$fsstat->type->CellCssClass = \"\";\r\n\r\n\t\t// sumcnt\r\n\t\t$fsstat->sumcnt->CellCssStyle = \"\";\r\n\t\t$fsstat->sumcnt->CellCssClass = \"\";\r\n\r\n\t\t// sumval\r\n\t\t$fsstat->sumval->CellCssStyle = \"\";\r\n\t\t$fsstat->sumval->CellCssClass = \"\";\r\n\r\n\t\t// maxcnt\r\n\t\t$fsstat->maxcnt->CellCssStyle = \"\";\r\n\t\t$fsstat->maxcnt->CellCssClass = \"\";\r\n\r\n\t\t// maxval\r\n\t\t$fsstat->maxval->CellCssStyle = \"\";\r\n\t\t$fsstat->maxval->CellCssClass = \"\";\r\n\t\tif ($fsstat->RowType == EW_ROWTYPE_VIEW) { // View row\r\n\r\n\t\t\t// fsid\r\n\t\t\t$fsstat->fsid->ViewValue = $fsstat->fsid->CurrentValue;\r\n\t\t\t$fsstat->fsid->CssStyle = \"\";\r\n\t\t\t$fsstat->fsid->CssClass = \"\";\r\n\t\t\t$fsstat->fsid->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// dirid\r\n\t\t\t$fsstat->dirid->ViewValue = $fsstat->dirid->CurrentValue;\r\n\t\t\t$fsstat->dirid->CssStyle = \"\";\r\n\t\t\t$fsstat->dirid->CssClass = \"\";\r\n\t\t\t$fsstat->dirid->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// checked\r\n\t\t\t$fsstat->checked->ViewValue = $fsstat->checked->CurrentValue;\r\n\t\t\t$fsstat->checked->CssStyle = \"\";\r\n\t\t\t$fsstat->checked->CssClass = \"\";\r\n\t\t\t$fsstat->checked->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// latest\r\n\t\t\t$fsstat->latest->ViewValue = $fsstat->latest->CurrentValue;\r\n\t\t\t$fsstat->latest->CssStyle = \"\";\r\n\t\t\t$fsstat->latest->CssClass = \"\";\r\n\t\t\t$fsstat->latest->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// uid\r\n\t\t\t$fsstat->uid->ViewValue = $fsstat->uid->CurrentValue;\r\n\t\t\t$fsstat->uid->CssStyle = \"\";\r\n\t\t\t$fsstat->uid->CssClass = \"\";\r\n\t\t\t$fsstat->uid->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// type\r\n\t\t\t$fsstat->type->ViewValue = $fsstat->type->CurrentValue;\r\n\t\t\t$fsstat->type->CssStyle = \"\";\r\n\t\t\t$fsstat->type->CssClass = \"\";\r\n\t\t\t$fsstat->type->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// sumcnt\r\n\t\t\t$fsstat->sumcnt->ViewValue = $fsstat->sumcnt->CurrentValue;\r\n\t\t\t$fsstat->sumcnt->CssStyle = \"\";\r\n\t\t\t$fsstat->sumcnt->CssClass = \"\";\r\n\t\t\t$fsstat->sumcnt->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// sumval\r\n\t\t\t$fsstat->sumval->ViewValue = $fsstat->sumval->CurrentValue;\r\n\t\t\t$fsstat->sumval->CssStyle = \"\";\r\n\t\t\t$fsstat->sumval->CssClass = \"\";\r\n\t\t\t$fsstat->sumval->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// maxcnt\r\n\t\t\t$fsstat->maxcnt->ViewValue = $fsstat->maxcnt->CurrentValue;\r\n\t\t\t$fsstat->maxcnt->CssStyle = \"\";\r\n\t\t\t$fsstat->maxcnt->CssClass = \"\";\r\n\t\t\t$fsstat->maxcnt->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// maxval\r\n\t\t\t$fsstat->maxval->ViewValue = $fsstat->maxval->CurrentValue;\r\n\t\t\t$fsstat->maxval->CssStyle = \"\";\r\n\t\t\t$fsstat->maxval->CssClass = \"\";\r\n\t\t\t$fsstat->maxval->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// fsid\r\n\t\t\t$fsstat->fsid->HrefValue = \"\";\r\n\r\n\t\t\t// dirid\r\n\t\t\t$fsstat->dirid->HrefValue = \"\";\r\n\r\n\t\t\t// checked\r\n\t\t\t$fsstat->checked->HrefValue = \"\";\r\n\r\n\t\t\t// latest\r\n\t\t\t$fsstat->latest->HrefValue = \"\";\r\n\r\n\t\t\t// uid\r\n\t\t\t$fsstat->uid->HrefValue = \"\";\r\n\r\n\t\t\t// type\r\n\t\t\t$fsstat->type->HrefValue = \"\";\r\n\r\n\t\t\t// sumcnt\r\n\t\t\t$fsstat->sumcnt->HrefValue = \"\";\r\n\r\n\t\t\t// sumval\r\n\t\t\t$fsstat->sumval->HrefValue = \"\";\r\n\r\n\t\t\t// maxcnt\r\n\t\t\t$fsstat->maxcnt->HrefValue = \"\";\r\n\r\n\t\t\t// maxval\r\n\t\t\t$fsstat->maxval->HrefValue = \"\";\r\n\t\t}\r\n\r\n\t\t// Call Row Rendered event\r\n\t\t$fsstat->Row_Rendered();\r\n\t}", "title": "" }, { "docid": "8e19e7952f9f7b63311865a250551a61", "score": "0.5393007", "text": "function generateTable($data, $titles, $formatters){\n?>\n\t<table border=\"1\">\n\t\t<tr>\n<?\n\tforeach($titles as $title){\n\t\t?><th><?=$title?></th><?\n\t}\n?>\n\t\t</tr>\n<?\n\t$alt=0;\n\tforeach($data as $row){\n\t\t$alt++;\n\t\tif($alt)\n\t\t\techo \"<tr>\";\n\t\telse\n\t\t\techo \"<tr class='listalt'>\";\n\t\t\n\t\tforeach($titles as $index => $title){\n\t\t\tif(isset($formatters[$index])){\n\t\t\t\t$function = $formatters[$index];\n\t\t\t\techo \"<td>\" . $function($row, $index) . \"</td>\";\n\t\t\t} else {\n\t\t\t\tif(isset($row[$index])){\n\t\t\t\t\tif($row[$index] == \"\")\n\t\t\t\t\t\techo \"<td>&nbsp;</td>\";\n\t\t\t\t\telse\n\t\t\t\t\t\techo \"<td>\" . htmlentities($row[$index]) . \"</td>\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\techo \"</tr>\";\n\t}\n?>\n\t</table>\n<?\n}", "title": "" }, { "docid": "9bd2944d183e4f2624a483ddc4aec810", "score": "0.5391776", "text": "function RenderRow() {\n\t\tglobal $conn, $Security, $mst_satuan;\n\n\t\t// Call Row_Rendering event\n\t\t$mst_satuan->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// kode\n\n\t\t$mst_satuan->kode->CellCssStyle = \"\";\n\t\t$mst_satuan->kode->CellCssClass = \"\";\n\n\t\t// satuan\n\t\t$mst_satuan->satuan->CellCssStyle = \"\";\n\t\t$mst_satuan->satuan->CellCssClass = \"\";\n\n\t\t// singkatan\n\t\t$mst_satuan->singkatan->CellCssStyle = \"\";\n\t\t$mst_satuan->singkatan->CellCssClass = \"\";\n\t\tif ($mst_satuan->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t\t// kode\n\t\t\t$mst_satuan->kode->ViewValue = $mst_satuan->kode->CurrentValue;\n\t\t\t$mst_satuan->kode->CssStyle = \"\";\n\t\t\t$mst_satuan->kode->CssClass = \"\";\n\t\t\t$mst_satuan->kode->ViewCustomAttributes = \"\";\n\n\t\t\t// satuan\n\t\t\t$mst_satuan->satuan->ViewValue = $mst_satuan->satuan->CurrentValue;\n\t\t\t$mst_satuan->satuan->CssStyle = \"\";\n\t\t\t$mst_satuan->satuan->CssClass = \"\";\n\t\t\t$mst_satuan->satuan->ViewCustomAttributes = \"\";\n\n\t\t\t// singkatan\n\t\t\t$mst_satuan->singkatan->ViewValue = $mst_satuan->singkatan->CurrentValue;\n\t\t\t$mst_satuan->singkatan->CssStyle = \"\";\n\t\t\t$mst_satuan->singkatan->CssClass = \"\";\n\t\t\t$mst_satuan->singkatan->ViewCustomAttributes = \"\";\n\n\t\t\t// kode\n\t\t\t$mst_satuan->kode->HrefValue = \"\";\n\n\t\t\t// satuan\n\t\t\t$mst_satuan->satuan->HrefValue = \"\";\n\n\t\t\t// singkatan\n\t\t\t$mst_satuan->singkatan->HrefValue = \"\";\n\t\t} elseif ($mst_satuan->RowType == EW_ROWTYPE_EDIT) { // Edit row\n\n\t\t\t// kode\n\t\t\t$mst_satuan->kode->EditCustomAttributes = \"\";\n\t\t\t$mst_satuan->kode->EditValue = $mst_satuan->kode->CurrentValue;\n\t\t\t$mst_satuan->kode->CssStyle = \"\";\n\t\t\t$mst_satuan->kode->CssClass = \"\";\n\t\t\t$mst_satuan->kode->ViewCustomAttributes = \"\";\n\n\t\t\t// satuan\n\t\t\t$mst_satuan->satuan->EditCustomAttributes = \"\";\n\t\t\t$mst_satuan->satuan->EditValue = ew_HtmlEncode($mst_satuan->satuan->CurrentValue);\n\n\t\t\t// singkatan\n\t\t\t$mst_satuan->singkatan->EditCustomAttributes = \"\";\n\t\t\t$mst_satuan->singkatan->EditValue = ew_HtmlEncode($mst_satuan->singkatan->CurrentValue);\n\n\t\t\t// Edit refer script\n\t\t\t// kode\n\n\t\t\t$mst_satuan->kode->HrefValue = \"\";\n\n\t\t\t// satuan\n\t\t\t$mst_satuan->satuan->HrefValue = \"\";\n\n\t\t\t// singkatan\n\t\t\t$mst_satuan->singkatan->HrefValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\t$mst_satuan->Row_Rendered();\n\t}", "title": "" }, { "docid": "c3e09fbcc9cb6380e2d67318bd560e87", "score": "0.5391085", "text": "function RowTitle($data) {\n $nb = 0;\n for ($i = 0; $i < count($data); $i++)\n $nb = max($nb, $this->NbLines($this->widths[$i], $data[$i]));\n $h = 2.5 * $nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n $this->SetFillColor(200, 200, 200);\n $this->SetFont('Arial', 'B', 8);\n //Draw the cells of the row\n for ($i = 0; $i < count($data); $i++) {\n $w = $this->widths[$i];\n $a = isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n //Save the current position\n $x = $this->GetX();\n $y = $this->GetY();\n //Draw the border\n $this->Rect($x, $y, $w, $h, 'FD');\n //Print the text\n $this->MultiCell($w, 5, $data[$i], 0, 'C');\n //Put the position to the right of the cell\n $this->SetXY($x + $w, $y);\n }\n //Go to the next line\n $this->Ln($h - 5);\n }", "title": "" }, { "docid": "d42de234778a2f5a0b2e49f75e810d35", "score": "0.53726625", "text": "function bgCol($n, $mod = 0) {\n\t\t$color = $this->color[$n - 1];\n\t\tif ($mod) {\n\t\t\t$color = t3lib_div::modifyHTMLcolor($color, $mod, $mod, $mod);\n\t\t}\n\t\treturn ' bgcolor=\"' . $color . '\"';\n\t}", "title": "" }, { "docid": "e92c74dd9c71370671e524a0eff0c270", "score": "0.5366987", "text": "function RenderRow() {\n\t\tglobal $Security, $Language, $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t// Call Row_Rendering event\n\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// IDXDAFTAR\n\t\t// PASIENBARU\n\t\t// NOMR\n\t\t// TGLREG\n\t\t// KDDOKTER\n\t\t// KDPOLY\n\t\t// KDRUJUK\n\t\t// KDCARABAYAR\n\t\t// NOJAMINAN\n\t\t// SHIFT\n\t\t// STATUS\n\t\t// KETERANGAN_STATUS\n\t\t// NIP\n\t\t// MASUKPOLY\n\t\t// KELUARPOLY\n\t\t// KETRUJUK\n\t\t// KETBAYAR\n\t\t// PENANGGUNGJAWAB_NAMA\n\t\t// PENANGGUNGJAWAB_HUBUNGAN\n\t\t// PENANGGUNGJAWAB_ALAMAT\n\t\t// PENANGGUNGJAWAB_PHONE\n\t\t// JAMREG\n\t\t// BATAL\n\t\t// NO_SJP\n\t\t// NO_PESERTA\n\t\t// NOKARTU\n\t\t// TOTAL_BIAYA_OBAT\n\t\t// biaya_obat\n\t\t// biaya_retur_obat\n\t\t// TOTAL_BIAYA_OBAT_RAJAL\n\t\t// biaya_obat_rajal\n\t\t// biaya_retur_obat_rajal\n\t\t// TOTAL_BIAYA_OBAT_IGD\n\t\t// biaya_obat_igd\n\t\t// biaya_retur_obat_igd\n\t\t// TOTAL_BIAYA_OBAT_IBS\n\t\t// biaya_obat_ibs\n\t\t// biaya_retur_obat_ibs\n\t\t// TANGGAL_SEP\n\t\t// TANGGALRUJUK_SEP\n\t\t// KELASRAWAT_SEP\n\t\t// MINTA_RUJUKAN\n\t\t// NORUJUKAN_SEP\n\t\t// PPKRUJUKANASAL_SEP\n\t\t// NAMAPPKRUJUKANASAL_SEP\n\t\t// PPKPELAYANAN_SEP\n\t\t// JENISPERAWATAN_SEP\n\t\t// CATATAN_SEP\n\t\t// DIAGNOSAAWAL_SEP\n\t\t// NAMADIAGNOSA_SEP\n\t\t// LAKALANTAS_SEP\n\t\t// LOKASILAKALANTAS\n\t\t// USER\n\t\t// cek_data_kepesertaan\n\t\t// generate_sep\n\t\t// PESERTANIK_SEP\n\t\t// PESERTANAMA_SEP\n\t\t// PESERTAJENISKELAMIN_SEP\n\t\t// PESERTANAMAKELAS_SEP\n\t\t// PESERTAPISAT\n\t\t// PESERTATGLLAHIR\n\t\t// PESERTAJENISPESERTA_SEP\n\t\t// PESERTANAMAJENISPESERTA_SEP\n\t\t// PESERTATGLCETAKKARTU_SEP\n\t\t// POLITUJUAN_SEP\n\t\t// NAMAPOLITUJUAN_SEP\n\t\t// KDPPKRUJUKAN_SEP\n\t\t// NMPPKRUJUKAN_SEP\n\t\t// UPDATETGLPLNG_SEP\n\t\t// bridging_upt_tglplng\n\t\t// mapingtransaksi\n\t\t// bridging_no_rujukan\n\t\t// bridging_hapus_sep\n\t\t// bridging_kepesertaan_by_no_ka\n\t\t// NOKARTU_BPJS\n\t\t// counter_cetak_kartu\n\t\t// bridging_kepesertaan_by_nik\n\t\t// NOKTP\n\t\t// bridging_by_no_rujukan\n\t\t// maping_hapus_sep\n\t\t// counter_cetak_kartu_ranap\n\t\t// BIAYA_PENDAFTARAN\n\t\t// BIAYA_TINDAKAN_POLI\n\t\t// BIAYA_TINDAKAN_RADIOLOGI\n\t\t// BIAYA_TINDAKAN_LABORAT\n\t\t// BIAYA_TINDAKAN_KONSULTASI\n\t\t// BIAYA_TARIF_DOKTER\n\t\t// BIAYA_TARIF_DOKTER_KONSUL\n\t\t// INCLUDE\n\t\t// eklaim_kelas_rawat_rajal\n\t\t// eklaim_adl_score\n\t\t// eklaim_adl_sub_acute\n\t\t// eklaim_adl_chronic\n\t\t// eklaim_icu_indikator\n\t\t// eklaim_icu_los\n\t\t// eklaim_ventilator_hour\n\t\t// eklaim_upgrade_class_ind\n\t\t// eklaim_upgrade_class_class\n\t\t// eklaim_upgrade_class_los\n\t\t// eklaim_birth_weight\n\t\t// eklaim_discharge_status\n\t\t// eklaim_diagnosa\n\t\t// eklaim_procedure\n\t\t// eklaim_tarif_rs\n\t\t// eklaim_tarif_poli_eks\n\t\t// eklaim_id_dokter\n\t\t// eklaim_nama_dokter\n\t\t// eklaim_kode_tarif\n\t\t// eklaim_payor_id\n\t\t// eklaim_payor_cd\n\t\t// eklaim_coder_nik\n\t\t// eklaim_los\n\t\t// eklaim_patient_id\n\t\t// eklaim_admission_id\n\t\t// eklaim_hospital_admission_id\n\t\t// bridging_hapussep\n\t\t// user_penghapus_sep\n\t\t// BIAYA_BILLING_RAJAL\n\t\t// STATUS_PEMBAYARAN\n\t\t// BIAYA_TINDAKAN_FISIOTERAPI\n\t\t// eklaim_reg_pasien\n\t\t// eklaim_reg_klaim_baru\n\t\t// eklaim_gruper1\n\t\t// eklaim_gruper2\n\t\t// eklaim_finalklaim\n\t\t// eklaim_sendklaim\n\t\t// eklaim_flag_hapus_pasien\n\t\t// eklaim_flag_hapus_klaim\n\t\t// eklaim_kemkes_dc_Status\n\t\t// eklaim_bpjs_dc_Status\n\t\t// eklaim_cbg_code\n\t\t// eklaim_cbg_descprition\n\t\t// eklaim_cbg_tariff\n\t\t// eklaim_sub_acute_code\n\t\t// eklaim_sub_acute_deskripsi\n\t\t// eklaim_sub_acute_tariff\n\t\t// eklaim_chronic_code\n\t\t// eklaim_chronic_deskripsi\n\t\t// eklaim_chronic_tariff\n\t\t// eklaim_inacbg_version\n\t\t// BIAYA_TINDAKAN_IBS_RAJAL\n\t\t// VERIFY_ICD\n\t\t// bridging_rujukan_faskes_2\n\t\t// eklaim_reedit_claim\n\t\t// KETERANGAN\n\t\t// TGLLAHIR\n\t\t// USER_KASIR\n\t\t// eklaim_tgl_gruping\n\t\t// eklaim_tgl_finalklaim\n\t\t// eklaim_tgl_kirim_klaim\n\t\t// BIAYA_OBAT_RS\n\t\t// EKG_RAJAL\n\t\t// USG_RAJAL\n\t\t// FISIOTERAPI_RAJAL\n\t\t// BHP_RAJAL\n\t\t// BIAYA_TINDAKAN_ASKEP_IBS_RAJAL\n\t\t// BIAYA_TINDAKAN_TMNO_IBS_RAJAL\n\t\t// TOTAL_BIAYA_IBS_RAJAL\n\t\t// ORDER_LAB\n\t\t// BILL_RAJAL_SELESAI\n\t\t// INCLUDE_IDXDAFTAR\n\t\t// INCLUDE_HARGA\n\t\t// TARIF_JASA_SARANA\n\t\t// TARIF_PENUNJANG_NON_MEDIS\n\t\t// TARIF_ASUHAN_KEPERAWATAN\n\t\t// KDDOKTER_RAJAL\n\t\t// KDDOKTER_KONSUL_RAJAL\n\t\t// BIAYA_BILLING_RS\n\t\t// BIAYA_TINDAKAN_POLI_TMO\n\t\t// BIAYA_TINDAKAN_POLI_KEPERAWATAN\n\t\t// BHP_RAJAL_TMO\n\t\t// BHP_RAJAL_KEPERAWATAN\n\t\t// TARIF_AKOMODASI\n\t\t// TARIF_AMBULAN\n\t\t// TARIF_OKSIGEN\n\t\t// BIAYA_TINDAKAN_JENAZAH\n\t\t// BIAYA_BILLING_IGD\n\t\t// BIAYA_TINDAKAN_POLI_PERSALINAN\n\t\t// BHP_RAJAL_PERSALINAN\n\t\t// TARIF_BIMBINGAN_ROHANI\n\t\t// BIAYA_BILLING_RS2\n\t\t// BIAYA_TARIF_DOKTER_IGD\n\t\t// BIAYA_PENDAFTARAN_IGD\n\t\t// BIAYA_BILLING_IBS\n\t\t// TARIF_JASA_SARANA_IGD\n\t\t// BIAYA_TARIF_DOKTER_SPESIALIS_IGD\n\t\t// BIAYA_TARIF_DOKTER_KONSUL_IGD\n\t\t// TARIF_MAKAN_IGD\n\t\t// TARIF_ASUHAN_KEPERAWATAN_IGD\n\t\t// pasien_TITLE\n\t\t// pasien_NAMA\n\t\t// pasien_TEMPAT\n\t\t// pasien_TGLLAHIR\n\t\t// pasien_JENISKELAMIN\n\t\t// pasien_ALAMAT\n\t\t// pasien_KELURAHAN\n\t\t// pasien_KDKECAMATAN\n\t\t// pasien_KOTA\n\t\t// pasien_KDPROVINSI\n\t\t// pasien_NOTELP\n\t\t// pasien_NOKTP\n\t\t// pasien_SUAMI_ORTU\n\t\t// pasien_PEKERJAAN\n\t\t// pasien_AGAMA\n\t\t// pasien_PENDIDIKAN\n\t\t// pasien_ALAMAT_KTP\n\t\t// pasien_NO_KARTU\n\t\t// pasien_JNS_PASIEN\n\t\t// pasien_nama_ayah\n\t\t// pasien_nama_ibu\n\t\t// pasien_nama_suami\n\t\t// pasien_nama_istri\n\t\t// pasien_KD_ETNIS\n\t\t// pasien_KD_BHS_HARIAN\n\t\t// BILL_FARMASI_SELESAI\n\t\t// TARIF_PELAYANAN_SIMRS\n\t\t// USER_ADM\n\t\t// TARIF_PENUNJANG_NON_MEDIS_IGD\n\t\t// TARIF_PELAYANAN_DARAH\n\t\t// penjamin_kkl_id\n\t\t// asalfaskesrujukan_id\n\t\t// peserta_cob\n\t\t// poli_eksekutif\n\t\t// status_kepesertaan_BPJS\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t// PASIENBARU\n\t\tif (strval($this->PASIENBARU->CurrentValue) <> \"\") {\n\t\t\t$this->PASIENBARU->ViewValue = $this->PASIENBARU->OptionCaption($this->PASIENBARU->CurrentValue);\n\t\t} else {\n\t\t\t$this->PASIENBARU->ViewValue = NULL;\n\t\t}\n\t\t$this->PASIENBARU->ViewCustomAttributes = \"\";\n\n\t\t// NOMR\n\t\t$this->NOMR->ViewValue = $this->NOMR->CurrentValue;\n\t\t$this->NOMR->ViewCustomAttributes = \"\";\n\n\t\t// TGLREG\n\t\t$this->TGLREG->ViewValue = $this->TGLREG->CurrentValue;\n\t\t$this->TGLREG->ViewValue = ew_FormatDateTime($this->TGLREG->ViewValue, 7);\n\t\t$this->TGLREG->ViewCustomAttributes = \"\";\n\n\t\t// KDDOKTER\n\t\tif (strval($this->KDDOKTER->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`kddokter`\" . ew_SearchString(\"=\", $this->KDDOKTER->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `kddokter`, `NAMADOKTER` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `vw_lookup_dokter_poli`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->KDDOKTER->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->KDDOKTER, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->KDDOKTER->ViewValue = $this->KDDOKTER->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->KDDOKTER->ViewValue = $this->KDDOKTER->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->KDDOKTER->ViewValue = NULL;\n\t\t}\n\t\t$this->KDDOKTER->ViewCustomAttributes = \"\";\n\n\t\t// KDPOLY\n\t\tif (strval($this->KDPOLY->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`kode`\" . ew_SearchString(\"=\", $this->KDPOLY->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `kode`, `nama` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `m_poly`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->KDPOLY->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->KDPOLY, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->KDPOLY->ViewValue = $this->KDPOLY->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->KDPOLY->ViewValue = $this->KDPOLY->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->KDPOLY->ViewValue = NULL;\n\t\t}\n\t\t$this->KDPOLY->ViewCustomAttributes = \"\";\n\n\t\t// KDRUJUK\n\t\tif (strval($this->KDRUJUK->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`KODE`\" . ew_SearchString(\"=\", $this->KDRUJUK->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `KODE`, `NAMA` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `m_rujukan`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->KDRUJUK->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->KDRUJUK, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->KDRUJUK->ViewValue = $this->KDRUJUK->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->KDRUJUK->ViewValue = $this->KDRUJUK->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->KDRUJUK->ViewValue = NULL;\n\t\t}\n\t\t$this->KDRUJUK->ViewCustomAttributes = \"\";\n\n\t\t// KDCARABAYAR\n\t\tif (strval($this->KDCARABAYAR->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`KODE`\" . ew_SearchString(\"=\", $this->KDCARABAYAR->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `KODE`, `NAMA` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `m_carabayar`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->KDCARABAYAR->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->KDCARABAYAR, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->KDCARABAYAR->ViewValue = $this->KDCARABAYAR->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->KDCARABAYAR->ViewValue = $this->KDCARABAYAR->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->KDCARABAYAR->ViewValue = NULL;\n\t\t}\n\t\t$this->KDCARABAYAR->ViewCustomAttributes = \"\";\n\n\t\t// SHIFT\n\t\tif (strval($this->SHIFT->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id_shift`\" . ew_SearchString(\"=\", $this->SHIFT->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id_shift`, `shift` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `l_shift`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->SHIFT->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->SHIFT, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->SHIFT->ViewValue = $this->SHIFT->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->SHIFT->ViewValue = $this->SHIFT->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->SHIFT->ViewValue = NULL;\n\t\t}\n\t\t$this->SHIFT->ViewCustomAttributes = \"\";\n\n\t\t// NIP\n\t\t$this->NIP->ViewValue = $this->NIP->CurrentValue;\n\t\t$this->NIP->ViewCustomAttributes = \"\";\n\n\t\t// KETRUJUK\n\t\t$this->KETRUJUK->ViewValue = $this->KETRUJUK->CurrentValue;\n\t\t$this->KETRUJUK->ViewCustomAttributes = \"\";\n\n\t\t// PENANGGUNGJAWAB_NAMA\n\t\t$this->PENANGGUNGJAWAB_NAMA->ViewValue = $this->PENANGGUNGJAWAB_NAMA->CurrentValue;\n\t\t$this->PENANGGUNGJAWAB_NAMA->ViewCustomAttributes = \"\";\n\n\t\t// PENANGGUNGJAWAB_HUBUNGAN\n\t\t$this->PENANGGUNGJAWAB_HUBUNGAN->ViewValue = $this->PENANGGUNGJAWAB_HUBUNGAN->CurrentValue;\n\t\t$this->PENANGGUNGJAWAB_HUBUNGAN->ViewCustomAttributes = \"\";\n\n\t\t// PENANGGUNGJAWAB_ALAMAT\n\t\t$this->PENANGGUNGJAWAB_ALAMAT->ViewValue = $this->PENANGGUNGJAWAB_ALAMAT->CurrentValue;\n\t\t$this->PENANGGUNGJAWAB_ALAMAT->ViewCustomAttributes = \"\";\n\n\t\t// PENANGGUNGJAWAB_PHONE\n\t\t$this->PENANGGUNGJAWAB_PHONE->ViewValue = $this->PENANGGUNGJAWAB_PHONE->CurrentValue;\n\t\t$this->PENANGGUNGJAWAB_PHONE->ViewCustomAttributes = \"\";\n\n\t\t// NOKARTU\n\t\t$this->NOKARTU->ViewValue = $this->NOKARTU->CurrentValue;\n\t\t$this->NOKARTU->ViewCustomAttributes = \"\";\n\n\t\t// MINTA_RUJUKAN\n\t\tif (strval($this->MINTA_RUJUKAN->CurrentValue) <> \"\") {\n\t\t\t$this->MINTA_RUJUKAN->ViewValue = \"\";\n\t\t\t$arwrk = explode(\",\", strval($this->MINTA_RUJUKAN->CurrentValue));\n\t\t\t$cnt = count($arwrk);\n\t\t\tfor ($ari = 0; $ari < $cnt; $ari++) {\n\t\t\t\t$this->MINTA_RUJUKAN->ViewValue .= $this->MINTA_RUJUKAN->OptionCaption(trim($arwrk[$ari]));\n\t\t\t\tif ($ari < $cnt-1) $this->MINTA_RUJUKAN->ViewValue .= ew_ViewOptionSeparator($ari);\n\t\t\t}\n\t\t} else {\n\t\t\t$this->MINTA_RUJUKAN->ViewValue = NULL;\n\t\t}\n\t\t$this->MINTA_RUJUKAN->ViewCustomAttributes = \"\";\n\n\t\t// pasien_TITLE\n\t\tif (strval($this->pasien_TITLE->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->pasien_TITLE->CurrentValue, EW_DATATYPE_STRING, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `title` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `l_titel`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->pasien_TITLE->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->pasien_TITLE, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->pasien_TITLE->ViewValue = $this->pasien_TITLE->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->pasien_TITLE->ViewValue = $this->pasien_TITLE->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->pasien_TITLE->ViewValue = NULL;\n\t\t}\n\t\t$this->pasien_TITLE->ViewCustomAttributes = \"\";\n\n\t\t// pasien_NAMA\n\t\t$this->pasien_NAMA->ViewValue = $this->pasien_NAMA->CurrentValue;\n\t\t$this->pasien_NAMA->ViewCustomAttributes = \"\";\n\n\t\t// pasien_TEMPAT\n\t\t$this->pasien_TEMPAT->ViewValue = $this->pasien_TEMPAT->CurrentValue;\n\t\t$this->pasien_TEMPAT->ViewCustomAttributes = \"\";\n\n\t\t// pasien_TGLLAHIR\n\t\t$this->pasien_TGLLAHIR->ViewValue = $this->pasien_TGLLAHIR->CurrentValue;\n\t\t$this->pasien_TGLLAHIR->ViewValue = ew_FormatDateTime($this->pasien_TGLLAHIR->ViewValue, 7);\n\t\t$this->pasien_TGLLAHIR->ViewCustomAttributes = \"\";\n\n\t\t// pasien_JENISKELAMIN\n\t\tif (strval($this->pasien_JENISKELAMIN->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->pasien_JENISKELAMIN->CurrentValue, EW_DATATYPE_STRING, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `jeniskelamin` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `l_jeniskelamin`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->pasien_JENISKELAMIN->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->pasien_JENISKELAMIN, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->pasien_JENISKELAMIN->ViewValue = $this->pasien_JENISKELAMIN->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->pasien_JENISKELAMIN->ViewValue = $this->pasien_JENISKELAMIN->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->pasien_JENISKELAMIN->ViewValue = NULL;\n\t\t}\n\t\t$this->pasien_JENISKELAMIN->ViewCustomAttributes = \"\";\n\n\t\t// pasien_ALAMAT\n\t\t$this->pasien_ALAMAT->ViewValue = $this->pasien_ALAMAT->CurrentValue;\n\t\t$this->pasien_ALAMAT->ViewCustomAttributes = \"\";\n\n\t\t// pasien_NOTELP\n\t\t$this->pasien_NOTELP->ViewValue = $this->pasien_NOTELP->CurrentValue;\n\t\t$this->pasien_NOTELP->ViewCustomAttributes = \"\";\n\n\t\t// pasien_NOKTP\n\t\t$this->pasien_NOKTP->ViewValue = $this->pasien_NOKTP->CurrentValue;\n\t\t$this->pasien_NOKTP->ViewCustomAttributes = \"\";\n\n\t\t// pasien_PEKERJAAN\n\t\t$this->pasien_PEKERJAAN->ViewValue = $this->pasien_PEKERJAAN->CurrentValue;\n\t\t$this->pasien_PEKERJAAN->ViewCustomAttributes = \"\";\n\n\t\t// pasien_AGAMA\n\t\tif (strval($this->pasien_AGAMA->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->pasien_AGAMA->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `agama` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `l_agama`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->pasien_AGAMA->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->pasien_AGAMA, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->pasien_AGAMA->ViewValue = $this->pasien_AGAMA->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->pasien_AGAMA->ViewValue = $this->pasien_AGAMA->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->pasien_AGAMA->ViewValue = NULL;\n\t\t}\n\t\t$this->pasien_AGAMA->ViewCustomAttributes = \"\";\n\n\t\t// pasien_PENDIDIKAN\n\t\tif (strval($this->pasien_PENDIDIKAN->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->pasien_PENDIDIKAN->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `pendidikan` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `l_pendidikanterakhir`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->pasien_PENDIDIKAN->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->pasien_PENDIDIKAN, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->pasien_PENDIDIKAN->ViewValue = $this->pasien_PENDIDIKAN->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->pasien_PENDIDIKAN->ViewValue = $this->pasien_PENDIDIKAN->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->pasien_PENDIDIKAN->ViewValue = NULL;\n\t\t}\n\t\t$this->pasien_PENDIDIKAN->ViewCustomAttributes = \"\";\n\n\t\t// pasien_ALAMAT_KTP\n\t\t$this->pasien_ALAMAT_KTP->ViewValue = $this->pasien_ALAMAT_KTP->CurrentValue;\n\t\t$this->pasien_ALAMAT_KTP->ViewCustomAttributes = \"\";\n\n\t\t// pasien_NO_KARTU\n\t\t$this->pasien_NO_KARTU->ViewValue = $this->pasien_NO_KARTU->CurrentValue;\n\t\t$this->pasien_NO_KARTU->ViewCustomAttributes = \"\";\n\n\t\t// pasien_JNS_PASIEN\n\t\tif (strval($this->pasien_JNS_PASIEN->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`jenis_pasien`\" . ew_SearchString(\"=\", $this->pasien_JNS_PASIEN->CurrentValue, EW_DATATYPE_STRING, \"\");\n\t\t$sSqlWrk = \"SELECT `jenis_pasien`, `nama_jenis` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `l_jenis_pasien`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->pasien_JNS_PASIEN->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->pasien_JNS_PASIEN, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->pasien_JNS_PASIEN->ViewValue = $this->pasien_JNS_PASIEN->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->pasien_JNS_PASIEN->ViewValue = $this->pasien_JNS_PASIEN->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->pasien_JNS_PASIEN->ViewValue = NULL;\n\t\t}\n\t\t$this->pasien_JNS_PASIEN->ViewCustomAttributes = \"\";\n\n\t\t// pasien_nama_ayah\n\t\t$this->pasien_nama_ayah->ViewValue = $this->pasien_nama_ayah->CurrentValue;\n\t\t$this->pasien_nama_ayah->ViewCustomAttributes = \"\";\n\n\t\t// pasien_nama_ibu\n\t\t$this->pasien_nama_ibu->ViewValue = $this->pasien_nama_ibu->CurrentValue;\n\t\t$this->pasien_nama_ibu->ViewCustomAttributes = \"\";\n\n\t\t// pasien_nama_suami\n\t\t$this->pasien_nama_suami->ViewValue = $this->pasien_nama_suami->CurrentValue;\n\t\t$this->pasien_nama_suami->ViewCustomAttributes = \"\";\n\n\t\t// pasien_nama_istri\n\t\t$this->pasien_nama_istri->ViewValue = $this->pasien_nama_istri->CurrentValue;\n\t\t$this->pasien_nama_istri->ViewCustomAttributes = \"\";\n\n\t\t// pasien_KD_ETNIS\n\t\tif (strval($this->pasien_KD_ETNIS->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->pasien_KD_ETNIS->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `nama_etnis` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `m_etnis`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->pasien_KD_ETNIS->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->pasien_KD_ETNIS, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->pasien_KD_ETNIS->ViewValue = $this->pasien_KD_ETNIS->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->pasien_KD_ETNIS->ViewValue = $this->pasien_KD_ETNIS->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->pasien_KD_ETNIS->ViewValue = NULL;\n\t\t}\n\t\t$this->pasien_KD_ETNIS->ViewCustomAttributes = \"\";\n\n\t\t// pasien_KD_BHS_HARIAN\n\t\tif (strval($this->pasien_KD_BHS_HARIAN->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->pasien_KD_BHS_HARIAN->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `id`, `bahasa_harian` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `m_bahasa_harian`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->pasien_KD_BHS_HARIAN->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->pasien_KD_BHS_HARIAN, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->pasien_KD_BHS_HARIAN->ViewValue = $this->pasien_KD_BHS_HARIAN->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->pasien_KD_BHS_HARIAN->ViewValue = $this->pasien_KD_BHS_HARIAN->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->pasien_KD_BHS_HARIAN->ViewValue = NULL;\n\t\t}\n\t\t$this->pasien_KD_BHS_HARIAN->ViewCustomAttributes = \"\";\n\n\t\t// peserta_cob\n\t\t$this->peserta_cob->ViewValue = $this->peserta_cob->CurrentValue;\n\t\t$this->peserta_cob->ViewCustomAttributes = \"\";\n\n\t\t// poli_eksekutif\n\t\t$this->poli_eksekutif->ViewValue = $this->poli_eksekutif->CurrentValue;\n\t\t$this->poli_eksekutif->ViewCustomAttributes = \"\";\n\n\t\t\t// PASIENBARU\n\t\t\t$this->PASIENBARU->LinkCustomAttributes = \"\";\n\t\t\t$this->PASIENBARU->HrefValue = \"\";\n\t\t\t$this->PASIENBARU->TooltipValue = \"\";\n\n\t\t\t// NOMR\n\t\t\t$this->NOMR->LinkCustomAttributes = \"\";\n\t\t\t$this->NOMR->HrefValue = \"\";\n\t\t\t$this->NOMR->TooltipValue = \"\";\n\n\t\t\t// TGLREG\n\t\t\t$this->TGLREG->LinkCustomAttributes = \"\";\n\t\t\t$this->TGLREG->HrefValue = \"\";\n\t\t\t$this->TGLREG->TooltipValue = \"\";\n\n\t\t\t// KDDOKTER\n\t\t\t$this->KDDOKTER->LinkCustomAttributes = \"\";\n\t\t\t$this->KDDOKTER->HrefValue = \"\";\n\t\t\t$this->KDDOKTER->TooltipValue = \"\";\n\n\t\t\t// KDPOLY\n\t\t\t$this->KDPOLY->LinkCustomAttributes = \"\";\n\t\t\t$this->KDPOLY->HrefValue = \"\";\n\t\t\t$this->KDPOLY->TooltipValue = \"\";\n\n\t\t\t// KDRUJUK\n\t\t\t$this->KDRUJUK->LinkCustomAttributes = \"\";\n\t\t\t$this->KDRUJUK->HrefValue = \"\";\n\t\t\t$this->KDRUJUK->TooltipValue = \"\";\n\n\t\t\t// KDCARABAYAR\n\t\t\t$this->KDCARABAYAR->LinkCustomAttributes = \"\";\n\t\t\t$this->KDCARABAYAR->HrefValue = \"\";\n\t\t\t$this->KDCARABAYAR->TooltipValue = \"\";\n\n\t\t\t// SHIFT\n\t\t\t$this->SHIFT->LinkCustomAttributes = \"\";\n\t\t\t$this->SHIFT->HrefValue = \"\";\n\t\t\t$this->SHIFT->TooltipValue = \"\";\n\n\t\t\t// NIP\n\t\t\t$this->NIP->LinkCustomAttributes = \"\";\n\t\t\t$this->NIP->HrefValue = \"\";\n\t\t\t$this->NIP->TooltipValue = \"\";\n\n\t\t\t// KETRUJUK\n\t\t\t$this->KETRUJUK->LinkCustomAttributes = \"\";\n\t\t\t$this->KETRUJUK->HrefValue = \"\";\n\t\t\t$this->KETRUJUK->TooltipValue = \"\";\n\n\t\t\t// PENANGGUNGJAWAB_NAMA\n\t\t\t$this->PENANGGUNGJAWAB_NAMA->LinkCustomAttributes = \"\";\n\t\t\t$this->PENANGGUNGJAWAB_NAMA->HrefValue = \"\";\n\t\t\t$this->PENANGGUNGJAWAB_NAMA->TooltipValue = \"\";\n\n\t\t\t// PENANGGUNGJAWAB_HUBUNGAN\n\t\t\t$this->PENANGGUNGJAWAB_HUBUNGAN->LinkCustomAttributes = \"\";\n\t\t\t$this->PENANGGUNGJAWAB_HUBUNGAN->HrefValue = \"\";\n\t\t\t$this->PENANGGUNGJAWAB_HUBUNGAN->TooltipValue = \"\";\n\n\t\t\t// PENANGGUNGJAWAB_ALAMAT\n\t\t\t$this->PENANGGUNGJAWAB_ALAMAT->LinkCustomAttributes = \"\";\n\t\t\t$this->PENANGGUNGJAWAB_ALAMAT->HrefValue = \"\";\n\t\t\t$this->PENANGGUNGJAWAB_ALAMAT->TooltipValue = \"\";\n\n\t\t\t// PENANGGUNGJAWAB_PHONE\n\t\t\t$this->PENANGGUNGJAWAB_PHONE->LinkCustomAttributes = \"\";\n\t\t\t$this->PENANGGUNGJAWAB_PHONE->HrefValue = \"\";\n\t\t\t$this->PENANGGUNGJAWAB_PHONE->TooltipValue = \"\";\n\n\t\t\t// NOKARTU\n\t\t\t$this->NOKARTU->LinkCustomAttributes = \"\";\n\t\t\t$this->NOKARTU->HrefValue = \"\";\n\t\t\t$this->NOKARTU->TooltipValue = \"\";\n\n\t\t\t// MINTA_RUJUKAN\n\t\t\t$this->MINTA_RUJUKAN->LinkCustomAttributes = \"\";\n\t\t\t$this->MINTA_RUJUKAN->HrefValue = \"\";\n\t\t\t$this->MINTA_RUJUKAN->TooltipValue = \"\";\n\n\t\t\t// pasien_TITLE\n\t\t\t$this->pasien_TITLE->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_TITLE->HrefValue = \"\";\n\t\t\t$this->pasien_TITLE->TooltipValue = \"\";\n\n\t\t\t// pasien_NAMA\n\t\t\t$this->pasien_NAMA->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_NAMA->HrefValue = \"\";\n\t\t\t$this->pasien_NAMA->TooltipValue = \"\";\n\n\t\t\t// pasien_TEMPAT\n\t\t\t$this->pasien_TEMPAT->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_TEMPAT->HrefValue = \"\";\n\t\t\t$this->pasien_TEMPAT->TooltipValue = \"\";\n\n\t\t\t// pasien_TGLLAHIR\n\t\t\t$this->pasien_TGLLAHIR->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_TGLLAHIR->HrefValue = \"\";\n\t\t\t$this->pasien_TGLLAHIR->TooltipValue = \"\";\n\n\t\t\t// pasien_JENISKELAMIN\n\t\t\t$this->pasien_JENISKELAMIN->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_JENISKELAMIN->HrefValue = \"\";\n\t\t\t$this->pasien_JENISKELAMIN->TooltipValue = \"\";\n\n\t\t\t// pasien_ALAMAT\n\t\t\t$this->pasien_ALAMAT->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_ALAMAT->HrefValue = \"\";\n\t\t\t$this->pasien_ALAMAT->TooltipValue = \"\";\n\n\t\t\t// pasien_NOTELP\n\t\t\t$this->pasien_NOTELP->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_NOTELP->HrefValue = \"\";\n\t\t\t$this->pasien_NOTELP->TooltipValue = \"\";\n\n\t\t\t// pasien_NOKTP\n\t\t\t$this->pasien_NOKTP->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_NOKTP->HrefValue = \"\";\n\t\t\t$this->pasien_NOKTP->TooltipValue = \"\";\n\n\t\t\t// pasien_PEKERJAAN\n\t\t\t$this->pasien_PEKERJAAN->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_PEKERJAAN->HrefValue = \"\";\n\t\t\t$this->pasien_PEKERJAAN->TooltipValue = \"\";\n\n\t\t\t// pasien_AGAMA\n\t\t\t$this->pasien_AGAMA->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_AGAMA->HrefValue = \"\";\n\t\t\t$this->pasien_AGAMA->TooltipValue = \"\";\n\n\t\t\t// pasien_PENDIDIKAN\n\t\t\t$this->pasien_PENDIDIKAN->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_PENDIDIKAN->HrefValue = \"\";\n\t\t\t$this->pasien_PENDIDIKAN->TooltipValue = \"\";\n\n\t\t\t// pasien_ALAMAT_KTP\n\t\t\t$this->pasien_ALAMAT_KTP->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_ALAMAT_KTP->HrefValue = \"\";\n\t\t\t$this->pasien_ALAMAT_KTP->TooltipValue = \"\";\n\n\t\t\t// pasien_NO_KARTU\n\t\t\t$this->pasien_NO_KARTU->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_NO_KARTU->HrefValue = \"\";\n\t\t\t$this->pasien_NO_KARTU->TooltipValue = \"\";\n\n\t\t\t// pasien_JNS_PASIEN\n\t\t\t$this->pasien_JNS_PASIEN->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_JNS_PASIEN->HrefValue = \"\";\n\t\t\t$this->pasien_JNS_PASIEN->TooltipValue = \"\";\n\n\t\t\t// pasien_nama_ayah\n\t\t\t$this->pasien_nama_ayah->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_nama_ayah->HrefValue = \"\";\n\t\t\t$this->pasien_nama_ayah->TooltipValue = \"\";\n\n\t\t\t// pasien_nama_ibu\n\t\t\t$this->pasien_nama_ibu->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_nama_ibu->HrefValue = \"\";\n\t\t\t$this->pasien_nama_ibu->TooltipValue = \"\";\n\n\t\t\t// pasien_nama_suami\n\t\t\t$this->pasien_nama_suami->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_nama_suami->HrefValue = \"\";\n\t\t\t$this->pasien_nama_suami->TooltipValue = \"\";\n\n\t\t\t// pasien_nama_istri\n\t\t\t$this->pasien_nama_istri->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_nama_istri->HrefValue = \"\";\n\t\t\t$this->pasien_nama_istri->TooltipValue = \"\";\n\n\t\t\t// pasien_KD_ETNIS\n\t\t\t$this->pasien_KD_ETNIS->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_KD_ETNIS->HrefValue = \"\";\n\t\t\t$this->pasien_KD_ETNIS->TooltipValue = \"\";\n\n\t\t\t// pasien_KD_BHS_HARIAN\n\t\t\t$this->pasien_KD_BHS_HARIAN->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_KD_BHS_HARIAN->HrefValue = \"\";\n\t\t\t$this->pasien_KD_BHS_HARIAN->TooltipValue = \"\";\n\t\t} elseif ($this->RowType == EW_ROWTYPE_ADD) { // Add row\n\n\t\t\t// PASIENBARU\n\t\t\t$this->PASIENBARU->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->PASIENBARU->EditCustomAttributes = \"\";\n\t\t\t$this->PASIENBARU->EditValue = $this->PASIENBARU->Options(TRUE);\n\n\t\t\t// NOMR\n\t\t\t$this->NOMR->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->NOMR->EditCustomAttributes = \"\";\n\t\t\t$this->NOMR->EditValue = ew_HtmlEncode($this->NOMR->CurrentValue);\n\t\t\t$this->NOMR->PlaceHolder = ew_RemoveHtml($this->NOMR->FldCaption());\n\n\t\t\t// TGLREG\n\t\t\t$this->TGLREG->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->TGLREG->EditCustomAttributes = \"\";\n\t\t\t$this->TGLREG->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->TGLREG->CurrentValue, 7));\n\t\t\t$this->TGLREG->PlaceHolder = ew_RemoveHtml($this->TGLREG->FldCaption());\n\n\t\t\t// KDDOKTER\n\t\t\t$this->KDDOKTER->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->KDDOKTER->EditCustomAttributes = \"\";\n\t\t\tif (trim(strval($this->KDDOKTER->CurrentValue)) == \"\") {\n\t\t\t\t$sFilterWrk = \"0=1\";\n\t\t\t} else {\n\t\t\t\t$sFilterWrk = \"`kddokter`\" . ew_SearchString(\"=\", $this->KDDOKTER->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t\t}\n\t\t\t$sSqlWrk = \"SELECT `kddokter`, `NAMADOKTER` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, `kdpoly` AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `vw_lookup_dokter_poli`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\t$this->KDDOKTER->LookupFilters = array();\n\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t$this->Lookup_Selecting($this->KDDOKTER, $sWhereWrk); // Call Lookup selecting\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\t$this->KDDOKTER->EditValue = $arwrk;\n\n\t\t\t// KDPOLY\n\t\t\t$this->KDPOLY->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->KDPOLY->EditCustomAttributes = \"\";\n\t\t\tif (trim(strval($this->KDPOLY->CurrentValue)) == \"\") {\n\t\t\t\t$sFilterWrk = \"0=1\";\n\t\t\t} else {\n\t\t\t\t$sFilterWrk = \"`kode`\" . ew_SearchString(\"=\", $this->KDPOLY->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t\t}\n\t\t\t$sSqlWrk = \"SELECT `kode`, `nama` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `m_poly`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\t$this->KDPOLY->LookupFilters = array();\n\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t$this->Lookup_Selecting($this->KDPOLY, $sWhereWrk); // Call Lookup selecting\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\t$this->KDPOLY->EditValue = $arwrk;\n\n\t\t\t// KDRUJUK\n\t\t\t$this->KDRUJUK->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->KDRUJUK->EditCustomAttributes = \"\";\n\t\t\tif (trim(strval($this->KDRUJUK->CurrentValue)) == \"\") {\n\t\t\t\t$sFilterWrk = \"0=1\";\n\t\t\t} else {\n\t\t\t\t$sFilterWrk = \"`KODE`\" . ew_SearchString(\"=\", $this->KDRUJUK->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t\t}\n\t\t\t$sSqlWrk = \"SELECT `KODE`, `NAMA` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `m_rujukan`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\t$this->KDRUJUK->LookupFilters = array();\n\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t$this->Lookup_Selecting($this->KDRUJUK, $sWhereWrk); // Call Lookup selecting\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\t$this->KDRUJUK->EditValue = $arwrk;\n\n\t\t\t// KDCARABAYAR\n\t\t\t$this->KDCARABAYAR->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->KDCARABAYAR->EditCustomAttributes = \"\";\n\t\t\tif (trim(strval($this->KDCARABAYAR->CurrentValue)) == \"\") {\n\t\t\t\t$sFilterWrk = \"0=1\";\n\t\t\t} else {\n\t\t\t\t$sFilterWrk = \"`KODE`\" . ew_SearchString(\"=\", $this->KDCARABAYAR->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t\t}\n\t\t\t$sSqlWrk = \"SELECT `KODE`, `NAMA` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `m_carabayar`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\t$this->KDCARABAYAR->LookupFilters = array();\n\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t$this->Lookup_Selecting($this->KDCARABAYAR, $sWhereWrk); // Call Lookup selecting\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\t$this->KDCARABAYAR->EditValue = $arwrk;\n\n\t\t\t// SHIFT\n\t\t\t$this->SHIFT->EditCustomAttributes = \"\";\n\t\t\tif (trim(strval($this->SHIFT->CurrentValue)) == \"\") {\n\t\t\t\t$sFilterWrk = \"0=1\";\n\t\t\t} else {\n\t\t\t\t$sFilterWrk = \"`id_shift`\" . ew_SearchString(\"=\", $this->SHIFT->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t\t}\n\t\t\t$sSqlWrk = \"SELECT `id_shift`, `shift` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `l_shift`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\t$this->SHIFT->LookupFilters = array();\n\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t$this->Lookup_Selecting($this->SHIFT, $sWhereWrk); // Call Lookup selecting\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\t$this->SHIFT->EditValue = $arwrk;\n\n\t\t\t// NIP\n\t\t\t$this->NIP->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->NIP->EditCustomAttributes = \"\";\n\t\t\t$this->NIP->EditValue = ew_HtmlEncode($this->NIP->CurrentValue);\n\t\t\t$this->NIP->PlaceHolder = ew_RemoveHtml($this->NIP->FldCaption());\n\n\t\t\t// KETRUJUK\n\t\t\t$this->KETRUJUK->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->KETRUJUK->EditCustomAttributes = \"\";\n\t\t\t$this->KETRUJUK->EditValue = ew_HtmlEncode($this->KETRUJUK->CurrentValue);\n\t\t\t$this->KETRUJUK->PlaceHolder = ew_RemoveHtml($this->KETRUJUK->FldCaption());\n\n\t\t\t// PENANGGUNGJAWAB_NAMA\n\t\t\t$this->PENANGGUNGJAWAB_NAMA->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->PENANGGUNGJAWAB_NAMA->EditCustomAttributes = \"\";\n\t\t\t$this->PENANGGUNGJAWAB_NAMA->EditValue = ew_HtmlEncode($this->PENANGGUNGJAWAB_NAMA->CurrentValue);\n\t\t\t$this->PENANGGUNGJAWAB_NAMA->PlaceHolder = ew_RemoveHtml($this->PENANGGUNGJAWAB_NAMA->FldCaption());\n\n\t\t\t// PENANGGUNGJAWAB_HUBUNGAN\n\t\t\t$this->PENANGGUNGJAWAB_HUBUNGAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->PENANGGUNGJAWAB_HUBUNGAN->EditCustomAttributes = \"\";\n\t\t\t$this->PENANGGUNGJAWAB_HUBUNGAN->EditValue = ew_HtmlEncode($this->PENANGGUNGJAWAB_HUBUNGAN->CurrentValue);\n\t\t\t$this->PENANGGUNGJAWAB_HUBUNGAN->PlaceHolder = ew_RemoveHtml($this->PENANGGUNGJAWAB_HUBUNGAN->FldCaption());\n\n\t\t\t// PENANGGUNGJAWAB_ALAMAT\n\t\t\t$this->PENANGGUNGJAWAB_ALAMAT->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->PENANGGUNGJAWAB_ALAMAT->EditCustomAttributes = \"\";\n\t\t\t$this->PENANGGUNGJAWAB_ALAMAT->EditValue = ew_HtmlEncode($this->PENANGGUNGJAWAB_ALAMAT->CurrentValue);\n\t\t\t$this->PENANGGUNGJAWAB_ALAMAT->PlaceHolder = ew_RemoveHtml($this->PENANGGUNGJAWAB_ALAMAT->FldCaption());\n\n\t\t\t// PENANGGUNGJAWAB_PHONE\n\t\t\t$this->PENANGGUNGJAWAB_PHONE->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->PENANGGUNGJAWAB_PHONE->EditCustomAttributes = \"\";\n\t\t\t$this->PENANGGUNGJAWAB_PHONE->EditValue = ew_HtmlEncode($this->PENANGGUNGJAWAB_PHONE->CurrentValue);\n\t\t\t$this->PENANGGUNGJAWAB_PHONE->PlaceHolder = ew_RemoveHtml($this->PENANGGUNGJAWAB_PHONE->FldCaption());\n\n\t\t\t// NOKARTU\n\t\t\t$this->NOKARTU->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->NOKARTU->EditCustomAttributes = \"\";\n\t\t\t$this->NOKARTU->EditValue = ew_HtmlEncode($this->NOKARTU->CurrentValue);\n\t\t\t$this->NOKARTU->PlaceHolder = ew_RemoveHtml($this->NOKARTU->FldCaption());\n\n\t\t\t// MINTA_RUJUKAN\n\t\t\t$this->MINTA_RUJUKAN->EditCustomAttributes = \"\";\n\t\t\t$this->MINTA_RUJUKAN->EditValue = $this->MINTA_RUJUKAN->Options(FALSE);\n\n\t\t\t// pasien_TITLE\n\t\t\t$this->pasien_TITLE->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->pasien_TITLE->EditCustomAttributes = \"\";\n\t\t\tif (trim(strval($this->pasien_TITLE->CurrentValue)) == \"\") {\n\t\t\t\t$sFilterWrk = \"0=1\";\n\t\t\t} else {\n\t\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->pasien_TITLE->CurrentValue, EW_DATATYPE_STRING, \"\");\n\t\t\t}\n\t\t\t$sSqlWrk = \"SELECT `id`, `title` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `l_titel`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\t$this->pasien_TITLE->LookupFilters = array();\n\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t$this->Lookup_Selecting($this->pasien_TITLE, $sWhereWrk); // Call Lookup selecting\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\t$this->pasien_TITLE->EditValue = $arwrk;\n\n\t\t\t// pasien_NAMA\n\t\t\t$this->pasien_NAMA->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->pasien_NAMA->EditCustomAttributes = \"\";\n\t\t\t$this->pasien_NAMA->EditValue = ew_HtmlEncode($this->pasien_NAMA->CurrentValue);\n\t\t\t$this->pasien_NAMA->PlaceHolder = ew_RemoveHtml($this->pasien_NAMA->FldCaption());\n\n\t\t\t// pasien_TEMPAT\n\t\t\t$this->pasien_TEMPAT->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->pasien_TEMPAT->EditCustomAttributes = \"\";\n\t\t\t$this->pasien_TEMPAT->EditValue = ew_HtmlEncode($this->pasien_TEMPAT->CurrentValue);\n\t\t\t$this->pasien_TEMPAT->PlaceHolder = ew_RemoveHtml($this->pasien_TEMPAT->FldCaption());\n\n\t\t\t// pasien_TGLLAHIR\n\t\t\t$this->pasien_TGLLAHIR->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->pasien_TGLLAHIR->EditCustomAttributes = \"\";\n\t\t\t$this->pasien_TGLLAHIR->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->pasien_TGLLAHIR->CurrentValue, 7));\n\t\t\t$this->pasien_TGLLAHIR->PlaceHolder = ew_RemoveHtml($this->pasien_TGLLAHIR->FldCaption());\n\n\t\t\t// pasien_JENISKELAMIN\n\t\t\t$this->pasien_JENISKELAMIN->EditCustomAttributes = \"\";\n\t\t\tif (trim(strval($this->pasien_JENISKELAMIN->CurrentValue)) == \"\") {\n\t\t\t\t$sFilterWrk = \"0=1\";\n\t\t\t} else {\n\t\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->pasien_JENISKELAMIN->CurrentValue, EW_DATATYPE_STRING, \"\");\n\t\t\t}\n\t\t\t$sSqlWrk = \"SELECT `id`, `jeniskelamin` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `l_jeniskelamin`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\t$this->pasien_JENISKELAMIN->LookupFilters = array();\n\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t$this->Lookup_Selecting($this->pasien_JENISKELAMIN, $sWhereWrk); // Call Lookup selecting\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\t$this->pasien_JENISKELAMIN->EditValue = $arwrk;\n\n\t\t\t// pasien_ALAMAT\n\t\t\t$this->pasien_ALAMAT->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->pasien_ALAMAT->EditCustomAttributes = \"\";\n\t\t\t$this->pasien_ALAMAT->EditValue = ew_HtmlEncode($this->pasien_ALAMAT->CurrentValue);\n\t\t\t$this->pasien_ALAMAT->PlaceHolder = ew_RemoveHtml($this->pasien_ALAMAT->FldCaption());\n\n\t\t\t// pasien_NOTELP\n\t\t\t$this->pasien_NOTELP->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->pasien_NOTELP->EditCustomAttributes = \"\";\n\t\t\t$this->pasien_NOTELP->EditValue = ew_HtmlEncode($this->pasien_NOTELP->CurrentValue);\n\t\t\t$this->pasien_NOTELP->PlaceHolder = ew_RemoveHtml($this->pasien_NOTELP->FldCaption());\n\n\t\t\t// pasien_NOKTP\n\t\t\t$this->pasien_NOKTP->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->pasien_NOKTP->EditCustomAttributes = \"\";\n\t\t\t$this->pasien_NOKTP->EditValue = ew_HtmlEncode($this->pasien_NOKTP->CurrentValue);\n\t\t\t$this->pasien_NOKTP->PlaceHolder = ew_RemoveHtml($this->pasien_NOKTP->FldCaption());\n\n\t\t\t// pasien_PEKERJAAN\n\t\t\t$this->pasien_PEKERJAAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->pasien_PEKERJAAN->EditCustomAttributes = \"\";\n\t\t\t$this->pasien_PEKERJAAN->EditValue = ew_HtmlEncode($this->pasien_PEKERJAAN->CurrentValue);\n\t\t\t$this->pasien_PEKERJAAN->PlaceHolder = ew_RemoveHtml($this->pasien_PEKERJAAN->FldCaption());\n\n\t\t\t// pasien_AGAMA\n\t\t\t$this->pasien_AGAMA->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->pasien_AGAMA->EditCustomAttributes = \"\";\n\t\t\tif (trim(strval($this->pasien_AGAMA->CurrentValue)) == \"\") {\n\t\t\t\t$sFilterWrk = \"0=1\";\n\t\t\t} else {\n\t\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->pasien_AGAMA->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t\t}\n\t\t\t$sSqlWrk = \"SELECT `id`, `agama` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `l_agama`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\t$this->pasien_AGAMA->LookupFilters = array();\n\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t$this->Lookup_Selecting($this->pasien_AGAMA, $sWhereWrk); // Call Lookup selecting\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\t$this->pasien_AGAMA->EditValue = $arwrk;\n\n\t\t\t// pasien_PENDIDIKAN\n\t\t\t$this->pasien_PENDIDIKAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->pasien_PENDIDIKAN->EditCustomAttributes = \"\";\n\t\t\tif (trim(strval($this->pasien_PENDIDIKAN->CurrentValue)) == \"\") {\n\t\t\t\t$sFilterWrk = \"0=1\";\n\t\t\t} else {\n\t\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->pasien_PENDIDIKAN->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t\t}\n\t\t\t$sSqlWrk = \"SELECT `id`, `pendidikan` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `l_pendidikanterakhir`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\t$this->pasien_PENDIDIKAN->LookupFilters = array();\n\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t$this->Lookup_Selecting($this->pasien_PENDIDIKAN, $sWhereWrk); // Call Lookup selecting\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\t$this->pasien_PENDIDIKAN->EditValue = $arwrk;\n\n\t\t\t// pasien_ALAMAT_KTP\n\t\t\t$this->pasien_ALAMAT_KTP->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->pasien_ALAMAT_KTP->EditCustomAttributes = \"\";\n\t\t\t$this->pasien_ALAMAT_KTP->EditValue = ew_HtmlEncode($this->pasien_ALAMAT_KTP->CurrentValue);\n\t\t\t$this->pasien_ALAMAT_KTP->PlaceHolder = ew_RemoveHtml($this->pasien_ALAMAT_KTP->FldCaption());\n\n\t\t\t// pasien_NO_KARTU\n\t\t\t$this->pasien_NO_KARTU->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->pasien_NO_KARTU->EditCustomAttributes = \"\";\n\t\t\t$this->pasien_NO_KARTU->EditValue = ew_HtmlEncode($this->pasien_NO_KARTU->CurrentValue);\n\t\t\t$this->pasien_NO_KARTU->PlaceHolder = ew_RemoveHtml($this->pasien_NO_KARTU->FldCaption());\n\n\t\t\t// pasien_JNS_PASIEN\n\t\t\t$this->pasien_JNS_PASIEN->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->pasien_JNS_PASIEN->EditCustomAttributes = \"\";\n\t\t\tif (trim(strval($this->pasien_JNS_PASIEN->CurrentValue)) == \"\") {\n\t\t\t\t$sFilterWrk = \"0=1\";\n\t\t\t} else {\n\t\t\t\t$sFilterWrk = \"`jenis_pasien`\" . ew_SearchString(\"=\", $this->pasien_JNS_PASIEN->CurrentValue, EW_DATATYPE_STRING, \"\");\n\t\t\t}\n\t\t\t$sSqlWrk = \"SELECT `jenis_pasien`, `nama_jenis` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `l_jenis_pasien`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\t$this->pasien_JNS_PASIEN->LookupFilters = array();\n\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t$this->Lookup_Selecting($this->pasien_JNS_PASIEN, $sWhereWrk); // Call Lookup selecting\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\t$this->pasien_JNS_PASIEN->EditValue = $arwrk;\n\n\t\t\t// pasien_nama_ayah\n\t\t\t$this->pasien_nama_ayah->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->pasien_nama_ayah->EditCustomAttributes = \"\";\n\t\t\t$this->pasien_nama_ayah->EditValue = ew_HtmlEncode($this->pasien_nama_ayah->CurrentValue);\n\t\t\t$this->pasien_nama_ayah->PlaceHolder = ew_RemoveHtml($this->pasien_nama_ayah->FldCaption());\n\n\t\t\t// pasien_nama_ibu\n\t\t\t$this->pasien_nama_ibu->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->pasien_nama_ibu->EditCustomAttributes = \"\";\n\t\t\t$this->pasien_nama_ibu->EditValue = ew_HtmlEncode($this->pasien_nama_ibu->CurrentValue);\n\t\t\t$this->pasien_nama_ibu->PlaceHolder = ew_RemoveHtml($this->pasien_nama_ibu->FldCaption());\n\n\t\t\t// pasien_nama_suami\n\t\t\t$this->pasien_nama_suami->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->pasien_nama_suami->EditCustomAttributes = \"\";\n\t\t\t$this->pasien_nama_suami->EditValue = ew_HtmlEncode($this->pasien_nama_suami->CurrentValue);\n\t\t\t$this->pasien_nama_suami->PlaceHolder = ew_RemoveHtml($this->pasien_nama_suami->FldCaption());\n\n\t\t\t// pasien_nama_istri\n\t\t\t$this->pasien_nama_istri->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->pasien_nama_istri->EditCustomAttributes = \"\";\n\t\t\t$this->pasien_nama_istri->EditValue = ew_HtmlEncode($this->pasien_nama_istri->CurrentValue);\n\t\t\t$this->pasien_nama_istri->PlaceHolder = ew_RemoveHtml($this->pasien_nama_istri->FldCaption());\n\n\t\t\t// pasien_KD_ETNIS\n\t\t\t$this->pasien_KD_ETNIS->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->pasien_KD_ETNIS->EditCustomAttributes = \"\";\n\t\t\tif (trim(strval($this->pasien_KD_ETNIS->CurrentValue)) == \"\") {\n\t\t\t\t$sFilterWrk = \"0=1\";\n\t\t\t} else {\n\t\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->pasien_KD_ETNIS->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t\t}\n\t\t\t$sSqlWrk = \"SELECT `id`, `nama_etnis` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `m_etnis`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\t$this->pasien_KD_ETNIS->LookupFilters = array();\n\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t$this->Lookup_Selecting($this->pasien_KD_ETNIS, $sWhereWrk); // Call Lookup selecting\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\t$this->pasien_KD_ETNIS->EditValue = $arwrk;\n\n\t\t\t// pasien_KD_BHS_HARIAN\n\t\t\t$this->pasien_KD_BHS_HARIAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->pasien_KD_BHS_HARIAN->EditCustomAttributes = \"\";\n\t\t\tif (trim(strval($this->pasien_KD_BHS_HARIAN->CurrentValue)) == \"\") {\n\t\t\t\t$sFilterWrk = \"0=1\";\n\t\t\t} else {\n\t\t\t\t$sFilterWrk = \"`id`\" . ew_SearchString(\"=\", $this->pasien_KD_BHS_HARIAN->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t\t}\n\t\t\t$sSqlWrk = \"SELECT `id`, `bahasa_harian` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `m_bahasa_harian`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\t$this->pasien_KD_BHS_HARIAN->LookupFilters = array();\n\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t$this->Lookup_Selecting($this->pasien_KD_BHS_HARIAN, $sWhereWrk); // Call Lookup selecting\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\t$this->pasien_KD_BHS_HARIAN->EditValue = $arwrk;\n\n\t\t\t// Add refer script\n\t\t\t// PASIENBARU\n\n\t\t\t$this->PASIENBARU->LinkCustomAttributes = \"\";\n\t\t\t$this->PASIENBARU->HrefValue = \"\";\n\n\t\t\t// NOMR\n\t\t\t$this->NOMR->LinkCustomAttributes = \"\";\n\t\t\t$this->NOMR->HrefValue = \"\";\n\n\t\t\t// TGLREG\n\t\t\t$this->TGLREG->LinkCustomAttributes = \"\";\n\t\t\t$this->TGLREG->HrefValue = \"\";\n\n\t\t\t// KDDOKTER\n\t\t\t$this->KDDOKTER->LinkCustomAttributes = \"\";\n\t\t\t$this->KDDOKTER->HrefValue = \"\";\n\n\t\t\t// KDPOLY\n\t\t\t$this->KDPOLY->LinkCustomAttributes = \"\";\n\t\t\t$this->KDPOLY->HrefValue = \"\";\n\n\t\t\t// KDRUJUK\n\t\t\t$this->KDRUJUK->LinkCustomAttributes = \"\";\n\t\t\t$this->KDRUJUK->HrefValue = \"\";\n\n\t\t\t// KDCARABAYAR\n\t\t\t$this->KDCARABAYAR->LinkCustomAttributes = \"\";\n\t\t\t$this->KDCARABAYAR->HrefValue = \"\";\n\n\t\t\t// SHIFT\n\t\t\t$this->SHIFT->LinkCustomAttributes = \"\";\n\t\t\t$this->SHIFT->HrefValue = \"\";\n\n\t\t\t// NIP\n\t\t\t$this->NIP->LinkCustomAttributes = \"\";\n\t\t\t$this->NIP->HrefValue = \"\";\n\n\t\t\t// KETRUJUK\n\t\t\t$this->KETRUJUK->LinkCustomAttributes = \"\";\n\t\t\t$this->KETRUJUK->HrefValue = \"\";\n\n\t\t\t// PENANGGUNGJAWAB_NAMA\n\t\t\t$this->PENANGGUNGJAWAB_NAMA->LinkCustomAttributes = \"\";\n\t\t\t$this->PENANGGUNGJAWAB_NAMA->HrefValue = \"\";\n\n\t\t\t// PENANGGUNGJAWAB_HUBUNGAN\n\t\t\t$this->PENANGGUNGJAWAB_HUBUNGAN->LinkCustomAttributes = \"\";\n\t\t\t$this->PENANGGUNGJAWAB_HUBUNGAN->HrefValue = \"\";\n\n\t\t\t// PENANGGUNGJAWAB_ALAMAT\n\t\t\t$this->PENANGGUNGJAWAB_ALAMAT->LinkCustomAttributes = \"\";\n\t\t\t$this->PENANGGUNGJAWAB_ALAMAT->HrefValue = \"\";\n\n\t\t\t// PENANGGUNGJAWAB_PHONE\n\t\t\t$this->PENANGGUNGJAWAB_PHONE->LinkCustomAttributes = \"\";\n\t\t\t$this->PENANGGUNGJAWAB_PHONE->HrefValue = \"\";\n\n\t\t\t// NOKARTU\n\t\t\t$this->NOKARTU->LinkCustomAttributes = \"\";\n\t\t\t$this->NOKARTU->HrefValue = \"\";\n\n\t\t\t// MINTA_RUJUKAN\n\t\t\t$this->MINTA_RUJUKAN->LinkCustomAttributes = \"\";\n\t\t\t$this->MINTA_RUJUKAN->HrefValue = \"\";\n\n\t\t\t// pasien_TITLE\n\t\t\t$this->pasien_TITLE->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_TITLE->HrefValue = \"\";\n\n\t\t\t// pasien_NAMA\n\t\t\t$this->pasien_NAMA->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_NAMA->HrefValue = \"\";\n\n\t\t\t// pasien_TEMPAT\n\t\t\t$this->pasien_TEMPAT->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_TEMPAT->HrefValue = \"\";\n\n\t\t\t// pasien_TGLLAHIR\n\t\t\t$this->pasien_TGLLAHIR->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_TGLLAHIR->HrefValue = \"\";\n\n\t\t\t// pasien_JENISKELAMIN\n\t\t\t$this->pasien_JENISKELAMIN->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_JENISKELAMIN->HrefValue = \"\";\n\n\t\t\t// pasien_ALAMAT\n\t\t\t$this->pasien_ALAMAT->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_ALAMAT->HrefValue = \"\";\n\n\t\t\t// pasien_NOTELP\n\t\t\t$this->pasien_NOTELP->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_NOTELP->HrefValue = \"\";\n\n\t\t\t// pasien_NOKTP\n\t\t\t$this->pasien_NOKTP->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_NOKTP->HrefValue = \"\";\n\n\t\t\t// pasien_PEKERJAAN\n\t\t\t$this->pasien_PEKERJAAN->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_PEKERJAAN->HrefValue = \"\";\n\n\t\t\t// pasien_AGAMA\n\t\t\t$this->pasien_AGAMA->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_AGAMA->HrefValue = \"\";\n\n\t\t\t// pasien_PENDIDIKAN\n\t\t\t$this->pasien_PENDIDIKAN->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_PENDIDIKAN->HrefValue = \"\";\n\n\t\t\t// pasien_ALAMAT_KTP\n\t\t\t$this->pasien_ALAMAT_KTP->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_ALAMAT_KTP->HrefValue = \"\";\n\n\t\t\t// pasien_NO_KARTU\n\t\t\t$this->pasien_NO_KARTU->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_NO_KARTU->HrefValue = \"\";\n\n\t\t\t// pasien_JNS_PASIEN\n\t\t\t$this->pasien_JNS_PASIEN->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_JNS_PASIEN->HrefValue = \"\";\n\n\t\t\t// pasien_nama_ayah\n\t\t\t$this->pasien_nama_ayah->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_nama_ayah->HrefValue = \"\";\n\n\t\t\t// pasien_nama_ibu\n\t\t\t$this->pasien_nama_ibu->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_nama_ibu->HrefValue = \"\";\n\n\t\t\t// pasien_nama_suami\n\t\t\t$this->pasien_nama_suami->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_nama_suami->HrefValue = \"\";\n\n\t\t\t// pasien_nama_istri\n\t\t\t$this->pasien_nama_istri->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_nama_istri->HrefValue = \"\";\n\n\t\t\t// pasien_KD_ETNIS\n\t\t\t$this->pasien_KD_ETNIS->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_KD_ETNIS->HrefValue = \"\";\n\n\t\t\t// pasien_KD_BHS_HARIAN\n\t\t\t$this->pasien_KD_BHS_HARIAN->LinkCustomAttributes = \"\";\n\t\t\t$this->pasien_KD_BHS_HARIAN->HrefValue = \"\";\n\t\t}\n\t\tif ($this->RowType == EW_ROWTYPE_ADD ||\n\t\t\t$this->RowType == EW_ROWTYPE_EDIT ||\n\t\t\t$this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row\n\t\t\t$this->SetupFieldTitles();\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "title": "" }, { "docid": "a29e32adcb5dbd6b02f71c2efaf4afad", "score": "0.5358402", "text": "function RenderRow() {\n\t\tglobal $Security, $Language, $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t// Call Row_Rendering event\n\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// IDXDAFTAR\n\t\t// TGLREG\n\t\t// NOMR\n\t\t// KETERANGAN\n\t\t// NOKARTU_BPJS\n\t\t// NOKTP\n\t\t// KDDOKTER\n\t\t// KDPOLY\n\t\t// KDRUJUK\n\t\t// KDCARABAYAR\n\t\t// NOJAMINAN\n\t\t// SHIFT\n\t\t// STATUS\n\t\t// KETERANGAN_STATUS\n\t\t// PASIENBARU\n\t\t// NIP\n\t\t// MASUKPOLY\n\t\t// KELUARPOLY\n\t\t// KETRUJUK\n\t\t// KETBAYAR\n\t\t// PENANGGUNGJAWAB_NAMA\n\t\t// PENANGGUNGJAWAB_HUBUNGAN\n\t\t// PENANGGUNGJAWAB_ALAMAT\n\t\t// PENANGGUNGJAWAB_PHONE\n\t\t// JAMREG\n\t\t// BATAL\n\t\t// NO_SJP\n\t\t// NO_PESERTA\n\t\t// NOKARTU\n\t\t// TANGGAL_SEP\n\t\t// TANGGALRUJUK_SEP\n\t\t// KELASRAWAT_SEP\n\t\t// MINTA_RUJUKAN\n\t\t// NORUJUKAN_SEP\n\t\t// PPKRUJUKANASAL_SEP\n\t\t// NAMAPPKRUJUKANASAL_SEP\n\t\t// PPKPELAYANAN_SEP\n\t\t// JENISPERAWATAN_SEP\n\t\t// CATATAN_SEP\n\t\t// DIAGNOSAAWAL_SEP\n\t\t// NAMADIAGNOSA_SEP\n\t\t// LAKALANTAS_SEP\n\t\t// LOKASILAKALANTAS\n\t\t// USER\n\t\t// tanggal\n\t\t// bulan\n\t\t// tahun\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t// IDXDAFTAR\n\t\t$this->IDXDAFTAR->ViewValue = $this->IDXDAFTAR->CurrentValue;\n\t\t$this->IDXDAFTAR->ViewCustomAttributes = \"\";\n\n\t\t// TGLREG\n\t\t$this->TGLREG->ViewValue = $this->TGLREG->CurrentValue;\n\t\t$this->TGLREG->ViewValue = ew_FormatDateTime($this->TGLREG->ViewValue, 0);\n\t\t$this->TGLREG->ViewCustomAttributes = \"\";\n\n\t\t// NOMR\n\t\t$this->NOMR->ViewValue = $this->NOMR->CurrentValue;\n\t\tif (strval($this->NOMR->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`NOMR`\" . ew_SearchString(\"=\", $this->NOMR->CurrentValue, EW_DATATYPE_STRING, \"\");\n\t\t$sSqlWrk = \"SELECT `NOMR`, `NOMR` AS `DispFld`, `NAMA` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `m_pasien`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->NOMR->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->NOMR, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$arwrk[2] = $rswrk->fields('Disp2Fld');\n\t\t\t\t$this->NOMR->ViewValue = $this->NOMR->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->NOMR->ViewValue = $this->NOMR->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->NOMR->ViewValue = NULL;\n\t\t}\n\t\t$this->NOMR->ViewCustomAttributes = \"\";\n\n\t\t// KETERANGAN\n\t\t$this->KETERANGAN->ViewValue = $this->KETERANGAN->CurrentValue;\n\t\t$this->KETERANGAN->ViewCustomAttributes = \"\";\n\n\t\t// NOKARTU_BPJS\n\t\t$this->NOKARTU_BPJS->ViewValue = $this->NOKARTU_BPJS->CurrentValue;\n\t\t$this->NOKARTU_BPJS->ViewCustomAttributes = \"\";\n\n\t\t// NOKTP\n\t\t$this->NOKTP->ViewValue = $this->NOKTP->CurrentValue;\n\t\t$this->NOKTP->ViewCustomAttributes = \"\";\n\n\t\t// KDDOKTER\n\t\t$this->KDDOKTER->ViewValue = $this->KDDOKTER->CurrentValue;\n\t\tif (strval($this->KDDOKTER->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`KDDOKTER`\" . ew_SearchString(\"=\", $this->KDDOKTER->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `KDDOKTER`, `NAMADOKTER` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `m_dokter`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->KDDOKTER->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->KDDOKTER, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->KDDOKTER->ViewValue = $this->KDDOKTER->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->KDDOKTER->ViewValue = $this->KDDOKTER->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->KDDOKTER->ViewValue = NULL;\n\t\t}\n\t\t$this->KDDOKTER->ViewCustomAttributes = \"\";\n\n\t\t// KDPOLY\n\t\tif (strval($this->KDPOLY->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`kode`\" . ew_SearchString(\"=\", $this->KDPOLY->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `kode`, `nama` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `m_poly`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->KDPOLY->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->KDPOLY, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->KDPOLY->ViewValue = $this->KDPOLY->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->KDPOLY->ViewValue = $this->KDPOLY->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->KDPOLY->ViewValue = NULL;\n\t\t}\n\t\t$this->KDPOLY->ViewCustomAttributes = \"\";\n\n\t\t// KDRUJUK\n\t\t$this->KDRUJUK->ViewValue = $this->KDRUJUK->CurrentValue;\n\t\tif (strval($this->KDRUJUK->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`KODE`\" . ew_SearchString(\"=\", $this->KDRUJUK->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `KODE`, `NAMA` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `m_rujukan`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->KDRUJUK->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->KDRUJUK, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->KDRUJUK->ViewValue = $this->KDRUJUK->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->KDRUJUK->ViewValue = $this->KDRUJUK->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->KDRUJUK->ViewValue = NULL;\n\t\t}\n\t\t$this->KDRUJUK->ViewCustomAttributes = \"\";\n\n\t\t// KDCARABAYAR\n\t\t$this->KDCARABAYAR->ViewValue = $this->KDCARABAYAR->CurrentValue;\n\t\tif (strval($this->KDCARABAYAR->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`KODE`\" . ew_SearchString(\"=\", $this->KDCARABAYAR->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `KODE`, `NAMA` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `m_carabayar`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->KDCARABAYAR->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->KDCARABAYAR, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->KDCARABAYAR->ViewValue = $this->KDCARABAYAR->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->KDCARABAYAR->ViewValue = $this->KDCARABAYAR->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->KDCARABAYAR->ViewValue = NULL;\n\t\t}\n\t\t$this->KDCARABAYAR->ViewCustomAttributes = \"\";\n\n\t\t// NOJAMINAN\n\t\t$this->NOJAMINAN->ViewValue = $this->NOJAMINAN->CurrentValue;\n\t\t$this->NOJAMINAN->ViewCustomAttributes = \"\";\n\n\t\t// SHIFT\n\t\t$this->SHIFT->ViewValue = $this->SHIFT->CurrentValue;\n\t\t$this->SHIFT->ViewCustomAttributes = \"\";\n\n\t\t// STATUS\n\t\t$this->STATUS->ViewValue = $this->STATUS->CurrentValue;\n\t\t$this->STATUS->ViewCustomAttributes = \"\";\n\n\t\t// KETERANGAN_STATUS\n\t\t$this->KETERANGAN_STATUS->ViewValue = $this->KETERANGAN_STATUS->CurrentValue;\n\t\t$this->KETERANGAN_STATUS->ViewCustomAttributes = \"\";\n\n\t\t// PASIENBARU\n\t\t$this->PASIENBARU->ViewValue = $this->PASIENBARU->CurrentValue;\n\t\t$this->PASIENBARU->ViewCustomAttributes = \"\";\n\n\t\t// NIP\n\t\t$this->NIP->ViewValue = $this->NIP->CurrentValue;\n\t\t$this->NIP->ViewCustomAttributes = \"\";\n\n\t\t// MASUKPOLY\n\t\t$this->MASUKPOLY->ViewValue = $this->MASUKPOLY->CurrentValue;\n\t\t$this->MASUKPOLY->ViewValue = ew_FormatDateTime($this->MASUKPOLY->ViewValue, 4);\n\t\t$this->MASUKPOLY->ViewCustomAttributes = \"\";\n\n\t\t// KELUARPOLY\n\t\t$this->KELUARPOLY->ViewValue = $this->KELUARPOLY->CurrentValue;\n\t\t$this->KELUARPOLY->ViewValue = ew_FormatDateTime($this->KELUARPOLY->ViewValue, 4);\n\t\t$this->KELUARPOLY->ViewCustomAttributes = \"\";\n\n\t\t// KETRUJUK\n\t\t$this->KETRUJUK->ViewValue = $this->KETRUJUK->CurrentValue;\n\t\t$this->KETRUJUK->ViewCustomAttributes = \"\";\n\n\t\t// KETBAYAR\n\t\t$this->KETBAYAR->ViewValue = $this->KETBAYAR->CurrentValue;\n\t\t$this->KETBAYAR->ViewCustomAttributes = \"\";\n\n\t\t// PENANGGUNGJAWAB_NAMA\n\t\t$this->PENANGGUNGJAWAB_NAMA->ViewValue = $this->PENANGGUNGJAWAB_NAMA->CurrentValue;\n\t\t$this->PENANGGUNGJAWAB_NAMA->ViewCustomAttributes = \"\";\n\n\t\t// PENANGGUNGJAWAB_HUBUNGAN\n\t\t$this->PENANGGUNGJAWAB_HUBUNGAN->ViewValue = $this->PENANGGUNGJAWAB_HUBUNGAN->CurrentValue;\n\t\t$this->PENANGGUNGJAWAB_HUBUNGAN->ViewCustomAttributes = \"\";\n\n\t\t// PENANGGUNGJAWAB_ALAMAT\n\t\t$this->PENANGGUNGJAWAB_ALAMAT->ViewValue = $this->PENANGGUNGJAWAB_ALAMAT->CurrentValue;\n\t\t$this->PENANGGUNGJAWAB_ALAMAT->ViewCustomAttributes = \"\";\n\n\t\t// PENANGGUNGJAWAB_PHONE\n\t\t$this->PENANGGUNGJAWAB_PHONE->ViewValue = $this->PENANGGUNGJAWAB_PHONE->CurrentValue;\n\t\t$this->PENANGGUNGJAWAB_PHONE->ViewCustomAttributes = \"\";\n\n\t\t// JAMREG\n\t\t$this->JAMREG->ViewValue = $this->JAMREG->CurrentValue;\n\t\t$this->JAMREG->ViewValue = ew_FormatDateTime($this->JAMREG->ViewValue, 0);\n\t\t$this->JAMREG->ViewCustomAttributes = \"\";\n\n\t\t// BATAL\n\t\t$this->BATAL->ViewValue = $this->BATAL->CurrentValue;\n\t\t$this->BATAL->ViewCustomAttributes = \"\";\n\n\t\t// NO_SJP\n\t\t$this->NO_SJP->ViewValue = $this->NO_SJP->CurrentValue;\n\t\t$this->NO_SJP->ViewCustomAttributes = \"\";\n\n\t\t// NO_PESERTA\n\t\t$this->NO_PESERTA->ViewValue = $this->NO_PESERTA->CurrentValue;\n\t\t$this->NO_PESERTA->ViewCustomAttributes = \"\";\n\n\t\t// NOKARTU\n\t\t$this->NOKARTU->ViewValue = $this->NOKARTU->CurrentValue;\n\t\t$this->NOKARTU->ViewCustomAttributes = \"\";\n\n\t\t// TANGGAL_SEP\n\t\t$this->TANGGAL_SEP->ViewValue = $this->TANGGAL_SEP->CurrentValue;\n\t\t$this->TANGGAL_SEP->ViewValue = ew_FormatDateTime($this->TANGGAL_SEP->ViewValue, 0);\n\t\t$this->TANGGAL_SEP->ViewCustomAttributes = \"\";\n\n\t\t// TANGGALRUJUK_SEP\n\t\t$this->TANGGALRUJUK_SEP->ViewValue = $this->TANGGALRUJUK_SEP->CurrentValue;\n\t\t$this->TANGGALRUJUK_SEP->ViewValue = ew_FormatDateTime($this->TANGGALRUJUK_SEP->ViewValue, 0);\n\t\t$this->TANGGALRUJUK_SEP->ViewCustomAttributes = \"\";\n\n\t\t// KELASRAWAT_SEP\n\t\t$this->KELASRAWAT_SEP->ViewValue = $this->KELASRAWAT_SEP->CurrentValue;\n\t\t$this->KELASRAWAT_SEP->ViewCustomAttributes = \"\";\n\n\t\t// MINTA_RUJUKAN\n\t\t$this->MINTA_RUJUKAN->ViewValue = $this->MINTA_RUJUKAN->CurrentValue;\n\t\t$this->MINTA_RUJUKAN->ViewCustomAttributes = \"\";\n\n\t\t// NORUJUKAN_SEP\n\t\t$this->NORUJUKAN_SEP->ViewValue = $this->NORUJUKAN_SEP->CurrentValue;\n\t\t$this->NORUJUKAN_SEP->ViewCustomAttributes = \"\";\n\n\t\t// PPKRUJUKANASAL_SEP\n\t\t$this->PPKRUJUKANASAL_SEP->ViewValue = $this->PPKRUJUKANASAL_SEP->CurrentValue;\n\t\t$this->PPKRUJUKANASAL_SEP->ViewCustomAttributes = \"\";\n\n\t\t// NAMAPPKRUJUKANASAL_SEP\n\t\t$this->NAMAPPKRUJUKANASAL_SEP->ViewValue = $this->NAMAPPKRUJUKANASAL_SEP->CurrentValue;\n\t\t$this->NAMAPPKRUJUKANASAL_SEP->ViewCustomAttributes = \"\";\n\n\t\t// PPKPELAYANAN_SEP\n\t\t$this->PPKPELAYANAN_SEP->ViewValue = $this->PPKPELAYANAN_SEP->CurrentValue;\n\t\t$this->PPKPELAYANAN_SEP->ViewCustomAttributes = \"\";\n\n\t\t// JENISPERAWATAN_SEP\n\t\t$this->JENISPERAWATAN_SEP->ViewValue = $this->JENISPERAWATAN_SEP->CurrentValue;\n\t\t$this->JENISPERAWATAN_SEP->ViewCustomAttributes = \"\";\n\n\t\t// CATATAN_SEP\n\t\t$this->CATATAN_SEP->ViewValue = $this->CATATAN_SEP->CurrentValue;\n\t\t$this->CATATAN_SEP->ViewCustomAttributes = \"\";\n\n\t\t// DIAGNOSAAWAL_SEP\n\t\t$this->DIAGNOSAAWAL_SEP->ViewValue = $this->DIAGNOSAAWAL_SEP->CurrentValue;\n\t\t$this->DIAGNOSAAWAL_SEP->ViewCustomAttributes = \"\";\n\n\t\t// NAMADIAGNOSA_SEP\n\t\t$this->NAMADIAGNOSA_SEP->ViewValue = $this->NAMADIAGNOSA_SEP->CurrentValue;\n\t\t$this->NAMADIAGNOSA_SEP->ViewCustomAttributes = \"\";\n\n\t\t// LAKALANTAS_SEP\n\t\t$this->LAKALANTAS_SEP->ViewValue = $this->LAKALANTAS_SEP->CurrentValue;\n\t\t$this->LAKALANTAS_SEP->ViewCustomAttributes = \"\";\n\n\t\t// LOKASILAKALANTAS\n\t\t$this->LOKASILAKALANTAS->ViewValue = $this->LOKASILAKALANTAS->CurrentValue;\n\t\t$this->LOKASILAKALANTAS->ViewCustomAttributes = \"\";\n\n\t\t// USER\n\t\t$this->USER->ViewValue = $this->USER->CurrentValue;\n\t\t$this->USER->ViewCustomAttributes = \"\";\n\n\t\t// tanggal\n\t\t$this->tanggal->ViewValue = $this->tanggal->CurrentValue;\n\t\t$this->tanggal->ViewCustomAttributes = \"\";\n\n\t\t// bulan\n\t\tif (strval($this->bulan->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`bulan_id`\" . ew_SearchString(\"=\", $this->bulan->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `bulan_id`, `bulan_nama` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `l_bulan`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->bulan->LookupFilters = array();\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->bulan, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$this->bulan->ViewValue = $this->bulan->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->bulan->ViewValue = $this->bulan->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->bulan->ViewValue = NULL;\n\t\t}\n\t\t$this->bulan->ViewCustomAttributes = \"\";\n\n\t\t// tahun\n\t\t$this->tahun->ViewValue = $this->tahun->CurrentValue;\n\t\t$this->tahun->ViewCustomAttributes = \"\";\n\n\t\t\t// NOMR\n\t\t\t$this->NOMR->LinkCustomAttributes = \"\";\n\t\t\t$this->NOMR->HrefValue = \"\";\n\t\t\t$this->NOMR->TooltipValue = \"\";\n\n\t\t\t// KETERANGAN\n\t\t\t$this->KETERANGAN->LinkCustomAttributes = \"\";\n\t\t\t$this->KETERANGAN->HrefValue = \"\";\n\t\t\t$this->KETERANGAN->TooltipValue = \"\";\n\n\t\t\t// KDPOLY\n\t\t\t$this->KDPOLY->LinkCustomAttributes = \"\";\n\t\t\t$this->KDPOLY->HrefValue = \"\";\n\t\t\t$this->KDPOLY->TooltipValue = \"\";\n\n\t\t\t// tanggal\n\t\t\t$this->tanggal->LinkCustomAttributes = \"\";\n\t\t\t$this->tanggal->HrefValue = \"\";\n\t\t\t$this->tanggal->TooltipValue = \"\";\n\n\t\t\t// bulan\n\t\t\t$this->bulan->LinkCustomAttributes = \"\";\n\t\t\t$this->bulan->HrefValue = \"\";\n\t\t\t$this->bulan->TooltipValue = \"\";\n\n\t\t\t// tahun\n\t\t\t$this->tahun->LinkCustomAttributes = \"\";\n\t\t\t$this->tahun->HrefValue = \"\";\n\t\t\t$this->tahun->TooltipValue = \"\";\n\t\t} elseif ($this->RowType == EW_ROWTYPE_SEARCH) { // Search row\n\n\t\t\t// NOMR\n\t\t\t$this->NOMR->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->NOMR->EditCustomAttributes = \"\";\n\t\t\t$this->NOMR->EditValue = ew_HtmlEncode($this->NOMR->AdvancedSearch->SearchValue);\n\t\t\tif (strval($this->NOMR->AdvancedSearch->SearchValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`NOMR`\" . ew_SearchString(\"=\", $this->NOMR->AdvancedSearch->SearchValue, EW_DATATYPE_STRING, \"\");\n\t\t\t$sSqlWrk = \"SELECT `NOMR`, `NOMR` AS `DispFld`, `NAMA` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `m_pasien`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\t$this->NOMR->LookupFilters = array();\n\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t$this->Lookup_Selecting($this->NOMR, $sWhereWrk); // Call Lookup selecting\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$arwrk = array();\n\t\t\t\t\t$arwrk[1] = ew_HtmlEncode($rswrk->fields('DispFld'));\n\t\t\t\t\t$arwrk[2] = ew_HtmlEncode($rswrk->fields('Disp2Fld'));\n\t\t\t\t\t$this->NOMR->EditValue = $this->NOMR->DisplayValue($arwrk);\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$this->NOMR->EditValue = ew_HtmlEncode($this->NOMR->AdvancedSearch->SearchValue);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->NOMR->EditValue = NULL;\n\t\t\t}\n\t\t\t$this->NOMR->PlaceHolder = ew_RemoveHtml($this->NOMR->FldCaption());\n\n\t\t\t// KETERANGAN\n\t\t\t$this->KETERANGAN->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->KETERANGAN->EditCustomAttributes = \"\";\n\t\t\t$this->KETERANGAN->EditValue = ew_HtmlEncode($this->KETERANGAN->AdvancedSearch->SearchValue);\n\t\t\t$this->KETERANGAN->PlaceHolder = ew_RemoveHtml($this->KETERANGAN->FldCaption());\n\n\t\t\t// KDPOLY\n\t\t\t$this->KDPOLY->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->KDPOLY->EditCustomAttributes = \"\";\n\t\t\tif (trim(strval($this->KDPOLY->AdvancedSearch->SearchValue)) == \"\") {\n\t\t\t\t$sFilterWrk = \"0=1\";\n\t\t\t} else {\n\t\t\t\t$sFilterWrk = \"`kode`\" . ew_SearchString(\"=\", $this->KDPOLY->AdvancedSearch->SearchValue, EW_DATATYPE_NUMBER, \"\");\n\t\t\t}\n\t\t\t$sSqlWrk = \"SELECT `kode`, `nama` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `m_poly`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\t$this->KDPOLY->LookupFilters = array();\n\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t$this->Lookup_Selecting($this->KDPOLY, $sWhereWrk); // Call Lookup selecting\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\t$this->KDPOLY->EditValue = $arwrk;\n\n\t\t\t// tanggal\n\t\t\t$this->tanggal->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->tanggal->EditCustomAttributes = \"\";\n\t\t\t$this->tanggal->EditValue = ew_HtmlEncode($this->tanggal->AdvancedSearch->SearchValue);\n\t\t\t$this->tanggal->PlaceHolder = ew_RemoveHtml($this->tanggal->FldCaption());\n\n\t\t\t// bulan\n\t\t\t$this->bulan->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->bulan->EditCustomAttributes = \"\";\n\t\t\tif (trim(strval($this->bulan->AdvancedSearch->SearchValue)) == \"\") {\n\t\t\t\t$sFilterWrk = \"0=1\";\n\t\t\t} else {\n\t\t\t\t$sFilterWrk = \"`bulan_id`\" . ew_SearchString(\"=\", $this->bulan->AdvancedSearch->SearchValue, EW_DATATYPE_NUMBER, \"\");\n\t\t\t}\n\t\t\t$sSqlWrk = \"SELECT `bulan_id`, `bulan_nama` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `l_bulan`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\t$this->bulan->LookupFilters = array();\n\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t$this->Lookup_Selecting($this->bulan, $sWhereWrk); // Call Lookup selecting\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\t$this->bulan->EditValue = $arwrk;\n\n\t\t\t// tahun\n\t\t\t$this->tahun->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->tahun->EditCustomAttributes = \"\";\n\t\t\t$this->tahun->EditValue = ew_HtmlEncode($this->tahun->AdvancedSearch->SearchValue);\n\t\t\t$this->tahun->PlaceHolder = ew_RemoveHtml($this->tahun->FldCaption());\n\t\t}\n\t\tif ($this->RowType == EW_ROWTYPE_ADD ||\n\t\t\t$this->RowType == EW_ROWTYPE_EDIT ||\n\t\t\t$this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row\n\t\t\t$this->SetupFieldTitles();\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "title": "" }, { "docid": "4be78a21fabb485c6e0ff0af9b7d3a41", "score": "0.5352726", "text": "function print_table_rows($row){\n echo \"<tr>\";\n echo \"<td>\".$row['nome'].\"</td>\";\n echo \"<td>\".$row['cognome'].\"</td>\";\n echo \"<td>\".$row['dataNascita'].\"</td>\";\n}", "title": "" }, { "docid": "253f7f43173d54803bf121617b2ddbac", "score": "0.53494585", "text": "public function headingRow(){\n return 1;\n }", "title": "" }, { "docid": "afb0013eb26ccd4dfafeeead91c6eab1", "score": "0.53435075", "text": "function RenderRow() {\n\t\tglobal $conn, $Security, $Language, $users;\n\n\t\t// Initialize URLs\n\t\t$this->ViewUrl = $users->ViewUrl();\n\t\t$this->EditUrl = $users->EditUrl();\n\t\t$this->InlineEditUrl = $users->InlineEditUrl();\n\t\t$this->CopyUrl = $users->CopyUrl();\n\t\t$this->InlineCopyUrl = $users->InlineCopyUrl();\n\t\t$this->DeleteUrl = $users->DeleteUrl();\n\n\t\t// Call Row_Rendering event\n\t\t$users->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// C_TENDANGNHAP\n\n\t\t$users->C_TENDANGNHAP->CellCssStyle = \"\"; $users->C_TENDANGNHAP->CellCssClass = \"\";\n\t\t$users->C_TENDANGNHAP->CellAttrs = array(); $users->C_TENDANGNHAP->ViewAttrs = array(); $users->C_TENDANGNHAP->EditAttrs = array();\n\n\t\t// FK_MACONGTY\n\t\t$users->FK_MACONGTY->CellCssStyle = \"\"; $users->FK_MACONGTY->CellCssClass = \"\";\n\t\t$users->FK_MACONGTY->CellAttrs = array(); $users->FK_MACONGTY->ViewAttrs = array(); $users->FK_MACONGTY->EditAttrs = array();\n\n\t\t// FK_USERLEVELID\n\t\t$users->FK_USERLEVELID->CellCssStyle = \"\"; $users->FK_USERLEVELID->CellCssClass = \"\";\n\t\t$users->FK_USERLEVELID->CellAttrs = array(); $users->FK_USERLEVELID->ViewAttrs = array(); $users->FK_USERLEVELID->EditAttrs = array();\n\t\tif ($users->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t\t// PK_NGUOIDUNG_ID\n\t\t\t$users->PK_NGUOIDUNG_ID->ViewValue = $users->PK_NGUOIDUNG_ID->CurrentValue;\n\t\t\t$users->PK_NGUOIDUNG_ID->CssStyle = \"\";\n\t\t\t$users->PK_NGUOIDUNG_ID->CssClass = \"\";\n\t\t\t$users->PK_NGUOIDUNG_ID->ViewCustomAttributes = \"\";\n\n\t\t\t// C_TENDANGNHAP\n\t\t\t$users->C_TENDANGNHAP->ViewValue = $users->C_TENDANGNHAP->CurrentValue;\n\t\t\t$users->C_TENDANGNHAP->CssStyle = \"\";\n\t\t\t$users->C_TENDANGNHAP->CssClass = \"\";\n\t\t\t$users->C_TENDANGNHAP->ViewCustomAttributes = \"\";\n\n\t\t\t// C_MATKHAU\n\t\t\t$users->C_MATKHAU->ViewValue = \"********\";\n\t\t\t$users->C_MATKHAU->CssStyle = \"\";\n\t\t\t$users->C_MATKHAU->CssClass = \"\";\n\t\t\t$users->C_MATKHAU->ViewCustomAttributes = \"\";\n\n\t\t\t// FK_MACONGTY\n\t\t\tif (strval($users->FK_MACONGTY->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`PK_MACONGTY` = \" . ew_AdjustSql($users->FK_MACONGTY->CurrentValue) . \"\";\n\t\t\t$sSqlWrk = \"SELECT `C_TENCONGTY` FROM `t_congty`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$users->FK_MACONGTY->ViewValue = $rswrk->fields('C_TENCONGTY');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$users->FK_MACONGTY->ViewValue = $users->FK_MACONGTY->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$users->FK_MACONGTY->ViewValue = NULL;\n\t\t\t}\n\t\t\t$users->FK_MACONGTY->CssStyle = \"\";\n\t\t\t$users->FK_MACONGTY->CssClass = \"\";\n\t\t\t$users->FK_MACONGTY->ViewCustomAttributes = \"\";\n\n\t\t\t// C_HOTEN\n\t\t\t$users->C_HOTEN->ViewValue = $users->C_HOTEN->CurrentValue;\n\t\t\t$users->C_HOTEN->CssStyle = \"\";\n\t\t\t$users->C_HOTEN->CssClass = \"\";\n\t\t\t$users->C_HOTEN->ViewCustomAttributes = \"\";\n\n\t\t\t// C_DIACHI\n\t\t\t$users->C_DIACHI->ViewValue = $users->C_DIACHI->CurrentValue;\n\t\t\t$users->C_DIACHI->CssStyle = \"\";\n\t\t\t$users->C_DIACHI->CssClass = \"\";\n\t\t\t$users->C_DIACHI->ViewCustomAttributes = \"\";\n\n\t\t\t// C_TEL\n\t\t\t$users->C_TEL->ViewValue = $users->C_TEL->CurrentValue;\n\t\t\t$users->C_TEL->CssStyle = \"\";\n\t\t\t$users->C_TEL->CssClass = \"\";\n\t\t\t$users->C_TEL->ViewCustomAttributes = \"\";\n\n\t\t\t// C_TEL_HOME\n\t\t\t$users->C_TEL_HOME->ViewValue = $users->C_TEL_HOME->CurrentValue;\n\t\t\t$users->C_TEL_HOME->CssStyle = \"\";\n\t\t\t$users->C_TEL_HOME->CssClass = \"\";\n\t\t\t$users->C_TEL_HOME->ViewCustomAttributes = \"\";\n\n\t\t\t// C_TEL_MOBILE\n\t\t\t$users->C_TEL_MOBILE->ViewValue = $users->C_TEL_MOBILE->CurrentValue;\n\t\t\t$users->C_TEL_MOBILE->CssStyle = \"\";\n\t\t\t$users->C_TEL_MOBILE->CssClass = \"\";\n\t\t\t$users->C_TEL_MOBILE->ViewCustomAttributes = \"\";\n\n\t\t\t// C_FAX\n\t\t\t$users->C_FAX->ViewValue = $users->C_FAX->CurrentValue;\n\t\t\t$users->C_FAX->CssStyle = \"\";\n\t\t\t$users->C_FAX->CssClass = \"\";\n\t\t\t$users->C_FAX->ViewCustomAttributes = \"\";\n\n\t\t\t// C_EMAIL\n\t\t\t$users->C_EMAIL->ViewValue = $users->C_EMAIL->CurrentValue;\n\t\t\t$users->C_EMAIL->CssStyle = \"\";\n\t\t\t$users->C_EMAIL->CssClass = \"\";\n\t\t\t$users->C_EMAIL->ViewCustomAttributes = \"\";\n\n\t\t\t// FK_USERLEVELID\n\t\t\tif (strval($users->FK_USERLEVELID->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`userlevelid` = \" . ew_AdjustSql($users->FK_USERLEVELID->CurrentValue) . \"\";\n\t\t\t$sSqlWrk = \"SELECT `userlevelname` FROM `userlevels`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$users->FK_USERLEVELID->ViewValue = $rswrk->fields('userlevelname');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$users->FK_USERLEVELID->ViewValue = $users->FK_USERLEVELID->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$users->FK_USERLEVELID->ViewValue = NULL;\n\t\t\t}\n\t\t\t$users->FK_USERLEVELID->CssStyle = \"\";\n\t\t\t$users->FK_USERLEVELID->CssClass = \"\";\n\t\t\t$users->FK_USERLEVELID->ViewCustomAttributes = \"\";\n\n\t\t\t// C_TENDANGNHAP\n\t\t\t$users->C_TENDANGNHAP->HrefValue = \"\";\n\t\t\t$users->C_TENDANGNHAP->TooltipValue = \"\";\n\n\t\t\t// FK_MACONGTY\n\t\t\t$users->FK_MACONGTY->HrefValue = \"\";\n\t\t\t$users->FK_MACONGTY->TooltipValue = \"\";\n\n\t\t\t// FK_USERLEVELID\n\t\t\t$users->FK_USERLEVELID->HrefValue = \"\";\n\t\t\t$users->FK_USERLEVELID->TooltipValue = \"\";\n\t\t} elseif ($users->RowType == EW_ROWTYPE_SEARCH) { // Search row\n\n\t\t\t// C_TENDANGNHAP\n\t\t\t$users->C_TENDANGNHAP->EditCustomAttributes = \"\";\n\t\t\t$users->C_TENDANGNHAP->EditValue = ew_HtmlEncode($users->C_TENDANGNHAP->AdvancedSearch->SearchValue);\n\n\t\t\t// FK_MACONGTY\n\t\t\t$users->FK_MACONGTY->EditCustomAttributes = \"\";\n\t\t\t$arwrk = GetCompanyTree_User();\n\t\t\t$users->FK_MACONGTY->EditValue = $arwrk;\n\n\t\t\t// FK_USERLEVELID\n\t\t\t$users->FK_USERLEVELID->EditCustomAttributes = \"\";\n\t\t\t\t$sFilterWrk = \"\";\n\t\t\t$sSqlWrk = \"SELECT `userlevelid`, `userlevelname`, '' AS Disp2Fld, '' AS SelectFilterFld FROM `userlevels`\";\n\t\t\t$sWhereWrk = \"`userleveltype` = 2 AND `userlevelid` not in (-1,0)\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\")));\n\t\t\t$users->FK_USERLEVELID->EditValue = $arwrk;\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($users->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$users->Row_Rendered();\n\t}", "title": "" }, { "docid": "6ce2d7c233b70de1572d69a8bc21be7a", "score": "0.5341072", "text": "function RenderRow() {\n\t\tglobal $conn, $Security, $formulario;\n\n\t\t// Call Row_Rendering event\n\t\t$formulario->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// idFormulario\n\n\t\t$formulario->idFormulario->CellCssStyle = \"\";\n\t\t$formulario->idFormulario->CellCssClass = \"\";\n\n\t\t// idMer\n\t\t$formulario->idMer->CellCssStyle = \"\";\n\t\t$formulario->idMer->CellCssClass = \"\";\n\n\t\t// idPlanilla\n\t\t$formulario->idPlanilla->CellCssStyle = \"\";\n\t\t$formulario->idPlanilla->CellCssClass = \"\";\n\n\t\t// archivo\n\t\t$formulario->archivo->CellCssStyle = \"\";\n\t\t$formulario->archivo->CellCssClass = \"\";\n\n\t\t// cuenta\n\t\t$formulario->cuenta->CellCssStyle = \"\";\n\t\t$formulario->cuenta->CellCssClass = \"\";\n\n\t\t// porcentaje\n\t\t$formulario->porcentaje->CellCssStyle = \"\";\n\t\t$formulario->porcentaje->CellCssClass = \"\";\n\t\tif ($formulario->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t\t// idFormulario\n\t\t\t$formulario->idFormulario->ViewValue = $formulario->idFormulario->CurrentValue;\n\t\t\t$formulario->idFormulario->CssStyle = \"\";\n\t\t\t$formulario->idFormulario->CssClass = \"\";\n\t\t\t$formulario->idFormulario->ViewCustomAttributes = \"\";\n\n\t\t\t// idMer\n\t\t\t$formulario->idMer->ViewValue = $formulario->idMer->CurrentValue;\n\t\t\t$formulario->idMer->CssStyle = \"\";\n\t\t\t$formulario->idMer->CssClass = \"\";\n\t\t\t$formulario->idMer->ViewCustomAttributes = \"\";\n\n\t\t\t// idPlanilla\n\t\t\t$formulario->idPlanilla->ViewValue = $formulario->idPlanilla->CurrentValue;\n\t\t\t$formulario->idPlanilla->CssStyle = \"\";\n\t\t\t$formulario->idPlanilla->CssClass = \"\";\n\t\t\t$formulario->idPlanilla->ViewCustomAttributes = \"\";\n\n\t\t\t// archivo\n\t\t\t$formulario->archivo->ViewValue = $formulario->archivo->CurrentValue;\n\t\t\t$formulario->archivo->CssStyle = \"\";\n\t\t\t$formulario->archivo->CssClass = \"\";\n\t\t\t$formulario->archivo->ViewCustomAttributes = \"\";\n\n\t\t\t// cuenta\n\t\t\t$formulario->cuenta->ViewValue = $formulario->cuenta->CurrentValue;\n\t\t\t$formulario->cuenta->CssStyle = \"\";\n\t\t\t$formulario->cuenta->CssClass = \"\";\n\t\t\t$formulario->cuenta->ViewCustomAttributes = \"\";\n\n\t\t\t// porcentaje\n\t\t\t$formulario->porcentaje->ViewValue = $formulario->porcentaje->CurrentValue;\n\t\t\t$formulario->porcentaje->CssStyle = \"\";\n\t\t\t$formulario->porcentaje->CssClass = \"\";\n\t\t\t$formulario->porcentaje->ViewCustomAttributes = \"\";\n\n\t\t\t// idFormulario\n\t\t\t$formulario->idFormulario->HrefValue = \"\";\n\n\t\t\t// idMer\n\t\t\t$formulario->idMer->HrefValue = \"\";\n\n\t\t\t// idPlanilla\n\t\t\t$formulario->idPlanilla->HrefValue = \"\";\n\n\t\t\t// archivo\n\t\t\t$formulario->archivo->HrefValue = \"\";\n\n\t\t\t// cuenta\n\t\t\t$formulario->cuenta->HrefValue = \"\";\n\n\t\t\t// porcentaje\n\t\t\t$formulario->porcentaje->HrefValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\t$formulario->Row_Rendered();\n\t}", "title": "" }, { "docid": "9055d8345f0ebc81af1e5680936c3e2a", "score": "0.5337735", "text": "function setTableOddRowAttributes($attribs)\n {\n $this->_options['oddRowAttributes'] = $attribs;\n }", "title": "" }, { "docid": "d18a3ff4e225bc16d61d3987caadae34", "score": "0.53311837", "text": "function displayRainbowLetter($myArray) \n { \n for ($row = 0; $row < count($myArray); $row++) \n {\n for ($col = 0; $col < 10; $col++) \n {\n \n if ($myArray[$row][$col])\n {\n $red = rand(0,255); // random number between 0 and 255\n $green = rand(0,255);\n $blue = rand(0,255);\n echo \"<span style = 'color: rgb($red,$green,$blue);'>@</span>\";\n } \n else {\n printWhiteSpace();\n }\n }\n echo \"<br>\";\n }\n }", "title": "" }, { "docid": "c7292d7b321043c3b20f2767fc37f349", "score": "0.5331", "text": "function ColorTable($header, $data) {\r\n $this->SetFillColor(255, 0, 0);\r\n $this->SetTextColor(255);\r\n $this->SetDrawColor(128, 0, 0);\r\n $this->SetLineWidth(.3);\r\n $this->SetFont('', 'B');\r\n //Header\r\n $w = [40, 35, 40, 45];\r\n for ($i = 0; $i < count($header); $i++)\r\n $this->Cell($w[$i], 7, $header[$i], 1, 0, 'C', 1);\r\n $this->Ln();\r\n //Color and font restoration\r\n $this->SetFillColor(224, 235, 255);\r\n $this->SetTextColor(0);\r\n $this->SetFont('');\r\n //Data\r\n $fill = 0;\r\n foreach ($data as $row) {\r\n $this->Cell($w[0], 6, $row[0], 'LR', 0, 'L', $fill);\r\n $this->Cell($w[1], 6, $row[1], 'LR', 0, 'L', $fill);\r\n $this->Cell($w[2], 6, $row[2], 'LR', 0, 'C', $fill);\r\n $this->Cell($w[3], 6, number_format($row[3]), 'LR', 0, 'R', $fill);\r\n $this->Ln();\r\n $fill = !$fill;\r\n }\r\n $this->Cell(array_sum($w), 0, '', 'T');\r\n }", "title": "" }, { "docid": "2cdca9a117bf07cb2bbafb0764e53f6c", "score": "0.53172976", "text": "function display_colow_row__square() {\n\twhile ( have_rows( 'colors' ) ) { the_row();\n\t\t$background_color = 'background-color:' . get_sub_field( 'hex' ) . ';';\n\t\t$font_color = 'color:' . get_sub_field( 'font_display_color' ) . ';';\n\t\t$outline = '';\n\t\tif ( get_sub_field( 'outline' ) ) {\n\t\t\t$outline = 'border:1px solid #9B9B9B;';\n\t\t}\n\t\t$hex_color = 'Hex# ' . str_replace( '#', '', get_sub_field( 'hex' ) );\n\t\t$rgb_color = 'RGB: R ' . get_sub_field( 'red' ) . ' G ' . get_sub_field( 'green' ) . ' B ' . get_sub_field( 'blue' );\n\t\t$cmyk_color = 'CMYK: ' . get_sub_field( 'cyan' ) . ' | ' . get_sub_field( 'magenta' ) . ' | ' . get_sub_field( 'yellow' ) . ' | ' . get_sub_field( 'black' );\n\t\t?>\n\n\t\t<article class=\"color-row__color color-row__color--square\" style=\"<?php echo esc_attr( $background_color . $font_color . $outline ); ?>\">\n\t\t\t<h3 class=\"color-row__color__name\" style=\"<?php echo esc_attr( $font_color ); ?>\"><?php the_sub_field( 'color_name' ); ?></h3>\n\t\t\t<span class=\"color-row__color__hex\"><?php echo esc_html( $hex_color ); ?></span><br>\n\t\t\t<span class=\"color-row__color__rgb\"><?php echo esc_html( $rgb_color ); ?></span><br>\n\t\t\t<span class=\"color-row__color__cmyk\"><?php echo esc_html( $cmyk_color ); ?></span>\n\t\t</article>\n\n\t\t<?php\n\t}\n}", "title": "" }, { "docid": "0caabd42503cde471d37619990ccd3c6", "score": "0.5303982", "text": "function addColorTable($data, $color, $lastWidth=12){\n\t\t//kamal , new code to fix \n\t\t// 1. Image overflow\n\t\t// 2. page break\n\t\t// 3. and height of the row \n\t\t$nb=0;\n\t\t$image_height=0;\n\t\tfor($i=0;$i<count($data);$i++){\n\t\t\tif (strpos($data[$i], \"IMAGE##\") > -1){\n\t\t\t\t$ar = explode(\"##\", $data[$i]);\n\t\t\t\t$image_height=$ar[2]+2; // we have added 2 for a margin\n\t\t\t\t$nb=max($nb,$this->NbLines($this->widths[$i],$image_height));\n\t\t\t}else{\n\t\t\t\t$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i])); \n\t\t\t}\n\t\t}\n\t\t$h = 7 * $nb;\n\t\t$h=max($h,$image_height);\n\t\t//end of new code\n\t\t//Issue a page break first if needed\n\t\t$this->CheckPageBreak($h);\n\t\t//Draw the cells of the row\n\t\tfor($i=0;$i<count($data);$i++){\n\t\t\tif($i==(count($data)-1)){\n\t\t\t\t$w = $lastWidth;\n\t\t\t}else{\n\t\t\t\t$w = $this->widths[$i];\n\t\t\t}\n\t\t\t$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n\t\t\t//Save the current position\n\t\t\t$x = $this->GetX();\n\t\t\t$y = $this->GetY();\n\n\t\t\t//Print the text\n\t\t\tif (strpos($data[$i], \"IMAGE##\") > -1){\n\t\t\t\t$tmp = explode(\"##\", $data[$i]);\n\t\t\t\t$data[$i] = $tmp[3];\n\t\t\t\t$this->MultiCell($w, 5, $this->Image($data[$i], $this->GetX()+1, $this->GetY()+1, $tmp[1], $tmp[2]),0,'C');\n\t\t\t\t$this->Rect($x,$y,$tmp[1],$tmp[2],'DF');\n\t\t\t}else{\n\t\t\t\tif(isset($color[$i]) && !empty($color[$i])){\n\t\t\t\t\t$c = explode(\", \",$color[$i]);\n\t\t\t\t\t$c[0] = isset($c[0])?$c[0]:204;\n\t\t\t\t\t$c[1] = isset($c[1])?$c[1]:255;\n\t\t\t\t\t$c[2] = isset($c[2])?$c[2]:255;\t\t\t\t\t\t\n\t\t\t\t\t//print_r($c);die;\n\t\t\t\t\t$this->SetFillColor($c[0], $c[1], $c[2]);\n\t\t\t\t\t//Draw the border\n\t\t\t\t\t$this->Rect($x,$y,$w,$h,'DF');\n\t\t\t\t}else{\n\t\t\t\t\t//Draw the border\n\t\t\t\t\t$this->Rect($x,$y,$w,$h);\n\t\t\t\t}\n\t\t\t\t$this->MultiCell($w,7,$data[$i],0,$a);\n\t\t\t}\n\t\t\t//$this->MultiCell($w,5,$data[$i],0,$a);\t\n\t\t\t//Put the position to the right of the cell\n\t\t\t$this->SetXY($x+$w, $y);\n\t\t}\n\t\t//Go to the next line\n\t\t$this->Ln($h);\n\t}", "title": "" }, { "docid": "5be9c0c3ec5d77e2f235c4a5576d1143", "score": "0.5303111", "text": "function Row2($data)\n {\n $nb=0;\n for($i=0;$i<count($data);$i++)\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n $h=1*$nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for($i=0;$i<count($data);$i++)\n {\n $w=$this->widths[$i];\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n $color=isset($this->color[$i]) ? FALSE : FALSE;\n $widht=isset($this->widht[$i]) ? $this->widht[$i] : 0.2;\n // echo $widht; die();\n //Save the current position\n $x=$this->GetX();\n $y=$this->GetY();\n //Draw the border\n $this->SetLineWidth(0.0);\n // $this->Rect($x,$y,$w,$h);\n //Print the text\n $this->MultiCell($w,5,$data[$i],0,$a,$color);\n //Put the position to the right of the cell\n $this->SetXY($x+$w,$y);\n }\n //Go to the next line\n $this->Ln($h);\n }", "title": "" }, { "docid": "3364f7e990fcdf02a26da46e817f2e53", "score": "0.5256036", "text": "public function render()\n\t{\n\t\treturn view('components.table.row');\n\t}", "title": "" }, { "docid": "2d8d69707190e5c60fb63a10a8477afd", "score": "0.5255037", "text": "function RenderRow() {\n\t\tglobal $conn, $Security, $patient_detail;\n\n\t\t// Call Row_Rendering event\n\t\t$patient_detail->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// StudyID\n\n\t\t$patient_detail->StudyID->CellCssStyle = \"\";\n\t\t$patient_detail->StudyID->CellCssClass = \"\";\n\n\t\t// PatientID\n\t\t$patient_detail->PatientID->CellCssStyle = \"\";\n\t\t$patient_detail->PatientID->CellCssClass = \"\";\n\n\t\t// StudyDate\n\t\t$patient_detail->StudyDate->CellCssStyle = \"\";\n\t\t$patient_detail->StudyDate->CellCssClass = \"\";\n\n\t\t// ContentDate\n\t\t$patient_detail->ContentDate->CellCssStyle = \"\";\n\t\t$patient_detail->ContentDate->CellCssClass = \"\";\n\n\t\t// StudyTime\n\t\t$patient_detail->StudyTime->CellCssStyle = \"\";\n\t\t$patient_detail->StudyTime->CellCssClass = \"\";\n\n\t\t// ContentTime\n\t\t$patient_detail->ContentTime->CellCssStyle = \"\";\n\t\t$patient_detail->ContentTime->CellCssClass = \"\";\n\n\t\t// InstitutionName\n\t\t$patient_detail->InstitutionName->CellCssStyle = \"\";\n\t\t$patient_detail->InstitutionName->CellCssClass = \"\";\n\n\t\t// InstitutionAddress\n\t\t$patient_detail->InstitutionAddress->CellCssStyle = \"\";\n\t\t$patient_detail->InstitutionAddress->CellCssClass = \"\";\n\n\t\t// InstitutionDepartmentName\n\t\t$patient_detail->InstitutionDepartmentName->CellCssStyle = \"\";\n\t\t$patient_detail->InstitutionDepartmentName->CellCssClass = \"\";\n\n\t\t// Modality\n\t\t$patient_detail->Modality->CellCssStyle = \"\";\n\t\t$patient_detail->Modality->CellCssClass = \"\";\n\n\t\t// OperatorName\n\t\t$patient_detail->OperatorName->CellCssStyle = \"\";\n\t\t$patient_detail->OperatorName->CellCssClass = \"\";\n\n\t\t// Manufacturer\n\t\t$patient_detail->Manufacturer->CellCssStyle = \"\";\n\t\t$patient_detail->Manufacturer->CellCssClass = \"\";\n\n\t\t// BodyPartExamined\n\t\t$patient_detail->BodyPartExamined->CellCssStyle = \"\";\n\t\t$patient_detail->BodyPartExamined->CellCssClass = \"\";\n\n\t\t// ProtocolName\n\t\t$patient_detail->ProtocolName->CellCssStyle = \"\";\n\t\t$patient_detail->ProtocolName->CellCssClass = \"\";\n\n\t\t// AccessionNumber\n\t\t$patient_detail->AccessionNumber->CellCssStyle = \"\";\n\t\t$patient_detail->AccessionNumber->CellCssClass = \"\";\n\n\t\t// InstanceNumber\n\t\t$patient_detail->InstanceNumber->CellCssStyle = \"\";\n\t\t$patient_detail->InstanceNumber->CellCssClass = \"\";\n\n\t\t// Status\n\t\t$patient_detail->Status->CellCssStyle = \"\";\n\t\t$patient_detail->Status->CellCssClass = \"\";\n\t\tif ($patient_detail->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t\t// DetailNo\n\t\t\t$patient_detail->DetailNo->ViewValue = $patient_detail->DetailNo->CurrentValue;\n\t\t\t$patient_detail->DetailNo->CssStyle = \"\";\n\t\t\t$patient_detail->DetailNo->CssClass = \"\";\n\t\t\t$patient_detail->DetailNo->ViewCustomAttributes = \"\";\n\n\t\t\t// StudyID\n\t\t\t$patient_detail->StudyID->ViewValue = $patient_detail->StudyID->CurrentValue;\n\t\t\t$patient_detail->StudyID->CssStyle = \"\";\n\t\t\t$patient_detail->StudyID->CssClass = \"\";\n\t\t\t$patient_detail->StudyID->ViewCustomAttributes = \"\";\n\n\t\t\t// PatientID\n\t\t\t$patient_detail->PatientID->ViewValue = $patient_detail->PatientID->CurrentValue;\n\t\t\t$patient_detail->PatientID->CssStyle = \"\";\n\t\t\t$patient_detail->PatientID->CssClass = \"\";\n\t\t\t$patient_detail->PatientID->ViewCustomAttributes = \"\";\n\n\t\t\t// StudyDate\n\t\t\t$patient_detail->StudyDate->ViewValue = $patient_detail->StudyDate->CurrentValue;\n\t\t\t$patient_detail->StudyDate->ViewValue = ew_FormatDateTime($patient_detail->StudyDate->ViewValue, 5);\n\t\t\t$patient_detail->StudyDate->CssStyle = \"\";\n\t\t\t$patient_detail->StudyDate->CssClass = \"\";\n\t\t\t$patient_detail->StudyDate->ViewCustomAttributes = \"\";\n\n\t\t\t// ContentDate\n\t\t\t$patient_detail->ContentDate->ViewValue = $patient_detail->ContentDate->CurrentValue;\n\t\t\t$patient_detail->ContentDate->ViewValue = ew_FormatDateTime($patient_detail->ContentDate->ViewValue, 5);\n\t\t\t$patient_detail->ContentDate->CssStyle = \"\";\n\t\t\t$patient_detail->ContentDate->CssClass = \"\";\n\t\t\t$patient_detail->ContentDate->ViewCustomAttributes = \"\";\n\n\t\t\t// StudyTime\n\t\t\t$patient_detail->StudyTime->ViewValue = $patient_detail->StudyTime->CurrentValue;\n\t\t\t$patient_detail->StudyTime->ViewValue = ew_FormatDateTime($patient_detail->StudyTime->ViewValue, 4);\n\t\t\t$patient_detail->StudyTime->CssStyle = \"\";\n\t\t\t$patient_detail->StudyTime->CssClass = \"\";\n\t\t\t$patient_detail->StudyTime->ViewCustomAttributes = \"\";\n\n\t\t\t// ContentTime\n\t\t\t$patient_detail->ContentTime->ViewValue = $patient_detail->ContentTime->CurrentValue;\n\t\t\t$patient_detail->ContentTime->ViewValue = ew_FormatDateTime($patient_detail->ContentTime->ViewValue, 4);\n\t\t\t$patient_detail->ContentTime->CssStyle = \"\";\n\t\t\t$patient_detail->ContentTime->CssClass = \"\";\n\t\t\t$patient_detail->ContentTime->ViewCustomAttributes = \"\";\n\n\t\t\t// InstitutionName\n\t\t\t$patient_detail->InstitutionName->ViewValue = $patient_detail->InstitutionName->CurrentValue;\n\t\t\t$patient_detail->InstitutionName->CssStyle = \"\";\n\t\t\t$patient_detail->InstitutionName->CssClass = \"\";\n\t\t\t$patient_detail->InstitutionName->ViewCustomAttributes = \"\";\n\n\t\t\t// InstitutionAddress\n\t\t\t$patient_detail->InstitutionAddress->ViewValue = $patient_detail->InstitutionAddress->CurrentValue;\n\t\t\t$patient_detail->InstitutionAddress->CssStyle = \"\";\n\t\t\t$patient_detail->InstitutionAddress->CssClass = \"\";\n\t\t\t$patient_detail->InstitutionAddress->ViewCustomAttributes = \"\";\n\n\t\t\t// InstitutionDepartmentName\n\t\t\t$patient_detail->InstitutionDepartmentName->ViewValue = $patient_detail->InstitutionDepartmentName->CurrentValue;\n\t\t\t$patient_detail->InstitutionDepartmentName->CssStyle = \"\";\n\t\t\t$patient_detail->InstitutionDepartmentName->CssClass = \"\";\n\t\t\t$patient_detail->InstitutionDepartmentName->ViewCustomAttributes = \"\";\n\n\t\t\t// Modality\n\t\t\t$patient_detail->Modality->ViewValue = $patient_detail->Modality->CurrentValue;\n\t\t\t$patient_detail->Modality->CssStyle = \"\";\n\t\t\t$patient_detail->Modality->CssClass = \"\";\n\t\t\t$patient_detail->Modality->ViewCustomAttributes = \"\";\n\n\t\t\t// OperatorName\n\t\t\t$patient_detail->OperatorName->ViewValue = $patient_detail->OperatorName->CurrentValue;\n\t\t\t$patient_detail->OperatorName->CssStyle = \"\";\n\t\t\t$patient_detail->OperatorName->CssClass = \"\";\n\t\t\t$patient_detail->OperatorName->ViewCustomAttributes = \"\";\n\n\t\t\t// Manufacturer\n\t\t\t$patient_detail->Manufacturer->ViewValue = $patient_detail->Manufacturer->CurrentValue;\n\t\t\t$patient_detail->Manufacturer->CssStyle = \"\";\n\t\t\t$patient_detail->Manufacturer->CssClass = \"\";\n\t\t\t$patient_detail->Manufacturer->ViewCustomAttributes = \"\";\n\n\t\t\t// BodyPartExamined\n\t\t\t$patient_detail->BodyPartExamined->ViewValue = $patient_detail->BodyPartExamined->CurrentValue;\n\t\t\t$patient_detail->BodyPartExamined->CssStyle = \"\";\n\t\t\t$patient_detail->BodyPartExamined->CssClass = \"\";\n\t\t\t$patient_detail->BodyPartExamined->ViewCustomAttributes = \"\";\n\n\t\t\t// ProtocolName\n\t\t\t$patient_detail->ProtocolName->ViewValue = $patient_detail->ProtocolName->CurrentValue;\n\t\t\t$patient_detail->ProtocolName->CssStyle = \"\";\n\t\t\t$patient_detail->ProtocolName->CssClass = \"\";\n\t\t\t$patient_detail->ProtocolName->ViewCustomAttributes = \"\";\n\n\t\t\t// AccessionNumber\n\t\t\t$patient_detail->AccessionNumber->ViewValue = $patient_detail->AccessionNumber->CurrentValue;\n\t\t\t$patient_detail->AccessionNumber->CssStyle = \"\";\n\t\t\t$patient_detail->AccessionNumber->CssClass = \"\";\n\t\t\t$patient_detail->AccessionNumber->ViewCustomAttributes = \"\";\n\n\t\t\t// InstanceNumber\n\t\t\t$patient_detail->InstanceNumber->ViewValue = $patient_detail->InstanceNumber->CurrentValue;\n\t\t\t$patient_detail->InstanceNumber->CssStyle = \"\";\n\t\t\t$patient_detail->InstanceNumber->CssClass = \"\";\n\t\t\t$patient_detail->InstanceNumber->ViewCustomAttributes = \"\";\n\n\t\t\t// Status\n\t\t\t$patient_detail->Status->ViewValue = $patient_detail->Status->CurrentValue;\n\t\t\t$patient_detail->Status->CssStyle = \"\";\n\t\t\t$patient_detail->Status->CssClass = \"\";\n\t\t\t$patient_detail->Status->ViewCustomAttributes = \"\";\n\n\t\t\t// StudyID\n\t\t\t$patient_detail->StudyID->HrefValue = \"\";\n\n\t\t\t// PatientID\n\t\t\t$patient_detail->PatientID->HrefValue = \"\";\n\n\t\t\t// StudyDate\n\t\t\t$patient_detail->StudyDate->HrefValue = \"\";\n\n\t\t\t// ContentDate\n\t\t\t$patient_detail->ContentDate->HrefValue = \"\";\n\n\t\t\t// StudyTime\n\t\t\t$patient_detail->StudyTime->HrefValue = \"\";\n\n\t\t\t// ContentTime\n\t\t\t$patient_detail->ContentTime->HrefValue = \"\";\n\n\t\t\t// InstitutionName\n\t\t\t$patient_detail->InstitutionName->HrefValue = \"\";\n\n\t\t\t// InstitutionAddress\n\t\t\t$patient_detail->InstitutionAddress->HrefValue = \"\";\n\n\t\t\t// InstitutionDepartmentName\n\t\t\t$patient_detail->InstitutionDepartmentName->HrefValue = \"\";\n\n\t\t\t// Modality\n\t\t\t$patient_detail->Modality->HrefValue = \"\";\n\n\t\t\t// OperatorName\n\t\t\t$patient_detail->OperatorName->HrefValue = \"\";\n\n\t\t\t// Manufacturer\n\t\t\t$patient_detail->Manufacturer->HrefValue = \"\";\n\n\t\t\t// BodyPartExamined\n\t\t\t$patient_detail->BodyPartExamined->HrefValue = \"\";\n\n\t\t\t// ProtocolName\n\t\t\t$patient_detail->ProtocolName->HrefValue = \"\";\n\n\t\t\t// AccessionNumber\n\t\t\t$patient_detail->AccessionNumber->HrefValue = \"\";\n\n\t\t\t// InstanceNumber\n\t\t\t$patient_detail->InstanceNumber->HrefValue = \"\";\n\n\t\t\t// Status\n\t\t\t$patient_detail->Status->HrefValue = \"\";\n\t\t} elseif ($patient_detail->RowType == EW_ROWTYPE_ADD) { // Add row\n\n\t\t\t// StudyID\n\t\t\t$patient_detail->StudyID->EditCustomAttributes = \"\";\n\t\t\t$patient_detail->StudyID->EditValue = ew_HtmlEncode($patient_detail->StudyID->CurrentValue);\n\n\t\t\t// PatientID\n\t\t\t$patient_detail->PatientID->EditCustomAttributes = \"\";\n\t\t\t$patient_detail->PatientID->EditValue = ew_HtmlEncode($patient_detail->PatientID->CurrentValue);\n\n\t\t\t// StudyDate\n\t\t\t$patient_detail->StudyDate->EditCustomAttributes = \"\";\n\t\t\t$patient_detail->StudyDate->EditValue = ew_HtmlEncode(ew_FormatDateTime($patient_detail->StudyDate->CurrentValue, 5));\n\n\t\t\t// ContentDate\n\t\t\t$patient_detail->ContentDate->EditCustomAttributes = \"\";\n\t\t\t$patient_detail->ContentDate->EditValue = ew_HtmlEncode(ew_FormatDateTime($patient_detail->ContentDate->CurrentValue, 5));\n\n\t\t\t// StudyTime\n\t\t\t$patient_detail->StudyTime->EditCustomAttributes = \"\";\n\t\t\t$patient_detail->StudyTime->EditValue = ew_HtmlEncode(ew_FormatDateTime($patient_detail->StudyTime->CurrentValue, 4));\n\n\t\t\t// ContentTime\n\t\t\t$patient_detail->ContentTime->EditCustomAttributes = \"\";\n\t\t\t$patient_detail->ContentTime->EditValue = ew_HtmlEncode(ew_FormatDateTime($patient_detail->ContentTime->CurrentValue, 4));\n\n\t\t\t// InstitutionName\n\t\t\t$patient_detail->InstitutionName->EditCustomAttributes = \"\";\n\t\t\t$patient_detail->InstitutionName->EditValue = ew_HtmlEncode($patient_detail->InstitutionName->CurrentValue);\n\n\t\t\t// InstitutionAddress\n\t\t\t$patient_detail->InstitutionAddress->EditCustomAttributes = \"\";\n\t\t\t$patient_detail->InstitutionAddress->EditValue = ew_HtmlEncode($patient_detail->InstitutionAddress->CurrentValue);\n\n\t\t\t// InstitutionDepartmentName\n\t\t\t$patient_detail->InstitutionDepartmentName->EditCustomAttributes = \"\";\n\t\t\t$patient_detail->InstitutionDepartmentName->EditValue = ew_HtmlEncode($patient_detail->InstitutionDepartmentName->CurrentValue);\n\n\t\t\t// Modality\n\t\t\t$patient_detail->Modality->EditCustomAttributes = \"\";\n\t\t\t$patient_detail->Modality->EditValue = ew_HtmlEncode($patient_detail->Modality->CurrentValue);\n\n\t\t\t// OperatorName\n\t\t\t$patient_detail->OperatorName->EditCustomAttributes = \"\";\n\t\t\t$patient_detail->OperatorName->EditValue = ew_HtmlEncode($patient_detail->OperatorName->CurrentValue);\n\n\t\t\t// Manufacturer\n\t\t\t$patient_detail->Manufacturer->EditCustomAttributes = \"\";\n\t\t\t$patient_detail->Manufacturer->EditValue = ew_HtmlEncode($patient_detail->Manufacturer->CurrentValue);\n\n\t\t\t// BodyPartExamined\n\t\t\t$patient_detail->BodyPartExamined->EditCustomAttributes = \"\";\n\t\t\t$patient_detail->BodyPartExamined->EditValue = ew_HtmlEncode($patient_detail->BodyPartExamined->CurrentValue);\n\n\t\t\t// ProtocolName\n\t\t\t$patient_detail->ProtocolName->EditCustomAttributes = \"\";\n\t\t\t$patient_detail->ProtocolName->EditValue = ew_HtmlEncode($patient_detail->ProtocolName->CurrentValue);\n\n\t\t\t// AccessionNumber\n\t\t\t$patient_detail->AccessionNumber->EditCustomAttributes = \"\";\n\t\t\t$patient_detail->AccessionNumber->EditValue = ew_HtmlEncode($patient_detail->AccessionNumber->CurrentValue);\n\n\t\t\t// InstanceNumber\n\t\t\t$patient_detail->InstanceNumber->EditCustomAttributes = \"\";\n\t\t\t$patient_detail->InstanceNumber->EditValue = ew_HtmlEncode($patient_detail->InstanceNumber->CurrentValue);\n\n\t\t\t// Status\n\t\t\t$patient_detail->Status->EditCustomAttributes = \"\";\n\t\t\t$patient_detail->Status->EditValue = ew_HtmlEncode($patient_detail->Status->CurrentValue);\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\t$patient_detail->Row_Rendered();\n\t}", "title": "" }, { "docid": "a80a97bade00818bd1ddb00235fe57d1", "score": "0.52533376", "text": "function RenderRow() {\n\t\tglobal $Security, $Language, $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t// Convert decimal values if posted back\n\n\t\tif ($this->bayartitipan->FormValue == $this->bayartitipan->CurrentValue && is_numeric(ew_StrToFloat($this->bayartitipan->CurrentValue)))\n\t\t\t$this->bayartitipan->CurrentValue = ew_StrToFloat($this->bayartitipan->CurrentValue);\n\n\t\t// Convert decimal values if posted back\n\t\tif ($this->bayartitipanauto->FormValue == $this->bayartitipanauto->CurrentValue && is_numeric(ew_StrToFloat($this->bayartitipanauto->CurrentValue)))\n\t\t\t$this->bayartitipanauto->CurrentValue = ew_StrToFloat($this->bayartitipanauto->CurrentValue);\n\n\t\t// Call Row_Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// tanggal\n\t\t// periode\n\t\t// id\n\t\t// transaksi\n\t\t// referensi\n\t\t// anggota\n\t\t// namaanggota\n\t\t// alamat\n\t\t// pekerjaan\n\t\t// telepon\n\t\t// hp\n\t\t// fax\n\t\t// email\n\t\t// website\n\t\t// jenisanggota\n\t\t// model\n\t\t// jenispinjaman\n\t\t// jenisbunga\n\t\t// angsuran\n\t\t// masaangsuran\n\t\t// jatuhtempo\n\t\t// dispensasidenda\n\t\t// titipan\n\t\t// bayartitipan\n\t\t// bayartitipanauto\n\t\t// terbilang\n\t\t// petugas\n\t\t// pembayaran\n\t\t// bank\n\t\t// atasnama\n\t\t// tipe\n\t\t// kantor\n\t\t// keterangan\n\t\t// active\n\t\t// ip\n\t\t// status\n\t\t// user\n\t\t// created\n\t\t// modified\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t// tanggal\n\t\t$this->tanggal->ViewValue = $this->tanggal->CurrentValue;\n\t\t$this->tanggal->ViewValue = ew_FormatDateTime($this->tanggal->ViewValue, 0);\n\t\t$this->tanggal->ViewCustomAttributes = \"\";\n\n\t\t// periode\n\t\t$this->periode->ViewValue = $this->periode->CurrentValue;\n\t\t$this->periode->ViewCustomAttributes = \"\";\n\n\t\t// id\n\t\t$this->id->ViewValue = $this->id->CurrentValue;\n\t\t$this->id->ViewCustomAttributes = \"\";\n\n\t\t// transaksi\n\t\t$this->transaksi->ViewValue = $this->transaksi->CurrentValue;\n\t\t$this->transaksi->ViewCustomAttributes = \"\";\n\n\t\t// referensi\n\t\t$this->referensi->ViewValue = $this->referensi->CurrentValue;\n\t\t$this->referensi->ViewCustomAttributes = \"\";\n\n\t\t// anggota\n\t\t$this->anggota->ViewValue = $this->anggota->CurrentValue;\n\t\t$this->anggota->ViewCustomAttributes = \"\";\n\n\t\t// namaanggota\n\t\t$this->namaanggota->ViewValue = $this->namaanggota->CurrentValue;\n\t\t$this->namaanggota->ViewCustomAttributes = \"\";\n\n\t\t// alamat\n\t\t$this->alamat->ViewValue = $this->alamat->CurrentValue;\n\t\t$this->alamat->ViewCustomAttributes = \"\";\n\n\t\t// pekerjaan\n\t\t$this->pekerjaan->ViewValue = $this->pekerjaan->CurrentValue;\n\t\t$this->pekerjaan->ViewCustomAttributes = \"\";\n\n\t\t// telepon\n\t\t$this->telepon->ViewValue = $this->telepon->CurrentValue;\n\t\t$this->telepon->ViewCustomAttributes = \"\";\n\n\t\t// hp\n\t\t$this->hp->ViewValue = $this->hp->CurrentValue;\n\t\t$this->hp->ViewCustomAttributes = \"\";\n\n\t\t// fax\n\t\t$this->fax->ViewValue = $this->fax->CurrentValue;\n\t\t$this->fax->ViewCustomAttributes = \"\";\n\n\t\t// email\n\t\t$this->_email->ViewValue = $this->_email->CurrentValue;\n\t\t$this->_email->ViewCustomAttributes = \"\";\n\n\t\t// website\n\t\t$this->website->ViewValue = $this->website->CurrentValue;\n\t\t$this->website->ViewCustomAttributes = \"\";\n\n\t\t// jenisanggota\n\t\t$this->jenisanggota->ViewValue = $this->jenisanggota->CurrentValue;\n\t\t$this->jenisanggota->ViewCustomAttributes = \"\";\n\n\t\t// model\n\t\t$this->model->ViewValue = $this->model->CurrentValue;\n\t\t$this->model->ViewCustomAttributes = \"\";\n\n\t\t// jenispinjaman\n\t\t$this->jenispinjaman->ViewValue = $this->jenispinjaman->CurrentValue;\n\t\t$this->jenispinjaman->ViewCustomAttributes = \"\";\n\n\t\t// jenisbunga\n\t\t$this->jenisbunga->ViewValue = $this->jenisbunga->CurrentValue;\n\t\t$this->jenisbunga->ViewCustomAttributes = \"\";\n\n\t\t// angsuran\n\t\t$this->angsuran->ViewValue = $this->angsuran->CurrentValue;\n\t\t$this->angsuran->ViewCustomAttributes = \"\";\n\n\t\t// masaangsuran\n\t\t$this->masaangsuran->ViewValue = $this->masaangsuran->CurrentValue;\n\t\t$this->masaangsuran->ViewCustomAttributes = \"\";\n\n\t\t// jatuhtempo\n\t\t$this->jatuhtempo->ViewValue = $this->jatuhtempo->CurrentValue;\n\t\t$this->jatuhtempo->ViewValue = ew_FormatDateTime($this->jatuhtempo->ViewValue, 0);\n\t\t$this->jatuhtempo->ViewCustomAttributes = \"\";\n\n\t\t// dispensasidenda\n\t\t$this->dispensasidenda->ViewValue = $this->dispensasidenda->CurrentValue;\n\t\t$this->dispensasidenda->ViewCustomAttributes = \"\";\n\n\t\t// titipan\n\t\t$this->titipan->ViewValue = $this->titipan->CurrentValue;\n\t\t$this->titipan->ViewCustomAttributes = \"\";\n\n\t\t// bayartitipan\n\t\t$this->bayartitipan->ViewValue = $this->bayartitipan->CurrentValue;\n\t\t$this->bayartitipan->ViewCustomAttributes = \"\";\n\n\t\t// bayartitipanauto\n\t\t$this->bayartitipanauto->ViewValue = $this->bayartitipanauto->CurrentValue;\n\t\t$this->bayartitipanauto->ViewCustomAttributes = \"\";\n\n\t\t// terbilang\n\t\t$this->terbilang->ViewValue = $this->terbilang->CurrentValue;\n\t\t$this->terbilang->ViewCustomAttributes = \"\";\n\n\t\t// petugas\n\t\t$this->petugas->ViewValue = $this->petugas->CurrentValue;\n\t\t$this->petugas->ViewCustomAttributes = \"\";\n\n\t\t// pembayaran\n\t\t$this->pembayaran->ViewValue = $this->pembayaran->CurrentValue;\n\t\t$this->pembayaran->ViewCustomAttributes = \"\";\n\n\t\t// bank\n\t\t$this->bank->ViewValue = $this->bank->CurrentValue;\n\t\t$this->bank->ViewCustomAttributes = \"\";\n\n\t\t// atasnama\n\t\t$this->atasnama->ViewValue = $this->atasnama->CurrentValue;\n\t\t$this->atasnama->ViewCustomAttributes = \"\";\n\n\t\t// tipe\n\t\t$this->tipe->ViewValue = $this->tipe->CurrentValue;\n\t\t$this->tipe->ViewCustomAttributes = \"\";\n\n\t\t// kantor\n\t\t$this->kantor->ViewValue = $this->kantor->CurrentValue;\n\t\t$this->kantor->ViewCustomAttributes = \"\";\n\n\t\t// keterangan\n\t\t$this->keterangan->ViewValue = $this->keterangan->CurrentValue;\n\t\t$this->keterangan->ViewCustomAttributes = \"\";\n\n\t\t// active\n\t\tif (strval($this->active->CurrentValue) <> \"\") {\n\t\t\t$this->active->ViewValue = $this->active->OptionCaption($this->active->CurrentValue);\n\t\t} else {\n\t\t\t$this->active->ViewValue = NULL;\n\t\t}\n\t\t$this->active->ViewCustomAttributes = \"\";\n\n\t\t// ip\n\t\t$this->ip->ViewValue = $this->ip->CurrentValue;\n\t\t$this->ip->ViewCustomAttributes = \"\";\n\n\t\t// status\n\t\t$this->status->ViewValue = $this->status->CurrentValue;\n\t\t$this->status->ViewCustomAttributes = \"\";\n\n\t\t// user\n\t\t$this->user->ViewValue = $this->user->CurrentValue;\n\t\t$this->user->ViewCustomAttributes = \"\";\n\n\t\t// created\n\t\t$this->created->ViewValue = $this->created->CurrentValue;\n\t\t$this->created->ViewValue = ew_FormatDateTime($this->created->ViewValue, 0);\n\t\t$this->created->ViewCustomAttributes = \"\";\n\n\t\t// modified\n\t\t$this->modified->ViewValue = $this->modified->CurrentValue;\n\t\t$this->modified->ViewValue = ew_FormatDateTime($this->modified->ViewValue, 0);\n\t\t$this->modified->ViewCustomAttributes = \"\";\n\n\t\t\t// tanggal\n\t\t\t$this->tanggal->LinkCustomAttributes = \"\";\n\t\t\t$this->tanggal->HrefValue = \"\";\n\t\t\t$this->tanggal->TooltipValue = \"\";\n\n\t\t\t// periode\n\t\t\t$this->periode->LinkCustomAttributes = \"\";\n\t\t\t$this->periode->HrefValue = \"\";\n\t\t\t$this->periode->TooltipValue = \"\";\n\n\t\t\t// id\n\t\t\t$this->id->LinkCustomAttributes = \"\";\n\t\t\t$this->id->HrefValue = \"\";\n\t\t\t$this->id->TooltipValue = \"\";\n\n\t\t\t// transaksi\n\t\t\t$this->transaksi->LinkCustomAttributes = \"\";\n\t\t\t$this->transaksi->HrefValue = \"\";\n\t\t\t$this->transaksi->TooltipValue = \"\";\n\n\t\t\t// referensi\n\t\t\t$this->referensi->LinkCustomAttributes = \"\";\n\t\t\t$this->referensi->HrefValue = \"\";\n\t\t\t$this->referensi->TooltipValue = \"\";\n\n\t\t\t// anggota\n\t\t\t$this->anggota->LinkCustomAttributes = \"\";\n\t\t\t$this->anggota->HrefValue = \"\";\n\t\t\t$this->anggota->TooltipValue = \"\";\n\n\t\t\t// namaanggota\n\t\t\t$this->namaanggota->LinkCustomAttributes = \"\";\n\t\t\t$this->namaanggota->HrefValue = \"\";\n\t\t\t$this->namaanggota->TooltipValue = \"\";\n\n\t\t\t// alamat\n\t\t\t$this->alamat->LinkCustomAttributes = \"\";\n\t\t\t$this->alamat->HrefValue = \"\";\n\t\t\t$this->alamat->TooltipValue = \"\";\n\n\t\t\t// pekerjaan\n\t\t\t$this->pekerjaan->LinkCustomAttributes = \"\";\n\t\t\t$this->pekerjaan->HrefValue = \"\";\n\t\t\t$this->pekerjaan->TooltipValue = \"\";\n\n\t\t\t// telepon\n\t\t\t$this->telepon->LinkCustomAttributes = \"\";\n\t\t\t$this->telepon->HrefValue = \"\";\n\t\t\t$this->telepon->TooltipValue = \"\";\n\n\t\t\t// hp\n\t\t\t$this->hp->LinkCustomAttributes = \"\";\n\t\t\t$this->hp->HrefValue = \"\";\n\t\t\t$this->hp->TooltipValue = \"\";\n\n\t\t\t// fax\n\t\t\t$this->fax->LinkCustomAttributes = \"\";\n\t\t\t$this->fax->HrefValue = \"\";\n\t\t\t$this->fax->TooltipValue = \"\";\n\n\t\t\t// email\n\t\t\t$this->_email->LinkCustomAttributes = \"\";\n\t\t\t$this->_email->HrefValue = \"\";\n\t\t\t$this->_email->TooltipValue = \"\";\n\n\t\t\t// website\n\t\t\t$this->website->LinkCustomAttributes = \"\";\n\t\t\t$this->website->HrefValue = \"\";\n\t\t\t$this->website->TooltipValue = \"\";\n\n\t\t\t// jenisanggota\n\t\t\t$this->jenisanggota->LinkCustomAttributes = \"\";\n\t\t\t$this->jenisanggota->HrefValue = \"\";\n\t\t\t$this->jenisanggota->TooltipValue = \"\";\n\n\t\t\t// model\n\t\t\t$this->model->LinkCustomAttributes = \"\";\n\t\t\t$this->model->HrefValue = \"\";\n\t\t\t$this->model->TooltipValue = \"\";\n\n\t\t\t// jenispinjaman\n\t\t\t$this->jenispinjaman->LinkCustomAttributes = \"\";\n\t\t\t$this->jenispinjaman->HrefValue = \"\";\n\t\t\t$this->jenispinjaman->TooltipValue = \"\";\n\n\t\t\t// jenisbunga\n\t\t\t$this->jenisbunga->LinkCustomAttributes = \"\";\n\t\t\t$this->jenisbunga->HrefValue = \"\";\n\t\t\t$this->jenisbunga->TooltipValue = \"\";\n\n\t\t\t// angsuran\n\t\t\t$this->angsuran->LinkCustomAttributes = \"\";\n\t\t\t$this->angsuran->HrefValue = \"\";\n\t\t\t$this->angsuran->TooltipValue = \"\";\n\n\t\t\t// masaangsuran\n\t\t\t$this->masaangsuran->LinkCustomAttributes = \"\";\n\t\t\t$this->masaangsuran->HrefValue = \"\";\n\t\t\t$this->masaangsuran->TooltipValue = \"\";\n\n\t\t\t// jatuhtempo\n\t\t\t$this->jatuhtempo->LinkCustomAttributes = \"\";\n\t\t\t$this->jatuhtempo->HrefValue = \"\";\n\t\t\t$this->jatuhtempo->TooltipValue = \"\";\n\n\t\t\t// dispensasidenda\n\t\t\t$this->dispensasidenda->LinkCustomAttributes = \"\";\n\t\t\t$this->dispensasidenda->HrefValue = \"\";\n\t\t\t$this->dispensasidenda->TooltipValue = \"\";\n\n\t\t\t// titipan\n\t\t\t$this->titipan->LinkCustomAttributes = \"\";\n\t\t\t$this->titipan->HrefValue = \"\";\n\t\t\t$this->titipan->TooltipValue = \"\";\n\n\t\t\t// bayartitipan\n\t\t\t$this->bayartitipan->LinkCustomAttributes = \"\";\n\t\t\t$this->bayartitipan->HrefValue = \"\";\n\t\t\t$this->bayartitipan->TooltipValue = \"\";\n\n\t\t\t// bayartitipanauto\n\t\t\t$this->bayartitipanauto->LinkCustomAttributes = \"\";\n\t\t\t$this->bayartitipanauto->HrefValue = \"\";\n\t\t\t$this->bayartitipanauto->TooltipValue = \"\";\n\n\t\t\t// terbilang\n\t\t\t$this->terbilang->LinkCustomAttributes = \"\";\n\t\t\t$this->terbilang->HrefValue = \"\";\n\t\t\t$this->terbilang->TooltipValue = \"\";\n\n\t\t\t// petugas\n\t\t\t$this->petugas->LinkCustomAttributes = \"\";\n\t\t\t$this->petugas->HrefValue = \"\";\n\t\t\t$this->petugas->TooltipValue = \"\";\n\n\t\t\t// pembayaran\n\t\t\t$this->pembayaran->LinkCustomAttributes = \"\";\n\t\t\t$this->pembayaran->HrefValue = \"\";\n\t\t\t$this->pembayaran->TooltipValue = \"\";\n\n\t\t\t// bank\n\t\t\t$this->bank->LinkCustomAttributes = \"\";\n\t\t\t$this->bank->HrefValue = \"\";\n\t\t\t$this->bank->TooltipValue = \"\";\n\n\t\t\t// atasnama\n\t\t\t$this->atasnama->LinkCustomAttributes = \"\";\n\t\t\t$this->atasnama->HrefValue = \"\";\n\t\t\t$this->atasnama->TooltipValue = \"\";\n\n\t\t\t// tipe\n\t\t\t$this->tipe->LinkCustomAttributes = \"\";\n\t\t\t$this->tipe->HrefValue = \"\";\n\t\t\t$this->tipe->TooltipValue = \"\";\n\n\t\t\t// kantor\n\t\t\t$this->kantor->LinkCustomAttributes = \"\";\n\t\t\t$this->kantor->HrefValue = \"\";\n\t\t\t$this->kantor->TooltipValue = \"\";\n\n\t\t\t// keterangan\n\t\t\t$this->keterangan->LinkCustomAttributes = \"\";\n\t\t\t$this->keterangan->HrefValue = \"\";\n\t\t\t$this->keterangan->TooltipValue = \"\";\n\n\t\t\t// active\n\t\t\t$this->active->LinkCustomAttributes = \"\";\n\t\t\t$this->active->HrefValue = \"\";\n\t\t\t$this->active->TooltipValue = \"\";\n\n\t\t\t// ip\n\t\t\t$this->ip->LinkCustomAttributes = \"\";\n\t\t\t$this->ip->HrefValue = \"\";\n\t\t\t$this->ip->TooltipValue = \"\";\n\n\t\t\t// status\n\t\t\t$this->status->LinkCustomAttributes = \"\";\n\t\t\t$this->status->HrefValue = \"\";\n\t\t\t$this->status->TooltipValue = \"\";\n\n\t\t\t// user\n\t\t\t$this->user->LinkCustomAttributes = \"\";\n\t\t\t$this->user->HrefValue = \"\";\n\t\t\t$this->user->TooltipValue = \"\";\n\n\t\t\t// created\n\t\t\t$this->created->LinkCustomAttributes = \"\";\n\t\t\t$this->created->HrefValue = \"\";\n\t\t\t$this->created->TooltipValue = \"\";\n\n\t\t\t// modified\n\t\t\t$this->modified->LinkCustomAttributes = \"\";\n\t\t\t$this->modified->HrefValue = \"\";\n\t\t\t$this->modified->TooltipValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "title": "" }, { "docid": "16fcd73fae5946feeedd7c6bd2fd09a9", "score": "0.525026", "text": "function tablerow_open(){\n $this->_counter['cell_counter'] = 0;\n $class = 'row' . $this->_counter['row_counter']++;\n $this->doc .= DOKU_TAB . '<tr class=\"'.$class.'\">' . DOKU_LF . DOKU_TAB . DOKU_TAB;\n }", "title": "" }, { "docid": "efd98e204516f1fde7d46d1321e638b9", "score": "0.5243493", "text": "function RenderRow() {\n\t\tglobal $conn, $Security, $Language, $t_tinbai_levelsite;\n\n\t\t// Initialize URLs\n\t\t// Call Row_Rendering event\n\n\t\t$t_tinbai_levelsite->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// PK_TINBAI_ID\n\n\t\t$t_tinbai_levelsite->PK_TINBAI_ID->CellCssStyle = \"\"; $t_tinbai_levelsite->PK_TINBAI_ID->CellCssClass = \"\";\n\t\t$t_tinbai_levelsite->PK_TINBAI_ID->CellAttrs = array(); $t_tinbai_levelsite->PK_TINBAI_ID->ViewAttrs = array(); $t_tinbai_levelsite->PK_TINBAI_ID->EditAttrs = array();\n\n\t\t// FK_CONGTY_ID\n\t\t$t_tinbai_levelsite->FK_CONGTY_ID->CellCssStyle = \"\"; $t_tinbai_levelsite->FK_CONGTY_ID->CellCssClass = \"\";\n\t\t$t_tinbai_levelsite->FK_CONGTY_ID->CellAttrs = array(); $t_tinbai_levelsite->FK_CONGTY_ID->ViewAttrs = array(); $t_tinbai_levelsite->FK_CONGTY_ID->EditAttrs = array();\n\n\t\t// FK_CHUYENMUC_ID\n\t\t$t_tinbai_levelsite->FK_CHUYENMUC_ID->CellCssStyle = \"\"; $t_tinbai_levelsite->FK_CHUYENMUC_ID->CellCssClass = \"\";\n\t\t$t_tinbai_levelsite->FK_CHUYENMUC_ID->CellAttrs = array(); $t_tinbai_levelsite->FK_CHUYENMUC_ID->ViewAttrs = array(); $t_tinbai_levelsite->FK_CHUYENMUC_ID->EditAttrs = array();\n\n\t\t// FK_DOITUONG_ID\n\t\t$t_tinbai_levelsite->FK_DOITUONG_ID->CellCssStyle = \"\"; $t_tinbai_levelsite->FK_DOITUONG_ID->CellCssClass = \"\";\n\t\t$t_tinbai_levelsite->FK_DOITUONG_ID->CellAttrs = array(); $t_tinbai_levelsite->FK_DOITUONG_ID->ViewAttrs = array(); $t_tinbai_levelsite->FK_DOITUONG_ID->EditAttrs = array();\n\n\t\t// C_TITLE\n\t\t$t_tinbai_levelsite->C_TITLE->CellCssStyle = \"\"; $t_tinbai_levelsite->C_TITLE->CellCssClass = \"\";\n\t\t$t_tinbai_levelsite->C_TITLE->CellAttrs = array(); $t_tinbai_levelsite->C_TITLE->ViewAttrs = array(); $t_tinbai_levelsite->C_TITLE->EditAttrs = array();\n\n\t\t// C_SUMARY\n\t\t$t_tinbai_levelsite->C_SUMARY->CellCssStyle = \"\"; $t_tinbai_levelsite->C_SUMARY->CellCssClass = \"\";\n\t\t$t_tinbai_levelsite->C_SUMARY->CellAttrs = array(); $t_tinbai_levelsite->C_SUMARY->ViewAttrs = array(); $t_tinbai_levelsite->C_SUMARY->EditAttrs = array();\n\n\t\t// C_CONTENTS\n\t\t$t_tinbai_levelsite->C_CONTENTS->CellCssStyle = \"\"; $t_tinbai_levelsite->C_CONTENTS->CellCssClass = \"\";\n\t\t$t_tinbai_levelsite->C_CONTENTS->CellAttrs = array(); $t_tinbai_levelsite->C_CONTENTS->ViewAttrs = array(); $t_tinbai_levelsite->C_CONTENTS->EditAttrs = array();\n\n\t\t// C_PUBLISH\n\t\t$t_tinbai_levelsite->C_PUBLISH->CellCssStyle = \"\"; $t_tinbai_levelsite->C_PUBLISH->CellCssClass = \"\";\n\t\t$t_tinbai_levelsite->C_PUBLISH->CellAttrs = array(); $t_tinbai_levelsite->C_PUBLISH->ViewAttrs = array(); $t_tinbai_levelsite->C_PUBLISH->EditAttrs = array();\n\n\t\t// C_ACTIVE\n\t\t$t_tinbai_levelsite->C_ACTIVE->CellCssStyle = \"\"; $t_tinbai_levelsite->C_ACTIVE->CellCssClass = \"\";\n\t\t$t_tinbai_levelsite->C_ACTIVE->CellAttrs = array(); $t_tinbai_levelsite->C_ACTIVE->ViewAttrs = array(); $t_tinbai_levelsite->C_ACTIVE->EditAttrs = array();\n\n\t\t// C_FILEANH\n\t\t$t_tinbai_levelsite->C_FILEANH->CellCssStyle = \"\"; $t_tinbai_levelsite->C_FILEANH->CellCssClass = \"\";\n\t\t$t_tinbai_levelsite->C_FILEANH->CellAttrs = array(); $t_tinbai_levelsite->C_FILEANH->ViewAttrs = array(); $t_tinbai_levelsite->C_FILEANH->EditAttrs = array();\n\n\t\t// C_TIMEPUBLISH\n\t\t$t_tinbai_levelsite->C_TIMEPUBLISH->CellCssStyle = \"\"; $t_tinbai_levelsite->C_TIMEPUBLISH->CellCssClass = \"\";\n\t\t$t_tinbai_levelsite->C_TIMEPUBLISH->CellAttrs = array(); $t_tinbai_levelsite->C_TIMEPUBLISH->ViewAttrs = array(); $t_tinbai_levelsite->C_TIMEPUBLISH->EditAttrs = array();\n\n\t\t// C_COMENT\n\t\t$t_tinbai_levelsite->C_COMENT->CellCssStyle = \"\"; $t_tinbai_levelsite->C_COMENT->CellCssClass = \"\";\n\t\t$t_tinbai_levelsite->C_COMENT->CellAttrs = array(); $t_tinbai_levelsite->C_COMENT->ViewAttrs = array(); $t_tinbai_levelsite->C_COMENT->EditAttrs = array();\n\n\t\t// C_HITS\n\t\t$t_tinbai_levelsite->C_HITS->CellCssStyle = \"\"; $t_tinbai_levelsite->C_HITS->CellCssClass = \"\";\n\t\t$t_tinbai_levelsite->C_HITS->CellAttrs = array(); $t_tinbai_levelsite->C_HITS->ViewAttrs = array(); $t_tinbai_levelsite->C_HITS->EditAttrs = array();\n\n\t\t// C_VISITOR\n\t\t$t_tinbai_levelsite->C_VISITOR->CellCssStyle = \"\"; $t_tinbai_levelsite->C_VISITOR->CellCssClass = \"\";\n\t\t$t_tinbai_levelsite->C_VISITOR->CellAttrs = array(); $t_tinbai_levelsite->C_VISITOR->ViewAttrs = array(); $t_tinbai_levelsite->C_VISITOR->EditAttrs = array();\n\n\t\t// C_STATUS\n\t\t$t_tinbai_levelsite->C_STATUS->CellCssStyle = \"\"; $t_tinbai_levelsite->C_STATUS->CellCssClass = \"\";\n\t\t$t_tinbai_levelsite->C_STATUS->CellAttrs = array(); $t_tinbai_levelsite->C_STATUS->ViewAttrs = array(); $t_tinbai_levelsite->C_STATUS->EditAttrs = array();\n\n\t\t// C_SOURCE\n\t\t$t_tinbai_levelsite->C_SOURCE->CellCssStyle = \"\"; $t_tinbai_levelsite->C_SOURCE->CellCssClass = \"\";\n\t\t$t_tinbai_levelsite->C_SOURCE->CellAttrs = array(); $t_tinbai_levelsite->C_SOURCE->ViewAttrs = array(); $t_tinbai_levelsite->C_SOURCE->EditAttrs = array();\n\n\t\t// C_ORDER\n\t\t$t_tinbai_levelsite->C_ORDER->CellCssStyle = \"\"; $t_tinbai_levelsite->C_ORDER->CellCssClass = \"\";\n\t\t$t_tinbai_levelsite->C_ORDER->CellAttrs = array(); $t_tinbai_levelsite->C_ORDER->ViewAttrs = array(); $t_tinbai_levelsite->C_ORDER->EditAttrs = array();\n\n\t\t// C_USER_ADD\n\t\t$t_tinbai_levelsite->C_USER_ADD->CellCssStyle = \"\"; $t_tinbai_levelsite->C_USER_ADD->CellCssClass = \"\";\n\t\t$t_tinbai_levelsite->C_USER_ADD->CellAttrs = array(); $t_tinbai_levelsite->C_USER_ADD->ViewAttrs = array(); $t_tinbai_levelsite->C_USER_ADD->EditAttrs = array();\n\n\t\t// C_ADD_TIME\n\t\t$t_tinbai_levelsite->C_ADD_TIME->CellCssStyle = \"\"; $t_tinbai_levelsite->C_ADD_TIME->CellCssClass = \"\";\n\t\t$t_tinbai_levelsite->C_ADD_TIME->CellAttrs = array(); $t_tinbai_levelsite->C_ADD_TIME->ViewAttrs = array(); $t_tinbai_levelsite->C_ADD_TIME->EditAttrs = array();\n\n\t\t// C_USER_EDIT\n\t\t$t_tinbai_levelsite->C_USER_EDIT->CellCssStyle = \"\"; $t_tinbai_levelsite->C_USER_EDIT->CellCssClass = \"\";\n\t\t$t_tinbai_levelsite->C_USER_EDIT->CellAttrs = array(); $t_tinbai_levelsite->C_USER_EDIT->ViewAttrs = array(); $t_tinbai_levelsite->C_USER_EDIT->EditAttrs = array();\n\n\t\t// C_EDIT_TIME\n\t\t$t_tinbai_levelsite->C_EDIT_TIME->CellCssStyle = \"\"; $t_tinbai_levelsite->C_EDIT_TIME->CellCssClass = \"\";\n\t\t$t_tinbai_levelsite->C_EDIT_TIME->CellAttrs = array(); $t_tinbai_levelsite->C_EDIT_TIME->ViewAttrs = array(); $t_tinbai_levelsite->C_EDIT_TIME->EditAttrs = array();\n\n\t\t// FK_NGUOIDUNG_ID\n\t\t$t_tinbai_levelsite->FK_NGUOIDUNG_ID->CellCssStyle = \"\"; $t_tinbai_levelsite->FK_NGUOIDUNG_ID->CellCssClass = \"\";\n\t\t$t_tinbai_levelsite->FK_NGUOIDUNG_ID->CellAttrs = array(); $t_tinbai_levelsite->FK_NGUOIDUNG_ID->ViewAttrs = array(); $t_tinbai_levelsite->FK_NGUOIDUNG_ID->EditAttrs = array();\n\n\t\t// FK_EDITOR_ID\n\t\t$t_tinbai_levelsite->FK_EDITOR_ID->CellCssStyle = \"\"; $t_tinbai_levelsite->FK_EDITOR_ID->CellCssClass = \"\";\n\t\t$t_tinbai_levelsite->FK_EDITOR_ID->CellAttrs = array(); $t_tinbai_levelsite->FK_EDITOR_ID->ViewAttrs = array(); $t_tinbai_levelsite->FK_EDITOR_ID->EditAttrs = array();\n\t\tif ($t_tinbai_levelsite->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t\t// PK_TINBAI_ID\n\t\t\t$t_tinbai_levelsite->PK_TINBAI_ID->ViewValue = $t_tinbai_levelsite->PK_TINBAI_ID->CurrentValue;\n\t\t\t$t_tinbai_levelsite->PK_TINBAI_ID->CssStyle = \"\";\n\t\t\t$t_tinbai_levelsite->PK_TINBAI_ID->CssClass = \"\";\n\t\t\t$t_tinbai_levelsite->PK_TINBAI_ID->ViewCustomAttributes = \"\";\n\n\t\t\t// FK_CONGTY_ID\n\t\t\tif (strval($t_tinbai_levelsite->FK_CONGTY_ID->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`PK_MACONGTY` = \" . ew_AdjustSql($t_tinbai_levelsite->FK_CONGTY_ID->CurrentValue) . \"\";\n\t\t\t$sSqlWrk = \"SELECT `C_TENCONGTY` FROM `t_congty`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$t_tinbai_levelsite->FK_CONGTY_ID->ViewValue = $rswrk->fields('C_TENCONGTY');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$t_tinbai_levelsite->FK_CONGTY_ID->ViewValue = $t_tinbai_levelsite->FK_CONGTY_ID->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$t_tinbai_levelsite->FK_CONGTY_ID->ViewValue = NULL;\n\t\t\t}\n\t\t\t$t_tinbai_levelsite->FK_CONGTY_ID->CssStyle = \"\";\n\t\t\t$t_tinbai_levelsite->FK_CONGTY_ID->CssClass = \"\";\n\t\t\t$t_tinbai_levelsite->FK_CONGTY_ID->ViewCustomAttributes = \"\";\n\n\t\t\t// FK_CHUYENMUC_ID\n\t\t\tif (strval($t_tinbai_levelsite->FK_CHUYENMUC_ID->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`PK_CHUYENMUC` = \" . ew_AdjustSql($t_tinbai_levelsite->FK_CHUYENMUC_ID->CurrentValue) . \"\";\n\t\t\t$sSqlWrk = \"SELECT `C_NAME` FROM `t_chuyenmuc_levelsite`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$t_tinbai_levelsite->FK_CHUYENMUC_ID->ViewValue = $rswrk->fields('C_NAME');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$t_tinbai_levelsite->FK_CHUYENMUC_ID->ViewValue = $t_tinbai_levelsite->FK_CHUYENMUC_ID->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$t_tinbai_levelsite->FK_CHUYENMUC_ID->ViewValue = NULL;\n\t\t\t}\n\t\t\t$t_tinbai_levelsite->FK_CHUYENMUC_ID->CssStyle = \"\";\n\t\t\t$t_tinbai_levelsite->FK_CHUYENMUC_ID->CssClass = \"\";\n\t\t\t$t_tinbai_levelsite->FK_CHUYENMUC_ID->ViewCustomAttributes = \"\";\n\n\t\t\t// FK_DOITUONG_ID\n\t\t\tif (strval($t_tinbai_levelsite->FK_DOITUONG_ID->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`PK_DOITUONG` = \" . ew_AdjustSql($t_tinbai_levelsite->FK_DOITUONG_ID->CurrentValue) . \"\";\n\t\t\t$sSqlWrk = \"SELECT `C_NAME` FROM `t_doituong_levelsite`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$t_tinbai_levelsite->FK_DOITUONG_ID->ViewValue = $rswrk->fields('C_NAME');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$t_tinbai_levelsite->FK_DOITUONG_ID->ViewValue = $t_tinbai_levelsite->FK_DOITUONG_ID->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$t_tinbai_levelsite->FK_DOITUONG_ID->ViewValue = NULL;\n\t\t\t}\n\t\t\t$t_tinbai_levelsite->FK_DOITUONG_ID->CssStyle = \"\";\n\t\t\t$t_tinbai_levelsite->FK_DOITUONG_ID->CssClass = \"\";\n\t\t\t$t_tinbai_levelsite->FK_DOITUONG_ID->ViewCustomAttributes = \"\";\n\n\t\t\t// C_TITLE\n\t\t\t$t_tinbai_levelsite->C_TITLE->ViewValue = $t_tinbai_levelsite->C_TITLE->CurrentValue;\n\t\t\t$t_tinbai_levelsite->C_TITLE->CssStyle = \"\";\n\t\t\t$t_tinbai_levelsite->C_TITLE->CssClass = \"\";\n\t\t\t$t_tinbai_levelsite->C_TITLE->ViewCustomAttributes = \"\";\n\n\t\t\t// C_SUMARY\n\t\t\t$t_tinbai_levelsite->C_SUMARY->ViewValue = $t_tinbai_levelsite->C_SUMARY->CurrentValue;\n\t\t\t$t_tinbai_levelsite->C_SUMARY->CssStyle = \"\";\n\t\t\t$t_tinbai_levelsite->C_SUMARY->CssClass = \"\";\n\t\t\t$t_tinbai_levelsite->C_SUMARY->ViewCustomAttributes = \"\";\n\n\t\t\t// C_CONTENTS\n\t\t\t$t_tinbai_levelsite->C_CONTENTS->ViewValue = $t_tinbai_levelsite->C_CONTENTS->CurrentValue;\n\t\t\t$t_tinbai_levelsite->C_CONTENTS->CssStyle = \"\";\n\t\t\t$t_tinbai_levelsite->C_CONTENTS->CssClass = \"\";\n\t\t\t$t_tinbai_levelsite->C_CONTENTS->ViewCustomAttributes = \"\";\n\n\t\t\t// C_PUBLISH\n\t\t\tif (strval($t_tinbai_levelsite->C_PUBLISH->CurrentValue) <> \"\") {\n\t\t\t\tswitch ($t_tinbai_levelsite->C_PUBLISH->CurrentValue) {\n\t\t\t\t\tcase \"0\":\n\t\t\t\t\t\t$t_tinbai_levelsite->C_PUBLISH->ViewValue = \"Khong kich hoat MainSite\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"1\":\n\t\t\t\t\t\t$t_tinbai_levelsite->C_PUBLISH->ViewValue = \"Kich hoat MainSite\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$t_tinbai_levelsite->C_PUBLISH->ViewValue = $t_tinbai_levelsite->C_PUBLISH->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$t_tinbai_levelsite->C_PUBLISH->ViewValue = NULL;\n\t\t\t}\n\t\t\t$t_tinbai_levelsite->C_PUBLISH->CssStyle = \"\";\n\t\t\t$t_tinbai_levelsite->C_PUBLISH->CssClass = \"\";\n\t\t\t$t_tinbai_levelsite->C_PUBLISH->ViewCustomAttributes = \"\";\n\n\t\t\t// C_ACTIVE\n\t\t\tif (strval($t_tinbai_levelsite->C_ACTIVE->CurrentValue) <> \"\") {\n\t\t\t\tswitch ($t_tinbai_levelsite->C_ACTIVE->CurrentValue) {\n\t\t\t\t\tcase \"0\":\n\t\t\t\t\t\t$t_tinbai_levelsite->C_ACTIVE->ViewValue = \"Khong kich hoat len Level Site\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"1\":\n\t\t\t\t\t\t$t_tinbai_levelsite->C_ACTIVE->ViewValue = \"Kich hoat len Level Site\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$t_tinbai_levelsite->C_ACTIVE->ViewValue = $t_tinbai_levelsite->C_ACTIVE->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$t_tinbai_levelsite->C_ACTIVE->ViewValue = NULL;\n\t\t\t}\n\t\t\t$t_tinbai_levelsite->C_ACTIVE->CssStyle = \"\";\n\t\t\t$t_tinbai_levelsite->C_ACTIVE->CssClass = \"\";\n\t\t\t$t_tinbai_levelsite->C_ACTIVE->ViewCustomAttributes = \"\";\n\n\t\t\t// C_FILEANH\n\t\t\tif (!ew_Empty($t_tinbai_levelsite->C_FILEANH->Upload->DbValue)) {\n\t\t\t\t$t_tinbai_levelsite->C_FILEANH->ViewValue = $t_tinbai_levelsite->C_FILEANH->Upload->DbValue;\n\t\t\t\t$t_tinbai_levelsite->C_FILEANH->ImageAlt = $t_tinbai_levelsite->C_FILEANH->FldAlt();\n\t\t\t} else {\n\t\t\t\t$t_tinbai_levelsite->C_FILEANH->ViewValue = \"\";\n\t\t\t}\n\t\t\t$t_tinbai_levelsite->C_FILEANH->CssStyle = \"\";\n\t\t\t$t_tinbai_levelsite->C_FILEANH->CssClass = \"\";\n\t\t\t$t_tinbai_levelsite->C_FILEANH->ViewCustomAttributes = \"\";\n\n\t\t\t// C_TIMEPUBLISH\n\t\t\t$t_tinbai_levelsite->C_TIMEPUBLISH->ViewValue = $t_tinbai_levelsite->C_TIMEPUBLISH->CurrentValue;\n\t\t\t$t_tinbai_levelsite->C_TIMEPUBLISH->ViewValue = ew_FormatDateTime($t_tinbai_levelsite->C_TIMEPUBLISH->ViewValue, 7);\n\t\t\t$t_tinbai_levelsite->C_TIMEPUBLISH->CssStyle = \"\";\n\t\t\t$t_tinbai_levelsite->C_TIMEPUBLISH->CssClass = \"\";\n\t\t\t$t_tinbai_levelsite->C_TIMEPUBLISH->ViewCustomAttributes = \"\";\n\n\t\t\t// C_COMENT\n\t\t\tif (strval($t_tinbai_levelsite->C_COMENT->CurrentValue) <> \"\") {\n\t\t\t\tswitch ($t_tinbai_levelsite->C_COMENT->CurrentValue) {\n\t\t\t\t\tcase \"0\":\n\t\t\t\t\t\t$t_tinbai_levelsite->C_COMENT->ViewValue = \"Khong cho phep comment\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"1\":\n\t\t\t\t\t\t$t_tinbai_levelsite->C_COMENT->ViewValue = \"Cho phep comment\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$t_tinbai_levelsite->C_COMENT->ViewValue = $t_tinbai_levelsite->C_COMENT->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$t_tinbai_levelsite->C_COMENT->ViewValue = NULL;\n\t\t\t}\n\t\t\t$t_tinbai_levelsite->C_COMENT->CssStyle = \"\";\n\t\t\t$t_tinbai_levelsite->C_COMENT->CssClass = \"\";\n\t\t\t$t_tinbai_levelsite->C_COMENT->ViewCustomAttributes = \"\";\n\n\t\t\t// C_HITS\n\t\t\tif (strval($t_tinbai_levelsite->C_HITS->CurrentValue) <> \"\") {\n\t\t\t\tswitch ($t_tinbai_levelsite->C_HITS->CurrentValue) {\n\t\t\t\t\tcase \"0\":\n\t\t\t\t\t\t$t_tinbai_levelsite->C_HITS->ViewValue = \"Khong la tin noi bat\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"1\":\n\t\t\t\t\t\t$t_tinbai_levelsite->C_HITS->ViewValue = \"La tin noi bat\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$t_tinbai_levelsite->C_HITS->ViewValue = $t_tinbai_levelsite->C_HITS->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$t_tinbai_levelsite->C_HITS->ViewValue = NULL;\n\t\t\t}\n\t\t\t$t_tinbai_levelsite->C_HITS->CssStyle = \"\";\n\t\t\t$t_tinbai_levelsite->C_HITS->CssClass = \"\";\n\t\t\t$t_tinbai_levelsite->C_HITS->ViewCustomAttributes = \"\";\n\n\t\t\t// C_VISITOR\n\t\t\t$t_tinbai_levelsite->C_VISITOR->ViewValue = $t_tinbai_levelsite->C_VISITOR->CurrentValue;\n\t\t\t$t_tinbai_levelsite->C_VISITOR->CssStyle = \"\";\n\t\t\t$t_tinbai_levelsite->C_VISITOR->CssClass = \"\";\n\t\t\t$t_tinbai_levelsite->C_VISITOR->ViewCustomAttributes = \"\";\n\n\t\t\t// C_STATUS\n\t\t\t$t_tinbai_levelsite->C_STATUS->ViewValue = $t_tinbai_levelsite->C_STATUS->CurrentValue;\n\t\t\t$t_tinbai_levelsite->C_STATUS->CssStyle = \"\";\n\t\t\t$t_tinbai_levelsite->C_STATUS->CssClass = \"\";\n\t\t\t$t_tinbai_levelsite->C_STATUS->ViewCustomAttributes = \"\";\n\n\t\t\t// C_SOURCE\n\t\t\t$t_tinbai_levelsite->C_SOURCE->ViewValue = $t_tinbai_levelsite->C_SOURCE->CurrentValue;\n\t\t\t$t_tinbai_levelsite->C_SOURCE->CssStyle = \"\";\n\t\t\t$t_tinbai_levelsite->C_SOURCE->CssClass = \"\";\n\t\t\t$t_tinbai_levelsite->C_SOURCE->ViewCustomAttributes = \"\";\n\n\t\t\t// C_ORDER\n\t\t\t$t_tinbai_levelsite->C_ORDER->ViewValue = $t_tinbai_levelsite->C_ORDER->CurrentValue;\n\t\t\t$t_tinbai_levelsite->C_ORDER->ViewValue = ew_FormatDateTime($t_tinbai_levelsite->C_ORDER->ViewValue, 7);\n\t\t\t$t_tinbai_levelsite->C_ORDER->CssStyle = \"\";\n\t\t\t$t_tinbai_levelsite->C_ORDER->CssClass = \"\";\n\t\t\t$t_tinbai_levelsite->C_ORDER->ViewCustomAttributes = \"\";\n\n\t\t\t// C_USER_ADD\n\t\t\t$t_tinbai_levelsite->C_USER_ADD->ViewValue = $t_tinbai_levelsite->C_USER_ADD->CurrentValue;\n\t\t\t$t_tinbai_levelsite->C_USER_ADD->CssStyle = \"\";\n\t\t\t$t_tinbai_levelsite->C_USER_ADD->CssClass = \"\";\n\t\t\t$t_tinbai_levelsite->C_USER_ADD->ViewCustomAttributes = \"\";\n\n\t\t\t// C_ADD_TIME\n\t\t\t$t_tinbai_levelsite->C_ADD_TIME->ViewValue = $t_tinbai_levelsite->C_ADD_TIME->CurrentValue;\n\t\t\t$t_tinbai_levelsite->C_ADD_TIME->ViewValue = ew_FormatDateTime($t_tinbai_levelsite->C_ADD_TIME->ViewValue, 7);\n\t\t\t$t_tinbai_levelsite->C_ADD_TIME->CssStyle = \"\";\n\t\t\t$t_tinbai_levelsite->C_ADD_TIME->CssClass = \"\";\n\t\t\t$t_tinbai_levelsite->C_ADD_TIME->ViewCustomAttributes = \"\";\n\n\t\t\t// C_USER_EDIT\n\t\t\t$t_tinbai_levelsite->C_USER_EDIT->ViewValue = $t_tinbai_levelsite->C_USER_EDIT->CurrentValue;\n\t\t\t$t_tinbai_levelsite->C_USER_EDIT->CssStyle = \"\";\n\t\t\t$t_tinbai_levelsite->C_USER_EDIT->CssClass = \"\";\n\t\t\t$t_tinbai_levelsite->C_USER_EDIT->ViewCustomAttributes = \"\";\n\n\t\t\t// C_EDIT_TIME\n\t\t\t$t_tinbai_levelsite->C_EDIT_TIME->ViewValue = $t_tinbai_levelsite->C_EDIT_TIME->CurrentValue;\n\t\t\t$t_tinbai_levelsite->C_EDIT_TIME->ViewValue = ew_FormatDateTime($t_tinbai_levelsite->C_EDIT_TIME->ViewValue, 7);\n\t\t\t$t_tinbai_levelsite->C_EDIT_TIME->CssStyle = \"\";\n\t\t\t$t_tinbai_levelsite->C_EDIT_TIME->CssClass = \"\";\n\t\t\t$t_tinbai_levelsite->C_EDIT_TIME->ViewCustomAttributes = \"\";\n\n\t\t\t// FK_NGUOIDUNG_ID\n\t\t\t$t_tinbai_levelsite->FK_NGUOIDUNG_ID->CssStyle = \"\";\n\t\t\t$t_tinbai_levelsite->FK_NGUOIDUNG_ID->CssClass = \"\";\n\t\t\t$t_tinbai_levelsite->FK_NGUOIDUNG_ID->ViewCustomAttributes = \"\";\n\n\t\t\t// FK_EDITOR_ID\n\t\t\t$t_tinbai_levelsite->FK_EDITOR_ID->ViewValue = $t_tinbai_levelsite->FK_EDITOR_ID->CurrentValue;\n\t\t\t$t_tinbai_levelsite->FK_EDITOR_ID->CssStyle = \"\";\n\t\t\t$t_tinbai_levelsite->FK_EDITOR_ID->CssClass = \"\";\n\t\t\t$t_tinbai_levelsite->FK_EDITOR_ID->ViewCustomAttributes = \"\";\n\n\t\t\t// PK_TINBAI_ID\n\t\t\t$t_tinbai_levelsite->PK_TINBAI_ID->HrefValue = \"\";\n\t\t\t$t_tinbai_levelsite->PK_TINBAI_ID->TooltipValue = \"\";\n\n\t\t\t// FK_CONGTY_ID\n\t\t\t$t_tinbai_levelsite->FK_CONGTY_ID->HrefValue = \"\";\n\t\t\t$t_tinbai_levelsite->FK_CONGTY_ID->TooltipValue = \"\";\n\n\t\t\t// FK_CHUYENMUC_ID\n\t\t\t$t_tinbai_levelsite->FK_CHUYENMUC_ID->HrefValue = \"\";\n\t\t\t$t_tinbai_levelsite->FK_CHUYENMUC_ID->TooltipValue = \"\";\n\n\t\t\t// FK_DOITUONG_ID\n\t\t\t$t_tinbai_levelsite->FK_DOITUONG_ID->HrefValue = \"\";\n\t\t\t$t_tinbai_levelsite->FK_DOITUONG_ID->TooltipValue = \"\";\n\n\t\t\t// C_TITLE\n\t\t\t$t_tinbai_levelsite->C_TITLE->HrefValue = \"\";\n\t\t\t$t_tinbai_levelsite->C_TITLE->TooltipValue = \"\";\n\n\t\t\t// C_SUMARY\n\t\t\t$t_tinbai_levelsite->C_SUMARY->HrefValue = \"\";\n\t\t\t$t_tinbai_levelsite->C_SUMARY->TooltipValue = \"\";\n\n\t\t\t// C_CONTENTS\n\t\t\t$t_tinbai_levelsite->C_CONTENTS->HrefValue = \"\";\n\t\t\t$t_tinbai_levelsite->C_CONTENTS->TooltipValue = \"\";\n\n\t\t\t// C_PUBLISH\n\t\t\t$t_tinbai_levelsite->C_PUBLISH->HrefValue = \"\";\n\t\t\t$t_tinbai_levelsite->C_PUBLISH->TooltipValue = \"\";\n\n\t\t\t// C_ACTIVE\n\t\t\t$t_tinbai_levelsite->C_ACTIVE->HrefValue = \"\";\n\t\t\t$t_tinbai_levelsite->C_ACTIVE->TooltipValue = \"\";\n\n\t\t\t// C_FILEANH\n\t\t\tif (!ew_Empty($t_tinbai_levelsite->C_FILEANH->Upload->DbValue)) {\n\t\t\t\t$t_tinbai_levelsite->C_FILEANH->HrefValue = ew_UploadPathEx(FALSE, $t_tinbai_levelsite->C_FILEANH->UploadPath) . ((!empty($t_tinbai_levelsite->C_FILEANH->ViewValue)) ? $t_tinbai_levelsite->C_FILEANH->ViewValue : $t_tinbai_levelsite->C_FILEANH->CurrentValue);\n\t\t\t\tif ($t_tinbai_levelsite->Export <> \"\") $t_tinbai_levelsite->C_FILEANH->HrefValue = ew_ConvertFullUrl($t_tinbai_levelsite->C_FILEANH->HrefValue);\n\t\t\t} else {\n\t\t\t\t$t_tinbai_levelsite->C_FILEANH->HrefValue = \"\";\n\t\t\t}\n\t\t\t$t_tinbai_levelsite->C_FILEANH->TooltipValue = \"\";\n\n\t\t\t// C_TIMEPUBLISH\n\t\t\t$t_tinbai_levelsite->C_TIMEPUBLISH->HrefValue = \"\";\n\t\t\t$t_tinbai_levelsite->C_TIMEPUBLISH->TooltipValue = \"\";\n\n\t\t\t// C_COMENT\n\t\t\t$t_tinbai_levelsite->C_COMENT->HrefValue = \"\";\n\t\t\t$t_tinbai_levelsite->C_COMENT->TooltipValue = \"\";\n\n\t\t\t// C_HITS\n\t\t\t$t_tinbai_levelsite->C_HITS->HrefValue = \"\";\n\t\t\t$t_tinbai_levelsite->C_HITS->TooltipValue = \"\";\n\n\t\t\t// C_VISITOR\n\t\t\t$t_tinbai_levelsite->C_VISITOR->HrefValue = \"\";\n\t\t\t$t_tinbai_levelsite->C_VISITOR->TooltipValue = \"\";\n\n\t\t\t// C_STATUS\n\t\t\t$t_tinbai_levelsite->C_STATUS->HrefValue = \"\";\n\t\t\t$t_tinbai_levelsite->C_STATUS->TooltipValue = \"\";\n\n\t\t\t// C_SOURCE\n\t\t\t$t_tinbai_levelsite->C_SOURCE->HrefValue = \"\";\n\t\t\t$t_tinbai_levelsite->C_SOURCE->TooltipValue = \"\";\n\n\t\t\t// C_ORDER\n\t\t\t$t_tinbai_levelsite->C_ORDER->HrefValue = \"\";\n\t\t\t$t_tinbai_levelsite->C_ORDER->TooltipValue = \"\";\n\n\t\t\t// C_USER_ADD\n\t\t\t$t_tinbai_levelsite->C_USER_ADD->HrefValue = \"\";\n\t\t\t$t_tinbai_levelsite->C_USER_ADD->TooltipValue = \"\";\n\n\t\t\t// C_ADD_TIME\n\t\t\t$t_tinbai_levelsite->C_ADD_TIME->HrefValue = \"\";\n\t\t\t$t_tinbai_levelsite->C_ADD_TIME->TooltipValue = \"\";\n\n\t\t\t// C_USER_EDIT\n\t\t\t$t_tinbai_levelsite->C_USER_EDIT->HrefValue = \"\";\n\t\t\t$t_tinbai_levelsite->C_USER_EDIT->TooltipValue = \"\";\n\n\t\t\t// C_EDIT_TIME\n\t\t\t$t_tinbai_levelsite->C_EDIT_TIME->HrefValue = \"\";\n\t\t\t$t_tinbai_levelsite->C_EDIT_TIME->TooltipValue = \"\";\n\n\t\t\t// FK_NGUOIDUNG_ID\n\t\t\t$t_tinbai_levelsite->FK_NGUOIDUNG_ID->HrefValue = \"\";\n\t\t\t$t_tinbai_levelsite->FK_NGUOIDUNG_ID->TooltipValue = \"\";\n\n\t\t\t// FK_EDITOR_ID\n\t\t\t$t_tinbai_levelsite->FK_EDITOR_ID->HrefValue = \"\";\n\t\t\t$t_tinbai_levelsite->FK_EDITOR_ID->TooltipValue = \"\";\n\t\t} elseif ($t_tinbai_levelsite->RowType == EW_ROWTYPE_SEARCH) { // Search row\n\n\t\t\t// PK_TINBAI_ID\n\t\t\t$t_tinbai_levelsite->PK_TINBAI_ID->EditCustomAttributes = \"\";\n\t\t\t$t_tinbai_levelsite->PK_TINBAI_ID->EditValue = ew_HtmlEncode($t_tinbai_levelsite->PK_TINBAI_ID->AdvancedSearch->SearchValue);\n\n\t\t\t// FK_CONGTY_ID\n\t\t\t$t_tinbai_levelsite->FK_CONGTY_ID->EditCustomAttributes = \"\";\n\t\t\t\t$sFilterWrk = \"\";\n\t\t\t$sSqlWrk = \"SELECT `PK_MACONGTY`, `C_TENCONGTY`, '' AS Disp2Fld, '' AS SelectFilterFld FROM `t_congty`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\")));\n\t\t\t$t_tinbai_levelsite->FK_CONGTY_ID->EditValue = $arwrk;\n\n\t\t\t// FK_CHUYENMUC_ID\n\t\t\t$t_tinbai_levelsite->FK_CHUYENMUC_ID->EditCustomAttributes = \"\";\n\t\t\t\t$sFilterWrk = \"\";\n\t\t\t$sSqlWrk = \"SELECT `PK_CHUYENMUC`, `C_NAME`, '' AS Disp2Fld, '' AS SelectFilterFld FROM `t_chuyenmuc_levelsite`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\")));\n\t\t\t$t_tinbai_levelsite->FK_CHUYENMUC_ID->EditValue = $arwrk;\n\n\t\t\t// FK_DOITUONG_ID\n\t\t\t$t_tinbai_levelsite->FK_DOITUONG_ID->EditCustomAttributes = \"\";\n\t\t\t\t$sFilterWrk = \"\";\n\t\t\t$sSqlWrk = \"SELECT `PK_DOITUONG`, `C_NAME`, '' AS Disp2Fld, '' AS SelectFilterFld FROM `t_doituong_levelsite`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tif ($sWhereWrk <> \"\") $sWhereWrk .= \" AND \";\n\t\t\t\t$sWhereWrk .= \"(\" . $sFilterWrk . \")\";\n\t\t\t}\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\t$t_tinbai_levelsite->FK_DOITUONG_ID->EditValue = $arwrk;\n\n\t\t\t// C_TITLE\n\t\t\t$t_tinbai_levelsite->C_TITLE->EditCustomAttributes = \"\";\n\t\t\t$t_tinbai_levelsite->C_TITLE->EditValue = ew_HtmlEncode($t_tinbai_levelsite->C_TITLE->AdvancedSearch->SearchValue);\n\n\t\t\t// C_SUMARY\n\t\t\t$t_tinbai_levelsite->C_SUMARY->EditCustomAttributes = \"\";\n\t\t\t$t_tinbai_levelsite->C_SUMARY->EditValue = ew_HtmlEncode($t_tinbai_levelsite->C_SUMARY->AdvancedSearch->SearchValue);\n\n\t\t\t// C_CONTENTS\n\t\t\t$t_tinbai_levelsite->C_CONTENTS->EditCustomAttributes = \"\";\n\t\t\t$t_tinbai_levelsite->C_CONTENTS->EditValue = ew_HtmlEncode($t_tinbai_levelsite->C_CONTENTS->AdvancedSearch->SearchValue);\n\n\t\t\t// C_PUBLISH\n\t\t\t$t_tinbai_levelsite->C_PUBLISH->EditCustomAttributes = \"\";\n\t\t\t$arwrk = array();\n\t\t\t$arwrk[] = array(\"0\", \"Khong kich hoat MainSite\");\n\t\t\t$arwrk[] = array(\"1\", \"Kich hoat MainSite\");\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\")));\n\t\t\t$t_tinbai_levelsite->C_PUBLISH->EditValue = $arwrk;\n\n\t\t\t// C_ACTIVE\n\t\t\t$t_tinbai_levelsite->C_ACTIVE->EditCustomAttributes = \"\";\n\t\t\t$arwrk = array();\n\t\t\t$arwrk[] = array(\"0\", \"Khong kich hoat len Level Site\");\n\t\t\t$arwrk[] = array(\"1\", \"Kich hoat len Level Site\");\n\t\t\tarray_unshift($arwrk, array(\"\", $Language->Phrase(\"PleaseSelect\")));\n\t\t\t$t_tinbai_levelsite->C_ACTIVE->EditValue = $arwrk;\n\n\t\t\t// C_FILEANH\n\t\t\t$t_tinbai_levelsite->C_FILEANH->EditCustomAttributes = \"\";\n\t\t\tif (!ew_Empty($t_tinbai_levelsite->C_FILEANH->Upload->DbValue)) {\n\t\t\t\t$t_tinbai_levelsite->C_FILEANH->EditValue = $t_tinbai_levelsite->C_FILEANH->Upload->DbValue;\n\t\t\t\t$t_tinbai_levelsite->C_FILEANH->ImageAlt = $t_tinbai_levelsite->C_FILEANH->FldAlt();\n\t\t\t} else {\n\t\t\t\t$t_tinbai_levelsite->C_FILEANH->EditValue = \"\";\n\t\t\t}\n\n\t\t\t// C_TIMEPUBLISH\n\t\t\t$t_tinbai_levelsite->C_TIMEPUBLISH->EditCustomAttributes = \"\";\n\t\t\t$t_tinbai_levelsite->C_TIMEPUBLISH->EditValue = ew_HtmlEncode(ew_FormatDateTime(ew_UnFormatDateTime($t_tinbai_levelsite->C_TIMEPUBLISH->AdvancedSearch->SearchValue, 7), 7));\n\n\t\t\t// C_COMENT\n\t\t\t$t_tinbai_levelsite->C_COMENT->EditCustomAttributes = \"\";\n\t\t\t$arwrk = array();\n\t\t\t$arwrk[] = array(\"0\", \"Khong cho phep comment\");\n\t\t\t$arwrk[] = array(\"1\", \"Cho phep comment\");\n\t\t\t$t_tinbai_levelsite->C_COMENT->EditValue = $arwrk;\n\n\t\t\t// C_HITS\n\t\t\t$t_tinbai_levelsite->C_HITS->EditCustomAttributes = \"\";\n\t\t\t$arwrk = array();\n\t\t\t$arwrk[] = array(\"0\", \"Khong la tin noi bat\");\n\t\t\t$arwrk[] = array(\"1\", \"La tin noi bat\");\n\t\t\t$t_tinbai_levelsite->C_HITS->EditValue = $arwrk;\n\n\t\t\t// C_VISITOR\n\t\t\t$t_tinbai_levelsite->C_VISITOR->EditCustomAttributes = \"\";\n\t\t\t$t_tinbai_levelsite->C_VISITOR->EditValue = ew_HtmlEncode($t_tinbai_levelsite->C_VISITOR->AdvancedSearch->SearchValue);\n\n\t\t\t// C_STATUS\n\t\t\t$t_tinbai_levelsite->C_STATUS->EditCustomAttributes = \"\";\n\t\t\t$t_tinbai_levelsite->C_STATUS->EditValue = ew_HtmlEncode($t_tinbai_levelsite->C_STATUS->AdvancedSearch->SearchValue);\n\n\t\t\t// C_SOURCE\n\t\t\t$t_tinbai_levelsite->C_SOURCE->EditCustomAttributes = \"\";\n\t\t\t$t_tinbai_levelsite->C_SOURCE->EditValue = ew_HtmlEncode($t_tinbai_levelsite->C_SOURCE->AdvancedSearch->SearchValue);\n\n\t\t\t// C_ORDER\n\t\t\t$t_tinbai_levelsite->C_ORDER->EditCustomAttributes = \"\";\n\t\t\t$t_tinbai_levelsite->C_ORDER->EditValue = ew_HtmlEncode(ew_FormatDateTime(ew_UnFormatDateTime($t_tinbai_levelsite->C_ORDER->AdvancedSearch->SearchValue, 7), 7));\n\n\t\t\t// C_USER_ADD\n\t\t\t$t_tinbai_levelsite->C_USER_ADD->EditCustomAttributes = \"\";\n\t\t\t$t_tinbai_levelsite->C_USER_ADD->EditValue = ew_HtmlEncode($t_tinbai_levelsite->C_USER_ADD->AdvancedSearch->SearchValue);\n\n\t\t\t// C_ADD_TIME\n\t\t\t$t_tinbai_levelsite->C_ADD_TIME->EditCustomAttributes = \"\";\n\t\t\t$t_tinbai_levelsite->C_ADD_TIME->EditValue = ew_HtmlEncode(ew_FormatDateTime(ew_UnFormatDateTime($t_tinbai_levelsite->C_ADD_TIME->AdvancedSearch->SearchValue, 7), 7));\n\n\t\t\t// C_USER_EDIT\n\t\t\t$t_tinbai_levelsite->C_USER_EDIT->EditCustomAttributes = \"\";\n\t\t\t$t_tinbai_levelsite->C_USER_EDIT->EditValue = ew_HtmlEncode($t_tinbai_levelsite->C_USER_EDIT->AdvancedSearch->SearchValue);\n\n\t\t\t// C_EDIT_TIME\n\t\t\t$t_tinbai_levelsite->C_EDIT_TIME->EditCustomAttributes = \"\";\n\t\t\t$t_tinbai_levelsite->C_EDIT_TIME->EditValue = ew_HtmlEncode(ew_FormatDateTime(ew_UnFormatDateTime($t_tinbai_levelsite->C_EDIT_TIME->AdvancedSearch->SearchValue, 7), 7));\n\n\t\t\t// FK_NGUOIDUNG_ID\n\t\t\t$t_tinbai_levelsite->FK_NGUOIDUNG_ID->EditCustomAttributes = \"\";\n\n\t\t\t// FK_EDITOR_ID\n\t\t\t$t_tinbai_levelsite->FK_EDITOR_ID->EditCustomAttributes = \"\";\n\t\t\t$t_tinbai_levelsite->FK_EDITOR_ID->EditValue = ew_HtmlEncode($t_tinbai_levelsite->FK_EDITOR_ID->AdvancedSearch->SearchValue);\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($t_tinbai_levelsite->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$t_tinbai_levelsite->Row_Rendered();\n\t}", "title": "" }, { "docid": "8f14958c18320b6f2280500ad2d56f2e", "score": "0.52379376", "text": "function TR($row,$value){\n\t\t\t\t$result =\"<td>\".$row[$value].\"</td>\";\n\t\t\t\treturn $result;\n\t\t\t}", "title": "" }, { "docid": "f5f5dba59c365d9c56ef63080e978e34", "score": "0.5234246", "text": "function LC_TableRenderer($t) {\n\t\t$this->table = $t;\n\t}", "title": "" }, { "docid": "17f8c962b7f182ddedc62e377b4cbaca", "score": "0.52327937", "text": "function showTimetable($dayArray, $startTime, $endTime, $interval)\n{\n $start = explode(\":\", $startTime);\n $start = $start[0] * 60 + $start[1];\n\n $end = explode(\":\", $endTime);\n $end = $end[0] * 60 + $end[1];\n\n $interval = (int) $interval;\n\n # Draw the table\n echo \"<table>\";\n\n # Create the table header\n echo \"<tr>\";\n echo \"<th style='background: dodgerblue; '>Hora</th>\";\n foreach ($dayArray as $day) {\n echo \"<th>$day</th>\";\n }\n echo \"</tr>\";\n\n if ($start > $end) {\n\n $dayEnd = 24 * 60;\n $background = true;\n\n drawRows($dayArray,$start,$dayEnd,$interval);\n } else drawRows($dayArray,$start,$end,$interval);\n \n\n echo \"</table>\";\n}", "title": "" }, { "docid": "2e972e11af4e186932032d62d0fb14df", "score": "0.5232528", "text": "public function headingRow(): int\n {\n return 1;\n }", "title": "" }, { "docid": "9e005dfa3b53248b4817ff438b7bdabd", "score": "0.52243185", "text": "function RenderRow() {\n\t\tglobal $Security, $Language, $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t$this->ViewUrl = $this->GetViewUrl();\n\t\t$this->EditUrl = $this->GetEditUrl();\n\t\t$this->InlineEditUrl = $this->GetInlineEditUrl();\n\t\t$this->CopyUrl = $this->GetCopyUrl();\n\t\t$this->InlineCopyUrl = $this->GetInlineCopyUrl();\n\t\t$this->DeleteUrl = $this->GetDeleteUrl();\n\n\t\t// Call Row_Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// gjd_id\n\t\t// gjm_id\n\t\t// peg_id\n\t\t// b_mn\n\t\t// b_sn\n\t\t// b_sl\n\t\t// b_rb\n\t\t// b_km\n\t\t// b_jm\n\t\t// b_sb\n\t\t// l_mn\n\t\t// l_sn\n\t\t// l_sl\n\t\t// l_rb\n\t\t// l_km\n\t\t// l_jm\n\t\t// l_sb\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t// gjd_id\n\t\t$this->gjd_id->ViewValue = $this->gjd_id->CurrentValue;\n\t\t$this->gjd_id->ViewCustomAttributes = \"\";\n\n\t\t// gjm_id\n\t\t$this->gjm_id->ViewValue = $this->gjm_id->CurrentValue;\n\t\t$this->gjm_id->ViewCustomAttributes = \"\";\n\n\t\t// peg_id\n\t\tif (strval($this->peg_id->CurrentValue) <> \"\") {\n\t\t\t$sFilterWrk = \"`peg_id`\" . ew_SearchString(\"=\", $this->peg_id->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t$sSqlWrk = \"SELECT `peg_id`, `peg_nama` AS `DispFld`, `peg_jabatan` AS `Disp2Fld`, `peg_upah` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `t_pegawai`\";\n\t\t$sWhereWrk = \"\";\n\t\t$this->peg_id->LookupFilters = array(\"dx1\" => '`peg_nama`', \"dx2\" => '`peg_jabatan`', \"dx3\" => '`peg_upah`');\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t$this->Lookup_Selecting($this->peg_id, $sWhereWrk); // Call Lookup selecting\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\n\t\t\t\t$arwrk[2] = $rswrk->fields('Disp2Fld');\n\t\t\t\t$arwrk[3] = ew_FormatNumber($rswrk->fields('Disp3Fld'), 0, -2, -2, -1);\n\t\t\t\t$this->peg_id->ViewValue = $this->peg_id->DisplayValue($arwrk);\n\t\t\t\t$rswrk->Close();\n\t\t\t} else {\n\t\t\t\t$this->peg_id->ViewValue = $this->peg_id->CurrentValue;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->peg_id->ViewValue = NULL;\n\t\t}\n\t\t$this->peg_id->ViewCustomAttributes = \"\";\n\n\t\t// b_mn\n\t\t$this->b_mn->ViewValue = $this->b_mn->CurrentValue;\n\t\t$this->b_mn->ViewCustomAttributes = \"\";\n\n\t\t// b_sn\n\t\t$this->b_sn->ViewValue = $this->b_sn->CurrentValue;\n\t\t$this->b_sn->ViewCustomAttributes = \"\";\n\n\t\t// b_sl\n\t\t$this->b_sl->ViewValue = $this->b_sl->CurrentValue;\n\t\t$this->b_sl->ViewCustomAttributes = \"\";\n\n\t\t// b_rb\n\t\t$this->b_rb->ViewValue = $this->b_rb->CurrentValue;\n\t\t$this->b_rb->ViewCustomAttributes = \"\";\n\n\t\t// b_km\n\t\t$this->b_km->ViewValue = $this->b_km->CurrentValue;\n\t\t$this->b_km->ViewCustomAttributes = \"\";\n\n\t\t// b_jm\n\t\t$this->b_jm->ViewValue = $this->b_jm->CurrentValue;\n\t\t$this->b_jm->ViewCustomAttributes = \"\";\n\n\t\t// b_sb\n\t\t$this->b_sb->ViewValue = $this->b_sb->CurrentValue;\n\t\t$this->b_sb->ViewCustomAttributes = \"\";\n\n\t\t// l_mn\n\t\t$this->l_mn->ViewValue = $this->l_mn->CurrentValue;\n\t\t$this->l_mn->ViewCustomAttributes = \"\";\n\n\t\t// l_sn\n\t\t$this->l_sn->ViewValue = $this->l_sn->CurrentValue;\n\t\t$this->l_sn->ViewCustomAttributes = \"\";\n\n\t\t// l_sl\n\t\t$this->l_sl->ViewValue = $this->l_sl->CurrentValue;\n\t\t$this->l_sl->ViewCustomAttributes = \"\";\n\n\t\t// l_rb\n\t\t$this->l_rb->ViewValue = $this->l_rb->CurrentValue;\n\t\t$this->l_rb->ViewCustomAttributes = \"\";\n\n\t\t// l_km\n\t\t$this->l_km->ViewValue = $this->l_km->CurrentValue;\n\t\t$this->l_km->ViewCustomAttributes = \"\";\n\n\t\t// l_jm\n\t\t$this->l_jm->ViewValue = $this->l_jm->CurrentValue;\n\t\t$this->l_jm->ViewCustomAttributes = \"\";\n\n\t\t// l_sb\n\t\t$this->l_sb->ViewValue = $this->l_sb->CurrentValue;\n\t\t$this->l_sb->ViewCustomAttributes = \"\";\n\n\t\t\t// peg_id\n\t\t\t$this->peg_id->LinkCustomAttributes = \"\";\n\t\t\t$this->peg_id->HrefValue = \"\";\n\t\t\t$this->peg_id->TooltipValue = \"\";\n\n\t\t\t// b_mn\n\t\t\t$this->b_mn->LinkCustomAttributes = \"\";\n\t\t\t$this->b_mn->HrefValue = \"\";\n\t\t\t$this->b_mn->TooltipValue = \"\";\n\n\t\t\t// b_sn\n\t\t\t$this->b_sn->LinkCustomAttributes = \"\";\n\t\t\t$this->b_sn->HrefValue = \"\";\n\t\t\t$this->b_sn->TooltipValue = \"\";\n\n\t\t\t// b_sl\n\t\t\t$this->b_sl->LinkCustomAttributes = \"\";\n\t\t\t$this->b_sl->HrefValue = \"\";\n\t\t\t$this->b_sl->TooltipValue = \"\";\n\n\t\t\t// b_rb\n\t\t\t$this->b_rb->LinkCustomAttributes = \"\";\n\t\t\t$this->b_rb->HrefValue = \"\";\n\t\t\t$this->b_rb->TooltipValue = \"\";\n\n\t\t\t// b_km\n\t\t\t$this->b_km->LinkCustomAttributes = \"\";\n\t\t\t$this->b_km->HrefValue = \"\";\n\t\t\t$this->b_km->TooltipValue = \"\";\n\n\t\t\t// b_jm\n\t\t\t$this->b_jm->LinkCustomAttributes = \"\";\n\t\t\t$this->b_jm->HrefValue = \"\";\n\t\t\t$this->b_jm->TooltipValue = \"\";\n\n\t\t\t// b_sb\n\t\t\t$this->b_sb->LinkCustomAttributes = \"\";\n\t\t\t$this->b_sb->HrefValue = \"\";\n\t\t\t$this->b_sb->TooltipValue = \"\";\n\n\t\t\t// l_mn\n\t\t\t$this->l_mn->LinkCustomAttributes = \"\";\n\t\t\t$this->l_mn->HrefValue = \"\";\n\t\t\t$this->l_mn->TooltipValue = \"\";\n\n\t\t\t// l_sn\n\t\t\t$this->l_sn->LinkCustomAttributes = \"\";\n\t\t\t$this->l_sn->HrefValue = \"\";\n\t\t\t$this->l_sn->TooltipValue = \"\";\n\n\t\t\t// l_sl\n\t\t\t$this->l_sl->LinkCustomAttributes = \"\";\n\t\t\t$this->l_sl->HrefValue = \"\";\n\t\t\t$this->l_sl->TooltipValue = \"\";\n\n\t\t\t// l_rb\n\t\t\t$this->l_rb->LinkCustomAttributes = \"\";\n\t\t\t$this->l_rb->HrefValue = \"\";\n\t\t\t$this->l_rb->TooltipValue = \"\";\n\n\t\t\t// l_km\n\t\t\t$this->l_km->LinkCustomAttributes = \"\";\n\t\t\t$this->l_km->HrefValue = \"\";\n\t\t\t$this->l_km->TooltipValue = \"\";\n\n\t\t\t// l_jm\n\t\t\t$this->l_jm->LinkCustomAttributes = \"\";\n\t\t\t$this->l_jm->HrefValue = \"\";\n\t\t\t$this->l_jm->TooltipValue = \"\";\n\n\t\t\t// l_sb\n\t\t\t$this->l_sb->LinkCustomAttributes = \"\";\n\t\t\t$this->l_sb->HrefValue = \"\";\n\t\t\t$this->l_sb->TooltipValue = \"\";\n\t\t} elseif ($this->RowType == EW_ROWTYPE_ADD) { // Add row\n\n\t\t\t// peg_id\n\t\t\t$this->peg_id->EditCustomAttributes = \"\";\n\t\t\tif (trim(strval($this->peg_id->CurrentValue)) == \"\") {\n\t\t\t\t$sFilterWrk = \"0=1\";\n\t\t\t} else {\n\t\t\t\t$sFilterWrk = \"`peg_id`\" . ew_SearchString(\"=\", $this->peg_id->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t\t}\n\t\t\t$sSqlWrk = \"SELECT `peg_id`, `peg_nama` AS `DispFld`, `peg_jabatan` AS `Disp2Fld`, `peg_upah` AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `t_pegawai`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\t$this->peg_id->LookupFilters = array(\"dx1\" => '`peg_nama`', \"dx2\" => '`peg_jabatan`', \"dx3\" => '`peg_upah`');\n\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t$this->Lookup_Selecting($this->peg_id, $sWhereWrk); // Call Lookup selecting\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = ew_HtmlEncode($rswrk->fields('DispFld'));\n\t\t\t\t$arwrk[2] = ew_HtmlEncode($rswrk->fields('Disp2Fld'));\n\t\t\t\t$arwrk[3] = ew_HtmlEncode(ew_FormatNumber($rswrk->fields('Disp3Fld'), 0, -2, -2, -1));\n\t\t\t\t$this->peg_id->ViewValue = $this->peg_id->DisplayValue($arwrk);\n\t\t\t} else {\n\t\t\t\t$this->peg_id->ViewValue = $Language->Phrase(\"PleaseSelect\");\n\t\t\t}\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\t$rowswrk = count($arwrk);\n\t\t\tfor ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {\n\t\t\t\t$arwrk[$rowcntwrk][3] = ew_FormatNumber($arwrk[$rowcntwrk][3], 0, -2, -2, -1);\n\t\t\t}\n\t\t\t$this->peg_id->EditValue = $arwrk;\n\n\t\t\t// b_mn\n\t\t\t$this->b_mn->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->b_mn->EditCustomAttributes = \"\";\n\t\t\t$this->b_mn->EditValue = ew_HtmlEncode($this->b_mn->CurrentValue);\n\t\t\t$this->b_mn->PlaceHolder = ew_RemoveHtml($this->b_mn->FldCaption());\n\n\t\t\t// b_sn\n\t\t\t$this->b_sn->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->b_sn->EditCustomAttributes = \"\";\n\t\t\t$this->b_sn->EditValue = ew_HtmlEncode($this->b_sn->CurrentValue);\n\t\t\t$this->b_sn->PlaceHolder = ew_RemoveHtml($this->b_sn->FldCaption());\n\n\t\t\t// b_sl\n\t\t\t$this->b_sl->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->b_sl->EditCustomAttributes = \"\";\n\t\t\t$this->b_sl->EditValue = ew_HtmlEncode($this->b_sl->CurrentValue);\n\t\t\t$this->b_sl->PlaceHolder = ew_RemoveHtml($this->b_sl->FldCaption());\n\n\t\t\t// b_rb\n\t\t\t$this->b_rb->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->b_rb->EditCustomAttributes = \"\";\n\t\t\t$this->b_rb->EditValue = ew_HtmlEncode($this->b_rb->CurrentValue);\n\t\t\t$this->b_rb->PlaceHolder = ew_RemoveHtml($this->b_rb->FldCaption());\n\n\t\t\t// b_km\n\t\t\t$this->b_km->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->b_km->EditCustomAttributes = \"\";\n\t\t\t$this->b_km->EditValue = ew_HtmlEncode($this->b_km->CurrentValue);\n\t\t\t$this->b_km->PlaceHolder = ew_RemoveHtml($this->b_km->FldCaption());\n\n\t\t\t// b_jm\n\t\t\t$this->b_jm->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->b_jm->EditCustomAttributes = \"\";\n\t\t\t$this->b_jm->EditValue = ew_HtmlEncode($this->b_jm->CurrentValue);\n\t\t\t$this->b_jm->PlaceHolder = ew_RemoveHtml($this->b_jm->FldCaption());\n\n\t\t\t// b_sb\n\t\t\t$this->b_sb->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->b_sb->EditCustomAttributes = \"\";\n\t\t\t$this->b_sb->EditValue = ew_HtmlEncode($this->b_sb->CurrentValue);\n\t\t\t$this->b_sb->PlaceHolder = ew_RemoveHtml($this->b_sb->FldCaption());\n\n\t\t\t// l_mn\n\t\t\t$this->l_mn->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->l_mn->EditCustomAttributes = \"\";\n\t\t\t$this->l_mn->EditValue = ew_HtmlEncode($this->l_mn->CurrentValue);\n\t\t\t$this->l_mn->PlaceHolder = ew_RemoveHtml($this->l_mn->FldCaption());\n\n\t\t\t// l_sn\n\t\t\t$this->l_sn->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->l_sn->EditCustomAttributes = \"\";\n\t\t\t$this->l_sn->EditValue = ew_HtmlEncode($this->l_sn->CurrentValue);\n\t\t\t$this->l_sn->PlaceHolder = ew_RemoveHtml($this->l_sn->FldCaption());\n\n\t\t\t// l_sl\n\t\t\t$this->l_sl->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->l_sl->EditCustomAttributes = \"\";\n\t\t\t$this->l_sl->EditValue = ew_HtmlEncode($this->l_sl->CurrentValue);\n\t\t\t$this->l_sl->PlaceHolder = ew_RemoveHtml($this->l_sl->FldCaption());\n\n\t\t\t// l_rb\n\t\t\t$this->l_rb->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->l_rb->EditCustomAttributes = \"\";\n\t\t\t$this->l_rb->EditValue = ew_HtmlEncode($this->l_rb->CurrentValue);\n\t\t\t$this->l_rb->PlaceHolder = ew_RemoveHtml($this->l_rb->FldCaption());\n\n\t\t\t// l_km\n\t\t\t$this->l_km->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->l_km->EditCustomAttributes = \"\";\n\t\t\t$this->l_km->EditValue = ew_HtmlEncode($this->l_km->CurrentValue);\n\t\t\t$this->l_km->PlaceHolder = ew_RemoveHtml($this->l_km->FldCaption());\n\n\t\t\t// l_jm\n\t\t\t$this->l_jm->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->l_jm->EditCustomAttributes = \"\";\n\t\t\t$this->l_jm->EditValue = ew_HtmlEncode($this->l_jm->CurrentValue);\n\t\t\t$this->l_jm->PlaceHolder = ew_RemoveHtml($this->l_jm->FldCaption());\n\n\t\t\t// l_sb\n\t\t\t$this->l_sb->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->l_sb->EditCustomAttributes = \"\";\n\t\t\t$this->l_sb->EditValue = ew_HtmlEncode($this->l_sb->CurrentValue);\n\t\t\t$this->l_sb->PlaceHolder = ew_RemoveHtml($this->l_sb->FldCaption());\n\n\t\t\t// Add refer script\n\t\t\t// peg_id\n\n\t\t\t$this->peg_id->LinkCustomAttributes = \"\";\n\t\t\t$this->peg_id->HrefValue = \"\";\n\n\t\t\t// b_mn\n\t\t\t$this->b_mn->LinkCustomAttributes = \"\";\n\t\t\t$this->b_mn->HrefValue = \"\";\n\n\t\t\t// b_sn\n\t\t\t$this->b_sn->LinkCustomAttributes = \"\";\n\t\t\t$this->b_sn->HrefValue = \"\";\n\n\t\t\t// b_sl\n\t\t\t$this->b_sl->LinkCustomAttributes = \"\";\n\t\t\t$this->b_sl->HrefValue = \"\";\n\n\t\t\t// b_rb\n\t\t\t$this->b_rb->LinkCustomAttributes = \"\";\n\t\t\t$this->b_rb->HrefValue = \"\";\n\n\t\t\t// b_km\n\t\t\t$this->b_km->LinkCustomAttributes = \"\";\n\t\t\t$this->b_km->HrefValue = \"\";\n\n\t\t\t// b_jm\n\t\t\t$this->b_jm->LinkCustomAttributes = \"\";\n\t\t\t$this->b_jm->HrefValue = \"\";\n\n\t\t\t// b_sb\n\t\t\t$this->b_sb->LinkCustomAttributes = \"\";\n\t\t\t$this->b_sb->HrefValue = \"\";\n\n\t\t\t// l_mn\n\t\t\t$this->l_mn->LinkCustomAttributes = \"\";\n\t\t\t$this->l_mn->HrefValue = \"\";\n\n\t\t\t// l_sn\n\t\t\t$this->l_sn->LinkCustomAttributes = \"\";\n\t\t\t$this->l_sn->HrefValue = \"\";\n\n\t\t\t// l_sl\n\t\t\t$this->l_sl->LinkCustomAttributes = \"\";\n\t\t\t$this->l_sl->HrefValue = \"\";\n\n\t\t\t// l_rb\n\t\t\t$this->l_rb->LinkCustomAttributes = \"\";\n\t\t\t$this->l_rb->HrefValue = \"\";\n\n\t\t\t// l_km\n\t\t\t$this->l_km->LinkCustomAttributes = \"\";\n\t\t\t$this->l_km->HrefValue = \"\";\n\n\t\t\t// l_jm\n\t\t\t$this->l_jm->LinkCustomAttributes = \"\";\n\t\t\t$this->l_jm->HrefValue = \"\";\n\n\t\t\t// l_sb\n\t\t\t$this->l_sb->LinkCustomAttributes = \"\";\n\t\t\t$this->l_sb->HrefValue = \"\";\n\t\t} elseif ($this->RowType == EW_ROWTYPE_EDIT) { // Edit row\n\n\t\t\t// peg_id\n\t\t\t$this->peg_id->EditCustomAttributes = \"\";\n\t\t\tif (trim(strval($this->peg_id->CurrentValue)) == \"\") {\n\t\t\t\t$sFilterWrk = \"0=1\";\n\t\t\t} else {\n\t\t\t\t$sFilterWrk = \"`peg_id`\" . ew_SearchString(\"=\", $this->peg_id->CurrentValue, EW_DATATYPE_NUMBER, \"\");\n\t\t\t}\n\t\t\t$sSqlWrk = \"SELECT `peg_id`, `peg_nama` AS `DispFld`, `peg_jabatan` AS `Disp2Fld`, `peg_upah` AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `t_pegawai`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\t$this->peg_id->LookupFilters = array(\"dx1\" => '`peg_nama`', \"dx2\" => '`peg_jabatan`', \"dx3\" => '`peg_upah`');\n\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t$this->Lookup_Selecting($this->peg_id, $sWhereWrk); // Call Lookup selecting\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t$arwrk = array();\n\t\t\t\t$arwrk[1] = ew_HtmlEncode($rswrk->fields('DispFld'));\n\t\t\t\t$arwrk[2] = ew_HtmlEncode($rswrk->fields('Disp2Fld'));\n\t\t\t\t$arwrk[3] = ew_HtmlEncode(ew_FormatNumber($rswrk->fields('Disp3Fld'), 0, -2, -2, -1));\n\t\t\t\t$this->peg_id->ViewValue = $this->peg_id->DisplayValue($arwrk);\n\t\t\t} else {\n\t\t\t\t$this->peg_id->ViewValue = $Language->Phrase(\"PleaseSelect\");\n\t\t\t}\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\n\t\t\tif ($rswrk) $rswrk->Close();\n\t\t\t$rowswrk = count($arwrk);\n\t\t\tfor ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {\n\t\t\t\t$arwrk[$rowcntwrk][3] = ew_FormatNumber($arwrk[$rowcntwrk][3], 0, -2, -2, -1);\n\t\t\t}\n\t\t\t$this->peg_id->EditValue = $arwrk;\n\n\t\t\t// b_mn\n\t\t\t$this->b_mn->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->b_mn->EditCustomAttributes = \"\";\n\t\t\t$this->b_mn->EditValue = ew_HtmlEncode($this->b_mn->CurrentValue);\n\t\t\t$this->b_mn->PlaceHolder = ew_RemoveHtml($this->b_mn->FldCaption());\n\n\t\t\t// b_sn\n\t\t\t$this->b_sn->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->b_sn->EditCustomAttributes = \"\";\n\t\t\t$this->b_sn->EditValue = ew_HtmlEncode($this->b_sn->CurrentValue);\n\t\t\t$this->b_sn->PlaceHolder = ew_RemoveHtml($this->b_sn->FldCaption());\n\n\t\t\t// b_sl\n\t\t\t$this->b_sl->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->b_sl->EditCustomAttributes = \"\";\n\t\t\t$this->b_sl->EditValue = ew_HtmlEncode($this->b_sl->CurrentValue);\n\t\t\t$this->b_sl->PlaceHolder = ew_RemoveHtml($this->b_sl->FldCaption());\n\n\t\t\t// b_rb\n\t\t\t$this->b_rb->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->b_rb->EditCustomAttributes = \"\";\n\t\t\t$this->b_rb->EditValue = ew_HtmlEncode($this->b_rb->CurrentValue);\n\t\t\t$this->b_rb->PlaceHolder = ew_RemoveHtml($this->b_rb->FldCaption());\n\n\t\t\t// b_km\n\t\t\t$this->b_km->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->b_km->EditCustomAttributes = \"\";\n\t\t\t$this->b_km->EditValue = ew_HtmlEncode($this->b_km->CurrentValue);\n\t\t\t$this->b_km->PlaceHolder = ew_RemoveHtml($this->b_km->FldCaption());\n\n\t\t\t// b_jm\n\t\t\t$this->b_jm->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->b_jm->EditCustomAttributes = \"\";\n\t\t\t$this->b_jm->EditValue = ew_HtmlEncode($this->b_jm->CurrentValue);\n\t\t\t$this->b_jm->PlaceHolder = ew_RemoveHtml($this->b_jm->FldCaption());\n\n\t\t\t// b_sb\n\t\t\t$this->b_sb->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->b_sb->EditCustomAttributes = \"\";\n\t\t\t$this->b_sb->EditValue = ew_HtmlEncode($this->b_sb->CurrentValue);\n\t\t\t$this->b_sb->PlaceHolder = ew_RemoveHtml($this->b_sb->FldCaption());\n\n\t\t\t// l_mn\n\t\t\t$this->l_mn->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->l_mn->EditCustomAttributes = \"\";\n\t\t\t$this->l_mn->EditValue = ew_HtmlEncode($this->l_mn->CurrentValue);\n\t\t\t$this->l_mn->PlaceHolder = ew_RemoveHtml($this->l_mn->FldCaption());\n\n\t\t\t// l_sn\n\t\t\t$this->l_sn->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->l_sn->EditCustomAttributes = \"\";\n\t\t\t$this->l_sn->EditValue = ew_HtmlEncode($this->l_sn->CurrentValue);\n\t\t\t$this->l_sn->PlaceHolder = ew_RemoveHtml($this->l_sn->FldCaption());\n\n\t\t\t// l_sl\n\t\t\t$this->l_sl->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->l_sl->EditCustomAttributes = \"\";\n\t\t\t$this->l_sl->EditValue = ew_HtmlEncode($this->l_sl->CurrentValue);\n\t\t\t$this->l_sl->PlaceHolder = ew_RemoveHtml($this->l_sl->FldCaption());\n\n\t\t\t// l_rb\n\t\t\t$this->l_rb->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->l_rb->EditCustomAttributes = \"\";\n\t\t\t$this->l_rb->EditValue = ew_HtmlEncode($this->l_rb->CurrentValue);\n\t\t\t$this->l_rb->PlaceHolder = ew_RemoveHtml($this->l_rb->FldCaption());\n\n\t\t\t// l_km\n\t\t\t$this->l_km->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->l_km->EditCustomAttributes = \"\";\n\t\t\t$this->l_km->EditValue = ew_HtmlEncode($this->l_km->CurrentValue);\n\t\t\t$this->l_km->PlaceHolder = ew_RemoveHtml($this->l_km->FldCaption());\n\n\t\t\t// l_jm\n\t\t\t$this->l_jm->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->l_jm->EditCustomAttributes = \"\";\n\t\t\t$this->l_jm->EditValue = ew_HtmlEncode($this->l_jm->CurrentValue);\n\t\t\t$this->l_jm->PlaceHolder = ew_RemoveHtml($this->l_jm->FldCaption());\n\n\t\t\t// l_sb\n\t\t\t$this->l_sb->EditAttrs[\"class\"] = \"form-control\";\n\t\t\t$this->l_sb->EditCustomAttributes = \"\";\n\t\t\t$this->l_sb->EditValue = ew_HtmlEncode($this->l_sb->CurrentValue);\n\t\t\t$this->l_sb->PlaceHolder = ew_RemoveHtml($this->l_sb->FldCaption());\n\n\t\t\t// Edit refer script\n\t\t\t// peg_id\n\n\t\t\t$this->peg_id->LinkCustomAttributes = \"\";\n\t\t\t$this->peg_id->HrefValue = \"\";\n\n\t\t\t// b_mn\n\t\t\t$this->b_mn->LinkCustomAttributes = \"\";\n\t\t\t$this->b_mn->HrefValue = \"\";\n\n\t\t\t// b_sn\n\t\t\t$this->b_sn->LinkCustomAttributes = \"\";\n\t\t\t$this->b_sn->HrefValue = \"\";\n\n\t\t\t// b_sl\n\t\t\t$this->b_sl->LinkCustomAttributes = \"\";\n\t\t\t$this->b_sl->HrefValue = \"\";\n\n\t\t\t// b_rb\n\t\t\t$this->b_rb->LinkCustomAttributes = \"\";\n\t\t\t$this->b_rb->HrefValue = \"\";\n\n\t\t\t// b_km\n\t\t\t$this->b_km->LinkCustomAttributes = \"\";\n\t\t\t$this->b_km->HrefValue = \"\";\n\n\t\t\t// b_jm\n\t\t\t$this->b_jm->LinkCustomAttributes = \"\";\n\t\t\t$this->b_jm->HrefValue = \"\";\n\n\t\t\t// b_sb\n\t\t\t$this->b_sb->LinkCustomAttributes = \"\";\n\t\t\t$this->b_sb->HrefValue = \"\";\n\n\t\t\t// l_mn\n\t\t\t$this->l_mn->LinkCustomAttributes = \"\";\n\t\t\t$this->l_mn->HrefValue = \"\";\n\n\t\t\t// l_sn\n\t\t\t$this->l_sn->LinkCustomAttributes = \"\";\n\t\t\t$this->l_sn->HrefValue = \"\";\n\n\t\t\t// l_sl\n\t\t\t$this->l_sl->LinkCustomAttributes = \"\";\n\t\t\t$this->l_sl->HrefValue = \"\";\n\n\t\t\t// l_rb\n\t\t\t$this->l_rb->LinkCustomAttributes = \"\";\n\t\t\t$this->l_rb->HrefValue = \"\";\n\n\t\t\t// l_km\n\t\t\t$this->l_km->LinkCustomAttributes = \"\";\n\t\t\t$this->l_km->HrefValue = \"\";\n\n\t\t\t// l_jm\n\t\t\t$this->l_jm->LinkCustomAttributes = \"\";\n\t\t\t$this->l_jm->HrefValue = \"\";\n\n\t\t\t// l_sb\n\t\t\t$this->l_sb->LinkCustomAttributes = \"\";\n\t\t\t$this->l_sb->HrefValue = \"\";\n\t\t}\n\t\tif ($this->RowType == EW_ROWTYPE_ADD ||\n\t\t\t$this->RowType == EW_ROWTYPE_EDIT ||\n\t\t\t$this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row\n\t\t\t$this->SetupFieldTitles();\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "title": "" }, { "docid": "dd600deacc13b8eef6c6f43597eb0827", "score": "0.52215", "text": "function Rowtab($data)\n {\n $nb=0;\n for($i=0;$i<count($data);$i++)\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n $h=5*$nb;\n //Issue a page break first if needed\n // $this->CheckPageBreak($h);\n if($this->GetY()+$h>$this->PageBreakTrigger){\n $this->AddPage($this->CurOrientation, 'Legal');\n $this->SetFont('Arial','B',11);\n $this->SetFillColor(255,255,255);\n\n $this->SetAligns(array(\"C\",\"C\",\"C\",\"C\",\"C\",\"C\",\"C\",\"C\"));\n // $pdf->SetColors(array(TRUE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE));\n $this->SetLineW(array(0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.2));\n $this->SetTextColor(0,0,0);\n $this->Row(array(\n utf8_decode(\"No.\"),\n utf8_decode(\"Acción\"),\n utf8_decode(\"Ámbito\"),\n utf8_decode(\"Fecha inicio\"),\n utf8_decode(\"Fecha fin\"),\n utf8_decode(\"Recursos\"),\n utf8_decode(\"Avance\"),\n utf8_decode(\"Responsables\"),\n ));\n $this->SetFont('Arial','',10);\n $this->SetAligns(array(\"L\",\"L\",\"L\",\"L\",\"L\",\"L\",\"L\",\"L\"));\n $this->SetColors(array(FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE, FALSE));\n $this->SetLineW(array(0.09,0.09,0.09,0.09,0.09,0.09,0.09,0.09));\n }\n\n //Draw the cells of the row\n for($i=0;$i<count($data);$i++)\n {\n $w=$this->widths[$i];\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n $color=isset($this->color[$i]) ? $this->color[$i] : FALSE;\n $widht=isset($this->widht[$i]) ? $this->widht[$i] : 0.2;\n // echo $widht; die();\n //Save the current position\n $x=$this->GetX();\n $y=$this->GetY();\n //Draw the border\n $this->SetLineWidth($widht);\n $this->Rect($x,$y,$w,$h);\n //Print the text\n $this->MultiCell($w,5,$data[$i],0,$a,$color);\n //Put the position to the right of the cell\n $this->SetXY($x+$w,$y);\n }\n //Go to the next line\n $this->Ln($h);\n }", "title": "" }, { "docid": "4f7138b792f32d6410d199c303e1844a", "score": "0.5220653", "text": "private function _getRow($index,$index2,$phrase,$style,$type=true)\n {\n $c1=$c2=$c3=$c4=$c5=$c6=$c7=$c8=$c9=$c10=$c11=null;\n $margin=$previous=$average=$previousMonth=null;\n foreach ($this->_objetos[$index][$index2] as $key => $value)\n {\n if($value->apellido == $phrase)\n { \n if($type==true) $c1=\"<td style='\".$this->_head[$style].\"'>\".Yii::app()->format->format_decimal($value->minutes).\"</td>\";\n if($type==true) $c2=\"<td style='\".$this->_head[$style].\"'>\".Yii::app()->format->format_decimal($value->revenue).\"</td>\";\n $c3=\"<td style='\".$this->_head[$style].\"'>\".Yii::app()->format->format_decimal($value->margin).\"</td>\";\n $margin=$value->margin;\n }\n }\n if($this->equal)\n {\n foreach ($this->_objetos[$index][$index2.'Yesterday'] as $key => $value)\n {\n if($value->apellido == $phrase)\n {\n $c5=\"<td style='\".$this->_head[$style].\"'>\".Yii::app()->format->format_decimal($value->margin).\"</td>\";\n $previous=$value->margin;\n }\n }\n $c4=\"<td style='\".$this->_head[$style].\"'>\".$this->_upOrDown($previous,$margin).\"</td>\";\n foreach ($this->_objetos[$index][$index2.'Average'] as $key => $value)\n {\n if($value->apellido == $phrase)\n {\n $c7=\"<td style='\".$this->_head[$style].\"'>\".Yii::app()->format->format_decimal($value->margin).\"</td>\";\n $average=$value->margin;\n }\n }\n $c6=\"<td style='\".$this->_head[$style].\"'>\".$this->_upOrDown($average,$margin).\"</td>\";\n foreach ($this->_objetos[$index][$index2.'Accumulated'] as $key => $value)\n {\n if($value->apellido == $phrase)\n {\n $c8=\"<td style='\".$this->_head[$style].\"'>\".Yii::app()->format->format_decimal($value->margin).\"</td>\";\n }\n }\n $c9=\"<td style='\".$this->_head[$style].\"'>\".Yii::app()->format->format_decimal($this->_objetos[$index][$index2.'Forecast'][$phrase]).\"</td>\";\n foreach ($this->_objetos[$index][$index2.'PreviousMonth'] as $key => $value)\n {\n if($value->apellido == $phrase)\n {\n $c11=\"<td style='\".$this->_head[$style].\"'>\".Yii::app()->format->format_decimal($value->margin).\"</td>\";\n $previousMonth=$value->margin;\n }\n }\n $c10=\"<td style='\".$this->_head[$style].\"'>\".$this->_upOrDown($previousMonth,$this->_objetos[$index][$index2.'Forecast'][$phrase]).\"</td>\";\n }\n \n if($type==true)\n {\n if($c1==null) $c1=\"<td style='\".$this->_head[$style].\"'>--</td>\";\n if($c2==null) $c2=\"<td style='\".$this->_head[$style].\"'>--</td>\";\n }\n if($c3==null) $c3=\"<td style='\".$this->_head[$style].\"'>--</td>\";\n if($this->equal)\n {\n if($c4==null) $c4=\"<td style='\".$this->_head[$style].\"'></td>\";\n if($c5==null) $c5=\"<td style='\".$this->_head[$style].\"'>--</td>\";\n if($c6==null) $c6=\"<td style='\".$this->_head[$style].\"'></td>\";\n if($c7==null) $c7=\"<td style='\".$this->_head[$style].\"'>--</td>\";\n if($c8==null) $c8=\"<td style='\".$this->_head[$style].\"'>--</td>\";\n if($c9==null) $c9=\"<td style='\".$this->_head[$style].\"'>--</td>\";\n if($c10==null) $c10=\"<td style='\".$this->_head[$style].\"'></td>\";\n if($c11==null) $c11=\"<td style='\".$this->_head[$style].\"'>--</td>\";\n } \n $body=$c1.$c2.$c3.$c4.$c5.$c6.$c7.$c8.$c9.$c10.$c11;\n return $body;\n }", "title": "" }, { "docid": "887d15e0083732426c528c6892eb1015", "score": "0.5219733", "text": "protected function row_class($row)\n {\n return '';\n }", "title": "" }, { "docid": "2e9b886dd0ead4acffa4b728a55ba043", "score": "0.5217154", "text": "function RenderRow() {\n\t\tglobal $conn, $Security, $Language;\n\t\tglobal $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t// Convert decimal values if posted back\n\n\t\tif ($this->monto_base->FormValue == $this->monto_base->CurrentValue && is_numeric(ew_StrToFloat($this->monto_base->CurrentValue)))\n\t\t\t$this->monto_base->CurrentValue = ew_StrToFloat($this->monto_base->CurrentValue);\n\n\t\t// Convert decimal values if posted back\n\t\tif ($this->monto_impuesto->FormValue == $this->monto_impuesto->CurrentValue && is_numeric(ew_StrToFloat($this->monto_impuesto->CurrentValue)))\n\t\t\t$this->monto_impuesto->CurrentValue = ew_StrToFloat($this->monto_impuesto->CurrentValue);\n\n\t\t// Convert decimal values if posted back\n\t\tif ($this->monto_total->FormValue == $this->monto_total->CurrentValue && is_numeric(ew_StrToFloat($this->monto_total->CurrentValue)))\n\t\t\t$this->monto_total->CurrentValue = ew_StrToFloat($this->monto_total->CurrentValue);\n\n\t\t// Call Row_Rendering event\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// id_recibo\n\t\t// id_empresa\n\t\t// fecha_emision\n\t\t// fecha_vencimiento\n\t\t// numero\n\t\t// monto_base\n\t\t// monto_impuesto\n\t\t// monto_total\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t\t// id_recibo\n\t\t\t$this->id_recibo->ViewValue = $this->id_recibo->CurrentValue;\n\t\t\t$this->id_recibo->ViewCustomAttributes = \"\";\n\n\t\t\t// id_empresa\n\t\t\tif (strval($this->id_empresa->CurrentValue) <> \"\") {\n\t\t\t\t$sFilterWrk = \"`id_empresa`\" . ew_SearchString(\"=\", $this->id_empresa->CurrentValue, EW_DATATYPE_NUMBER);\n\t\t\t$sSqlWrk = \"SELECT `id_empresa`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `empresas`\";\n\t\t\t$sWhereWrk = \"\";\n\t\t\tif ($sFilterWrk <> \"\") {\n\t\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\n\t\t\t}\n\n\t\t\t// Call Lookup selecting\n\t\t\t$this->Lookup_Selecting($this->id_empresa, $sWhereWrk);\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\n\t\t\t$sSqlWrk .= \" ORDER BY `nombre`\";\n\t\t\t\t$rswrk = $conn->Execute($sSqlWrk);\n\t\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\n\t\t\t\t\t$this->id_empresa->ViewValue = $rswrk->fields('DispFld');\n\t\t\t\t\t$rswrk->Close();\n\t\t\t\t} else {\n\t\t\t\t\t$this->id_empresa->ViewValue = $this->id_empresa->CurrentValue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->id_empresa->ViewValue = NULL;\n\t\t\t}\n\t\t\t$this->id_empresa->ViewCustomAttributes = \"\";\n\n\t\t\t// fecha_emision\n\t\t\t$this->fecha_emision->ViewValue = $this->fecha_emision->CurrentValue;\n\t\t\t$this->fecha_emision->ViewValue = ew_FormatDateTime($this->fecha_emision->ViewValue, 7);\n\t\t\t$this->fecha_emision->ViewCustomAttributes = \"\";\n\n\t\t\t// fecha_vencimiento\n\t\t\t$this->fecha_vencimiento->ViewValue = $this->fecha_vencimiento->CurrentValue;\n\t\t\t$this->fecha_vencimiento->ViewValue = ew_FormatDateTime($this->fecha_vencimiento->ViewValue, 7);\n\t\t\t$this->fecha_vencimiento->ViewCustomAttributes = \"\";\n\n\t\t\t// numero\n\t\t\t$this->numero->ViewValue = $this->numero->CurrentValue;\n\t\t\t$this->numero->ViewCustomAttributes = \"\";\n\n\t\t\t// monto_base\n\t\t\t$this->monto_base->ViewValue = $this->monto_base->CurrentValue;\n\t\t\t$this->monto_base->ViewCustomAttributes = \"\";\n\n\t\t\t// monto_impuesto\n\t\t\t$this->monto_impuesto->ViewValue = $this->monto_impuesto->CurrentValue;\n\t\t\t$this->monto_impuesto->ViewCustomAttributes = \"\";\n\n\t\t\t// monto_total\n\t\t\t$this->monto_total->ViewValue = $this->monto_total->CurrentValue;\n\t\t\t$this->monto_total->ViewCustomAttributes = \"\";\n\n\t\t\t// id_empresa\n\t\t\t$this->id_empresa->LinkCustomAttributes = \"\";\n\t\t\t$this->id_empresa->HrefValue = \"\";\n\t\t\t$this->id_empresa->TooltipValue = \"\";\n\n\t\t\t// fecha_emision\n\t\t\t$this->fecha_emision->LinkCustomAttributes = \"\";\n\t\t\t$this->fecha_emision->HrefValue = \"\";\n\t\t\t$this->fecha_emision->TooltipValue = \"\";\n\n\t\t\t// fecha_vencimiento\n\t\t\t$this->fecha_vencimiento->LinkCustomAttributes = \"\";\n\t\t\t$this->fecha_vencimiento->HrefValue = \"\";\n\t\t\t$this->fecha_vencimiento->TooltipValue = \"\";\n\n\t\t\t// numero\n\t\t\t$this->numero->LinkCustomAttributes = \"\";\n\t\t\t$this->numero->HrefValue = \"\";\n\t\t\t$this->numero->TooltipValue = \"\";\n\n\t\t\t// monto_base\n\t\t\t$this->monto_base->LinkCustomAttributes = \"\";\n\t\t\t$this->monto_base->HrefValue = \"\";\n\t\t\t$this->monto_base->TooltipValue = \"\";\n\n\t\t\t// monto_impuesto\n\t\t\t$this->monto_impuesto->LinkCustomAttributes = \"\";\n\t\t\t$this->monto_impuesto->HrefValue = \"\";\n\t\t\t$this->monto_impuesto->TooltipValue = \"\";\n\n\t\t\t// monto_total\n\t\t\t$this->monto_total->LinkCustomAttributes = \"\";\n\t\t\t$this->monto_total->HrefValue = \"\";\n\t\t\t$this->monto_total->TooltipValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "title": "" }, { "docid": "4f03d14085f585edd0c16456d967ea61", "score": "0.52094716", "text": "function Row($data)\n{\n $nb=0;\n for($i=0;$i<count($data);$i++)\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n $h=5*$nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for($i=0;$i<count($data);$i++)\n {\n $w=$this->widths[$i];\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'C';\n //Save the current position\n $x=$this->GetX();\n $y=$this->GetY();\n //Draw the border\n //$this->Rect($x,$y,$w,$h);\n //Print the text\n $this->MultiCell($w,$this->ancho[$i],$data[$i],$this->celdas[$i],$a);\n //Put the position to the right of the cell\n $this->SetXY($x+$w,$y);\n }\n //Go to the next line\n $this->Ln($h);\n}", "title": "" }, { "docid": "3972346bfe9dd90bd6ba4be96e17ac10", "score": "0.5197744", "text": "function _renderTable(&$table)\n {\n $max = 0;\n foreach ($table->_rows as $row) {\n $max = max($max, $row->getColumnCount());\n }\n printf('<p><table columns=\"%d\">', $max);\n\n parent::_renderTable($table);\n\n // Terminate table.\n echo '</table></p>';\n }", "title": "" }, { "docid": "1081a0cfa4161798b4cb74c6d2632fa8", "score": "0.519596", "text": "function Row($data)\n{\n $nb=0;\n for($i=0;$i<count($data);$i++)\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n $h=5*$nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n \n //Draw the cells of the row\n for($i=0;$i<count($data);$i++)\n {\n $w=$this->widths[$i];\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n //Save the current position\n $x=$this->GetX();\n $y=$this->GetY();\n //Draw the border\n $this->Rect($x,$y,$w,$h);\n //Print the text\n $this->MultiCell($w,5,$data[$i],0,$a, false);\n //Put the position to the right of the cell\n $this->SetXY($x+$w,$y);\n\n \n }\n //Go to the next line\n $this->Ln($h);\n}", "title": "" }, { "docid": "8534cc35b4dc41e33e9214cb541836f2", "score": "0.5194504", "text": "function Row($data)\n {\n $nb=0;\n for($i=0;$i<count($data);$i++)\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n $h=5*$nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for($i=0;$i<count($data);$i++)\n {\n $w=$this->widths[$i];\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\n $color=isset($this->color[$i]) ? $this->color[$i] : FALSE;\n $widht=isset($this->widht[$i]) ? $this->widht[$i] : 0.2;\n // echo $widht; die();\n //Save the current position\n $x=$this->GetX();\n $y=$this->GetY();\n //Draw the border\n $this->SetLineWidth($widht);\n $this->Rect($x,$y,$w,$h);\n //Print the text\n $this->MultiCell($w,5,$data[$i],0,$a,$color);\n //Put the position to the right of the cell\n $this->SetXY($x+$w,$y);\n }\n //Go to the next line\n $this->Ln($h);\n }", "title": "" }, { "docid": "3b18e441b48169cd363152f88cdb6152", "score": "0.519302", "text": "function Row($data)\n{\n $nb=0;\n for($i=0;$i<count($data);$i++)\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\n $h=5*$nb;\n //Issue a page break first if needed\n $this->CheckPageBreak($h);\n //Draw the cells of the row\n for($i=0;$i<count($data);$i++)\n {\n $w=$this->widths[$i];\n $a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'C'; //sets the alignment of text inside the cell\n //Save the current position\n $x=$this->GetX();\n $y=$this->GetY();\n //Draw the border\n $this->Rect($x,$y,$w,$h);\n //Print the text\n $this->MultiCell($w,5,$data[$i],0,$a);\n //Put the position to the right of the cell\n $this->SetXY($x+$w,$y);\n }\n //Go to the next line\n $this->Ln($h);\n}", "title": "" }, { "docid": "3f5cc9a7771b1c33649bacd99b04bdd4", "score": "0.5192662", "text": "public function my_row_classes($row)\n\t\t{\n\t\treturn;\n\t\t}", "title": "" }, { "docid": "41bfbd3f668686c8edd11c0a956e0b20", "score": "0.5190465", "text": "function sql_to_html_table($sqlresult, $delim=\"\\n\") {\r\n // starting table\r\n $htmltable = '<table id=\"table\" class=\"table\">' . $delim ; \r\n $counter = 0 ;\r\n // putting in lines\r\n while( $row = $sqlresult->fetch_assoc() ){\r\n if ( $counter===0 ) {\r\n // table header\r\n $htmltable .= \"<tr><th>Action</th>\" . $delim;\r\n foreach ($row as $key => $value ) {\r\n $htmltable .= \"<th>\" . $key . \"</th>\" . $delim ;\r\n }\r\n $htmltable .= \"</tr>\" . $delim ; \r\n $counter = 22;\r\n } \r\n // table body\r\n\r\n $htmltable .= \"<tr><td><a class=\\\"link\\\" href=\\\"edit5.php?clientidno=\" . $row[\"CLIENTIDNO\"] . \"\\\">Edit</a> <a onClick=\\\"return confirm('Are You Sure You Want to Delete This Row?');\\\" class=\\\"link\\\" href=\\\"test_delete.php?clientidno=\" . $row[\"CLIENTIDNO\"] . \"\\\">Delete</a> <a onClick=\\\"return confirm('Are You Sure You Want to Change this Row's Status?);\\\" class=\\\"link\\\" href=\\\"status.php?clientidno=\" . $row[\"CLIENTIDNO\"] . \"\\\">Change Status for Deletion</a></td>\" . $delim ;\r\n //echo \"<td>$key</td\";\r\n foreach ($row as $key => $value ) {\r\n $htmltable .= \"</td>\" . \"<td>\" . $value . \"</td>\" . $delim ;\r\n }\r\n $htmltable .= \"</tr>\" . $delim ;\r\n }\r\n // closing table\r\n $htmltable .= \"</table>\" . $delim ; \r\n // return\r\n return( $htmltable ) ; \r\n}", "title": "" }, { "docid": "0640068861a8acd3c913120ff18e27a1", "score": "0.51892793", "text": "function RenderRow() {\r\n\t\tglobal $Security, $Language, $gsLanguage;\r\n\r\n\t\t// Initialize URLs\r\n\t\t// Call Row_Rendering event\r\n\r\n\t\t$this->Row_Rendering();\r\n\r\n\t\t// Common render codes for all row types\r\n\t\t// Cue_Establecimiento\r\n\t\t// Nombre_Establecimiento\r\n\t\t// Nombre_Directivo\r\n\t\t// Cuil_Directivo\r\n\t\t// Nombre_Rte\r\n\t\t// Tel_Rte\r\n\t\t// Email_Rte\r\n\t\t// Nro_Serie_Server_Escolar\r\n\t\t// Contacto_Establecimiento\r\n\t\t// Domicilio_Escuela\r\n\t\t// Id_Provincia\r\n\t\t// Id_Departamento\r\n\t\t// Id_Localidad\r\n\t\t// Fecha_Actualizacion\r\n\t\t// Usuario\r\n\r\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\r\n\r\n\t\t// Cue_Establecimiento\r\n\t\t$this->Cue_Establecimiento->ViewValue = $this->Cue_Establecimiento->CurrentValue;\r\n\t\t$this->Cue_Establecimiento->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Nombre_Establecimiento\r\n\t\t$this->Nombre_Establecimiento->ViewValue = $this->Nombre_Establecimiento->CurrentValue;\r\n\t\t$this->Nombre_Establecimiento->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Nombre_Directivo\r\n\t\t$this->Nombre_Directivo->ViewValue = $this->Nombre_Directivo->CurrentValue;\r\n\t\t$this->Nombre_Directivo->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Cuil_Directivo\r\n\t\t$this->Cuil_Directivo->ViewValue = $this->Cuil_Directivo->CurrentValue;\r\n\t\t$this->Cuil_Directivo->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Nombre_Rte\r\n\t\t$this->Nombre_Rte->ViewValue = $this->Nombre_Rte->CurrentValue;\r\n\t\t$this->Nombre_Rte->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Tel_Rte\r\n\t\t$this->Tel_Rte->ViewValue = $this->Tel_Rte->CurrentValue;\r\n\t\t$this->Tel_Rte->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Email_Rte\r\n\t\t$this->Email_Rte->ViewValue = $this->Email_Rte->CurrentValue;\r\n\t\t$this->Email_Rte->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Nro_Serie_Server_Escolar\r\n\t\t$this->Nro_Serie_Server_Escolar->ViewValue = $this->Nro_Serie_Server_Escolar->CurrentValue;\r\n\t\t$this->Nro_Serie_Server_Escolar->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Contacto_Establecimiento\r\n\t\t$this->Contacto_Establecimiento->ViewValue = $this->Contacto_Establecimiento->CurrentValue;\r\n\t\t$this->Contacto_Establecimiento->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Domicilio_Escuela\r\n\t\t$this->Domicilio_Escuela->ViewValue = $this->Domicilio_Escuela->CurrentValue;\r\n\t\t$this->Domicilio_Escuela->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Id_Provincia\r\n\t\tif (strval($this->Id_Provincia->CurrentValue) <> \"\") {\r\n\t\t\t$sFilterWrk = \"`Id_Provincia`\" . ew_SearchString(\"=\", $this->Id_Provincia->CurrentValue, EW_DATATYPE_NUMBER, \"\");\r\n\t\t$sSqlWrk = \"SELECT `Id_Provincia`, `Nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `provincias`\";\r\n\t\t$sWhereWrk = \"\";\r\n\t\t$this->Id_Provincia->LookupFilters = array();\r\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t$this->Lookup_Selecting($this->Id_Provincia, $sWhereWrk); // Call Lookup selecting\r\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t$sSqlWrk .= \" ORDER BY `Nombre` ASC\";\r\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\r\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t$arwrk = array();\r\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\r\n\t\t\t\t$this->Id_Provincia->ViewValue = $this->Id_Provincia->DisplayValue($arwrk);\r\n\t\t\t\t$rswrk->Close();\r\n\t\t\t} else {\r\n\t\t\t\t$this->Id_Provincia->ViewValue = $this->Id_Provincia->CurrentValue;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->Id_Provincia->ViewValue = NULL;\r\n\t\t}\r\n\t\t$this->Id_Provincia->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Id_Departamento\r\n\t\tif (strval($this->Id_Departamento->CurrentValue) <> \"\") {\r\n\t\t\t$sFilterWrk = \"`Id_Departamento`\" . ew_SearchString(\"=\", $this->Id_Departamento->CurrentValue, EW_DATATYPE_NUMBER, \"\");\r\n\t\t$sSqlWrk = \"SELECT `Id_Departamento`, `Nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `departamento`\";\r\n\t\t$sWhereWrk = \"\";\r\n\t\t$this->Id_Departamento->LookupFilters = array();\r\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t$this->Lookup_Selecting($this->Id_Departamento, $sWhereWrk); // Call Lookup selecting\r\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t$sSqlWrk .= \" ORDER BY `Nombre` ASC\";\r\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\r\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t$arwrk = array();\r\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\r\n\t\t\t\t$this->Id_Departamento->ViewValue = $this->Id_Departamento->DisplayValue($arwrk);\r\n\t\t\t\t$rswrk->Close();\r\n\t\t\t} else {\r\n\t\t\t\t$this->Id_Departamento->ViewValue = $this->Id_Departamento->CurrentValue;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->Id_Departamento->ViewValue = NULL;\r\n\t\t}\r\n\t\t$this->Id_Departamento->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Id_Localidad\r\n\t\tif (strval($this->Id_Localidad->CurrentValue) <> \"\") {\r\n\t\t\t$sFilterWrk = \"`Id_Localidad`\" . ew_SearchString(\"=\", $this->Id_Localidad->CurrentValue, EW_DATATYPE_NUMBER, \"\");\r\n\t\t$sSqlWrk = \"SELECT `Id_Localidad`, `Nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `localidades`\";\r\n\t\t$sWhereWrk = \"\";\r\n\t\t$this->Id_Localidad->LookupFilters = array();\r\n\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t$this->Lookup_Selecting($this->Id_Localidad, $sWhereWrk); // Call Lookup selecting\r\n\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t$sSqlWrk .= \" ORDER BY `Nombre` ASC\";\r\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\r\n\t\t\tif ($rswrk && !$rswrk->EOF) { // Lookup values found\r\n\t\t\t\t$arwrk = array();\r\n\t\t\t\t$arwrk[1] = $rswrk->fields('DispFld');\r\n\t\t\t\t$this->Id_Localidad->ViewValue = $this->Id_Localidad->DisplayValue($arwrk);\r\n\t\t\t\t$rswrk->Close();\r\n\t\t\t} else {\r\n\t\t\t\t$this->Id_Localidad->ViewValue = $this->Id_Localidad->CurrentValue;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->Id_Localidad->ViewValue = NULL;\r\n\t\t}\r\n\t\t$this->Id_Localidad->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Fecha_Actualizacion\r\n\t\t$this->Fecha_Actualizacion->ViewValue = $this->Fecha_Actualizacion->CurrentValue;\r\n\t\t$this->Fecha_Actualizacion->ViewValue = ew_FormatDateTime($this->Fecha_Actualizacion->ViewValue, 0);\r\n\t\t$this->Fecha_Actualizacion->ViewCustomAttributes = \"\";\r\n\r\n\t\t// Usuario\r\n\t\t$this->Usuario->ViewValue = $this->Usuario->CurrentValue;\r\n\t\t$this->Usuario->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Cue_Establecimiento\r\n\t\t\t$this->Cue_Establecimiento->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Cue_Establecimiento->HrefValue = \"\";\r\n\t\t\t$this->Cue_Establecimiento->TooltipValue = \"\";\r\n\r\n\t\t\t// Nombre_Establecimiento\r\n\t\t\t$this->Nombre_Establecimiento->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Nombre_Establecimiento->HrefValue = \"\";\r\n\t\t\t$this->Nombre_Establecimiento->TooltipValue = \"\";\r\n\r\n\t\t\t// Nombre_Directivo\r\n\t\t\t$this->Nombre_Directivo->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Nombre_Directivo->HrefValue = \"\";\r\n\t\t\t$this->Nombre_Directivo->TooltipValue = \"\";\r\n\r\n\t\t\t// Cuil_Directivo\r\n\t\t\t$this->Cuil_Directivo->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Cuil_Directivo->HrefValue = \"\";\r\n\t\t\t$this->Cuil_Directivo->TooltipValue = \"\";\r\n\r\n\t\t\t// Nombre_Rte\r\n\t\t\t$this->Nombre_Rte->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Nombre_Rte->HrefValue = \"\";\r\n\t\t\t$this->Nombre_Rte->TooltipValue = \"\";\r\n\r\n\t\t\t// Tel_Rte\r\n\t\t\t$this->Tel_Rte->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Tel_Rte->HrefValue = \"\";\r\n\t\t\t$this->Tel_Rte->TooltipValue = \"\";\r\n\r\n\t\t\t// Email_Rte\r\n\t\t\t$this->Email_Rte->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Email_Rte->HrefValue = \"\";\r\n\t\t\t$this->Email_Rte->TooltipValue = \"\";\r\n\r\n\t\t\t// Nro_Serie_Server_Escolar\r\n\t\t\t$this->Nro_Serie_Server_Escolar->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Nro_Serie_Server_Escolar->HrefValue = \"\";\r\n\t\t\t$this->Nro_Serie_Server_Escolar->TooltipValue = \"\";\r\n\r\n\t\t\t// Contacto_Establecimiento\r\n\t\t\t$this->Contacto_Establecimiento->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Contacto_Establecimiento->HrefValue = \"\";\r\n\t\t\t$this->Contacto_Establecimiento->TooltipValue = \"\";\r\n\r\n\t\t\t// Domicilio_Escuela\r\n\t\t\t$this->Domicilio_Escuela->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Domicilio_Escuela->HrefValue = \"\";\r\n\t\t\t$this->Domicilio_Escuela->TooltipValue = \"\";\r\n\r\n\t\t\t// Id_Provincia\r\n\t\t\t$this->Id_Provincia->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Id_Provincia->HrefValue = \"\";\r\n\t\t\t$this->Id_Provincia->TooltipValue = \"\";\r\n\r\n\t\t\t// Id_Departamento\r\n\t\t\t$this->Id_Departamento->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Id_Departamento->HrefValue = \"\";\r\n\t\t\t$this->Id_Departamento->TooltipValue = \"\";\r\n\r\n\t\t\t// Id_Localidad\r\n\t\t\t$this->Id_Localidad->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Id_Localidad->HrefValue = \"\";\r\n\t\t\t$this->Id_Localidad->TooltipValue = \"\";\r\n\r\n\t\t\t// Fecha_Actualizacion\r\n\t\t\t$this->Fecha_Actualizacion->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Fecha_Actualizacion->HrefValue = \"\";\r\n\t\t\t$this->Fecha_Actualizacion->TooltipValue = \"\";\r\n\r\n\t\t\t// Usuario\r\n\t\t\t$this->Usuario->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Usuario->HrefValue = \"\";\r\n\t\t\t$this->Usuario->TooltipValue = \"\";\r\n\t\t} elseif ($this->RowType == EW_ROWTYPE_EDIT) { // Edit row\r\n\r\n\t\t\t// Cue_Establecimiento\r\n\t\t\t$this->Cue_Establecimiento->EditAttrs[\"class\"] = \"form-control\";\r\n\t\t\t$this->Cue_Establecimiento->EditCustomAttributes = \"\";\r\n\t\t\t$this->Cue_Establecimiento->EditValue = $this->Cue_Establecimiento->CurrentValue;\r\n\t\t\t$this->Cue_Establecimiento->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// Nombre_Establecimiento\r\n\t\t\t$this->Nombre_Establecimiento->EditAttrs[\"class\"] = \"form-control\";\r\n\t\t\t$this->Nombre_Establecimiento->EditCustomAttributes = \"\";\r\n\t\t\t$this->Nombre_Establecimiento->EditValue = ew_HtmlEncode($this->Nombre_Establecimiento->CurrentValue);\r\n\t\t\t$this->Nombre_Establecimiento->PlaceHolder = ew_RemoveHtml($this->Nombre_Establecimiento->FldCaption());\r\n\r\n\t\t\t// Nombre_Directivo\r\n\t\t\t$this->Nombre_Directivo->EditAttrs[\"class\"] = \"form-control\";\r\n\t\t\t$this->Nombre_Directivo->EditCustomAttributes = \"\";\r\n\t\t\t$this->Nombre_Directivo->EditValue = ew_HtmlEncode($this->Nombre_Directivo->CurrentValue);\r\n\t\t\t$this->Nombre_Directivo->PlaceHolder = ew_RemoveHtml($this->Nombre_Directivo->FldCaption());\r\n\r\n\t\t\t// Cuil_Directivo\r\n\t\t\t$this->Cuil_Directivo->EditAttrs[\"class\"] = \"form-control\";\r\n\t\t\t$this->Cuil_Directivo->EditCustomAttributes = \"\";\r\n\t\t\t$this->Cuil_Directivo->EditValue = ew_HtmlEncode($this->Cuil_Directivo->CurrentValue);\r\n\t\t\t$this->Cuil_Directivo->PlaceHolder = ew_RemoveHtml($this->Cuil_Directivo->FldCaption());\r\n\r\n\t\t\t// Nombre_Rte\r\n\t\t\t$this->Nombre_Rte->EditAttrs[\"class\"] = \"form-control\";\r\n\t\t\t$this->Nombre_Rte->EditCustomAttributes = \"\";\r\n\t\t\t$this->Nombre_Rte->EditValue = ew_HtmlEncode($this->Nombre_Rte->CurrentValue);\r\n\t\t\t$this->Nombre_Rte->PlaceHolder = ew_RemoveHtml($this->Nombre_Rte->FldCaption());\r\n\r\n\t\t\t// Tel_Rte\r\n\t\t\t$this->Tel_Rte->EditAttrs[\"class\"] = \"form-control\";\r\n\t\t\t$this->Tel_Rte->EditCustomAttributes = \"\";\r\n\t\t\t$this->Tel_Rte->EditValue = ew_HtmlEncode($this->Tel_Rte->CurrentValue);\r\n\t\t\t$this->Tel_Rte->PlaceHolder = ew_RemoveHtml($this->Tel_Rte->FldCaption());\r\n\r\n\t\t\t// Email_Rte\r\n\t\t\t$this->Email_Rte->EditAttrs[\"class\"] = \"form-control\";\r\n\t\t\t$this->Email_Rte->EditCustomAttributes = \"\";\r\n\t\t\t$this->Email_Rte->EditValue = ew_HtmlEncode($this->Email_Rte->CurrentValue);\r\n\t\t\t$this->Email_Rte->PlaceHolder = ew_RemoveHtml($this->Email_Rte->FldCaption());\r\n\r\n\t\t\t// Nro_Serie_Server_Escolar\r\n\t\t\t$this->Nro_Serie_Server_Escolar->EditAttrs[\"class\"] = \"form-control\";\r\n\t\t\t$this->Nro_Serie_Server_Escolar->EditCustomAttributes = \"\";\r\n\t\t\t$this->Nro_Serie_Server_Escolar->EditValue = ew_HtmlEncode($this->Nro_Serie_Server_Escolar->CurrentValue);\r\n\t\t\t$this->Nro_Serie_Server_Escolar->PlaceHolder = ew_RemoveHtml($this->Nro_Serie_Server_Escolar->FldCaption());\r\n\r\n\t\t\t// Contacto_Establecimiento\r\n\t\t\t$this->Contacto_Establecimiento->EditAttrs[\"class\"] = \"form-control\";\r\n\t\t\t$this->Contacto_Establecimiento->EditCustomAttributes = \"\";\r\n\t\t\t$this->Contacto_Establecimiento->EditValue = ew_HtmlEncode($this->Contacto_Establecimiento->CurrentValue);\r\n\t\t\t$this->Contacto_Establecimiento->PlaceHolder = ew_RemoveHtml($this->Contacto_Establecimiento->FldCaption());\r\n\r\n\t\t\t// Domicilio_Escuela\r\n\t\t\t$this->Domicilio_Escuela->EditAttrs[\"class\"] = \"form-control\";\r\n\t\t\t$this->Domicilio_Escuela->EditCustomAttributes = \"\";\r\n\t\t\t$this->Domicilio_Escuela->EditValue = ew_HtmlEncode($this->Domicilio_Escuela->CurrentValue);\r\n\t\t\t$this->Domicilio_Escuela->PlaceHolder = ew_RemoveHtml($this->Domicilio_Escuela->FldCaption());\r\n\r\n\t\t\t// Id_Provincia\r\n\t\t\t$this->Id_Provincia->EditAttrs[\"class\"] = \"form-control\";\r\n\t\t\t$this->Id_Provincia->EditCustomAttributes = \"\";\r\n\t\t\tif (trim(strval($this->Id_Provincia->CurrentValue)) == \"\") {\r\n\t\t\t\t$sFilterWrk = \"0=1\";\r\n\t\t\t} else {\r\n\t\t\t\t$sFilterWrk = \"`Id_Provincia`\" . ew_SearchString(\"=\", $this->Id_Provincia->CurrentValue, EW_DATATYPE_NUMBER, \"\");\r\n\t\t\t}\r\n\t\t\t$sSqlWrk = \"SELECT `Id_Provincia`, `Nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `provincias`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\t$this->Id_Provincia->LookupFilters = array();\r\n\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t\t$this->Lookup_Selecting($this->Id_Provincia, $sWhereWrk); // Call Lookup selecting\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t$sSqlWrk .= \" ORDER BY `Nombre` ASC\";\r\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\r\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\r\n\t\t\tif ($rswrk) $rswrk->Close();\r\n\t\t\t$this->Id_Provincia->EditValue = $arwrk;\r\n\r\n\t\t\t// Id_Departamento\r\n\t\t\t$this->Id_Departamento->EditAttrs[\"class\"] = \"form-control\";\r\n\t\t\t$this->Id_Departamento->EditCustomAttributes = \"\";\r\n\t\t\tif (trim(strval($this->Id_Departamento->CurrentValue)) == \"\") {\r\n\t\t\t\t$sFilterWrk = \"0=1\";\r\n\t\t\t} else {\r\n\t\t\t\t$sFilterWrk = \"`Id_Departamento`\" . ew_SearchString(\"=\", $this->Id_Departamento->CurrentValue, EW_DATATYPE_NUMBER, \"\");\r\n\t\t\t}\r\n\t\t\t$sSqlWrk = \"SELECT `Id_Departamento`, `Nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, `Id_Provincia` AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `departamento`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\t$this->Id_Departamento->LookupFilters = array();\r\n\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t\t$this->Lookup_Selecting($this->Id_Departamento, $sWhereWrk); // Call Lookup selecting\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t$sSqlWrk .= \" ORDER BY `Nombre` ASC\";\r\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\r\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\r\n\t\t\tif ($rswrk) $rswrk->Close();\r\n\t\t\t$this->Id_Departamento->EditValue = $arwrk;\r\n\r\n\t\t\t// Id_Localidad\r\n\t\t\t$this->Id_Localidad->EditAttrs[\"class\"] = \"form-control\";\r\n\t\t\t$this->Id_Localidad->EditCustomAttributes = \"\";\r\n\t\t\tif (trim(strval($this->Id_Localidad->CurrentValue)) == \"\") {\r\n\t\t\t\t$sFilterWrk = \"0=1\";\r\n\t\t\t} else {\r\n\t\t\t\t$sFilterWrk = \"`Id_Localidad`\" . ew_SearchString(\"=\", $this->Id_Localidad->CurrentValue, EW_DATATYPE_NUMBER, \"\");\r\n\t\t\t}\r\n\t\t\t$sSqlWrk = \"SELECT `Id_Localidad`, `Nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, `Id_Departamento` AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `localidades`\";\r\n\t\t\t$sWhereWrk = \"\";\r\n\t\t\t$this->Id_Localidad->LookupFilters = array();\r\n\t\t\tew_AddFilter($sWhereWrk, $sFilterWrk);\r\n\t\t\t$this->Lookup_Selecting($this->Id_Localidad, $sWhereWrk); // Call Lookup selecting\r\n\t\t\tif ($sWhereWrk <> \"\") $sSqlWrk .= \" WHERE \" . $sWhereWrk;\r\n\t\t\t$sSqlWrk .= \" ORDER BY `Nombre` ASC\";\r\n\t\t\t$rswrk = Conn()->Execute($sSqlWrk);\r\n\t\t\t$arwrk = ($rswrk) ? $rswrk->GetRows() : array();\r\n\t\t\tif ($rswrk) $rswrk->Close();\r\n\t\t\t$this->Id_Localidad->EditValue = $arwrk;\r\n\r\n\t\t\t// Fecha_Actualizacion\r\n\t\t\t// Usuario\r\n\t\t\t// Edit refer script\r\n\t\t\t// Cue_Establecimiento\r\n\r\n\t\t\t$this->Cue_Establecimiento->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Cue_Establecimiento->HrefValue = \"\";\r\n\r\n\t\t\t// Nombre_Establecimiento\r\n\t\t\t$this->Nombre_Establecimiento->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Nombre_Establecimiento->HrefValue = \"\";\r\n\r\n\t\t\t// Nombre_Directivo\r\n\t\t\t$this->Nombre_Directivo->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Nombre_Directivo->HrefValue = \"\";\r\n\r\n\t\t\t// Cuil_Directivo\r\n\t\t\t$this->Cuil_Directivo->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Cuil_Directivo->HrefValue = \"\";\r\n\r\n\t\t\t// Nombre_Rte\r\n\t\t\t$this->Nombre_Rte->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Nombre_Rte->HrefValue = \"\";\r\n\r\n\t\t\t// Tel_Rte\r\n\t\t\t$this->Tel_Rte->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Tel_Rte->HrefValue = \"\";\r\n\r\n\t\t\t// Email_Rte\r\n\t\t\t$this->Email_Rte->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Email_Rte->HrefValue = \"\";\r\n\r\n\t\t\t// Nro_Serie_Server_Escolar\r\n\t\t\t$this->Nro_Serie_Server_Escolar->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Nro_Serie_Server_Escolar->HrefValue = \"\";\r\n\r\n\t\t\t// Contacto_Establecimiento\r\n\t\t\t$this->Contacto_Establecimiento->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Contacto_Establecimiento->HrefValue = \"\";\r\n\r\n\t\t\t// Domicilio_Escuela\r\n\t\t\t$this->Domicilio_Escuela->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Domicilio_Escuela->HrefValue = \"\";\r\n\r\n\t\t\t// Id_Provincia\r\n\t\t\t$this->Id_Provincia->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Id_Provincia->HrefValue = \"\";\r\n\r\n\t\t\t// Id_Departamento\r\n\t\t\t$this->Id_Departamento->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Id_Departamento->HrefValue = \"\";\r\n\r\n\t\t\t// Id_Localidad\r\n\t\t\t$this->Id_Localidad->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Id_Localidad->HrefValue = \"\";\r\n\r\n\t\t\t// Fecha_Actualizacion\r\n\t\t\t$this->Fecha_Actualizacion->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Fecha_Actualizacion->HrefValue = \"\";\r\n\r\n\t\t\t// Usuario\r\n\t\t\t$this->Usuario->LinkCustomAttributes = \"\";\r\n\t\t\t$this->Usuario->HrefValue = \"\";\r\n\t\t}\r\n\t\tif ($this->RowType == EW_ROWTYPE_ADD ||\r\n\t\t\t$this->RowType == EW_ROWTYPE_EDIT ||\r\n\t\t\t$this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row\r\n\t\t\t$this->SetupFieldTitles();\r\n\t\t}\r\n\r\n\t\t// Call Row Rendered event\r\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\r\n\t\t\t$this->Row_Rendered();\r\n\t}", "title": "" }, { "docid": "b5c665f6c9d02ee7c2363c64d468dda1", "score": "0.5187437", "text": "function RenderRow() {\n\t\tglobal $conn, $Security, $Language, $groups;\n\n\t\t// Initialize URLs\n\t\t// Call Row_Rendering event\n\n\t\t$groups->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// Id\n\n\t\t$groups->Id->CellCssStyle = \"\"; $groups->Id->CellCssClass = \"\";\n\t\t$groups->Id->CellAttrs = array(); $groups->Id->ViewAttrs = array(); $groups->Id->EditAttrs = array();\n\n\t\t// nickname_kor\n\t\t$groups->nickname_kor->CellCssStyle = \"\"; $groups->nickname_kor->CellCssClass = \"\";\n\t\t$groups->nickname_kor->CellAttrs = array(); $groups->nickname_kor->ViewAttrs = array(); $groups->nickname_kor->EditAttrs = array();\n\n\t\t// nickname_eng\n\t\t$groups->nickname_eng->CellCssStyle = \"\"; $groups->nickname_eng->CellCssClass = \"\";\n\t\t$groups->nickname_eng->CellAttrs = array(); $groups->nickname_eng->ViewAttrs = array(); $groups->nickname_eng->EditAttrs = array();\n\n\t\t// inactive\n\t\t$groups->inactive->CellCssStyle = \"\"; $groups->inactive->CellCssClass = \"\";\n\t\t$groups->inactive->CellAttrs = array(); $groups->inactive->ViewAttrs = array(); $groups->inactive->EditAttrs = array();\n\n\t\t// r_group\n\t\t$groups->r_group->CellCssStyle = \"\"; $groups->r_group->CellCssClass = \"\";\n\t\t$groups->r_group->CellAttrs = array(); $groups->r_group->ViewAttrs = array(); $groups->r_group->EditAttrs = array();\n\n\t\t// points\n\t\t$groups->points->CellCssStyle = \"\"; $groups->points->CellCssClass = \"\";\n\t\t$groups->points->CellAttrs = array(); $groups->points->ViewAttrs = array(); $groups->points->EditAttrs = array();\n\n\t\t// hide_list\n\t\t$groups->hide_list->CellCssStyle = \"\"; $groups->hide_list->CellCssClass = \"\";\n\t\t$groups->hide_list->CellAttrs = array(); $groups->hide_list->ViewAttrs = array(); $groups->hide_list->EditAttrs = array();\n\n\t\t// total_wins\n\t\t$groups->total_wins->CellCssStyle = \"\"; $groups->total_wins->CellCssClass = \"\";\n\t\t$groups->total_wins->CellAttrs = array(); $groups->total_wins->ViewAttrs = array(); $groups->total_wins->EditAttrs = array();\n\n\t\t// total_losses\n\t\t$groups->total_losses->CellCssStyle = \"\"; $groups->total_losses->CellCssClass = \"\";\n\t\t$groups->total_losses->CellAttrs = array(); $groups->total_losses->ViewAttrs = array(); $groups->total_losses->EditAttrs = array();\n\n\t\t// current_wins\n\t\t$groups->current_wins->CellCssStyle = \"\"; $groups->current_wins->CellCssClass = \"\";\n\t\t$groups->current_wins->CellAttrs = array(); $groups->current_wins->ViewAttrs = array(); $groups->current_wins->EditAttrs = array();\n\n\t\t// current_losses\n\t\t$groups->current_losses->CellCssStyle = \"\"; $groups->current_losses->CellCssClass = \"\";\n\t\t$groups->current_losses->CellAttrs = array(); $groups->current_losses->ViewAttrs = array(); $groups->current_losses->EditAttrs = array();\n\t\tif ($groups->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t\t// Id\n\t\t\t$groups->Id->ViewValue = $groups->Id->CurrentValue;\n\t\t\t$groups->Id->CssStyle = \"\";\n\t\t\t$groups->Id->CssClass = \"\";\n\t\t\t$groups->Id->ViewCustomAttributes = \"\";\n\n\t\t\t// nickname_kor\n\t\t\t$groups->nickname_kor->ViewValue = $groups->nickname_kor->CurrentValue;\n\t\t\t$groups->nickname_kor->CssStyle = \"\";\n\t\t\t$groups->nickname_kor->CssClass = \"\";\n\t\t\t$groups->nickname_kor->ViewCustomAttributes = \"\";\n\n\t\t\t// nickname_eng\n\t\t\t$groups->nickname_eng->ViewValue = $groups->nickname_eng->CurrentValue;\n\t\t\t$groups->nickname_eng->CssStyle = \"\";\n\t\t\t$groups->nickname_eng->CssClass = \"\";\n\t\t\t$groups->nickname_eng->ViewCustomAttributes = \"\";\n\n\t\t\t// inactive\n\t\t\t$groups->inactive->ViewValue = $groups->inactive->CurrentValue;\n\t\t\t$groups->inactive->CssStyle = \"\";\n\t\t\t$groups->inactive->CssClass = \"\";\n\t\t\t$groups->inactive->ViewCustomAttributes = \"\";\n\n\t\t\t// r_group\n\t\t\t$groups->r_group->ViewValue = $groups->r_group->CurrentValue;\n\t\t\t$groups->r_group->CssStyle = \"\";\n\t\t\t$groups->r_group->CssClass = \"\";\n\t\t\t$groups->r_group->ViewCustomAttributes = \"\";\n\n\t\t\t// points\n\t\t\t$groups->points->ViewValue = $groups->points->CurrentValue;\n\t\t\t$groups->points->CssStyle = \"\";\n\t\t\t$groups->points->CssClass = \"\";\n\t\t\t$groups->points->ViewCustomAttributes = \"\";\n\n\t\t\t// hide_list\n\t\t\t$groups->hide_list->ViewValue = $groups->hide_list->CurrentValue;\n\t\t\t$groups->hide_list->CssStyle = \"\";\n\t\t\t$groups->hide_list->CssClass = \"\";\n\t\t\t$groups->hide_list->ViewCustomAttributes = \"\";\n\n\t\t\t// total_wins\n\t\t\t$groups->total_wins->ViewValue = $groups->total_wins->CurrentValue;\n\t\t\t$groups->total_wins->CssStyle = \"\";\n\t\t\t$groups->total_wins->CssClass = \"\";\n\t\t\t$groups->total_wins->ViewCustomAttributes = \"\";\n\n\t\t\t// total_losses\n\t\t\t$groups->total_losses->ViewValue = $groups->total_losses->CurrentValue;\n\t\t\t$groups->total_losses->CssStyle = \"\";\n\t\t\t$groups->total_losses->CssClass = \"\";\n\t\t\t$groups->total_losses->ViewCustomAttributes = \"\";\n\n\t\t\t// current_wins\n\t\t\t$groups->current_wins->ViewValue = $groups->current_wins->CurrentValue;\n\t\t\t$groups->current_wins->CssStyle = \"\";\n\t\t\t$groups->current_wins->CssClass = \"\";\n\t\t\t$groups->current_wins->ViewCustomAttributes = \"\";\n\n\t\t\t// current_losses\n\t\t\t$groups->current_losses->ViewValue = $groups->current_losses->CurrentValue;\n\t\t\t$groups->current_losses->CssStyle = \"\";\n\t\t\t$groups->current_losses->CssClass = \"\";\n\t\t\t$groups->current_losses->ViewCustomAttributes = \"\";\n\n\t\t\t// Id\n\t\t\t$groups->Id->HrefValue = \"\";\n\t\t\t$groups->Id->TooltipValue = \"\";\n\n\t\t\t// nickname_kor\n\t\t\t$groups->nickname_kor->HrefValue = \"\";\n\t\t\t$groups->nickname_kor->TooltipValue = \"\";\n\n\t\t\t// nickname_eng\n\t\t\t$groups->nickname_eng->HrefValue = \"\";\n\t\t\t$groups->nickname_eng->TooltipValue = \"\";\n\n\t\t\t// inactive\n\t\t\t$groups->inactive->HrefValue = \"\";\n\t\t\t$groups->inactive->TooltipValue = \"\";\n\n\t\t\t// r_group\n\t\t\t$groups->r_group->HrefValue = \"\";\n\t\t\t$groups->r_group->TooltipValue = \"\";\n\n\t\t\t// points\n\t\t\t$groups->points->HrefValue = \"\";\n\t\t\t$groups->points->TooltipValue = \"\";\n\n\t\t\t// hide_list\n\t\t\t$groups->hide_list->HrefValue = \"\";\n\t\t\t$groups->hide_list->TooltipValue = \"\";\n\n\t\t\t// total_wins\n\t\t\t$groups->total_wins->HrefValue = \"\";\n\t\t\t$groups->total_wins->TooltipValue = \"\";\n\n\t\t\t// total_losses\n\t\t\t$groups->total_losses->HrefValue = \"\";\n\t\t\t$groups->total_losses->TooltipValue = \"\";\n\n\t\t\t// current_wins\n\t\t\t$groups->current_wins->HrefValue = \"\";\n\t\t\t$groups->current_wins->TooltipValue = \"\";\n\n\t\t\t// current_losses\n\t\t\t$groups->current_losses->HrefValue = \"\";\n\t\t\t$groups->current_losses->TooltipValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($groups->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$groups->Row_Rendered();\n\t}", "title": "" }, { "docid": "2667fc56a173a7ea3b8d4985cd678b5a", "score": "0.51820654", "text": "function RenderRow() {\n\t\tglobal $conn, $Security, $Language;\n\t\tglobal $gsLanguage;\n\n\t\t// Initialize URLs\n\t\t// Call Row_Rendering event\n\n\t\t$this->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// user_id\n\t\t// user_id_fb\n\t\t// username\n\t\t// password\n\t\t// user_real_name\n\t\t// user_avatar\n\t\t// user_cover\n\t\t// user_student_code\n\t\t// user_university\n\t\t// user_gender\n\t\t// user_dob\n\t\t// user_hometown\n\t\t// user_phone\n\t\t// user_description\n\t\t// user_faculty\n\t\t// user_class\n\t\t// user_active\n\t\t// user_status\n\t\t// user_group\n\t\t// user_token\n\t\t// user_activator\n\t\t// user_qoutes\n\t\t// user_date_attend\n\n\t\tif ($this->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t\t// user_id\n\t\t\t$this->user_id->ViewValue = $this->user_id->CurrentValue;\n\t\t\t$this->user_id->ViewCustomAttributes = \"\";\n\n\t\t\t// user_id_fb\n\t\t\t$this->user_id_fb->ViewValue = $this->user_id_fb->CurrentValue;\n\t\t\t$this->user_id_fb->ViewCustomAttributes = \"\";\n\n\t\t\t// username\n\t\t\t$this->username->ViewValue = $this->username->CurrentValue;\n\t\t\t$this->username->ViewCustomAttributes = \"\";\n\n\t\t\t// password\n\t\t\t$this->password->ViewValue = $this->password->CurrentValue;\n\t\t\t$this->password->ViewCustomAttributes = \"\";\n\n\t\t\t// user_real_name\n\t\t\t$this->user_real_name->ViewValue = $this->user_real_name->CurrentValue;\n\t\t\t$this->user_real_name->ViewCustomAttributes = \"\";\n\n\t\t\t// user_avatar\n\t\t\t$this->user_avatar->ViewValue = $this->user_avatar->CurrentValue;\n\t\t\t$this->user_avatar->ImageAlt = $this->user_avatar->FldAlt();\n\t\t\t$this->user_avatar->ViewCustomAttributes = \"\";\n\n\t\t\t// user_cover\n\t\t\t$this->user_cover->ViewValue = $this->user_cover->CurrentValue;\n\t\t\t$this->user_cover->ViewCustomAttributes = \"\";\n\n\t\t\t// user_student_code\n\t\t\t$this->user_student_code->ViewValue = $this->user_student_code->CurrentValue;\n\t\t\t$this->user_student_code->ViewCustomAttributes = \"\";\n\n\t\t\t// user_university\n\t\t\t$this->user_university->ViewValue = $this->user_university->CurrentValue;\n\t\t\t$this->user_university->ViewCustomAttributes = \"\";\n\n\t\t\t// user_gender\n\t\t\t$this->user_gender->ViewValue = $this->user_gender->CurrentValue;\n\t\t\t$this->user_gender->ViewCustomAttributes = \"\";\n\n\t\t\t// user_dob\n\t\t\t$this->user_dob->ViewValue = $this->user_dob->CurrentValue;\n\t\t\t$this->user_dob->ViewCustomAttributes = \"\";\n\n\t\t\t// user_hometown\n\t\t\t$this->user_hometown->ViewValue = $this->user_hometown->CurrentValue;\n\t\t\t$this->user_hometown->ViewCustomAttributes = \"\";\n\n\t\t\t// user_phone\n\t\t\t$this->user_phone->ViewValue = $this->user_phone->CurrentValue;\n\t\t\t$this->user_phone->ViewCustomAttributes = \"\";\n\n\t\t\t// user_description\n\t\t\t$this->user_description->ViewValue = $this->user_description->CurrentValue;\n\t\t\t$this->user_description->ViewCustomAttributes = \"\";\n\n\t\t\t// user_faculty\n\t\t\t$this->user_faculty->ViewValue = $this->user_faculty->CurrentValue;\n\t\t\t$this->user_faculty->ViewCustomAttributes = \"\";\n\n\t\t\t// user_class\n\t\t\t$this->user_class->ViewValue = $this->user_class->CurrentValue;\n\t\t\t$this->user_class->ViewCustomAttributes = \"\";\n\n\t\t\t// user_active\n\t\t\t$this->user_active->ViewValue = $this->user_active->CurrentValue;\n\t\t\t$this->user_active->ViewCustomAttributes = \"\";\n\n\t\t\t// user_status\n\t\t\t$this->user_status->ViewValue = $this->user_status->CurrentValue;\n\t\t\t$this->user_status->ViewCustomAttributes = \"\";\n\n\t\t\t// user_group\n\t\t\t$this->user_group->ViewValue = $this->user_group->CurrentValue;\n\t\t\t$this->user_group->ViewCustomAttributes = \"\";\n\n\t\t\t// user_token\n\t\t\t$this->user_token->ViewValue = $this->user_token->CurrentValue;\n\t\t\t$this->user_token->ViewCustomAttributes = \"\";\n\n\t\t\t// user_activator\n\t\t\t$this->user_activator->ViewValue = $this->user_activator->CurrentValue;\n\t\t\t$this->user_activator->ViewCustomAttributes = \"\";\n\n\t\t\t// user_date_attend\n\t\t\t$this->user_date_attend->ViewValue = $this->user_date_attend->CurrentValue;\n\t\t\t$this->user_date_attend->ViewCustomAttributes = \"\";\n\n\t\t\t// user_id\n\t\t\t$this->user_id->LinkCustomAttributes = \"\";\n\t\t\t$this->user_id->HrefValue = \"\";\n\t\t\t$this->user_id->TooltipValue = \"\";\n\n\t\t\t// user_id_fb\n\t\t\t$this->user_id_fb->LinkCustomAttributes = \"\";\n\t\t\t$this->user_id_fb->HrefValue = \"\";\n\t\t\t$this->user_id_fb->TooltipValue = \"\";\n\n\t\t\t// username\n\t\t\t$this->username->LinkCustomAttributes = \"\";\n\t\t\t$this->username->HrefValue = \"\";\n\t\t\t$this->username->TooltipValue = \"\";\n\n\t\t\t// password\n\t\t\t$this->password->LinkCustomAttributes = \"\";\n\t\t\t$this->password->HrefValue = \"\";\n\t\t\t$this->password->TooltipValue = \"\";\n\n\t\t\t// user_real_name\n\t\t\t$this->user_real_name->LinkCustomAttributes = \"\";\n\t\t\t$this->user_real_name->HrefValue = \"\";\n\t\t\t$this->user_real_name->TooltipValue = \"\";\n\n\t\t\t// user_avatar\n\t\t\t$this->user_avatar->LinkCustomAttributes = \"\";\n\t\t\t$this->user_avatar->HrefValue = \"\";\n\t\t\t$this->user_avatar->TooltipValue = \"\";\n\n\t\t\t// user_cover\n\t\t\t$this->user_cover->LinkCustomAttributes = \"\";\n\t\t\t$this->user_cover->HrefValue = \"\";\n\t\t\t$this->user_cover->TooltipValue = \"\";\n\n\t\t\t// user_student_code\n\t\t\t$this->user_student_code->LinkCustomAttributes = \"\";\n\t\t\t$this->user_student_code->HrefValue = \"\";\n\t\t\t$this->user_student_code->TooltipValue = \"\";\n\n\t\t\t// user_university\n\t\t\t$this->user_university->LinkCustomAttributes = \"\";\n\t\t\t$this->user_university->HrefValue = \"\";\n\t\t\t$this->user_university->TooltipValue = \"\";\n\n\t\t\t// user_gender\n\t\t\t$this->user_gender->LinkCustomAttributes = \"\";\n\t\t\t$this->user_gender->HrefValue = \"\";\n\t\t\t$this->user_gender->TooltipValue = \"\";\n\n\t\t\t// user_dob\n\t\t\t$this->user_dob->LinkCustomAttributes = \"\";\n\t\t\t$this->user_dob->HrefValue = \"\";\n\t\t\t$this->user_dob->TooltipValue = \"\";\n\n\t\t\t// user_hometown\n\t\t\t$this->user_hometown->LinkCustomAttributes = \"\";\n\t\t\t$this->user_hometown->HrefValue = \"\";\n\t\t\t$this->user_hometown->TooltipValue = \"\";\n\n\t\t\t// user_phone\n\t\t\t$this->user_phone->LinkCustomAttributes = \"\";\n\t\t\t$this->user_phone->HrefValue = \"\";\n\t\t\t$this->user_phone->TooltipValue = \"\";\n\n\t\t\t// user_description\n\t\t\t$this->user_description->LinkCustomAttributes = \"\";\n\t\t\t$this->user_description->HrefValue = \"\";\n\t\t\t$this->user_description->TooltipValue = \"\";\n\n\t\t\t// user_faculty\n\t\t\t$this->user_faculty->LinkCustomAttributes = \"\";\n\t\t\t$this->user_faculty->HrefValue = \"\";\n\t\t\t$this->user_faculty->TooltipValue = \"\";\n\n\t\t\t// user_class\n\t\t\t$this->user_class->LinkCustomAttributes = \"\";\n\t\t\t$this->user_class->HrefValue = \"\";\n\t\t\t$this->user_class->TooltipValue = \"\";\n\n\t\t\t// user_active\n\t\t\t$this->user_active->LinkCustomAttributes = \"\";\n\t\t\t$this->user_active->HrefValue = \"\";\n\t\t\t$this->user_active->TooltipValue = \"\";\n\n\t\t\t// user_status\n\t\t\t$this->user_status->LinkCustomAttributes = \"\";\n\t\t\t$this->user_status->HrefValue = \"\";\n\t\t\t$this->user_status->TooltipValue = \"\";\n\n\t\t\t// user_group\n\t\t\t$this->user_group->LinkCustomAttributes = \"\";\n\t\t\t$this->user_group->HrefValue = \"\";\n\t\t\t$this->user_group->TooltipValue = \"\";\n\n\t\t\t// user_token\n\t\t\t$this->user_token->LinkCustomAttributes = \"\";\n\t\t\t$this->user_token->HrefValue = \"\";\n\t\t\t$this->user_token->TooltipValue = \"\";\n\n\t\t\t// user_activator\n\t\t\t$this->user_activator->LinkCustomAttributes = \"\";\n\t\t\t$this->user_activator->HrefValue = \"\";\n\t\t\t$this->user_activator->TooltipValue = \"\";\n\n\t\t\t// user_date_attend\n\t\t\t$this->user_date_attend->LinkCustomAttributes = \"\";\n\t\t\t$this->user_date_attend->HrefValue = \"\";\n\t\t\t$this->user_date_attend->TooltipValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($this->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$this->Row_Rendered();\n\t}", "title": "" }, { "docid": "ab04f94fd3923a29bad1026e535a2aac", "score": "0.51811826", "text": "function getRows($class, $resource_type, $resource_identifier, $resource_id, $date, $block, $resource_blocktype){\n\t// Display two rows per resource per block if the resource is only available for half blocks\n\tif ($resource_blocktype == \"Half\"){\n\t\techo '<tr class=\"'.$class.'\">';\n\t\t\techo '<td><a href=\"./?p=resource&id='.$resource_id.'&date='.$date.'\">'.getResourceTypeName($resource_type).'</a></td>';\n\t\t\techo '<td>'.$resource_identifier.'</td>';\n\t\t\techo '<td>First Half</td>';\n\t\t\techo getAvailability($resource_id, $date, ($block*10 + 1));\n\t\techo '</tr>';\n\t\t// Change styling of row\n\t\t$class = ($class==\"\") ? \"colored\": \"\";\n\t\techo '<tr class=\"'.$class.'\">';\n\t\t\techo '<td><a href=\"./?p=resource&id='.$resource_id.'&date='.$date.'\">'.getResourceTypeName($resource_type).'</a></td>';\n\t\t\techo '<td>'.$resource_identifier.'</td>';\n\t\t\techo '<td>Second Half</td>';\n\t\t\techo getAvailability($resource_id, $date, ($block*10 + 2));\n\t\techo '</tr>';\n\t\treturn $class = ($class==\"\") ? \"colored\": \"\";\n\t}else{\t// Otherwise, show only one row\n\t\techo '<tr class=\"'.$class.'\">';\n\t\t\techo '<td><a href=\"./?p=resource&id='.$resource_id.'&date='.$date.'\">'.getResourceTypeName($resource_type).'</a></td>';\n\t\t\techo '<td>'.$resource_identifier.'</td>';\n\t\t\techo '<td>Full Block</td>';\n\t\t\techo getAvailability($resource_id, $date, $block);\n\t\techo '</tr>';\n\t\treturn $class = ($class==\"\") ? \"colored\": \"\";\n\t}\n}", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "27b848dab1fcf615eaad9b5c3119c209", "score": "0.0", "text": "public function destroy($id)\n {\n $this->brewery->find($id)->delete();\n return redirect()\n ->route('brewery.index')\n ->with('message_success', __('controllers.brewery_destroy'));\n }", "title": "" } ]
[ { "docid": "37dd170c1eaea50870a9bd20839ad070", "score": "0.7137241", "text": "public function remove(ResourceInterface $resource): void\n {\n }", "title": "" }, { "docid": "4b8255c05a264d5d61f546d7bcd507ce", "score": "0.6672584", "text": "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "title": "" }, { "docid": "d9f10892d48fdfd7debb2a97681f0912", "score": "0.6659381", "text": "public function destroy(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "9128270ecb10fe081d7b27ed99999426", "score": "0.6632799", "text": "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "title": "" }, { "docid": "ca4c6cd0f72c6610d38f362f323ea885", "score": "0.6626075", "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": "e3c740412fbdcfbb4c5f134b55955877", "score": "0.66060185", "text": "public function deleteStorage($id);", "title": "" }, { "docid": "22e99170ed44ab8bba05c4fea1103beb", "score": "0.65424126", "text": "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "title": "" }, { "docid": "86a97ef20b44d79f474926937530d353", "score": "0.63162404", "text": "public function remove($resourceId)\n {\n return $this->rResourceMixin->remove($resourceId);\n }", "title": "" }, { "docid": "2961fd7e3d8100bdb9570443ca486260", "score": "0.624805", "text": "public function destroy()\n {\n if ($this->resource) {\n sem_remove($this->resource);\n @unlink($this->filePath);\n }\n }", "title": "" }, { "docid": "0145806453a1e9f5ee0809b4db0b14d3", "score": "0.61310524", "text": "public function markAsDeleted(ResolvedResource $resource);", "title": "" }, { "docid": "6c6fe1826f8ec4ac06c5e0ef405b8b7a", "score": "0.6100814", "text": "function deleteResource($id) {\n\t\t\t$id = sqlescape($id);\n\t\t\t$r = $this->getResource($id);\n\t\t\tif ($r) {\n\t\t\t\tsqlquery(\"DELETE FROM bigtree_resources WHERE file = '\".sqlescape($r[\"file\"]).\"'\");\n\t\t\t\t$storage = new BigTreeStorage;\n\t\t\t\t$storage->delete($r[\"file\"]);\n\t\t\t\tforeach ($r[\"thumbs\"] as $thumb) {\n\t\t\t\t\t$storage->delete($thumb);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "60da5cdaab3c2b4a3de543383ff7326a", "score": "0.60893893", "text": "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "title": "" }, { "docid": "ccaddaf8c48305cf51ff4f4e87f7f513", "score": "0.6054415", "text": "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "title": "" }, { "docid": "d7a9a477b41e565ba02b2968aa02b2d8", "score": "0.6054318", "text": "public function remove ($resource = false, $key = false) {\n\t\t$resource = ($resource) ? $resource : $this->resource;\n\t\t$key = ($key) ? $key : $this->key;\n\n\t\treturn DB::execute ('delete from `#prefix#lock` where resource = ? and resource_id = ?', $resource, $key);\n\t}", "title": "" }, { "docid": "5bb36f163668a235aa80821b0746c2bc", "score": "0.60064924", "text": "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "title": "" }, { "docid": "0edce8e39abb5191d53e16b1ad17f69f", "score": "0.5964138", "text": "public function destroy($id)\n {\n $suplier = Supplier::where('id',$id)->first();\n $photo = $suplier->photo;\n if($photo)\n {\n unlink($photo);\n Supplier::where('id',$id)->delete();\n\n }\n }", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "b549ee1a3239f6720bb4eae802ea1753", "score": "0.5930772", "text": "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "title": "" }, { "docid": "02436278b72d788803fbd1efa4067eef", "score": "0.59199584", "text": "public function delete(): void\n {\n unlink($this->path);\n }", "title": "" }, { "docid": "78f3fcb6a4df88ba8ea45797087a7e8d", "score": "0.59121597", "text": "public function remove($entity);", "title": "" }, { "docid": "5336825b23ae57c225d3534fd55b1861", "score": "0.5897263", "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": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "83e24f29d0e8d9db1e7e13447c37580c", "score": "0.58936465", "text": "public function deleteResource(Resource $resource)\n {\n //unset all fields (for now)\n foreach (get_class_methods($resource) as $method) {\n if (0 === strpos($method, 'set')) {\n $resource->$method(null);\n }\n }\n\n //set delete date and status\n $resource->setDateDeleted(new \\DateTime());\n $resource->setStatus(Resource::STATUS_DELETED);\n\n return $resource;\n }", "title": "" }, { "docid": "140b6c44eef77c79cbd9edc171fe8e75", "score": "0.5880124", "text": "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "title": "" }, { "docid": "682325cf5de8624768bd5dbfad42738d", "score": "0.5875408", "text": "public function action_remove()\n\t{\n\t\t$this->access('admin.'.strtolower($this->_admin->resource).'.remove');\n\t\t$id = $this->request->param('id');\n\n\t\tif(!$this->request->is_ajax())\n\t\t{\n\t\t\tthrow new Kohana_HTTP_Exception_404;\n\t\t}\n\n\t\t// Needs to be a GET request\n\t\tif($this->request->method() != Request::GET)\n\t\t{\n\t\t\tthrow new Kohana_HTTP_Exception_403('No data was requested to be removed.');\n\t\t}\n\n\t\t$record = $this->_admin->model->where($this->_admin->primary_key, '=', $id)->find();\n\n\t\tif($record->loaded())\n\t\t{\n\t\t\tRD::set(RD::SUCCESS, ':resource #:id has been removed.', array(\n\t\t\t\t':resource' => Inflector::singular($this->_resource),\n\t\t\t\t':id' => $id\n\t\t\t));\n\t\t\t$record->delete();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tRD::set(RD::WARNING, ':resource can\\'t be found.', array(\n\t\t\t\t':resource' => Inflector::singular($this->_resource),\n\t\t\t\t':id' => $id\n\t\t\t));\n\t\t}\n\t}", "title": "" }, { "docid": "7760e18034429a581e9c1073281ca346", "score": "0.5874566", "text": "public function delete ()\n {\n $this->unlock();\n sem_remove( $this->getResource() );\n $this->resource = NULL;\n return $this;\n }", "title": "" }, { "docid": "16ede02ea64f8d696ab94948fa4d095a", "score": "0.5870248", "text": "public function destroyFile($resource, File $file)\n {\n $file->delete();\n return $file->{$resource};\n }", "title": "" }, { "docid": "72dc5bfa6ca53ddd2451fc0e14e6fcfe", "score": "0.58690923", "text": "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "title": "" }, { "docid": "b0b6f080ff9e00a37e1e141de8af472d", "score": "0.5863659", "text": "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "title": "" }, { "docid": "e02a61dc8d778d6f70e60505035c99d1", "score": "0.58621585", "text": "public function onDelete(DeleteResourceEvent $event)\n {\n $em = $this->container->get('doctrine.orm.entity_manager');\n $em->remove($event->getResource());\n $event->stopPropagation();\n }", "title": "" }, { "docid": "ee70945e791659b8782f1f156e69304e", "score": "0.5847799", "text": "public function delete()\n {\n return $this->getStorage()->delete($this->path().DIRECTORY_SEPARATOR.$this->name());\n }", "title": "" }, { "docid": "fbd716173957d995532e7a5839e6a5dc", "score": "0.58406353", "text": "public function rm($item);", "title": "" }, { "docid": "df76e304787c6be76144a24a799b6900", "score": "0.5835866", "text": "public function removeAction()\n {\n Pi::service('log')->mute();\n $id = $this->params('id', 0);\n $fakeId = $this->params('fake_id', 0);\n $affectedRows = 0;\n $module = $this->getModule();\n\n if ($id) {\n $row = $this->getModel('media')->find($id);\n\n if ($row && $row->url) {\n // Delete media\n unlink(Pi::path($row->url));\n\n // Update db\n $row->url = '';\n $row->type = '';\n $row->size = 0;\n $row->meta = '';\n $affectedRows = $row->save();\n }\n } elseif ($fakeId) {\n $session = Media::getUploadSession($module, 'media');\n\n if (isset($session->$fakeId)) {\n $uploadInfo = isset($session->$id) ? $session->$id : $session->$fakeId;\n\n unlink(Pi::path($uploadInfo['tmp_name']));\n\n unset($session->$id);\n unset($session->$fakeId);\n }\n $affectedRows = 1;\n }\n\n echo json_encode([\n 'status' => $affectedRows ? self::AJAX_RESULT_TRUE : self::AJAX_RESULT_FALSE,\n 'message' => 'ok',\n ]);\n exit;\n }", "title": "" }, { "docid": "e47bb1b7bccbeb8651920ef7986252ae", "score": "0.5819071", "text": "protected function destroy(User $resource)\n {\n }", "title": "" }, { "docid": "c6821270bce7c29555a3d0ca63e8ff36", "score": "0.5809161", "text": "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "title": "" }, { "docid": "7e3f12eaa72d671def04991239bd33f4", "score": "0.58077335", "text": "public function destroy(Resource $resource)\n\t{\n\t\t$resource->delete();\n\n return ['success' => true, 'message' => 'Resource deleted'];\n\t}", "title": "" }, { "docid": "3e2addfb4f78b979aaadcf2a7b28b1c4", "score": "0.5783091", "text": "public function destroy(Request $request, $id)\n {\n\n $file= Documents::whereId($id)->firstOrFail();\n\n //unlink(public_path('storage',$file->id));\n\n $file->delete();\n return back();\n\n\n }", "title": "" }, { "docid": "5bc196208c1decbb644cd5cece6edd3f", "score": "0.5773983", "text": "public function unlink($uri) {\n $this->uri = $uri; // set instance URI\n return unlink($this->get_local_path());\n }", "title": "" }, { "docid": "f97458f1a249bea8589e37ce4a19458a", "score": "0.5770823", "text": "public function destroy($id)\n {\n// $info = $request->img;\n// dd($info);\n// dd($id);\n $info = Zhou::where('id',$id)->select('file')->first()->toArray();\n// dd('/storage/'.$info['file']);\n unlink('./storage/'.$info['file']);\n $data = Zhou::where('id',$id)->delete();\n\n\n// dd();\n if($data){\n return json_encode(['code'=>200]);\n }\n }", "title": "" }, { "docid": "27c91ef0cac551b90c12d8956a711079", "score": "0.5768296", "text": "public function deleteFromStore()\n\t{\n\t\t$this->isInStore(true);\n\n\t\t$store = GAMA_Store::singleton();\n\n\t\t// ===============\n\t\tapp_lock(LOCK_EX);\n\t\t// ===============\n\t\ttry\n\t\t{\n\t\t\t// make sure there are no instances of this class\n\t\t\t$count = $store->sqlFetchValue(\n\t\t\t\t'select count(*) from RESOURCE where type=?', $this->id);\n\t\t\t\n\t\t\tif($count > 0)\n\t\t\t{\n\t\t\t\tthrow new Exception('Delete related instances first');\n\t\t\t}\n\n\t\t\t// make sure there are no properties using this class\n\t\t\t$count = $store->sqlFetchValue('\n\t\t\t\tselect count(*) from PROPERTY\n\t\t\t\twhere dom=? or rng=?\n\t\t\t\t', $this->id, $this->id );\n\t\t\t\n\t\t\tif($count > 0)\n\t\t\t{\n\t\t\t\tthrow new Exception('Delete related properties first');\n\t\t\t}\n\t\t\t\n\t\t\t// now we can delete the class\n\t\t\t$store->sql('delete from RESOURCE where id=?', $this->id);\n\n\t\t\t// we should also update our cache\n\t\t\t$this->reloadFromStore();\n\t\t\t\n\t\t} catch(Exception $e)\n\t\t{\n\t\t\tapp_unlock();\n\t\t\tthrow $e;\n\t\t}\n\t\t\t\n\t\t// ==========\n\t\tapp_unlock();\n\t\t// ==========\n\t\t\n\t\tdebug(\"Resource deleted: $this->uri\");\n\t}", "title": "" }, { "docid": "80ccefee911dbbebc88e3854b170acf7", "score": "0.5765826", "text": "public function removeRecord();", "title": "" }, { "docid": "bbd4fbeb169cce49dbdee4fcf4da3308", "score": "0.576368", "text": "public function destroy(Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "81bac0e5ac8e3c967ba616afac4bfb1c", "score": "0.5760811", "text": "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "title": "" }, { "docid": "385e69d603b938952baeb3edc255a4ea", "score": "0.5753559", "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": "ddf3faf7670af66339c535dd8de7c088", "score": "0.57453483", "text": "public function destroy(Request $request)\n {\n Storage::delete($request->path);\n return redirect()->route('storage.index');\n }", "title": "" }, { "docid": "9a5dfeb522e8b8883397ebfbc0e9d95b", "score": "0.5726379", "text": "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "title": "" }, { "docid": "883f70738d6a177cbdf3fcaec9e9c05f", "score": "0.57144034", "text": "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "title": "" }, { "docid": "38e5a4eab7d9a854a4348b6f78b1554b", "score": "0.571345", "text": "public function destroy($resource, $id)\n {\n $this->repository->delete($id);\n return response(null, 204);\n }", "title": "" }, { "docid": "20950b5737f7cbea0d1cc5dc11a68eb1", "score": "0.57047796", "text": "public function delete() {\n $filePath = $this->getPath();\n if (is_file($filePath) && is_writable($filePath)) {\n unlink($filePath);\n }\n parent::delete();\n }", "title": "" }, { "docid": "e41dcd69306378f20a25f414352d6e6b", "score": "0.5696585", "text": "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "title": "" }, { "docid": "405f641d9f45ae5d1d63de363880f02b", "score": "0.5691377", "text": "public function destroy($id)\n\n {\n\n $product = Product::findOrFail($id);\n\n\n\n// unlink(public_path(). $icon->file);\n\n\n\n// $photo->delete();\n//\n// $icon->delete();\n Photo::where('product_id',$id)->delete();\n $product->delete();\n\n\n\n\n\n return redirect()->route('admin.products.index');\n\n }", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "88290b89858a6178671f929ae0a7ccba", "score": "0.5677111", "text": "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "title": "" }, { "docid": "f3ecd01b9c9cfcc917a40e1827e8d6a1", "score": "0.56522495", "text": "public function del() {\n sem_acquire($this->__mutex); //block until released\n @shm_remove_var($this->__shm, $this->__key);\n sem_release($this->__mutex); //release mutex\n }", "title": "" }, { "docid": "85a8d03b0c01970f57fe2403d38a7103", "score": "0.56494105", "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": "8b94ff007c35fa2c7485cebe32b8de85", "score": "0.5648262", "text": "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "title": "" }, { "docid": "2752e2223b3497665cc8082d9af5a967", "score": "0.5648085", "text": "public function delete($path, $data = null);", "title": "" }, { "docid": "8cf7657c92ed341a5a4e1ac7b314cf43", "score": "0.5648012", "text": "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "title": "" }, { "docid": "0cb73bdc807934bf8edf7e5eccafdd2b", "score": "0.56407464", "text": "public function delete() {\n $this->storageController->connect();\n $query = sprintf('DELETE FROM items WHERE name=\"%s\"', $this->name);\n $this->storageController->query($query);\n $this->storageController->close();\n\n $this->is_new = TRUE;\n }", "title": "" }, { "docid": "f51aa1f231aecb530fa194d38c843872", "score": "0.5629985", "text": "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "title": "" }, { "docid": "83377e4a1bcc3dc2e77329262b4d9a6d", "score": "0.5628369", "text": "public function delete()\n {\n fclose($this->inputStream);\n }", "title": "" }, { "docid": "9db585fcb135fe60165f9be69e476584", "score": "0.5622851", "text": "private function _remove($id)\n\t{\n\t\t$store = $this->model_store->find($id);\n\n\t\tif (!empty($store->IMAGE)) {\n\t\t\t$path = FCPATH . '/uploads/store/' . $store->IMAGE;\n\n\t\t\tif (is_file($path)) {\n\t\t\t\t$delete_file = unlink($path);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\treturn $this->model_store->remove($id);\n\t}", "title": "" }, { "docid": "342b5fc16c6f42ac6826e9c554c81f4d", "score": "0.55992156", "text": "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "title": "" }, { "docid": "97e50e61326801fa4efc3704e9dd77c1", "score": "0.5598557", "text": "public function revoke($resource, $permission = null);", "title": "" }, { "docid": "eb981a32d53ea8153aa2cec46a4f509f", "score": "0.5581215", "text": "public function destroy($id)\n {\n// if(Auth::user()->role == User::ROLE_SUPERADMIN) {\n $product = ProductItem::findOrFail($id);\n if($product->image_name != '') {\n $image_path = app_path(\"../../files/product/\" . $product->image_name);\n unlink($image_path);\n }\n\n ProductItem::destroy($id);\n\n Alert::success('Your data already deleted !', 'Success !');\n\n return redirect('admin/product');\n// }\n }", "title": "" }, { "docid": "97914eb78d7cf648246f9bcd6ac69124", "score": "0.5573565", "text": "public function destroy($id)\n {\n /*\n\n = R::load( '', $id );\n R::trash( );*/\n }", "title": "" }, { "docid": "9063023fcee6a479bc40053db38d89e0", "score": "0.557017", "text": "public function destroy($id)\n {\n //\n\n\n $post = Post::withTrashed()->where('id',$id)->firstOrFail();\n\n if ($post->trashed()){\n /////$path = 'test.txt';\n /////Storage::disk('s3')->put($path, 'hello');\n ///// Storage::disk('s3')->delete($path);\n //return $post->image;\n\n if(Storage::disk('s3')->exists($post->filename)) {\n Storage::disk('s3')->delete($post->filename);\n } else {\n $post->deleteImage();\n $post->forceDelete();\n\n }\n\n\n return redirect(route('trashed-posts.index'))->with('status', 'Post deleted successfully');\n }\n else {\n $post->delete();\n return redirect(route('posts.index'))->with('status', 'Post deleted successfully');\n }\n\n // return redirect(route('posts.index'))->with('status', 'Post deleted successfully');\n\n }", "title": "" }, { "docid": "ea73af051ca124bba926c5047e1f799b", "score": "0.5566796", "text": "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "title": "" }, { "docid": "a85f6f9231c5a5b648efc0e34b009554", "score": "0.55642897", "text": "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "title": "" }, { "docid": "9ef8b8850e1424f439f75a07b411de21", "score": "0.55641", "text": "public function remove($filePath){\n return Storage::delete($filePath);\n }", "title": "" }, { "docid": "7fbd1a887ad4dca00687bb4abce1ae49", "score": "0.5556536", "text": "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "title": "" }, { "docid": "b45d20ef7b675860a322ba4b6d1dbd5a", "score": "0.55559915", "text": "public function destroy($id)\n {\n $file_data = Media::find($id)->first();\n if(file_exists($file_data->path)){\n @unlink(public_path(), $file_data->path);\n }\n Media::where('id', $id)->delete();\n return redirect()->back()->with('message', 'Media deleted successfully!');\n }", "title": "" }, { "docid": "e98c4608a62ab3f2b92573a4bed86a6f", "score": "0.5551504", "text": "abstract public function Resource_Link_delete($resource_link);", "title": "" }, { "docid": "35753424e21be7d9c22ced54d549e939", "score": "0.5540951", "text": "public function remove()\n\t{\n\t\tif(self::exists($this->name))\n\t\t{\n\t\t\t$this->value = false;\n\t\t\t$this->encodedValue = null;\n\t\t\t$this->sendHeader();\n\n\t\t\t$cookiePath = $this->getMetaFilePath();\n\n\t\t\tif(File::exists($cookiePath))\n\t\t\t\tFile::remove($cookiePath);\n\t\t}\n\t}", "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": "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": "39fd8b9a4b5864c48e07d66807e5775f", "score": "0.5539789", "text": "public function destroy($id)\n {\n $image = Slider::findOrFail($id);\n //dd($image);\n// $image_path = app_path(\"images/{$image}\");\n// //dd($image_path);\n// if (File::exists($image_path)) {\n// File::delete($image_path);\n// //File::delete(\"images/{$image}\");\n// unlink($image_path);\n// }\n// File::delete(public_path(\"images/{$image->path}\"));\n $image->delete();\n return redirect('admin-group-1/slider');\n }", "title": "" }, { "docid": "0005f2e6964d036d888b5343fa80a1b1", "score": "0.55371785", "text": "public function deleted(Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "d434e2cdc40338f523a40bcd0c8522a0", "score": "0.55343556", "text": "public function delete() {\n $this->client->deleteData($this->uri);\n }", "title": "" }, { "docid": "bd7d7fbce770fd39cf8081927084d5c3", "score": "0.55334973", "text": "public function destroy($id)\n {\n $brand = Brand::findOrFail($id);\n\n if (Storage::disk('public')->exists('Brand/'.$brand->brand_image)) {\n Storage::disk('public')->delete('Brand/'.$brand->brand_image);\n }\n $brand->delete();\n }", "title": "" }, { "docid": "b36cf6614522a902b216519e3592c3ba", "score": "0.55275744", "text": "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "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": "" } ]
f1ff02e8349544dd37f866ec851f7a06
Get the API response errors.
[ { "docid": "78f07c2c55254a015b70f1491031ace5", "score": "0.702307", "text": "public function getErrors(): stdClass\n {\n return $this->errors;\n }", "title": "" } ]
[ { "docid": "b51c7d4412876473720e6f2b886aab96", "score": "0.8113138", "text": "public function getErrors()\n {\n return $this->response['error-codes'];\n }", "title": "" }, { "docid": "dd7eddb92d82c73aa9b8c25b8a47ae18", "score": "0.762446", "text": "private function getErrorResponse(): array\n {\n return [\n 'status' => $this->getStatus(),\n 'code' => $this->getCode(),\n 'exception' => $this->getException(),\n 'errors' => $this->getErrors()\n ];\n }", "title": "" }, { "docid": "6fe566280918acd3b12124418828dc36", "score": "0.7605637", "text": "public function getErrors()\n {\n if (!$this->isError()) {\n return [];\n }\n if (null === $this->jsonBody\n || !isset($this->jsonBody->errors)\n ) {\n require_once 'Zend/Service/Twitter/Exception.php';\n throw new Zend_Service_Twitter_Exception(\n 'Either no JSON response received, or JSON error response is malformed; cannot return errors'\n );\n }\n return $this->jsonBody->errors;\n }", "title": "" }, { "docid": "b8a6dc76d0b0ed153edce9af918f5500", "score": "0.75135976", "text": "public function getErrorResponse() : array {\n return [\n \"response_data\" => [],\n 'error' => $this->error_code,\n \"message\" => $this->message,\n \"status_code\" => $this->status_code\n ];\n }", "title": "" }, { "docid": "6f1ead90a1c8c78971bad83e26cc2ad0", "score": "0.75051624", "text": "function get_errors_from_response() {\n\t\t$error_code = '';\n\t\t$error_message = '';\n\t\tif ( $this->get_error_code() ) {\n\t\t\t$error_code = ' Error Code: ' . $this->get_error_code();\n\t\t}\n\t\t\n\t\tif ( $this->get_error_message() ) {\n\t\t\t$error_message = ' Error Message: ' . $this->get_error_message();\n\t\t}\n\t\t\n\t\treturn sprintf( '%s%s', $error_code, $error_message );\n\t}", "title": "" }, { "docid": "b546f0eb8aae873899d020af0174a94b", "score": "0.7433996", "text": "public function getErrors(): ?array\n {\n return $this->response->error ?? null;\n }", "title": "" }, { "docid": "a71bab2769bfa70c11a81fb27110cc3b", "score": "0.72984517", "text": "public function getErrors()\n {\n if (isset($this->details['errors'])) {\n return $this->details['errors'];\n }\n }", "title": "" }, { "docid": "8338b8df59be5369137de0eb130142a7", "score": "0.72289234", "text": "public function get_errors()\n {\n return $this->_errorMessage;\n }", "title": "" }, { "docid": "e2a71e9b209e96bc0eaaa881ed124706", "score": "0.72089493", "text": "public function getErrorResponse() \n {\n return $this->_errorResponse;\n }", "title": "" }, { "docid": "09ffbcb916c59d2cd2d333dd1e1f2c81", "score": "0.71778417", "text": "public function getErrors();", "title": "" }, { "docid": "09ffbcb916c59d2cd2d333dd1e1f2c81", "score": "0.71778417", "text": "public function getErrors();", "title": "" }, { "docid": "09ffbcb916c59d2cd2d333dd1e1f2c81", "score": "0.71778417", "text": "public function getErrors();", "title": "" }, { "docid": "09ffbcb916c59d2cd2d333dd1e1f2c81", "score": "0.71778417", "text": "public function getErrors();", "title": "" }, { "docid": "09ffbcb916c59d2cd2d333dd1e1f2c81", "score": "0.71778417", "text": "public function getErrors();", "title": "" }, { "docid": "4848c7f0fb95026cd3f03215a6ccc533", "score": "0.71567684", "text": "public function getErrorMessages()\n {\n if (isset($this->response['errors'])) {\n $messages = [];\n\n foreach ($this->response['errors'] as $row) {\n $messages[] = $row['error_message'];\n }\n\n return $messages;\n } else {\n return [];\n }\n }", "title": "" }, { "docid": "f5be9c1c0f6aaf4e90aab462135ffc8a", "score": "0.7124128", "text": "public function getError(): array\n {\n return $this->error;\n }", "title": "" }, { "docid": "3b366309a1875fc2c0b3445d47c2a46e", "score": "0.7112832", "text": "public function GetErrors()\n\t{\n\t\treturn $this->_arErrors;\n\t}", "title": "" }, { "docid": "3e162a267ae9d232537ed54847322cc6", "score": "0.7094656", "text": "private static function getErrorMessage($response)\n {\n $body = $response->getBody();\n\n $message = json_decode($body, true);\n $errors = [];\n\n if (is_array($message) && isset($message['errors'])) {\n $errors = $message['errors'];\n }\n\n if ($body == self::RATE_LIMIT_ERROR_MESSAGE) {\n $errors = [self::RATE_LIMIT_ERROR_MESSAGE];\n }\n\n return $errors;\n }", "title": "" }, { "docid": "771c690c2300d29883a8f16624135f1c", "score": "0.70868355", "text": "public function GetErrors()\n {\n return $this->errors;\n }", "title": "" }, { "docid": "18e3b9d0a535a2e412489a33d1d96c69", "score": "0.7083887", "text": "public function getErrors()\n {\n return $this->error;\n }", "title": "" }, { "docid": "72245398e5eb05fd5e63fabe2705ec92", "score": "0.70697117", "text": "public abstract function getErrors();", "title": "" }, { "docid": "0dde95749da46449a8687cf113d44ccd", "score": "0.7064497", "text": "public function responseError() {\n\n $xml = simplexml_load_string($this->curl_response, 'SimpleXMLElement', LIBXML_NOCDATA);\n $json = json_decode(json_encode($xml));\n $response = array(\n 'status_code' => null,\n 'status_message' => null,\n 'error_code' => null,\n 'error_action' => null,\n 'error_message' => null,\n 'error_details' => null,\n 'error_moreInfo' => null,\n 'message_acquirer' => null,\n 'error_acquirer' => null,\n 'timestamp' => null\n );\n\n if (property_exists($json, 'status')) {\n\n $response['status_code'] = (property_exists($json->status, 'code')) ? $json->status->code : null;\n $response['status_message'] = (property_exists($json->status, 'message')) ? $json->status->message : null;\n }\n\n if (property_exists($json,'result') && property_exists($json->result,'error')) {\n\n $response['error_code'] = (property_exists($json->result->error, 'code')) ? $json->result->error->code : null;\n $response['error_action'] = (property_exists($json->result->error,'action')) ? $json->result->error->action : null;\n $response['error_message'] = (property_exists($json->result->error,'code') && isset(Config::$ERROR_MESSAGE[$json->result->error->code])) ? Config::$ERROR_MESSAGE[$json->result->error->code] : null;\n $response['error_details'] = (property_exists($json->result->error,'details') && is_string($json->result->error->details)) ? str_replace(array('<![CDATA[', ']]>'), '', $json->result->error->details) : null;\n $response['error_moreInfo'] = (property_exists($json->result->error,'moreInfo') && is_string($json->result->error->moreInfo)) ? str_replace(array('<![CDATA[', ']]>'), '', $json->result->error->moreInfo) : null;\n\n // 101 - XML Error\n if (property_exists($json->result->error,'code') && property_exists($json->result->error,'message') && intval($json->result->error->code) !== 101) {\n $response['message_acquirer'] = (property_exists($json->result->error->message,'acquirer')) ? $json->result->error->message->acquirer : null;\n $response['error_acquirer'] = (property_exists($json->result->error->message,'errorAcquirer')) ? $json->result->error->message->errorAcquirer : null;\n $response['timestamp'] = (property_exists($json->result->error->message,'timestamp')) ? $json->result->error->message->timestamp : null;\n }\n }\n\n return $response;\n }", "title": "" }, { "docid": "76e6d0ddc3a96389f7dfc08e4cac45b8", "score": "0.70401335", "text": "public function getErrorDetails() {\n\t\tif($this->statusCode < 400) {\n\t\t\treturn new Exception('Request was successful, there are no error details');\n\t\t}\n\t\t$fields = array(\n\t\t\t'rawBody' => $this->curlResponse->body,\n\t\t\t'jsonBody' => $this->getDecodedJSON(),\n\t\t\t'statusCode' => $this->statusCode,\n\t\t\t'statusCodeText' => (array_key_exists($this->statusCode, $this->errorMap)) ? $this->errorMap[$this->statusCode] : 'Unknown Error'\n\t\t);\n\n\n\t\tif(isset($this->curlResponse->headers['X-Mashery-Error-Code'])) {\n\t\t\t$fields['apiException'] = $this->curlResponse->headers['X-Mashery-Error-Code'];\n\t\t}\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "793680eaa8ad87b5f51ab6c30f75c62b", "score": "0.70367527", "text": "public function getResponseErrors()\r\n\t{\r\n\t\treturn ($this->responseErrors != null) ? $this->responseErrors : false;\r\n\t}", "title": "" }, { "docid": "bddcfec6b0538eb26895cb69e9c452d6", "score": "0.7035789", "text": "public function getErrors(): array\n {\n return $this->errors;\n }", "title": "" }, { "docid": "bddcfec6b0538eb26895cb69e9c452d6", "score": "0.7035789", "text": "public function getErrors(): array\n {\n return $this->errors;\n }", "title": "" }, { "docid": "bddcfec6b0538eb26895cb69e9c452d6", "score": "0.7035789", "text": "public function getErrors(): array\n {\n return $this->errors;\n }", "title": "" }, { "docid": "bddcfec6b0538eb26895cb69e9c452d6", "score": "0.7035789", "text": "public function getErrors(): array\n {\n return $this->errors;\n }", "title": "" }, { "docid": "bddcfec6b0538eb26895cb69e9c452d6", "score": "0.7035789", "text": "public function getErrors(): array\n {\n return $this->errors;\n }", "title": "" }, { "docid": "cc226cdf81a9fec43770674448e57513", "score": "0.7033861", "text": "function requestErrors()\n {\n return $this->errors;\n }", "title": "" }, { "docid": "b27c83f3e0abf63f912177027487dc70", "score": "0.7030444", "text": "public function getErrors(): array {\n return $this->errors;\n }", "title": "" }, { "docid": "794c7b1464a6496f4ebc3d5693866052", "score": "0.70261675", "text": "public function getErrors()\n {\n return $this->errors;\n }", "title": "" }, { "docid": "794c7b1464a6496f4ebc3d5693866052", "score": "0.70261675", "text": "public function getErrors()\n {\n return $this->errors;\n }", "title": "" }, { "docid": "794c7b1464a6496f4ebc3d5693866052", "score": "0.70261675", "text": "public function getErrors()\n {\n return $this->errors;\n }", "title": "" }, { "docid": "794c7b1464a6496f4ebc3d5693866052", "score": "0.70261675", "text": "public function getErrors()\n {\n return $this->errors;\n }", "title": "" }, { "docid": "794c7b1464a6496f4ebc3d5693866052", "score": "0.70261675", "text": "public function getErrors()\n {\n return $this->errors;\n }", "title": "" }, { "docid": "794c7b1464a6496f4ebc3d5693866052", "score": "0.70261675", "text": "public function getErrors()\n {\n return $this->errors;\n }", "title": "" }, { "docid": "794c7b1464a6496f4ebc3d5693866052", "score": "0.70261675", "text": "public function getErrors()\n {\n return $this->errors;\n }", "title": "" }, { "docid": "794c7b1464a6496f4ebc3d5693866052", "score": "0.70261675", "text": "public function getErrors()\n {\n return $this->errors;\n }", "title": "" }, { "docid": "794c7b1464a6496f4ebc3d5693866052", "score": "0.70261675", "text": "public function getErrors()\n {\n return $this->errors;\n }", "title": "" }, { "docid": "794c7b1464a6496f4ebc3d5693866052", "score": "0.70261675", "text": "public function getErrors()\n {\n return $this->errors;\n }", "title": "" }, { "docid": "794c7b1464a6496f4ebc3d5693866052", "score": "0.70261675", "text": "public function getErrors()\n {\n return $this->errors;\n }", "title": "" }, { "docid": "794c7b1464a6496f4ebc3d5693866052", "score": "0.70261675", "text": "public function getErrors()\n {\n return $this->errors;\n }", "title": "" }, { "docid": "794c7b1464a6496f4ebc3d5693866052", "score": "0.70261675", "text": "public function getErrors()\n {\n return $this->errors;\n }", "title": "" }, { "docid": "794c7b1464a6496f4ebc3d5693866052", "score": "0.70261675", "text": "public function getErrors()\n {\n return $this->errors;\n }", "title": "" }, { "docid": "794c7b1464a6496f4ebc3d5693866052", "score": "0.70261675", "text": "public function getErrors()\n {\n return $this->errors;\n }", "title": "" }, { "docid": "794c7b1464a6496f4ebc3d5693866052", "score": "0.70261675", "text": "public function getErrors()\n {\n return $this->errors;\n }", "title": "" }, { "docid": "794c7b1464a6496f4ebc3d5693866052", "score": "0.70261675", "text": "public function getErrors()\n {\n return $this->errors;\n }", "title": "" }, { "docid": "794c7b1464a6496f4ebc3d5693866052", "score": "0.70261675", "text": "public function getErrors()\n {\n return $this->errors;\n }", "title": "" }, { "docid": "794c7b1464a6496f4ebc3d5693866052", "score": "0.70261675", "text": "public function getErrors()\n {\n return $this->errors;\n }", "title": "" }, { "docid": "794c7b1464a6496f4ebc3d5693866052", "score": "0.70261675", "text": "public function getErrors()\n {\n return $this->errors;\n }", "title": "" }, { "docid": "794c7b1464a6496f4ebc3d5693866052", "score": "0.70261675", "text": "public function getErrors()\n {\n return $this->errors;\n }", "title": "" }, { "docid": "794c7b1464a6496f4ebc3d5693866052", "score": "0.70261675", "text": "public function getErrors()\n {\n return $this->errors;\n }", "title": "" }, { "docid": "794c7b1464a6496f4ebc3d5693866052", "score": "0.70261675", "text": "public function getErrors()\n {\n return $this->errors;\n }", "title": "" }, { "docid": "794c7b1464a6496f4ebc3d5693866052", "score": "0.70261675", "text": "public function getErrors()\n {\n return $this->errors;\n }", "title": "" }, { "docid": "794c7b1464a6496f4ebc3d5693866052", "score": "0.70261675", "text": "public function getErrors()\n {\n return $this->errors;\n }", "title": "" }, { "docid": "794c7b1464a6496f4ebc3d5693866052", "score": "0.70261675", "text": "public function getErrors()\n {\n return $this->errors;\n }", "title": "" }, { "docid": "80fa181a7a41712f38cb329774d35c0f", "score": "0.70174533", "text": "public function getErrors() {\n return $this->errors;\n }", "title": "" }, { "docid": "80fa181a7a41712f38cb329774d35c0f", "score": "0.70174533", "text": "public function getErrors() {\n return $this->errors;\n }", "title": "" }, { "docid": "80fa181a7a41712f38cb329774d35c0f", "score": "0.70174533", "text": "public function getErrors() {\n return $this->errors;\n }", "title": "" }, { "docid": "80fa181a7a41712f38cb329774d35c0f", "score": "0.70174533", "text": "public function getErrors() {\n return $this->errors;\n }", "title": "" }, { "docid": "80fa181a7a41712f38cb329774d35c0f", "score": "0.70174533", "text": "public function getErrors() {\n return $this->errors;\n }", "title": "" }, { "docid": "2aa04f45c24bce8251023d423c813add", "score": "0.701635", "text": "public function getErrors ();", "title": "" }, { "docid": "89e9efcc79b03eefdfe3d43b82da87b1", "score": "0.70146877", "text": "public function getErrors() {\n return $this->errors;\n }", "title": "" }, { "docid": "60565df4a8977767eff74be312964dcc", "score": "0.70109224", "text": "function getError() {\n return $this->errors;\n }", "title": "" }, { "docid": "fbd0107bfd290a9ac58de9e456a1ddcf", "score": "0.70063865", "text": "public function GetErrors()\n\t{\n\t\treturn $this->errors;\n\t}", "title": "" }, { "docid": "efbbc7fa5c18d996641cde56e2eddab0", "score": "0.7004259", "text": "protected function get_response_error() {\n\n\t\t$body = (array) wp_remote_retrieve_body( $this->response );\n\n\t\t$error_text = array();\n\n\t\tif ( ! empty( $body['errors'] ) ) {\n\t\t\tforeach ( $body['errors'] as $error ) {\n\t\t\t\tif ( property_exists( $error, 'message' ) ) {\n\t\t\t\t\t// Prepare additional information from SendGrid API.\n\t\t\t\t\t$extra = '';\n\t\t\t\t\tif ( property_exists( $error, 'field' ) && ! empty( $error->field ) ) {\n\t\t\t\t\t\t$extra .= $error->field . '; ';\n\t\t\t\t\t}\n\t\t\t\t\tif ( property_exists( $error, 'help' ) && ! empty( $error->help ) ) {\n\t\t\t\t\t\t$extra .= $error->help;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Assign both the main message and perhaps extra information, if exists.\n\t\t\t\t\t$error_text[] = $error->message . ( ! empty( $extra ) ? ' - ' . $extra : '' );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn implode( '<br>', array_map( 'esc_textarea', $error_text ) );\n\t}", "title": "" }, { "docid": "cf005995e74ee35080c3a13b87623bbf", "score": "0.70012265", "text": "public static function getErrors()\n {\n return static::$errors;\n }", "title": "" }, { "docid": "81b08ea86fce1a992dcb31eef759b209", "score": "0.69941705", "text": "public function getErrors()\n {\n return imap_errors();\n }", "title": "" }, { "docid": "1feb91d7882c45b2a0d6a7aa38c7842f", "score": "0.69844985", "text": "public function getError()\n\t{\n\t\treturn $this->errors;\n\t}", "title": "" }, { "docid": "96bf06b42b866588bb7551cced821dbf", "score": "0.69838184", "text": "public function get_errors() {\n\t\treturn $this->errors;\n\t}", "title": "" }, { "docid": "96bf06b42b866588bb7551cced821dbf", "score": "0.69838184", "text": "public function get_errors() {\n\t\treturn $this->errors;\n\t}", "title": "" }, { "docid": "96bf06b42b866588bb7551cced821dbf", "score": "0.69838184", "text": "public function get_errors() {\n\t\treturn $this->errors;\n\t}", "title": "" }, { "docid": "24c26c76ded6c3146d055354a33a039e", "score": "0.69821006", "text": "public function getValidationErrors(): Collection\n {\n $body = collect(json_decode((string) $this->response->getBody(), true));\n $errors = $body->only('errors')->collapse();\n\n if ($errors->isEmpty() && $body->has('message')) {\n $errors->add($body->get('message'));\n }\n\n return $errors;\n }", "title": "" }, { "docid": "5a24a732b794e9ef03bf0f911a147c5e", "score": "0.6978303", "text": "public function getErrorsCombined()\n {\n if (isset($this->response['errors'])) {\n $messages = [];\n\n foreach ($this->response['errors'] as $row) {\n $messages[] = \"[\" . $row['field'] . \"]: \" . $row['error_message'];\n }\n\n return $messages;\n } else {\n return [];\n }\n }", "title": "" }, { "docid": "ea34ad324799bce63cfa0db790f25cfb", "score": "0.6936548", "text": "public function getErrors()\n\t{\n\t\treturn $this->errors;\n\t}", "title": "" }, { "docid": "b1801e97b7feb1e97eb361a7d00e5561", "score": "0.6934934", "text": "public function get_errors()\r\n {\r\n return $this->errors;\r\n }", "title": "" }, { "docid": "104e0bc8de2e7290b3c0736694e84e0d", "score": "0.69346064", "text": "public function getErrors(): array {\n return $this->_errors;\n }", "title": "" }, { "docid": "985bc77cefae5aeef62b1f3ec38b22f2", "score": "0.69335777", "text": "public static function getErrors() {\n\t\treturn self::inst()->errors;\n\t}", "title": "" }, { "docid": "647af301c810f4323e70851d78afe652", "score": "0.69282305", "text": "public function GetErrors()\n {\n return $this->_errors;\n }", "title": "" }, { "docid": "6020751db8ea83c51cc37b543e9309a5", "score": "0.69216293", "text": "public function getErrors() {\n return $this->_errors;\n }", "title": "" }, { "docid": "a7e4b126804a33e510be5480ef16900e", "score": "0.69117975", "text": "final public function getErrors()\n {\n return $this->errors;\n }", "title": "" }, { "docid": "e3f278bdb6158d5eca656c82fcd8606f", "score": "0.6910621", "text": "public function getErrors()\n {\n return $this->aErrors;\n }", "title": "" }, { "docid": "b14f03489ed88b3161dcbbced4a2b412", "score": "0.69066143", "text": "public function getErrors()\n {\n return $this->errors;\n }", "title": "" }, { "docid": "92146453165e5acb580c4e5913bdd5d9", "score": "0.69064635", "text": "public function getErrors()\r\n {\r\n return $this->_errors;\r\n }", "title": "" }, { "docid": "dfc0d679344fab1e952bc0c94903765a", "score": "0.6903546", "text": "public function getErrors()\n {\n return $this->filterByType(Message::ERROR);\n }", "title": "" }, { "docid": "84f0a8ae404ed8e8ddfca4b209dc8ce8", "score": "0.69026953", "text": "public function getErrors() : array\r\n {\r\n return $this->errors;\r\n }", "title": "" }, { "docid": "df24113b9030f2808eada703e2406d0d", "score": "0.6898801", "text": "public function getErrors()\n {\n return $this->_errors;\n }", "title": "" }, { "docid": "df24113b9030f2808eada703e2406d0d", "score": "0.6898801", "text": "public function getErrors()\n {\n return $this->_errors;\n }", "title": "" }, { "docid": "df24113b9030f2808eada703e2406d0d", "score": "0.6898801", "text": "public function getErrors()\n {\n return $this->_errors;\n }", "title": "" }, { "docid": "c3ccb38d70222a2038014ec4a58c6bab", "score": "0.68939465", "text": "function getErrors() {\n\t\treturn $this->errors;\n\t}", "title": "" }, { "docid": "e6c1bc55f066bab491757a97333d9b28", "score": "0.68885016", "text": "public function get_errors() {\n if(count($this->errors) == 0) \n {\n return array();\n }\n return $this->errors;\n }", "title": "" }, { "docid": "e404d31f30944ac53b9dc0cca2a024cc", "score": "0.6887457", "text": "public function get_errors(){\n\n\t\treturn $this->errors;\n\t}", "title": "" }, { "docid": "d25f7c4ae46273c914a9085d1a9dfb7a", "score": "0.6886112", "text": "public function getErrors() : array {\n\t\treturn $this -> _errors;\n\t}", "title": "" }, { "docid": "b3038276ac8aa18be1adf783060458cd", "score": "0.6879671", "text": "public function get_errors();", "title": "" }, { "docid": "e1ad8cbf2df9647b1e378a3514f0d321", "score": "0.6872643", "text": "public function getErrors() : array\n {\n return $this->errors;\n }", "title": "" }, { "docid": "e1ad8cbf2df9647b1e378a3514f0d321", "score": "0.6872643", "text": "public function getErrors() : array\n {\n return $this->errors;\n }", "title": "" }, { "docid": "e1ad8cbf2df9647b1e378a3514f0d321", "score": "0.6872643", "text": "public function getErrors() : array\n {\n return $this->errors;\n }", "title": "" }, { "docid": "3776f019ff5886d31182785e59ee4cbf", "score": "0.6871298", "text": "public function getErrorMessage(Response $response);", "title": "" }, { "docid": "0e4cc37516228f413b277894b8c9ca93", "score": "0.6869155", "text": "public function getErrors()\t{\n\t\treturn $this->errors;\n\t}", "title": "" } ]
f4c9b02c36985b8220a0faf7519079d8
Get the latest initialized model
[ { "docid": "e2fbdf906622b621393e76dee6022cea", "score": "0.57609904", "text": "public function getLastInitialized();", "title": "" } ]
[ { "docid": "783cad3de98f645ef078533da8f56725", "score": "0.6857223", "text": "public function getLatest()\n {\n return $this->model->latest()->first();\n }", "title": "" }, { "docid": "0f936199deead883070144eb0f18453c", "score": "0.6642584", "text": "function &getDefaultModel() {\n\t\t$model = &$this->loadModel($this->name);\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "2dbb4c2f3ac31942691492c500ab0e2b", "score": "0.6447557", "text": "public function getCurrent() : ? Model;", "title": "" }, { "docid": "a2f1b834f4b0a26d1b9d44395869db98", "score": "0.6384897", "text": "public function load()\n\t{\n\t\treturn $this->getModelStore()->load($this);\n\t}", "title": "" }, { "docid": "46b76a66fde6ce85e569bb07824d94d5", "score": "0.6330964", "text": "public static function getModel(){\n\t\t\tif (is_null(self::$instance)) //test si l'objet instance est null ou pas si c'est null en fait l'objet(connexion bdd)\n\t\t\t\t\tself::$instance = new Model(); //instance un objet , class \n\t\t\t\treturn self::$instance;\n\t\t}", "title": "" }, { "docid": "7416dcbc1c53f4a03c1cca62878e39de", "score": "0.63241607", "text": "public function retrieveModel()\n {\n if ($this->model->persisted()) {\n return;\n }\n\n $modelClass = $this->modelClass;\n $this->model = $modelClass::find($this->modelId);\n\n if (!$this->model) {\n throw $this->modelNotFoundError();\n }\n }", "title": "" }, { "docid": "24ef3a8186752d6bdd784eb536c174da", "score": "0.62952083", "text": "protected function __get_model()\n\t{\n\t\treturn $this->model();\n\t}", "title": "" }, { "docid": "b13001c9c21c915e2992eba56dbd0fd0", "score": "0.6266496", "text": "public function loadModel();", "title": "" }, { "docid": "2608c3cb8d21dc02cc3e84a63bb2e0fe", "score": "0.6251961", "text": "abstract protected function getFreshModelForElements(): Model;", "title": "" }, { "docid": "62f1d337db793a70b75e229389d05b95", "score": "0.6247672", "text": "public function first()\n {\n $model = $this->model->first();\n $this->resetModel();\n return $model;\n }", "title": "" }, { "docid": "5192b4f787768df3ebb8d4e2bfbde3d5", "score": "0.62284744", "text": "public function getInstance(): Model\n {\n return $this->instance;\n }", "title": "" }, { "docid": "fc2c26be77a351ac12326c6ad812ab44", "score": "0.6224818", "text": "public static function get() {\n return new Model();\n }", "title": "" }, { "docid": "a7b0fbd7f132b7f27cf22ff07b412a3f", "score": "0.6214658", "text": "protected function _getClassModel()\n {\n return $this->getModelFromCache('ThemeHouse_Objects_Model_Class');\n }", "title": "" }, { "docid": "42c0385ba2ce3dd525943f46b6f01f15", "score": "0.61690104", "text": "public function getModel(): Model\n {\n $this->syncValues();\n\n return $this->model;\n }", "title": "" }, { "docid": "7f4a1143a64d7a247f443d2a00a2f9ba", "score": "0.6160876", "text": "protected function _getClassModel()\r\n {\r\n return $this->getModelFromCache('ThemeHouse_Objects_Model_Class');\r\n }", "title": "" }, { "docid": "39885737245506c21f4d5a4db149d7c3", "score": "0.60704476", "text": "protected function getDefaultModelObject() : void\n {\n return;\n }", "title": "" }, { "docid": "dbbcbf4d1fefdb0222d1736701bc9fc1", "score": "0.60585564", "text": "public function getModel()\n {\n return isset($this->Model) ? $this->Model : null;\n }", "title": "" }, { "docid": "b029f47e42537557fa5875d0ec6b8c3d", "score": "0.6039903", "text": "public function model()\n {\n return static::resolveModel($this->id);\n }", "title": "" }, { "docid": "a0b9aab9f8232c270b1443c09ddbf586", "score": "0.6012513", "text": "public function model() {\n return null;\n }", "title": "" }, { "docid": "f96fd1817950ca34f0ef8beac0d56d43", "score": "0.60024625", "text": "public function current(): Model\n {\n return $this->models->get($this->position);\n }", "title": "" }, { "docid": "cf9ea76509560a063dab939153c40357", "score": "0.59920824", "text": "public function fresh()\n {\n return static::find($this->ID);\n }", "title": "" }, { "docid": "c8003e76a83c6104e2e617af0c9c0b97", "score": "0.59747326", "text": "protected function initializeModel( )\r\n {\r\n if ( isset( $this->model ) ) return;\r\n\r\n $this->model = Model::getInstance( $this->multitonKey );\r\n }", "title": "" }, { "docid": "f9fdb9ac1ee0e8e8eb091bcbf6a006e9", "score": "0.5971377", "text": "public function first()\n\t{\n\t\treturn Model::first();\n\t}", "title": "" }, { "docid": "5467e6427987d98b4baa4ffbcb6d0be6", "score": "0.5970396", "text": "public function model()\n {\n $resource = $this->resource();\n\n return $resource::newModel();\n }", "title": "" }, { "docid": "80618738ca72edbe25306bbbf484dca2", "score": "0.59638935", "text": "protected function fetchModel () {\n $criteria = new CDbCriteria();\n $model = new DbBom();\n $model = $model->findAll($criteria);\n\n return $model;\n }", "title": "" }, { "docid": "4197974cb07956fbbf761a57265b3db7", "score": "0.5961482", "text": "public function get_model(/* ... */)\n {\n return $this->_model;\n }", "title": "" }, { "docid": "40c12d1f2f3f83a52f3a49f7d2045062", "score": "0.59378433", "text": "public function model()\n {\n if ($this->model) {\n $model = $this->model;\n return new $model;\n }\n\n return null;\n }", "title": "" }, { "docid": "1a87bf7cb8e7f5030f92614339b64065", "score": "0.5937177", "text": "public function get()\n {\n return $this->model->get();\n }", "title": "" }, { "docid": "966c8c39f95e6b40097a8ebf37032536", "score": "0.5929481", "text": "public function getModel() {\n\t return $this->_model;\n }", "title": "" }, { "docid": "3b50113584e9325b7854a105ea1d2963", "score": "0.5929256", "text": "public function getModel();", "title": "" }, { "docid": "3b50113584e9325b7854a105ea1d2963", "score": "0.5929256", "text": "public function getModel();", "title": "" }, { "docid": "015aebd6ae1fc87685ff2b37258073a8", "score": "0.59211105", "text": "protected function findModel()\n {\n if (($model = Advert::find()->limit(1)->one()) !== null) {\n return $model;\n } else {\n $model = new Advert();\n $model->switch = 1;\n return $model;\n }\n }", "title": "" }, { "docid": "79cde09fdce84c424e49f24e297f0ae1", "score": "0.59065074", "text": "protected function _getForumextraModel()\n\t{\n\t\treturn $this->getModelFromCache('KomuKu_ForumExtras_Model_ForumExtras');\n\t}", "title": "" }, { "docid": "b18f668ea93492bddf58f4e67b0a1413", "score": "0.5905465", "text": "private function getStatusModel()\n {\n if (is_null($this->StatusModel)) {\n $this->StatusModel = $this->Container->get(StatusModel::class);\n }\n return $this->StatusModel;\n }", "title": "" }, { "docid": "15c9f046dee17c8051034962707ecd2d", "score": "0.590406", "text": "private function getModel()\n {\n return $this->model;\n }", "title": "" }, { "docid": "98b9fbe41d323ef0ba6e220a605bb470", "score": "0.5881468", "text": "public function getModel()\n {\n }", "title": "" }, { "docid": "4685c36d04ecff42b81c766255bb0776", "score": "0.58712876", "text": "abstract function getModel();", "title": "" }, { "docid": "e6fa35593220609521c065732616d1b3", "score": "0.58693117", "text": "public function getLastDraw()\n {\n $result=$this->model->getLastDraw();\n\n if($result==false)\n {\n $draw= $this->getLastDrawResultFromAPI();\n $this->saveDraw($draw);\n }\n return $this->model;\n }", "title": "" }, { "docid": "928ab7f726960945443299ff5002a618", "score": "0.5868024", "text": "public static function loadCurrent()\n {\n global $user;\n return Factory::getInstance()->getModel($user->uid, 'User');\n }", "title": "" }, { "docid": "90ba64e6e7f06b77eae4e028a6f75c57", "score": "0.585336", "text": "protected abstract function getModel();", "title": "" }, { "docid": "cc0c5737dab0fd01cce59c5eb949ffca", "score": "0.58507586", "text": "public function model()\n {\n if ($this->_model === NULL)\n {\n $this->_model = new $this->_model_class;\n }\n return $this->_model;\n }", "title": "" }, { "docid": "c415d5028f0a96bd8538bc16d2ac0655", "score": "0.5848733", "text": "protected function getModel()\n {\n }", "title": "" }, { "docid": "6dcf3d7bfe1b1dd7bdbaa64ad6d1c76b", "score": "0.5845067", "text": "protected function _model()\n\t{\n\t\treturn model($this->_get_mod());\n\t}", "title": "" }, { "docid": "9987ec1a85017ecc95f35c596a5ec24c", "score": "0.58346826", "text": "public function getModel() {\n\t\treturn $this->_model;\n\t}", "title": "" }, { "docid": "aff5d5e1a97af3aad8b8c3519a200d39", "score": "0.58318186", "text": "public function getModelInstance()\n {\n return $this->unwrapQueries($this->items);\n }", "title": "" }, { "docid": "3cf5eebdade9591fed0174ffcd3e8e21", "score": "0.5829879", "text": "protected function getModel()\r\n {\r\n return parent::getModel();\r\n }", "title": "" }, { "docid": "48beb40155633315c9cbfa1183271af5", "score": "0.5808605", "text": "function getModel() {\n return $this->model;\n }", "title": "" }, { "docid": "bdbf6dbc5dc0585594d52ef8d7f2e7ad", "score": "0.57897896", "text": "protected function _getAddOnModel()\r\n {\r\n return $this->getModelFromCache('XenForo_Model_AddOn');\r\n }", "title": "" }, { "docid": "16e26a1b48dd4e6f115bf9733c156b57", "score": "0.57851404", "text": "public function getModel(): Model\n {\n return $this->builder->getModel();\n }", "title": "" }, { "docid": "e495c4b5a12e2f400ef3e2709f3de270", "score": "0.5780029", "text": "public function modelInstance()\n {\n return $this->app->make($this->model());\n }", "title": "" }, { "docid": "8b1be427abe810632a8b1af164b0df2f", "score": "0.5770713", "text": "public function getImportHistoryModel()\n {\n if (!$this->importHistoryModel) {\n $this->importHistoryModel = $this->importHistoryFactory->create();\n }\n\n return $this->importHistoryModel;\n }", "title": "" }, { "docid": "ff34d3a0c4c678832435d66b0ed34640", "score": "0.57523227", "text": "public function getModel() {\n\t\treturn $this->model;\n\t}", "title": "" }, { "docid": "cafb6b762a4d5702b38808dbaa2b9051", "score": "0.5751465", "text": "public static function get_latest() {\n\t\treturn self::get()\n\t\t\t->sort('ID', 'DESC')\n\t\t\t->first();\n\t}", "title": "" }, { "docid": "97db0f567a36fa4084644788b4fdab52", "score": "0.5745567", "text": "public function getModel(){\n return $this->model;\n }", "title": "" }, { "docid": "97db0f567a36fa4084644788b4fdab52", "score": "0.5745567", "text": "public function getModel(){\n return $this->model;\n }", "title": "" }, { "docid": "d20bb87dd11c1e1f7d533204a9bef8b1", "score": "0.57442564", "text": "public function fully_load():Model_a{\n\t\tif(!$this->is_fully_loaded){\n\t\t\t$this->item_data = $this->get_client()->get_one()->item_data;\n\t\t\t$this->set_if_fully_loaded();\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "424ac9b98d2fe6189eebcd90cae11785", "score": "0.5740596", "text": "protected function getExistingResource() : Model\n {\n if (method_exists($this, 'existingResource')) {\n return $this->existingResource();\n }\n\n return factory($this->model)->create();\n }", "title": "" }, { "docid": "82bf3b6ed20c59c648732c68ea32eb84", "score": "0.57387775", "text": "public function getModel()\n {\n return parent::getValue('model');\n }", "title": "" }, { "docid": "a7aca74ff0e9f7309ef9ec9d2accff12", "score": "0.5737488", "text": "public function model(): ?Model\n {\n return $this->model ? new $this->model : null;\n }", "title": "" }, { "docid": "2babf4b426038107a22738ade063a6e1", "score": "0.57211804", "text": "public function get_model() {\n\t\tif ( ! $this->model ) {\n\t\t\tthrow new \\RuntimeException( 'The model is not defined.' );\n\t\t}\n\n\t\treturn $this->model;\n\t}", "title": "" }, { "docid": "846547aa69d7c3d9da8b62e632221596", "score": "0.5719549", "text": "abstract protected function getModel();", "title": "" }, { "docid": "846547aa69d7c3d9da8b62e632221596", "score": "0.5719549", "text": "abstract protected function getModel();", "title": "" }, { "docid": "5e79ddf57a506552f0229cbbf6c0bad8", "score": "0.57142484", "text": "private function getConfigurationModel()\n {\n if (is_null($this->ConfigurationModel)) {\n $this->ConfigurationModel = $this->Container->get(ConfigurationModel::class);\n }\n return $this->ConfigurationModel;\n }", "title": "" }, { "docid": "2d7e874aab6252144566d532bae53216", "score": "0.5713979", "text": "public function getModel()\n {\n return $this->Model;\n }", "title": "" }, { "docid": "3c988350a0592cd4254cac906c33c91b", "score": "0.57127786", "text": "public static function getInstance() : ThingModel\n {\n\n if (is_null(self::$instance) === true) {\n self::$instance = new ThingModel();\n }\n\n return self::$instance;\n }", "title": "" }, { "docid": "d9d5c4115aced5853978ce64c1b68b64", "score": "0.57115084", "text": "public function getModel()\n {\n return call_user_func(array($this->getModelName(), 'model'));\n }", "title": "" }, { "docid": "27fd6c3f459717df863e63efcbf0ac51", "score": "0.5711129", "text": "public function getModel($key)\n {\n\n if (isset($this->models[$key]))\n return $this->models[$key];\n else\n return null;\n\n }", "title": "" }, { "docid": "29367d10ae18a4b41b8b8601134678e5", "score": "0.57107335", "text": "public function model()\n {\n return $this->model;\n }", "title": "" }, { "docid": "6f94c5f4b92364e2cfea289a04376f8c", "score": "0.5710504", "text": "public function newModel()\n {\n return $this->newQuery()->newModelInstance();\n }", "title": "" }, { "docid": "a769f63f3d69bab52773c3b9b8bbc865", "score": "0.5694091", "text": "public function getModel()\n {\n return $this->_model;\n }", "title": "" }, { "docid": "942f346fd89170d21ddd35f83872635c", "score": "0.56854737", "text": "public function instantiateModel()\n {\n $instance = new ${get_class($this)}();\n $instance->key_values = $this->_item->toArray(); \n if(isset($this->_instances[$instance->id])) $this->_instances[$instance->id] = $instance;\n unset($instance); \n return $this->_instances[$instance->id];\n }", "title": "" }, { "docid": "bd56319dfac45ebd7a71af154d0bd195", "score": "0.5684589", "text": "protected function getModel()\n {\n return $this->query->getModel();\n }", "title": "" }, { "docid": "337eecce3b3671e76174b1f5d23c97de", "score": "0.5681322", "text": "protected function _model()\n\t{\n\t\treturn $this->{$this->modelClass};\n\t}", "title": "" }, { "docid": "e2a0ecda45759c0620aab49e6cf56b12", "score": "0.56799406", "text": "public function flushModel()\n {\n $this->model = $this->newModel();\n }", "title": "" }, { "docid": "b56d311e1d9dcbbccc2496ed34eb8b28", "score": "0.56748295", "text": "public static function getModel(): MonitorContract\n {\n return new self::$model();\n }", "title": "" }, { "docid": "d7b76005e7d3fdef5bf115f3dffb8f75", "score": "0.56714475", "text": "public function getModel() {\n\n if (!$this->_isAuthenticated) {\n return false;\n }\n if ($this->model != null) {\n return $this->model;\n }\n if ($this->connectedId != null) {\n $class = $this->module->myAuthenticatedModelClass;\n $this->model = $class::model()->cache($this->module->authCacheDuration)->findByPk($this->connectedId);\n }\n return $this->model;\n }", "title": "" }, { "docid": "fdbd5f5cf605697b38e732f45c8c44aa", "score": "0.56702226", "text": "protected function _getTemplateModel()\n\t{\n\t\treturn $this->getModelFromCache('XenForo_Model_Template');\n\t}", "title": "" }, { "docid": "2b6a0bbc44620ab3b7cccf1f0e1b39b5", "score": "0.5661731", "text": "public function getThreadModel()\n {\n // @todo: Implement getThreadModel() method.\n }", "title": "" }, { "docid": "47b764956795a006416cacec59b0ce3c", "score": "0.5655935", "text": "public function reinitialize_model()\n\t{\n\t\t// this is to ensure that singular is only called once per model\n\t\tif(isset(DataMapper::$common[DMZ_CLASSNAMES_KEY][$this_class])) {\n\t\t\t$common_key = DataMapper::$common[DMZ_CLASSNAMES_KEY][$this_class];\n\t\t} else {\n\t\t\tDataMapper::$common[DMZ_CLASSNAMES_KEY][$this_class] = $common_key = singular($this_class);\n\t\t}\n\t\tunset(DataMapper::$common[$common_key]);\n\t\t$model = get_class($this);\n\t\tnew $model(); // re-initialze\n\t\t\n\t\t// Load stored common model settings by reference\n\t\tforeach(DataMapper::$common[$common_key] as $key => &$value)\n\t\t{\n\t\t\t$this->{$key} =& $value;\n\t\t}\n\t}", "title": "" }, { "docid": "bbee089d56b920ab8068d11a5ce35fc0", "score": "0.56487525", "text": "private function getInformationModel()\n {\n if (is_null($this->InformationModel)) {\n $this->InformationModel = $this->Container->get(InformationModel::class);\n }\n return $this->InformationModel;\n }", "title": "" }, { "docid": "7ae1bd6a0850588623c24caaa9851517", "score": "0.5648211", "text": "public function getModel()\r\n {\r\n return $this->model;\r\n }", "title": "" }, { "docid": "6a879e4ce99c4754c7798ac62c3d9df3", "score": "0.564662", "text": "public function getUserActualModel(){\n $user=Yii::app()->user->name;\n return $this->loadModel($user);\n }", "title": "" }, { "docid": "3f25327eb8b774e6c85eeaeecf3e6aa8", "score": "0.5643184", "text": "protected function _getAddOnModel()\n\t{\n\t\treturn $this->getModelFromCache('XenForo_Model_AddOn');\n\t}", "title": "" }, { "docid": "09effcfba370d745fbee073d550de854", "score": "0.56380516", "text": "public function loadLast()\n {\n return $this->setOrder('id desc')->tryLoadAny();\n }", "title": "" }, { "docid": "445f05db834c07246f80b0899fe47943", "score": "0.56333655", "text": "public static function getInstance(){\n $model = new static();\n\n return $model;\n }", "title": "" }, { "docid": "03f20ec1a919b2967eb60652889de7a2", "score": "0.5612989", "text": "public function getModel() {\n return $this->model;\n }", "title": "" }, { "docid": "03f20ec1a919b2967eb60652889de7a2", "score": "0.5612989", "text": "public function getModel() {\n return $this->model;\n }", "title": "" }, { "docid": "03f20ec1a919b2967eb60652889de7a2", "score": "0.5612989", "text": "public function getModel() {\n return $this->model;\n }", "title": "" }, { "docid": "03f20ec1a919b2967eb60652889de7a2", "score": "0.5612989", "text": "public function getModel() {\n return $this->model;\n }", "title": "" }, { "docid": "03f20ec1a919b2967eb60652889de7a2", "score": "0.5612989", "text": "public function getModel() {\n return $this->model;\n }", "title": "" }, { "docid": "03f20ec1a919b2967eb60652889de7a2", "score": "0.5612989", "text": "public function getModel() {\n return $this->model;\n }", "title": "" }, { "docid": "7463067cf477c18d3c548a597b397e26", "score": "0.5608839", "text": "static public function getModel_root(){\n\t\treturn self::$model_root;\n\t}", "title": "" }, { "docid": "a18bf210cd74e2cfa9cfdb4834484208", "score": "0.56067145", "text": "static function &getModel($model,$create=false) {\n if (ClassRegistry::isKeySet($model) && !$create) {\n $ModelObj =& ClassRegistry::getObject($model);\n } else {\n $ModelObj =& ClassRegistry::init($model);\n }\n return $ModelObj;\n }", "title": "" }, { "docid": "a022134cbb4b042265bc1266430d4c67", "score": "0.56054795", "text": "function getModel() {\n\t\treturn $this->data_entities;\n\t}", "title": "" }, { "docid": "c579cf0ab12b742b45d4aca89cf586c2", "score": "0.5601163", "text": "public function getModel()\n {\n if (! array_key_exists('model', $this->data)) {\n return;\n }\n return $this->data['model'];\n }", "title": "" }, { "docid": "0b29038b9c34b38dd7d033d6edf2cf91", "score": "0.5581817", "text": "function post_model_init($from_cache = FALSE)\n {\n }", "title": "" }, { "docid": "7076c04921ac81c886c73c40eed93aa5", "score": "0.557743", "text": "protected function getModelConfiguration()\n {\n return app('sleeping_owl')->getModel(\n $this->getModel()\n );\n }", "title": "" }, { "docid": "ed1f0fa4ad20654d671ee56621400c1b", "score": "0.5576983", "text": "public function getModel() {\n\t\tlist(, $model) = pluginSplit($this->settings['userModel']);\n\t\treturn ClassRegistry::init($model);\n\t}", "title": "" }, { "docid": "669370cb8e13f44910d37db6bfc8467b", "score": "0.5572859", "text": "protected function _fetchVersion()\n {\n $key = $this->_cache->getPrefix()\n . \"/model\"\n . \"/{$this->_table_name}\"\n . \"/data_version\";\n \n return $this->_cache->fetch($key);\n }", "title": "" }, { "docid": "2351d7cb8a07d6531e760bce1bddc719", "score": "0.5564524", "text": "abstract public function current() : Model;", "title": "" } ]
ef293eae7834f6f88ce8742ba3f3f6c7
This function will compress the html output of a page
[ { "docid": "2be153555ebfc9c1c07fd3416419606d", "score": "0.6402131", "text": "private function compress() {\n if (!empty($this->_output)) {\n\n if (strstr($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) {\n $this->_encoding = 'gzip';\n }\n\n if (strstr($_SERVER['HTTP_ACCEPT_ENCODING'], 'x-gzip')) {\n $this->_encoding = 'x-gzip';\n }\n\n if (!empty($this->_encoding)) {\n $gz_level = Settings::get('gzip_level') ?: -1;\n $this->_output = gzencode($this->_output, $gz_level);\n }\n }\n }", "title": "" } ]
[ { "docid": "8c206658fcd6207cbe4bd57791f6652d", "score": "0.83541936", "text": "function compressHtmlPage() : string\n {\n register_shutdown_function(function () {\n $buffer = str_html_compress(ob_get_contents());\n ob_end_clean();\n if (!isZlibOutputCompressionActive() &&\n isClientAcceptGzipEncoding() &&\n isZlibLoaded()\n ) {\n ob_start('ob_gzhandler');\n }\n echo $buffer;\n });\n }", "title": "" }, { "docid": "5eb195eb77b6d340a88b741077be5d1a", "score": "0.7238214", "text": "function compress_html($html){\n\t$guid = md5(time() . rand());\n\n\t// cache special tag\n\t$special_tags = array(\n\t\t'code',\n\t\t'pre',\n\t\t'script',\n\t\t'style',\n\t\t'textarea',\n\t);\n\n\t$cache_special_tags_content = array();\n\tforeach($special_tags as $tag){\n\t\tif( preg_match_all('/<' . $tag . '(?:[^>]*?)>(.*?)<\\/' . $tag . '>/is', $html, $matches) ){\n\t\t\t$cache_special_tags_content[$tag] = $matches[0];\n\t\t\tforeach($matches[0] as $index => $string){\n\t\t\t\t$html = str_replace( $string , '<!~~HTML~COMPRESS~PLACEHOLDER~' . $guid .'~' . $tag .'~' . $index . '~~>', $html );\n\t\t\t}\n\t\t}\n\t}\n\n\n\t// CDATA\n\tif( preg_match_all('/<!\\[CDATA\\[(.*?)\\]\\]>/s', $html, $matches) ){\n\t\t$cache_special_tags_content['CDATA'] = $matches[0];\n\t\tforeach($matches[0] as $index => $string){\n\t\t\t$html = str_replace( $string , '<!~~HTML~COMPRESS~PLACEHOLDER~' . $guid .'~CDATA~' . $index . '~~>', $html );\n\t\t}\n\t}\n\n\t// remove comment tag\n\t$html = preg_replace('/<!--[^\\[].*?-->/s', '', $html);\n\n\t// get all tags\n\tif(preg_match_all('/<[^!][^>]+>/s', $html, $matches)){\n\t\t$pieces = $matches[0];\n\t\t$pieces = array_unique($pieces);\n\t\t//sort($pieces);\n\n\t\t$fixedPieces = array();\n\t\tforeach($pieces as $original){\n\t\t\t$fixed = singleElementParser($original);\n\n\t\t\tif($fixed != $original){\n\t\t\t\t$fixedPieces[$original] = $fixed;\n\t\t\t}\n\t\t}\n\n\t\t// TODO :\n\t\t// Certain tags can be omitted, see at\n\t\t// http://www.w3.org/TR/html5/single-page.html#syntax-attributes\n\t\t// section 8.1.2.4 Optional tags\n\n\t\t$html = str_replace(array_keys($fixedPieces), array_values($fixedPieces),$html);\n\n\t}\n\n\t// replace all space characters to U+0020 SPACE,\n\t// \"tab\" (U+0009), \"LF\" (U+000A), \"FF\" (U+000C), and \"CR\" (U+000D).\n\t$html = preg_replace('/\\t|\\n|\\f|\\r/', ' ', $html);\n\n\t// remove whitespace\n\t$html = trim($html);\n\t$html = preg_replace('/\\s+/', ' ', $html);\n\n\t// remove whitespace between tags\n\t//$html = str_replace('> <', '><', $html);\n\t// remove whitespace near html tags\n\t$html = str_replace('> ', '>', $html);\n\t$html = str_replace(' <', '<', $html);\n\n\t// retore special tag\n\t// TODO: remove new line after the special tag\n\twhile(preg_match('/<!~~HTML~COMPRESS~PLACEHOLDER~' . $guid .'~/', $html)){\n\t\tforeach( $cache_special_tags_content as $tag => $content ){\n\t\t\tforeach( $content as $index => $string ){\n\t\t\t\t//inner content in code/pre should not be trimed\n\t\t\t\tif($tag === 'style'){\n\t\t\t\t\t$string = preg_replace_callback(\n\t\t\t\t\t\t'/^(<' . $tag . '(?:[^>]*?)>)(.*?)(<\\/' . $tag . '>)$/is',\n\t\t\t\t\t\tfunction($matches){\n\t\t\t\t\t\t\treturn singleElementParser($matches[1]) . \n\t\t\t\t\t\t\t\tcompress_css($matches[2]). \n\t\t\t\t\t\t\t\tsingleElementParser($matches[3]);\n\t\t\t\t\t\t}, \n\t\t\t\t\t\t$string);\n\t\t\t\t}elseif( $tag === 'code' || $tag === 'pre' || $tag === 'textarea' ){\n\t\t\t\t\t// http://www.w3.org/TR/html5/single-page.html\n\t\t\t\t\t// 8.4 Parsing HTML fragments \n\t\t\t\t\t// textarea is RCDATA, code/pre re PLAINTEXT\n\n\t\t\t\t\t$string = preg_replace_callback(\n\t\t\t\t\t\t'/^(<' . $tag . '(?:[^>]*?)>)(.*?)(<\\/' . $tag . '>)$/is',\n\t\t\t\t\t\tfunction($matches){\n\t\t\t\t\t\t\treturn singleElementParser($matches[1]) . \n\t\t\t\t\t\t\t\tcompressPlainText($matches[2]). \n\t\t\t\t\t\t\t\tsingleElementParser($matches[3]);\n\t\t\t\t\t\t}, \n\t\t\t\t\t\t$string);\n\t\t\t\t}else{\n\t\t\t\t\t$string = preg_replace_callback(\n\t\t\t\t\t\t'/^(<' . $tag . '(?:[^>]*?)>)(.*?)(<\\/' . $tag . '>)$/is',\n\t\t\t\t\t\tfunction($matches){\n\t\t\t\t\t\t\treturn singleElementParser($matches[1]) . \n\t\t\t\t\t\t\t\ttrim($matches[2]). \n\t\t\t\t\t\t\t\tsingleElementParser($matches[3]);\n\t\t\t\t\t\t}, \n\t\t\t\t\t\t$string);\n\t\t\t\t}\n\t\t\t\t$html = str_replace( '<!~~HTML~COMPRESS~PLACEHOLDER~' . $guid .'~' . $tag .'~' . $index . '~~>', $string, $html );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $html;\n}", "title": "" }, { "docid": "38cc6c66cda4d7ddb4586dae8c50f7a2", "score": "0.66070914", "text": "function start_compression() # if browser supports compression register compress_output() callback\n{\nfunction compress_output($output) # Callback function to compress $output\n{ # We can perform additional manipulation on $output here, such as stripping whitespace, etc. \n return gzencode($output); \n} \nif (strstr($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) # Check if browser supports gzip encoding\n{ ob_start(\"compress_output\"); # Start output buffering, and register compress_output()\n header(\"Content-Encoding: gzip\"); # Tell the browser the content is compressed with gzip \n} \n}", "title": "" }, { "docid": "a75486d6aa1e3ff8b08b9da4775b6cbc", "score": "0.65274584", "text": "function ob_html_compress($buf){\n return preg_replace(array('/<!--(.*)-->/Uis',\"/[[:blank:]]+/\"),array('',' '),str_replace(array(\"\\n\",\"\\r\",\"\\t\"),'',$buf));\n}", "title": "" }, { "docid": "16f1cab82b67d67f8d845c5c4d30c625", "score": "0.6327134", "text": "function html_minify($html) {\n return $html;\n}", "title": "" }, { "docid": "b48383785f4176c3d0cfab4509f9a180", "score": "0.6199255", "text": "static function print_gzipped_page()\n\t{\n\n\t\tif( headers_sent() )\n\t\t{\n\t\t $encoding = false;\n\t\t}\n\t\telseif( strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'x-gzip') !== false )\n\t\t{\n\t\t $encoding = 'x-gzip';\n\t\t}\n\t\telseif( strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false )\n\t\t{\n\t\t $encoding = 'gzip';\n\t\t}\n\t\telse\n\t\t{\n\t\t $encoding = false;\n\t\t}\n\n\t\tif( $encoding )\n\t\t{\n\t\t $contents = ob_get_contents();\n\t\t\t$size = strlen($contents);\n\t\t\t$Crc = crc32($contents);\n\t\t\t$contents = gzcompress($contents, 7);\n\t\t\t$contents = substr($contents, 0, strlen($contents) - 4);\n\n\t\t\tob_end_clean();\n\t\t\theader('Content-Encoding: ' . $encoding);\n\t\t\tprint(\"\\x1f\\x8b\\x08\\x00\\x00\\x00\\x00\\x00\");\n\n\t\t\tprint($contents);\n\n\t\t\techo pack('V', $Crc);\n\t\t\techo pack('V', $size);\n\n\t\t\texit();\n\t\t}\n\t\telse\n\t\t{\n\t\t ob_end_flush();\n\t\t exit();\n\t\t}\n\t}", "title": "" }, { "docid": "dd8130d15645ed518ad76fdf3efd44b5", "score": "0.6184198", "text": "function wproTemplateCompressHTML($str) {\n\n\t$str = preg_replace(\"/(<script[^>]*>[\\s]*\\/\\*<\\!\\[CDATA\\[[\\s]*\\*\\/)(.*?)\\/\\*[\\s]*(\\]\\]>|<\\/XMLCDATA>)\\*\\/[\\s]*<\\/script>/smie\", \"str_replace('\\\\\\\"','\\\"','$1').wproTemplateCompressJS(str_replace('\\\\\\\"','\\\"','$2')).'/* ]]>*/</script>'\", $str);\n\t\n\t$str =preg_replace(\"/^\\s*/smi\", '', $str); // starting white space\n\t$str =preg_replace(\"/\\s*$/smi\", '', $str); // ending white space\n\t$str = preg_replace(\"/^[\\s]+$/si\", '', $str); // blank lines\n\t\n\t$str = preg_replace(\"/[\\r\\n]/si\", '', $str); // line returns\n\t\n\t//echo '<pre>'.htmlspecialchars($str).'</pre>';\n\t\n\treturn $str;\n}", "title": "" }, { "docid": "cc47536909df69b49f68edcfd03f3b96", "score": "0.60141623", "text": "public function gzip();", "title": "" }, { "docid": "6031dc17e9990b35ef7af9b0b5125679", "score": "0.59904593", "text": "function parsePage()\n {\n $output = '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">';\n $output .= '<html xml:lang=\"'.$this->escape($this->page_array['language']).'\" xmlns=\"http://www.w3.org/1999/xhtml\">';\n $output .= ' <head>';\n $output .= $this->parseMeta();\n $output .= $this->parseCSS();\n $output .= ' </head>';\n $output .= ' <body>';\n $output .= ' <div id=\"container\">';\n $output .= ' <div id=\"branding\">';\n $output .= ' <h1>'.$this->escape($this->page_array['title']).'</h1>';\n $output .= ' </div>';\n $output .= $this->parseNavigation('toplevel');\n $output .= $this->parseNavigation('sublevel');\n $output .= ' <div id=\"content\">';\n $output .= ' <div id=\"content-main\">';\n $output .= $this->parseSections();\n $output .= ' </div>';\n $output .= ' </div>';\n $output .= ' <div id=\"siteinfo\">';\n // her kunne vi outputte licensen\n $output .= ' </div>';\n $output .= ' </div>';\n $output .= ' </body>';\n $output .= '</html>';\n\n return $output;\n }", "title": "" }, { "docid": "872d0159ab4675054f6e85294235205c", "score": "0.5983636", "text": "public static function gzip()\n {\n ob_start( \"ob_gzhandler\" );\n }", "title": "" }, { "docid": "048da912b6e9db5df7e750f84df12713", "score": "0.59467053", "text": "function compress_output($output) # Callback function to compress $output\n{ # We can perform additional manipulation on $output here, such as stripping whitespace, etc. \n return gzencode($output); \n}", "title": "" }, { "docid": "a8a22db0c6c87c5f1a9861c54b0d6a19", "score": "0.5935282", "text": "abstract protected function minify($content);", "title": "" }, { "docid": "47ddb479f34de69c08ab760596ea8b18", "score": "0.593255", "text": "public static function compressHTML( $sCode )\n\t{\n\t\t$aSearch\t= array( '�<!--.*?-->�s', '/\\>[^\\S ]+/s', '/[^\\S ]+\\</s', '/(\\s)+/s' );\n\t\t$aReplace\t= array( '', '>', '<', '\\\\1' );\n\t\t\n\t\treturn preg_replace( $aSearch, $aReplace, $sCode );\n\t}", "title": "" }, { "docid": "b364274253017c83f756a619b57b6330", "score": "0.59008044", "text": "private function compress($output)\n {\n // strip unnecesary data from the resultant content\n $output = str_replace(\"\\n\", '', $output);\n $output = str_replace(\"\\t\", '', $output);\n $output = str_replace(chr(13), '', $output);\n $output = preg_replace('/[\\s]{2,}/', ' ', $output);\n $output = preg_replace('~>\\s+<~', '><', $output);\n $output = preg_replace('/<!--(?!\\s*(?:\\[if [^\\]]+]|<!|>))(?:(?!-->).)*-->/', '', $output);\n\n return $output;\n }", "title": "" }, { "docid": "e33fb346b3a73b1daf44bb0eb80a0c2a", "score": "0.5896146", "text": "public function getCompressedOutput()\n\t{\n $buffer = $this->getOutput();\n \n $search = array(\n '/\\>[^\\S ]+/s', // strip whitespaces after tags, except space\n '/[^\\S ]+\\</s', // strip whitespaces before tags, except space\n '/(\\s)+/s' // shorten multiple whitespace sequences\n );\n\n $replace = array(\n '>',\n '<',\n '\\\\1'\n );\n\n $buffer = preg_replace($search, $replace, $buffer);\n\n return $buffer;\n\t}", "title": "" }, { "docid": "0d4ea2c8f7f9d33e624125f247e064a3", "score": "0.5821784", "text": "public function process()\n\t\t{\n\t\t\treturn $this->_minifyHtml->process();\n\t\t}", "title": "" }, { "docid": "07a1079fcbd62aec273287daf99cd8bb", "score": "0.58099806", "text": "function page_html(){\n\t\tfor ($i=0;$i<count($this->blocco);$i++) $this->body.=$this->blocco_html($i);\n\t\treturn \"<div class=\\\"xmr_contenuto\\\">\".$this->body.\"</div>\";\n\t}", "title": "" }, { "docid": "eef4c4326f4220e68b3223a41525c367", "score": "0.5803145", "text": "function flow_elated_get_archive_page_html(){\n\t\t\n\t\t$return_obj = array();\n\t\t$query_array = array();\n\t\t$post_number = $cat_id = $tag_slug = $html = $author_id = '';\n\t\t$max_pages = '';\n\t\t\n\t\tif (!empty($_POST['currentCatId'])) {\n\t\t\t$cat_id = $_POST['currentCatId'];\n\t\t}\n\t\tif (!empty($_POST['currentTagSlug'])) {\n\t\t\t$tag_slug = $_POST['currentTagSlug'];\n\t\t}\n\t\tif (!empty($_POST['currentAuthorId'])) {\n\t\t\t$author_id = $_POST['currentAuthorId'];\n\t\t}\n\t\tif (!empty($_POST['postNumber'])) {\n\t\t\t$post_number = $_POST['postNumber'];\n\t\t}\n\t\t\n\t\t$query_array = array(\n\t\t\t'post_type' => 'post',\n\t\t\t'post_status'\t=> 'publish',\n\t\t\t'posts_per_page' => $post_number\n\t\t);\t\n\t\tif($cat_id != ''){\n\t\t\t$query_array['cat'] = $cat_id;\n\t\t}\n\t\tif($tag_slug != ''){\n\t\t\t$query_array['tag'] = $tag_slug;\n\t\t}\n\t\tif($author_id != ''){\n\t\t\t$query_array['author'] = $author_id;\n\t\t}\n\t\t\n\t\t$query_results = new WP_Query($query_array);\t\t\n\t\t$max_pages = $query_results->max_num_pages;\n\t\t\n\t\tif($query_results->have_posts()):\t\t\t\n\t\t\twhile ( $query_results->have_posts() ) : $query_results->the_post();\n\t\t\t\t$html .= flow_elated_get_post_format_html('expanding-tiles', 'yes');\n\t\t\tendwhile;\n\t\telse:\n\t\t\tflow_elated_get_post_format_html('expandable', 'yes', 'yes'); //load no posts template\n\t\tendif;\n\n\t\t$return_obj = array(\n\t\t\t'html' => $html,\n\t\t\t'maxPages' => $max_pages\n\t\t);\n\t\n\t\techo json_encode($return_obj); exit;\n\t\t\n\t}", "title": "" }, { "docid": "e7b62ffe72d976710328348266430f03", "score": "0.5789", "text": "public function minify($content);", "title": "" }, { "docid": "ef778ee785016811091b2efe22b400ac", "score": "0.5783387", "text": "public function gzip() {\n if (isset($_SERVER['HTTP_ACCEPT_ENCODING']) && substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') && !extension_loaded('zlib')) {\n ob_start('ob_gzhandler');\n } else {\n ob_start();\n }\n }", "title": "" }, { "docid": "7c256c132a8c3a4c3ad6b08d54fe976b", "score": "0.5696427", "text": "function tidy_get_html () {}", "title": "" }, { "docid": "47e3a6eaea6fd17302b4e984da396e21", "score": "0.5694782", "text": "function export_html($page)\n{\n\t$html = '';\n\t\n\t$scale = 0.4;\n\t\n\t$html = '<!DOCTYPE html>\n<html>\n<head>\n\t<meta charset=\"utf-8\" />\n\t\n\t<!-- hOCR tags -->\n\t<meta name=\"ocr-capabilities\" content=\"ocr_line ocr_page ocrx_word\" />\n\t<meta name=\"ocr-langs\" content=\"en\" />\n\t<meta name=\"ocr-scripts\" content=\"Latn\" />\n\t<meta name=\"ocr-microformats\" content=\"\" />\n\t\n\n\t<style type=\"text/css\">\n\t.body {\n\t margin:0px;\n\t padding:0px;\n\t}\n\t\n\t.ocr_page {\n\t\tborder:1px solid black;\n\t\tleft: 0px;\n\t\ttop: 0px;\n\t\twidth: ' . ($scale * $page->bbox[2]) . 'px;\n\t\theight: ' . ($scale * $page->bbox[1]) . 'px;\n\t}\n\t\n\t/* http://blog.vjeux.com/2011/css/css-one-line-justify.html */\n\t/* This ensures single line of text is justified */\n.ocr_line {\n text-align: justify;\n}\n.ocr_line:after {\n content: \"\";\n display: inline-block;\n width: 100%;\n}\t\n\t</style>\n</head>\n<body>' . \"\\n\";\n\n\t$html .= \"<!-- page -->\\n\";\n\t\n\t$html .= '<div class=\"ocr_page\"';\n\t$html .= ' title=\"bbox 0 0 ' . ($scale * $page->bbox[2]) . ' ' . ($scale * $page->bbox[1]) . '\"';\n\t$html .= '>';\n\t$html .= \"\\n\";\n\n\t\n\tforeach ($page->regions as $region)\n\t{\n\t\t$html .= '<!-- region -->' . \"\\n\";\n\t\t$html .= '<div class=\"ocr_carea\">' . \"\\n\";\n\t\tif (1)\n\t\t{\n\t\t\tforeach ($region->paragraphs as $paragraph)\n\t\t\t{\n\t\t\t\t$html .= '<!-- paragraph -->' . \"\\n\";\n\t\t\t\t$html .= '<div class=\"ocr_par\">' . \"\\n\";\n\t\t\t\t\n\t\t\t\t// font height\n\t\t\t\t$fontsize = 0;\n\t\t\t\t\n\t\t\t\t// Compute font height based on capheight of font\n\t\t\t\t// e.g for Times New Roman we divide by 0.662\n\t\t\t\tif (isset($paragraph->fontmetrics->capheight))\n\t\t\t\t{\n\t\t\t\t\t/*\n\t\t\t\t\tif (isset($paragraph->fontmetrics->descender))\n\t\t\t\t\t{\n\t\t\t\t\t\t$fontsize = $paragraph->fontmetrics->capheight + $paragraph->fontmetrics->descender;\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$fontsize = $paragraph->fontmetrics->capheight/0.7;\n\t\t\t\t\t}\n\t\t\t\t\t*/\n\t\t\t\t\t\n\t\t\t\t\t$fontsize = $paragraph->fontmetrics->capheight/0.662;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$html .= \"<!-- $fontsize -->\\n\";\n\t\t\t\t\n\t\t\t\t$fontsize *= $scale;\n\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t// text\n\t\t\t\tforeach ($paragraph->lines as $line)\n\t\t\t\t{\n\t\t\t\t\t$html .= '<div class=\"ocr_line\" contenteditable=\"true\" style=\"font-size:' . $fontsize . 'px;line-height:' . $fontsize . 'px;position:absolute;left:' . ($line->bbox[0] * $scale) . 'px;top:' . ($line->bbox[3] * $scale) . 'px;min-width:' . ($scale *($line->bbox[2] - $line->bbox[0])) . 'px;height:' . ($line->bbox[1] - $line->bbox[3]) . 'px;\">';\n\t\t\t\t\t\n\t\t\t\t\t$html .= $line->text;\n\t\t\t\t\t\n\t\t\t\t\t$html .= '</div>' . \"\\n\";\n\t\t\t\t\n\t\t\t\t\t$n = count($line->words);\n\t\t\t\t\t$count = 0;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$html .= '</div><!-- ocr_par -->' . \"\\n\";\n\t\t\t}\n\t\t}\t\t\n\t\t$html .= '</div><!-- ocr_carea -->' . \"\\n\";\n\t}\n\t\n\t$html .= '</div><!-- ocr_page -->' . \"\\n\";\n\t$html .= '</body>\n</html>';\n\n\treturn $html;\n}", "title": "" }, { "docid": "6c2873c30ecf0b6048e462b9df67d9ff", "score": "0.56730705", "text": "function sanitize($buffer) {\n\t\t\t\t\t\t\t$search = array('/\\>[^\\S ]+/s', '/[^\\S ]+\\</s', '/(\\s)+/s');\n\t\t\t\t\t\t\t$replace = array('>', '<', '\\\\1');\n\t\t\t\t\t\t\t$buffer = preg_replace($search, $replace, $buffer);\n\t\t\t\t\t\t\tfunction gzip_doc($buffer) { if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) { return ob_gzhandler($buffer, 5); } else { return $buffer; }}\n\t\t\t\t\t\t\treturn gzip_doc($buffer);\n\t\t\t\t\t\t}", "title": "" }, { "docid": "c5307b14af43af74ee5dbd26f8a679e6", "score": "0.5667727", "text": "function CompressDressli($buf){\n\t $basura = array(\"/<!--(.*)-->/Uis\",\"/[[:blank:]]+/\",\"/\\>[^\\S ]+/s\",\"/[^\\S ]+\\</s\");\n\t\t$quitar = array('',' ','>','<');\n\t $buf = preg_replace($basura,$quitar,$buf);\n return $buf;\n }", "title": "" }, { "docid": "20439baab78f96c7672591753eaaf1e4", "score": "0.5627243", "text": "function _do_compress_php_file($file_to_open = '', $file_to_save = '')\n{\n $source = file_get_contents($file_to_open);\n // Removes comments\n foreach ((array) token_get_all($source) as $token) {\n if (is_string($token)) {\n // simple 1-character token\n $output .= $token;\n } else {\n // token array\n list($id, $text) = $token;\n switch ($id) {\n case T_COMMENT:\n case T_ML_COMMENT: // we've defined this\n case T_DOC_COMMENT: // and this\n // no action on comments\n $output .= ' ';\n break;\n default:\n // anything else -> output \"as is\"\n $output .= $text;\n break;\n }\n }\n }\n $output = str_replace([\"\\r\", \"\\n\"], '', $output);\n $output = str_replace(\"\\t\", ' ', $output);\n $output = preg_replace(\"/[\\s\\t]{2,}/ims\", ' ', $output);\n // Write the file\n $fh = @fopen($file_to_save, 'w');\n fwrite($fh, $output);\n @fclose($fh);\n // Display compress ratio\n $body .= 'compressed file \"' . $file_to_open . '\" saved into \"' . $file_to_save . \"\\\"<br />\\r\\n\";\n $body .= '<b>compress ratio: ' . (round(@filesize($file_to_open) / @filesize($file_to_save), 2) * 100) . '% (' . @filesize($file_to_open) . ' / ' . @filesize($file_to_save) . \" bytes)</b><br />\\r\\n\";\n return $body;\n}", "title": "" }, { "docid": "d1d2a6e0418cf668aed7963ab7f5ab94", "score": "0.56075263", "text": "public function minifyHTML($html){\n $buffer = $html;\n if(strpos($buffer,'<pre>') !== false)\n {\n $replace = array(\n '/<!--[^\\[](.*?)[^\\]]-->/s' => '',\n \"/<\\?php/\" => '<?php ',\n \"/\\r/\" => '',\n \"/>\\n</\" => '><',\n \"/>\\s+\\n</\" => '><',\n \"/>\\n\\s+</\" => '><',\n );\n }\n else\n {\n $replace = array(\n '/<!--[^\\[](.*?)[^\\]]-->/s' => '',\n \"/<\\?php/\" => '<?php ',\n \"/\\n([\\S])/\" => '$1',\n \"/\\r/\" => '',\n \"/\\n/\" => '',\n \"/\\t/\" => '',\n \"/ +/\" => ' ',\n );\n }\n $buffer = preg_replace(array_keys($replace), array_values($replace), $buffer);\n return $buffer;\n }", "title": "" }, { "docid": "4b7920e783f1b2612b3559cc317051b3", "score": "0.56048924", "text": "public function minifyCache(){\n\t\t$this->moldFiles->setMinifyHtml(true);\n\t\treturn $this->mold ;\n\t}", "title": "" }, { "docid": "44c000de8a3e65c88514c5c0ecd85ea7", "score": "0.5596506", "text": "public static function compress($buffer)\n {\n /**\n * To remove useless whitespace from generated HTML, except for Javascript.\n * [Regex Source]\n * https://github.com/bcit-ci/codeigniter/wiki/compress-html-output\n * http://stackoverflow.com/questions/5312349/minifying-final-html-output-using-regular-expressions-with-codeigniter\n * %# Collapse ws everywhere but in blacklisted elements.\n * (?> # Match all whitespaces other than single space.\n * [^\\S ]\\s* # Either one [\\t\\r\\n\\f\\v] and zero or more ws,\n * | \\s{2,} # or two or more consecutive-any-whitespace.\n * ) # Note: The remaining regex consumes no text at all...\n * (?= # Ensure we are not in a blacklist tag.\n * (?: # Begin (unnecessary) group.\n * (?: # Zero or more of...\n * [^<]++ # Either one or more non-\"<\"\n * | < # or a < starting a non-blacklist tag.\n * (?!/?(?:textarea|pre)\\b)\n * )*+ # (This could be \"unroll-the-loop\"ified.)\n * ) # End (unnecessary) group.\n * (?: # Begin alternation group.\n * < # Either a blacklist start tag.\n * (?>textarea|pre)\\b\n * | \\z # or end of file.\n * ) # End alternation group.\n * ) # If we made it here, we are not in a blacklist tag.\n * %ix\n */\n $regexRemoveWhiteSpace\n = '%(?>[^\\S ]\\s*| \\s{2,})(?=(?:(?:[^<]++| <(?!/?(?:textarea|pre)\\b))*+)(?:<(?>textarea|pre)\\b|\\z))%ix';\n $new_buffer = preg_replace($regexRemoveWhiteSpace, '', $buffer);\n // We are going to check if processing has working\n if ($new_buffer === null) {\n $new_buffer = $buffer;\n }\n\n return $new_buffer;\n }", "title": "" }, { "docid": "29f9c14452d23000474263783c5c023b", "score": "0.55640715", "text": "protected function filterOutput($html)\r\n {\r\n //content filter setup\r\n sfConfig::set('app_sfThumbnail_thumbnails_dir', 'userFiles/thumbnails');\r\n $this -> getContext() -> getConfiguration() -> loadHelpers(array(\"sfThumbnail\"), $this -> getContext() -> getModuleName());\r\n\r\n $filter = sfContentFilterParser::createInstance();\r\n $html = $filter -> filter($html, array(\"image\", \"url\")); //resize images and link url's\r\n\r\n return $html;\r\n }", "title": "" }, { "docid": "4456a25d25b4f955a456f33d4cb67a12", "score": "0.5522887", "text": "function compress_start_handler() {\n\tif( compress_handler_is_enabled() ) {\n\t\t# Before doing anything else, start output buffering so we don't prevent\n\t\t# headers from being sent if there's a blank line in an included file\n\t\tob_start( 'compress_handler' );\n\t} else if ( ini_get_bool( 'zlib.output_compression' ) == true ) {\n\t\tif( defined( 'COMPRESSION_DISABLED' ) ) {\n\t\t\treturn;\n\t\t}\n\t\tob_start();\n\t}\n}", "title": "" }, { "docid": "4c92ba46c5fb2c8152389effdb7f60fe", "score": "0.5498194", "text": "function _compress( $data )\n\t{\n\t\t$encoding = JResponse::_clientEncoding();\n\n\t\tif (!$encoding)\n\t\t\treturn $data;\n\n\t\tif (!extension_loaded('zlib') || ini_get('zlib.output_compression')) {\n\t\t\treturn $data;\n\t\t}\n\n\t\tif (headers_sent())\n\t\t\treturn $data;\n\n\t\tif (connection_status() !== 0)\n\t\t\treturn $data;\n\n\n\t\t$level = 4; //ideal level\n\n\t\t/*\n\t\t$size\t\t= strlen($data);\n\t\t$crc\t\t= crc32($data);\n\n\t\t$gzdata\t\t= \"\\x1f\\x8b\\x08\\x00\\x00\\x00\\x00\\x00\";\n\t\t$gzdata\t\t.= gzcompress($data, $level);\n\n\t\t$gzdata \t= substr($gzdata, 0, strlen($gzdata) - 4);\n\t\t$gzdata \t.= pack(\"V\",$crc) . pack(\"V\", $size);\n\t\t*/\n\n\t\t$gzdata = gzencode($data, $level);\n\n\t\tJResponse::setHeader('Content-Encoding', $encoding);\n\t\tJResponse::setHeader('X-Content-Encoded-By', 'Joomla! 1.5');\n\n\t\treturn $gzdata;\n\t}", "title": "" }, { "docid": "8c7d41af891ea6b37f914f5273a36eba", "score": "0.54909366", "text": "private function compressHtml($data) {\n return str_replace([\"\\n\", ' '], '', $data);\n }", "title": "" }, { "docid": "483632a52d8b0328db20f393bc0bfbf2", "score": "0.5478545", "text": "private function get_page_content():string {\n\t\t\\ob_start();\n\t\t$this->page->show();\n\n\t\treturn \\ob_get_clean();\n\t}", "title": "" }, { "docid": "a9922aaf2edee87dda04e72d08ca2832", "score": "0.54714054", "text": "public function actionGzip()\n {\n echo \"gzip...\\n\";\n chdir(\\yii::getAlias('@frontend'));\n system('grunt');\n system('gzip --best < index.html > index.min.html');\n system('gzip --best < js/_/all.js > js/_/all.min.js');\n system('gzip --best < css/_/all.css > css/_/all.min.css');\n }", "title": "" }, { "docid": "555005a5201dcdf631fa1e5df4c6235c", "score": "0.5439829", "text": "function output_html($html)\n{\n\t$html = mb_substr($html,0,65535);\n\n\t$html = base64_decode($html);\n\treturn $html;\n}", "title": "" }, { "docid": "8d9bfebdc718819541fea0d6cad61159", "score": "0.5427314", "text": "private function compressGzip($data){\n $gzdata = gzencode($data, 9);\n $fp = fopen('sitemap.xml.gz', 'w');\n fwrite($fp, $gzdata);\n fclose($fp);\n\n $this->writeStaticXmlFile();\n }", "title": "" }, { "docid": "d14ecf9f997636aa86713aa9f8fac703", "score": "0.54176825", "text": "public static function Zipped () {\n global $HTTP_ACCEPT_ENCODING;\n if( headers_sent() ){\n $encoding = false;\n }elseif( strpos($HTTP_ACCEPT_ENCODING, 'x-gzip') !== false ){\n $encoding = 'x-gzip';\n }elseif( strpos($HTTP_ACCEPT_ENCODING,'gzip') !== false ){\n $encoding = 'gzip';\n }else{\n $encoding = false;\n }\n\n if( $encoding ){\n $contents = ob_get_contents();\n ob_end_clean();\n header('Content-Encoding: '.$encoding);\n print(\"\\x1f\\x8b\\x08\\x00\\x00\\x00\\x00\\x00\");\n $size = strlen($contents);\n $contents = gzcompress($contents, 9);\n $contents = substr($contents, 0, $size);\n print($contents);\n exit();\n }else{\n ob_end_flush();\n exit();\n }\n }", "title": "" }, { "docid": "9e8c6aff561e054cad9b7a6806e66824", "score": "0.5407423", "text": "function kmw_sitemap_full(){\n\t\tob_start();\n\t\t?>\n\n\t\t\t<div class=\"kmw-sitemap\">\n\t\t\t\t<div class=\"kmw-sitemap-column\">\n\t\t\t\t\t<h2>Pages</h2>\n\t\t\t\t\t<?php echo kmw_sitemap_pages(); ?>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"kmw-sitemap-column\">\n\t\t\t\t\t<h2>Categories</h2>\n\t\t\t\t\t<?php echo kmw_sitemap_categories(); ?>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\n\t\t<?php\n\t\treturn ob_get_clean();\n\t}", "title": "" }, { "docid": "0b2bc67a3dda1c0a472d23c3c3b4f880", "score": "0.53848374", "text": "public function output_content() {}", "title": "" }, { "docid": "3b42ee84f38ba167889abbf8ef1abf89", "score": "0.53838325", "text": "private function iniciarBuffer(){\n if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], Pagina::$COMPRESS_GZIP)){\n ob_start('ob_gzhandler');\n //ob_start('sanitize_output');\n return Pagina::$COMPRESS_GZIP;\n }\n else{\n ob_start();\n return NULL;\n }\n }", "title": "" }, { "docid": "7c22626e2539a0828c8250d090e49745", "score": "0.5382695", "text": "function sitemap_compress($xml)\n{\n\treturn str_replace(array(\"\\t\", \"\\r\", \"\\n\"), '', $xml);\n}", "title": "" }, { "docid": "78f1be1b151ec324f2d04223bcd39fc9", "score": "0.53793365", "text": "public function get_content_compressed();", "title": "" }, { "docid": "2d5b4088ce539fb4c608ce2900887a77", "score": "0.53757966", "text": "public function getCloserHTML(){\n\t\t$HTML='\n\t\t\t<script src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js\"></script>\n\t\t\t <script src=\"https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js\" type=\"text/javascript\"></script>\n <script src=\"http://packery.metafizzy.co/packery.pkgd.js\"></script>\n\t\t <script src=\"js/draggabilly.pkgd.min.js\"></script>\n <script src=\"js/packery.pkgd.min.js\"></script>\n\t\t\t<script src=\"js/packeryStarter.js\"></script>\n\t\t\t<script src=\"js/jquery.Jcrop.min.js\"></script>\n\t\t\t<script src=\"js/JcropStarter.js\"></script>\n\t\t\t<script src=\"js/myJavascript.js\"></script>\n\t\t\t';\n\t $HTML .= '</body>';\n\t\treturn $HTML;\n\t}", "title": "" }, { "docid": "4180f8af55c4125f5f13f83f9b75d03a", "score": "0.5358101", "text": "function transformHTML($str) {\n if ((strpos($str,\"<HTML\") < 0) || (strpos($str,\"<html\") < 0)) {\n $makeHeader = \"<html><head><meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=iso-8859-1\\\"></head>\\n\";\n if ((strpos($str,\"<BODY\") < 0) || (strpos($str,\"<body\") < 0)) {\n $makeBody = \"\\n<body>\\n\";\n $str = $makeHeader . $makeBody . $str .\"\\n</body></html>\";\n } \n else {\n $str = $makeHeader . $str .\"\\n</html>\";\n }\n } \n else {\n $str = \"<meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=iso-8859-1\\\">\\n\". $str;\n }\n return $str;\n }", "title": "" }, { "docid": "964bc45c170c18cc7bf9df22ad80ec8c", "score": "0.5352924", "text": "protected function outputHtml($output)\n\t{\n\t\t$this->setHttpHeader('Content-Type: text/html;charset=' . mb_internal_encoding());\n\t\t\n\t\techo '<?xml version=\"1.0\" encoding=\"' . mb_internal_encoding() . '\"?>';\n\t\techo '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \n\t\t\t\t\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n\t\t\t<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en-US\" lang=\"en-US\">';\n\n\t\techo '<head>' . $output['head'] . '</head>';\n\t\techo '<body>' . $output['body'];\n\t\t\n\t\t\n\t\t\n\t\t/* Credits (who really wants to see these?)\n\t\t***************************************************************/\n\t\techo '<p style=\"text-align:left; padding-left:23em;font-size:0.75em;\">&copy; 2010 ibo|suisse | powered by <b>strix</b> v 0.7';\t\n\t\t\n\t\t/* Statistics:\n\t\t ***************************************************************/\n\t\t\n\t\t//sql queries\n\t\t$num_queries = SqlQuery::getInstance()->getTotalQueries();\n\t\t$query_latency = round(SqlQuery::getInstance()->getTotalQueryTime(),6)*1000; //time in ms\n\t\t\n\t\techo ' | queries to DB: ' . $num_queries . ' (' . $query_latency . 'ms)';\n\t\t\n\t\t//time taken (till here)\n\t\techo ' | build time ≈ ' . round((microtime(true) - START_TIME),6)*1000 .'ms, ';\n\t\n\t\t\n\t\t/* Finally, the most useless statistics of all (page size in bytes):\n\t\t ***************************************************************/\n\t\t$stats1 = ' | page size: ';\n\t\t$stats2 = ' bytes</p>';\n\t\t$end_tags = '</body></html>';\n\t\t\n\t\t$page_size = ob_get_length() + mb_strlen($stats1 . $stats2 . $end_tags,'latin1');\n\t\t$total_size = $page_size + strlen($page_size);\n\t\t$total_size += strlen($total_size) - strlen($page_size); //yeah, it's a nasty one!\n\t\t\n\t\techo $stats1 . $total_size . $stats2;\n\t\techo $end_tags;\n\t\t\n\t}", "title": "" }, { "docid": "6bf06177c724d5c708fce5a46bb9e305", "score": "0.53307253", "text": "function compress_handler( & $p_buffer, $p_mode ) {\n\tglobal $g_compression_started;\n\tif( $g_compression_started && compress_handler_is_enabled() ) {\n\t\treturn ob_gzhandler( $p_buffer, $p_mode );\n\t} else {\n\t\treturn $p_buffer;\n\t}\n}", "title": "" }, { "docid": "0975407b5cfb14c9d2cab79537e272d8", "score": "0.53285986", "text": "private function _getCompressed(){\r\n\t\tApp::import('Vendor', 'Compressor');\r\n\t\t// here i'm using csspp but you could also use Yuicompressor\r\n\t\t$compressor = new Compressor($this->filename, $this->path, $this->type);\r\n\t\treturn $compressor->process();\r\n\t}", "title": "" }, { "docid": "a3f30dd4dac8db36e37e6082519ee982", "score": "0.53284585", "text": "public function minify()\n\t{\n\t\tif(class_exists('Minify_HTML'))\n\t\t{\n\t\t\t// noptimize me\n\t\t\t$this->content = $this->hide_noptimize($this->content);\n\n\t\t\t// Minify html\n\t\t\t$options = array('keepComments' => $this->keepcomments);\n\t\t\t$tmp_content = Minify_HTML::minify($this->content,$options);\n\t\t\tif (!empty($tmp_content)) {\n\t\t\t\t$this->content = $tmp_content;\n\t\t\t\tunset($tmp_content);\n\t\t\t}\n\n\t\t\t// restore noptimize\n\t\t\t$this->content = $this->restore_noptimize($this->content);\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t//Didn't minify :(\n\t\treturn false;\n\t}", "title": "" }, { "docid": "7a16ff7bdbab91b9af6391a99365a416", "score": "0.53133625", "text": "function renderBrowsingPortal( $input, $argv, $parser ) {\t\r\n\treset($_POST);\r\n\treset($argv);\r\n\t\r\n\t$parser->disableCache(); # IMPORTANT!!!!!! seriously, i spent 2 hrs figuring out this was necessary\r\n\t\r\n\tadd_js_css();\r\n\r\n\t\r\n\t$encodeExplorer = new EncodeExplorer();\r\n\t$encodeExplorer->init();\r\n\t\r\n\t$output = $encodeExplorer->run($argv, $parser);\r\n\r\n\r\n\treturn $output;\r\n}", "title": "" }, { "docid": "77e5c7d33d62b4aac68a1b8881107048", "score": "0.53107774", "text": "function usage()\n{\nob_start(); \n?>\nClean really bad HTML text.\n\n{exp:cleaner:clean}\n {blog_body}\n{/exp:cleaner:clean}\n \n<?php\n$buffer = ob_get_contents();\n \nob_end_clean(); \n\nreturn $buffer;\n}", "title": "" }, { "docid": "6d0ab7578a156b8d8f92c452209e2906", "score": "0.53100324", "text": "abstract public function generate_html();", "title": "" }, { "docid": "ea3eed37c466f59638fb99b6391d26f4", "score": "0.53032297", "text": "public function toString() {\n\t\t\tglobal $postProcessingList;\n\t\t\t// executed operations staged by other modules...\n\t\t\tforeach($postProcessingList as $func) $func($this);\n\n\t\t\t// format <head> element into convenient order, could be removed to gain speed\n\t\t\t$ranking = function ($node) {\n\t\t\t\t$tagName = isset($node->tagName) ? $node->tagName : '';\n\t\t\t\tswitch($tagName) {\n\t\t\t\t\tcase 'base': return '-1';\n\t\t\t\t\tcase 'meta': return '0'.$node->getAttribute('name');\n\t\t\t\t\tcase 'title': return '1';\n\t\t\t\t\tcase 'link': return '2'.$node->getAttribute('rel');\n\t\t\t\t\tcase 'style': return '3';\n\t\t\t\t\tcase 'script': return $node->hasAttribute('src') ? '4' : '5';\n\t\t\t\t\tdefault: return '6';\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t// Sort the head tag children, keeping the order of nodes with the same rank\n\t\t\t// unchanged (this is important for script tags).\n\t\t\t$nodes = $this->getElementsByTagName('head')->Item(0)->childNodes;\n\t\t\tfor ($i=0;$i<$nodes->length-1;$i++) {\n\t\t\t\tfor ($j = $i + 1; $j < $nodes->length; $j++) {\n\t\t\t\t\tif ($ranking($nodes->Item($j - 1)) > $ranking($nodes->Item($j))) {\n\t\t\t\t\t\t$swapnode = $this->getElementsByTagName('head')->Item(0)->removeChild($nodes->Item($j));\n\t\t\t\t\t\t$this->getElementsByTagName('head')->Item(0)->insertBefore($swapnode, $nodes->Item($j - 1));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// convert to string\n\t\t\t$html = $this->saveHTML();\n\n\t\t\t// remove javascript code comments to minimize data transfer\n\t\t\t$html = preg_replace('%/\\*(?:(?!\\*/).)*\\*/%s', '', $html);\n\n\t\t\treturn $html;\n\t\t}", "title": "" }, { "docid": "53784d94acfd4c9183e93dcedcf122ce", "score": "0.53022087", "text": "function render()\n{\n if ($this->isAdmin && count($this->chunksParsed)) {\n $tmpContent = \"\";\n foreach($this->chunksParsed as $parsed) {\n if (strlen($tmpContent)) $tmpContent .= \"<br>\";\n $tmpContent .= \"<a href=\\\"/admin/EditChunk/\" . $parsed[\"ChunkID\"] . \"\\\">\";\n $tmpContent .= $parsed[\"ChunkName\"];\n $tmpContent .= \"</a>\";\n }\n if (strlen($tmpContent)) {\n $this->addBlock(10000, INFO_ZONE, \"Admin Edit\", $tmpContent);\n }\n }\n // Send our cache controls.\n global $siteConfig;\n header(\"Cache-Control: no-cache,must-revalidate\");\n header(\"pragma: no-cache\");\n global $HTTP_ACCEPT_ENCODING;\n if ($this->doPersistantBlocks) $this->loadPersistantBlocks();\n $this->renderLayout();\n $content = ob_get_contents();\n // Check to see if we're going to compress the output\n $encoding = \"gzip\";\n $normsize = strlen($content);\n $gzipsize = $normsize;\n if ($this->compressOutput) {\n //$this->writeLog(\"ACCPET: $HTTP_ACCEPT_ENCODING\");\n if (headers_sent()) $this->compressOutput = 0;\n if (headers_sent()) $this->writeLog(\"Unable to gzip output -- headers already sent\");\n //if (eregi(\"gzip, deflate\", $HTTP_ACCEPT_ENCODING)) $cangzip = 0;\n if (eregi(\"gzip\", $HTTP_ACCEPT_ENCODING)) $encoding = \"gzip\";\n else if (eregi(\"x-gzip\", $HTTP_ACCEPT_ENCODING)) $encoding = \"x-gzip\";\n else {\n $this->writeLog(\"Client doesn't support compression. Disabling.\");\n $this->compressOutput = 0;\n }\n }\n ob_end_clean();\n if ($this->compressOutput) {\n header(\"Content-Encoding: $encoding\");\n $Crc = crc32($content);\n $content = gzcompress($content, 5);\n $gzipsize = strlen($content);\n $content = substr($content, 0, strlen($content)-4);\n echo \"\\x1f\\x8b\\x08\\x00\\x00\\x00\\x00\\x00\";\n echo $content;\n //echo pack('V', crc32($content));\n //echo pack('V', $normsize);\n $comprate = sprintf(\"%.2f\", (float)($normsize/$gzipsize));\n $this->writeLog(\"Compression rate $comprate:1\");\n } else {\n //$this->writeLog(\"NOT gzipping data...\");\n echo $content;\n }\n //echo \"$content\";\n //$this->writeLog(\"Did \" . $this->pregCount . \" preg_match()es\");\n $this->writeLog();\n}", "title": "" }, { "docid": "1e20e60b75fd4c0cea26fbcfb05e286b", "score": "0.5301217", "text": "public function prepare_package() {\n global $CFG;\n\n $pagehtml = '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" ' .\n '\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">' .\n html_writer::start_tag('html', array('xmlns' => 'http://www.w3.org/1999/xhtml'));\n $pagehtml .= html_writer::tag('head',\n html_writer::empty_tag('meta',\n array('http-equiv' => 'Content-Type', 'content' => 'text/html; charset=utf-8')) .\n html_writer::tag('title', get_string('export', 'forumngfeature_export')));\n $pagehtml .= html_writer::start_tag('body') . \"\\n\";\n\n $pagehtml .= $this->prepare_page($this->pageversion);\n\n $pagehtml .= html_writer::end_tag('body') . html_writer::end_tag('html');\n\n $content = $pagehtml;\n $name = $this->make_filename_safe($this->pageversion->title === '' ?\n get_string('startpage', 'ouwiki') : $this->pageversion->title) . '.html';\n $manifest = ($this->exporter->get('format') instanceof PORTFOLIO_FORMAT_RICH);\n\n $this->copy_files($this->multifiles);\n $this->get('exporter')->write_new_file($content, $name, $manifest);\n }", "title": "" }, { "docid": "027a1508b66a7ba7c2004b1ffd0eafdb", "score": "0.52965564", "text": "public function getHtmlFromPage($html)\n {\n $html = str_replace('<BODY', '<body', $html);\n $html = str_replace('</BODY', '</body', $html);\n // extract the content\n $res = explode('<body', $html);\n if (count($res)<2) return $html;\n $content = '<page'.$res[1];\n $content = explode('</body', $content);\n $content = $content[0].'</page>';\n // extract the link tags\n preg_match_all('/<link([^>]*)>/isU', $html, $match);\n foreach ($match[0] as $src)\n $content = $src.'</link>'.$content;\n // extract the css style tags\n preg_match_all('/<style[^>]*>(.*)<\\/style[^>]*>/isU', $html, $match);\n foreach ($match[0] as $src)\n $content = $src.$content;\n return $content;\n }", "title": "" }, { "docid": "1adda62b7c71d19a61fbaa9f90147a92", "score": "0.52854323", "text": "function jbot_minify($url)\n\t{\n\t\t// Magic Values\n\t\t$SERVICE = 'http://jbot.de/create.php';\n\t\t$PREFIX = '<p class=\"redirect\">';\n\t\t$POSTFIX = '</p>';\n\n\t\t$response = GWF_HTTP::post($SERVICE, array('url' => $url));\n\t\t// 1:1 html leech umgesetzt wie in Ralfs js example http://jbot.de/js/jbotcreate.js\n\t\tif(false === ($posStart = strpos($response, $PREFIX)))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$posStart += strlen($PREFIX);\n\t\t\tif(false === ($posEnd = strpos($response, $POSTFIX, $posStart)))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$minified = substr($response, $posStart, $posEnd - $posStart);\n\t\t}\n\t\treturn $minified;\n\t}", "title": "" }, { "docid": "5018742a9e8008f7d7146056fcccfa10", "score": "0.5279862", "text": "function compress_handler_is_enabled() {\n\tglobal $g_compress_html;\n\t\n\t//return false;\n\tcompress_enable();\n\t\n\tif(!isset($_SERVER[\"HTTP_ACCEPT_ENCODING\"]) || strpos( $_SERVER[\"HTTP_ACCEPT_ENCODING\"], \"gzip\" ) === false){\n\t\treturn false;\n\t}\n\t\n\t// indicates compression should be disabled for a page. Note: php.ini may still enable zlib.output_compression.\n\t// it may be possible to turn this off through the use of ini_set within that specific page.\n\tif ( defined( 'COMPRESSION_DISABLED' ) ) {\n\t\treturn false;\n\t}\n\n\t// Dont use config_get here so only dependency is on consant.inc.php in this module\n\t// We only actively compress html if global configuration compress_html is set.\n\tif ( isset($g_compress_html) && (ON == $g_compress_html) ) {\n\t\t// both compression handlers require zlib module to be loaded\n\t\tif( !extension_loaded( 'zlib' ) ) {\n\t\t\treturn false;\n\t\t}\n\t\n\t\tif ( ini_get( 'zlib.output_compression' ) ) {\n\t\t\t/* zlib output compression is already enabled - we can't load the gzip output handler */\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Since php 5.2.10, it's possible to set zlib.output_compression via ini_set.\n\t\t// This method is preferred over ob_gzhandler\n\t\tif( php_version_at_least( '5.2.10' ) && ini_get( 'output_handler' ) == '' && function_exists( 'ini_set' ) ) {\n\t\t\tini_set( 'zlib.output_compression', true );\n\t\t\t// do it transparently\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// if php.ini does not already use ob_gzhandler by default, return true.\n\t\treturn ( 'ob_gzhandler' != ini_get( 'output_handler' ) );\n\t}\n}", "title": "" }, { "docid": "76b675f8fe5713cb79b3ae8b9805c662", "score": "0.5240904", "text": "function allerdata_inserer_crayons($out){\n\t$out = pipeline('affichage_final', \"</head>\".$out);\n\t$out = str_replace(\"</head>\",\"\",$out);\n\treturn $out;\n}", "title": "" }, { "docid": "8ea494931cd550654cd19ad02ba4eceb", "score": "0.5228992", "text": "abstract function html();", "title": "" }, { "docid": "de9c16b72d6e974d4c39600c175120d8", "score": "0.52248967", "text": "function VG_ShortcodeForPage(){\r\n\t\r\n\tVG_CRUDFormFunction();\r\n\tob_start();\r\n\treturn ob_get_clean();\r\n}", "title": "" }, { "docid": "0932d9c1b5ba25541b33a9718e59942a", "score": "0.52241766", "text": "function toHtml($compressed = true, $level = 0) {\n if ($compressed == false) {\n $nl = \"\\n\";\n $tab = \" \";\n $indent = str_pad(\"\", ($level * 4));\n } else {\n $nl = \"\";\n $tab = \"\";\n $indent = \"\";\n }\n $html = $indent . '<img' . $this->attributesToHtml() . $this->cssToHtml() . ' />';\n return $html;\n }", "title": "" }, { "docid": "ab43721aeb9a59e227b2dc8d3bcf53cb", "score": "0.5205059", "text": "function WriteHTML($html,&$parsed)\r\n{\r\n //HTML parser\r\n $html=strip_tags($html,\"<b><u><i><a><img><p><br><strong><em><font><tr><blockquote>\"); //supprime tous les tags sauf ceux reconnus\r\n $html=str_replace(\"\\n\",' ',$html); //remplace retour à la ligne par un espace\r\n $a=preg_split('/<(.*)>/U',$html,-1,PREG_SPLIT_DELIM_CAPTURE); //éclate la chaîne avec les balises\r\n foreach($a as $i=>$e)\r\n {\r\n if($i%2==0)\r\n {\r\n //Text\r\n if($this->HREF)\r\n $this->PutLink($this->HREF,$e);\r\n else\r\n $parsed.=stripslashes(txtentities($e));\r\n }\r\n else\r\n {\r\n //Tag\r\n if($e[0]=='/')\r\n $this->CloseTag(strtoupper(substr($e,1)));\r\n else\r\n {\r\n //Extract attributes\r\n $a2=explode(' ',$e);\r\n $tag=strtoupper(array_shift($a2));\r\n $attr=array();\r\n foreach($a2 as $v)\r\n {\r\n if(preg_match('/([^=]*)=[\"\\']?([^\"\\']*)/',$v,$a3))\r\n $attr[strtoupper($a3[1])]=$a3[2];\r\n }\r\n $this->OpenTag($tag,$attr);\r\n }\r\n }\r\n }\r\n}", "title": "" }, { "docid": "2e689e94cfc3d2cb2a1d894425cfcd38", "score": "0.52034926", "text": "function outputFileHtml($fileName, $parser) {\r\n\t\t$output = \"\";\r\n\t\t\r\n\t\t//<!-- START: file source code -->\r\n\t\t$output .= \"<tbody>\\n\";\r\n\t\t$output .= \"<tr class=\\\"source_code\\\" width =\\100%\\\"><td>\\n\";\r\n\r\n\t\tif ( ! isset($wg_include_secure_include_path) )\r\n\t\t$wg_include_secure_include_path = \"$IP/extensions/secure-include.php\";\r\n\r\n\t\t@include $wg_include_secure_include_path;\r\n\r\n\t\tif( !function_exists('ef_include_render') ) {\r\n\t\t\t$output .= \"<div id=\\\"error\\\">ERROR: Extension:Include not installed</div>\\n\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t# Including local paths requires to uncomment the following line\r\n\t\t\t# $wg_include_allowed_features['local'] = true;\r\n\t\t\tglobal $wg_include_allowed_parent_paths;\r\n\t\t\t$wg_include_allowed_parent_paths = $_SERVER['DOCUMENT_ROOT'];\r\n\t\t\tglobal $wg_include_disallowed_regex;\r\n\t\t\t$wg_include_disallowed_regex = array('/.*LocalSettings.php/', '/.*\\.conf/', '/.*\\/\\.ht/');\r\n\t\t\t \r\n\t\t\t# Including remote URLs requires to uncomment the following line\r\n\t\t\t# $wg_include_allowed_features['remote'] = true;\r\n\t\t\tglobal $wg_include_allowed_url_regexp;\r\n\t\t\t$wg_include_allowed_url_regexp = array('/^http:\\/\\/.*$/');\r\n\t\t\tglobal $wg_include_disallowed_url_regexp;\r\n\t\t\t$wg_include_disallowed_url_regexp = array('/^.*:\\/\\/intranet/');\r\n\t\t\tglobal $wg_include_allowed_features;\r\n\t\t\t$wg_include_allowed_features['highlight'] = true;\r\n\t\t\t$wg_include_allowed_features['local'] = true;\r\n\t\t\t$wg_include_allowed_features['remote'] = true;\r\n\r\n\t#\t\t$output .= \"<div id=\\\"#codebrowser_breadcrumbs\\\">\\n\";\r\n\t#\t\t$output .= $this->generateBreadCrumbs($fileName);\r\n\t#\t\t$output .= \"</div>\\n\";\r\n\t\t\t\r\n\t\t\t$filePath = $this->location->getFullPath().$fileName;\r\n\r\n\t\t\t$argv = array();\r\n\t\t\t$argv['src'] = $filePath;\r\n\t\t\t$argv['highlight'] = sFile::getFileType($filePath);\r\n\t\t\t$argv['linenums'] = \"GESHI_NORMAL_LINE_NUMBERS\";\r\n\t\t\t// call secure-include extension\r\n\t\t\t$output .= ef_include_render(null, $argv, $parser);\r\n\r\n\t\t}\r\n\t\t\r\n\t\t$output .= \"</td></tr>\\n\";\r\n\t\t$output .= \"</tbody>\\n\";\r\n\t\t//<!-- END: file source code -->\r\n\t\t\r\n\t\t\r\n\t\treturn $output;\r\n\t}", "title": "" }, { "docid": "2c26cf380df5d1965970cdfa243b6795", "score": "0.520181", "text": "public function init_html_replacer() {\n\t\tif ( is_admin() ) {\n\t\t\treturn;\n\t\t}\n\t\tob_start(\n\t\t\tarray( &$this, 'filter_raw_content' )\n\t\t);\n\t}", "title": "" }, { "docid": "f5cd530ae061ca7ce2648388d83f178b", "score": "0.5198949", "text": "protected function yield() {\r\n \t$current_dir = $this->_current_dir;\r\n\t\t$this->_current_dir = dirname($this->_view) . '/';\r\n\r\n\t\tif ($this->_uglifyHTML) { \r\n\t\t\tob_start();\r\n\t\t\trequire $this->_view;\r\n\t\t\t$output = ob_get_contents();\r\n\t\t\tob_end_clean();\r\n\t\t\t$output = preg_replace('!>[\\t\\n\\r\\v\\f]+<!m', '><', $output);\r\n\t\t\t$output = preg_replace('!> {2,}<!m', '><', $output);\r\n\t\t\t$output = preg_replace('!>[\\t\\n\\r\\v\\f]+!m', '>', $output);\r\n\t\t\t$output = preg_replace('![\\t\\n\\r\\v\\f]+<!m', '<', $output);\r\n\t\t\t$output = preg_replace('!> {2,}!m', '>', $output);\r\n\t\t\t$output = preg_replace('! {2,}<!m', '<', $output);\r\n\t\t\techo $output;\r\n\t\t} else {\r\n\t\t\trequire $this->_view;\r\n\t\t}\r\n\t\t\r\n\t\t$this->_current_dir = $current_dir;\r\n }", "title": "" }, { "docid": "a930c6fca9ffcfa2faaa6053b37c90f7", "score": "0.51974225", "text": "public static function gZip () {\n #ob_start(ob_gzhandler);\n ob_start();\n ob_implicit_flush(0);\n }", "title": "" }, { "docid": "3f6309241051238f1cf5a70faf6ee7c9", "score": "0.5191228", "text": "public function compress($quality = 75);", "title": "" }, { "docid": "a7780702af5fa17e286b09ea8f377c48", "score": "0.5179516", "text": "public function process(){\r\n\t\t// if the file is found on cache, changes the $this->cachename\r\n\t\t$this->_validates();\r\n\t\t\r\n\t\t$cachefile = CACHE . $this->type . DS . str_replace(array('/','\\\\'), '-', $this->filename);\r\n\t\t\r\n\t\t//the the compressed file either from cache or from using a compressor\r\n\t\tif (file_exists($cachefile)) {\r\n\t\t\t$templateModified = filemtime($this->path . $this->filename);\r\n\t\t\t$cacheModified = filemtime($cachefile);\r\n\t\t\t\r\n\t\t\t//if the file is more recent than the cache, compress it\r\n\t\t\tif ($templateModified > $cacheModified) {\r\n\t\t\t\t$output = $this->_getCompressed();\r\n\t\t\t\t$this->_writeToCache($cachefile, $output);\r\n\t\t\t} else {\r\n\t\t\t\t$output = file_get_contents($cachefile);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$output = $this->_getCompressed();\r\n\t\t\t$this->_writeToCache($cachefile, $output);\r\n\t\t\t$templateModified = time();\r\n\t\t}\r\n\t\t//create the response body and headers\r\n\t\t$this->response->header('Date',date(\"D, j M Y G:i:s \", $templateModified) . 'GMT');\r\n\t\t//set the correct content type\r\n\t\t//$this->response->header('Content-Type',($this->type == Mini::CSS ? \"text/css\" : \"application/x-javascript\"));\r\n\t\t$this->response->type(($this->type == Mini::CSS ? \"text/css\" : \"application/x-javascript\"));\r\n\t\t$this->response->header('Expires', gmdate(\"D, d M Y H:i:s\", time() + DAY) . \" GMT\");\r\n\t\t$this->response->header('Cache-Control','max-age=86400, must-revalidate'); // HTTP/1.1\r\n\t\t$this->response->header('Pragma: cache'); // HTTP/1.0\r\n\t\t$this->response->body($output);\r\n\t\t$this->response->send();\r\n\t}", "title": "" }, { "docid": "0af8842706ca4dc4b9ee1f053ca5a1e2", "score": "0.51737297", "text": "public function finalize() {\n\n /**\n * Call child for template vars fill\n *\n */\n $this->setTemplateVars();\n\n try {\n\n $buffer = ob_get_contents();\n ob_get_clean();\n ob_start( \"ob_gzhandler\" ); // compress page before sending\n $this->nocache();\n\n header( 'Content-Type: text/html; charset=utf-8' );\n\n /**\n * Execute Template Rendering\n */\n echo $this->template->execute();\n\n } catch ( Exception $e ) {\n echo \"<pre>\";\n print_r( $e );\n echo \"\\n\\n\\n\";\n echo \"</pre>\";\n exit;\n }\n\n }", "title": "" }, { "docid": "549e3b5390fb4838a3ab5600904f9d3d", "score": "0.514459", "text": "function generateHtmlOutput($parser) {\r\n\t\tglobal $_ERROR;\r\n\t\tglobal $wgTitle;\r\n\t\tglobal $wgArticlePath;\r\n\r\n\t\t$output = \"\";\r\n\r\n\t\t// <!-- START: CodeBrowser area -->\r\n\t\t$output .= \"<div id=\\\"codebrowser_frame\\\">\\n\";\r\n\t\t\r\n\t\t// <!-- START: CodeBrowser_Form area -->\r\n\t\t$output .= \"<form id = \\\"codebrowser_form\\\" action=\\\"\".$wgTitle->getFullURL().\"\\\" method=\\\"post\\\">\\n\";\r\n\r\n\t\t//\r\n\t\t// Print the error (if there is something to print)\r\n\t\t//\r\n\t\tif(isset($_ERROR) && strlen($_ERROR) > 0)\r\n\t\t{\r\n\t\t\t$output .= \"<div id=\\\"error\\\">\".$_ERROR.\"</div>\\n\";\r\n\t\t}\r\n\r\n\t\t\r\n # <!-- START: CodeBrowser_table -->\r\n\t\t$output .= \"<table class=\\\"codebrowser_table\\\">\\n\";\r\n\r\n\t\t// display breadcrumbs\r\n\t\t$output .= \"<caption>\\n\";\r\n\t\t$output .= $this->generateBreadCrumbs(null);\r\n\t\t$output .= \"</caption>\\n\";\r\n\r\n\t\t\r\n\t\t// generated syntax-highlighted file\r\n\t\tif( isset($_POST['codebrowser_file']) && strlen($_POST['codebrowser_file']) > 0) {\r\n\t\t\t$output .= $this->outputFileHtml($_POST['codebrowser_file'], $parser);\r\n\t\t}\r\n\t\t// else generate code browsing portal\r\n\t\telse {\r\n\t\t\t$this->calculateSpace();\r\n\t\t\t$this->readDir();\r\n\t\t\t$this->sort();\r\n\t\t\t$output .= $this->outputCodeBrowserPortalHtml();\r\n\t\t}\r\n\t\r\n\r\n\t\t// display time to generate page\r\n\t\t$output .= \"<tfoot>\\n\";\r\n\t\t$output .= \"<tr>\\n\";\t\r\n\t\tif($this->refpage != null)\r\n\t\t{\r\n\t\t\t$url = str_replace('$1', $this->refpage, $wgArticlePath);\r\n\r\n\t\t\t$output .= \"<td colspan=\\\"2\\\" align=\\\"left\\\">\\n\";\r\n\t\t\t$output .= $this->getTimeToGenerate();\r\n\t\t\t$output .= \"</td>\\n\";\r\n\t\t\t$output .= \"<td colspan=\\\"2\\\" align=\\\"right\\\">\\n\";\r\n\t\t\t$output .= \"Return to <a class=\\\"refpage\\\" href=\\\"\".$url.\"\\\">\".str_replace(\"_\", \" \", $this->refpage).\"</a>\\n\";\r\n\t\t\t$output .= \"</td>\\n\";\r\n\t\t} else {\r\n\t\t\t$output .= \"<td colspan=\\\"4\\\" align=\\\"left\\\">\\n\";\r\n\t\t\t$output .= $this->getTimeToGenerate();\r\n\t\t\t$output .= \"</td>\\n\";\r\n\t\t\t\t\r\n\t\t}\t\r\n\t\t$output .= \"</tr>\\n\";\r\n\t\t$output .= \"</tfoot>\\n\";\t\t\t\r\n\t\r\n\t\t$output .= \"</table>\\n\";\r\n\t\t// <!-- END: CodeBrowser_table -->\t\t\r\n\t\t\r\n\r\n\t\t$output .= \"<input type=\\\"hidden\\\" id=\\\"codebrowser_dir\\\" name=\\\"codebrowser_dir\\\" value=\\\"\\\" />\\n\";\r\n\t\t$output .= \"<input type=\\\"hidden\\\" id=\\\"codebrowser_file\\\" name=\\\"codebrowser_file\\\" value=\\\"\\\" />\\n\";\r\n\t\t$output .= \"<input type=\\\"hidden\\\" id=\\\"codebrowser_sort_by\\\" name=\\\"codebrowser_sort_by\\\" value=\\\"\\\" />\\n\";\r\n\t\t$output .= \"<input type=\\\"hidden\\\" id=\\\"codebrowser_sort_as\\\" name=\\\"codebrowser_sort_as\\\" value=\\\"\\\" />\\n\";\r\n\t\t$output .= \"<input type=\\\"hidden\\\" id=\\\"codebrowser_lang\\\" name=\\\"codebrowser_lang\\\" value=\\\"\\\" />\\n\";\r\n\t\t$output .= \"</form>\\n\";\r\n\t\t// <!-- END: CodeBrowser_Form area -->\r\n\r\n\t\t\r\n\t\t$output .= \"</div>\\n\";\r\n\t\t// <!-- END: CodeBrowser area -->\r\n\t\t\r\n\t\r\n\t\treturn $output;\r\n\t}", "title": "" }, { "docid": "bb76a6cff3be46fadec33e4d24f94d3e", "score": "0.5140213", "text": "public function gzip(){\n $headers = getallheaders();\n if (strpos($headers[\"Accept-Encoding\"], \"gzip\") === false) return false;\n\n // gzip compression\n $this->file = gzencode($this->file);\n header(\"content-length: \". strlen($this->file));\n header(\"content-encoding: gzip\");\n\n }", "title": "" }, { "docid": "ead2b6f9af96b2d56169eebcb0fb4f17", "score": "0.5136494", "text": "public function getAllHTML($html=array()) {\n\n //get all html\n if ($this->OutputAll\n && sb\\compareboolean($this->OutputAllString,\"true\")\n && $this->OutputHTML) {\n //BEFORE\n foreach($this->BeforeHTML as $htmlline) {\n $lines = explode(\"\\n\", trim($htmlline));\n foreach($lines as $line) {\n //if (!sb\\is_empty($line) {\n //replace [jsid]\n $line = $this->replaceJSIDInString($line);\n\n //add line to html array\n $html[] = $this->getIndent(1) . $line . PHP_EOL;\n //}\n }\n }\n\n //START TAG\n $tag = $this->getHTMLStartTag();\n if ($tag) {\n //replace [jsid]\n $tag = $this->replaceJSIDInString($tag);\n\n $html[] = $this->getIndent() . trim($tag) . PHP_EOL;\n }\n\n //INITIAL\n foreach($this->InitialHTML as $htmlline) {\n $lines = explode(\"\\n\", trim($htmlline));\n foreach($lines as $line) {\n //if (!sb\\is_empty($line)) {\n //replace [jsid]\n $line = $this->replaceJSIDInString($line);\n\n //add line to html array\n $html[] = $this->getIndent(1) . trim($line) . PHP_EOL;\n //}\n }\n }\n\n if ($this->IncludeObjects) {\n foreach($this->Objects as $childobject) {\n if ($childobject && method_exists($childobject, \"getAllHTML\")) {\n $html = $childobject->getAllHTML($html);\n }\n }\n }\n\n //HTML\n foreach($this->HTML as $htmlline) {\n $lines = explode(\"\\n\", $htmlline);\n foreach($lines as $line) {\n if (!sb\\is_empty($line)) {\n //replace [jsid]\n $line = $this->replaceJSIDInString($line);\n\n //add line to html array\n $html[] = $this->getIndent(1) . trim($line) . \"\\n\";\n }\n }\n }\n\n //FINAL\n foreach($this->FinalHTML as $htmlline) {\n $lines = explode(\"\\n\", trim($htmlline));\n foreach($lines as $line) {\n //if (!sb\\is_empty($line)) {\n //replace [jsid]\n $line = $this->replaceJSIDInString($line);\n\n //add line to html array\n $html[] = $this->getIndent(1) . trim($line) . \"\\n\";\n //}\n }\n }\n\n //END TAG\n $tag = $this->getHTMLEndTag();\n if ($tag) {\n if (sb\\comparetext($this->Tagname, \"textarea\")) {\n //geen indentation bij TEXTAREA's\n $html[] = $tag;\n } else {\n $html[] = $this->getIndent() . trim($tag) . \"\\n\";\n }\n }\n\n //AFTER\n foreach($this->AfterHTML as $htmlline) {\n $lines = explode(\"\\n\", trim($htmlline));\n foreach($lines as $line) {\n //if (!sb\\is_empty($line)) {\n //replace [jsid]\n $line = $this->replaceJSIDInString($line);\n\n //add line to html array\n $html[] = $this->getIndent(1) . trim($line) . \"\\n\";\n //}\n }\n }\n }\n\n return $html;\n }", "title": "" }, { "docid": "45566dd4a50a48f71fa78cdd70387087", "score": "0.5135878", "text": "function optimizeHtmlCode($input)\n {\n// all those in here are in use, but not tested all the way, i.e. what happens with compares in JS/PHP using < or >\"\n\n // make lines at least 100 characters long\n// dont know hoe yet...\n// $input = preg_replace('/((.*)\\n(.*)){100,}/Us','$2 $3',$input);\n\n // removes new lines before > and />\n // this only works for tags where there are no PHP tags inside :-(\n $input = preg_replace('/\\n([\\/>])/U','$1',$input);\n\n // concatenates HTML tags which are spread over many lines,\n // and replace spaces which are before and after the new line by one space only\n // this only works for tags where there are no PHP tags inside :-(\n $input = preg_replace('/<(.*)\\n(.*)>/U','<$1 $2>',$input);\n\n // remove only spaces between > and <\n // not the newlines, because this is supposed to be done before in this method\n $input = preg_replace('/>(\\040)*</U','><',$input);\n\n return $input;\n }", "title": "" }, { "docid": "a9e7a37b98fd0dfb393ab4807b16f47c", "score": "0.51334363", "text": "abstract function toHTML();", "title": "" }, { "docid": "05e91597320e3d72709ff8ef9235b157", "score": "0.51280516", "text": "public function getHTML();", "title": "" }, { "docid": "05e91597320e3d72709ff8ef9235b157", "score": "0.51280516", "text": "public function getHTML();", "title": "" }, { "docid": "19315de404d77c8df10ea8087be36dd8", "score": "0.5121147", "text": "function mfcs_output_print_page_view($html, $parameters = array()) {\n if (!is_string($html)) {\n cf_error::invalid_string('html');\n return FALSE;\n }\n\n if (!is_array($parameters)) {\n cf_error::invalid_array('parameters');\n return FALSE;\n }\n\n global $base_url;\n global $base_path;\n\n // determine the number of directories in the base path so that they can be stripped out properly.\n $base_path_count = count(explode('/', $base_path));\n $css_path_0 = $base_path_count;\n $css_path_1 = $base_path_count + 1;\n $css_path_2 = $base_path_count + 2;\n $css_path_3 = $base_path_count + 3;\n\n // Reconstruct the HTML output.\n $cf_dom = new cf_dom(TRUE, TRUE, TRUE, $html);\n\n $meta_tags = $cf_dom->get_body()->getElementsByTagName('meta');\n $style_tags = $cf_dom->get_body()->getElementsByTagName('style');\n $link_tags = $cf_dom->get_body()->getElementsByTagName('link');\n $title_tags = $cf_dom->get_body()->getElementsByTagName('title');\n $main_tag = $cf_dom->get_dom()->getElementById('mcneese-content-main');\n\n $head_markup = '';\n $body_markup = '';\n $css_markup = '';\n\n // meta tags\n foreach ($meta_tags as $tag) {\n $head_markup .= $cf_dom->get_dom()->saveHTML($tag) . \"\\n\";\n }\n\n // style tags\n foreach ($style_tags as $tag) {\n // drupal generates css styles using @import, remove all of these.\n $matched = array();\n $matches = preg_match_all('/@import url\\(\"([^\"]*)/i', $tag->nodeValue, $matched);\n\n $media = NULL;\n if ($tag->hasAttribute('media')) {\n $media = $tag->getAttribute('media');\n }\n if (empty($media)) {\n $media = 'all';\n }\n\n if ($matches > 0) {\n if ($media == 'all' || $media == 'print,embossed,tv' || $media == 'print') {\n $match = array_pop($matched);\n\n foreach ($match as $m) {\n // skip past css uneeded css\n if ($media == 'all') {\n $parts = explode('/', $m);\n if (!isset($parts[$css_path_1])) {\n continue;\n }\n if ($parts[$css_path_0] == 'system') {\n }\n\n if (isset($parts[$css_path_2])) {\n if ($parts[$css_path_2] == 'mcneese') {\n }\n elseif ($parts[$css_path_2] == 'mcneese_fcs') {\n }\n elseif ($parts[$css_path_2] == 'mfcs') {\n }\n else {\n continue;\n }\n }\n }\n\n $fixed_path = preg_replace('/\\?.*$/i', '', $m);\n $parts = explode('/', $fixed_path);\n\n $bpc = 2;\n while ($bpc <= $base_path_count) {\n array_shift($parts);\n $bpc++;\n }\n\n $fixed_path = implode('/', $parts);\n $content = drupal_load_stylesheet(DRUPAL_ROOT . '/' . $fixed_path);\n\n if (!empty($content)) {\n $css_markup .= $content;\n }\n\n unset($content);\n unset($parts);\n unset($fixed_path);\n }\n }\n }\n else {\n $head_markup .= $cf_dom->get_dom()->saveHTML($tag) . \"\\n\";\n }\n }\n\n if (!empty($css_markup)) {\n $head_markup .= '<style>' . $css_markup . '</style>';\n }\n\n // link tags\n foreach ($link_tags as $tag) {\n $head_markup .= $cf_dom->get_dom()->saveHTML($tag) . \"\\n\";\n }\n\n // title tags\n if (empty($parameters['page_title'])) {\n if ($parameters['page_title'] === FALSE) {\n $page_title = FALSE;\n }\n else {\n $page_title = 'Facilities Use Request';\n }\n }\n else {\n $page_title = $parameters['page_title'];\n }\n\n if (empty($parameters['title'])) {\n if (empty($parameters['page_title'])) {\n $head_markup .= '<title>Request</title>';\n }\n else {\n $head_markup .= '<title>' . $page_title . '</title>';\n }\n }\n else {\n $head_markup .= '<title>' . $parameters['title'] . '</title>';\n }\n\n $body_markup .= $cf_dom->get_dom()->saveHTML($main_tag);\n\n $body_class = 'mcneese';\n $cf = &drupal_static('cf_theme_get_variables', array());\n if (isset($cf['markup_css']['body']['class'])) {\n $body_class .= $cf['markup_css']['body']['class'];\n }\n\n if (!empty($parameters['body_class']) && is_array($parameters['body_class'])) {\n $body_class .= ' ' . implode(' ', $parameters['body_class']);\n }\n\n $html = '<!DOCTYPE html>' . \"\\n\";\n $html .= '<html lang=\"en\" dir=\"ltr\">';\n\n $html .= '<head>' . $head_markup . '</head>';\n $html .= '<body class=\"' . $body_class . '\">';\n $html .= ' <div id=\"mcneese-page\" class=\"mcneese-page\">';\n $html .= ' <div id=\"mcneese-page-content\" class=\"mcneese-content full\" role=\"main\">';\n\n if ($page_title !== FALSE) {\n $html .= ' <header class=\"page-title html_tag-header\">';\n $html .= ' <hgroup class=\"html_tag-hgroup\">';\n $html .= ' <h1 class=\"page-title html_tag-heading\" role=\"main\">' . $page_title . '</h1>';\n $html .= ' </hgroup>';\n $html .= ' </header>';\n }\n\n $html .= ' ' . $body_markup;\n $html .= ' </div>';\n $html .= ' </div>';\n $html .= '</body>';\n $html .= '</html>';\n\n // Workaround: relative paths are not always working so change them to absolute paths.\n $html = preg_replace('|<img([^>]*) src=\"/fcs/|i', '<img$1 src=\"' . $base_url . '/', $html);\n $html = preg_replace('|<a([^>]*) href=\"/fcs/|i', '<a$1 href=\"' . $base_url . '/', $html);\n $html = preg_replace('|<link([^>]*) href=\"/fcs/|i', '<link$1 href=\"' . $base_url . '/', $html);\n\n return $html;\n}", "title": "" }, { "docid": "6ab2d29387ad97eee1abc1f738eb6c97", "score": "0.511327", "text": "function remove_bloat($page)\r\n{\r\n\t$page = preg_replace(\"@<script[^>]*?>.*?</script>@si\",\"\",$page); //no scripts\r\n\t$page = preg_replace('%<iframe.+?</iframe>%is', '', $page); //no iframes\r\n\t\r\n\t//$page = str_replace('&nbsp;Anonymous Download', '', $page);\r\n\t\r\n\t//fake ssl search bar\r\n\t//$page = str_replace('<input type=\"search\" class=\"inputbox\" title=\"Pirate Search\" name=\"q\" placeholder=\"Search here...\" value=\"\" /><input value=\"Pirate Search\" type=\"submit\" class=\"submitbutton\" />', '<input type=\"search\" title=\"Pirate Search\" name=\"q\" required placeholder=\"Search here...\" value=\"\" style=\"background-color:#ffffe0;\" class=\"searchBox\" /><input value=\"Pirate Search\" type=\"submit\" class=\"submitbutton\" />', $page);\r\n\r\n\t//Designfix\r\n\t//$page = str_replace(\"Get this torrent\", \"DOWNLOAD TORRENT\", $page);\r\n\t//$page = str_replace('<div style=\"clear:both;\">(Problems with magnets links are fixed by upgrading your <a href=\"http://bitfalcon.tv\" target=\"_blank\">torrent client</a>!)</div>', '', $page);\r\n\t\r\n\t//SearchFix\r\n\t$page = str_replace(\"/s/\", \"/search.php\", $page);\r\n\t\r\n\t//CharFix\r\n\t$page = str_replace('<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>', '<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">', $page);\r\n\t$page = str_replace('amp;', '', $page);\r\n\r\n\t//Fix static link\r\n\t$page = str_replace(\"http://static.thepiratebay.se\", \"static\", $page);\r\n\t$page = str_replace('https://static.thepiratebay.se', '/static', $page);\r\n\t$page = str_replace(\"//static.thepiratebay.se\", \"static\", $page);\r\n\t$page = str_replace(\"//static.thepiratebay.org\", \"static\", $page);\r\n\t$page = str_replace(\"http://torrents.thepiratebay.se/\", \"gettorrent.php?torrent=\", $page);\r\n\t$page = str_replace(\"//torrents.thepiratebay.se/\", \"gettorrent.php?torrent=\", $page);\r\n\t$page = str_replace(\"https://thepiratebay.se\", \"http://anonymous.rs\", $page); //change this\r\n\t$page = str_replace(\"http://thepiratebay.se\", \"http://anonymous.rs\", $page); //change this\r\n\t$page = str_replace(\"http://thepiratebay.org\", \"http://anonymous.rs\", $page); //change this\r\n\t$page = str_replace(\"https://thepiratebay.org\", \"http://anonymous.rs\", $page); //change this\r\n\t\r\n\t//Proxy the images\r\n\t//$page = str_replace(\"image.bayimg.com/\",\"/img.php?i=\", $page);\r\n\t//$page = str_replace(\"proxy.bayimg.com/\",\"/img.php?i=\", $page);\r\n\t\r\n\t//RSS Proxy fix\r\n\t$page = str_replace(\"http://rss.thepiratebay.se/\", \"/rss.php?id=\", $page);\r\n\t$page = str_replace(\"//rss.194.71.107.164/\", \"//anonymous.rs/rss.php?id=\", $page); //change this\r\n\t\r\n\t//hide links that is not needed\r\n\t\r\n\t//$page = str_replace('<p id=\"footer\" style=\"color:#666; font-size:0.9em; \">', '<p id=\"footer\" style=\"color:#666; font-size:0.9em; display: none;\">', $page); //hide stats in the footer\r\n\t//$page = str_replace('<p>', '<p style=\"display: none;\">', $page); //hide links in the footer\r\n\r\n\t//hide bitcoin-litecoin-rss adresses\r\n\t//$page = str_replace('<br /><a href=\"http://bitcoin.org\" target=\"_NEW\">BitCoin</a>: <b><a href=\"bitcoin:1KeBs4HBQzkdHC2ou3gpyGHqcL7aKzwTve\">1KeBs4HBQzkdHC2ou3gpyGHqcL7aKzwTve</a></b><br /><a href=\"http://litecoin.org\" target=\"_NEW\">LiteCoin</a>: <a href=\"litecoin:LiYp3Dg11N5BgV8qKW42ubSZXFmjDByjoV\">LiYp3Dg11N5BgV8qKW42ubSZXFmjDByjoV</a><br /><br />', '', $page);\r\n\t\r\n\t//No rss footer\r\n\t//$page = str_replace('<a href=\"/rss\" class=\"rss\" title=\"RSS\"><img src=\"/static/img/rss_small.gif\" alt=\"RSS\" /></a>', '', $page);\r\n\t//$page = str_replace('<span title=\"You are using SSL\"><img src=\"/static/img/icon-https.gif\"/></span>', '', $page);\r\n\t\r\n\t//dns prefetch\r\n\t//$page = str_replace('<link rel=\"dns-prefetch\" href=\"//cdn1.adexprt.com/\">', '<link rel=\"dns-prefetch\" href=\"//thepiratebay.se/\">', $page);\r\n\t//$page = str_replace('<link rel=\"dns-prefetch\" href=\"//cdn2.adexprt.com/\">', '<link rel=\"dns-prefetch\" href=\"//anonymous.rs/\">', $page);\r\n\t//$page = str_replace('<link rel=\"dns-prefetch\" href=\"//cdn3.adexprt.com/\">', '<link rel=\"dns-prefetch\" href=\"//thepiratebay.se/\">', $page);\r\n\t//$page = str_replace('<link rel=\"dns-prefetch\" href=\"//cdn3.adexprts.com/\">', '<link rel=\"dns-prefetch\" href=\"//anonymous.rs/\">', $page);\r\n\t//$page = str_replace('<link rel=\"dns-prefetch\" href=\"//0427d7.se/\">', '<link rel=\"dns-prefetch\" href=\"//anonymous.rs/\">', $page);\r\n\t//$page = str_replace('<link rel=\"dns-prefetch\" href=\"//syndication.exoclick.com/\">', '<link rel=\"dns-prefetch\" href=\"//thepiratebay.se/\">', $page);\r\n\t//$page = str_replace('<link rel=\"dns-prefetch\" href=\"//main.exoclick.com/\">', '<link rel=\"dns-prefetch\" href=\"//anonymous.rs/\">', $page);\r\n\t//$page = str_replace('<link rel=\"dns-prefetch\" href=\"//cdn.bitfalcon.tv/\">', '<link rel=\"dns-prefetch\" href=\"//thepiratebay.se/\">', $page);\r\n\t\r\n\t//ADS\r\n\t//$page = str_replace(\"<body>\", \"<body>\", $page);\r\n\t//$page = str_replace(\"</body>\", \"</body>\", $page);\r\n\t\r\n\t//Switch view not yet supported\r\n\t$page = str_replace(\"<a href=\\\"/switchview.php?view=s\\\">Single</a>\", \"<a href=\\\"#\\\" onClick=\\\"alert('This feature is not yet supported.')\\\">Single</a>\", $page);\r\n\t$page = str_replace(\"<div class=\\\"detailartist\\\"\", \"<div class=\\\"detailartist\\\" style=\\\"display:none; visibility:hidden;\\\"\", $page);\r\n\t//Remove detailed artist info that doesnt work\r\n\t$page = str_replace(\"ajax_details_artinfo.php\", \"\", $page);\r\n\treturn $page;\r\n}", "title": "" }, { "docid": "ed6192695407d2b30f0c8ddcfb6472a3", "score": "0.5105127", "text": "public static function html() {\n\t\t// No header.\n\t}", "title": "" }, { "docid": "ff45bc5cd2b3cf32fbd8300a3cd857f5", "score": "0.51038337", "text": "function aDBc_print_page_content(){\n\n\t\tinclude_once 'page_custom_clean.php';\n\t}", "title": "" }, { "docid": "fc406c6742e7353da68c27e9e15eb139", "score": "0.5085602", "text": "public function output($options = ['compress' => 1]);", "title": "" }, { "docid": "527a90aabedca9dfe1c8417e471424cd", "score": "0.5082908", "text": "function gkp_html_minyfy_finish( $html ) {\n // sauf les commentaires conditionnels pour IE\n $html = preg_replace('/<!--(?!s*(?:[if [^]]+]|!|>))(?:(?!-->).)*-->/s', '', $html);\n\n // Suppression des espaces vides\n $html = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\", \"\\t\"), '', $html);\n while ( stristr($html, ' '))\n $html = str_replace(' ', ' ', $html);\n return $html;\n\n}", "title": "" }, { "docid": "266ca3ce6a0d63815031bffb4637ea21", "score": "0.5079409", "text": "function page_init() {\r\n\t// start buffering the output \r\n\tob_start();\r\n}", "title": "" }, { "docid": "d2893e45fdfcc11d28758149e818e7fb", "score": "0.5071981", "text": "private function generate_html($file_name)\n\t{\n\t\t$res = \"\";\n\t\t$path = $_SERVER['DOCUMENT_ROOT'].\"/\";\n\t\t$host_url = $this->admin_header->host_url();\n\n\t\t//$url = $host_url . '/zcms/' . $file_name;\n\t\techo $url = $host_url . $file_name; die;\n\n\t\tif(strpos($file_name,'.html')) :\n\n\t\t\tif(file_exists($path.$file_name)) :\n\n\t\t\t\tif($file_name != 'index.php') :\t\t\t \t\n\t\t\t\t\t unlink($path.$file_name);\n\t\t\t\tendif;\n\t\t\t\n\t\t\tendif;\t\t\t\n\n\t\t\tif ($file_name == \"index.php\") :\n\t\t\t\t$res = file_put_contents($path.'index.html',file_get_contents($url)) or die('no permission');\n\t\t\telse :\n\t\t\t\t$res = file_put_contents($path.$file_name,file_get_contents($url)) or die('no permission');\n\t\t\tendif;\n\n\t\tendif;\n\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "6b544b7c5b4161256ea47a0e4706b0f1", "score": "0.5067005", "text": "function WriteHTML($html, $bi)\n {\n $this->bi = $bi;\n if ($bi)\n $html = strip_tags($html, \"<a><img><p><br><font><tr><blockquote><h1><h2><h3><h4><pre><red><blue><ul><li><hr><b><i><u><strong><em>\");\n else\n $html = strip_tags($html, \"<a><img><p><br><font><tr><blockquote><h1><h2><h3><h4><pre><red><blue><ul><li><hr>\");\n $html = str_replace(\"\\n\", ' ', $html); //replace carriage returns with spaces\n // debug\n if ($this->debug) {\n echo $html;\n exit;\n }\n\n $html = str_replace('&trade;', '™', $html);\n $html = str_replace('&copy;', '©', $html);\n $html = str_replace('&euro;', '€', $html);\n\n $a = preg_split('/<(.*)>/U', $html, -1, PREG_SPLIT_DELIM_CAPTURE);\n $skip = false;\n foreach ($a as $i => $e) {\n if (!$skip) {\n if ($this->HREF)\n $e = str_replace(\"\\n\", \"\", str_replace(\"\\r\", \"\", $e));\n if ($i % 2 == 0) {\n // new line\n if ($this->PRE)\n $e = str_replace(\"\\r\", \"\\n\", $e);\n else\n $e = str_replace(\"\\r\", \"\", $e);\n //Text\n if ($this->HREF) {\n $this->PutLink($this->HREF, $e);\n $skip = true;\n } else\n $this->Write(5, stripslashes(txtentities($e)));\n } else {\n //Tag\n if (substr(trim($e), 0, 1) == '/')\n $this->CloseTag(strtoupper(substr($e, strpos($e, '/'))));\n else {\n //Extract attributes\n $a2 = explode(' ', $e);\n $tag = strtoupper(array_shift($a2));\n $attr = array();\n foreach ($a2 as $v) {\n if (preg_match('/([^=]*)=[\"\\']?([^\"\\']*)/', $v, $a3))\n $attr[strtoupper($a3[1])] = $a3[2];\n }\n $this->OpenTag($tag, $attr);\n }\n }\n } else {\n $this->HREF = '';\n $skip = false;\n }\n }\n }", "title": "" }, { "docid": "7b64071052292bf1617a809ec416afb2", "score": "0.5050163", "text": "public function postDispatch(Zend_Controller_Request_Abstract $request)\n {\n parent::postDispatch($request);\n\n $response = $this->getResponse();\n\n\n $layout = $this->getLayout();\n\n if ($layout->getCompressHtml()) {\n\n $chain = new Zend_Filter();\n\n $htmlFilter = new App_Filter_Compressor_Html($layout->getCompressCss(), $layout->getCompressJs());\n $chain->addFilter($htmlFilter);\n\n $body = $chain->filter($response->getBody());\n $response->setBody($body);\n }\n\n }", "title": "" }, { "docid": "791f579d3040b7e1aa2be3073b27f694", "score": "0.5045614", "text": "function toXhtml($compressed = true, $level = 0) {\n if ($compressed == false) {\n $nl = \"\\n\";\n $tab = \" \";\n $indent = str_pad(\"\", ($level * 4));\n } else {\n $nl = \"\";\n $tab = \"\";\n $indent = \"\";\n }\n $html = $indent . '<img' . $this->attributesToHtml() . $this->cssToHtml() . ' />';\n return $html;\n }", "title": "" }, { "docid": "cfb3159b180272a6ad2f3dd4ceaed9fa", "score": "0.50432885", "text": "public function get_content_html() {\n\n\t}", "title": "" }, { "docid": "c21dc0bdd7219e845e46ec948c28a071", "score": "0.50377846", "text": "public function crawl14(){\n // http://stackoverflow.com/questions/38301501/how-to-scrape-html-content-of-div-using-all-matched-class\n $html = new \\DOMDocument();\n @$html->loadHtmlFile('http://php.net/manual/de/domdocument.savehtml.php');\n $xpath = new \\DOMXPath( $html );\n $nodelist = $xpath->query( '//footer' );\n foreach ($nodelist as $n){\n echo $html->saveHtml($n).\"<br />\";\n }\n }", "title": "" }, { "docid": "082f33d04defd373c362c196f2018acc", "score": "0.5035583", "text": "static function returnHtml($html)\n {\n header('Content-type: text/html; charset=UTF-8');\n echo $html;\n }", "title": "" }, { "docid": "36740ba4bd95dd1f1bc8f3d430275a43", "score": "0.50308186", "text": "function show_page($journal_page){\n\t\t// Load the output into a DOMDocument for modification\n\t\t$pageEncoding = 'UTF-8';\n\t\t$doc = new DOMDocument();\n\t\t$doc->loadHTML('<?xml encoding=\"'.$pageEncoding.'\">' . $journal_page->output);\n\n\t\t$this->make_links_local($doc);\n\t\t$this->clean_html($doc);\n\n\t\techo $doc->saveHTML();\n\t}", "title": "" }, { "docid": "5a79231fabd7d95510cf74562f915f5b", "score": "0.5027956", "text": "function compress($js) {\r\n\t$newjs = array();\r\n\tforeach ($js as $line) {\r\n\t\tif (strpos($line, \"//\") !== false) $line = substr($line, 0, strpos($line, \"//\"));\r\n\t\t$line = trim($line);\r\n\t\tif ($line != \"\") $newjs[] = $line;\r\n\t}\r\n\t$jsstr = implode(\"\\t\\n\", $newjs);\r\n\t$jsstr = preg_replace(\"!\\s*/\\*.*?\\*/\\s*!s\", \"\\n\", $jsstr);\r\n\t$js = explode(\"\\t\", $jsstr);\r\n\treturn $js;\r\n}", "title": "" }, { "docid": "24e8a9030ff6f7fc82409869cfe34a81", "score": "0.5027267", "text": "function toHtml($compressed = true, $level = 0)\n {\n $html = $this->toXhtml($compressed, $level);\n return $html;\n }", "title": "" }, { "docid": "f20ab7053e5f2d719d6fb51eb8ef101a", "score": "0.5023353", "text": "function export_html_dom($page, $image_url)\n{\n\tglobal $config;\n\t\n\t$doc = new DOMDocument('1.0');\n\n\t$scale = $config['image_width']/$page->bbox[2];\n\t\n\t$html = $doc->appendChild($doc->createElement('html'));\n\t$head = $html->appendChild($doc->createElement('head'));\n\n\t$meta = $head->appendChild($doc->createElement('meta'));\n\t$meta->setAttribute('charset', 'utf-8');\n\t\n\t$meta = $head->appendChild($doc->createElement('meta'));\n\t$meta->setAttribute('name', 'ocr-capabilities');\n\t$meta->setAttribute('content', 'ocr_carea ocr_line ocr_page ocr_par');\n\t\n\t$style = $head->appendChild($doc->createElement('style'));\n\t$style->setAttribute('type', 'text/css');\n\t\n\t$style_text = '\n\tbody {\n\t margin:0px;\n\t padding:0px;\n\t background-color: #E9E9E9;\n\t}\n\t\n\t.ocr_page {\n\t\tbackground-color: white;\n\t\t/* box-shadow:2px 2px 10px #aaaaaa; */\n\t\t/* border:1px solid black; */\n\t\tposition:relative;\n\t\t/* left: 20px;\n\t\ttop: 20px; */\n\t\twidth: ' . ($scale * $page->bbox[2]) . 'px;\n\t\theight: ' . ($scale * $page->bbox[1]) . 'px;\n\t}\n\t\n\t/* http://blog.vjeux.com/2011/css/css-one-line-justify.html */\n\t/* This ensures single line of text is justified */\n.ocr_line {\n text-align: justify;\n}\n.ocr_line:after {\n content: \"\";\n display: inline-block;\n width: 100%;\n}';\n\t$style->appendChild($doc->createTextNode($style_text));\n\t\n\t$body = $html->appendChild($doc->createElement('body'));\n\t$body->appendChild($doc->createComment('page'));\n\t\n\t$ocr_page = $body->appendChild($doc->createElement('div'));\n\t$ocr_page->setAttribute('class', 'ocr_page');\n\t$ocr_page->setAttribute('title', \n\t\t'bbox 0 0 ' . ($scale * $page->bbox[2]) . ' ' . ($scale * $page->bbox[1])\n\t\t. '; image ' . $image_url\n\t\t);\n\n\tforeach ($page->regions as $region)\n\t{\n\t\t$ocr_page->appendChild($doc->createComment('region'));\t\n\t\t$ocr_carea = $ocr_page->appendChild($doc->createElement('div'));\n\t\t$ocr_carea->setAttribute('class', 'ocr_carea');\t\n\t\t\n\t\tforeach ($region->paragraphs as $paragraph)\n\t\t{\n\t\t\t$ocr_carea->appendChild($doc->createComment('paragraph'));\t\n\t\t\t$ocr_par = $ocr_carea->appendChild($doc->createElement('div'));\n\t\t\t$ocr_par->setAttribute('class', 'ocr_par');\t\n\t\t\t\n\t\t\t// font height\n\t\t\t$fontsize = 0;\n\t\t\t\n\t\t\t// Compute font height based on capheight of font\n\t\t\t// e.g for Times New Roman we divide by 0.662\n\t\t\tif (isset($paragraph->fontmetrics->capheight))\n\t\t\t{\n\t\t\t\t$fontsize = $paragraph->fontmetrics->capheight/0.662;\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$linespacing = $paragraph->fontmetrics->linespacing;\n\t\t\tif ($linespacing != -1)\n\t\t\t{\n\t\t\t\t$linespacing = round($linespacing/$page->dpi * 72);\n\t\t\t\t$ocr_par->appendChild($doc->createComment($linespacing . 'pt'));\n\t\t\t}\n\t\t\t\t\n\t\t\t$fontsize *= $scale;\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t// text\n\t\t\tforeach ($paragraph->lines as $line)\n\t\t\t{\n\t\t\t\t$ocr_par->appendChild($doc->createComment('line'));\t\n\t\t\t\t$ocr_line = $ocr_par->appendChild($doc->createElement('div'));\n\t\t\t\t$ocr_line->setAttribute('class', 'ocr_line');\t\n\n\t\t\t\t$ocr_line->setAttribute('contenteditable', 'true');\t\n\t\t\t\t$ocr_line->setAttribute('class', 'ocr_line');\t\n\t\t\t\t$ocr_line->setAttribute('style', 'font-size:' . $fontsize . 'px;line-height:' . $fontsize . 'px;position:absolute;left:' . ($line->bbox[0] * $scale) . 'px;top:' . ($line->bbox[3] * $scale) . 'px;min-width:' . ($scale *($line->bbox[2] - $line->bbox[0])) . 'px;height:' . ($scale *($line->bbox[1] - $line->bbox[3])) . 'px;');\t\n\t\t\t\t\n\t\t\t\t// hOCR\n\t\t\t\t$ocr_line->setAttribute('title', 'bbox ' . ($line->bbox[0] * $scale) . ' ' . ($line->bbox[3] * $scale) . ' ' . ($scale *$line->bbox[2]) . ' ' . ($scale *$line->bbox[1]) );\t\t\t\t\t\n\t\t\t\n\t\t\t\t$ocr_line->appendChild($doc->createTextNode($line->text));\n\t\t\t\n\t\t\t}\n\t\t}\t\t\n\t}\n\n\treturn $doc->saveHTML();\n}", "title": "" }, { "docid": "c2795098090ae6e880089ac248c9b1fe", "score": "0.5011106", "text": "function publish($configfile,$quiet=false){\n\t// compress data\n\tinclude $configfile;\n\t$total_pages=0;\n\t$approved_pages=0;\n\t$lw_path=getcwd().\"/lightweb\".\"/\";\n\t$lw_publish_version=$lw_path.\"publish_version/\";\n\t$lw_locales=$lw_path.\"locales/\";\n\t$lw_pages=$lw_path.\"webpages/\";\n\t$lw_pages_headers=$lw_path.\"headers/\";\n\t$lw_pages_footers=$lw_path\t.\"footers/\";\n\t$phpexecutor_path=getcwd().\"/cgi\".\"/\";\n\t$sitemap = sitemap_header();\n\t$githubrepo=\"https://raw.githubusercontent.com/ruvenss/lightweb/master/\";\n\t$outputhtmlfile=\"index.html\";\n\t$subpages=array();\n\t// Preparing basic structure for publishing\n\tif (file_exists($lw_publish_version)) {\n\t\t// Delete all content\n\t\t$e=\"rm -rf \".$lw_publish_version;\n\t\texec($e);\n\t\t//die($e);\n\t}\n\tif (!file_exists($lw_publish_version)) {\n\t\tmkdir($lw_publish_version);\n\t\t$publised_index=file_get_contents($githubrepo.\"published_index.php\");\n\t\t$published_index.='\n$languages=array(\"'.implode('\",\"', $languages).'\");\nif (isset($_SERVER[\"HTTP_ACCEPT_LANGUAGE\"])){\n\t$browser_lang = substr($_SERVER[\"HTTP_ACCEPT_LANGUAGE\"], 0, 2);\n} else {\n\t$browser_lang = $languages[0];\n}\nheader(\"Location: '.$publicsite.'/\".$browser_lang);\n';\n\t\tfile_put_contents($lw_publish_version.\"index.php\", $publised_index);\n\t}\n\t// htaccess\n\t$htaccess='RewriteEngine Off\nOptions -Indexes\nErrorDocument 404 '.$publicsite.'/'.$languages[0].'/'.\"404\".'/';\n\tfile_put_contents($lw_publish_version.\".htaccess\", $htaccess);\n\tfor ($i=0; $i < sizeof($languages); $i++) {\n\t\tif (!file_exists($lw_publish_version.$languages[$i])) { mkdir($lw_publish_version.$languages[$i]); }\n\t}\n\t// collection pages\n\t// Home Page\n\tif (file_exists(\"lightweb/webpages/home.html\")){\n\t\t$total_pages=1;\n\t\t$pageconfig=array();\n\t\tfor ($i=0; $i < sizeof($languages); $i++) {\n\t\t\t$pageconfig=getpageconfig($lw_pages.\"home\",$languages[$i],\"\");\n\t\t\tif ($pageconfig['published']===\"true\") {\n\t\t\t\t$approved_pages=1;\n\t\t\t\t$page=\"home\";\n\t\t\t\t$browser_lang=$languages[$i];\n\t\t\t\t$homepage_content=displayPage(false,$subpages,$lw_path,$lw_locales,$lw_pages,$lw_pages_headers,$lw_pages_footers,$page,$browser_lang,$pageconfig['header'],$pageconfig['footer'],$pageconfig['description'],$pageconfig['title'],$pageconfig['subtitle'],$pageconfig['keywords'],$pageconfig['summary'],$pageconfig['category'],$pageconfig['subject'],$pageconfig['topic'],$pageconfig['ogimage']);\n\t\t\t\tif ($pageconfig['minify']===\"true\") {\n\t\t\t\t\t$homepage_content=minify($homepage_content);\n\t\t\t\t}\n\t\t\t\tif (strlen($homepage_content)){\n\t\t\t\t\t$homepage_path=$lw_publish_version.$languages[$i].\"/index.html\";\n\t\t\t\t\t//if (sizeof($homepage_content)) {\n\t\t\t\t\t\tfile_put_contents($homepage_path, $homepage_content);\n\t\t\t\t\t//}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$LastUpdateDate=date(\"Y-m-d\", filemtime(\"lightweb/webpages/home.html\"));\n\t\t$sitemap.= sitemap_url($publicsite,$languages,\"\",$LastUpdateDate,\"1.0\");\n\t}\n\t// Other Base Structure files and directories\n\t$fileslevel0 = scandir(getcwd());\n\tif (sizeof($fileslevel0)){\n\t\tfor ($i=0; $i < sizeof($fileslevel0); $i++) { \n\t\t\tswitch ($fileslevel0[$i]) {\n\t\t\t\tcase '.':\n\t\t\t\tcase '..':\n\t\t\t\tcase 'index.php':\n\t\t\t\tcase 'install.html':\n\t\t\t\tcase 'config-sample.php':\n\t\t\t\tcase 'cmsfunctions.php':\n\t\t\t\tcase '.htaccess':\n\t\t\t\tcase 'errorslog.log':\n\t\t\t\tcase 'errors.log':\n\t\t\t\tcase 'composer.json':\n\t\t\t\tcase 'composer.lock':\n\t\t\t\tcase 'lightweb':\n\t\t\t\tcase '.git':\n\t\t\t\t\t# do nothing\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\t# Copy file and directory\n\t\t\t\t\tif(is_link(getcwd().'/'.$fileslevel0[$i])) {\n\t\t\t\t\t\t//echo \"\\r\\n<br>\".getcwd().'/'.$fileslevel0[$i].\" IS SYMLINK\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$copyexec='cp -p -R '.getcwd().'/'.$fileslevel0[$i].' '.$lw_publish_version.$fileslevel0[$i];\n\t\t\t\t\t\t//echo \"\\r\\n<br>\".$copyexec;\n\t\t\t\t\t}\n\t\t\t\t\texec($copyexec);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t//print_r($fileslevel0);\n\t\t//die();\n\t}\n\t// Start tree structure\n\t$foldertree=listFolders(\"lightweb/webpages\");\n\t//print_r($foldertree);\n\t//die();\n\tif (sizeof($foldertree)){\n\t\tfor ($f1=0; $f1 < sizeof($foldertree); $f1++) { \n\t\t\tif (sizeof($foldertree[$f1])==1) {\n\t\t\t\t$firstbranch = $foldertree[$f1];\n\t\t\t\tforeach ($firstbranch as $key => $value) {\n\t\t\t\t\t$foldername=$key;\n\t\t\t\t\t// Creating first level Folder Structure\n\t\t\t\t\t//print_r($foldername);\n\t\t\t\t\tswitch ($foldername) {\n\t\t\t\t\t\tcase '.git':\n\t\t\t\t\t\tcase 'images':\n\t\t\t\t\t\tcase 'img':\n\t\t\t\t\t\tcase 'wp-login':\n\t\t\t\t\t\tcase 'wp-login':\n\t\t\t\t\t\tcase 'wp-content':\n\t\t\t\t\t\tcase 'phpmyadmin':\n\t\t\t\t\t\tcase 'admin':\n\t\t\t\t\t\t\t# Do Nothing\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$total_pages=$total_pages+1;\n\t\t\t\t\t\t\t//echo \"|_LEVEL 1<br>\\r\\n\";\n\t\t\t\t\t\t\t// Level 1\n\t\t\t\t\t\t\tfor ($languages_folder=0; $languages_folder < sizeof($languages); $languages_folder++) {\n\t\t\t\t\t\t\t\tif (!file_exists($lw_publish_version.$languages[$languages_folder].\"/\".$foldername)){\n\t\t\t\t\t\t\t\t\t$levelpath0=$lw_publish_version.$languages[$languages_folder].\"/\".$foldername;\n\t\t\t\t\t\t\t\t\tmkdir($levelpath0);\n\t\t\t\t\t\t\t\t\t$browser_lang = $languages[$languages_folder];\n\t\t\t\t\t\t\t\t\t$homepage_path = $levelpath0.\"/index.html\";\n\t\t\t\t\t\t\t\t\t$pageconfig=getpageconfig($lw_pages.$foldername.\"/\",$languages[$languages_folder],$foldername);\n\t\t\t\t\t\t\t\t\tif ($pageconfig['published']===\"true\") {\n\t\t\t\t\t\t\t\t\t\t$LastUpdateDate=date(\"Y-m-d\", filemtime(\"lightweb/webpages/\".$foldername.\"/\".$foldername.\".html\"));\n\t\t\t\t\t\t\t\t\t\t$homepage_content=displayPage(false,$subpages,$lw_path,$lw_locales,$lw_pages,$lw_pages_headers,$lw_pages_footers,$foldername,$browser_lang,$pageconfig['header'],$pageconfig['footer'],$pageconfig['description'],$pageconfig['title'],$pageconfig['subtitle'],$pageconfig['keywords'],$pageconfig['summary'],$pageconfig['category'],$pageconfig['subject'],$pageconfig['topic'],$pageconfig['ogimage']);\n\t\t\t\t\t\t\t\t\t\tif ($pageconfig['minify']===\"true\") {\n\t\t\t\t\t\t\t\t\t\t\t$homepage_content=minify($homepage_content);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t$homepage_path=$lw_publish_version.$languages[$languages_folder].\"/\".$foldername.\"/index.html\";\n\t\t\t\t\t\t\t\t\t\t//if (sizeof($homepage_content)) {\n\t\t\t\t\t\t\t\t\t\tfile_put_contents($homepage_path, $homepage_content);\n\t\t\t\t\t\t\t\t\t\t//}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ($pageconfig['published']===\"true\") {\n\t\t\t\t\t\t\t\tif ($pageconfig['sitemap']===\"true\"){\n\t\t\t\t\t\t\t\t\t$sitemap.= sitemap_url($publicsite,$languages,$foldername.\"/\",$LastUpdateDate,\"0.9\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$approved_pages=$approved_pages+1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//print_r(\"\\t\".$key.\"\\r\\n\");\n\t\t\t\t\t\t\tif (sizeof($value)) {\n\t\t\t\t\t\t\t\t//echo \"|__LEVEL 2<br>\\r\\n\";\n\t\t\t\t\t\t\t\t$secondbranch = $value;\n\t\t\t\t\t\t\t\tfor ($b2=0; $b2 < sizeof($secondbranch) ; $b2++) { \n\t\t\t\t\t\t\t\t\t$branchdata2=$secondbranch[$b2];\n\t\t\t\t\t\t\t\t\tforeach ($branchdata2 as $key2 => $value2) {\n\t\t\t\t\t\t\t\t\t\t$foldername2=$key2;\n\t\t\t\t\t\t\t\t\t\tpublishSubLevel($mas,$lw_pages,$lw_publish_version,$languages,$lw_path,$lw_locales,$lw_pages_headers,$lw_pages_footers,array($foldername,$foldername2));\n\t\t\t\t\t\t\t\t\t\tif ($pageconfig['published']===\"true\") {\n\t\t\t\t\t\t\t\t\t\t\tif ($pageconfig['sitemap']===\"true\"){\n\t\t\t\t\t\t\t\t\t\t\t\t$sitemap.= sitemap_url($publicsite,$languages,$foldername.\"/\".$foldername2.\"/\",$LastUpdateDate,\"0.8\");\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t$approved_pages=$approved_pages+1;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tif (sizeof($value2)) {\n\t\t\t\t\t\t\t\t\t\t\t//echo \"|___LEVEL 3<br>\\r\\n\";\n\t\t\t\t\t\t\t\t\t\t\t//print_r($value2);\n\t\t\t\t\t\t\t\t\t\t\t$branch = $value2;\n\t\t\t\t\t\t\t\t\t\t\tfor ($b3=0; $b3 < sizeof($value2) ; $b3++) { \n\t\t\t\t\t\t\t\t\t\t\t\t$branchdata3=$value2[$b3];\n\t\t\t\t\t\t\t\t\t\t\t\tforeach ($branchdata3 as $key3 => $value3) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t$foldername3=$key3;\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublishSubLevel($mas,$lw_pages,$lw_publish_version,$languages,$lw_path,$lw_locales,$lw_pages_headers,$lw_pages_footers,array($foldername,$foldername2,$foldername3));\n\t\t\t\t\t\t\t\t\t\t\t\t\tif ($pageconfig['published']===\"true\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ($pageconfig['sitemap']===\"true\"){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$sitemap.= sitemap_url($publicsite,$languages,$foldername.\"/\".$foldername2.\"/\".$foldername3.\"/\",$LastUpdateDate,\"0.7\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$approved_pages=$approved_pages+1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (sizeof($value3)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//echo \"|____LEVEL 4<br>\\r\\n\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$branch = $value3;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ($b4=0; $b4 < sizeof($value3) ; $b4++) { \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$branchdata4 = $value3[$b4];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ($branchdata4 as $key4 => $value4) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$foldername4=$key4;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpublishSubLevel($mas,$lw_pages,$lw_publish_version,$languages,$lw_path,$lw_locales,$lw_pages_headers,$lw_pages_footers,array($foldername,$foldername2,$foldername3,$foldername4));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ($pageconfig['published']===\"true\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ($pageconfig['sitemap']===\"true\"){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$sitemap.= sitemap_url($publicsite,$languages,$foldername.\"/\".$foldername2.\"/\".$foldername3.\"/\".$foldername4.\"/\",$LastUpdateDate,\"0.6\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$approved_pages=$approved_pages+1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (sizeof($value4)) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//echo \"|_____LEVEL 5<br>\\r\\n\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$branch = $value4;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor ($b5=0; $b5 < sizeof($value4) ; $b5++) { \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$branchdata5=$value4[$b5];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tforeach ($branchdata5 as $key5 => $value5) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$foldername5=$key5;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpublishSubLevel($mas,$lw_pages,$lw_publish_version,$languages,$lw_path,$lw_locales,$lw_pages_headers,$lw_pages_footers,array($foldername,$foldername2,$foldername3,$foldername4,$foldername5));\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ($pageconfig['published']===\"true\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif ($pageconfig['sitemap']===\"true\"){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$sitemap.= sitemap_url($publicsite,$languages,$foldername.\"/\".$foldername2.\"/\".$foldername3.\"/\".$foldername4.\"/\".$foldername5.\"/\",$LastUpdateDate,\"0.5\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$approved_pages=$approved_pages+1;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}\n\t$sitemap.= sitemap_footer();\n\tfile_put_contents($lw_publish_version.\"sitemap.xml\", $sitemap);\n\t// Zip the file\n\t//die();\n\t$publicsite_directory = str_replace(\"https://\", \"\", $publicsite);\n\t$r=\"rsync -av \".$lw_publish_version.\" /home/$publicsite_directory/\";\n\texec($r);\n\t\n\t$e=\"cd \".$lw_path.\";tar -zcvf \".$lw_path.\"publish_version.tar.gz *\";\n\texec($e);\n\t$s=\"rm -R \".$lw_publish_version.\"*;rm -r \".$lw_publish_version;\n\texec($s);\n\tif ($quiet) {\n\n\t} else {\n\techo '\n<!DOCTYPE html>\n<html lang=\"eng\" class=\"js\">\n<head>\n<link rel=\"stylesheet\" href=\"\">\n<title>LightWeb Publish mode</title>\n<style>\n@import url(\"https://fonts.googleapis.com/css2?family=Oxanium:wght@200;300;400;500;600;700;800&display=swap\");\nhtml, body {\n\tfont-family: \"Oxanium\", cursive;\n\tfont-size:medium;\n margin: 0;\n height: 100%;\n background-color:#01203c;\n color: #1ac9dc;\n font-weight: 200;\n}\nh1{\n\tfont-weight: 200;\n}\nheader{\n\ttext-align: center;\n position: absolute;\n display: block;\n width: 100%;\n height: 70px;\n top: 0px;\n left: 0px;\n border-bottom-color: aliceblue;\n border-style: none;\n border-bottom-style: solid;\n border-bottom-width: 1px;\n}\ncontent {\n display: block;\n position: absolute;\n top: 50px;\n padding: 10px;\n width: 100%;\n}\n.card {\n display: block;\n border-radius: 20px;\n background-color: #004c90;\n max-width: 200px;\n padding: 10px;\n margin-top: 20px;\n text-align:center;\n}\n.card-lg {\n\tmax-width: 450px !important;\n}\ntd{\n\tmin-width: 200px;\n}\n</style>\n</head>\n<body>\n<header>\n<h1>Publishing '.$publicsite .'...</h1>\n</header>\n<content>\n\t<table>\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t<div class=\"card card-lg\">\n\t\t\t\t\t<h2>CMS Path</h2>\n\t\t\t\t\t<p>'.$lw_path.'</p>\n\t\t\t\t</div>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<div class=\"card card-lg\">\n\t\t\t\t\t<h2>Pages Path</h2>\n\t\t\t\t\t<p>'.$lw_pages.'</p>\n\t\t\t\t</div>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<div class=\"card\">\n\t\t\t\t\t<h2>Pages</h2>\n\t\t\t\t\t<p>'.$approved_pages.' / '.$total_pages.'</p>\n\t\t\t\t</div>\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>\n\t\t\t\t<div class=\"card card-lg\">\n\t\t\t\t\t<h2>Rsync</h2>\n\t\t\t\t\t<p>'.$r.'</p>\n\t\t\t\t</div>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<div class=\"card card-lg\">\n\t\t\t\t\t<h2>Compression</h2>\n\t\t\t\t\t<p>'.$e.'</p>\n\t\t\t\t</div>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<div class=\"card\">\n\t\t\t\t\t<h2></h2>\n\t\t\t\t\t<p></p>\n\t\t\t\t</div>\n\t\t\t</td>\n\t\t</tr>\n\t</table>\n</content>\n<footer>\n</footer>\n</body>\n</html>';\n\t}\n}", "title": "" }, { "docid": "57b4a0ff2bdabc47a8de7a445d229b69", "score": "0.50091356", "text": "function make_page(){\n\t// and a page title for the second (if one is not provided inside $this->head)\n\t\tif($this->title != null)\n\t\t\t$this->head []= new _title($this->title);\n\t\techo \"<!doctype html>\";\n\t\t$result = new _html(array( new _head($this->head,$this->h_at) , new _body($this->body)) ,$this->b_at);\n\t\techo $result->make();\n\t\t// we may just want to add a variable to allow for us to keep an object\n\t\t// after echoing out for other operations (mainly encoding json)\n\t\tif(!class_exists('json_core'))\n\t\t\tforeach($this as $key=>$value)\n\t\t\t\tunset($this->$key);\t\n\t}", "title": "" }, { "docid": "17e9b42450146b59da84d2571d596b43", "score": "0.50065285", "text": "function formatPage() {\n $this->page = '<html>';\n $this->page .= '<head><title>'.$this->page_title.'</title></head>';\n $this->page .= '<body>';\n $this->page .= '<h1>'.$this->page_heading.'</h1>';\n $this->page .= $this->page_text;\n $this->page .= '</body>';\n $this->page .= '</html>';\n }", "title": "" }, { "docid": "9a61382a665044087cf3c382bea04983", "score": "0.50042874", "text": "public function wash($html)\n {\n // Charset seems to be ignored (probably if defined in the HTML document)\n $node = new \\DOMDocument('1.0', $this->config['charset']);\n $this->extlinks = false;\n\n // Find base URL for images\n if (preg_match('/<base\\s+href=[\\'\"]*([^\\'\"]+)/is', $html, $matches))\n $this->config['base_url'] = $matches[1];\n else\n $this->config['base_url'] = '';\n\n // Remove invalid HTML comments (#1487759)\n $html = preg_replace('/<!--[^->]*>/', '', $html);\n\n @$node->loadHTML($html);\n return $this->dumpHtml($node);\n }", "title": "" }, { "docid": "803431ecc359d4b9ffe4507916ec2e3c", "score": "0.49924546", "text": "public function save () {\n echo_p('Sauvegarde HTML du chapitre');\n\n echo_p('Création racine page', 1);\n $xml = new DOMDocument('1.0', 'utf-8');\n\n $html = $xml->createElementNS('http://www.w3.org/1999/xhtml', 'html');\n $html->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:epub', 'http://www.idpf.org/2007/ops');\n $html->setAttribute('lang', 'en');\n $html->setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:lang', 'en');\n\n $html->appendChild($this->_save_head($xml));\n $html->appendChild($this->_save_body($xml));\n\n $xml->appendChild($html);\n //$xml->save(realpath(self::DIR_TEXT.$this->_getFilename()));\n\n $formatter = new DOMFormatter();\n $formatter->setStartIndentationLevel(-1);\n file_put_contents(self::DIR_TEXT.$this->_getFilename(), $formatter->formatXML($xml));\n }", "title": "" }, { "docid": "1d2c7fbc11ae0777c395fb5a9cdc68dc", "score": "0.49865544", "text": "public function html(){\r\n\t\t// Code To All Parsing logic\r\n\r\n\t\t$this->parser($this->_Dom);\r\n\t\treturn $this->_html_buffer;\r\n\t}", "title": "" } ]
39fc4815be5431af364fd126c7faaeec
Get count of duplicated meta titles
[ { "docid": "315a5f8da4c4354d42fa17a2c4d456df", "score": "0.8355139", "text": "public function getMetaTitleDuplicateCount()\n {\n return parent::getData(self::META_TITLE_DUPLICATE_COUNT);\n }", "title": "" } ]
[ { "docid": "9c2dbb958f3e68f6095e01f3082506b3", "score": "0.70134103", "text": "public function getHeadingDuplicateCount()\n {\n return parent::getData(self::HEADING_DUPLICATE_COUNT);\n }", "title": "" }, { "docid": "de192f0a8ab65e12a67ce45fa00996da", "score": "0.67094225", "text": "public function getTitleCount() {\r\n\t\treturn count($this->mTitles);\r\n\t}", "title": "" }, { "docid": "b8bada696861fc29833e64334a4d8fa2", "score": "0.64135927", "text": "public function setMetaTitleDuplicateCount($count)\n {\n return $this->setData(self::META_TITLE_DUPLICATE_COUNT, $count);\n }", "title": "" }, { "docid": "c65c84afb02a2e531b199facaba0f770", "score": "0.63675493", "text": "public abstract function getReferencingTitlesCount($title);", "title": "" }, { "docid": "b08411ea1dfaab9e1570b0956efe51ac", "score": "0.61748976", "text": "public function getGoodTitleCount() {\r\n\t\treturn count($this->mGoodTitles);\r\n\t}", "title": "" }, { "docid": "ee6a444676ec07a80be03eb3ee3d29c3", "score": "0.5811373", "text": "public function searchPostTitleOrOtherCount($title)\n\t{\n\t\t$qb = $this->createQueryBuilder('m');\n\t\t$result = $qb->field('name')->equals(new \\MongoRegex('/.*'.$title.'.*/i'))\n\t\t\t\t\t ->hydrate(false)\n\t\t\t\t\t ->getQuery()\n\t\t\t\t\t ->execute()\n\t\t\t\t\t ->toArray(false);\n\t\treturn count($result);\n\t}", "title": "" }, { "docid": "e4ac5302ece849be2324c24516968843", "score": "0.5760564", "text": "public function getMetaTitleLength()\n {\n return parent::getData(self::META_TITLE_LENGTH);\n }", "title": "" }, { "docid": "34a9f75ded2cf34f840c4fb57dfa4f47", "score": "0.5759567", "text": "public function count()\n {\n return count($this->metadata);\n }", "title": "" }, { "docid": "14f4a592a53394bea6e8fd71616fe43a", "score": "0.5432115", "text": "protected function countOfHits()\n {\n // Compute number of entries (count number of '()')\n preg_match('/Treffer.*\\b\\d+\\b.*-.*\\b(\\d+)\\b.*\\bvon\\b/', $this->selenium->getText(\"hits_title\"), $this->matches);\n return $this->matches[1];\n }", "title": "" }, { "docid": "ebd7701c3dcc552183330f5d284460e3", "score": "0.5399618", "text": "static function countByTitle( $db, $title ) {\n\t\t$id = $title->getArticleID();\n\t\tif ( $id ) {\n\t\t\treturn self::countByPageId( $db, $id );\n\t\t}\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "7781b47e07d7cc432037f78c2c150239", "score": "0.5381541", "text": "public function count() \n {\n return count($this->content);\n }", "title": "" }, { "docid": "0c45f2147135a34b338bffc6e144990c", "score": "0.5371958", "text": "private function countUniqueStrings($artists)\n {\n $unwind = array('$unwind' => '$creator');\n\n $group = array(\n '$group' => array(\n '_id' => '$creator',\n 'unique' => array(\n '$addToSet' => '$creator'\n )\n )\n );\n\n $count = array(\n '$group' => array(\n '_id' => null,\n 'count' => array(\n '$sum' => 1\n )\n )\n );\n\n $result = $artists->aggregate($unwind, $group, $count);\n\n return $result['result'][0]['count'];\n }", "title": "" }, { "docid": "cc8cfd9772e63d951ad2ca0edabfc79a", "score": "0.5357777", "text": "public function count()\n {\n return count($this->content);\n }", "title": "" }, { "docid": "09e3d8b1f37a914450ff4e3b52e23935", "score": "0.5347463", "text": "function count_team_beats($team_id) {\n \n $game_ids = array();\n \n $beats = new WP_Query(\n array(\n 'nopaging' => true,\n 'post_type' => 'game_beat',\n 'post_status' => 'publish',\n 'meta_query' => array(\n array(\n 'key' => 'team-id',\n 'value' => $team_id,\n 'compare' => '=',\n ),\n ),\n )\n );\n \n foreach($beats->posts as $beat){\n $game_id = get_post_meta($beat->ID, 'game-id', 1);\n\n if($game_id)\n {\n $game_ids[] = $game_id;\n }\n }\n \n return count(array_unique($game_ids));\n}", "title": "" }, { "docid": "4c1b427a1f6b0034f30fd395f5637709", "score": "0.5339126", "text": "public function getMetaTitle();", "title": "" }, { "docid": "4c1b427a1f6b0034f30fd395f5637709", "score": "0.5339126", "text": "public function getMetaTitle();", "title": "" }, { "docid": "15c5758ca9f4724a38037934f0e92eba", "score": "0.5291578", "text": "public function hasTitle(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "15c5758ca9f4724a38037934f0e92eba", "score": "0.5291578", "text": "public function hasTitle(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "15c5758ca9f4724a38037934f0e92eba", "score": "0.5291578", "text": "public function hasTitle(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "15c5758ca9f4724a38037934f0e92eba", "score": "0.5291578", "text": "public function hasTitle(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "15c5758ca9f4724a38037934f0e92eba", "score": "0.5291578", "text": "public function hasTitle(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "15c5758ca9f4724a38037934f0e92eba", "score": "0.5291578", "text": "public function hasTitle(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "5cf2e40d9066da519cddcac103a7c5e1", "score": "0.5265278", "text": "public function getTitleDetails(): string\n {\n return '( ' . count(get_included_files()) . ' )';\n }", "title": "" }, { "docid": "d5b56bed52d1b5fd48058d013353a59a", "score": "0.5260576", "text": "function get_object_count()\r\n {\r\n return MetadataDataManager :: get_instance()->count_metadata_namespaces($this->get_condition());\r\n }", "title": "" }, { "docid": "e84a578c877ecfd514f6d09f51bac4ff", "score": "0.52598524", "text": "private function countUniqueWikiUris($artists)\n {\n $unwind = array('$unwind' => '$creatorWikidataPid');\n\n $group = array(\n '$group' => array(\n '_id' => '$creatorWikidataPid',\n 'unique' => array(\n '$addToSet' => '$creatorWikidataPid'\n )\n )\n );\n\n $count = array(\n '$group' => array(\n '_id' => null,\n 'count' => array(\n '$sum' => 1\n )\n )\n );\n\n $result = $artists->aggregate($unwind, $group, $count);\n\n if (!empty($result['result'][0])) {\n return $result['result'][0]['count'];\n } else {\n return 0;\n }\n }", "title": "" }, { "docid": "0b17ce1877fb08c82aaeee905ac8bbdc", "score": "0.52468663", "text": "public function hasTitle(){\n return $this->_has(3);\n }", "title": "" }, { "docid": "cd8a2ac3283cb1966e87411049377219", "score": "0.5236145", "text": "public function isTitleMatch()\n {\n return $this->titles()->count() > 0;\n }", "title": "" }, { "docid": "aabf69aefce499f04266691d3146e176", "score": "0.5233471", "text": "private function countWikiNameVariants($artists)\n {\n $unwind = array('$unwind' => '$Wikidata.uniqueNameVariants');\n\n $count = array(\n '$group' => array(\n '_id' => null,\n 'count' => array(\n '$sum' => 1\n )\n )\n );\n\n $result = $artists->aggregate($unwind, $count);\n\n if (!empty($result['result'][0])) {\n return $result['result'][0]['count'];\n } else {\n return 0;\n }\n\n }", "title": "" }, { "docid": "4b4ab3fef326c34a15e92e85e9186c08", "score": "0.5223356", "text": "function foodog_post_update_count( $pid ) {\n\n $countKey = '_foodog_post_views_count';\n $count = get_post_meta($pid, $countKey, true);\n\n if($count == '') {\n $count = 1;\n delete_post_meta($pid, $countKey);\n } else\n $count++;\n \n update_post_meta($pid, $countKey, $count);\n\n}", "title": "" }, { "docid": "2015f54be2d71f544a082e8ddbe49faa", "score": "0.52073497", "text": "public function hasTitles()\n {\n return true;\n }", "title": "" }, { "docid": "f8294c1afdfe2d85844d1fc52676ca25", "score": "0.5176535", "text": "public function count() {\r\n if (is_null($this->content)) {\r\n $this->getContent();\r\n }\r\n return count($this->content);\r\n }", "title": "" }, { "docid": "f03d8a4f1272855978dffb88c1cb7de7", "score": "0.5160727", "text": "public abstract function get_counts();", "title": "" }, { "docid": "c71bb8e49492496ab31ab34b5c61952e", "score": "0.51511526", "text": "public function count()\n {\n return count($this->hits['hits']);\n }", "title": "" }, { "docid": "9774ea10881c80d563baaf5f4dea2b99", "score": "0.51431215", "text": "public function countPlaceholders();", "title": "" }, { "docid": "59d47717663b03bb0c1aef2a579f8775", "score": "0.5131743", "text": "public static function hasTitles(): bool\n {\n return true;\n }", "title": "" }, { "docid": "34f5bda9c0de5e8a69a900f6923a329a", "score": "0.51283497", "text": "public function checkMetas(){\n\t\tif($this->metas!==null) return $this->metas;\n\t\t$parsedHtml=$this->_parseHtml();\n\t\t\n\t\t// http://www.sagerock.com/blog/title-tag-meta-description-length/\n\t\t\n\t\t$metaTitle=$parsedHtml->find('head title');\n\t\t$this->check($metaTitle,'Meta title tags')->size(1);\n\t\t$metaTitle=$metaTitle[0]; $metaTitleText=hdecode($metaTitle->innertext);\n\t\t$c=$this->check($metaTitleText,'Meta title')->doubleSpace()->minLength($this->testClass->_mustBePerfect() ? 20 : 15);\n\t\tif($this->testClass->_mustBePerfect()) $c->maxLength(69);\n\t\t\n\t\t$metaDescription=$parsedHtml->find('head meta[name=\"description\"]');\n\t\t$this->check($metaDescription,'Meta description tags')->size(1);\n\t\t$metaDescription=$metaDescription[0]; $metaDescriptionContent=hdecode($metaDescription->content);\n\t\t$c=$this->check($metaDescriptionContent,'Meta description')->doubleSpace()->minLength(50);\n\t\tif($this->testClass->_mustBePerfect()) $c->maxLength(150);\n\t\t\n\t\t$metaKeywords=$parsedHtml->find('head meta[name=\"keywords\"]');\n\t\t$this->check($metaKeywords,'Meta keywords tags')->size(1);\n\t\t$metaKeywords=$metaKeywords[0]; $metaKeywordsContent=hdecode($metaKeywords->content);\n\t\t$this->check($metaKeywordsContent,'Meta keywords')->doubleSpace();\n\t\t\n\t\t$metaOgSiteName=$parsedHtml->find('head meta[property=\"og:site_name\"]');\n\t\t$this->check($metaOgSiteName,'Meta og:site_name tags')->size(1);\n\t\t$metaOgSiteName=$metaOgSiteName[0]; $metaOgSiteNameContent=hdecode($metaOgSiteName->content);\n\t\t$this->check($metaOgSiteNameContent,'Meta og:site_name')->doubleSpace();\n\t\t\n\t\t$metaOgTitle=$parsedHtml->find('head meta[property=\"og:title\"]');\n\t\t$this->check($metaOgTitle,'Meta og:title tags')->size(1);\n\t\t$metaOgTitle=$metaOgTitle[0]; $metaOgTitleContent=hdecode($metaOgTitle->content);\n\t\t$this->check($metaOgTitleContent,'Meta og:title')->doubleSpace();\n\t\t\n\t\t\n\t\treturn array('metaTitle'=>$metaTitle,'title'=>$metaTitleText,\n\t\t\t\t'metaDescription'=>$metaDescription,'description'=>$metaDescriptionContent,\n\t\t\t\t'metaKeywords'=>$metaKeywords,'keywords'=>$metaKeywordsContent,\n\t\t\t\t'meta_og_siteName'=>$metaOgSiteName, 'og_siteName'=>$metaOgSiteNameContent,\n\t\t\t\t'meta_og_title'=>$metaOgTitle, 'og_title'=>$metaOgTitleContent\n\t\t);\n\t}", "title": "" }, { "docid": "d9be692f5c0cc1c844582f60fb8fc845", "score": "0.51230484", "text": "private function title_checker( $title , $exclude_post\t=\t0 )\n\t{\n\t\t// Fill Empty Title\n\t\t$title\t\t\t\t\t= \t$title == '' ? __( 'Unamed Custom Post' ) : $title;\n\t\t// To avoid multiple post with the same title\n\t\t$i = 0;\n\t\t$query_data\t\t\t\t=\tarray();\n\t\t\n\t\twhile( $matching_post\t=\t$this->get( array(\n\t\t\t\t'where'\t\t=>\tarray( 'title'\t\t=>\t\t$title , 'id !='\t\t=>\t\t$exclude_post )\n\t\t) ) ){\n\t\t\t$i++;\n\t\t\tif( $matching_post )\n\t\t\t{\n\t\t\t\tif( preg_match( '#^(.+)\\(([0-9]{1,})\\)+$#' , $title ) )\n\t\t\t\t{\n\t\t\t\t\t$title\t\t\t\t=\tpreg_replace_callback( '/^(.+)\\(([0-9]{1,})\\)*$/' , function( $matches ){\n\t\t\t\t\t\t$count\t\t\t=\t$matches[2] + 1;\n\t\t\t\t\t\treturn \"$matches[1]\" . '(' . \"$count\" . ')';\n\t\t\t\t\t}, $title );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$nbr\t\t\t\t=\tcount( $matching_post ) + 1;\n\t\t\t\t\t$title\t\t\t\t.=\t'(' . $nbr. ')';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $title;\n\t}", "title": "" }, { "docid": "7bdcae0672f6a8602221cbc2bf2cb7a7", "score": "0.51154774", "text": "public function hasTitle(){\n return $this->_has(13);\n }", "title": "" }, { "docid": "7bdcae0672f6a8602221cbc2bf2cb7a7", "score": "0.51154774", "text": "public function hasTitle(){\n return $this->_has(13);\n }", "title": "" }, { "docid": "886c0c61fecbac71985e172384ac7a1c", "score": "0.5100884", "text": "public function setHeadingDuplicateCount($count)\n {\n return $this->setData(self::HEADING_DUPLICATE_COUNT, $count);\n }", "title": "" }, { "docid": "5fbe10ec9876aadf26b260ad3251dfd7", "score": "0.5090914", "text": "public function getPhotosTitle(){\n\t\t$count=0;\n\t\tforeach ($this->_collective->photo_gallery->photo as $photo){\n\t\t\t$photos[$count]= $photo->title;\n\t\t\t$count++;\n\t\t}\n\t\treturn $photos;\n\t}", "title": "" }, { "docid": "c6403f9fb0382bdd2fcb28ae18d80eec", "score": "0.5080747", "text": "function get_object_count()\r\n {\r\n return $this->get_browser()->count_personal_message_publications($this->get_condition());\r\n }", "title": "" }, { "docid": "2757ea85dd49caebf6a57f09406bf06b", "score": "0.5057721", "text": "function numOccurrence($content, $searchquery) {\r\n $keywords = preg_split(\"/[\\s,]+/\", $searchquery);\r\n $num = 0;\r\n for ($i = 0; $i < count($keywords); $i++) {\r\n if (empty($keywords[$i])) {\r\n ;\r\n } else {\r\n $num += substr_count(strtolower($content), $keywords[$i]);\r\n }\r\n }\r\n return $num;\r\n }", "title": "" }, { "docid": "d4b6c149fc0d3671e6c86a043932c4f4", "score": "0.50564855", "text": "function countName() {\n \t$num = safe_row(\"COUNT(\".$this->field.\")\" , 'textpattern' , $this->where);\n \t\treturn $num[\"COUNT(\".$this->field.\")\"];\n }", "title": "" }, { "docid": "b12e34c46164c8641d6654edd519e5cd", "score": "0.49998334", "text": "function get_object_count()\r\n {\r\n return $this->get_browser()->count_system_announcement_publications($this->get_condition());\r\n }", "title": "" }, { "docid": "ce536cd2607219673f287ef26ae48092", "score": "0.4997295", "text": "public function count()\r\n {\r\n return count($this->entries);\r\n }", "title": "" }, { "docid": "a866c1692032bfb510c86a66d1be3cca", "score": "0.49848154", "text": "function osc_count_premium_meta() {\n if ( !View::newInstance()->_exists('metafields') ) {\n View::newInstance()->_exportVariableToView('metafields', Item::newInstance()->metaFields(osc_premium_id()) );\n }\n return View::newInstance()->_count('metafields');\n }", "title": "" }, { "docid": "f4922f12ebc323076131c9841040fe0a", "score": "0.4978096", "text": "function count_search_results($terms)\n\t{\n\t $sql = \"SELECT COUNT(*) AS count FROM article WHERE MATCH (title, body) AGAINST (?)\";\n\t $query = $this->db->query($sql, array($terms));\n\t return $query->row()->count;\n\t}", "title": "" }, { "docid": "c4d30e8d5bbdfa633441830e201ce6c8", "score": "0.49676058", "text": "public function count()\n {\n return count($this->objects);\n }", "title": "" }, { "docid": "c4d30e8d5bbdfa633441830e201ce6c8", "score": "0.49676058", "text": "public function count()\n {\n return count($this->objects);\n }", "title": "" }, { "docid": "57e990f1ab60a964df0e234ab7ac0d52", "score": "0.49673474", "text": "public function getMetaTitle()\n {\n return $this->metaTitle;\n }", "title": "" }, { "docid": "87a2dc1e25cb2f7ecb75588ba18695e0", "score": "0.49649", "text": "public function uniqueKeysCount()\n {\n return $this->uniqueKeys()->count();\n }", "title": "" }, { "docid": "01d3fd3e8eb42bbdbc046d640c10b38f", "score": "0.49623063", "text": "private function countUniqueOdisUris($artists)\n {\n $unwind = array('$unwind' => '$creatorOdisPid');\n\n $group = array(\n '$group' => array(\n '_id' => '$creatorOdisPid',\n 'unique' => array(\n '$addToSet' => '$creatorOdisPid'\n )\n )\n );\n\n $count = array(\n '$group' => array(\n '_id' => null,\n 'count' => array(\n '$sum' => 1\n )\n )\n\n );\n\n $result = $artists->aggregate($unwind, $group, $count);\n\n if (!empty($result['result'][0])) {\n return $result['result'][0]['count'];\n } else {\n return 0;\n }\n }", "title": "" }, { "docid": "830cd07aaff22728871b9bc2d95c248d", "score": "0.4957308", "text": "function getCount() {\n\t\treturn count($this->entries);\n\t}", "title": "" }, { "docid": "f6d1a84b137abdffe9a1db6064671a98", "score": "0.49551755", "text": "function getGroupDuplicates ($fieldName) {\n\trequire_once(\"RCCWP_CustomField.php\");\n\tglobal $post;\n\treturn RCCWP_CustomField::GetFieldGroupDuplicates($post->ID, $fieldName);\n}", "title": "" }, { "docid": "a3a8206d06d082020074348eca1123a9", "score": "0.4953599", "text": "public abstract function count();", "title": "" }, { "docid": "a3a8206d06d082020074348eca1123a9", "score": "0.4953599", "text": "public abstract function count();", "title": "" }, { "docid": "3454e3e65020714a17d34d8e8fa6478a", "score": "0.49496698", "text": "public function count() {\n return count($this->properties());\n }", "title": "" }, { "docid": "6b05e1515680c78fcd0c27d79a1f0496", "score": "0.49459255", "text": "private function countNameVariants($artists)\n {\n $unwind = array('$unwind' => '$uniqueNameVariants');\n\n $count = array('$group' => array(\n '_id' => null,\n 'count' => array(\n '$sum' => 1\n ),\n )\n );\n\n $result = $artists->aggregate(array($unwind, $count));\n\n if (!empty($result['result'][0])) {\n return $result['result'][0]['count'];\n } else {\n return 0;\n }\n }", "title": "" }, { "docid": "cede85d1f52d1ab6cf8a67ffa03f4233", "score": "0.49387577", "text": "public function hasCount(){\r\n return $this->_has(3);\r\n }", "title": "" }, { "docid": "15ebf8c8359535d3aaab225efa802558", "score": "0.49306074", "text": "public static function isWanted( $title ) {\n\t\t$dbr = wfGetDB( DB_SLAVE );\n\t\t$res = $dbr->select(\n\t\t\t'pagelinks',\n\t\t\tarray( 'count' => 'COUNT(*)' ),\n\t\t\tarray( 'pl_title' => $title->getDBkey(),\n\t\t\t\t 'pl_namespace' => $title->getNamespace() ),\n\t\t\t__METHOD__,\n\t\t\tnull\n\t\t);\n\n\t\t// hacky approach is hacky\n\t\t$count = 0;\n\t\tforeach ( $res as $row ) {\n\t\t\t$count = $row->count;\n\t\t\tbreak;\n\t\t}\n\n\t\tif ( $count > 0 )\n\t\t\treturn true;\n\t\treturn false;\n\t}", "title": "" }, { "docid": "d635a2d028f394e71202a1bb462e51fe", "score": "0.4920209", "text": "public function hasCount(){\n return $this->_has(3);\n }", "title": "" }, { "docid": "f7460ef7f9a378f6462a0f28a849001f", "score": "0.49193922", "text": "private function get_author_post_type_counts() {\n\t\tstatic $counts = 0;\n\t\tif ( ! $counts ) {\n\t\t\tglobal $wpdb;\n\t\t\t$sql = \"SELECT post_author, COUNT(*) AS post_count FROM posts WHERE post_type = %s\";\n\t\t\t$sql .= \" AND post_status IN ('publish','pending', 'draft') GROUP BY post_author\";\n\t\t\t$authors = $wpdb->get_results( $wpdb->prepare( $sql, $this->type ) );\n\t\t\tforeach( $authors as $author ) {\n\t\t\t\t$counts[ $author->post_author ] = $author->post_count;\n\t\t\t}\n\t\t}\n\t\treturn $counts;\n\t}", "title": "" }, { "docid": "84e33e68bd200f0d4a3c4f09fdc7d5f5", "score": "0.49124953", "text": "public function count() {\n return count($this->_objects);\n }", "title": "" }, { "docid": "b15e58ae3090fd868766d8f37a851ec2", "score": "0.48948067", "text": "function count_hits() {\r\n\t\treturn get_option('poc_hits') + $this->hits;\r\n\t}", "title": "" }, { "docid": "8564ca9799be5fef3a9a1c62c51b5fc1", "score": "0.4892014", "text": "public function count()\n\t{\n\t\treturn count($this->objects);\n\t}", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.48861447", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.48861447", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.48861447", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.48861447", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.48861447", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.48861447", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.48861447", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.48861447", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.48861447", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.48861447", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.48861447", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.48861447", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.48861447", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.48861447", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.48861447", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.48861447", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.48861447", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.48861447", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.48861447", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.48861447", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.48861447", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.48861447", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.48861447", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.48861447", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.48861447", "text": "public function count();", "title": "" }, { "docid": "21f979eb6412cea1b73e840e129db55a", "score": "0.48861447", "text": "public function count();", "title": "" }, { "docid": "303d6315062486ebc4a3285e0c529561", "score": "0.4878852", "text": "public function count()\n {\n return count($this->clones);\n }", "title": "" }, { "docid": "bca9341d32cb7e0ef3b4035318b70fd8", "score": "0.48749956", "text": "public function count()\n {\n return count($this->getElements());\n }", "title": "" }, { "docid": "86cd6b114fd46dee8c600e3372c61b21", "score": "0.486899", "text": "abstract protected function getTitles();", "title": "" }, { "docid": "98cc1e915a5bb551ac09bc918e869149", "score": "0.48689717", "text": "public function count()\n {\n return $this->_toc->count();\n }", "title": "" }, { "docid": "495bff95fb01cf10c25238d1c29754e9", "score": "0.48644415", "text": "public function getMetaTitle() {\n return $this->getData(self::META_TITLE);\n }", "title": "" }, { "docid": "acea2f591029a1a87d065b06168587bc", "score": "0.48640543", "text": "public function count()\r\n {\r\n return count($this->toArray());\r\n }", "title": "" }, { "docid": "38206ec31a6c3c4c9bcd08cf0b03657c", "score": "0.48515302", "text": "public abstract function count ();", "title": "" }, { "docid": "d72d7d2abd3a492c3f89e4bac5aeda64", "score": "0.48506874", "text": "public function count() {\n\t\treturn parent::count();\n\t}", "title": "" } ]
7cbfe92147ffb6ce73ba2a0fd6c79f06
Scan configuration for logging configuration information.
[ { "docid": "360425ac8dccda42a99a038e47b75c64", "score": "0.6401891", "text": "protected function configureLogging()\n {\n $configuration = $this->config()->get('logger');\n $this->defineProvider(Logger::class, function ($app) use ($configuration) {\n return Logger::create($configuration);\n });\n\n // Log::app($this);\n }", "title": "" } ]
[ { "docid": "d5984cd8a23625c056b6f65e7fad276f", "score": "0.6910521", "text": "public static function scan_log_files()\n {\n }", "title": "" }, { "docid": "827d6551d00cb713913f7276b47302c2", "score": "0.64630985", "text": "private function configure() {\n $config = $this->loadXmlConfig();\n \\Logger::configure($config);\n }", "title": "" }, { "docid": "e91be1b2bbcef1284e234d2c0cc0ad46", "score": "0.6213218", "text": "function getLogConfigs()\n\t{\n\t\tself::verifyInitialized();\n\t\t$Config = $this->configurations['LOG'];\n\t\treturn $Config;\n\t}", "title": "" }, { "docid": "430801b2fa3e90a08a3f52f741f0f781", "score": "0.58766776", "text": "protected function _findAvailableLoggers()\n \t{\n \t $locations = SugarAutoLoader::getFilesCustom('include/SugarLogger');\n \t foreach ( $locations as $location ) {\n \t $loggerClass = basename($location, \".php\");\n if($loggerClass == \"LoggerTemplate\" || $loggerClass == \"LoggerManager\") {\n continue;\n }\n require_once $location;\n if ( class_exists($loggerClass) && class_implements($loggerClass,'LoggerTemplate') ) {\n self::$_loggers[$loggerClass] = new $loggerClass();\n }\n }\n \t}", "title": "" }, { "docid": "2471152c75f49d577c6dae3c3434fffe", "score": "0.5644345", "text": "private function getGeneralLoggers(): array\n {\n return [\n 'logger.default' => static function (ContainerInterface $container): Logger {\n $settings = $container->get('settings.logger');\n $logger = new Logger('default');\n $logger->pushProcessor(new UidProcessor());\n $logger->pushProcessor(new MemoryUsageProcessor());\n $logger->pushHandler(new StreamHandler($settings['path'], Logger::DEBUG));\n $logger->pushProcessor(new IntrospectionProcessor());\n\n if ($container->get('settings.isWeb') && $container->has('environment')) {\n $logger->pushProcessor(new WebProcessor($container->get('environment')));\n }\n\n // add it to the debugger\n $debugger = $container->get(DebuggerProviderInterface::class);\n $debugger->addDataCollector(new MonologCollector($logger));\n\n return $logger;\n },\n 'logger.providers' => static function (ContainerInterface $container): Logger {\n return $container->get('logger.default')->withName('providers');\n },\n 'logger.services' => static function (ContainerInterface $container): Logger {\n return $container->get('logger.default')->withName('services');\n },\n 'logger.factories' => static function (ContainerInterface $container): Logger {\n return $container->get('logger.default')->withName('factories');\n },\n LoggerInterface::class => get('logger.default')\n ];\n }", "title": "" }, { "docid": "b2610c446e6fda205eaf24087c248e66", "score": "0.5636875", "text": "private static function init() {\n\t\tif (static::$writers === null) {\n\t\t\tstatic::$writers = array();\n\t\t\t$configs = Application::getConfig('application', 'log');\n\n\t\t\t$count = 0;\n\t\t\tforeach ($configs as $config) {\n\t\t\t\t$ok = $config['enabled']\n\t\t\t\t\t\t&& (\n\t\t\t\t\t\t\t(is_array($config['options']['log']) && count($config['options']['log']) > 0)\n\t\t\t\t\t\t\t|| (is_array($config['options']['email_on']) && count($config['options']['email_on']) > 0)\n\t\t\t\t\t\t);\n\n\t\t\t\tif ($ok) {\n\t\t\t\t\t// if the config is enabled, then make new instance\n\t\t\t\t\t$writer = $config['writer_class'];\n\t\t\t\t\tstatic::$writers[$count] = new $writer($config['options']);\n\t\t\t\t\tstatic::$enabledWriters[$config['writer_class']] = true;\n\n\t\t\t\t\tif (is_array($config['options']['log']) && count($config['options']['log']) > 0) {\n\t\t\t\t\t\tforeach ($config['options']['log'] as $level) {\n\t\t\t\t\t\t\tstatic::$enabledLevels[$level] = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (is_array($config['options']['email_on']) && count($config['options']['email_on']) > 0) {\n\t\t\t\t\t\tforeach ($config['options']['email_on'] as $level) {\n\t\t\t\t\t\t\tstatic::$enabledLevels[$level] = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!(static::$writers[$count] instanceof AbstractLogWriter)) {\n\t\t\t\t\t\tthrow new Exception(\"Log driver {$writer} must extend AbstractLogWriter\");\n\t\t\t\t\t}\n\n\t\t\t\t\t$count++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tregister_shutdown_function(function() {\n\t\t\t\t\\Koldy\\Log::shutdown();\n\t\t\t});\n\t\t}\n\t}", "title": "" }, { "docid": "99e02103d05a7a1d66119c9c4f753743", "score": "0.5616724", "text": "public function getLogConfiguration()\n {\n return $this->logConfig;\n }", "title": "" }, { "docid": "4023f269f0599371459274ec4b3fb292", "score": "0.55271554", "text": "public function processConfiguration() {}", "title": "" }, { "docid": "6925f493546935819c2dab1ca0c03149", "score": "0.5496452", "text": "protected function _initConfig()\n {\n parent::_initConfig();\n $this->_mergeConfig(array(\n 'log' => null, // Path to log file to write information to\n ));\n }", "title": "" }, { "docid": "2875bfa57be8ef6c1c32f091545d862c", "score": "0.54804665", "text": "public function getLogFile()\n {\n if (!$this->config->getLogFile()) {\n throw new ConfigurationException(\"LogFile not set\");\n }\n yield from $this->filesManager->getLogFiles($this->config->getLogFile());\n }", "title": "" }, { "docid": "16abbb4354d4ca4bc89973325e66f70b", "score": "0.54681903", "text": "private function applyConfiguration()\n {\n if ($this->getConfiguration()->get('debug', false) == true) {\n Debug::enable();\n ErrorHandler::register();\n ExceptionHandler::register();\n }\n\n //apply the database configuration\n $connections = $this->configuration->get('connections');\n if (is_array($connections)) {\n $this->connectDatabase($connections);\n }\n\n //apply the logging configuration\n $loggers = $this->configuration->get('logging')['interfaces'];\n if (is_array($loggers)) {\n $this->connectLogger($loggers, $this->configuration->get('logging')['automatic']);\n }\n }", "title": "" }, { "docid": "5b6a1421e44deafb54188ecf02b0b5b1", "score": "0.5456085", "text": "function call_log_config_items()\n{\n return array();\n}", "title": "" }, { "docid": "0167614d8e32cdfc67ff893ce1bba862", "score": "0.5453174", "text": "public function getLoggingConfig()\n {\n return $this->logging_config;\n }", "title": "" }, { "docid": "4c9c879ce8f011ed0fdeb576b949809b", "score": "0.5436895", "text": "private function processConfiguration()\n {\n $processor = new Processor();\n\n foreach ($this->configHandlers as $configHandler)\n {\n $file = $configHandler->getConfigFile(\n $this->getConfigDirectory()\n );\n \n $config = Yaml::parse(\n \\file_get_contents($file)\n );\n $config = [$config];\n\n $this->config = \\array_merge(\n $this->config,\n $processor->processConfiguration(\n $configHandler,\n $config\n )\n );\n }\n }", "title": "" }, { "docid": "ea7d3ba7126fa85e8b560f7d2c759828", "score": "0.5424838", "text": "private function print_config() {\n\t\techo(\"Config\\n\");\n\t\t$this->print_config_item($this->report_missing_file_comments, 'File Comments');\n\t\t$this->print_config_item($this->report_missing_class_comments, 'Class Comments');\n\t\t$this->print_config_item($this->report_missing_interface_comments, 'Interface Comments');\n\t\t$this->print_config_item($this->report_missing_class_var_comments, 'Class Variable Comments');\n\t\t$this->print_config_item($this->report_missing_class_const_comments, 'Class Constant Comments');\n\t\t$this->print_config_item($this->report_missing_constant_comments, 'Constant Comments');\n\t\t$this->print_config_item($this->report_missing_function_comments, 'Function Comments');\t\t\n\t}", "title": "" }, { "docid": "64fd9e1536f28c14cf06fc8767989d26", "score": "0.5411859", "text": "function processConfiguration() ;", "title": "" }, { "docid": "5d278116abff240abec9ba66e2af7f78", "score": "0.5408393", "text": "public static function initLogger()\n {\n foreach (array_keys(self::config('models', [])) as $modelName) {\n if (class_exists($modelName)) {\n $modelName::observe(LoggerObserver::class);\n }\n }\n }", "title": "" }, { "docid": "ef6390e441b9c24a7b95b4d63d4263d1", "score": "0.5407464", "text": "private function addLogHandler()\n {\n $log_system = \\Config::get('input::joblog.system');\n\n if ($log_system == 'mongodb') {\n $mongo_config = \\Config::get('input::joblog.databases.mongodb');\n\n $username = $mongo_config['username'];\n $password = $mongo_config['password'];\n\n $auth = [];\n\n if (! empty($username)) {\n $auth['username'] = $username;\n\n $password = $mongo_config['password'];\n\n if (! empty($password)) {\n $auth['password'] = $password;\n }\n }\n\n $connString = 'mongodb://' . $mongo_config['host'] . ':' . $mongo_config['port'] . '/logs';\n\n $mongoHandler = new MongoDBHandler(\n new MongoClient($connString, $auth),\n $mongo_config['database'],\n $mongo_config['collection']\n );\n\n \\Log::getMonolog()->pushHandler($mongoHandler);\n } elseif ($log_system == 'elasticsearch') {\n $es_config = \\Config::get('input::joblog.databases.elasticsearch');\n\n $username = $es_config['username'];\n $pw = $es_config['password'];\n $host = $es_config['host'];\n\n if (! empty($username) && ! empty($pw)) {\n $auth_header_val = 'Basic ' . base64_encode($username . ':' . $pw);\n $auth_header = array('Authorization' => $auth_header_val);\n }\n\n $config['host'] = $host;\n $config['port'] = $es_config['port'];\n $config['headers'] = $auth_header;\n\n $index = $es_config['index'];\n $type = $es_config['type'];\n\n $client = new Client($config);\n $handler = new ElasticSearchHandler($client, ['index' => $index, 'type' => $type]);\n\n \\Log::getMonolog()->pushHandler($handler);\n }\n }", "title": "" }, { "docid": "5b42882f49b6c5f6298477b482a8122a", "score": "0.537809", "text": "private function parse(): void{\n if(!$this->gotConfig) throw new ConfigurationsNotLoaded();\n // die(var_dump($this->root->getElementsByTagName(InternalConfigurations::ERR_LOG_NAME)->item(0)));\n $this->ext_config = $this->root->getElementsByTagName(InternalConfigurations::EXT_CONFIG_NAME)->item(0)->getAttribute(InternalConfigurations::VALUE_ATTR_NAME);\n $this->error_log = $this->root->getElementsByTagName(InternalConfigurations::ERR_LOG_NAME)->item(0)->getAttribute(InternalConfigurations::VALUE_ATTR_NAME);\n $this->general_logs = $this->root->getElementsByTagName(InternalConfigurations::GENERAL_LOGS_NAME)->item(0)->getAttribute(InternalConfigurations::VALUE_ATTR_NAME);\n }", "title": "" }, { "docid": "171ac79542e05784328b752f27d808a2", "score": "0.53622687", "text": "public static function get_log_files()\n {\n }", "title": "" }, { "docid": "534666f795259bea92cbb1dba8e43828", "score": "0.53571844", "text": "protected static function _autoConfig() {\n\t\tif (empty(self::$_Collection)) {\n\t\t\tself::_init();\n\t\t}\n\t\tself::$_Collection->load('error', array(\n\t\t\t'engine' => 'FileLog',\n\t\t\t'types' => array('error', 'warning'),\n\t\t\t'path' => LOGS,\n\t\t));\n\t}", "title": "" }, { "docid": "83cecc51b30851c424f4292f9bc714b2", "score": "0.53442276", "text": "public function getLogConfig()\n {\n return $this->log_config;\n }", "title": "" }, { "docid": "83cecc51b30851c424f4292f9bc714b2", "score": "0.53442276", "text": "public function getLogConfig()\n {\n return $this->log_config;\n }", "title": "" }, { "docid": "0bd0b60bc8b0ae1aaedfbd9ef8e8a909", "score": "0.5336751", "text": "protected function getLogEntries() {}", "title": "" }, { "docid": "699ff16cc58ba1e0b123393536da2a11", "score": "0.53276235", "text": "private function scan()\n {\n foreach (Host::all() as $host) {\n $this->line(PHP_EOL . '<info>Host: </info><comment>' . $host->name . '</comment>');\n (new HostDiscovery($host, $this->output))->run();\n\n foreach ($host->ports as $port) {\n $this->line(PHP_EOL . '<info>Port: </info><comment>' . $port->port . '</comment>');\n (new PortDiscovery($port, $this->output))->run();\n }\n }\n foreach (Website::all() as $website) {\n $this->line(PHP_EOL . '<info>Website: </info><comment>' . $website->url . '</comment>');\n (new WebsiteAudit($website, $this->output))->run();\n }\n foreach (Docker::all() as $docker) {\n $this->line(PHP_EOL . '<info>Docker: </info><comment>' . $docker->url . '</comment>');\n (new DockerAudit($docker, $this->output))->run();\n }\n foreach (Repository::all() as $repository) {\n $this->line(PHP_EOL . '<info>Repository: </info><comment>' . $repository->path . '</comment>');\n (new RepositoryAudit($repository, $this->output))->run();\n }\n\n // Exit code\n if (Finding::count()) {\n exit(1);\n } else {\n exit(0);\n }\n }", "title": "" }, { "docid": "7b480a0a747f3a02e70cc5d8231df55d", "score": "0.5308175", "text": "public function getConfiguration ();", "title": "" }, { "docid": "06f055a3f31ba4b990ff353063db2bfe", "score": "0.5282338", "text": "public function logToAll()\n {\n $config = new conf;\n foreach ($config->types as $type) {\n $logger = LoggerFactory::Logging ($type);\n $logger->sendByLogger($_GET['message'],$type);\n }\n\n }", "title": "" }, { "docid": "4c41f67a9653d6265978a9cd33019ab4", "score": "0.5277656", "text": "protected function configuration() {}", "title": "" }, { "docid": "6f60fbf0005761e68e7a6b0d375298ad", "score": "0.52667403", "text": "protected function registerConfigs()\n\t{\n\t\t$config_dir_path = plugin_dir_path($this->plugin_root_file) . 'config/';\n\t\t$config_dir = scandir($config_dir_path);\n\n\t\t$config_files = $this->filterConfigDir($config_dir);\n\n\t\tforeach ($config_files as $config_id => $config_file) {\n\t\t\t$config_file = $config_dir_path . $config_file;\n\t\t\t$this->container->set($config_id . '-config', new Config($config_file));\n\t\t}\n\t}", "title": "" }, { "docid": "f943121604e9f0f29a7ff7f2539bc2cd", "score": "0.52633137", "text": "protected function loadLoggers( AppConfig $config ) {\n\t\tforeach( $config->getLoggers() as $logger ) {\n\t\t\ttry {\n\t\t\t\t$this->loggers[] = LoggerFactory::newLogger( $logger['name'],$logger['type'], $logger['path'], $logger['level'] );\n\t\t\t} catch ( ConfigException $e ) {\n\t\t\t\t$this->addException( AppContextException::ERROR_LOGGER, sprintf( '%s for config: %s', $e->getMessage(), $config ) );\n\t\t\t} catch ( CoreException $e ) {\n\t\t\t\t$this->addException( AppContextException::ERROR_LOGGER, $e->getMessage() );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "6e9fcb48b50887fc8fee250b517c3867", "score": "0.52581155", "text": "public function enableLogging() {}", "title": "" }, { "docid": "755e1d3499a2f7a8f334fe64a73e18fa", "score": "0.5254046", "text": "protected function registerConfig()\n {\n }", "title": "" }, { "docid": "91ca05541edb7f001d1be8801c9b7d01", "score": "0.5248584", "text": "private static function loadConfigHandlers ()\n {\n\n // manually create our config_handlers.ini handler\n self::$handlers['config_handlers.ini'] = new RootConfigHandler();\n self::$handlers['config_handlers.ini']->initialize();\n\n // application configuration handlers\n\n require_once(ConfigCache::checkConfig('config/config_handlers.ini'));\n\n // module level configuration handlers\n\n // make sure our modules directory exists\n if (is_readable(MO_MODULE_DIR))\n {\n\n // ignore names\n $ignore = array('.', '..', 'CVS', '.svn');\n\n // create a file pointer to the module dir\n $fp = opendir(MO_MODULE_DIR);\n\n // loop through the directory and grab the modules\n while (($directory = readdir($fp)) !== false)\n {\n\n if (!in_array($directory, $ignore))\n {\n\n $config = MO_MODULE_DIR . '/' . $directory .\n '/config/config_handlers.ini';\n\n if (is_readable($config))\n {\n\n // initialize the root configuration handler with this\n // module name\n $params = array('module_level' => true,\n 'module_name' => $directory);\n\n self::$handlers['config_handlers.ini']->initialize($params);\n\n // replace module dir path with a special keyword that\n // checkConfig knows how to use\n $config = 'modules/' . $directory .\n '/config/config_handlers.ini';\n\n require_once(ConfigCache::checkConfig($config));\n\n }\n\n }\n\n }\n\n // close file pointer\n closedir($fp);\n\n } else\n {\n\n // module directory doesn't exist or isn't readable\n $error = 'Module directory \"%s\" does not exist or is not readable';\n $error = sprintf($error, MO_MODULE_DIR);\n\n throw new ConfigurationException($error);\n\n }\n\n }", "title": "" }, { "docid": "946483922c4ea75c1306dc32c9a1f523", "score": "0.52384573", "text": "public function getGeneralLogsPath(){\n if(!$this->gotConfig) throw new ConfigurationsNotLoaded();\n else return $this->general_logs;\n }", "title": "" }, { "docid": "cf9a031908bbc7d3897ee751cde4eae0", "score": "0.52115387", "text": "function SearchConfigMod()\n\t\t{\n\t\t\t$rtn=false;\n\t\t\t$handle=dir($this->path);\n\t\t\twhile ($directorio = $handle->read())\n\t\t\t{\n\t\t\t\tif(is_dir($this->path.\"/\".$directorio) && $directorio!=\".\" && $directorio!=\"..\")\n\t\t\t\t{\n\t\t\t\t\tif(file_exists($this->path.\"/\".$directorio.\"/config.json\"))\n\t\t\t\t\t{\n\t\t\t\t\t\t$rtn[]=$directorio;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $rtn;\n\t\t}", "title": "" }, { "docid": "5e0acdc4daab11b1c902d06ba2907b07", "score": "0.521146", "text": "function include_logger( $strconfigfile ){\n\tLogger::configure( $strconfigfile );\n}", "title": "" }, { "docid": "a68fe94175e1d81ae554cd4e5b0e5f58", "score": "0.520654", "text": "public function getConfiguration() {}", "title": "" }, { "docid": "a68fe94175e1d81ae554cd4e5b0e5f58", "score": "0.5206264", "text": "public function getConfiguration() {}", "title": "" }, { "docid": "a68fe94175e1d81ae554cd4e5b0e5f58", "score": "0.5206264", "text": "public function getConfiguration() {}", "title": "" }, { "docid": "a68fe94175e1d81ae554cd4e5b0e5f58", "score": "0.5206264", "text": "public function getConfiguration() {}", "title": "" }, { "docid": "0c9669d82782116e941c185b5074fe9c", "score": "0.52005535", "text": "protected static function getConfig(): array\n {\n return (array)config('miravel.log');\n }", "title": "" }, { "docid": "8afb8bc90bd52d0f6c3b3eaa9a3a86ed", "score": "0.51868045", "text": "public function getConfiguration();", "title": "" }, { "docid": "8afb8bc90bd52d0f6c3b3eaa9a3a86ed", "score": "0.51868045", "text": "public function getConfiguration();", "title": "" }, { "docid": "8afb8bc90bd52d0f6c3b3eaa9a3a86ed", "score": "0.51868045", "text": "public function getConfiguration();", "title": "" }, { "docid": "8afb8bc90bd52d0f6c3b3eaa9a3a86ed", "score": "0.51868045", "text": "public function getConfiguration();", "title": "" }, { "docid": "8afb8bc90bd52d0f6c3b3eaa9a3a86ed", "score": "0.51868045", "text": "public function getConfiguration();", "title": "" }, { "docid": "8afb8bc90bd52d0f6c3b3eaa9a3a86ed", "score": "0.51868045", "text": "public function getConfiguration();", "title": "" }, { "docid": "8afb8bc90bd52d0f6c3b3eaa9a3a86ed", "score": "0.51868045", "text": "public function getConfiguration();", "title": "" }, { "docid": "9e2add6620e39d5372ab07e4fddae058", "score": "0.51561195", "text": "abstract protected function registerConfig();", "title": "" }, { "docid": "66f14e08c1e596c619eb764f072ddf20", "score": "0.5132238", "text": "private function loadConfigs(): void\n {\n $file = \"{$this->getAppSrcRootDir()}/\".self::CONFIG_FILE;\n\n $this->configs = parse_ini_file($file, true, INI_SCANNER_TYPED);\n }", "title": "" }, { "docid": "615116734e7490416c6c9f5d74b4d74f", "score": "0.5118021", "text": "function getConfiguration();", "title": "" }, { "docid": "3f499710afd85d0d195cf1a39c06149f", "score": "0.5116058", "text": "private function detectConfiguration(): void\n {\n $extra = $this->getComposer()->getPackage()->getExtra();\n $this->configuration = getcwd() . '/' . ($extra['captainhook']['config'] ?? 'captainhook.json');\n }", "title": "" }, { "docid": "59da02fd2f10ce4e4c2b3d3d980fe123", "score": "0.5111655", "text": "protected function checkConfiguration() {\n\t\t//\n\t}", "title": "" }, { "docid": "5208fd2dd2e0d63d565d4aef332b8069", "score": "0.5105763", "text": "function addLoggers($logger);", "title": "" }, { "docid": "b60081966073290ca453a198d64eabc6", "score": "0.5093877", "text": "public function logsEnabled(): bool\n {\n return (bool)config('netcore.module-search.enable_search_logs');\n }", "title": "" }, { "docid": "b879f99f1feb00198801a3db807879e7", "score": "0.5089547", "text": "function getConfiguration() ;", "title": "" }, { "docid": "ffb5b9b3a2e311f5ead95fdadd41859f", "score": "0.50740016", "text": "public function getLoggers() {\n $loggers = $this->getFacility(Registry::LOGGERS);\n\n foreach ($loggers as $logger) $logger->init();\n\n return $loggers;\n }", "title": "" }, { "docid": "fc1cec3d421278aca45561f56207ed2c", "score": "0.50694394", "text": "public function getErrorLogs(){\n if(!$this->gotConfig) throw new ConfigurationsNotLoaded();\n else return $this->error_log;\n }", "title": "" }, { "docid": "56a6c68861126e00f6f8fd59bc9a89dd", "score": "0.50406015", "text": "function _initRegisterLogger()\n {\n //@TODO put the config in main configuration file\n $config = array ('syslog' => array('application' => 'application', 'facility' => LOG_LOCAL2),'stream' => array ('file_path_url' => 'log/debug.log' , 'mode' => null));\n $logger = LogService::getInstance($config);\n\n $registry = Zend_Registry::getInstance();\n $registry->set('logger', $logger);\n }", "title": "" }, { "docid": "d3e9b7f73218041cfa87ff72ea5898c1", "score": "0.50356007", "text": "public function enable_all_loggers(){\n\n\t\t$supported_plugins = $this->get_supported_plugins();\n\n\t\t$settings = array();\n\t\tforeach ( $supported_plugins as $plugin_slug => $plugin_name ) {\n\t\t\t$random = function_exists( 'random_bytes' ) ? random_bytes( 12 ) : wp_generate_password( 24, true, true );\n\t\t\t$settings[ $plugin_slug ] = array(\n\t\t\t\t'log_level' => '1',\n\t\t\t\t'enable' => '1',\n\t\t\t\t'file_name' => sha1( $plugin_slug . $random ),\n\t\t\t);\n\t\t}\n\t\t$this->update_plugin_settings( $settings );\n\t}", "title": "" }, { "docid": "ea119d8f5ca60f2570326ee326c8001e", "score": "0.5027182", "text": "abstract protected function getConfiguration();", "title": "" }, { "docid": "9cf009526c2127a3589a4be55ac5c81e", "score": "0.5026451", "text": "private function _config()\n\t{\n\t\t$log_path = $this->_ci->config->item('_log_path' ); // NOTE: The log_path must end with a forward slash (/)!!!!!\n\t\t$logfile = $this->_ci->config->item('_logfile' );\n\t\t$log_date_format = $this->_ci->config->item('_log_date_format');\n\t\t$delimiter = $this->_ci->config->item('_delimiter' );\n\t\t$max_logs = $this->_ci->config->item('_max_logs' );\n\t\t$max_log_length = $this->_ci->config->item('_max_log_length' );\n\t\t$old_dir_name = $this->_ci->config->item('_old_dir_name' );\n\t\t\n\t\tself::$_log_path = (!empty($log_path )) ? $log_path : APPPATH . 'logs/';\n\t\tself::$_logfile = (!empty($logfile )) ? $logfile : 'Changelog.php';\n\t\tself::$_log_date_format = (!empty($log_date_format)) ? $log_date_format : 'Y-m-d';\n\t\tself::$_log_time_format = (!empty($log_time_format)) ? $log_time_format : 'H:i:s';\n\t\tself::$_delimiter = (!empty($delimiter )) ? $delimiter : ';';\n\t\tself::$_max_logs = (!empty($max_logs )) ? $max_logs : 350;\n\t\tself::$_max_log_length = (!empty($max_log_length )) ? $max_log_length : 140;\n\t\tself::$_old_dir_name = (!empty($old_dir_name )) ? $old_dir_name : '_old';\n\t\t\n\t\treturn;\n\t}", "title": "" }, { "docid": "c5b622d4ee29378c5400af8061c54a2d", "score": "0.50187194", "text": "function php_ini_scanned_files()\n{\n}", "title": "" }, { "docid": "a1ab41f5a7f28f20a20beab671d1833e", "score": "0.5008341", "text": "public function configuration();", "title": "" }, { "docid": "74ab1dc972ec038a3430693b777b21a6", "score": "0.5003362", "text": "public static function initialize() {\n\t\tself::$initialized = true;\n\t\t$instance = LoggerReflectionUtils::createObject(self::$configurationClass);\n\t\t$result = $instance->configure(self::getHierarchy(), self::$configurationFile);\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "5d8c1ec38427e4ed1ce92bc8880946ef", "score": "0.4975297", "text": "public function findLogs()\n {\n $logDirectory = $this->directoryList->getPath('log');\n $files = GLOB::glob(\"$logDirectory/*.log\");\n return $files;\n }", "title": "" }, { "docid": "3abad274bdb44ab31bb50d566c986fdb", "score": "0.49597436", "text": "protected function handleConfiguration(array $config, ContainerBuilder $container)\n {\n $container->setParameter('it.swift_mailer_logger.enable_db_logger', $config['enable_db_logger']);\n }", "title": "" }, { "docid": "ffbb02c46f9f9be8ab13e3e70d70f94c", "score": "0.49513084", "text": "protected function initializeLog() {\n\t\tif ($this->log === null) {\n\t\t\t$this->log = $this->objectManager->create('Tx_CabagExtbase_Utility_Logging');\n\t\t}\n\t\t\n\t\t$this->log->setDefaultTag($this->extensionName)\n\t\t\t->setWriteSeverity(400)\n\t\t\t->addOutput($this->extensionName . 'Flash', 'flash', array(\n\t\t\t\t'flashMessageContainer' => $this->flashMessageContainer,\n\t\t\t\t'severity' => Tx_CabagExtbase_Utility_Logging::OK\n\t\t\t));\n\t\t\n\t\t\n\t\tif ($this->extensionConfiguration['logging.']['file.']['enable']) {\n\t\t\t$this->log->addOutput($this->extensionName . 'File', 'file', $this->extensionConfiguration['logging.']['file.']);\n\t\t}\n\t\tif ($this->extensionConfiguration['logging.']['mail.']['enable']) {\n\t\t\t$this->log->addOutput($this->extensionName . 'Mail', 'mail', $this->extensionConfiguration['logging.']['mail.']);\n\t\t}\n\t\tif ($this->extensionConfiguration['logging.']['devLog.']['enable']) {\n\t\t\t$this->log->addOutput($this->extensionName . 'DevLog', 'devlog', $this->extensionConfiguration['logging.']['devLog.']);\n\t\t}\n\t\t$this->log->log($this->translate('info.init'), Tx_CabagExtbase_Utility_Logging::INFORMATION);\n\t}", "title": "" }, { "docid": "f4514f84dfaee5a9c910eeb8ab6213d0", "score": "0.4946527", "text": "public function init()\n {\n parent::init();\n if (is_string($this->logger)) {\n $this->logger = [\n 'class' => $this->logger,\n 'fileName' => 'Mail-Queue-log',\n ];\n } else {\n if (!isset($this->logger['class'])) {\n throw new InvalidConfigException('Logger Class Name must be specified');\n }\n }\n $this->logger['logFolder'] = Yii::getAlias($this->logFolder);\n $this->logger = Instance::ensure($this->logger, LoggerInterface::class);\n }", "title": "" }, { "docid": "f4880b457728c3157335ee1985ff021b", "score": "0.49395084", "text": "public function config() {\n\t\t$config = Configure::read();\n\t\tunset($config['debug']);\n\t\tksort($config);\n\n\t\t$this->set('configuration', $config);\n\t}", "title": "" }, { "docid": "3067341647bb3585e081737916163edf", "score": "0.49302533", "text": "function _load_configuration()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $this->configuration = array();\n\n try {\n $file = new File(self::FILE_CONFIG);\n $lines = $file->get_contents_as_array();\n $type = 'unknown';\n $index = 0;\n foreach ($lines as $line) {\n if (preg_match(\"/.*FW_PROTO.*ipv4.*/\", $line)) {\n $this->ipv4_index = $index;\n $this->configuration[] = array('bash' => $line);\n $type = 'ipv4';\n $index++;\n continue;\n } else if (preg_match(\"/.*FW_PROTO.*ipv6.*/\", $line)) {\n $this->ipv6_index = $index;\n $this->configuration[] = array('bash' => $line);\n $index++;\n $type = 'ipv6';\n continue;\n } else if (preg_match(\"/^fi$/\", $line)) {\n $this->configuration[] = array('bash' => $line);\n $type = 'unknown';\n $index++;\n continue;\n }\n $this->configuration[] = array($type => $line);\n $index++;\n }\n } catch (File_Not_Found_Exception $e) {\n // Not fatal\n }\n\n $this->is_loaded = TRUE;\n }", "title": "" }, { "docid": "f871a4f972073172bae6eebeb3b2331f", "score": "0.49243262", "text": "function loadConfigs(){\n\t// Specify the config directory\n\t$configPath = dirname( __FILE__ ).'/Configs';\n\t$di = new DirectoryIterator($configPath);\n\n\t// First load the defaults\n\tforeach ($di as $file) {\n\n\t\tif ($file->isDir() && !$file->isLink() && !$file->isDot()) {\n\t\t\t//do nothing\n\t\t} elseif (substr($file->getFilename(), -4) === '.cnf') {\n\t\t\t$configName = substr($file->getFilename(), 0, -4);\n\t\t\tGlobals::$config[$configName] = parse_ini_file( $configPath.'/'.$file->getFilename() );\n\t\t}\n\t}\n\n\t//Then load the private configs\n\tforeach ($di as $file) {\n\t\tif ($file->isDir() && !$file->isLink() && !$file->isDot()) {\n\t\t\t//do nothing\n\t\t} elseif (substr($file->getFilename(), -5) === '.cnfp') {\n\t\t\t$configName = substr($file->getFilename(), 0, -5);\n\t\t\tGlobals::$config[$configName] = parse_ini_file( $configPath.'/'.$file->getFilename() );\n\t\t}\n\t}\n\n}", "title": "" }, { "docid": "fc233199987537ef0a35e2cfcdaa974c", "score": "0.49178976", "text": "public function getLoggings()\n {\n return $this->_loggings;\n }", "title": "" }, { "docid": "bfbcc60a724f9af20e00d3cf9ed2e2a7", "score": "0.49122587", "text": "protected static function getConfigurationManager() {}", "title": "" }, { "docid": "6863d23c9dc5a0e136ba1a5d4accd3be", "score": "0.49001068", "text": "public function testGetConfiguration()\n {\n $instance = new EventDispatcher;\n\n $this->assertEquals(\n [\n 'type' => 'array',\n 'log_events' => false,\n 'log_all_events' => true,\n 'from_file' => false,\n 'log_object' => false,\n 'log_config' => [\n 'log_path' => './log',\n 'level' => 'debug',\n 'storage' => \\SimpleLog\\Storage\\File::class,\n ],\n 'events' => [],\n ],\n $instance->getConfiguration()\n );\n }", "title": "" }, { "docid": "579385d81f56ab6e0609abff0651243b", "score": "0.48917457", "text": "public function getLogFiles(){\n $dir = new Folder(Configure::read('LogWatcher.logDir'));\n # if a whitelist is set, only show those\n if ($whitelist = Configure::read('LogWatcher.whitelist')){\n $allowed = implode('|', $whitelist);\n } else {\n $allowed = '.*';\n }\n $logs = $dir->find($allowed . '\\.log');\n foreach ($logs as &$log){\n $log = substr($log, 0, -4);\n }\n return $logs;\n }", "title": "" }, { "docid": "ae2011ccda5713260e0ddf3264938afa", "score": "0.48887837", "text": "private static function getList() {\n $sh = self::getStorageInstance();\n $loggers = array();\n foreach ($sh->dirRead() as $file) {\n $loggers[] = new Logger($file);\n }\n return $loggers;\n }", "title": "" }, { "docid": "77b3e23df17a89d8ec1db7f836bc0f5d", "score": "0.48859736", "text": "private function loadConfigs() {\n\n // Load every config from array\n foreach($this->files as $file)\n $this->loadConfig($file);\n\n }", "title": "" }, { "docid": "63ca172b7e4eccd08b92135cc9a77d1c", "score": "0.48828033", "text": "protected function registerLogBindings()\n {\n $this->singleton('Psr\\Log\\LoggerInterface', static function ($app) {\n $app->configure('logging');\n\n return new LogManager($app);\n });\n }", "title": "" }, { "docid": "0403ae4cb4e3f9b2b4afd4eafbb39e15", "score": "0.4879388", "text": "protected function configureSingleHandler(Writer $log)\n {\n $date = Carbon::now()->format('Y-m-d');\n $storagePath = $this->app->storagePath().'/logs/'.$date;\n $storeLogPath = \"\";\n // dd(\\File::isDirectory($storagePath));\n if (!\\File::isDirectory($storagePath)){\n \\File::makeDirectory($storagePath, 0775, true);\n }\n $files = scandir($storagePath, SCANDIR_SORT_DESCENDING);\n $countFiles = count($files)-2;\n if($countFiles == 0){\n $index = 1;\n $storeLogPath = $storagePath.'/laravel-'.$date.'-'.$index.'.log';\n }else{\n $index = $countFiles;\n $checkLogPath = $storagePath.'/laravel-'.$date.'-'.$index.'.log';\n $fileSize = self::formatBytes(\\File::size($checkLogPath),2);\n if(\\File::size($checkLogPath) > 5000000){\n $index = $countFiles+1;\n }\n $storeLogPath = $storagePath.'/laravel-'.$date.'-'.$index.'.log';\n }\n $log->useFiles(\n $storeLogPath,\n $this->logLevel()\n );\n }", "title": "" }, { "docid": "b79fc21e1ce27df42aa629a975eea6bf", "score": "0.4870897", "text": "static private function _initialiseLogging () {\n Log::setLogWriter(new Cmf_Startup_Log_Writer);\n }", "title": "" }, { "docid": "81baf4a4d6b673a75d876e2d0aa9d65f", "score": "0.48551795", "text": "protected function logger()\n {\n if (config('app.debug')) {\n Event::listen($this->loggable, function ($name, $event) {\n Log::debug($name.': '.json_encode(head($event)));\n });\n }\n }", "title": "" }, { "docid": "4e56ed629fa890662466463e961a9297", "score": "0.48520777", "text": "abstract protected function _load_configs();", "title": "" }, { "docid": "bb6794edd7f3feff1e592e398591d6d5", "score": "0.4845907", "text": "public function injectConfigurationManager(\\TYPO3\\Flow\\Configuration\\ConfigurationManager $configurationManager) {\n\t\t$this->configurationManager = $configurationManager;\n\t\t$this->matches = $this->configurationManager->getConfiguration(\\TYPO3\\Flow\\Configuration\\ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'Debug.Profiling.Classes');\n\t\tforeach ($this->matches as $key => $value) {\n\t\t\t$this->matches[$key] = ('/^' . str_replace('\\\\', '\\\\\\\\', $value)) . '$/';\n\t\t}\n\t}", "title": "" }, { "docid": "4c2d6e027f7e2b6d0da074c72f877579", "score": "0.4842575", "text": "public function scanForMessages()\n {\n $this->scanThemeConfigForMessages();\n $this->scanThemeTemplatesForMessages();\n $this->scanMailTemplatesForMessages();\n }", "title": "" }, { "docid": "ddc2c92c9b6e5345f267d57f21608ca6", "score": "0.48363757", "text": "private function loadAllConfigs(){\n $loader = $this->loader->setConfigPath(CONFIG);\n\n return $loader->loadConfigs();\n }", "title": "" }, { "docid": "c444cb49ab2040cd33e7489385abf862", "score": "0.4833951", "text": "function getConfigurationValues() ;", "title": "" }, { "docid": "9772a0a53fc8ef2415aeb0d5b8256902", "score": "0.48337647", "text": "public function register()\n {\n $logger = Log::getMonolog();\n if (is_null($logger) === false) {\n foreach ($logger->getHandlers() as $handler) {\n $handler->setLevel(config('app.log_level')); // Set the log level based on the config setting\n }\n }\n }", "title": "" }, { "docid": "07f581d461f6c0dd7056fc51d3d8bd43", "score": "0.48267296", "text": "protected function setUpConfig(): void\n\t{\n\t\tif ($this->app->runningInConsole()) {\n\t\t\tif ($this->app instanceof LaravelApplication) {\n\t\t\t\t$this->publishes([$this->configPath() => config_path('http-logger.php')], 'config');\n\t\t\t} else if ($this->app instanceof LumenApplication) {\n\t\t\t\t$this->app->configure('http-logger');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "57d3096926cf684248ae2964ce58cdbe", "score": "0.48250917", "text": "protected function configurationFor(string $name): array\n {\n $config = $this->container['config'][\"logger.channels.$name\"];\n\n if (null === $config) {\n throw new \\InvalidArgumentException(\"Logger [$name] is not defined.\");\n }\n\n return $config;\n }", "title": "" }, { "docid": "dc95589c06bf71d50afd7d3128498109", "score": "0.48243457", "text": "public function parseConfig() {\n $this->servers = array();\n foreach ($this->config->get('serverinfo', 'servers') as $server) {\n $server_parts = explode(\":\", $server);\n if (count($server_parts) != 2) {\n $this->logging->warning('Serverinfo: Invalid Server' . $server);\n continue;\n }\n if (filter_var($server_parts[0], FILTER_VALIDATE_IP)) {\n $this->servers[] = [\"ip\" => $server_parts[0], \"port\" => $server_parts[1]];\n }\n }\n }", "title": "" }, { "docid": "7c75306855be2d7ddf69341b4b768985", "score": "0.48006493", "text": "function find_all_ini_files(array $phpProperties)\n{\n $iniFilePaths = [];\n\n $addIniFiles = function ($path) use (&$iniFilePaths) {\n if (!is_dir($path)) {\n return;\n }\n foreach (scandir($path) as $ini) {\n if (!is_file($path . '/' . $ini) || substr($ini, -4) !== '.ini') {\n continue;\n }\n $iniFile = $path . '/' . $ini;\n if (strpos($ini, '98-ddtrace.ini') !== false) {\n array_unshift($iniFilePaths, $iniFile);\n } else {\n $iniFilePaths[] = $iniFile;\n }\n }\n };\n\n if ($phpProperties[INI_SCANDIR]) {\n $addIniFiles($phpProperties[INI_SCANDIR]);\n\n if (strpos($phpProperties[INI_SCANDIR], '/cli/conf.d') !== false) {\n /* debian based distros have INI folders split by SAPI, in a predefined way:\n * - <...>/cli/conf.d <-- we know this from php -i\n * - <...>/apache2/conf.d <-- we derive this from relative path\n * - <...>/fpm/conf.d <-- we derive this from relative path\n */\n $apacheConfd = str_replace('/cli/conf.d', '/apache2/conf.d', $phpProperties[INI_SCANDIR]);\n $addIniFiles($apacheConfd);\n }\n }\n\n if (isset($phpProperties[INI_MAIN]) && is_file($phpProperties[INI_MAIN])) {\n $iniFilePaths = [$phpProperties[INI_MAIN]];\n }\n\n return $iniFilePaths;\n}", "title": "" }, { "docid": "bf426ea523c39e43875ca143eaa1eb90", "score": "0.4794366", "text": "public static function loadConfiguration()\n {\n }", "title": "" }, { "docid": "3b3bea1785adc2da60b5a676b4f043b6", "score": "0.4792178", "text": "public static function configured() {\n\t\treturn array_keys(self::$_config);\n\t}", "title": "" }, { "docid": "5fab6952fc32fc074f0d861d508ebc75", "score": "0.47911075", "text": "private function _setupSystemLogger(){\n\t\ttry{\n\t\t\t$this->logger(WF::LOGGER)->info('System up and running');\n\t\t}catch (\\Exception $e){\n\t\t\t// ignore\n\t\t}\n\t}", "title": "" }, { "docid": "483fb6b6eca095aa5b95e6072ef674a2", "score": "0.47798938", "text": "private function loadXmlConfig() {\n $configurator = new \\LoggerConfiguratorDefault();\n $config = $configurator->parse(dirname(__FILE__) . '/' . self::CONFIG_XML_FILENAME);\n $this->rewriteLogDir($config);\n\n return $config;\n }", "title": "" }, { "docid": "7e4ee414a03c1402c0acc0d06a3f3382", "score": "0.4775755", "text": "public function initLog() {\n\t\tYii::getLogger()->autoFlush = 1;\n\t\tYii::getLogger()->autoDump = true;\n\n\t\t$logRoutes = array();\n\t\tif ($fileLogRoute = $this->createFileLogRoute()) {\n\t\t\t$logRoutes[] = $fileLogRoute;\n\t\t}\n\t\tif ($emailLogRoute = $this->createEmailLogRoute()) {\n\t\t\t$logRoutes[] = $emailLogRoute;\n\t\t}\n\n\t\tif (!empty($logRoutes)) {\n\t\t\tif (!Yii::app()->hasComponent('log')) {\n\t\t\t\t$logComponentConfig = array(\n\t\t\t\t\t'class' => 'CLogRouter',\n\t\t\t\t);\n\t\t\t\t$logComponent = Yii::createComponent($logComponentConfig);\n\t\t\t\t$logComponent->init();\n\t\t\t\tYii::app()->setComponent('log', $logComponent);\n\t\t\t}\n\t\t\t$logComponent = Yii::app()->getComponent('log');\n\t\t\t$logComponent->setRoutes($logRoutes);\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "78b57bdc85ddecf3c14da22146d432a7", "score": "0.47645795", "text": "public function getConfigurationValues() {}", "title": "" }, { "docid": "78b57bdc85ddecf3c14da22146d432a7", "score": "0.47645795", "text": "public function getConfigurationValues() {}", "title": "" }, { "docid": "78b57bdc85ddecf3c14da22146d432a7", "score": "0.47645795", "text": "public function getConfigurationValues() {}", "title": "" } ]
00c546af56ed705bf6a38f426438fd96
Method to set certain otherwise inaccessible properties of the form field object.
[ { "docid": "95645f703304099b78f9c4748ac4525f", "score": "0.0", "text": "public function __set($name, $value)\r\n\t{\r\n\t\tswitch ($name)\r\n\t\t{\r\n\t\t\tcase 'split':\r\n\t\t\t\t$value = (int) $value;\r\n\t\t\tcase 'control':\r\n\t\t\tcase 'format':\r\n\t\t\t\t$this->$name = (string) $value;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'keywords':\r\n\t\t\t\t$this->$name = (string) $value;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'exclude':\r\n\t\t\tcase 'colors':\r\n\t\t\t\t$this->$name = (string) $value;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tdefault:\r\n\t\t\t\tparent::__set($name, $value);\r\n\t\t}\r\n\t}", "title": "" } ]
[ { "docid": "6b0dc5898822b818b7668c8bc48336c6", "score": "0.7124907", "text": "public function settingFields();", "title": "" }, { "docid": "93fa3356d96534c1dc8763c208bc2d63", "score": "0.67599934", "text": "private function _set_fields()\n {\n @$this->form_data->training_id = 0;\n $this->form_data->start_date = date('d/m/Y');\n $this->form_data->end_date = date('d/m/Y', strtotime('1 month', time()));\n\n $this->form_data->filter_login = '';\n $this->form_data->filter_group = 0;\n $this->form_data->filter_status = '';\n $this->form_data->filter_approval_status = '';\n }", "title": "" }, { "docid": "85184c6e88eb5fa8e6afb62c1245cc0b", "score": "0.6289551", "text": "public function init_form_fields()\n\t{\n\t\t$this->form_fields = array(\n\t\t\t'enabled' => array(\n\t\t\t\t'default' => 'yes',\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "e9452f3ec23e23e962addf77c8fb9634", "score": "0.620233", "text": "private function _initialize_fields ()\r\n {\r\n $idDiner = $this->session->userdata['idDiner'];\r\n $this->form_data->idDiner = $idDiner;\r\n $this->form_data->street = '';\r\n $this->form_data->streetNumber = '';\r\n $this->form_data->mail = '';\r\n $this->form_data->phone = '';\r\n $this->form_data->description = '';\r\n $this->form_data->name = '';\r\n $this->form_data->link = '';\r\n $this->form_data->latitude = '';\r\n $this->form_data->longitude = '';\r\n \r\n }", "title": "" }, { "docid": "66c1e326488c7ad9e5ce2a1fda90581b", "score": "0.6189278", "text": "public function initFieldAttributes() {\n\t\t$configIn = Configs\\In::config();\n\t\t$custID = Configs\\Sys::custid();\n\n\t\t$attributes = self::FIELD_ATTRIBUTES;\n\t\t$attributes['productionbin']['disabled'] = $configIn->useControlbin() === false && $custID != 'ALUMAC';\n\t\t$this->fieldAttributes = $attributes;\n\t}", "title": "" }, { "docid": "394336f5b8e3f9d87349567929880ea3", "score": "0.6031324", "text": "private function setup( ){\n\t\t$this->fields = $this->formInstance->form->fields;\n\t\t\n\t\tforeach($this->fields as $fieldId => $object):\n\t\t\tif(isset($object->input->settings->html5) && $object->input->settings->html5_type == 'email' && $object->is_required ):\n\t\t\t\t$this->emailfields[] = $fieldId;\n\t\t\tendif;\n\t\t\tif(isset($object->input->settings->primary_email_recipient) && $object->is_required):\n\t\t\t\t$this->emailfields[] = $fieldId;\n\t\t\tendif;\n\t\t\tif(isset($object->input->settings->for_admin_email)):\n\t\t\t\t$this->emailfields[] = $fieldId;\n\t\t\tendif;\n\t\t\t\n\t\tendforeach;\n\n\t}", "title": "" }, { "docid": "365784234fb1d589f3ad72f77dc03df0", "score": "0.6016927", "text": "protected function set_fields($_fields) {\n $this->_fields = $_fields;\n }", "title": "" }, { "docid": "21cf826a4b5b1b726ec67d4a38c363bd", "score": "0.6007163", "text": "protected abstract function initFields();", "title": "" }, { "docid": "888d03cd3043201b97c4247155a96cea", "score": "0.59809697", "text": "public function setField($field){\n\t\t$this->_field = $field;\n\t}", "title": "" }, { "docid": "d49c927ff4ef48a1aeb2cb3d3c5e5d02", "score": "0.5968646", "text": "public function testGetAndSetDisallowedFields()\n {\n $fields = array('foo', 'bar', 'foobar');\n $return = $this->object->setDisallowedFields($fields);\n $this->assertSame($this->object, $return);\n $this->assertEquals($fields, $this->object->getDisallowedFields());\n }", "title": "" }, { "docid": "5a7dc0eea3b69f7ebc26163e46944a19", "score": "0.59481436", "text": "private function init_options() {\n\t\t// First set properties from default options if any have been set.\n\t\t$default_field_options = $this->get_default_options();\n\t\tif( ! empty( $default_field_options ) ) {\n\t\t\tforeach ( $default_field_options as $key => $value ) {\n\t\t\t\tif ( property_exists( $this, $key ) ) {\n\t\t\t\t\tif ( isset( $default_field_options[$key] ) ) {\n\t\t\t\t\t\t$this->$key = $value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$field_options = $this->field_options;\n\t\tforeach ( $field_options as $key => $value ) {\n\t\t\tif( property_exists( $this, $key ) ) {\n\t\t\t\tif ( isset( $field_options[$key] ) ) {\n\t\t\t\t\t$this->$key = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b0ccf4d3886bf5901b700fe8c9ef83a0", "score": "0.59457207", "text": "abstract protected function initFields();", "title": "" }, { "docid": "809b6a7ee5e03bd0d362f185d4be6d87", "score": "0.587794", "text": "public function setupFields() {\n $this->objectFields[\"id\"] = 0; // for testing we set the ID for tests which do not need the database.\n $this->objectFields[\"botType\"] = self::$BOT_TYPE_NAME;\n $this->objectFields[\"name\"] = \"\";\n $this->objectFields[\"description\"] = \"\";\n $this->objectFields[\"active\"] = 0;\n $this->objectFields[\"nickName\"] = \"\";\n }", "title": "" }, { "docid": "efc251b5ad93e34f3e481900786e7136", "score": "0.587784", "text": "private function setFieldsetAndMore()\n {\n // Set that collection\n if ($this->collection) {\n $this->collection = Content::collection($this->collection);\n }\n\n // Set that fieldset\n if ($this->fieldset) {\n $this->fieldset = Fieldset::get($this->fieldset);\n } elseif ($this->username) {//DANIELSON\n $user = $this->getUser();\n $this->fieldset = $user->fieldset();\n } elseif ($this->factory) {\n $this->fieldset = $this->factory->fieldset();\n } elseif ($this->collection) {\n $this->fieldset = $this->collection->fieldset();\n }\n\n // Drop any field that's not in the fieldset\n if ($this->fieldset && $this->getConfig('whitelist')) {\n $this->fields = array_intersect_key($this->fields, array_flip(array_keys($this->fieldset->fields())));\n }\n }", "title": "" }, { "docid": "12d1c89e0d6815cbf7028c667c3dbcb7", "score": "0.58638287", "text": "private function filter()\n {\n // Filter the HTML form data first\n foreach ($this->fields as $key => $field) {\n if (in_array($key, $this->meta)) {\n $this->{$key} = $field;\n unset($this->fields[$key]);\n }\n }\n\n // And override those with special meta fields set\n // on the tag itself as parameters\n if (array_get($this->fields, '_meta')) {\n $meta = Crypt::decrypt($this->fields['_meta']);\n\n foreach ($meta as $key => $field) {\n if (in_array($key, $this->meta)) {\n $this->{$key} = $field;\n }\n }\n unset($this->fields['_meta']);\n }\n }", "title": "" }, { "docid": "68830e5b83aec5e460b3d3fc3b65c3f2", "score": "0.5823761", "text": "protected function setRequiredFields()\n {\n $requiredFields = [\n 'email',\n 'redirect_url',\n 'document_supported_types',\n ];\n\n $this->requiredFields = Common::createArrayObject($requiredFields);\n }", "title": "" }, { "docid": "7c5f098b1c15380e5224215c4098394c", "score": "0.5809246", "text": "public function setField($field);", "title": "" }, { "docid": "7c5f098b1c15380e5224215c4098394c", "score": "0.5809246", "text": "public function setField($field);", "title": "" }, { "docid": "e8df64a39eac00530d2ac77eeab9f873", "score": "0.5802972", "text": "function clearInvalidOptionnalFields()\r\n {\r\n $fields = $this->getRequestFields();\r\n foreach ($fields as $field) {\r\n if (!$field->isValid() && !$field->isRequired()) {\r\n $field->setValue(null);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "ef64fddd5d43df68c126f0d073323321", "score": "0.5784396", "text": "protected function setRequiredFields()\n {\n $requiredFields = [\n 'start_date'\n ];\n\n $this->requiredFields = Common::createArrayObject($requiredFields);\n }", "title": "" }, { "docid": "d4c29fe261135b89694471f3db891300", "score": "0.57792914", "text": "function _reset_old_fields_data()\n {\n // if empty assign form field with old values\n $this->B->form_forename = htmlspecialchars(commonUtil::stripSlashes($_POST['forename']));\n $this->B->form_lastname = htmlspecialchars(commonUtil::stripSlashes($_POST['lastname']));\n $this->B->form_email = htmlspecialchars(commonUtil::stripSlashes($_POST['email']));\n $this->B->form_login = htmlspecialchars(commonUtil::stripSlashes($_POST['login']));\n $this->B->form_passwd = htmlspecialchars(commonUtil::stripSlashes($_POST['passwd'])); \n }", "title": "" }, { "docid": "761148c6cb332e72d1ce02198c61e0c9", "score": "0.57639414", "text": "protected function setFieldsTypes()\n {\n }", "title": "" }, { "docid": "5bb83bb7c99d237804fd549a4c541b70", "score": "0.57518715", "text": "public function item_custom_fields_to_form() {\n // 1. special management for fields equipped with \"free\" checkbox\n // nothing to do: they don't exist in this plugin\n\n // 2. special management for composite fields\n $fieldlist = $this->item_composite_fields();\n foreach ($fieldlist as $field) {\n $agearray = $this->item_split_unix_time($this->{$field});\n $this->{$field.'_year'} = $agearray['year'];\n $this->{$field.'_month'} = $agearray['mon'];\n }\n\n // 3. special management for defaultvalue\n if (!isset($this->defaultvalue)) {\n $this->defaultoption = SURVEY_NOANSWERDEFAULT;\n } else {\n if ($this->defaultvalue == SURVEY_INVITATIONDBVALUE) {\n $this->defaultoption = SURVEY_INVITATIONDEFAULT;\n } else {\n $this->defaultoption = SURVEY_CUSTOMDEFAULT;\n }\n }\n }", "title": "" }, { "docid": "9fa21822567c98a132560ab27237ed32", "score": "0.57449603", "text": "public function setFields ($fields)\n {\n $this->_fields = $fields;\n }", "title": "" }, { "docid": "7ef6aa25f6db0e03a3d9616c8f7da538", "score": "0.57302797", "text": "public function setSignupFields()\n {\n $this->user = new User();\n foreach ($this->user->fieldList() as $field)\n {\n if (isset($this->request[$field]))\n {\n $this->user->set($field, $this->safeInput($this->request[$field]));\n }\n else\n {\n $this->user->set($field, null);\n }\n }\n \n /** Additonal control to obtain the birthdate. **/\n if(isset($this->request[\"year\"]) && isset($this->request[\"month\"]) && isset($this->request[\"day\"]))\n {\n $birthdate = $this->getDate($this->safeInput($this->request[\"year\"]), \n $this->safeInput($this->request[\"month\"]), \n $this->safeInput($this->request[\"day\"]));\n }\n else\n {\n $birthdate = null;\n }\n $this->user->set(\"birthdate\", $birthdate);\n }", "title": "" }, { "docid": "9173ac1c006e666e7a7c3a2edbe508d0", "score": "0.5726522", "text": "public function setSiteRegisteredFieldMeta() {\r\n\t\t$this->control->init();\r\n\t\t$this->control->fieldMeta[\"EmailAddress\"]->allowNull = false;\r\n\t\t$this->control->fieldMeta[\"Password\"]->required = FM_STORE_ALWAYS;\r\n\t\t$this->control->fieldMeta[\"Password\"]->allowNull = false;\r\n\t}", "title": "" }, { "docid": "810f82f6620499939f6e7389291159e1", "score": "0.57163525", "text": "public function setFields($f){\n\t\t$this->fields = $f;\n\t}", "title": "" }, { "docid": "8a1357a73a22a8ba7ab8af6e0d8d4a4b", "score": "0.5711681", "text": "private function setFields(&$model): void\n {\n $fields = $model->getFields();\n $model->attributes = (new \\stdClass());\n\n if (!empty($fields)) {\n foreach ($fields as $field => $type) {\n $model->attributes->$field = null;\n }\n }\n }", "title": "" }, { "docid": "6794d37fd050049a04aed854b41c455a", "score": "0.57057774", "text": "private function __setFields()\n\t{\n\t\t// set fields if field patterns exist\n\t\tif($this->success && count($this->__fields) < 1 && count($this->__fields_and_patterns) > 0)\n\t\t{\n\t\t\t// parse each field value with pattern\n\t\t\tforeach($this->__fields_and_patterns as $field_id => $pattern)\n\t\t\t{\n\t\t\t\tpreg_match_all('/' . $pattern . '/Uism', $this->getHttpResponse()->getBody(), $m);\n\n\t\t\t\tif(isset($m[1])) // set document field values\n\t\t\t\t{\n\t\t\t\t\t$this->__fields[$field_id] = &$m[1];\n\t\t\t\t}\n\n\t\t\t\t// set document field raw values if required\n\t\t\t\tif(isset($m[0]) && WebBot::$conf_include_document_field_raw_values)\n\t\t\t\t{\n\t\t\t\t\t$this->__fields[$field_id]['raw'] = $m[0];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b0bf1f03cc1ce578f787d9d9274a6070", "score": "0.57010996", "text": "private function resetInputFields(){\n $this->domain = '';\n $this->user_id = '';\n }", "title": "" }, { "docid": "5084ba58f379ac4d1fbadee527db309d", "score": "0.5694137", "text": "public function setField(Field $field) {\n\t\t$this->field = $field; \n\t}", "title": "" }, { "docid": "5084ba58f379ac4d1fbadee527db309d", "score": "0.5694137", "text": "public function setField(Field $field) {\n\t\t$this->field = $field; \n\t}", "title": "" }, { "docid": "5084ba58f379ac4d1fbadee527db309d", "score": "0.5694137", "text": "public function setField(Field $field) {\n\t\t$this->field = $field; \n\t}", "title": "" }, { "docid": "405ea473d92f0b8a0f823790e749e7f4", "score": "0.56900966", "text": "protected function setMandatoryProperties()\n {\n $this->mandatoryProperties = ['uploadId','name'];\n }", "title": "" }, { "docid": "37e344a59c0a1c46faa828550f6e43b7", "score": "0.5688836", "text": "public function setField($field)\n {\n $this->_field = $field;\n }", "title": "" }, { "docid": "90b485d1e849b07ad9523d5d836a1625", "score": "0.5648546", "text": "function set_input_attrs( $fields ) {\n\n\t\tunset($fields['billing']['billing_address_1']);\n\t\tunset($fields['billing']['billing_address_2']);\n\t\tunset($fields['billing']['billing_city']);\n\t\tunset($fields['billing']['billing_state']);\n\t\tunset($fields['billing']['billing_postcode']);\n\t\tunset($fields['billing']['billing_company']);\n\t\t//unset($fields['billing']['billing_phone']);\n\t\tunset($fields['shipping']);\n\t\tunset($fields['order'][\"order_comments\"]);\n\n\t\t/*echo \"<pre style='font-size: 11px;'>\";\n\t\t\tprint_r($fields);\n\t\techo \"</pre>\";*/\n\n\t \treturn $fields;\n\t}", "title": "" }, { "docid": "45dbe0acb066488156db4175cbbc5451", "score": "0.5646737", "text": "private function _default_fields()\n\t{\n\t\tif (@$this->entry) $this->form->hidden('entry_id', $this->entry->id);\n\t\t\n\t\t\n\t\t$this->form->hidden('status', (@$this->entry) ? $this->entry->status : 'draft')\n\t\t ->hidden('parent_id', (@$this->entry) ? $this->entry->parent_id : null)\n\t\t ->hidden('user_id', user_id())\n\t\t ->hidden('in_categories', $this->_in_category_ids(Backend::$data->in_categories))\n\t\t ->hidden('active_field_group', null)\n\t\t ->hidden('published_at', (@$this->entry) ? date('Y/m/d H:i', $this->entry->published_at) : null)\n\t\t ->hidden('channel', $this->channel->slug)\n\t\t; // end form\n\n\t\t\n\t}", "title": "" }, { "docid": "6e298813b772bcdd9c17cb836739f4c7", "score": "0.5642909", "text": "protected static function setFields()\n {\n return array();\n }", "title": "" }, { "docid": "6d15d75781604978ee46078e5876c67c", "score": "0.56373733", "text": "public function testGetAndSetAllowedFields()\n {\n $fields = array('foo', 'bar', 'foobar');\n $return = $this->object->setAllowedFields($fields);\n $this->assertSame($this->object, $return);\n $this->assertEquals($fields, $this->object->getAllowedFields());\n }", "title": "" }, { "docid": "2d7e7621a17c4866adff9652dd59fa49", "score": "0.56066346", "text": "public function _extend()\n\t{\n\t\t$this->properties['type'] = 'hidden';\n\t}", "title": "" }, { "docid": "d95c951a655d023116ea829afdf34cd7", "score": "0.56009", "text": "function load_field( $field ) {\n\n\t\t\t// remove name to avoid caching issue\n\t\t\t$field['name'] = '';\n\n\t\t\t// remove required to avoid JS issues\n\t\t\t$field['required'] = 0;\n\n\t\t\t// set value other than 'null' to avoid ACF loading / caching issue\n\t\t\t$field['value'] = false;\n\n\t\t\t// return\n\t\t\treturn $field;\n\t\t}", "title": "" }, { "docid": "a4b1cbeeb20001d18445fceb19781d8d", "score": "0.55922604", "text": "#[Request('setProperty')]\n private function setProperty(): void\n {\n $this->preservedInputs = $_POST;\n $this->preservedFiles = $_FILES;\n $this->preservedInputsCount = is_countable($_POST) ? count($_POST) : 0;\n $this->preservedFilesCount = is_countable($_FILES) ? count($_FILES) : 0;\n\n self::loopPost();\n self::loopFile();\n }", "title": "" }, { "docid": "edb6535f31c0383ca1264c71cece2aca", "score": "0.5586249", "text": "final public function __set( $field, $value ) {\n\t\t\tif( $field === 'lang' ) {\n\t\t\t\t$this->setLang($value);\n\t\t\t}\n\t\t\telseif( $field === 'charset' ) {\n\t\t\t\t$this->setCharset($value);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new \\System\\Base\\BadMemberCallException(\"call to undefined property `{$field}` in `\".get_class($this).\"`\");\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "b1a7f4e3de558109f1979fd8073afdbc", "score": "0.5580663", "text": "protected function setAttributes()\n {\n foreach ($this->attributes as $attr => $val) {\n $this->input->attribute($attr, $val);\n }\n }", "title": "" }, { "docid": "aaeb5587db4755fb5b2f873a4349dd94", "score": "0.55785304", "text": "protected function setCommonCardFields(): void\n\t{\n\t\t$this->getKanban()->removeUserAdditionalSelectFields();\n\t}", "title": "" }, { "docid": "459617782e3a3c5f7d2050cf11dc015f", "score": "0.5565772", "text": "public function testSetField()\n {\n }", "title": "" }, { "docid": "a206fe3efd2ee81888b38195aca51982", "score": "0.55603904", "text": "function __set($field, $value)\n\t\t{\n\t\t\t$this->_fields[$field]->setValue($value);\n\t\t}", "title": "" }, { "docid": "f4c4fb8a54d1dbdd5fd7af592213256e", "score": "0.5551801", "text": "public function setAllProperties()\n {\n $this->properties = $this->validProperties;\n \t\treturn $this;\n }", "title": "" }, { "docid": "6bf7bee6a9df782c431dc53669c35764", "score": "0.5533425", "text": "function og_property_info_alter($wrapper, $info) {\n $property_info = $wrapper->info();\n $field_name = $property_info['field name'];\n $info['properties'][$field_name]['required'] = FALSE;\n return $info;\n}", "title": "" }, { "docid": "ee4d0d3160789954e59cdb315ca89005", "score": "0.55324864", "text": "protected function setDefaults()\n {\n $this->_name = $this->name;\n $this->_prepare = 0;\n $this->_valid = 0;\n $this->hooks = [];\n\n $this->type('text');\n $this->key('');\n $this->label((string)ConvertString::from($this->name)->toTitleCase());\n $this->metaQuery('CHAR');\n /* (int) Whether or not the field value is required. Defaults to 0 */\n $this->required(0);\n\n /* hack - cant seem to figure out how ACF adds _name to locally imported groups.\n This is needed by the acf_format_value function */\n $this->append('');\n $this->prepend('');\n\n /* (string) Unique identifier for the field. Must begin with 'field_' */\n $this->instructions('');\n\n /* (int) read Only. Defaults to 0 */\n $this->readOnly(0);\n\n /* (mixed) Conditionally hide or show this field based on other field's values.\n Best to use the ACF UI and export to understand the array structure. Defaults to 0 */\n $this->conditionalLogic(0);\n\n /* (array) An array of attributes given to the field element */\n $this->wrapperWidth('');\n $this->wrapperClass('');\n $this->id('');\n\n /* (mixed) A default value used by ACF if no value has yet been saved */\n $this->default('');\n\n /* Genie Defaults */\n $this->hidden(false);\n\n /* Does this field not have any input? Tab & Message */\n $this->displayOnly(false);\n\n /* WordPress post field to override on save (e.g post_title) */\n $this->override(false);\n }", "title": "" }, { "docid": "74184feaf4c96355d817cca4f0d4a441", "score": "0.5528467", "text": "public function setAccessible($accessible);", "title": "" }, { "docid": "620288a3afb69210857000dfef54be47", "score": "0.5521095", "text": "function init_form_fields() {\n\t\tparent::init_form_fields();\n\n\t\t$this->form_fields['enabled']['label'] = __( 'Enable Direct Debit (mandate via iDEAL)', 'pronamic_ideal' );\n\t\t$this->form_fields['description']['default'] = __( 'By using this payment method you authorize us via iDEAL to debit payments from your bank account.', 'pronamic_ideal' );\n\t\t$this->form_fields['icon']['default'] = plugins_url( 'images/sepa-ideal/wc-sepa-ideal.png', Pronamic_WP_Pay_Plugin::$file );\n\t}", "title": "" }, { "docid": "da79821ea5edff3023d3b89fd80717d2", "score": "0.5513045", "text": "public function setFacebookRegisteredFieldMeta() {\r\n\t\t$this->control->init();\r\n\t\t$this->control->fieldMeta[\"FacebookId\"]->allowNull = false;\r\n\t\t$this->control->fieldMeta[\"Password\"]->allowNull = true;\r\n\t}", "title": "" }, { "docid": "acf410ed6ad720575a2a43675358557d", "score": "0.5508066", "text": "public static function setters();", "title": "" }, { "docid": "acf410ed6ad720575a2a43675358557d", "score": "0.5508066", "text": "public static function setters();", "title": "" }, { "docid": "acf410ed6ad720575a2a43675358557d", "score": "0.5508066", "text": "public static function setters();", "title": "" }, { "docid": "acf410ed6ad720575a2a43675358557d", "score": "0.5508066", "text": "public static function setters();", "title": "" }, { "docid": "acf410ed6ad720575a2a43675358557d", "score": "0.5508066", "text": "public static function setters();", "title": "" }, { "docid": "acf410ed6ad720575a2a43675358557d", "score": "0.5508066", "text": "public static function setters();", "title": "" }, { "docid": "acf410ed6ad720575a2a43675358557d", "score": "0.5508066", "text": "public static function setters();", "title": "" }, { "docid": "452e5621ff96b29a285c806a42cc8885", "score": "0.5504222", "text": "private function resetInputFields(){\n $this->name = '';\n $this->sort = '';\n $this->personalValueId = '';\n }", "title": "" }, { "docid": "e4f5ebc9d1f179d080cf7f5f082a8b8e", "score": "0.549094", "text": "public function setWebFormFields(array $input) {\n foreach (self::$properties as $key) {\n if (array_key_exists($key, $input)) {\n $this->$key = $input[$key];\n }\n }\n\n /*Empty checkboxes are not sent in POST data and so must be handled differently*/\n if (isset($input['corrective_action_applied'])) {\n // Make sure all fields are reset\n $this->corrective_action_applied = 1;\n $this->corrective_action_implementation = '';\n } else {\n $this->corrective_action_applied = 0;\n }\n\n //If the completed on field is not set, it will set to a value of 0000-00-00 instead of NULL as it should be \n // This addresses that issue\n if($input['completed_on']=='') {\n $this->completed_on = NULL;\n }\n \n $this->hazard_activity_id = $input['hazard_activity_id'];\n\n return $this;\n }", "title": "" }, { "docid": "51a624358376c0a92ac4e1cbc38e78b9", "score": "0.5490376", "text": "private function resetInputFields(){\n $this->name = '';\n $this->description = '';\n }", "title": "" }, { "docid": "68b8dbf30141d5b1de806052e2684f98", "score": "0.5488805", "text": "public function setField($fieldName, $value);", "title": "" }, { "docid": "8d0420eda59a25fa83dec826a1578fe0", "score": "0.54868644", "text": "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_usuario('');\n $this->setUsuario('');\n $this->setPassword('');\n $this->setEmail('');\n $this->setId_pau('');\n $this->setNom_usuario('');\n $this->setId_role('');\n $this->setPrimary_key($aPK);\n }", "title": "" }, { "docid": "cd1f821b9c9185679e34cc43c96fdfbb", "score": "0.5454277", "text": "protected function initFields()\n {\n $this->fields = new Collection();\n }", "title": "" }, { "docid": "180e82448d420ab0335ed03618b6ab52", "score": "0.544776", "text": "public function setValues()\n {\n $fields = Field::find()\n ->select('id,name,title,type_id,is_multilingual,is_active')\n ->with('fieldValue')\n ->with(['fieldValues' => function ($query) {\n return $query->indexBy('language');\n }])\n ->with(['fieldType' => function ($query) {\n return $query->select('id,name,is_file_upload');\n }])\n ->indexBy('name')\n ->asArray()\n ->all();\n $this->_values = $fields;\n }", "title": "" }, { "docid": "52c72d5758ee98e3f1b417b2d06122b0", "score": "0.5446049", "text": "protected function _setAttribsForm()\n {\n $this->_attribs_form = array_merge(\n (array) $this->_default_attribs,\n (array) $this->_config['attribs'],\n (array) $this->_attribs_auto,\n (array) $this->_attribs_view\n );\n }", "title": "" }, { "docid": "d0fd210dd19676ceefbcba1889d8da6c", "score": "0.5429696", "text": "public function resetFields()\n {\n $this->name = '';\n $this->email = '';\n $this->phone_number = '';\n $this->status = '';\n $this->member_id = '';\n }", "title": "" }, { "docid": "c6c8b282f7ba09e2a9dc0a108a03f762", "score": "0.5423638", "text": "function setFields(array $fields);", "title": "" }, { "docid": "a5e1ae75985c12af7dff69491d5ba69c", "score": "0.54147047", "text": "public function init() {\n\n $this->set_field(\n 'form',\n array(\n 'validators' => array(\n 'is_string',\n 'cmp' => array(\n array(\n 'like' => 'update_enabled_post_types',\n ),\n ),\n ),\n )\n );\n\n $this->set_field(\n 'action',\n array(\n 'validators' => array(\n 'is_string',\n 'cmp' => array(\n array(\n 'eq' => 'laterpay_enabled_post_types',\n ),\n ),\n ),\n )\n );\n\n $this->set_field(\n '_wpnonce',\n array(\n 'validators' => array(\n 'is_string',\n 'cmp' => array(\n array(\n 'ne' => null,\n ),\n ),\n ),\n )\n );\n\n $this->set_field(\n 'laterpay_enabled_post_types',\n array(\n 'can_be_null' => true,\n )\n );\n\n }", "title": "" }, { "docid": "85c0518fb2f2f3a0458b7d35635dbf10", "score": "0.5414473", "text": "protected function setFieldOriginalValue()\n {\n $data = $this->model()->toArray();\n\n $this->builder->fields()->each(function (Field $field) use ($data) {\n $field->setOriginal($data);\n });\n }", "title": "" }, { "docid": "ecee622d0f40d4d8987094a7c818d6cd", "score": "0.5405062", "text": "protected function setFields($inFields)\n {\n $this->fields = $inFields;\n }", "title": "" }, { "docid": "28be84ad6e999e367e8c578e4d0e6e04", "score": "0.5404331", "text": "protected function setForm(array $fields): void\n {\n foreach ($fields as $tab => $data) {\n for ($i = 0; $i < count($data); $i++) {\n if (!isset($fields[$tab][$i]['attrs'])) {\n $fields[$tab][$i]['attrs'] = [];\n }\n }\n }\n\n $this->formFields = $fields;\n }", "title": "" }, { "docid": "8387df7d7aa147ecfbecf6f8e822eabc", "score": "0.5401801", "text": "public function prepareVars()\n {\n $this->vars['field'] = $this->makeFormField();\n }", "title": "" }, { "docid": "284171cc09ba11f83048b824f8d75b3e", "score": "0.5400186", "text": "public function setAttributes()\n {\n $attrs = [\n 'value',\n 'type',\n 'placeholder',\n ];\n\n foreach ($attrs as $attr) {\n //We Check to see if Attribute is present in inputString\n \\preg_match(\"/{$attr}.*?=.*?[\\\"|'](.*?)[\\\"|']/smi\", $this->inputString, $match);\n if(\\count($match) > 1) {\n $this->$attr = $match[1];\n }\n }\n }", "title": "" }, { "docid": "9a158d278019531bf25edaa671e572fb", "score": "0.5396064", "text": "private function resetInputFields(){\n $this->city = '';\n $this->airline = '';\n $this->flight_id = '';\n $this->arrival = '';\n $this->user_id = '';\n }", "title": "" }, { "docid": "1737b4fee21aa630517b80be6ecde3aa", "score": "0.5377831", "text": "private function resetInputFields(){\n $this->title = '';\n $this->company_id = '';\n }", "title": "" }, { "docid": "cacdc63bbeadb32944acee043bf76c3d", "score": "0.5377655", "text": "function setNullAllAtributes()\n {\n $this->setId_schema('');\n $this->setId_tipo_activ('');\n $this->setNombre('');\n $this->setId_tipo_proceso_sv('');\n $this->setId_tipo_proceso_ex_sv('');\n $this->setId_tipo_proceso_sf('');\n $this->setId_tipo_proceso_ex_sf('');\n }", "title": "" }, { "docid": "de8ddee6a6b6cefbd9af77389dbadeb5", "score": "0.5376514", "text": "public function setField($name)\n {\n $this->field = $name;\n }", "title": "" }, { "docid": "3dcbca2dcaf3fe0c53382b0d79fbb66d", "score": "0.536776", "text": "public function resetFields()\n {\n $this->forum_id = '';\n $this->nama = '';\n $this->tgl = '';\n $this->foto = '';\n $this->semester = '';\n $this->users_id = '';\n }", "title": "" }, { "docid": "2227a40e4018ffdb75bbe70a14cda5ec", "score": "0.5362998", "text": "private function setAttributesToField(\\FormularField $Field, array &$options) {\n\t\tif (!empty($options['unit']))\n\t\t\t$Field->setUnit($options['unit']);\n\n\t\tif (!empty($options['size']))\n\t\t\t$Field->setSize($options['size']);\n\n\t\tif (!empty($options['css']))\n\t\t\t$Field->addLayoutClass($options['css']);\n\n\t\tif (!empty($options['layout']))\n\t\t\t$Field->setLayout($options['layout']);\n\t}", "title": "" }, { "docid": "9ff8b23ccc169b17e851086a4adecb70", "score": "0.5361456", "text": "public function set() {\n\n\t\tself::$instance = $this;\n\t\t$this->base \t= OMAPI::get_instance();\n\t\t$this->fields = apply_filters( 'optin_monster_api_output_fields', $this->fields );\n\n\t}", "title": "" }, { "docid": "2d4448da7a36b13a5c7f7eaffdee0e6a", "score": "0.53608376", "text": "public function init_form_fields()\n {\n $this->form_fields = array(\n 'enabled' => array(\n 'title' => 'Enable/Disable',\n 'type' => 'checkbox',\n 'label' => 'Enable this email notification',\n 'default' => 'yes'\n ),\n 'subject' => array(\n 'title' => 'Subject',\n 'type' => 'text',\n 'description' => sprintf('Deixar en blanc per fer servir el valor per defecte: <code>%s</code>.', $this->subject),\n 'placeholder' => '',\n 'default' => ''\n ),\n 'heading' => array(\n 'title' => 'Email Heading',\n 'type' => 'text',\n 'description' => sprintf(__('Deixar en blanc per fer servir el valor per defecte: <code>%s</code>.'), $this->heading),\n 'placeholder' => '',\n 'default' => ''\n ),\n 'email_type' => array(\n 'title' => 'Email type',\n 'type' => 'select',\n 'description' => \"Format d'enviament.\",\n 'default' => 'html',\n 'class' => 'email_type',\n 'options' => array(\n 'plain'\t => __('Text Pla', 'woocommerce'),\n 'html' \t => __('HTML', 'woocommerce')\n )\n )\n );\n }", "title": "" }, { "docid": "69216aaec7a312375eaddb5a3188da46", "score": "0.5345347", "text": "public function setFieldName($field_name);", "title": "" }, { "docid": "2e47fe3309c3f1e8ad70bcde1d50939d", "score": "0.53436196", "text": "function __construct()\n {\n for($i = 0; $i < count($this->Hidden); $i++)\n {\n $this->HiddenProperties[$this->Hidden[$i]] = null;\n }\n }", "title": "" }, { "docid": "724cfa5ba0f42261de2b749f28883566", "score": "0.5340291", "text": "function doesoe_admin_hide_field($field, &$form) {\n switch ($field) {\n\n // Authoring information.\n case 'author':\n $form['author']['#access'] = FALSE;\n break;\n\n // Book outline.\n case 'book':\n $form['book']['#access'] = FALSE;\n break;\n\n // Comment settings.\n case 'comment':\n $form['comment_settings']['#access'] = FALSE;\n break;\n\n // Contact settings.\n case 'contact':\n $form['contact']['#access'] = FALSE;\n break;\n\n // Menu settings.\n case 'menu':\n $form['menu']['#access'] = FALSE;\n break;\n\n // Meta tags.\n case 'metatag':\n $form['metatags']['#access'] = FALSE;\n break;\n\n // Publishing options.\n case 'options':\n $form['options']['#access'] = FALSE;\n break;\n\n // Administrative overlay.\n case 'overlay':\n $form['overlay_control']['#access'] = FALSE;\n break;\n\n // URL path settings.\n case 'path':\n $form['path']['#access'] = FALSE;\n break;\n\n // Revision information.\n case 'revision':\n $form['revision_information']['#access'] = FALSE;\n break;\n\n // Status.\n case 'status':\n $form['account']['status']['#access'] = FALSE;\n break;\n\n // XML sitemap.\n case 'xmlsitemap':\n $form['xmlsitemap']['#access'] = FALSE;\n break;\n\n // Machine Name.\n case 'machine_name_fs':\n $form['machine_name_fs']['#access'] = FALSE;\n break;\n\n // URL redirects.\n case 'redirect':\n $form['redirect']['#access'] = FALSE;\n break;\n\n }\n}", "title": "" }, { "docid": "f824a53c310e171205cf9bd397285a1b", "score": "0.5337581", "text": "public function setFields($fields)\n {\n $this->fields = $fields;\n }", "title": "" }, { "docid": "ac873b69fac7cb8d0f5f478531146b86", "score": "0.53340036", "text": "public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['field'] = $this->formField;\n }", "title": "" }, { "docid": "902221b6a39dabde89bdbe749a6ec4b3", "score": "0.5328641", "text": "public function __construct(\\Foundation\\Form\\Field $field)\n {\n parent::__construct($field);\n $this->value = array();\n }", "title": "" }, { "docid": "f5730b8d793db20dd2f52d585bb5af60", "score": "0.5328086", "text": "protected function setValues()\n {\n $this->values = [\n 'firstName' => $this->user->getFirstName(),\n 'lastName' => $this->user->getLastName(),\n 'userName' => $this->user->getUserName(),\n 'password' => $this->user->getPassword(),\n 'email' => $this->user->getEmail(),\n 'isAdmin' => $this->user->isAdmin()\n ];\n }", "title": "" }, { "docid": "533545219123ac08940e7bd1538fdb9f", "score": "0.53267515", "text": "private function resetInputFields()\n {\n $this->title = '';\n $this->description = '';\n $this->message_id = '';\n }", "title": "" }, { "docid": "6a5e7f14769d693efa4301175209b871", "score": "0.5325323", "text": "public function init_form_fields() {\n $this->form_fields = [\n 'shopcode' => [\n 'title' => 'Shop zipcode',\n 'type' => 'text',\n 'description' => 'For this plugin, you need a shop zipcode.',\n 'default' => '41265'\n ]\n ];\n }", "title": "" }, { "docid": "c2e45a02cfda0fad7f1e6e1aa7a3f9b9", "score": "0.5324067", "text": "protected function setExtraFields($fieldName, $fieldData)\n {\n $this->loadExtraFields();\n //====================================================================//\n // Check is Extra Field\n if (!$this->isExtraType($fieldName)) {\n return;\n }\n //====================================================================//\n // Extract Field Data\n $currentData = $this->getExtraData($fieldName);\n //====================================================================//\n // READ Field Data\n switch ($this->getSplashTypeFromId($fieldName)) {\n case SPL_T_VARCHAR:\n case SPL_T_TEXT:\n case SPL_T_DATE:\n case SPL_T_PHONE:\n case SPL_T_URL:\n case SPL_T_EMAIL:\n case SPL_T_INT:\n case SPL_T_DOUBLE:\n case SPL_T_BOOL:\n if ($currentData != $fieldData) {\n $this->object->array_options[$fieldName] = $fieldData;\n $this->needUpdate();\n }\n\n break;\n case SPL_T_DATETIME:\n if ($currentData != $fieldData) {\n date_default_timezone_set('UTC');\n $this->object->array_options[$fieldName] = $fieldData;\n $this->needUpdate();\n }\n\n break;\n case SPL_T_PRICE:\n $priceHT = self::prices()->TaxExcluded($fieldData);\n if ($currentData != $priceHT) {\n $this->object->array_options[$fieldName] = $priceHT;\n $this->needUpdate();\n }\n\n break;\n default:\n return;\n }\n\n unset($this->in[$fieldName]);\n }", "title": "" }, { "docid": "b6c5dc3f435d9a3053ae8f1600fa7eaf", "score": "0.5322178", "text": "public function set_properties( $request ) {\n\t\t$this->start = isset( $request['start'] ) ? sanitize_text_field( $request['start'] ) : '';\n\t\t$this->end = isset( $request['end'] ) ? sanitize_text_field( $request['end'] ) : '';\n\t\t$this->status = isset( $request['status'] ) ? sanitize_text_field( $request['status'] ) : 'complete';\n\t\t$this->categories = isset( $request['give_forms_categories'] ) ? give_clean( $request['give_forms_categories'] ) : array();\n\t\t$this->tags = isset( $request['give_forms_tags'] ) ? give_clean( $request['give_forms_tags'] ) : array();\n\t}", "title": "" }, { "docid": "9009d771df48b222084082bb0d5507bc", "score": "0.5316137", "text": "protected function get_settings_fields()\n {\n }", "title": "" }, { "docid": "a6ad47927bba335ee3c72d9bf80c2a4f", "score": "0.5316042", "text": "function init_form_fields()\n {\n $this->form_fields = array(\n 'enabled' => array(\n 'title' => esc_attr__('Enable/Disable', 'woocommerce'),\n 'type' => 'checkbox',\n 'label' => esc_attr__('Enable CreditCard Payment', 'woocommerce'),\n 'default' => 'yes'\n ),\n 'title' => array(\n 'title' => __('Title', 'woocommerce'),\n 'type' => 'text',\n 'description' => esc_attr__('The title that the user sees during the checkout process.',\n 'woocommerce'),\n 'default' => esc_attr__(\n UP_AFFILIATE_MANAGER_CREDITCARD_PAYMENT_TITLE,\n UP_AFFILIATE_MANAGER_PROJECT\n ),\n 'desc_tip' => true,\n ),\n 'description' => array(\n 'title' => esc_attr__('Description', 'woocommerce'),\n 'type' => 'textarea',\n 'description' => esc_attr__('Description of the payment method that the client will see on your website.',\n 'woocommerce'),\n 'default' => 'You can pay with your credit / debit card',\n\n ),\n );\n }", "title": "" }, { "docid": "41f35b7df78d683f8768599b2d0e2562", "score": "0.53153247", "text": "function init()\n {\n $this->defineAttribute( 'customValidation', false, NULL, COMPONENT_TYPE_STRING);\n $this->defineAttribute( 'newCode', false, false, COMPONENT_TYPE_BOOLEAN);\n $this->defineAttribute( 'initJS', false, true, COMPONENT_TYPE_BOOLEAN);\n\n // call the superclass for validate the attributes\n parent::init();\n\n $this->setAttribute( 'addValidationJs', false );\n $this->setAttribute('cssClass', ' formEdit', true);\n }", "title": "" }, { "docid": "41f35b7df78d683f8768599b2d0e2562", "score": "0.53153247", "text": "function init()\n {\n $this->defineAttribute( 'customValidation', false, NULL, COMPONENT_TYPE_STRING);\n $this->defineAttribute( 'newCode', false, false, COMPONENT_TYPE_BOOLEAN);\n $this->defineAttribute( 'initJS', false, true, COMPONENT_TYPE_BOOLEAN);\n\n // call the superclass for validate the attributes\n parent::init();\n\n $this->setAttribute( 'addValidationJs', false );\n $this->setAttribute('cssClass', ' formEdit', true);\n }", "title": "" }, { "docid": "67648b7cc1c013deb69747420079e3f1", "score": "0.5308455", "text": "protected function setRequiredFields()\n {\n $requiredFields = [\n 'transaction_id',\n 'payment_type',\n 'token_version',\n 'token_data',\n 'token_signature',\n 'token_ephemeral_public_key',\n 'token_public_key_hash',\n 'token_transaction_id',\n 'token_display_name',\n 'token_network',\n 'token_type',\n 'token_transaction_identifier',\n 'amount',\n 'currency'\n ];\n\n $this->requiredFields = \\Genesis\\Utils\\Common::createArrayObject($requiredFields);\n\n $requiredFieldValues = array_merge(\n [\n 'currency' => \\Genesis\\Utils\\Currency::getList(),\n 'payment_type' => ApplePayParameters::getAllowedPaymentTypes()\n ]\n );\n\n $this->requiredFieldValues = \\Genesis\\Utils\\Common::createArrayObject($requiredFieldValues);\n }", "title": "" }, { "docid": "1f051a50aa1850124792e4d853f1e349", "score": "0.53053975", "text": "abstract function get_edit_form_fields();", "title": "" } ]
f509fdfd1e84a7a24b007a8c5dfe4310
Gets the 'doctrine.orm.default_entity_manager' service. This service is shared. This method always returns the same instance of the service.
[ { "docid": "ddaaf8845d03e53f52bce49a38942a6e", "score": "0.7032097", "text": "protected function getDoctrine_Orm_DefaultEntityManagerService()\n {\n $a = $this->get('annotation_reader');\n\n $b = new \\Doctrine\\Common\\Cache\\ArrayCache();\n $b->setNamespace('sf2orm_default_e0f0da8c7c897f6675ad136ae2793749');\n\n $c = new \\Doctrine\\Common\\Cache\\ArrayCache();\n $c->setNamespace('sf2orm_default_e0f0da8c7c897f6675ad136ae2793749');\n\n $d = new \\Doctrine\\Common\\Cache\\ArrayCache();\n $d->setNamespace('sf2orm_default_e0f0da8c7c897f6675ad136ae2793749');\n\n $e = new \\Doctrine\\ORM\\Mapping\\Driver\\AnnotationDriver($a, array(0 => (dirname(dirname(dirname(__DIR__))).'/vendor/oro/platform/src/Oro/Bundle/ConfigBundle/Entity'), 1 => (dirname(dirname(dirname(__DIR__))).'/vendor/oro/platform/src/Oro/Bundle/EmailBundle/Entity'), 2 => (dirname(dirname(dirname(__DIR__))).'/vendor/oro/platform/src/Oro/Bundle/EntityConfigBundle/Entity'), 3 => (dirname(dirname(dirname(__DIR__))).'/vendor/oro/platform/src/Oro/Bundle/EntityExtendBundle/Entity'), 4 => (dirname(dirname(dirname(__DIR__))).'/vendor/oro/platform/src/Oro/Bundle/FormBundle/Entity'), 5 => (dirname(dirname(dirname(__DIR__))).'/vendor/oro/platform/src/Oro/Bundle/ImapBundle/Entity'), 6 => (dirname(dirname(dirname(__DIR__))).'/vendor/oro/platform/src/Oro/Bundle/NavigationBundle/Entity'), 7 => (dirname(dirname(dirname(__DIR__))).'/vendor/oro/platform/src/Oro/Bundle/OrganizationBundle/Entity'), 8 => (dirname(dirname(dirname(__DIR__))).'/vendor/oro/platform/src/Oro/Bundle/UserBundle/Entity'), 9 => (dirname(dirname(dirname(__DIR__))).'/vendor/oro/platform/src/Oro/Bundle/WindowsBundle/Entity'), 10 => (dirname(dirname(dirname(__DIR__))).'/vendor/oro/platform/src/Oro/Bundle/DataAuditBundle/Entity'), 11 => (dirname(dirname(dirname(__DIR__))).'/vendor/akeneo/batch-bundle/Akeneo/Bundle/BatchBundle/Entity'), 12 => (dirname(dirname(dirname(__DIR__))).'/vendor/akeneo/pim-community-dev/src/Pim/Bundle/UserBundle/Entity'), 13 => (dirname(dirname(dirname(__DIR__))).'/vendor/akeneo/pim-community-dev/src/Pim/Bundle/UIBundle/Entity'), 14 => (dirname(dirname(dirname(__DIR__))).'/vendor/akeneo/pim-community-dev/src/Pim/Bundle/TranslationBundle/Entity'), 15 => (dirname(dirname(dirname(__DIR__))).'/vendor/akeneo/pim-community-dev/src/Pim/Bundle/ImportExportBundle/Entity')));\n\n $f = new \\Doctrine\\ORM\\Mapping\\Driver\\SimplifiedYamlDriver(array((dirname(dirname(dirname(__DIR__))).'/vendor/akeneo/pim-community-dev/src/Pim/Bundle/NotificationBundle/Resources/config/doctrine') => 'Pim\\\\Bundle\\\\NotificationBundle\\\\Entity', (dirname(dirname(dirname(__DIR__))).'/vendor/akeneo/pim-community-dev/src/Pim/Bundle/CatalogBundle/Resources/config/doctrine') => 'Pim\\\\Bundle\\\\CatalogBundle\\\\Entity', (dirname(dirname(dirname(__DIR__))).'/vendor/akeneo/pim-community-dev/src/Pim/Bundle/DataGridBundle/Resources/config/doctrine') => 'Pim\\\\Bundle\\\\DataGridBundle\\\\Entity', (dirname(dirname(dirname(__DIR__))).'/vendor/akeneo/pim-community-dev/src/Pim/Bundle/EnrichBundle/Resources/config/doctrine') => 'Pim\\\\Bundle\\\\EnrichBundle\\\\Entity', (dirname(dirname(dirname(__DIR__))).'/vendor/akeneo/pim-community-dev/src/Pim/Bundle/CommentBundle/Resources/config/doctrine') => 'Pim\\\\Bundle\\\\CommentBundle\\\\Entity'));\n $f->setGlobalBasename('mapping');\n\n $g = new \\Doctrine\\ORM\\Mapping\\Driver\\DriverChain();\n $g->addDriver($e, 'Oro\\\\Bundle\\\\ConfigBundle\\\\Entity');\n $g->addDriver($e, 'Oro\\\\Bundle\\\\EmailBundle\\\\Entity');\n $g->addDriver($e, 'Oro\\\\Bundle\\\\EntityConfigBundle\\\\Entity');\n $g->addDriver($e, 'Oro\\\\Bundle\\\\EntityExtendBundle\\\\Entity');\n $g->addDriver($e, 'Oro\\\\Bundle\\\\FormBundle\\\\Entity');\n $g->addDriver($e, 'Oro\\\\Bundle\\\\ImapBundle\\\\Entity');\n $g->addDriver($e, 'Oro\\\\Bundle\\\\NavigationBundle\\\\Entity');\n $g->addDriver($e, 'Oro\\\\Bundle\\\\OrganizationBundle\\\\Entity');\n $g->addDriver($e, 'Oro\\\\Bundle\\\\UserBundle\\\\Entity');\n $g->addDriver($e, 'Oro\\\\Bundle\\\\WindowsBundle\\\\Entity');\n $g->addDriver($e, 'Oro\\\\Bundle\\\\DataAuditBundle\\\\Entity');\n $g->addDriver($e, 'Akeneo\\\\Bundle\\\\BatchBundle\\\\Entity');\n $g->addDriver($e, 'Pim\\\\Bundle\\\\UserBundle\\\\Entity');\n $g->addDriver($e, 'Pim\\\\Bundle\\\\UIBundle\\\\Entity');\n $g->addDriver($e, 'Pim\\\\Bundle\\\\TranslationBundle\\\\Entity');\n $g->addDriver($e, 'Pim\\\\Bundle\\\\ImportExportBundle\\\\Entity');\n $g->addDriver($f, 'Pim\\\\Bundle\\\\NotificationBundle\\\\Entity');\n $g->addDriver($f, 'Pim\\\\Bundle\\\\CatalogBundle\\\\Entity');\n $g->addDriver($f, 'Pim\\\\Bundle\\\\DataGridBundle\\\\Entity');\n $g->addDriver($f, 'Pim\\\\Bundle\\\\EnrichBundle\\\\Entity');\n $g->addDriver($f, 'Pim\\\\Bundle\\\\CommentBundle\\\\Entity');\n $g->addDriver(new \\Doctrine\\ORM\\Mapping\\Driver\\AnnotationDriver($a, array(0 => (dirname(dirname(__DIR__)).'/emails/OroEmail/Cache/OroEmailBundle/Entity'))), 'OroEmail\\\\Cache\\\\OroEmailBundle\\\\Entity');\n $g->addDriver(new \\Doctrine\\ORM\\Mapping\\Driver\\YamlDriver(new \\Doctrine\\Common\\Persistence\\Mapping\\Driver\\SymfonyFileLocator(array((__DIR__.'/oro_entities/Extend/Entity') => 'Extend\\\\Entity'), '.orm.yml')), 'Extend\\\\Entity');\n $g->addDriver(new \\Doctrine\\ORM\\Mapping\\Driver\\YamlDriver(new \\Doctrine\\Common\\Persistence\\Mapping\\Driver\\SymfonyFileLocator(array((dirname(dirname(dirname(__DIR__))).'/vendor/akeneo/pim-community-dev/src/Pim/Bundle/CatalogBundle/Resources/config/model/doctrine') => 'Pim\\\\Bundle\\\\CatalogBundle\\\\Model'), '.orm.yml')), 'Pim\\\\Bundle\\\\CatalogBundle\\\\Model');\n $g->addDriver(new \\Doctrine\\ORM\\Mapping\\Driver\\YamlDriver(new \\Doctrine\\Common\\Persistence\\Mapping\\Driver\\SymfonyFileLocator(array((dirname(dirname(dirname(__DIR__))).'/vendor/akeneo/pim-community-dev/src/Pim/Bundle/VersioningBundle/Resources/config/model/doctrine') => 'Pim\\\\Bundle\\\\VersioningBundle\\\\Model'), '.orm.yml')), 'Pim\\\\Bundle\\\\VersioningBundle\\\\Model');\n\n $h = new \\Doctrine\\ORM\\Configuration();\n $h->setEntityNamespaces(array('OroConfigBundle' => 'Oro\\\\Bundle\\\\ConfigBundle\\\\Entity', 'OroEmailBundle' => 'Oro\\\\Bundle\\\\EmailBundle\\\\Entity', 'OroEntityConfigBundle' => 'Oro\\\\Bundle\\\\EntityConfigBundle\\\\Entity', 'OroEntityExtendBundle' => 'Oro\\\\Bundle\\\\EntityExtendBundle\\\\Entity', 'OroFormBundle' => 'Oro\\\\Bundle\\\\FormBundle\\\\Entity', 'OroImapBundle' => 'Oro\\\\Bundle\\\\ImapBundle\\\\Entity', 'OroNavigationBundle' => 'Oro\\\\Bundle\\\\NavigationBundle\\\\Entity', 'OroOrganizationBundle' => 'Oro\\\\Bundle\\\\OrganizationBundle\\\\Entity', 'OroUserBundle' => 'Oro\\\\Bundle\\\\UserBundle\\\\Entity', 'OroWindowsBundle' => 'Oro\\\\Bundle\\\\WindowsBundle\\\\Entity', 'OroDataAuditBundle' => 'Oro\\\\Bundle\\\\DataAuditBundle\\\\Entity', 'AkeneoBatchBundle' => 'Akeneo\\\\Bundle\\\\BatchBundle\\\\Entity', 'PimUserBundle' => 'Pim\\\\Bundle\\\\UserBundle\\\\Entity', 'PimUIBundle' => 'Pim\\\\Bundle\\\\UIBundle\\\\Entity', 'PimNotificationBundle' => 'Pim\\\\Bundle\\\\NotificationBundle\\\\Entity', 'PimCatalogBundle' => 'Pim\\\\Bundle\\\\CatalogBundle\\\\Entity', 'PimDataGridBundle' => 'Pim\\\\Bundle\\\\DataGridBundle\\\\Entity', 'PimTranslationBundle' => 'Pim\\\\Bundle\\\\TranslationBundle\\\\Entity', 'PimImportExportBundle' => 'Pim\\\\Bundle\\\\ImportExportBundle\\\\Entity', 'PimEnrichBundle' => 'Pim\\\\Bundle\\\\EnrichBundle\\\\Entity', 'PimCommentBundle' => 'Pim\\\\Bundle\\\\CommentBundle\\\\Entity'));\n $h->setMetadataCacheImpl($b);\n $h->setQueryCacheImpl($c);\n $h->setResultCacheImpl($d);\n $h->setMetadataDriverImpl($g);\n $h->setProxyDir((__DIR__.'/doctrine/orm/Proxies'));\n $h->setProxyNamespace('Proxies');\n $h->setAutoGenerateProxyClasses(true);\n $h->setClassMetadataFactoryName('Oro\\\\Bundle\\\\EntityExtendBundle\\\\Mapping\\\\ExtendClassMetadataFactory');\n $h->setDefaultRepositoryClassName('Doctrine\\\\ORM\\\\EntityRepository');\n $h->setNamingStrategy(new \\Doctrine\\ORM\\Mapping\\DefaultNamingStrategy());\n\n $this->services['doctrine.orm.default_entity_manager'] = $instance = call_user_func(array('Oro\\\\Bundle\\\\EntityBundle\\\\ORM\\\\OroEntityManager', 'create'), $this->get('doctrine.dbal.default_connection'), $h);\n\n $instance->setFilterCollection($this->get('oro_entity.orm.sql_filter_collection'));\n $instance->setExtendManager($this->get('oro_entity_extend.extend.extend_manager'));\n $this->get('doctrine.orm.default_manager_configurator')->configure($instance);\n\n return $instance;\n }", "title": "" } ]
[ { "docid": "81de186b0e3631fe83039111b4b9ded8", "score": "0.74780303", "text": "protected function getEntityManager() {\n if (null === $this->entityManager) {\n $this->setEntityManager($this->getServiceLocator()->get('doctrine.entitymanager.orm_default'));\n }\n return $this->entityManager;\n }", "title": "" }, { "docid": "7739d35b86fbbf60786a0b7fc140dab0", "score": "0.74446434", "text": "public function getEntityManager() {\n\t\tif (null === $this->em) {\n\t\t\t$this->em = $this->getServiceLocator()\n\t\t\t\t\t->get('doctrine.entitymanager.orm_default');\n\t\t}\n\t\treturn $this->em;\n\t}", "title": "" }, { "docid": "6edbc8cbdd558d10cb0b315c6b824282", "score": "0.71910274", "text": "protected function getDoctrine_Orm_DefaultManagerConfiguratorService()\n {\n return $this->services['doctrine.orm.default_manager_configurator'] = new \\Doctrine\\Bundle\\DoctrineBundle\\ManagerConfigurator(array(), array());\n }", "title": "" }, { "docid": "6edbc8cbdd558d10cb0b315c6b824282", "score": "0.71910274", "text": "protected function getDoctrine_Orm_DefaultManagerConfiguratorService()\n {\n return $this->services['doctrine.orm.default_manager_configurator'] = new \\Doctrine\\Bundle\\DoctrineBundle\\ManagerConfigurator(array(), array());\n }", "title": "" }, { "docid": "4186945dc9fa3ce0d4d64a9aa80bdcbe", "score": "0.6944643", "text": "public static function getEntityManager() {\n return self::container()->get('manager.entity');\n }", "title": "" }, { "docid": "7eb87c89987ad90039f94ec85c3a2130", "score": "0.6837874", "text": "protected function entityManager() {\n\t\treturn $this->serviceLocator->get('Doctrine\\ORM\\EntityManager');\n\t}", "title": "" }, { "docid": "673893a5c94640fc1497fcf4cca268ac", "score": "0.6820997", "text": "protected function getEntityManager()\r\n {\r\n\tif (null === $this->entityManager)\r\n\t{\r\n\t $this->setEntityManager($this->getServiceLocator()->get('Doctrine\\ORM\\EntityManager'));\r\n\t}\r\n\treturn $this->entityManager;\r\n }", "title": "" }, { "docid": "416de9fd0d5a6a004ae68308b99ee174", "score": "0.6764468", "text": "protected function getEntityManager()\n {\n if (null === $this->entityManager) {\n $this->setEntityManager($this->getServiceLocator()->get('Doctrine\\ORM\\EntityManager'));\n }\n return $this->entityManager;\n }", "title": "" }, { "docid": "416de9fd0d5a6a004ae68308b99ee174", "score": "0.6764468", "text": "protected function getEntityManager()\n {\n if (null === $this->entityManager) {\n $this->setEntityManager($this->getServiceLocator()->get('Doctrine\\ORM\\EntityManager'));\n }\n return $this->entityManager;\n }", "title": "" }, { "docid": "ef576127de87b79f9ad670f6b8c6bfbe", "score": "0.67594546", "text": "public function getEntityManager()\n {\n if ( !$this->entityManager ) \n {\n $this->entityManager = $this->getServiceLocator()->get('Doctrine\\ORM\\EntityManager');\n }\n \n return $this->entityManager;\n }", "title": "" }, { "docid": "ee3619a61807c893308d7f0b121755b7", "score": "0.6744263", "text": "protected function getEntityManager()\n {\n if (null === $this->entityManager) {\n $this->entityManager = $this->getServiceLocator()->get('Doctrine\\ORM\\EntityManager');\n }\n\n return $this->entityManager;\n }", "title": "" }, { "docid": "0cdb65facce9186f8d0331cc92110b4c", "score": "0.6738864", "text": "protected function getEntityManager ()\n {\n return $this->doctrine->getManager();\n }", "title": "" }, { "docid": "ebfd5e65dd74821238f548e98c280249", "score": "0.672418", "text": "public function getEntityManager() {\n\t\tif (null === $this->em) {\n\t\t\t$this->em = $this->getServiceLocator ()->get ( 'Doctrine\\ORM\\EntityManager' );\n\t\t}\n\t\treturn $this->em;\n\t}", "title": "" }, { "docid": "1b06eee4eb83e06804e4d0de9d905cbe", "score": "0.6703577", "text": "protected function getDoctrine_Orm_DefaultEntityListenerResolverService()\n {\n return $this->services['doctrine.orm.default_entity_listener_resolver'] = new \\Doctrine\\Bundle\\DoctrineBundle\\Mapping\\ContainerAwareEntityListenerResolver($this);\n }", "title": "" }, { "docid": "f9f15f1705d8a631407b809f835f7c1a", "score": "0.6672316", "text": "private function getEntityManager()\n {\n if ($this->em === null) {\n $this->em = $this->container->get('doctrine')->getManager();\n }\n return $this->em;\n }", "title": "" }, { "docid": "e767dd6758234fd8edfb3ac1ce7d6215", "score": "0.6646114", "text": "public function getEntityManager()\n {\n return $this\n ->container\n ->get('doctrine')\n ->getManager();\n }", "title": "" }, { "docid": "cd149fce78747992af3b23aff57c5123", "score": "0.6574823", "text": "public function getDoctrineManager() {\n\t\treturn $this->doctrine->getManager();\n\t}", "title": "" }, { "docid": "9d8bc0cafa8d98e649c20b2e37107277", "score": "0.65682775", "text": "public function getEntityManager()\n{\nif (null === $this->em) {\n$this->em = $this->getServiceLocator()\n->get('doctrine.entitymanager.orm_default');\n}\nreturn $this->em;\n}", "title": "" }, { "docid": "e37cbd06d617b5882896d1a5cd4e5b9e", "score": "0.65206194", "text": "public function getEntityManager() : EntityManagerInterface\n {\n return $this->entityManager;\n }", "title": "" }, { "docid": "da1767c3e265c08b29a63df280dc04d9", "score": "0.6515871", "text": "protected function getOroEntityConfig_Link_EntityManagerService()\n {\n return $this->services['oro_entity_config.link.entity_manager'] = new \\Oro\\Bundle\\EntityConfigBundle\\DependencyInjection\\Utils\\ServiceLink($this, 'doctrine.orm.default_entity_manager', false);\n }", "title": "" }, { "docid": "6b3c586ed5ff542fe084fe3e6c3944cf", "score": "0.6464354", "text": "protected function getEntityManager()\n {\n return $this->getContainer()->get('doctrine')->getEntityManager('eayso');\n }", "title": "" }, { "docid": "e14e54b4c71444e1da45c0a2c5bb1637", "score": "0.64516", "text": "public function getEntityManager()\n {\n if (empty(static::$entityManager)) {\n $config = Setup::createAnnotationMetadataConfiguration(Settings::getEntityPaths(), Settings::isDevMode());\n $connection = Settings::getDbConnection();\n\n static::$entityManager = LooEntityManager::create($connection, $config);\n }\n\n return static::$entityManager;\n }", "title": "" }, { "docid": "d29887a721334c4ca2cd6bb9188bb573", "score": "0.6445532", "text": "protected function getEntityManager()\n {\n return $this->entityManager;\n }", "title": "" }, { "docid": "ac1a95839972db760a21d22cb170e457", "score": "0.64236313", "text": "protected function getEntityManager()\n {\n if (null === $this->entityManager) {\n $this->entityManager = clone self::$container->get('doctrine.orm.entity_manager');\n }\n return $this->entityManager;\n }", "title": "" }, { "docid": "0f4def6292baa416d2836684be0ed204", "score": "0.64024353", "text": "public function getEntityManager()\n {\n return $this['orm.em'];\n }", "title": "" }, { "docid": "c2a5cdf8e4c5eb29dd11a50341cfd497", "score": "0.6394783", "text": "public static function getEntityManager()\n {\n if (empty(self::$em)) {\n throw new \\RuntimeException('Cannot get Entity Manager');\n }\n return self::$em;\n }", "title": "" }, { "docid": "b83759b4d30db8eda17f5d96281bf5ad", "score": "0.63899016", "text": "public function getEntityManager()\n {\n return $this->entityManager;\n }", "title": "" }, { "docid": "b83759b4d30db8eda17f5d96281bf5ad", "score": "0.63899016", "text": "public function getEntityManager()\n {\n return $this->entityManager;\n }", "title": "" }, { "docid": "b83759b4d30db8eda17f5d96281bf5ad", "score": "0.63899016", "text": "public function getEntityManager()\n {\n return $this->entityManager;\n }", "title": "" }, { "docid": "b83759b4d30db8eda17f5d96281bf5ad", "score": "0.63899016", "text": "public function getEntityManager()\n {\n return $this->entityManager;\n }", "title": "" }, { "docid": "cd3aba76a3427038c8dd01daa4d7a233", "score": "0.6320116", "text": "public function getEntityManager()\n {\n return $this->em;\n }", "title": "" }, { "docid": "5050a3e7d55c3e5ced49bd1231dcbefd", "score": "0.62261844", "text": "public static function getDefaultConnection() \n {\n return Doctrine_Manager::getCurrentConnection();\n }", "title": "" }, { "docid": "425d7e0868a2aebbf30c48ebe2623ce6", "score": "0.6208537", "text": "public function getEntityManager(): EntityManager\n {\n if (is_null($this->entityManager)) {\n $this->entityManager = EntityManagerFactory::createEntityManager();\n }\n\n return $this->entityManager;\n }", "title": "" }, { "docid": "1636c554a0d38dcb6f20789e0a2bdf56", "score": "0.6205836", "text": "public function getEntityManager($name = null)\n {\n $name = $name ? $name : 'doctrine.orm.entity_manager';\n return $this->get($name);\n }", "title": "" }, { "docid": "9b14a122a636a01c89ce51a7ec5b6fe0", "score": "0.61776656", "text": "protected function em($name='default')\n {\n return $this->getService(\"doctrine.orm.{$name}_entity_manager\");\n }", "title": "" }, { "docid": "fb487748b9200287357a5cfcd853698a", "score": "0.61739683", "text": "public function getEntityManager()\n\t{\n\t\treturn $this->em;\n\t}", "title": "" }, { "docid": "b971351265640e4e33a4a17bbbda07bb", "score": "0.6172913", "text": "protected function getDoctrineCache_Providers_Doctrine_Orm_DefaultQueryCacheService()\n {\n $this->services['doctrine_cache.providers.doctrine.orm.default_query_cache'] = $instance = new \\Doctrine\\Common\\Cache\\ArrayCache();\n\n $instance->setNamespace('sf2orm_default_8bf1da162ef326421c99a13a9a5830680c7abfd955a06a3c69aa2f56d644e2eb');\n\n return $instance;\n }", "title": "" }, { "docid": "bf53022880be4d87f3bd6ea969fc089c", "score": "0.6115349", "text": "public function getDefaultCacheStore(): Store|null\n {\n $manager = Cache::getFacadeRoot();\n if (isset($manager)) {\n /** @var Repository $repository */\n $repository = $manager->store();\n return $repository->getStore();\n }\n return $manager;\n }", "title": "" }, { "docid": "e8918bda7ea476593503aad1ecfbfeb3", "score": "0.6110479", "text": "protected function getDoctrineCache_Providers_Doctrine_Orm_DefaultMetadataCacheService()\n {\n $this->services['doctrine_cache.providers.doctrine.orm.default_metadata_cache'] = $instance = new \\Doctrine\\Common\\Cache\\ArrayCache();\n\n $instance->setNamespace('sf2orm_default_8bf1da162ef326421c99a13a9a5830680c7abfd955a06a3c69aa2f56d644e2eb');\n\n return $instance;\n }", "title": "" }, { "docid": "56e9dd9443784882e7ed9390b087f427", "score": "0.6098199", "text": "protected function getObjectManager()\n {\n return $this->managerRegistry->getManager($this->managerName);\n }", "title": "" }, { "docid": "56e9dd9443784882e7ed9390b087f427", "score": "0.6098199", "text": "protected function getObjectManager()\n {\n return $this->managerRegistry->getManager($this->managerName);\n }", "title": "" }, { "docid": "34619a2f978832287dfc7bb54ea50e63", "score": "0.6090678", "text": "protected function getDoctrine_Dbal_Default_WrappedConnectionService()\n {\n return $this->services['doctrine.dbal.default.wrapped_connection'] = $this->get('doctrine.dbal.default_connection')->getWrappedConnection();\n }", "title": "" }, { "docid": "3fdc93940415677976b172d18d24c3c9", "score": "0.60403955", "text": "protected function getDoctrineService()\n {\n return $this->services['doctrine'] = new \\Doctrine\\Bundle\\DoctrineBundle\\Registry($this, array('default' => 'doctrine.dbal.default_connection'), array('default' => 'doctrine.orm.default_entity_manager'), 'default', 'default');\n }", "title": "" }, { "docid": "22e199af70582c9a9f15bbf52282aa40", "score": "0.60386914", "text": "public function getManager()\n {\n return $this->manager;\n }", "title": "" }, { "docid": "22e199af70582c9a9f15bbf52282aa40", "score": "0.60386914", "text": "public function getManager()\n {\n return $this->manager;\n }", "title": "" }, { "docid": "22e199af70582c9a9f15bbf52282aa40", "score": "0.60386914", "text": "public function getManager()\n {\n return $this->manager;\n }", "title": "" }, { "docid": "22e199af70582c9a9f15bbf52282aa40", "score": "0.60386914", "text": "public function getManager()\n {\n return $this->manager;\n }", "title": "" }, { "docid": "23b1b6e797e036deac812867c5c9f16b", "score": "0.60348886", "text": "public function getEntityManager($name = null) {\r\n\t\treturn $this->context->getState('entityManager');\r\n\t}", "title": "" }, { "docid": "e40cc20428e1b05429a36a8cf8ebaed6", "score": "0.59961164", "text": "public function getManager() {\n return $this->manager;\n }", "title": "" }, { "docid": "849fbc61ffab6ac39963606edaf3151a", "score": "0.5987907", "text": "public static function getEntityManager() {\n return \\Drupal::entityTypeManager();\n }", "title": "" }, { "docid": "41ad3ee8f07c6bc7329df017c9860915", "score": "0.59619004", "text": "public function getManager() {\n\t\treturn $this->manager;\n\t}", "title": "" }, { "docid": "85a157cd4e729982da91b987278a4ad5", "score": "0.59119624", "text": "protected function getDoctrineService()\n {\n return $this->services['doctrine'] = new \\Doctrine\\Bundle\\DoctrineBundle\\Registry($this, array('default' => 'doctrine.dbal.default_connection', 'report_source' => 'doctrine.dbal.report_source_connection', 'report_target' => 'doctrine.dbal.report_target_connection'), array('default' => 'doctrine.orm.default_entity_manager'), 'default', 'default');\n }", "title": "" }, { "docid": "4b980544166e825a6fba78ec45329faa", "score": "0.59113663", "text": "public function getDoctrine_Orm_DefaultEntityManagerService($lazyLoad = true)\n {\n if ($lazyLoad) {\n\n return $this->services['doctrine.orm.default_entity_manager'] = DoctrineORMEntityManager_00000000428690af0000000049de23ef3bf08b917554782eb259376febf5d820::staticProxyConstructor(\n function (&$wrappedInstance, \\ProxyManager\\Proxy\\LazyLoadingInterface $proxy) {\n $wrappedInstance = $this->getDoctrine_Orm_DefaultEntityManagerService(false);\n\n $proxy->setProxyInitializer(null);\n\n return true;\n }\n );\n }\n\n $a = $this->get('annotation_reader');\n\n $b = new \\Doctrine\\ORM\\Mapping\\Driver\\AnnotationDriver($a, array(0 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/AnalyticsBundle/Entity'), 1 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BlogBundle/Entity'), 2 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessEntityBundle/Entity'), 3 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/BusinessPageBundle/Entity'), 4 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CoreBundle/Entity'), 5 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/CriteriaBundle/Entity'), 6 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/I18nBundle/Entity'), 7 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/MediaBundle/Entity'), 8 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/PageBundle/Entity'), 9 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/QueryBundle/Entity'), 10 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/SeoBundle/Entity'), 11 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/TemplateBundle/Entity'), 12 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/TwigBundle/Entity'), 13 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/UserBundle/Entity'), 14 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/WidgetBundle/Entity'), 15 => ($this->targetDirs[3].'/vendor/victoire/victoire/Bundle/WidgetMapBundle/Entity')));\n\n $c = new \\Doctrine\\Common\\Persistence\\Mapping\\Driver\\MappingDriverChain();\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\AnalyticsBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\BlogBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\BusinessEntityBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\BusinessPageBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\CoreBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\CriteriaBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\I18nBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\MediaBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\PageBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\QueryBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\SeoBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\TemplateBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\TwigBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\UserBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\WidgetBundle\\\\Entity');\n $c->addDriver($b, 'Victoire\\\\Bundle\\\\WidgetMapBundle\\\\Entity');\n $c->addDriver(new \\Doctrine\\ORM\\Mapping\\Driver\\XmlDriver(new \\Doctrine\\Common\\Persistence\\Mapping\\Driver\\SymfonyFileLocator(array(($this->targetDirs[3].'/vendor/friendsofsymfony/user-bundle/Resources/config/doctrine-mapping') => 'FOS\\\\UserBundle\\\\Model'), '.orm.xml')), 'FOS\\\\UserBundle\\\\Model');\n\n $d = new \\Doctrine\\ORM\\Configuration();\n $d->setEntityNamespaces(array('VictoireAnalyticsBundle' => 'Victoire\\\\Bundle\\\\AnalyticsBundle\\\\Entity', 'VictoireBlogBundle' => 'Victoire\\\\Bundle\\\\BlogBundle\\\\Entity', 'VictoireBusinessEntityBundle' => 'Victoire\\\\Bundle\\\\BusinessEntityBundle\\\\Entity', 'VictoireBusinessPageBundle' => 'Victoire\\\\Bundle\\\\BusinessPageBundle\\\\Entity', 'VictoireCoreBundle' => 'Victoire\\\\Bundle\\\\CoreBundle\\\\Entity', 'VictoireCriteriaBundle' => 'Victoire\\\\Bundle\\\\CriteriaBundle\\\\Entity', 'VictoireI18nBundle' => 'Victoire\\\\Bundle\\\\I18nBundle\\\\Entity', 'VictoireMediaBundle' => 'Victoire\\\\Bundle\\\\MediaBundle\\\\Entity', 'VictoirePageBundle' => 'Victoire\\\\Bundle\\\\PageBundle\\\\Entity', 'VictoireQueryBundle' => 'Victoire\\\\Bundle\\\\QueryBundle\\\\Entity', 'VictoireSeoBundle' => 'Victoire\\\\Bundle\\\\SeoBundle\\\\Entity', 'VictoireTemplateBundle' => 'Victoire\\\\Bundle\\\\TemplateBundle\\\\Entity', 'VictoireTwigBundle' => 'Victoire\\\\Bundle\\\\TwigBundle\\\\Entity', 'VictoireUserBundle' => 'Victoire\\\\Bundle\\\\UserBundle\\\\Entity', 'VictoireWidgetBundle' => 'Victoire\\\\Bundle\\\\WidgetBundle\\\\Entity', 'VictoireWidgetMapBundle' => 'Victoire\\\\Bundle\\\\WidgetMapBundle\\\\Entity'));\n $d->setMetadataCacheImpl($this->get('doctrine_cache.providers.doctrine.orm.default_metadata_cache'));\n $d->setQueryCacheImpl($this->get('doctrine_cache.providers.doctrine.orm.default_query_cache'));\n $d->setResultCacheImpl($this->get('doctrine_cache.providers.doctrine.orm.default_result_cache'));\n $d->setMetadataDriverImpl($c);\n $d->setProxyDir((__DIR__.'/doctrine/orm/Proxies'));\n $d->setProxyNamespace('Proxies');\n $d->setAutoGenerateProxyClasses(false);\n $d->setClassMetadataFactoryName('Doctrine\\\\ORM\\\\Mapping\\\\ClassMetadataFactory');\n $d->setDefaultRepositoryClassName('Doctrine\\\\ORM\\\\EntityRepository');\n $d->setNamingStrategy(new \\Doctrine\\ORM\\Mapping\\UnderscoreNamingStrategy());\n $d->setQuoteStrategy(new \\Doctrine\\ORM\\Mapping\\DefaultQuoteStrategy());\n $d->setEntityListenerResolver($this->get('doctrine.orm.default_entity_listener_resolver'));\n\n $instance = \\Doctrine\\ORM\\EntityManager::create($this->get('doctrine.dbal.default_connection'), $d);\n\n $this->get('doctrine.orm.default_manager_configurator')->configure($instance);\n\n return $instance;\n }", "title": "" }, { "docid": "d43998ec74626772334dbc2377eabe36", "score": "0.5901491", "text": "protected function getDoctrine_Orm_DefaultListeners_AttachEntityListenersService()\n {\n return $this->services['doctrine.orm.default_listeners.attach_entity_listeners'] = new \\Doctrine\\ORM\\Tools\\AttachEntityListenersListener();\n }", "title": "" }, { "docid": "078373b4556ff19595db9fc9e837e1d1", "score": "0.58981687", "text": "public function getManager()\n\t{\n\t\treturn $this->manager;\n\t}", "title": "" }, { "docid": "a27fc035c97c22dad15e36fae8169e3a", "score": "0.5896373", "text": "public function getDefaultEntityManagerBaseDirectory()\n {\n $directory = __DIR__ . '/../Entity/' . self::DEFAULT_ENTITY_MANAGER_SANITIZED_NAME . '/';\n\n return $directory;\n }", "title": "" }, { "docid": "b0a626b7de68f59dbfbfdf687e382721", "score": "0.5883993", "text": "public function getService()\n {\n if (null == $this->service) {\n $service = $this->getOptions()->getService();\n\n if ($service) {\n if ($this->getServiceLocator()->has($service)) {\n $this->service = $this->getServiceLocator()->get($service);\n } elseif (class_exists($service)) {\n $this->service = new $service($this->getServiceLocator());\n } else {\n throw new RuntimeException('Cannot create service (' . $service . ')');\n }\n } else {\n $this->service = new DefaultEntityService($this, $this->getServiceLocator());\n }\n }\n\n return $this->service;\n }", "title": "" }, { "docid": "596cca2b67fb4f7571eef6c95a3e6252", "score": "0.5882325", "text": "public function getEntityManager() {\n\t\t$entities_dir = dirname(dirname(__DIR__)) . '/administrator/components/com_' . $this->componentname . '/model/entities';\n\t\t$isDevMode = $this->development;\n\n\t\t// Event-listener to change the #__ db-prefix into the current db-prefix\n\t\t$prefix = $this->jconfig->dbprefix;\n\t\t$evm = new EventManager;\n\t\t$tablePrefix = new TablePrefix($prefix);\n\t\t$evm->addEventListener(Events::loadClassMetadata, $tablePrefix);\n\n\t\t// Add UTF8 handler to EntityManager\n\t\t$evm->addEventSubscriber(\n\t\t\tnew \\Doctrine\\DBAL\\Event\\Listeners\\MysqlSessionInit('utf8', 'utf8_unicode_ci')\n\t\t);\n\n\t\t// Annotations-driver. You could use other drivers (like yaml or xml) here too\n\t\t$config = Setup::createAnnotationMetadataConfiguration(array($entities_dir), $isDevMode,null, null,false);\n\n\t\t// Database-connection configuration\n\t\t$conn = $this->getConfigurationOptions();\n\n\t\t// Obtaining the entity manager\n\t\t$entityManager = EntityManager::create($conn, $config, $evm);\n\n\t\t// Temporary, slow fix: without first calling getAllClassNames() I get a fatal error:\n\t\t// \"Call to private method JLoader::_autoload() in Doctrine\\Common\\ClassLoader on line 228\"\n\t\t//$classNames = $entityManager->getConfiguration()->getMetadataDriverImpl()->getAllClassNames(); // ---- fix: uncomment this line! ---\n\t\t// See: http://stackoverflow.com/questions/4532367/doctrine-not-working-unless-i-explicitly-call-annotationdrivergetallclassnames\n\t\t// Exact cause??? How to fix??? Has it anything to do with the order in which autoloading is taking place???\n\t\t// I get the error after: getRepository() in Jooctrine\\Model line 79\n\n\t\treturn $entityManager;\n\t}", "title": "" }, { "docid": "d259e69c5cdc6df43545e47836891bee", "score": "0.5803476", "text": "protected function getDoctrineEntityManager(): EntityManagerInterface\n {\n $paths = [\n \\implode(\\DIRECTORY_SEPARATOR, [\\realpath(__DIR__), '..', '..', 'src', 'Database', 'Entities']),\n \\implode(\\DIRECTORY_SEPARATOR, [\\realpath(__DIR__), '..', 'Stubs', 'Database', 'Entities']),\n ];\n $setup = new Setup();\n $config = $setup::createAnnotationMetadataConfiguration($paths, true, null, null, false);\n $dbParams = ['driver' => 'pdo_sqlite', 'memory' => true];\n\n return EntityManager::create($dbParams, $config);\n }", "title": "" }, { "docid": "f6f454b66f83ecda58bfda49f6ee67b5", "score": "0.5801765", "text": "protected function getObjectManager()\n {\n return $this->_objectManager;\n }", "title": "" }, { "docid": "f6f454b66f83ecda58bfda49f6ee67b5", "score": "0.5801765", "text": "protected function getObjectManager()\n {\n return $this->_objectManager;\n }", "title": "" }, { "docid": "7df586b81ce477e4a7e6f8e24029a989", "score": "0.57999325", "text": "protected function getObjectManager()\n {\n return $this->objectManager;\n }", "title": "" }, { "docid": "c1091f7b6bc1f2323da452324898f028", "score": "0.57875425", "text": "public function getObjectManager()\r\n {\r\n return $this->objectManager;\r\n }", "title": "" }, { "docid": "02fe8d43b502d5828f7dcabe8a0b5a5e", "score": "0.578027", "text": "protected function getDoctrineCache_Providers_Doctrine_Orm_DefaultResultCacheService()\n {\n $this->services['doctrine_cache.providers.doctrine.orm.default_result_cache'] = $instance = new \\Doctrine\\Common\\Cache\\ArrayCache();\n\n $instance->setNamespace('sf2orm_default_8bf1da162ef326421c99a13a9a5830680c7abfd955a06a3c69aa2f56d644e2eb');\n\n return $instance;\n }", "title": "" }, { "docid": "22f99bd7f93047fa27d1012ef9911411", "score": "0.57658714", "text": "public function getObjectManager()\n {\n return $this->objectManager;\n }", "title": "" }, { "docid": "22f99bd7f93047fa27d1012ef9911411", "score": "0.57658714", "text": "public function getObjectManager()\n {\n return $this->objectManager;\n }", "title": "" }, { "docid": "22f99bd7f93047fa27d1012ef9911411", "score": "0.57658714", "text": "public function getObjectManager()\n {\n return $this->objectManager;\n }", "title": "" }, { "docid": "22f99bd7f93047fa27d1012ef9911411", "score": "0.57658714", "text": "public function getObjectManager()\n {\n return $this->objectManager;\n }", "title": "" }, { "docid": "47097adddb3d36d99f9f46ecd49599bc", "score": "0.5763392", "text": "public function getManager(): ?Manager\n {\n try {\n $annotation = (new Annotation($this))->getClassAnnotation('Manager');\n if ($annotation) {\n $manager = $annotation->getProperty();\n if ($manager) {\n $manager = app()->get($manager);\n }\n } else {\n try {\n $shortEntity = (new ReflectionClass($this))->getShortName();\n $explodedNamespace = explode('\\\\', get_class($this));\n $entityIndex = array_search('Entities', $explodedNamespace);\n $explodedNamespace = array_slice($explodedNamespace, 0, $entityIndex);\n $moduleNamespace = join('\\\\', $explodedNamespace) . \"\\Managers\\\\{$shortEntity}Manager\";\n if (!class_exists($moduleNamespace)) {\n return null;\n }\n $manager = app()->get($moduleNamespace);\n } catch (Exception $ex) {\n return null;\n }\n }\n return $manager;\n } catch (Exception $ex) {\n return null;\n }\n }", "title": "" }, { "docid": "ce1459549e8e979ddc3cc64d18ca60a5", "score": "0.5756858", "text": "public function getEntityManager();", "title": "" }, { "docid": "ff01c6571abe9ec374c7147e096e41ed", "score": "0.57531154", "text": "protected function getManager()\n {\n if (self::$manager === null) {\n self::$manager = Shopware()->Models();\n }\n\n return self::$manager;\n }", "title": "" }, { "docid": "baf2e79f494e3df3032783c52ede21c2", "score": "0.5749989", "text": "public function getObjectManager() {\n\t\tif(($this->objectManager instanceof \\TYPO3\\CMS\\Extbase\\Object\\ObjectManager) === false) {\n\t\t\t$this->objectManager = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance(\\TYPO3\\CMS\\Extbase\\Object\\ObjectManager::class);\n\t\t}\n\n\t\treturn $this->objectManager;\n\t}", "title": "" }, { "docid": "ddd2a4b5d69535e0d2f0ef948bd00b08", "score": "0.5721851", "text": "function getManager() \n {\n return $this->manager;\n }", "title": "" }, { "docid": "47003477744557468688c7d4f321da43", "score": "0.57153624", "text": "public function getManager()\n {\n if ($this->_manager === false) {\n $this->_manager = Manager::find()->andWhere(['email' => $this->email])->one();\n }\n\n return $this->_manager;\n }", "title": "" }, { "docid": "bc7155802b04a69b6edc5b6da0f23e49", "score": "0.5696311", "text": "public function getEntityManager(): EntityManager;", "title": "" }, { "docid": "8fb0d1e35a76b8b88c0f8e6e9e251897", "score": "0.5685125", "text": "public static function getEntityFieldManager() {\n return \\Drupal::service('entity_field.manager');\n }", "title": "" }, { "docid": "539e0c8a5cd1f139d49cc60e2d86c574", "score": "0.5683695", "text": "protected function getServiceManager()\n {\n return $this->serviceManager;\n }", "title": "" }, { "docid": "abfd00a4907aed0bfbcf6dca94f625c1", "score": "0.5683125", "text": "public function getDoctrine() {\n\t\treturn $this->doctrine;\n\t}", "title": "" }, { "docid": "ffa552b4c4c4cc4e31fe2132e8091692", "score": "0.5681693", "text": "public function getServiceManager()\n {\n return $this->serviceManager;\n }", "title": "" }, { "docid": "ffa552b4c4c4cc4e31fe2132e8091692", "score": "0.5681693", "text": "public function getServiceManager()\n {\n return $this->serviceManager;\n }", "title": "" }, { "docid": "ffa552b4c4c4cc4e31fe2132e8091692", "score": "0.5681693", "text": "public function getServiceManager()\n {\n return $this->serviceManager;\n }", "title": "" }, { "docid": "ffa552b4c4c4cc4e31fe2132e8091692", "score": "0.5681693", "text": "public function getServiceManager()\n {\n return $this->serviceManager;\n }", "title": "" }, { "docid": "ffa552b4c4c4cc4e31fe2132e8091692", "score": "0.5681693", "text": "public function getServiceManager()\n {\n return $this->serviceManager;\n }", "title": "" }, { "docid": "ffa552b4c4c4cc4e31fe2132e8091692", "score": "0.5681693", "text": "public function getServiceManager()\n {\n return $this->serviceManager;\n }", "title": "" }, { "docid": "ffa552b4c4c4cc4e31fe2132e8091692", "score": "0.5681693", "text": "public function getServiceManager()\n {\n return $this->serviceManager;\n }", "title": "" }, { "docid": "ffa552b4c4c4cc4e31fe2132e8091692", "score": "0.5681693", "text": "public function getServiceManager()\n {\n return $this->serviceManager;\n }", "title": "" }, { "docid": "ffa552b4c4c4cc4e31fe2132e8091692", "score": "0.5681693", "text": "public function getServiceManager()\n {\n return $this->serviceManager;\n }", "title": "" }, { "docid": "ffa552b4c4c4cc4e31fe2132e8091692", "score": "0.5681693", "text": "public function getServiceManager()\n {\n return $this->serviceManager;\n }", "title": "" }, { "docid": "ffa552b4c4c4cc4e31fe2132e8091692", "score": "0.5681693", "text": "public function getServiceManager()\n {\n return $this->serviceManager;\n }", "title": "" }, { "docid": "bce5d928c5ce3ecd457cadaae9388577", "score": "0.56729084", "text": "public function getServiceManager()\r\n {\r\n return $this->serviceManager;\r\n }", "title": "" }, { "docid": "c6758c0b6cb5f370772515d577274c72", "score": "0.5656806", "text": "protected function getDoctrine_Dbal_DefaultConnectionService()\n {\n $a = $this->get('annotation_reader');\n\n $b = new \\Doctrine\\DBAL\\Logging\\LoggerChain();\n $b->addLogger($this->get('doctrine.dbal.logger'));\n $b->addLogger($this->get('doctrine.dbal.logger.profiling.default'));\n\n $c = new \\Doctrine\\DBAL\\Configuration();\n $c->setSQLLogger($b);\n\n $d = new \\Gedmo\\Tree\\TreeListener();\n $d->setAnnotationReader($a);\n\n $e = new \\Gedmo\\Timestampable\\TimestampableListener();\n $e->setAnnotationReader($a);\n\n $f = new \\Symfony\\Bridge\\Doctrine\\ContainerAwareEventManager($this);\n $f->addEventSubscriber($this->get('pim_catalog.event_subscriber.orm.inject_product_reference'));\n $f->addEventSubscriber($this->get('pim_catalog.event_subscriber.localizable'));\n $f->addEventSubscriber($d);\n $f->addEventSubscriber($e);\n $f->addEventSubscriber(new \\Oro\\Bundle\\EmailBundle\\EventListener\\EntitySubscriber(new \\Oro\\Bundle\\EmailBundle\\Entity\\Manager\\EmailOwnerManager($this->get('oro_email.email.owner.provider.storage'), $this->get('oro_email.email.address.manager'))));\n $f->addEventSubscriber($this->get('pim_catalog.event_subscriber.timestampable'));\n $f->addEventSubscriber($this->get('oro_entity_extend.listener.entity_subscriber'));\n $f->addEventSubscriber($this->get('pim_versioning.event_subscriber.addversion'));\n $f->addEventSubscriber($this->get('oro_user.entity_with_image.subscriber'));\n $f->addEventSubscriber($this->get('pim_catalog.event_subscriber.metric_base_values'));\n $f->addEventSubscriber($this->get('oro_dataaudit.listener.entity_subscriber'));\n $f->addEventSubscriber($this->get('pim_catalog.event_subscriber.scopable'));\n $f->addEventSubscriber($this->get('pim_catalog.event_subscriber.resolve_target_repository'));\n $f->addEventSubscriber($this->get('pim_catalog.event_subscriber.outdate_indexed_values'));\n $f->addEventSubscriber($this->get('pim_user.event_subscriber.user_preferences'));\n $f->addEventSubscriber($this->get('pim_translation.listener.add_locale'));\n $f->addEventSubscriber($this->get('pim_catalog.event_subscriber.create_attribute_requirement'));\n $f->addEventSubscriber($this->get('pim_versioning.event_subscriber.timestampable'));\n $f->addEventListener(array(0 => 'onFlush'), $this->get('oro_security.ownership_tree_subscriber'));\n $f->addEventListener(array(0 => 'prePersist'), $this->get('oro_organization.entity_ownership.listener'));\n $f->addEventListener(array(0 => 'loadClassMetadata'), $this->get('doctrine.orm.listeners.resolve_target_entity'));\n $f->addEventListener(array(0 => 'postGenerateSchema'), 'security.acl.dbal.schema_listener');\n $f->addEventListener(array(0 => 'postPersist', 1 => 'postFlush'), $this->get('oro_entity_config.event_listener.option_set_listener'));\n $f->addEventListener(array(0 => 'preRemove'), $this->get('oro_organization.business_unit.listener'));\n $f->addEventListener(array(0 => 'postPersist'), $this->get('oro_navigation.item.pinbar.post_persist_listener'));\n $f->addEventListener(array(0 => 'preUpdate'), $this->get('oro_user.role.listener'));\n\n return $this->services['doctrine.dbal.default_connection'] = $this->get('doctrine.dbal.connection_factory')->createConnection(array('driver' => 'pdo_mysql', 'host' => 'localhost', 'port' => NULL, 'unix_socket' => NULL, 'dbname' => 'pim_foody', 'user' => 'root', 'password' => 'hoang', 'charset' => 'UTF8', 'driverOptions' => array()), $c, $f, array());\n }", "title": "" }, { "docid": "ebbdc721e2a1119fd3d5858ea3d36a8f", "score": "0.5648579", "text": "public function getServiceManager()\r\n\t{\r\n\t\treturn $this->serviceManager;\r\n\t}", "title": "" }, { "docid": "72dc9ae28193a01fbaee498d87e22819", "score": "0.5635732", "text": "public function getEntityManager($name = self::DEFAULT_ENTITYMANAGER_NAME) {\n\t\t\n\t\tif (empty($name)) {\n\t\t\tthrow new Exception(\"Entity Manager alias name should be set\");\n\t\t} elseif (isset($this->_entityManagers[$name])) {\n\t\t\tthrow new Exception(\"Entity Manager '{$name}' is not set\");\n\t\t}\n\t\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "42442ef9b8bc97b77b6f4dee5bfac028", "score": "0.563", "text": "protected function getOroEntityConfig_ConfigManagerService()\n {\n $this->services['oro_entity_config.config_manager'] = $instance = new \\Oro\\Bundle\\EntityConfigBundle\\Config\\ConfigManager(new \\Metadata\\MetadataFactory(new \\Oro\\Bundle\\EntityConfigBundle\\Metadata\\Driver\\AnnotationDriver($this->get('annotation_reader'))), $this->get('event_dispatcher'), $this->get('oro_entity_config.link.provider_bag'), new \\Oro\\Bundle\\EntityConfigBundle\\Config\\ConfigModelManager($this->get('oro_entity_config.link.entity_manager')), new \\Oro\\Bundle\\EntityConfigBundle\\Audit\\AuditManager($this->get('oro_entity_config.link.config_manager'), $this->get('oro_entity_config.link.security_context')));\n\n $instance->setCache($this->get('oro_entity_config.cache.cache'));\n\n return $instance;\n }", "title": "" }, { "docid": "2a674810baea4a873e2cbf8b84b83c59", "score": "0.56278193", "text": "public function getEntityManager()\n {\n if (!$this->entityManager) {\n throw new \\Exception('Repository requires entity manager to persist data');\n }\n return $this->entityManager;\n }", "title": "" }, { "docid": "393115837f6c3d05168a6d18730834ed", "score": "0.5604707", "text": "public function getServiceManager()\n\t{\n\t\treturn $this->serviceManager;\n\t}", "title": "" }, { "docid": "1ec6a5a66de8fb9967aed308f1101696", "score": "0.55985737", "text": "protected function getObjectManager()\n {\n if (!isset($this->ldapObjectManager[$this->context])) {\n $this->ldapObjectManager[$this->context] = new LdapObjectManager(\n $this->getConnection(),\n $this->getSchemaFactory(),\n $this->config->getEventDispatcher()\n );\n }\n\n return $this->ldapObjectManager[$this->context];\n }", "title": "" }, { "docid": "51d0a02e7a91f9ef585837ed2cab15d2", "score": "0.5570815", "text": "public function getServiceManager()\n {\n return $this->serviceManager;\n }", "title": "" }, { "docid": "11542844c7268d813ac3add048538437", "score": "0.556138", "text": "public function getDefaultManagerName();", "title": "" }, { "docid": "1c0b9c90a04dfed5b575c3b530d86750", "score": "0.55428165", "text": "public function getDoctrine() {\n \treturn $this->getContainer()->get('doctrine');\n }", "title": "" } ]
79bf91f8c11243f7467f7d8eb97c889f
Filter the query on the OetbConfPoDetLineNbr column Example usage: $query>filterByOetbconfpodetlinenbr('fooValue'); // WHERE OetbConfPoDetLineNbr = 'fooValue' $query>filterByOetbconfpodetlinenbr('%fooValue%', Criteria::LIKE); // WHERE OetbConfPoDetLineNbr LIKE '%fooValue%'
[ { "docid": "2d25eba522f466af1360a14fe1132edc", "score": "0.62227416", "text": "public function filterByOetbconfpodetlinenbr($oetbconfpodetlinenbr = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($oetbconfpodetlinenbr)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(ConfigSalesOrderTableMap::COL_OETBCONFPODETLINENBR, $oetbconfpodetlinenbr, $comparison);\n }", "title": "" } ]
[ { "docid": "591ae52267e66be6bb93138fa2636666", "score": "0.62932", "text": "public function filterByLinenbr($linenbr = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($linenbr)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(OrddocsTableMap::COL_LINENBR, $linenbr, $comparison);\n }", "title": "" }, { "docid": "6d157133f2360580eff0fe371d21e3bb", "score": "0.59014416", "text": "public function filterByOetbconfdetlinebinnbr($oetbconfdetlinebinnbr = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($oetbconfdetlinebinnbr)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(ConfigSalesOrderTableMap::COL_OETBCONFDETLINEBINNBR, $oetbconfdetlinebinnbr, $comparison);\n }", "title": "" }, { "docid": "c272a976771826b7a8684cb99320166a", "score": "0.52799094", "text": "public function filterByOetbconfuseordrnbr($oetbconfuseordrnbr = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($oetbconfuseordrnbr)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(ConfigSalesOrderTableMap::COL_OETBCONFUSEORDRNBR, $oetbconfuseordrnbr, $comparison);\n }", "title": "" }, { "docid": "811f35760ee132dce299937d1e082cac", "score": "0.51883787", "text": "public function filterByOehdconttelenbr($oehdconttelenbr = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($oehdconttelenbr)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(SalesOrderTableMap::COL_OEHDCONTTELENBR, $oehdconttelenbr, $comparison);\n }", "title": "" }, { "docid": "796b1e7b9d156cbe77dc5d6570b2205a", "score": "0.4905288", "text": "public function ponbr($ponbr, $comparison = null) {\n\t\t$this->query->filterByPonbr($ponbr, $comparison);\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "d5b176918de44d21e0f21b29dd09eeee", "score": "0.48727116", "text": "public function setNxtofkinmobilenbr($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->nxtofkinmobilenbr !== $v) {\n $this->nxtofkinmobilenbr = $v;\n $this->modifiedColumns[EmployeeTableMap::COL_NXTOFKINMOBILENBR] = true;\n }\n\n return $this;\n }", "title": "" }, { "docid": "17ab982a08ceded73509a3459cb6e9ec", "score": "0.48225743", "text": "public function filterByLineofbusiness($lineofbusiness, $comparison = null)\n {\n if ($lineofbusiness instanceof \\lwops\\lwops\\Lineofbusiness) {\n return $this\n ->addUsingAlias(EmployeepurchasesTableMap::COL_LINEOFBUSINESSOID, $lineofbusiness->getOid(), $comparison);\n } elseif ($lineofbusiness instanceof ObjectCollection) {\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n\n return $this\n ->addUsingAlias(EmployeepurchasesTableMap::COL_LINEOFBUSINESSOID, $lineofbusiness->toKeyValue('PrimaryKey', 'Oid'), $comparison);\n } else {\n throw new PropelException('filterByLineofbusiness() only accepts arguments of type \\lwops\\lwops\\Lineofbusiness or Collection');\n }\n }", "title": "" }, { "docid": "30cf59797342fccfd808b189d40e617e", "score": "0.48048243", "text": "public function filterByOetbconfdecordrpric($oetbconfdecordrpric = null, $comparison = null)\n {\n if (is_array($oetbconfdecordrpric)) {\n $useMinMax = false;\n if (isset($oetbconfdecordrpric['min'])) {\n $this->addUsingAlias(ConfigSalesOrderTableMap::COL_OETBCONFDECORDRPRIC, $oetbconfdecordrpric['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($oetbconfdecordrpric['max'])) {\n $this->addUsingAlias(ConfigSalesOrderTableMap::COL_OETBCONFDECORDRPRIC, $oetbconfdecordrpric['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(ConfigSalesOrderTableMap::COL_OETBCONFDECORDRPRIC, $oetbconfdecordrpric, $comparison);\n }", "title": "" }, { "docid": "0ac97f20ad158a9c309064d5d1970282", "score": "0.48004982", "text": "public function filterByOetbconfoptlabl1($oetbconfoptlabl1 = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($oetbconfoptlabl1)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(ConfigSalesOrderTableMap::COL_OETBCONFOPTLABL1, $oetbconfoptlabl1, $comparison);\n }", "title": "" }, { "docid": "9ed9e1d114c300c2b3045d0ebb601494", "score": "0.4800081", "text": "public function filterByOetbconfrelivty($oetbconfrelivty = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($oetbconfrelivty)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(ConfigSalesOrderTableMap::COL_OETBCONFRELIVTY, $oetbconfrelivty, $comparison);\n }", "title": "" }, { "docid": "baaea902337ab09540a5d9dd9c32f2e8", "score": "0.47894168", "text": "public function buscarPorFiltros($filters) {\n \t\n\t\t$co=ClasificacionMarca::model()->findByAttributes(array('clasificacion'=>1));\n// echo \"<pre>\";\n// print_r($filters);\n// echo \"</pre>\";\n// Yii::app()->end();\n\n $criteria = new CDbCriteria;\n \n $criteria->with = array();\n// $criteria->select = array();\n// $criteria->select[] = \"t.*\";\n \n for ($i = 0; $i < count($filters['fields']); $i++) {\n \n $column = $filters['fields'][$i];\n $value = $filters['vals'][$i];\n $comparator = $filters['ops'][$i];\n \n if($i == 0){\n $logicOp = 'AND'; \n }else{ \n $logicOp = $filters['rels'][$i-1]; \n } \n \n /*Productos*/\n if($column == 'codigo')\n {\n $value = ($comparator == '=') ? \"=\".$value.\"\" : $value;\n \n $criteria->compare($column, $value,\n true, $logicOp);\n \n continue;\n }\n \n if($column == 'categoria')\n {\n \n $value = ($comparator == '=') ? \"=\".$value.\"\" : $value;\n \n $criteria->compare('categorias.nombre', $value,\n true, $logicOp);\n \n if(!in_array('categorias', $criteria->with))\n {\n $criteria->with[] = 'categorias';\n }\n \n continue;\n }\n \n if($column == 'sku')\n {\n \n $value = ($comparator == '=') ? \"=\".$value.\"\" : $value;\n \n $criteria->compare('preciotallacolor.sku', $value,\n true, $logicOp);\n \n if(!in_array('preciotallacolor', $criteria->with))\n {\n $criteria->with[] = 'preciotallacolor';\n }\n \n \n continue;\n }\n \n if($column == 'precioVenta' || $column == 'precioDescuento')\n {\n \n $criteria->compare('precios.'.$column, $comparator.\" \".$value,\n false, $logicOp);\n \n if(!in_array('precios', $criteria->with))\n {\n $criteria->with[] = 'precios';\n }\n \n continue;\n }\n \n \n if($column == 'total')\n {\n \n $criteria->addCondition('(IFNULL((select SUM(ptc.cantidad) from tbl_precioTallaColor ptc where ptc.producto_id = t.id), 0)) '\n .$comparator.' '.$value.'');\n \n \n continue;\n }\n \n if($column == 'disponible')\n {\n /* $criteria->addCondition('\n IFNULL((select SUM(ptc.cantidad) from tbl_precioTallaColor ptc where ptc.producto_id = t.id), 0)\n - \n IFNULL(\n (select sum(o_ptc.cantidad) from tbl_precioTallaColor ptc, tbl_orden_has_productotallacolor o_ptc, tbl_orden orden \n where ptc.id = o_ptc.preciotallacolor_id and orden.id = o_ptc.tbl_orden_id and \n orden.estado IN (3, 4, 8) and t.id = ptc.producto_id), \n 0) '\n .$comparator.' '.$value.'', $logicOp);*/\n \n $criteria->addCondition('\n IFNULL((select SUM(ptc.cantidad) from tbl_precioTallaColor ptc where ptc.producto_id = t.id),0)'\n .$comparator.' '.$value.'', $logicOp);\n \n \n continue;\n }\n \n if($column == 'vendida')\n {\n \n $criteria->addCondition('(IFNULL(\n (select sum(o_ptc.cantidad) from tbl_precioTallaColor ptc, tbl_orden_has_productotallacolor o_ptc, tbl_orden orden \n where ptc.id = o_ptc.preciotallacolor_id and orden.id = o_ptc.tbl_orden_id and \n orden.estado IN (3, 4, 8) and t.id = ptc.producto_id), \n 0)) '\n .$comparator.' '.$value.'', $logicOp);\n \n \n continue;\n \n } \n \n if($column == 'ventas')\n {\n $criteria->addCondition('IFNULL(\n (select sum(o_ptc.precio * o_ptc.cantidad) from tbl_precioTallaColor ptc, tbl_orden_has_productotallacolor o_ptc, tbl_orden orden \n where ptc.id = o_ptc.preciotallacolor_id and orden.id = o_ptc.tbl_orden_id and \n orden.estado IN (3, 4, 8) and t.id = ptc.producto_id), \n 0)'\n .$comparator.' '.$value.'', $logicOp); \n \n \n continue;\n }\n \n\n if($column == 'tienda_id')\n {\n //si seleccionaron la tienda personaling\n if($value == \"NULL\"){ \n \n //si es el comparador igual o diferente\n $comparator = ($comparator == '=') ? \"IS NULL\" : \"IS NOT NULL\";\n\n $criteria->addCondition(\"t.\".$column.\" \".$comparator,\n $logicOp);\n \n }else{\n $criteria->compare(\"t.\".$column, $comparator.\" \".$value,\n false, $logicOp); \n }\n continue;\n \n }\n if($column == '080') // para comparar 080 barcelona, solo en espana\n {\n $value = ($comparator == '=') ? \"=\".$value.\"\" : $value;\t\n if(isset($co))\n\t\t\t\t {\n\t if(($comparator=='=' && $value==\"=1\") || ($comparator!='=' && $value==\"0\"))\n\t\t\t\t\t {\n\t\t\t\t\t \t $comparator=\"=\";\t// la negacion de no. Si\n\t\t\t\t\t \t $criteria->compare(\"t.marca_id\", $comparator.$co->marca_id, //cambia\n\t false, $logicOp);\n\t\t\t\t\t }\n\t\t\t\t\t if(($comparator=='=' && $value==\"=0\") || ($comparator!='=' && $value==\"1\"))\n\t\t\t\t\t {\n\t\t\t\t\t \t $comparator=\"<>\";\t// la negacion de no. Si\n\t\t\t\t\t \t $criteria->compare(\"t.marca_id\", $comparator.$co->marca_id, //cambia\n\t false, $logicOp);\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t else \n\t\t\t\t {\n\t if(($comparator=='=' && $value==\"=1\") || ($comparator!='=' && $value==\"0\"))\n\t\t\t\t\t {\n\t\t\t\t\t \t $comparator=\"=\";\t// la negacion de no. Si\n\t\t\t\t\t \t $criteria->compare(\"t.marca_id\", $comparator.\"NULL\", //cambia\n\t false, $logicOp);\n\t\t\t\t\t }\n\t\t\t\t\t if(($comparator=='=' && $value==\"=0\") || ($comparator!='=' && $value==\"1\"))\n\t\t\t\t\t {\n\t\t\t\t\t \t $comparator=\"<>\";\t// la negacion de no. Si\n\t\t\t\t\t \t $criteria->compare(\"t.marca_id\", $comparator.\"NULL\", //cambia\n\t false, $logicOp);\n\t\t\t\t\t } \n\t\t\t\t }\n \n \n continue;\n }\n\t\t\t\t if($column == '100') // solo en venezuela\n {\n $value = ($comparator == '=') ? \"=\".$value.\"\" : $value;\t\n if(isset($co))\n\t\t\t\t {\n\t if(($comparator=='=' && $value==\"=1\") || ($comparator!='=' && $value==\"0\"))\n\t\t\t\t\t {\n\t\t\t\t\t \t $comparator=\"=\";\t// la negacion de no. Si\n\t\t\t\t\t \t $criteria->compare(\"t.marca_id\", $comparator.$co->marca_id, //cambia\n\t false, $logicOp);\n\t\t\t\t\t }\n\t\t\t\t\t if(($comparator=='=' && $value==\"=0\") || ($comparator!='=' && $value==\"1\"))\n\t\t\t\t\t {\n\t\t\t\t\t \t $comparator=\"<>\";\t// la negacion de no. Si\n\t\t\t\t\t \t $criteria->compare(\"t.marca_id\", $comparator.$co->marca_id, //cambia\n\t false, $logicOp);\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t else \n\t\t\t\t {\n\t if(($comparator=='=' && $value==\"=1\") || ($comparator!='=' && $value==\"0\"))\n\t\t\t\t\t {\n\t\t\t\t\t \t $comparator=\"=\";\t// la negacion de no. Si\n\t\t\t\t\t \t $criteria->compare(\"t.marca_id\", $comparator.\"NULL\", //cambia\n\t false, $logicOp);\n\t\t\t\t\t }\n\t\t\t\t\t if(($comparator=='=' && $value==\"=0\") || ($comparator!='=' && $value==\"1\"))\n\t\t\t\t\t {\n\t\t\t\t\t \t $comparator=\"<>\";\t// la negacion de no. Si\n\t\t\t\t\t \t $criteria->compare(\"t.marca_id\", $comparator.\"NULL\", //cambia\n\t false, $logicOp);\n\t\t\t\t\t } \n\t\t\t\t }\n\t\t\t\t \n \t\n \n \n continue;\n }\n if($column == 'outlet') // \n {\n //si es el comparador igual o diferente\n $value = ($comparator == '=') ? $value : 1-$value;\n\n $criteria->addCondition(\"t.\".$column.\" = \".$value,\n $logicOp);\n \n continue;\n }\n\t\t\t\tif($column == 'producto_externo') // \n {\n //si es el comparador igual o diferente\n $value = ($comparator == '=') ? $value : 1-$value;\n\n $criteria->addCondition(\"t.tipo = \".$value,\n $logicOp);\n \n continue;\n }\n\t\t\t\t if($column == 'descuento') // \n {\n\t \t/// Descuento si es 0 es que es porcentaje si es 1 es de Valor y si es NULL (CAMBIA LA MANERA DE MANEJAR LOS SI Y NO)\n\t \tif(($comparator=='=' && $value==\"1\")|| ($comparator!='=' && $value==\"0\"))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$criteria->addInCondition('precios.tipoDescuento',array(0, 1));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(($comparator=='=' && $value==\"0\") || ($comparator!='=' && $value==\"1\"))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$criteria->addCondition('precios.tipoDescuento is NULL');\t\n\t\t\t\t\t\t\t#$criteria->compare('precios.tipoDescuento',NULL, true);\n\t\t\t\t\t\t\t#$criteria->addNotInCondition('precios.tipoDescuento',array(0, 1));\n\t\t\t\t\t\t}\n\t \t\n\t \n\t \n\t if(!in_array('precios', $criteria->with))\n\t {\n\t $criteria->with[] = 'precios';\n\t }\n\t \n\t continue;\n }\n\t\t\t\t \n\t\t\t\t if($column == 'tipoDescuento') \n {\n\t //si es el comparador igual o diferente\n\t $value = ($comparator == '=') ? $value : 1-$value;\n\t\n\t $criteria->addCondition(\"precios.tipoDescuento = \".$value,\n\t $logicOp);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tif(!in_array('precios', $criteria->with))\n\t {\n\t $criteria->with[] = 'precios';\n\t }\n\t \n\t continue;\n }\n\n\t\t\t\t if($column == 'valorTipo') \n {\n\t $criteria->compare('precios.'.$column, $comparator.\" \".$value,\n false, $logicOp);\n \n if(!in_array('precios', $criteria->with))\n {\n $criteria->with[] = 'precios';\n }\n \n continue;\n }\n\t\t\t\t \n if($column == 'fecha')\n {\n $value = strtotime($value);\n $value = date('Y-m-d H:i:s', $value);\n }\n \n $criteria->compare(\"t.\".$column, $comparator.\" \".$value,\n false, $logicOp);\n \n }\n \n \n //$criteria->with = array('categorias', 'preciotallacolor', 'precios');\n $criteria->together = true;\n $criteria->compare('t.status', '1'); //siempre los no eliminados\n \n// echo \"Criteria:\";\n// \n// echo \"<pre>\";\n// print_r($criteria->toArray());\n// echo \"</pre>\"; \n// exit();\n\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "5a14896539e9f175bf898b6e79411a7d", "score": "0.47797412", "text": "public function filterBySllandline($sllandline = null, $comparison = null)\n\t{\n\t\tif (null === $comparison) {\n\t\t\tif (is_array($sllandline)) {\n\t\t\t\t$comparison = Criteria::IN;\n\t\t\t} elseif (preg_match('/[\\%\\*]/', $sllandline)) {\n\t\t\t\t$sllandline = str_replace('*', '%', $sllandline);\n\t\t\t\t$comparison = Criteria::LIKE;\n\t\t\t}\n\t\t}\n\t\treturn $this->addUsingAlias(CustomerdetailsPeer::SLLANDLINE, $sllandline, $comparison);\n\t}", "title": "" }, { "docid": "41a49de23bb82cbe47c2a7179e00cf5b", "score": "0.47783312", "text": "function getListFilter($col,$key) {\n\t\t\tswitch($col) {\n\t\t\t\tcase 'propinsi': return \"kodepropinsi = '$key'\";\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "d3d664a2a9cf4d948f29d11d704b2407", "score": "0.47778746", "text": "public function filterByOehshcrtnnbr($oehshcrtnnbr = null, $comparison = null)\n {\n if (is_array($oehshcrtnnbr)) {\n $useMinMax = false;\n if (isset($oehshcrtnnbr['min'])) {\n $this->addUsingAlias(SalesOrderShipmentTableMap::COL_OEHSHCRTNNBR, $oehshcrtnnbr['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($oehshcrtnnbr['max'])) {\n $this->addUsingAlias(SalesOrderShipmentTableMap::COL_OEHSHCRTNNBR, $oehshcrtnnbr['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(SalesOrderShipmentTableMap::COL_OEHSHCRTNNBR, $oehshcrtnnbr, $comparison);\n }", "title": "" }, { "docid": "cf269a21d1fe121984a1ca91c5b620e3", "score": "0.47398996", "text": "public function buscaBanco($param,$limit=20){\n $crit=new CDbCriteria();\n $crit->addCondition(\"(trim(\\\"codigobanco\\\") LIKE :parametro or trim(\\\"nombre\\\") LIKE :parametro)\");\n $crit->params=array(':parametro' =>\"%$param%\");\n $crit->limit=$limit;\n return $crit;\n\n }", "title": "" }, { "docid": "cc1b5ceba59e6cba865f57601e16000d", "score": "0.473693", "text": "protected function functionLaporanFormulirCriteria() {\n // should not be searched.\n\n $criteria = new CDbCriteria;\n \n $criteria->addBetweenCondition('tglformulir',$this->tgl_awal,$this->tgl_akhir,true); \n $criteria->compare(\"LOWER(noformulir)\", strtolower($this->noformulir));\n \n if (!empty($this->status)){ \n if ($this->status=='1'){\n $criteria->addCondition(\" stokopname_id IS NOT NULL \");\n }elseif ($this->status=='2'){\n $criteria->addCondition(\" stokopname_id IS NULL \");\n }\n }\n\n \n\n\n return $criteria;\n }", "title": "" }, { "docid": "92c4d7154dd6c4e50fdd6076f6876d1d", "score": "0.47314152", "text": "public function filterByOedtline($oedtline = null, $comparison = null)\n {\n if (is_array($oedtline)) {\n $useMinMax = false;\n if (isset($oedtline['min'])) {\n $this->addUsingAlias(SoPickedLotserialTableMap::COL_OEDTLINE, $oedtline['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($oedtline['max'])) {\n $this->addUsingAlias(SoPickedLotserialTableMap::COL_OEDTLINE, $oedtline['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(SoPickedLotserialTableMap::COL_OEDTLINE, $oedtline, $comparison);\n }", "title": "" }, { "docid": "be38387a4fcc35b63a9c5729432fb146", "score": "0.4701575", "text": "public function filterBySladdressline1($sladdressline1 = null, $comparison = null)\n\t{\n\t\tif (null === $comparison) {\n\t\t\tif (is_array($sladdressline1)) {\n\t\t\t\t$comparison = Criteria::IN;\n\t\t\t} elseif (preg_match('/[\\%\\*]/', $sladdressline1)) {\n\t\t\t\t$sladdressline1 = str_replace('*', '%', $sladdressline1);\n\t\t\t\t$comparison = Criteria::LIKE;\n\t\t\t}\n\t\t}\n\t\treturn $this->addUsingAlias(CustomerdetailsPeer::SLADDRESSLINE1, $sladdressline1, $comparison);\n\t}", "title": "" }, { "docid": "97dcff9e4faea3cff4289e884802c77d", "score": "0.46759704", "text": "public function filterBySladdressline2($sladdressline2 = null, $comparison = null)\n\t{\n\t\tif (null === $comparison) {\n\t\t\tif (is_array($sladdressline2)) {\n\t\t\t\t$comparison = Criteria::IN;\n\t\t\t} elseif (preg_match('/[\\%\\*]/', $sladdressline2)) {\n\t\t\t\t$sladdressline2 = str_replace('*', '%', $sladdressline2);\n\t\t\t\t$comparison = Criteria::LIKE;\n\t\t\t}\n\t\t}\n\t\treturn $this->addUsingAlias(CustomerdetailsPeer::SLADDRESSLINE2, $sladdressline2, $comparison);\n\t}", "title": "" }, { "docid": "64c6cb2a452944d6ec6b69b264806182", "score": "0.4674665", "text": "public function getNotesSummarized($ordn, $linenbr) {\n\t\t$q = $this->query();\n\t\t$q->filterByOrdernumber($ordn);\n\t\t$q->filterByLine($linenbr);\n\t\t$q->filterBySequence(1);\n\t\treturn $q->find();\n\t}", "title": "" }, { "docid": "5f14e3a0be5b5371aa5a6701fed97224", "score": "0.46575493", "text": "public function filterByNomorTelepon($nomorTelepon = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($nomorTelepon)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $nomorTelepon)) {\n $nomorTelepon = str_replace('*', '%', $nomorTelepon);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(LembagaAkreditasiPeer::NOMOR_TELEPON, $nomorTelepon, $comparison);\n }", "title": "" }, { "docid": "7b5d8d33dc2c33b49af775e94aa293f1", "score": "0.46531266", "text": "public function filterByOetbconfjrnlsort($oetbconfjrnlsort = null, $comparison = null)\n {\n if (is_array($oetbconfjrnlsort)) {\n $useMinMax = false;\n if (isset($oetbconfjrnlsort['min'])) {\n $this->addUsingAlias(ConfigSalesOrderTableMap::COL_OETBCONFJRNLSORT, $oetbconfjrnlsort['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($oetbconfjrnlsort['max'])) {\n $this->addUsingAlias(ConfigSalesOrderTableMap::COL_OETBCONFJRNLSORT, $oetbconfjrnlsort['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(ConfigSalesOrderTableMap::COL_OETBCONFJRNLSORT, $oetbconfjrnlsort, $comparison);\n }", "title": "" }, { "docid": "9e784b15c8f0d6bae77a7beecc3b9811", "score": "0.46527973", "text": "public function filterByOetbconfreleasenbr($oetbconfreleasenbr = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($oetbconfreleasenbr)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(ConfigSalesOrderTableMap::COL_OETBCONFRELEASENBR, $oetbconfreleasenbr, $comparison);\n }", "title": "" }, { "docid": "470263125dab56cc4a37563701a949a4", "score": "0.4651018", "text": "public function notesExist($ordn, $linenbr) {\n\t\t$q = $this->query();\n\t\t$q->filterByOrdernumber($ordn);\n\t\t$q->filterByLine($linenbr);\n\t\treturn boolval($q->count());\n\t}", "title": "" }, { "docid": "877c0a62e2d8bfa3d46e0c6c641c6fd9", "score": "0.4646898", "text": "public function getCriteriaWhere($criteria_value) {\n //Only filter query if criteria is valuated\n if ($criteria_value) {\n $a = 'A_'. $this->field->id;\n $b = 'B_'. $this->field->id;\n $ids_to_search = array_intersect(\n array_values($criteria_value),\n array_merge(\n array(100),\n array_keys($this->getAllValues())\n ));\n if (count($ids_to_search) > 1) {\n return \" $b.bindvalue_id IN(\". implode(',', $ids_to_search) .\") \";\n } else if (count($ids_to_search)) {\n return \" $b.bindvalue_id = \". implode('', $ids_to_search) .\" \";\n }\n }\n return '';\n }", "title": "" }, { "docid": "270c0dd494129bdd7c9f8aa211c46d8e", "score": "0.46436718", "text": "public function filterByLogradouro($logradouro = null, $comparison = null)\n\t{\n\t\tif (null === $comparison) {\n\t\t\tif (is_array($logradouro)) {\n\t\t\t\t$comparison = Criteria::IN;\n\t\t\t} elseif (preg_match('/[\\%\\*]/', $logradouro)) {\n\t\t\t\t$logradouro = str_replace('*', '%', $logradouro);\n\t\t\t\t$comparison = Criteria::LIKE;\n\t\t\t}\n\t\t}\n\t\treturn $this->addUsingAlias(EnderecoPeer::LOGRADOURO, $logradouro, $comparison);\n\t}", "title": "" }, { "docid": "5073e642079aeda8cd101f669541eb5e", "score": "0.46399057", "text": "public function filterByLandline($landline = null, $comparison = null)\n\t{\n\t\tif (null === $comparison) {\n\t\t\tif (is_array($landline)) {\n\t\t\t\t$comparison = Criteria::IN;\n\t\t\t} elseif (preg_match('/[\\%\\*]/', $landline)) {\n\t\t\t\t$landline = str_replace('*', '%', $landline);\n\t\t\t\t$comparison = Criteria::LIKE;\n\t\t\t}\n\t\t}\n\t\treturn $this->addUsingAlias(CustomerdetailsPeer::LANDLINE, $landline, $comparison);\n\t}", "title": "" }, { "docid": "bf55b03780f3c5c6b82f3bb0207b1557", "score": "0.46363425", "text": "public function filterByPondnbr($pondnbr = null, $comparison = null)\n {\n if (is_array($pondnbr)) {\n $useMinMax = false;\n if (isset($pondnbr['min'])) {\n $this->addUsingAlias(FishproductionTableMap::COL_PONDNBR, $pondnbr['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($pondnbr['max'])) {\n $this->addUsingAlias(FishproductionTableMap::COL_PONDNBR, $pondnbr['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(FishproductionTableMap::COL_PONDNBR, $pondnbr, $comparison);\n }", "title": "" }, { "docid": "fa70c674610d12985d7d2dbfc5c0af4f", "score": "0.46151578", "text": "public function setBlNo($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->bl_no !== $v) {\n\t\t\t$this->bl_no = $v;\n\t\t\t$this->modifiedColumns[] = TripPeer::BL_NO;\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "8911990d2823e145d213f0e17a45ede7", "score": "0.4611614", "text": "public function search_dueno($codcentro)\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t//$criteria->addCondition(\"codep = '001'\");\n\t\t$criteria->addCondition(\"codpropietario=:vcodecentro\");\n\t\t$criteria->params=array(\":vcodecentro\"=>$codcentro);\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t ));\n\t}", "title": "" }, { "docid": "43d54753160cc450f3be6cb5a90c208e", "score": "0.45961976", "text": "public function searchRD()\n {\n // should not be searched.\n\n $criteria=new CDbCriteria;\n \n \n $criteria->compare('LOWER(tgl_pendaftaran)',$this->tgl_pendaftaran);\n $criteria->compare('LOWER(no_pendaftaran)',strtolower($this->no_pendaftaran),true);\n // $criteria->compare('LOWER(statusperiksa)',strtolower($this->statusperiksa),true);\n // $criteria->compare('LOWER(statusmasuk)',strtolower($this->statusmasuk),true);\n // $criteria->compare('LOWER(carakeluar)',strtolower($this->carakeluar ),true);\n $criteria->compare('LOWER(no_rekam_medik)',strtolower($this->no_rekam_medik),true);\n $criteria->compare('LOWER(nama_pasien)',strtolower($this->nama_pasien),true);\n // $criteria->compare('LOWER(nama_bin)',strtolower($this->nama_bin),true);\n // $criteria->compare('LOWER(alamat_pasien)',strtolower($this->alamat_pasien),true);\n // $criteria->compare('propinsi_id',$this->propinsi_id);\n // $criteria->compare('LOWER(propinsi_nama)',strtolower($this->propinsi_nama),true);\n // $criteria->compare('kabupaten_id',$this->kabupaten_id);\n // $criteria->compare('LOWER(kabupaten_nama)',strtolower($this->kabupaten_nama),true);\n // $criteria->compare('kecamatan_id',$this->kecamatan_id); \n // $criteria->compare('LOWER(kecamatan_nama)',strtolower($this->kecamatan_nama),true);\n // $criteria->compare('kelurahan_id',$this->kelurahan_id);\n // $criteria->compare('LOWER(kelurahan_nama)',strtolower($this->kelurahan_nama),true);\n // $criteria->compare('instalasi_id',$this->instalasi_id);\n // $criteria->compare('LOWER(ruangan_nama)',strtolower($this->ruangan_nama),true);\n // $criteria->compare('carabayar_id',$this->carabayar_id);\n // $criteria->compare('LOWER(carabayar_nama)',strtolower($this->carabayar_nama),true);\n // $criteria->compare('penjamin_id',$this->penjamin_id);\n // $criteria->compare('LOWER(penjamin_nama)',strtolower($this->penjamin_nama),true);\n // $criteria->compare('LOWER(nama_pegawai)',strtolower($this->nama_pegawai),true);\n // $criteria->compare('LOWER(jeniskasuspenyakit_nama)',strtolower($this->jeniskasuspenyakit_nama),true);\n // $criteria->compare('rujukan_id',$this->rujukan_id);\n // $criteria->compare('ruangan_id', Yii::app()->user->getState('ruangan_id'));\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "title": "" }, { "docid": "ae0055e9e29d38e37b3e01b6c3ac7717", "score": "0.45916376", "text": "public function filterByOepdcrtnnbr($oepdcrtnnbr = null, $comparison = null)\n {\n if (is_array($oepdcrtnnbr)) {\n $useMinMax = false;\n if (isset($oepdcrtnnbr['min'])) {\n $this->addUsingAlias(SoPickedLotserialTableMap::COL_OEPDCRTNNBR, $oepdcrtnnbr['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($oepdcrtnnbr['max'])) {\n $this->addUsingAlias(SoPickedLotserialTableMap::COL_OEPDCRTNNBR, $oepdcrtnnbr['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(SoPickedLotserialTableMap::COL_OEPDCRTNNBR, $oepdcrtnnbr, $comparison);\n }", "title": "" }, { "docid": "213e1f6f2a020aacca6aad16aa147698", "score": "0.45502084", "text": "public function setMobilenbr($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->mobilenbr !== $v) {\n $this->mobilenbr = $v;\n $this->modifiedColumns[EmployeeTableMap::COL_MOBILENBR] = true;\n }\n\n return $this;\n }", "title": "" }, { "docid": "f85a102550a749a4bf61d86284f365e6", "score": "0.45141256", "text": "public function searchBank() {\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->select = 'bank_id';\n\t\tif (!empty($this->bankrek_id)) {\n\t\t\t$criteria->addCondition(\"bankrek_id = \" . $this->bankrek_id);\n\t\t}\n\t\t\n//\t\t$criteria->compare('LOWER(saldonormal)', strtolower($this->saldonormal), true);\n\n\t\t$criteria->group = 'bank_id';\n\n\t\tif (isset($this->namabank)) {\n\t\t\t$criteria_satu = new CDbCriteria;\n\t\t\t$criteria_satu->compare('LOWER(namabank)', strtolower($this->namabank), true);\n\t\t\tif (isset($this->propinsi_nama)) {\n\n\t\t\t\t$criteria_satu->compare('LOWER(propinsi.propinsi_nama)', strtolower($this->propinsi_nama), true);\n\t\t\t} else if (isset($this->kabupaten_nama)) {\n\n\t\t\t\t$criteria_satu->compare('LOWER(kabupaten.kabupaten_nama)', strtolower($this->kabupaten_nama), true);\n\t\t\t} else if (isset($this->matauang)) {\n\n\t\t\t\t$criteria_satu->compare('LOWER(matauang.matauang)', strtolower($this->matauang), true);\n\t\t\t} else if (isset($this->norekening)) {\n\n\t\t\t\t$criteria_satu->compare('LOWER(norekening)', strtolower($this->norekening), true);\n\t\t\t} else if (isset($this->alamatbank)) {\n\n\t\t\t\t$criteria_satu->compare('LOWER(alamatbank)', strtolower($this->alamatbank), true);\n\t\t\t} else if (isset($this->emailbank)) {\n\n\t\t\t\t$criteria_satu->compare('LOWER(emailbank)', strtolower($this->emailbank), true);\n\t\t\t\t$criteria_satu->compare('LOWER(website)', strtolower($this->emailbank), true);\n\t\t\t} else if (isset($this->cabangdari)) {\n\n\t\t\t\t$criteria_satu->compare('LOWER(cabangdari)', strtolower($this->cabangdari), true);\n\t\t\t} else if (isset($this->faxbank)) {\n\n\t\t\t\t$criteria_satu->compare('faxbank', $this->faxbank);\n\t\t\t} else if (isset($this->kodepos)) {\n\n\t\t\t\t$criteria_satu->compare('kodepos', $this->kodepos);\n\t\t\t} else if (isset($this->telpbank1)) {\n\n\t\t\t\t$criteria_satu->compare('telpbank1', $this->telpbank1);\n\t\t\t\t$criteria_satu->compare('telpbank2', $this->telpbank2);\n\t\t\t} \n\n\t\t\t$record = BankM::model()->with('propinsi', 'kabupaten', 'matauang')->findAll($criteria_satu);\n\t\t\t$data = array();\n\t\t\tforeach ($record as $value) {\n\t\t\t\t$data[] = $value->bank_id;\n\t\t\t}\n\n\t\t\tif (count($data) > 0) {\n\t\t\t\t$condition = 'bank_id IN (' . implode(',', $data) . ')';\n\t\t\t\t$criteria->addCondition($condition);\n\t\t\t}\n\t\t}\n\n\t\tif (isset($this->rekening_debit)) {\n// var_dump(2);\n\n\t\t\t$debit = \"D\";\n\t\t\t$criteria_satu = new CDbCriteria;\n\t\t\t$criteria_satu->compare('LOWER(rekeningdebit.nmrekening5)', strtolower($this->rekening_debit), true);\n\t\t\t$criteria_satu->compare('LOWER(rekeningdebit.rekening5_nb)', strtolower($debit), true);\n\n\t\t\t$record = BankrekM::model()->with(\"rekeningdebit\")->findAll($criteria_satu);\n//\t\t\tvar_dump($record->attributes);\n\t\t\t$data = array();\n\t\t\tforeach ($record as $value) {\n\t\t\t\t$data[] = $value->bank_id;\n\t\t\t}\n\t\t\tif (count($data) > 0) {\n\t\t\t\t$condition = 'bank_id IN (' . implode(',', $data) . ')';\n\t\t\t\t$criteria->addCondition($condition);\n\t\t\t}\n\t\t}\n\n\t\tif (isset($this->rekeningKredit)) {\n// var_dump(2);\n\n\t\t\t$debit = \"K\";\n\t\t\t$criteria_satu = new CDbCriteria;\n\t\t\t$criteria_satu->compare('LOWER(rekeningkredit.nmrekening5)', strtolower($this->rekeningKredit), true);\n\t\t\t$criteria_satu->compare('LOWER(rekeningkredit.rekening5_nb)', strtolower($debit), true);\n\n\t\t\t$record = BankrekM::model()->with(\"rekeningkredit\")->findAll($criteria_satu);\n//\t\t\tvar_dump($record->attributes);\n\t\t\t$data = array();\n\t\t\tforeach ($record as $value) {\n\t\t\t\t$data[] = $value->bank_id;\n\t\t\t}\n\t\t\tif (count($data) > 0) {\n\t\t\t\t$condition = 'bank_id IN (' . implode(',', $data) . ')';\n\t\t\t\t$criteria->addCondition($condition);\n\t\t\t}\n\t\t}\n\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "ab0a17efa259204684fc14464e8ef26e", "score": "0.44938412", "text": "public function filterByOetbconfoptlabl2($oetbconfoptlabl2 = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($oetbconfoptlabl2)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(ConfigSalesOrderTableMap::COL_OETBCONFOPTLABL2, $oetbconfoptlabl2, $comparison);\n }", "title": "" }, { "docid": "6f0783f390328e1837bbe626e430c986", "score": "0.4477823", "text": "public function filterByApvereleasenbr($apvereleasenbr = null, $comparison = null)\n {\n if (is_array($apvereleasenbr)) {\n $useMinMax = false;\n if (isset($apvereleasenbr['min'])) {\n $this->addUsingAlias(VendorTableMap::COL_APVERELEASENBR, $apvereleasenbr['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($apvereleasenbr['max'])) {\n $this->addUsingAlias(VendorTableMap::COL_APVERELEASENBR, $apvereleasenbr['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(VendorTableMap::COL_APVERELEASENBR, $apvereleasenbr, $comparison);\n }", "title": "" }, { "docid": "0c6b82f2f5f25cc984788511635dbc27", "score": "0.44693986", "text": "public function searchPasienPembebasanTarif() {\n // should not be searched.\n\n $criteria = new CDbCriteria;\n $criteria->join = \"LEFT JOIN pembayaranpelayanan_t pp ON pp.pembayaranpelayanan_id = t.pembayaranpelayanan_id\";\n// $criteria->addBetweenCondition('t.tgl_pendaftaran', $this->tgl_awal, $this->tgl_akhir);\n $criteria->compare('LOWER(t.no_pendaftaran)', strtolower($this->no_pendaftaran), true);\n $criteria->compare('LOWER(t.no_rekam_medik)', strtolower($this->no_rekam_medik), true);\n $criteria->compare('LOWER(t.nama_pasien)', strtolower($this->nama_pasien), true);\n $criteria->compare('LOWER(t.statusperiksa)', strtolower($this->statusperiksa), true);\n $criteria->compare('LOWER(t.ruangan_nama)', strtolower($this->ruangan_nama), true);\n $criteria->compare('LOWER(t.nama_pegawai)', strtolower($this->nama_pegawai), true);\n $criteria->compare('LOWER(t.penjamin_nama)', strtolower($this->penjamin_nama), true);\n $criteria->compare('LOWER(t.carabayar_nama)', strtolower($this->carabayar_nama), true);\n if (isset($this->tgl_pendaftaran)){ \n //$criteria->addBetweenCondition('DATE(t.tgl_pendaftaran)', $this->tgl_pendaftaran.\" 00:00:00\", $this->tgl_pendaftaran.\" 23:59:59\");\n }\n \n $criteria->compare('LOWER(t.jeniskasuspenyakit_nama)', strtolower($this->jeniskasuspenyakit_nama), true);\n // $criteria->compare('LOWER(t.statusperiksa)', strtolower($this->statusperiksa), true);\n $criteria->addCondition('t.instalasi_id = '.Yii::app()->user->getState('instalasi_id')); \n $criteria->addCondition('t.ruangan_id = '.Yii::app()->user->getState('ruangan_id')); \n $criteria->addCondition(\" t.statusperiksa = '\".Params::STATUSPERIKSA_SUDAH_DIPERIKSA.\"' \");\n $criteria->addBetweenCondition(\"t.tgl_pendaftaran\", date('Y-m-d').' 00:00:00', date('Y-m-d').' 23:59:59');\n $criteria->addCondition(\" t.penjamin_id = '\".Params::PENJAMIN_ID_UMUM.\"' \");//pembayaranpelayanan_id \n $criteria->addCondition(\" (LOWER(pp.statusbayar) ilike '%\".Params::STATUSBAYAR_BELUM_LUNAS.\"%') OR (t.pembayaranpelayanan_id IS NULL) \");\n $criteria->with = array('pendaftaran');\n\n //$criteria->condition = 'pasienpulang.pendaftaran_id = t.pendaftaran_id';\n $criteria->order = 't.tgl_pendaftaran DESC';\n $criteria->limit = 10;\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n //'pagination' => false,\n ));\n }", "title": "" }, { "docid": "86adaaf9473617c3707c0295d50f4434", "score": "0.44621342", "text": "public function getCategoriaLancamentoGrid()\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n $criteria->together = true;\n \n $criteria->with = array(\n 'idCategoriaLancamentoPai' => array('select'=>'nm_categoriaLancamento'),\n );\n \n $criteria->select = array(\n 'id_categoriaLancamento','nm_categoriaLancamento','tp_categoriaLancamento','tp_categoriaLancamentoPessoa'\n );\n \n $criteria->compare('t.id_categoriaLancamento', $this->id_categoriaLancamento);\n $criteria->compare('t.nm_categoriaLancamento', $this->nm_categoriaLancamento, true);\n $criteria->compare('t.tp_categoriaLancamento', $this->tp_categoriaLancamento, true);\n $criteria->compare('idCategoriaLancamentoPai.nm_categoriaLancamento', $this->nm_categoriaLancamentoPai, true);\n $criteria->compare('tp_categoriaLancamentoPessoa', $this->tp_categoriaLancamentoPessoa,true);\n \n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "17b204e8ee45479d7aa0d153aac5035f", "score": "0.44617715", "text": "public function actionLineaCorte() {\n \n \n $usuario = Yii::app()->user->id;\n\n\n $users = Usuario::model()->find(array(\n 'select' => 'id_usuario',\n 'condition' => 'usuario=:usuario',\n 'params' => array(':usuario' => $usuario),\n )\n );\n\n\n $usuario_rol_id = $users->id_usuario;\n\n $userRol = UsuarioRol::model()->find(array(\n 'condition' => 'usuario_id=:usuario_id',\n 'params' => array(':usuario_id' => $usuario_rol_id),\n )\n );\n\n\n $criteria = new CDbCriteria();\n\n if ($userRol->rol_id == '2') {\n \n $criteria = new CDbCriteria;\n \n $criteria->select = 't.*,p.*';\n $criteria->join = 'INNER JOIN proyecto p ON t.id_proyecto = p.id_proyecto';\n $criteria->condition ='p.admin_riesgo='.$usuario_rol_id.'';\n \n }\n \n $model = Proyecto::model()->findAll($criteria);\n \n $this->render('proyectosLinea', array('proyectosAsignados'=>$model));\n \n }", "title": "" }, { "docid": "8d7b40c853ff8561fa7a9f8613cfa237", "score": "0.4456492", "text": "public function filterByOetbconffrtin($oetbconffrtin = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($oetbconffrtin)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(ConfigSalesOrderTableMap::COL_OETBCONFFRTIN, $oetbconffrtin, $comparison);\n }", "title": "" }, { "docid": "309cd5ec6e9eff03e1ddfe3661d1fe79", "score": "0.44503814", "text": "public function filterByLineofbusinessoid($lineofbusinessoid = null, $comparison = null)\n {\n if (is_array($lineofbusinessoid)) {\n $useMinMax = false;\n if (isset($lineofbusinessoid['min'])) {\n $this->addUsingAlias(EmployeepurchasesTableMap::COL_LINEOFBUSINESSOID, $lineofbusinessoid['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($lineofbusinessoid['max'])) {\n $this->addUsingAlias(EmployeepurchasesTableMap::COL_LINEOFBUSINESSOID, $lineofbusinessoid['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(EmployeepurchasesTableMap::COL_LINEOFBUSINESSOID, $lineofbusinessoid, $comparison);\n }", "title": "" }, { "docid": "f6be2e5cda469716cfa578134427bfc3", "score": "0.44227955", "text": "function getListFilter($col,$key) {\n\t\t\tswitch($col) {\n\t\t\t\tcase 'periode': return \"periode = '$key'\";\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "49be5e3b4e30fb3cdd36100176289800", "score": "0.44171706", "text": "public function filterByOetbconfcrntdate($oetbconfcrntdate = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($oetbconfcrntdate)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(ConfigSalesOrderTableMap::COL_OETBCONFCRNTDATE, $oetbconfcrntdate, $comparison);\n }", "title": "" }, { "docid": "78e725f69dc304a4fe2a002c32b6bd98", "score": "0.441018", "text": "public function filterByAddressline1($addressline1 = null, $comparison = null)\n\t{\n\t\tif (null === $comparison) {\n\t\t\tif (is_array($addressline1)) {\n\t\t\t\t$comparison = Criteria::IN;\n\t\t\t} elseif (preg_match('/[\\%\\*]/', $addressline1)) {\n\t\t\t\t$addressline1 = str_replace('*', '%', $addressline1);\n\t\t\t\t$comparison = Criteria::LIKE;\n\t\t\t}\n\t\t}\n\t\treturn $this->addUsingAlias(CustomerdetailsPeer::ADDRESSLINE1, $addressline1, $comparison);\n\t}", "title": "" }, { "docid": "04e75f45fb67953f4eb05d81d7df3e6e", "score": "0.4397702", "text": "public function searchPrint()\n {\n // should not be searched.\n\n $criteria=new CDbCriteria;\n\t\t$criteria->compare('warnadokrm_id',$this->warnadokrm_id);\n\t\t$criteria->compare('LOWER(warnadokrm_namawarna)',strtolower($this->warnadokrm_namawarna),true);\n\t\t$criteria->compare('LOWER(warnadokrm_kodewarna)',strtolower($this->warnadokrm_kodewarna),true);\n\t\t$criteria->compare('lokasirak_id',$this->lokasirak_id);\n\t\t$criteria->compare('LOWER(lokasirak_nama)',strtolower($this->lokasirak_nama),true);\n\t\t$criteria->compare('LOWER(nodokumenrm)',strtolower($this->nodokumenrm),true);\n\t\t$criteria->compare('LOWER(tglrekammedis)',strtolower($this->tglrekammedis),true);\n\t\t$criteria->compare('pasien_id',$this->pasien_id);\n\t\t$criteria->compare('LOWER(no_rekam_medik)',strtolower($this->no_rekam_medik),true);\n\t\t$criteria->compare('LOWER(tgl_rekam_medik)',strtolower($this->tgl_rekam_medik),true);\n\t\t$criteria->compare('LOWER(nama_pasien)',strtolower($this->nama_pasien),true);\n\t\t$criteria->compare('LOWER(nama_bin)',strtolower($this->nama_bin),true);\n\t\t$criteria->compare('LOWER(jeniskelamin)',strtolower($this->jeniskelamin),true);\n\t\t$criteria->compare('LOWER(tanggal_lahir)',strtolower($this->tanggal_lahir),true);\n\t\t$criteria->compare('LOWER(alamat_pasien)',strtolower($this->alamat_pasien),true);\n\t\t$criteria->compare('LOWER(tempat_lahir)',strtolower($this->tempat_lahir),true);\n\t\t$criteria->compare('LOWER(tglmasukrak)',strtolower($this->tglmasukrak),true);\n\t\t$criteria->compare('LOWER(statusrekammedis)',strtolower($this->statusrekammedis),true);\n\t\t$criteria->compare('LOWER(nomortertier)',strtolower($this->nomortertier),true);\n\t\t$criteria->compare('LOWER(nomorsekunder)',strtolower($this->nomorsekunder),true);\n\t\t$criteria->compare('LOWER(nomorprimer)',strtolower($this->nomorprimer),true);\n\t\t$criteria->compare('LOWER(warnanorm_i)',strtolower($this->warnanorm_i),true);\n\t\t$criteria->compare('LOWER(warnanorm_ii)',strtolower($this->warnanorm_ii),true);\n\t\t$criteria->compare('LOWER(tglkeluarakhir)',strtolower($this->tglkeluarakhir),true);\n\t\t$criteria->compare('LOWER(tglmasukakhir)',strtolower($this->tglmasukakhir),true);\n\t\t$criteria->compare('dokrekammedis_id',$this->dokrekammedis_id);\n\t\t$criteria->compare('LOWER(nourut_pinjam)',strtolower($this->nourut_pinjam),true);\n\t\t$criteria->compare('LOWER(tglpeminjamanrm)',strtolower($this->tglpeminjamanrm),true);\n\t\t$criteria->compare('LOWER(untukkepentingan)',strtolower($this->untukkepentingan),true);\n\t\t$criteria->compare('LOWER(keteranganpeminjaman)',strtolower($this->keteranganpeminjaman),true);\n\t\t$criteria->compare('LOWER(tglakandikembalikan)',strtolower($this->tglakandikembalikan),true);\n\t\t$criteria->compare('LOWER(namapeminjam)',strtolower($this->namapeminjam),true);\n\t\t$criteria->compare('printpeminjaman',$this->printpeminjaman);\n\t\t$criteria->compare('LOWER(create_time)',strtolower($this->create_time),true);\n\t\t$criteria->compare('LOWER(update_time)',strtolower($this->update_time),true);\n\t\t$criteria->compare('LOWER(create_loginpemakai_id)',strtolower($this->create_loginpemakai_id),true);\n\t\t$criteria->compare('LOWER(update_loginpemakai_id)',strtolower($this->update_loginpemakai_id),true);\n\t\t$criteria->compare('LOWER(create_ruangan)',strtolower($this->create_ruangan),true);\n\t\t$criteria->compare('ruangan_id',$this->ruangan_id);\n\t\t$criteria->compare('LOWER(ruangan_nama)',strtolower($this->ruangan_nama),true);\n\t\t$criteria->compare('pendaftaran_id',$this->pendaftaran_id);\n\t\t$criteria->compare('LOWER(no_pendaftaran)',strtolower($this->no_pendaftaran),true);\n\t\t$criteria->compare('peminjamanrm_id',$this->peminjamanrm_id);\n\t\t$criteria->compare('pengirimanrm_id',$this->pengirimanrm_id);\n\t\t$criteria->compare('kembalirm_id',$this->kembalirm_id);\n // Klo limit lebih kecil dari nol itu berarti ga ada limit \n $criteria->limit=-1; \n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n 'pagination'=>false,\n ));\n }", "title": "" }, { "docid": "4ac5e790ecebda743fe4957873de80a7", "score": "0.4380902", "text": "public function searchKunjunganPasienPolikGigi() {\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n// $criteria->addBetweenCondition('t.tgl_pendaftaran', $this->tgl_awal, $this->tgl_akhir);\n $criteria->compare('LOWER(t.no_pendaftaran)', strtolower($this->no_pendaftaran), true);\n $criteria->compare('LOWER(t.no_rekam_medik)', strtolower($this->no_rekam_medik), true);\n $criteria->compare('LOWER(t.nama_pasien)', strtolower($this->nama_pasien), true);\n $criteria->compare('LOWER(t.statusperiksa)', strtolower($this->statusperiksa), true);\n $criteria->compare('LOWER(t.ruangan_nama)', strtolower($this->ruangan_nama), true);\n $criteria->compare('LOWER(t.nama_pegawai)', strtolower($this->nama_pegawai), true);\n $criteria->compare('LOWER(t.penjamin_nama)', strtolower($this->penjamin_nama), true);\n $criteria->compare('LOWER(t.carabayar_nama)', strtolower($this->carabayar_nama), true);\n $criteria->compare('LOWER(t.alamat_pasien)', strtolower($this->alamat_pasien), true);\n if (isset($this->tgl_pendaftaran)){ \n // $criteria->addBetweenCondition('DATE(t.tgl_pendaftaran)', MyFormatter::formatDateTimeForDb($this->tgl_pendaftaran).\" 00:00:00\", MyFormatter::formatDateTimeForDb($this->tgl_pendaftaran).\" 23:59:59\");\n }\n if (!empty($this->statusperiksa)){ \n $criteria->compare('LOWER(t.statusperiksa)', strtolower($this->statusperiksa), true);\n }\n if (!empty($this->jeniskasuspenyakit_id)){ \n $criteria->addCondition(\" t.jeniskasuspenyakit_id = '\".$this->jeniskasuspenyakit_id.\"' \");\n }\n $criteria->compare('LOWER(t.jeniskasuspenyakit_nama)', strtolower($this->jeniskasuspenyakit_nama), true);\n // $criteria->compare('LOWER(t.statusperiksa)', strtolower($this->statusperiksa), true);\n $criteria->addCondition('t.instalasi_id = '.Yii::app()->user->getState('instalasi_id'));\n $criteria->addCondition(\" t.ruangan_id = '\".Yii::app()->user->getState('ruangan_id').\"' \");\n $criteria->addBetweenCondition(\"t.tgl_pendaftaran\", date(\"Y-m-d 00:00:00\"), date(\"Y-m-d 23:59:59\"));\n $criteria->addNotInCondition(\"t.statusperiksa\", array(Params::STATUSPERIKSA_BATAL_PERIKSA, Params::STATUSPERIKSA_SUDAH_PULANG));\n $criteria->with = array('pendaftaran');\n\n //$criteria->condition = 'pasienpulang.pendaftaran_id = t.pendaftaran_id';\n $criteria->order = 't.tgl_pendaftaran DESC';\n $criteria->limit = 10;\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n //'pagination' => false,\n ));\n }", "title": "" }, { "docid": "f40d6d7c3ff003fab67c21c72592d6ad", "score": "0.4379191", "text": "public function search($plantel_id) {\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('usuario_ini_id', $this->usuario_ini_id);\n $criteria->compare('fecha_ini', $this->fecha_ini, true);\n $criteria->compare('usuario_act_id', $this->usuario_act_id);\n $criteria->compare('fecha_act', $this->fecha_act, true);\n $criteria->compare('fecha_elim', $this->fecha_elim, true);\n // $criteria->compare('estatus', $this->estatus, true);\n // $criteria->compare('plan_id', $this->plan_id);\n // $criteria->compare('nivel_id', $this->nivel_id);\n\n if (is_numeric($this->plan_id)) {\n if (strlen($this->plan_id) < 7) {\n $criteria->compare('plan_id', $this->plan_id);\n }\n }\n\n if (is_numeric($this->nivel_id)) {\n if (strlen($this->nivel_id) < 7) {\n $criteria->compare('nivel_id', $this->nivel_id);\n }\n }\n\n if ($this->estatus === 'A' || $this->estatus === 'E') {\n $criteria->compare('estatus', $this->estatus);\n }\n\n $criteria->compare('plantel_id', $plantel_id); // filtro que los registro que muestro sean del plantel que se selecciono.\n\n if (is_numeric($this->grado_id)) {\n if (strlen($this->grado_id) < 7) {\n $criteria->compare('grado_id', $this->grado_id);\n }\n }\n\n if (is_numeric($this->capacidad)) {\n if (strlen($this->capacidad) <= 3) {\n $criteria->compare('to_char( t.capacidad,\\'999\\' )', $this->capacidad, true);\n // $criteria->addSearchCondition('capacidad', '%' . $this->capacidad . '%', false, 'AND', 'ILIKE');\n }\n }\n\n if (is_numeric($this->turno_id)) {\n if (strlen($this->turno_id) < 7) {\n $criteria->compare('turno_id', $this->turno_id);\n }\n }\n\n if (is_numeric($this->seccion_id)) {\n if (strlen($this->seccion_id) < 7) {\n $criteria->compare('seccion_id', $this->seccion_id);\n }\n }\n $sort = new CSort();\n $sort->defaultOrder = 'estatus ASC, fecha_ini DESC';\n //Va a ordenar la tabla utilizando el campo id_representacion en forma descendente \"DESC\",\n\n return new CActiveDataProvider($this, array(\n 'pagination' => array(\n 'pageSize' => 10\n ),\n 'criteria' => $criteria,\n 'sort' => $sort,\n ));\n }", "title": "" }, { "docid": "a74eee192220924cb8d187f0f09dd4da", "score": "0.43783477", "text": "public function filterByAddressLine1($addressLine1 = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($addressLine1)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $addressLine1)) {\n $addressLine1 = str_replace('*', '%', $addressLine1);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(AddressesPeer::ADDRESS_LINE_1, $addressLine1, $comparison);\n }", "title": "" }, { "docid": "c09f2e0ad29cd22ba5e08a1fdd5b12bb", "score": "0.4374483", "text": "public function filterByPassportno($passportno = null, $comparison = null)\n\t{\n\t\tif (null === $comparison) {\n\t\t\tif (is_array($passportno)) {\n\t\t\t\t$comparison = Criteria::IN;\n\t\t\t} elseif (preg_match('/[\\%\\*]/', $passportno)) {\n\t\t\t\t$passportno = str_replace('*', '%', $passportno);\n\t\t\t\t$comparison = Criteria::LIKE;\n\t\t\t}\n\t\t}\n\t\treturn $this->addUsingAlias(CustomerdetailsPeer::PASSPORTNO, $passportno, $comparison);\n\t}", "title": "" }, { "docid": "8ec8736a800aa010ad1dc9113ab62af2", "score": "0.4370588", "text": "public function filterByAddressLine2($addressLine2 = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($addressLine2)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $addressLine2)) {\n $addressLine2 = str_replace('*', '%', $addressLine2);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(AddressesPeer::ADDRESS_LINE_2, $addressLine2, $comparison);\n }", "title": "" }, { "docid": "5df42853347754ba4c11b9bc03a6460d", "score": "0.43678233", "text": "public function filterByAddressLine1($addressLine1 = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($addressLine1)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $addressLine1)) {\n $addressLine1 = str_replace('*', '%', $addressLine1);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(EventsPeer::ADDRESS_LINE_1, $addressLine1, $comparison);\n }", "title": "" }, { "docid": "970187ae87f968d3ee26437891568284", "score": "0.43612492", "text": "public function filterByOetbconfoptlabl4($oetbconfoptlabl4 = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($oetbconfoptlabl4)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(ConfigSalesOrderTableMap::COL_OETBCONFOPTLABL4, $oetbconfoptlabl4, $comparison);\n }", "title": "" }, { "docid": "3180ecce4580b60d00105955f26c4a3d", "score": "0.43458608", "text": "public function filterByAddressLine2($addressLine2 = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($addressLine2)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $addressLine2)) {\n $addressLine2 = str_replace('*', '%', $addressLine2);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(EventsPeer::ADDRESS_LINE_2, $addressLine2, $comparison);\n }", "title": "" }, { "docid": "db7f1b371a694801a71cd69bfd21d256", "score": "0.43427607", "text": "public function filterByOetbconfprtinv($oetbconfprtinv = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($oetbconfprtinv)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(ConfigSalesOrderTableMap::COL_OETBCONFPRTINV, $oetbconfprtinv, $comparison);\n }", "title": "" }, { "docid": "7e416c04e388951a3d8f94551981f6f6", "score": "0.43347722", "text": "public function item($qnbr, int $linenbr) {\n\t\treturn $this->querySessionidQuote($qnbr)->filterByLinenbr($linenbr)->findOne();\n\t}", "title": "" }, { "docid": "31534cb2240e000139fc92f521135dd7", "score": "0.4329692", "text": "public function search_loquedebever()\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('txtnoticia',$this->txtnoticia,true);\n\t\t$criteria->compare('fecha',$this->fecha,true);\n\t\t$criteria->compare('autor',$this->autor,true);\n\t\t$criteria->compare('expira',$this->expira);\n\t\t$criteria->compare('tiponoticia',$this->tiponoticia,true);\n\t\t$criteria->compare('mensaje',$this->mensaje,true);\n\t\t$criteria->addcondition(\"aprobado=1 \",\" OR \");\n\t\t$criteria->addcondition(\"autor='\".Yii::app()->user->name.\"'\");\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "3768d56100ed2eac2df29931a66c96d7", "score": "0.43257928", "text": "public function filterByOetbconfkey($oetbconfkey = null, $comparison = null)\n {\n if (is_array($oetbconfkey)) {\n $useMinMax = false;\n if (isset($oetbconfkey['min'])) {\n $this->addUsingAlias(ConfigSalesOrderTableMap::COL_OETBCONFKEY, $oetbconfkey['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($oetbconfkey['max'])) {\n $this->addUsingAlias(ConfigSalesOrderTableMap::COL_OETBCONFKEY, $oetbconfkey['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(ConfigSalesOrderTableMap::COL_OETBCONFKEY, $oetbconfkey, $comparison);\n }", "title": "" }, { "docid": "2313e1bae226dc667a79a2235875a001", "score": "0.43175364", "text": "public function criteriaSearch()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\tif(!empty($this->rekonsiliasibank_id)){\n\t\t\t$criteria->addCondition('rekonsiliasibank_id = '.$this->rekonsiliasibank_id);\n\t\t}\n\t\tif(!empty($this->rekonsiliasibankdetail_id)){\n\t\t\t$criteria->addCondition('rekonsiliasibankdetail_id = '.$this->rekonsiliasibankdetail_id);\n\t\t}\n//\t\tif(!empty($this->kelrekening_id)){\n//\t\t\t$criteria->addCondition('kelrekening_id = '.$this->kelrekening_id);\n//\t\t}\n//\t\tif(!empty($this->rekening1_id)){\n//\t\t\t$criteria->addCondition('rekening1_id = '.$this->rekening1_id);\n//\t\t}\n//\t\tif(!empty($this->rekening2_id)){\n//\t\t\t$criteria->addCondition('rekening2_id = '.$this->rekening2_id);\n//\t\t}\n//\t\tif(!empty($this->rekening3_id)){\n//\t\t\t$criteria->addCondition('rekening3_id = '.$this->rekening3_id);\n//\t\t}\n//\t\tif(!empty($this->rekening4_id)){\n//\t\t\t$criteria->addCondition('rekening4_id = '.$this->rekening4_id);\n//\t\t}\n\t\tif(!empty($this->rekening5_id)){\n\t\t\t$criteria->addCondition('rekening5_id = '.$this->rekening5_id);\n\t\t}\n\t\t$criteria->compare('saldodebit',$this->saldodebit);\n\t\t$criteria->compare('saldokredit',$this->saldokredit);\n\t\tif(!empty($this->jenisrekonsiliasibank_id)){\n\t\t\t$criteria->addCondition('jenisrekonsiliasibank_id = '.$this->jenisrekonsiliasibank_id);\n\t\t}\n\n\t\treturn $criteria;\n\t}", "title": "" }, { "docid": "45db238bc1cb292d2818786d496488c9", "score": "0.43122643", "text": "public function filterByOetbcon2upsonline($oetbcon2upsonline = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($oetbcon2upsonline)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(ConfigSalesOrderTableMap::COL_OETBCON2UPSONLINE, $oetbcon2upsonline, $comparison);\n }", "title": "" }, { "docid": "05891e05d877facb6bc362888fc3b0ba", "score": "0.4311951", "text": "public function filterByOehshnbrcntrs($oehshnbrcntrs = null, $comparison = null)\n {\n if (is_array($oehshnbrcntrs)) {\n $useMinMax = false;\n if (isset($oehshnbrcntrs['min'])) {\n $this->addUsingAlias(SalesOrderShipmentTableMap::COL_OEHSHNBRCNTRS, $oehshnbrcntrs['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($oehshnbrcntrs['max'])) {\n $this->addUsingAlias(SalesOrderShipmentTableMap::COL_OEHSHNBRCNTRS, $oehshnbrcntrs['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(SalesOrderShipmentTableMap::COL_OEHSHNBRCNTRS, $oehshnbrcntrs, $comparison);\n }", "title": "" }, { "docid": "2a10606fa091ee94bb9a907e1dad5020", "score": "0.43042073", "text": "public function filterByBairro($bairro = null, $comparison = null)\n\t{\n\t\tif (null === $comparison) {\n\t\t\tif (is_array($bairro)) {\n\t\t\t\t$comparison = Criteria::IN;\n\t\t\t} elseif (preg_match('/[\\%\\*]/', $bairro)) {\n\t\t\t\t$bairro = str_replace('*', '%', $bairro);\n\t\t\t\t$comparison = Criteria::LIKE;\n\t\t\t}\n\t\t}\n\t\treturn $this->addUsingAlias(EnderecoPeer::BAIRRO, $bairro, $comparison);\n\t}", "title": "" }, { "docid": "df6fcc9a3d3d42b930a70580e8ba1aee", "score": "0.427951", "text": "public function filterByOehdcntrnbr($oehdcntrnbr = null, $comparison = null)\n {\n if (is_array($oehdcntrnbr)) {\n $useMinMax = false;\n if (isset($oehdcntrnbr['min'])) {\n $this->addUsingAlias(SalesOrderTableMap::COL_OEHDCNTRNBR, $oehdcntrnbr['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($oehdcntrnbr['max'])) {\n $this->addUsingAlias(SalesOrderTableMap::COL_OEHDCNTRNBR, $oehdcntrnbr['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(SalesOrderTableMap::COL_OEHDCNTRNBR, $oehdcntrnbr, $comparison);\n }", "title": "" }, { "docid": "50e480212a4f2065c1b5ddfa114911b3", "score": "0.42794013", "text": "public function filterBySoortBron($soortBron = null, $comparison = null)\n {\n if (is_array($soortBron)) {\n $useMinMax = false;\n if (isset($soortBron['min'])) {\n $this->addUsingAlias(GsPrijsTariefTabelPeer::SOORT_BRON, $soortBron['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($soortBron['max'])) {\n $this->addUsingAlias(GsPrijsTariefTabelPeer::SOORT_BRON, $soortBron['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(GsPrijsTariefTabelPeer::SOORT_BRON, $soortBron, $comparison);\n }", "title": "" }, { "docid": "74315d2f2ac1b3e4f7b5e3af8f676808", "score": "0.42772752", "text": "public function filterByAddressline2($addressline2 = null, $comparison = null)\n\t{\n\t\tif (null === $comparison) {\n\t\t\tif (is_array($addressline2)) {\n\t\t\t\t$comparison = Criteria::IN;\n\t\t\t} elseif (preg_match('/[\\%\\*]/', $addressline2)) {\n\t\t\t\t$addressline2 = str_replace('*', '%', $addressline2);\n\t\t\t\t$comparison = Criteria::LIKE;\n\t\t\t}\n\t\t}\n\t\treturn $this->addUsingAlias(CustomerdetailsPeer::ADDRESSLINE2, $addressline2, $comparison);\n\t}", "title": "" }, { "docid": "8220421782297c93ddcad867fd9ffccc", "score": "0.42707136", "text": "function getListFilter($col,$key) {\n\t\t\tglobal $conn;\n\t\t\tswitch($col) {\n\t\t\t\tcase 'periode': return \"periodedaftar = '$key'\";\n\t\t\t\tcase 'jalur': return \"p.jalurpenerimaan = '$key'\";\n\t\t\t\tcase 'gelombang':return \"idgelombang = '$key'\"; \n\t\t\t\tcase 'lulus':\n\t\t\t\t\tif($key=='l') return \"pilihanditerima is not NULL\";\n\t\t\t\t\telseif ($key=='t') return \"pilihanditerima is NULL\";\n\t\t\t\tcase 'jenis':\n\t\t\t\t\tif($key=='mhs') return \"nimpendaftar is not NULL\";\n\t\t\t\t\telseif ($key=='pdf') return \"nimpendaftar is NULL\";\n\t\t\t\tcase 'fakultas':\n\t\t\t\t\treturn \"pilihanditerima in (select kodeunit from gate.ms_unit where kodeunitparent ='$key') \";\n\t\t\t\t\t\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "12d5d44bcade7a99f316964b003cecd7", "score": "0.4266414", "text": "public function searchPrint()\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n $criteria->select='pasien_id,nama_pasien,kelaspelayanan_nama,kelaspelayanan_id,sum(tarif_tindakankomp)';\n $criteria->group='pasien_id,nama_pasien,kelaspelayanan_nama,kelaspelayanan_id';\n $criteria->addBetweenCondition('DATE(tglmasukpenunjang)',$this->tgl_awal,$this->tgl_akhir,true);\n\t\t$criteria->compare('pasienmasukpenunjang_id',$this->pasienmasukpenunjang_id);\n\t\t$criteria->compare('pasien_id',$this->pasien_id);\n\t\t$criteria->compare('LOWER(no_rekam_medik)',strtolower($this->no_rekam_medik),true);\n\t\t$criteria->compare('LOWER(namadepan)',strtolower($this->namadepan),true);\n\t\t$criteria->compare('LOWER(nama_pasien)',strtolower($this->nama_pasien),true);\n\t\t$criteria->compare('LOWER(nama_bin)',strtolower($this->nama_bin),true);\n\t\t$criteria->compare('LOWER(jeniskelamin)',strtolower($this->jeniskelamin),true);\n\t\t$criteria->compare('LOWER(tempat_lahir)',strtolower($this->tempat_lahir),true);\n\t\t$criteria->compare('LOWER(tanggal_lahir)',strtolower($this->tanggal_lahir),true);\n\t\t$criteria->compare('LOWER(alamat_pasien)',strtolower($this->alamat_pasien),true);\n\t\t$criteria->compare('pendaftaran_id',$this->pendaftaran_id);\n\t\t$criteria->compare('LOWER(no_pendaftaran)',strtolower($this->no_pendaftaran),true);\n\t\t$criteria->compare('ruanganasal_id',$this->ruanganasal_id);\n\t\t$criteria->compare('kelaspelayanan_id',$this->kelaspelayanan_id);\n\t\t$criteria->compare('LOWER(kelaspelayanan_nama)',strtolower($this->kelaspelayanan_nama),true);\n\t\t$criteria->compare('LOWER(no_masukpenunjang)',strtolower($this->no_masukpenunjang),true);\n\t\t$criteria->compare('tindakanpelayanan_id',$this->tindakanpelayanan_id);\n\t\t$criteria->compare('tindakankomponen_id',$this->tindakankomponen_id);\n\t\t$criteria->compare('tarif_tindakankomp',$this->tarif_tindakankomp);\n\t\t$criteria->compare('komponentarif_id',$this->komponentarif_id);\n\t\t$criteria->compare('LOWER(komponentarif_nama)',strtolower($this->komponentarif_nama),true);\n\t\t$criteria->compare('daftartindakan_id',$this->daftartindakan_id);\n \n $criteria->limit = -1;\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n 'pagination' => array('pageSize' => $this->jumlahTampil,),\n 'totalItemCount' => $this->jumlahTampil,\n\t\t));\n\t}", "title": "" }, { "docid": "73e94279e0fc9a366837227482dee946", "score": "0.4256705", "text": "public function searchPrint()\n {\n // should not be searched.\n\n $criteria=new CDbCriteria;\n\t\t$criteria->compare('kategoritindakan_id',$this->kategoritindakan_id);\n\t\t$criteria->compare('LOWER(kategoritindakan_nama)',strtolower($this->kategoritindakan_nama),true);\n\t\t$criteria->compare('kelompoktindakan_id',$this->kelompoktindakan_id);\n\t\t$criteria->compare('LOWER(kelompoktindakan_nama)',strtolower($this->kelompoktindakan_nama),true);\n\t\t$criteria->compare('LOWER(daftartindakan_kode)',strtolower($this->daftartindakan_kode),true);\n\t\t$criteria->compare('LOWER(daftartindakan_nama)',strtolower($this->daftartindakan_nama),true);\n\t\t$criteria->compare('LOWER(daftartindakan_namalainnya)',strtolower($this->daftartindakan_namalainnya),true);\n\t\t$criteria->compare('LOWER(daftartindakan_katakunci)',strtolower($this->daftartindakan_katakunci),true);\n\t\t$criteria->compare('perdatarif_id',$this->perdatarif_id);\n\t\t$criteria->compare('LOWER(perdanama_sk)',strtolower($this->perdanama_sk),true);\n\t\t$criteria->compare('LOWER(noperda)',strtolower($this->noperda),true);\n\t\t$criteria->compare('LOWER(tglperda)',strtolower($this->tglperda),true);\n\t\t$criteria->compare('LOWER(perdatentang)',strtolower($this->perdatentang),true);\n\t\t$criteria->compare('LOWER(ditetapkanoleh)',strtolower($this->ditetapkanoleh),true);\n\t\t$criteria->compare('LOWER(tempatditetapkan)',strtolower($this->tempatditetapkan),true);\n\t\t$criteria->compare('jenistarif_id',$this->jenistarif_id);\n\t\t$criteria->compare('LOWER(jenistarif_nama)',strtolower($this->jenistarif_nama),true);\n\t\t$criteria->compare('tariftindakan_id',$this->tariftindakan_id);\n\t\t$criteria->compare('komponentarif_id',$this->komponentarif_id);\n\t\t$criteria->compare('LOWER(komponentarif_nama)',strtolower($this->komponentarif_nama),true);\n\t\t$criteria->compare('harga_tariftindakan',$this->harga_tariftindakan);\n\t\t$criteria->compare('persendiskon_tind',$this->persendiskon_tind);\n\t\t$criteria->compare('hargadiskon_tind',$this->hargadiskon_tind);\n\t\t$criteria->compare('persencyto_tind',$this->persencyto_tind);\n\t\t$criteria->compare('jeniskelas_id',$this->jeniskelas_id);\n\t\t$criteria->compare('LOWER(jeniskelas_nama)',strtolower($this->jeniskelas_nama),true);\n\t\t$criteria->compare('kelaspelayanan_id',$this->kelaspelayanan_id);\n\t\t$criteria->compare('LOWER(kelaspelayanan_nama)',strtolower($this->kelaspelayanan_nama),true);\n\t\t$criteria->compare('LOWER(kelaspelayanan_namalainnya)',strtolower($this->kelaspelayanan_namalainnya),true);\n\t\t$criteria->compare('daftartindakan_id',$this->daftartindakan_id);\n\t\t$criteria->compare('pemeriksaanlab_id',$this->pemeriksaanlab_id);\n\t\t$criteria->compare('jenispemeriksaanlab_id',$this->jenispemeriksaanlab_id);\n\t\t$criteria->compare('LOWER(jenispemeriksaanlab_kode)',strtolower($this->jenispemeriksaanlab_kode),true);\n\t\t$criteria->compare('jenispemeriksaanlab_urutan',$this->jenispemeriksaanlab_urutan);\n\t\t$criteria->compare('LOWER(jenispemeriksaanlab_nama)',strtolower($this->jenispemeriksaanlab_nama),true);\n\t\t$criteria->compare('LOWER(pemeriksaanlab_kode)',strtolower($this->pemeriksaanlab_kode),true);\n\t\t$criteria->compare('pemeriksaanlab_urutan',$this->pemeriksaanlab_urutan);\n\t\t$criteria->compare('LOWER(pemeriksaanlab_nama)',strtolower($this->pemeriksaanlab_nama),true);\n // Klo limit lebih kecil dari nol itu berarti ga ada limit \n $criteria->limit=-1; \n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n 'pagination'=>false,\n ));\n }", "title": "" }, { "docid": "d5d86e11972944a2e4540814d501f1bf", "score": "0.425347", "text": "public function search($filtro_empresas = null)\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\t\t$criteria = new CDbCriteria;\n\t\t$criteria->with = array('usuario0','ent_titular','ent_corredor','ent_destino');\n\t\t//Yii::log(\" - PASO DESCARGA- \".var_export(explode(\" - \", $this->usuario),true), CLogger::LEVEL_WARNING, __METHOD__);\n\t\t$criteria->compare('id', $this->id);\n if(isset($this->fecha_rango) && $this->fecha_rango != ''){\n\t\t\t//Yii::log(\" - PASO - \".var_export(explode(\" - \", $this->fecha_rango),true), CLogger::LEVEL_WARNING, __METHOD__);\n\t\t\t$rango =explode(\" - \", $this->fecha_rango);\n\t\t\t$feDesde=explode(\"/\",$rango[0]);\n\t\t\t$feHasta=explode(\"/\",$rango[1]);\n\t\t\t//$criteria->addCondition('DATE_FORMAT(t.fecha_carga,\"%d/%m/%Y\") >= \"'.$rango[0].'\"');\n\t\t\t//$criteria->addCondition('DATE_FORMAT(t.fecha_carga,\"%d/%m/%Y\") <= \"'.$rango[1].'\"');\n\t\t\t$criteria->addCondition('t.fecha_carga >= \"'.$feDesde[2].'-'.$feDesde[1].'-'.$feDesde[0].'\"');\n\t\t\t$criteria->addCondition('t.fecha_carga <= \"'.$feHasta[2].'-'.$feHasta[1].'-'.$feHasta[0].'\"');\n\t\t\t\n\t\t}\n\t\t//$criteria->compare('DATE_FORMAT(fecha_carga,\"%d/%m/%Y\")', $this->fecha_carga, true);\n\t\t//Yii::log(\" - PASO - \".var_export($this,true), CLogger::LEVEL_WARNING, __METHOD__);\n\t\t$criteria->compare('carta_porte', $this->carta_porte, true);\n\t\t$criteria->compare('DATE_FORMAT(fecha_carta_porte,\"%d/%m/%Y\")', $this->fecha_carta_porte, true);\n\t\t$criteria->compare('cuit_titular', $this->cuit_titular, true);\n\t\t$criteria->compare('producto', $this->producto);\n\t\t$criteria->compare('cod_postal', $this->cod_postal, true);\n\t\t$criteria->compare('kg_brutos_procedencia', $this->kg_brutos_procedencia);\n\t\t$criteria->compare('kg_tara_procedencia', $this->kg_tara_procedencia);\n\t\t$criteria->compare('kg_netos_procedencia', $this->kg_netos_procedencia);\n\t\t$criteria->compare('calidad', $this->calidad, true);\n\t\t$criteria->compare('porcentaje_humedad', $this->porcentaje_humedad);\n\t\t$criteria->compare('merma_humedad', $this->merma_humedad);\n\t\t$criteria->compare('cuit_corredor', $this->cuit_corredor, true);\n\t\t$criteria->compare('cuit_destino', $this->cuit_destino, true);\n\t\t$criteria->compare('chasis', $this->chasis, true);\n\t\t$criteria->compare('acoplado', $this->acoplado, true);\n\t\t$criteria->compare('fecha_arribo', $this->fecha_arribo, true);\n\t\t$criteria->compare('fecha_descarga', $this->fecha_descarga, true);\n\t\t$criteria->compare('kg_brutos_destino', $this->kg_brutos_destino);\n\t\t$criteria->compare('kg_tara_destino', $this->kg_tara_destino);\n\t\t$criteria->compare('kg_netos_destino', $this->kg_netos_destino);\n\t\t$criteria->compare('kg_merma_total', $this->kg_merma_total);\n\t\t$criteria->compare('otras_mermas', $this->otras_mermas);\n\t\t$criteria->compare('neto_aplicable', $this->neto_aplicable);\n\t\t$criteria->compare('analisis', $this->analisis, true);\n\t\t$criteria->compare('porcentaje_zaranda', $this->porcentaje_zaranda);\n\t\t$criteria->compare('merma_zaranda', $this->merma_zaranda);\n\t\t$criteria->compare('fumigado', $this->fumigado);\n\t\t$criteria->compare('exportado',$this->exportado);\n\t\t$criteria->compare('cupo_alfanumerico',$this->cupo_alfanumerico);\n\n\t\t$criteria->order = 't.fecha_carga DESC';\n\n\t\t//busqueda por razon social titular\n\t\t$criteria->compare('ent_titular.razonSocial', $this->titular, true);\n\t\t//busqueda por razon social corredor\n\t\t$criteria->compare('ent_corredor.razonSocial', $this->corredor, true);\n\t\t//busqueda por razon social destino\n\t\t$criteria->compare('ent_destino.razonSocial', $this->destino, true);\n\t\t\n\t\t\n\t\t//$criteria->compare('ent_titular.razonSocial', $this->ent_titular->razonSocial, true);\n\t\t// si el filtro de empresas no es null, selecciono los usuarios\n\t\tif($filtro_empresas){\n\t\t\t$criteria->addInCondition('t.usuario',$filtro_empresas);\n\t\t}\n\t\t//$criteria->compare('t.usuario', $this->usuario);\n\t\t//filtro usuario\n\t\tif (Yii::app()->authManager->checkAccess('admin', Yii::app()->user->id) || Yii::app()->authManager->checkAccess('super', Yii::app()->user->id)){\n\t\t\t$criteria->compare('usuario0.nombre', $this->usuario, true);\n\t\t}else{\n\t\t\t$criteria->compare('t.usuario', Yii::app()->user->id);\n\t\t}\n\t\t\n\t\t\n\t\t$criteria->compare('analisis_finalizado', $this->analisis_finalizado);\n\t\t$criteria->compare('cuit_intermediario', $this->cuit_intermediario, true);\n\t\t$criteria->compare('cuit_remitente_comercial', $this->cuit_remitente_comercial, true);\n\t\t$criteria->compare('cuit_destinatario', $this->cuit_destinatario, true);\n\t\t$criteria->group = 't.carta_porte';\n\t\t$criteria->limit=Yii::app()->params['limit'];\n\t\t\n\n\t\t// Condicional para excluir Exportar=\"NO\"\n\t\t$temp_criteria = clone $criteria;\n\t\tif(empty($temp_criteria->condition)){\n\t\t\t$temp_criteria->condition .= 't.cuit_destino IN (SELECT entidad.cuit FROM entidad WHERE entidad.exportar=1 and entidad.tipo_entidad=3)';// esta hard code el tipo hay q mejorar esto\n\t\t}else{\n\t\t\t$temp_criteria->condition .= ' AND t.cuit_destino IN (SELECT entidad.cuit FROM entidad WHERE entidad.exportar=1 and entidad.tipo_entidad=3)';// esta hard code el tipo hay q mejorar esto\n\t\t}\n\t\t\n\t\t$temp_criteria->with = array('analisis0');\n\t\t$temp_criteria->together = true;\t\n\n\t\t//$temp_criteria->limit=Yii::app()->params['limit'];\n\t\tYii::app()->user->setState('export',null);\n\t\tYii::app()->user->setState('export', new CActiveDataProvider(get_class($this), array('criteria' => $temp_criteria, 'pagination' => false,)));\n\t\t\t\n\n\t\t// Guardo en session todo, sin excluir Exportar=\"NO\"\n\t\tYii::app()->user->setState('export_all',null);\n\t\tYii::app()->user->setState('export_all', new CActiveDataProvider(get_class($this), array('criteria' => $criteria, 'pagination' => false,)));\n\t\t\n\n\n\t\t//Yii::log(\" - PASO - \".var_export(Yii::app()->user->getState('pageSize'),true), CLogger::LEVEL_WARNING, __METHOD__);\n\t\t$dataProvider =new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t\t//'pagination'=>array('pageSize'=>20)\n\t\t));\n\t\t//Yii::log(\" - PASO - \".var_export($dataProvider->getPagination(),true), CLogger::LEVEL_WARNING, __METHOD__);\n\t\treturn $dataProvider;\n\t}", "title": "" }, { "docid": "ac54c38aae5727caa2da4962dd95c722", "score": "0.42510128", "text": "public function searchKunjunganPasien() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n// $criteria->addBetweenCondition('t.tgl_pendaftaran', $this->tgl_awal, $this->tgl_akhir);\n $criteria->compare('LOWER(t.no_pendaftaran)', strtolower($this->no_pendaftaran), true);\n $criteria->compare('LOWER(t.no_rekam_medik)', strtolower($this->no_rekam_medik), true);\n $criteria->compare('LOWER(t.nama_pasien)', strtolower($this->nama_pasien), true);\n $criteria->compare('LOWER(t.statusperiksa)', strtolower($this->statusperiksa), true);\n $criteria->compare('LOWER(t.ruangan_nama)', strtolower($this->ruangan_nama), true);\n $criteria->compare('LOWER(t.nama_pegawai)', strtolower($this->nama_pegawai), true);\n $criteria->compare('LOWER(t.penjamin_nama)', strtolower($this->penjamin_nama), true);\n $criteria->compare('LOWER(t.carabayar_nama)', strtolower($this->carabayar_nama), true);\n if (isset($this->tgl_pendaftaran)){ \n $criteria->addBetweenCondition('DATE(t.tgl_pendaftaran)', $this->tgl_pendaftaran.\" 00:00:00\", $this->tgl_pendaftaran.\" 23:59:59\");\n }\n $criteria->compare('LOWER(t.jeniskasuspenyakit_nama)', strtolower($this->jeniskasuspenyakit_nama), true);\n // $criteria->compare('LOWER(t.statusperiksa)', strtolower($this->statusperiksa), true);\n $criteria->addCondition('t.instalasi_id = '.Yii::app()->user->getState('instalasi_id')); \n $criteria->with = array('pendaftaran');\n\n //$criteria->condition = 'pasienpulang.pendaftaran_id = t.pendaftaran_id';\n $criteria->order = 't.tgl_pendaftaran DESC';\n $criteria->limit = 10;\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n //'pagination' => false,\n ));\n }", "title": "" }, { "docid": "2b0a1acdcd4543198b50c1534e035b11", "score": "0.42447507", "text": "public function searchPrint() {\n // should not be searched.\n\n $criteria = new CDbCriteria;\n $criteria->select = \"pasienpulang_id, carakeluar, no_pendaftaran, no_rekam_medik, pendaftaran_id, namadepan, nama_pasien, umur, tgl_pendaftaran\";//, diagnosa_nama\n if (is_array($this->carakeluar)) {\n foreach ($this->carakeluar as $v) {\n if ($v == 'DIPULANGKAN') {\n $criteria->compare('LOWER(carakeluar)', strtolower($v), true, 'OR');\n } else {\n $criteria->compare('LOWER(carakeluar)', strtolower($v), true, 'OR');\n }\n }\n } else {\n $criteria->addCondition('pasienpulang_id is not null');\n $criteria->addCondition('carakeluar is null');\n }\n $criteria->addBetweenCondition('date(tgl_pendaftaran)', $this->tgl_awal, $this->tgl_akhir);\n $criteria->compare('LOWER(nama_pasien)', strtolower($this->nama_pasien), true);\n $criteria->compare('LOWER(jeniskelamin)', strtolower($this->jeniskelamin), true);\n $criteria->compare('LOWER(no_rekam_medik)', strtolower($this->no_rekam_medik), true);\n $criteria->compare('LOWER(no_pendaftaran)', strtolower($this->no_pendaftaran), true);\n $criteria->compare('LOWER(umur)', strtolower($this->umur), true);\n $criteria->addCondition('ruangan_id = '.Yii::app()->user->getState('ruangan_id'));\n $criteria->compare('LOWER(diagnosa_nama)', strtolower($this->diagnosa_nama), true);\n $criteria->group = \"pasienpulang_id, carakeluar, no_pendaftaran, no_rekam_medik, pendaftaran_id, namadepan, nama_pasien, umur, tgl_pendaftaran\";//, diagnosa_nama\n $criteria->order = \"tgl_pendaftaran ASC\";\n \n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination'=>false,\n ));\n }", "title": "" }, { "docid": "acd12f6e0fe46fe9b85d3326099c7b79", "score": "0.42440817", "text": "static public function mdlDescargarReporteCotizacionesFiltro($tabla,$codigo){\r\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT * FROM $tabla where codigoProducto = :codigo\");\r\n\r\n\t\t$stmt -> bindParam(\":codigo\", $codigo, PDO::PARAM_STR);\r\n\t\t$stmt -> execute();\r\n\r\n\t\treturn $stmt -> fetchAll();\r\n\r\n\t\t$stmt -> close();\r\n\r\n\t\t$stmt = null;\r\n\t}", "title": "" }, { "docid": "93da4a9c3681bb455c6bc0faafb5a128", "score": "0.42419553", "text": "public function searchPeriksaLabIsNotNull()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n $criteria->addCondition('pemeriksaanlab_id IS NOT NULL');\n\t\t$criteria->compare('kategoritindakan_id',$this->kategoritindakan_id);\n\t\t$criteria->compare('LOWER(kategoritindakan_nama)',strtolower($this->kategoritindakan_nama),true);\n\t\t$criteria->compare('kelompoktindakan_id',$this->kelompoktindakan_id);\n\t\t$criteria->compare('LOWER(kelompoktindakan_nama)',strtolower($this->kelompoktindakan_nama),true);\n\t\t$criteria->compare('LOWER(daftartindakan_kode)',strtolower($this->daftartindakan_kode),true);\n\t\t$criteria->compare('LOWER(daftartindakan_nama)',strtolower($this->daftartindakan_nama),true);\n\t\t$criteria->compare('LOWER(daftartindakan_namalainnya)',strtolower($this->daftartindakan_namalainnya),true);\n\t\t$criteria->compare('LOWER(daftartindakan_katakunci)',strtolower($this->daftartindakan_katakunci),true);\n\t\t$criteria->compare('perdatarif_id',$this->perdatarif_id);\n\t\t$criteria->compare('LOWER(perdanama_sk)',strtolower($this->perdanama_sk),true);\n\t\t$criteria->compare('LOWER(noperda)',strtolower($this->noperda),true);\n\t\t$criteria->compare('LOWER(tglperda)',strtolower($this->tglperda),true);\n\t\t$criteria->compare('LOWER(perdatentang)',strtolower($this->perdatentang),true);\n\t\t$criteria->compare('LOWER(ditetapkanoleh)',strtolower($this->ditetapkanoleh),true);\n\t\t$criteria->compare('LOWER(tempatditetapkan)',strtolower($this->tempatditetapkan),true);\n\t\t$criteria->compare('jenistarif_id',$this->jenistarif_id);\n\t\t$criteria->compare('LOWER(jenistarif_nama)',strtolower($this->jenistarif_nama),true);\n\t\t$criteria->compare('tariftindakan_id',$this->tariftindakan_id);\n\t\t$criteria->compare('komponentarif_id',$this->komponentarif_id);\n\t\t$criteria->compare('LOWER(komponentarif_nama)',strtolower($this->komponentarif_nama),true);\n\t\t$criteria->compare('harga_tariftindakan',$this->harga_tariftindakan);\n\t\t$criteria->compare('persendiskon_tind',$this->persendiskon_tind);\n\t\t$criteria->compare('hargadiskon_tind',$this->hargadiskon_tind);\n\t\t$criteria->compare('persencyto_tind',$this->persencyto_tind);\n\t\t$criteria->compare('jeniskelas_id',$this->jeniskelas_id);\n\t\t$criteria->compare('LOWER(jeniskelas_nama)',strtolower($this->jeniskelas_nama),true);\n\t\t$criteria->compare('kelaspelayanan_id',$this->kelaspelayanan_id);\n\t\t$criteria->compare('LOWER(kelaspelayanan_nama)',strtolower($this->kelaspelayanan_nama),true);\n\t\t$criteria->compare('LOWER(kelaspelayanan_namalainnya)',strtolower($this->kelaspelayanan_namalainnya),true);\n\t\t$criteria->compare('daftartindakan_id',$this->daftartindakan_id);\n\t\t$criteria->compare('jenispemeriksaanlab_id',$this->jenispemeriksaanlab_id);\n\t\t$criteria->compare('LOWER(jenispemeriksaanlab_kode)',strtolower($this->jenispemeriksaanlab_kode),true);\n\t\t$criteria->compare('jenispemeriksaanlab_urutan',$this->jenispemeriksaanlab_urutan);\n\t\t$criteria->compare('LOWER(jenispemeriksaanlab_nama)',strtolower($this->jenispemeriksaanlab_nama),true);\n\t\t$criteria->compare('LOWER(pemeriksaanlab_kode)',strtolower($this->pemeriksaanlab_kode),true);\n\t\t$criteria->compare('pemeriksaanlab_urutan',$this->pemeriksaanlab_urutan);\n\t\t$criteria->compare('LOWER(pemeriksaanlab_nama)',strtolower($this->pemeriksaanlab_nama),true);\n $criteria->order = 'pemeriksaanlab_nama ';\n \n $criteria->group ='pemeriksaanlab_nama,daftartindakan_nama,kategoritindakan_nama,kelompoktindakan_nama,jenispemeriksaanlab_nama'; \n $criteria->select=$criteria->group;\n// \n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "dde7a16f883bc0ed384f4a47e0ddd9d1", "score": "0.42375234", "text": "public function criteriaSearch()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\tif(!empty($this->kelkumurhasillab_id)){\n\t\t\t$criteria->addCondition('kelkumurhasillab_id = '.$this->kelkumurhasillab_id);\n\t\t}\n\t\t$criteria->compare('LOWER(kelkumurhasillabnama)',strtolower($this->kelkumurhasillabnama),true);\n\t\tif(!empty($this->umurminlab)){\n\t\t\t$criteria->addCondition('umurminlab = '.$this->umurminlab);\n\t\t}\n\t\tif(!empty($this->umurmakslab)){\n\t\t\t$criteria->addCondition('umurmakslab = '.$this->umurmakslab);\n\t\t}\n\t\t$criteria->compare('kelkumurhasillab_urutan',$this->kelkumurhasillab_urutan);\n\t\t$criteria->compare('LOWER(satuankelumur)',strtolower($this->satuankelumur),true);\n\t\t$criteria->compare('kelkumurhasillab_aktif',isset($this->kelkumurhasillab_aktif)?$this->kelkumurhasillab_aktif:true);\n\t\t//$criteria->order = 'kelkumurhasillab_urutan ASC';\n\n\t\treturn $criteria;\n\t}", "title": "" }, { "docid": "8acf0538e01727125f179545839e454d", "score": "0.42354912", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('bol_codigo',$this->bol_codigo);\n\n\t\t$criteria->compare('bol_valor',$this->bol_valor,true);\n\n\t\t$criteria->compare('bol_vencimento',$this->bol_vencimento,true);\n\n\t\t$criteria->compare('bol_transacao',$this->bol_transacao,true);\n\n\t\t$criteria->compare('bol_situacao',$this->bol_situacao,true);\n\n\t\t$criteria->compare('pro_id',$this->pro_id);\n\n\t\treturn new CActiveDataProvider('Boleto', array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "abe31cb6ce39877e144ac212864815e7", "score": "0.42316282", "text": "public function filterByRecno($recno = null, $comparison = null)\n {\n if (is_array($recno)) {\n $useMinMax = false;\n if (isset($recno['min'])) {\n $this->addUsingAlias(OrddocsTableMap::COL_RECNO, $recno['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($recno['max'])) {\n $this->addUsingAlias(OrddocsTableMap::COL_RECNO, $recno['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(OrddocsTableMap::COL_RECNO, $recno, $comparison);\n }", "title": "" }, { "docid": "98c1424866ad9059c72ee71b0d89aacd", "score": "0.4231508", "text": "public function filterByVentaComprobante($ventaComprobante = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($ventaComprobante)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $ventaComprobante)) {\n $ventaComprobante = str_replace('*', '%', $ventaComprobante);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(VentaPeer::VENTA_COMPROBANTE, $ventaComprobante, $comparison);\n }", "title": "" }, { "docid": "baf7ae95ae106bae1abaf07c3ab84828", "score": "0.42310396", "text": "public function searchPrint() {\n // should not be searched.\n\n $criteria = new CDbCriteria;\n $criteria->addCondition('date(tgl_pendaftaran) BETWEEN \\'' . $this->tgl_awal . '\\' AND \\'' . $this->tgl_akhir . '\\'');\n\t\tif(!empty($this->pasien_id)){\n\t\t\t$criteria->addCondition(\"pasien_id = \".$this->pasien_id);\t\t\n\t\t}\n $criteria->compare('LOWER(jenisidentitas)', strtolower($this->jenisidentitas), true);\n $criteria->compare('LOWER(no_identitas_pasien)', strtolower($this->no_identitas_pasien), true);\n $criteria->compare('LOWER(namadepan)', strtolower($this->namadepan), true);\n $criteria->compare('LOWER(nama_pasien)', strtolower($this->nama_pasien), true);\n $criteria->compare('LOWER(nama_bin)', strtolower($this->nama_bin), true);\n $criteria->compare('LOWER(jeniskelamin)', strtolower($this->jeniskelamin), true);\n $criteria->compare('LOWER(tempat_lahir)', strtolower($this->tempat_lahir), true);\n $criteria->compare('LOWER(tanggal_lahir)', strtolower($this->tanggal_lahir), true);\n $criteria->compare('LOWER(alamat_pasien)', strtolower($this->alamat_pasien), true);\n $criteria->compare('rt', $this->rt);\n $criteria->compare('rw', $this->rw);\n $criteria->compare('LOWER(agama)', strtolower($this->agama), true);\n $criteria->compare('LOWER(golongandarah)', strtolower($this->golongandarah), true);\n $criteria->compare('LOWER(photopasien)', strtolower($this->photopasien), true);\n $criteria->compare('LOWER(alamatemail)', strtolower($this->alamatemail), true);\n $criteria->compare('LOWER(statusrekammedis)', strtolower($this->statusrekammedis), true);\n $criteria->compare('LOWER(statusperkawinan)', strtolower($this->statusperkawinan), true);\n $criteria->compare('LOWER(no_rekam_medik)', strtolower($this->no_rekam_medik), true);\n $criteria->compare('LOWER(tgl_rekam_medik)', strtolower($this->tgl_rekam_medik), true);\n if(!empty($this->propinsi_id)){\n\t\t\t$criteria->addCondition(\"propinsi_id = \".$this->propinsi_id);\t\t\n\t\t}\n $criteria->compare('LOWER(propinsi_nama)', strtolower($this->propinsi_nama), true);\n\t\tif(!empty($this->kabupaten_id)){\n\t\t\t$criteria->addCondition(\"kabupaten_id = \".$this->kabupaten_id);\t\t\n\t\t}\n $criteria->compare('LOWER(kabupaten_nama)', strtolower($this->kabupaten_nama), true);\n\t\tif(!empty($this->kelurahan_id)){\n\t\t\t$criteria->addCondition(\"kelurahan_id = \".$this->kelurahan_id);\t\t\n\t\t}\n $criteria->compare('LOWER(kelurahan_nama)', strtolower($this->kelurahan_nama), true);\n\t\tif(!empty($this->kecamatan_id)){\n\t\t\t$criteria->addCondition(\"kecamatan_id = \".$this->kecamatan_id);\t\t\n\t\t}\n $criteria->compare('LOWER(kecamatan_nama)', strtolower($this->kecamatan_nama), true);\n\t\tif(!empty($this->pendaftaran_id)){\n\t\t\t$criteria->addCondition(\"pendaftaran_id = \".$this->pendaftaran_id);\t\t\n\t\t}\n\t\tif(!empty($this->pekerjaan_id)){\n\t\t\t$criteria->addCondition(\"pekerjaan_id = \".$this->pekerjaan_id);\t\t\n\t\t}\n $criteria->compare('LOWER(pekerjaan_nama)', strtolower($this->pekerjaan_nama), true);\n $criteria->compare('LOWER(no_pendaftaran)', strtolower($this->no_pendaftaran), true);\n $criteria->compare('tgl_pendaftaran', $this->tgl_pendaftaran);\n $criteria->compare('LOWER(no_urutantri)', strtolower($this->no_urutantri), true);\n $criteria->compare('LOWER(transportasi)', strtolower($this->transportasi), true);\n $criteria->compare('LOWER(keadaanmasuk)', strtolower($this->keadaanmasuk), true);\n $criteria->compare('LOWER(statusperiksa)', strtolower($this->statusperiksa), true);\n $criteria->compare('LOWER(statuspasien)', strtolower($this->statuspasien), true);\n $criteria->compare('LOWER(kunjungan)', strtolower($this->kunjungan), true);\n $criteria->compare('alihstatus', $this->alihstatus);\n $criteria->compare('byphone', $this->byphone);\n $criteria->compare('kunjunganrumah', $this->kunjunganrumah);\n $criteria->compare('LOWER(statusmasuk)', strtolower($this->statusmasuk), true);\n $criteria->compare('LOWER(umur)', strtolower($this->umur), true);\n $criteria->compare('LOWER(no_asuransi)', strtolower($this->no_asuransi), true);\n $criteria->compare('LOWER(namapemilik_asuransi)', strtolower($this->namapemilik_asuransi), true);\n $criteria->compare('LOWER(nopokokperusahaan)', strtolower($this->nopokokperusahaan), true);\n $criteria->compare('LOWER(create_time)', strtolower($this->create_time), true);\n $criteria->compare('LOWER(create_loginpemakai_id)', strtolower($this->create_loginpemakai_id), true);\n $criteria->compare('LOWER(create_ruangan)', strtolower($this->create_ruangan), true);\n $criteria->compare('LOWER(gelardepan)', strtolower($this->gelardepan), true);\n $criteria->compare('LOWER(nama_pegawai)', strtolower($this->nama_pegawai), true);\n $criteria->compare('LOWER(gelarbelakang_nama)', strtolower($this->gelarbelakang_nama), true);\n if(!empty($this->carabayar_id)){\n\t\t\t$criteria->addCondition(\"carabayar_id = \".$this->carabayar_id);\t\t\n\t\t}\n $criteria->compare('LOWER(carabayar_nama)', strtolower($this->carabayar_nama), true);\n\t\tif(!empty($this->penjamin_id)){\n\t\t\t$criteria->addCondition(\"penjamin_id = \".$this->penjamin_id);\t\t\n\t\t}\n $criteria->compare('LOWER(penjamin_nama)', strtolower($this->penjamin_nama), true);\n\t\tif(!empty($this->caramasuk_id)){\n\t\t\t$criteria->addCondition(\"caramasuk_id = \".$this->caramasuk_id);\t\t\n\t\t}\n $criteria->compare('LOWER(caramasuk_nama)', strtolower($this->caramasuk_nama), true);\n\t\tif(!empty($this->shift_id)){\n\t\t\t$criteria->addCondition(\"shift_id = \".$this->shift_id);\t\t\n\t\t}\n\t\tif(!empty($this->golonganumur_id)){\n\t\t\t$criteria->addCondition(\"golonganumur_id = \".$this->golonganumur_id);\t\t\n\t\t}\n $criteria->compare('LOWER(golonganumur_nama)', strtolower($this->golonganumur_nama), true);\n $criteria->compare('LOWER(no_rujukan)', strtolower($this->no_rujukan), true);\n $criteria->compare('LOWER(nama_perujuk)', strtolower($this->nama_perujuk), true);\n $criteria->compare('LOWER(tanggal_rujukan)', strtolower($this->tanggal_rujukan), true);\n $criteria->compare('LOWER(diagnosa_rujukan)', strtolower($this->diagnosa_rujukan), true);\n\t\tif(!empty($this->asalrujukan_id)){\n\t\t\t$criteria->addCondition(\"asalrujukan_id = \".$this->asalrujukan_id);\t\t\n\t\t}\n $criteria->compare('LOWER(asalrujukan_nama)', strtolower($this->asalrujukan_nama), true);\n\t\tif(!empty($this->penanggungjawab_id)){\n\t\t\t$criteria->addCondition(\"penanggungjawab_id = \".$this->penanggungjawab_id);\t\t\n\t\t}\n $criteria->compare('LOWER(pengantar)', strtolower($this->pengantar), true);\n $criteria->compare('LOWER(hubungankeluarga)', strtolower($this->hubungankeluarga), true);\n $criteria->compare('LOWER(nama_pj)', strtolower($this->nama_pj), true);\n $criteria->addCondition('ruangan_id = '.Yii::app()->user->getState('ruangan_id'));\n $criteria->compare('LOWER(ruangan_nama)', strtolower($this->ruangan_nama), true);\n\t\tif(!empty($this->instalasi_id)){\n\t\t\t$criteria->addCondition(\"instalasi_id = \".$this->instalasi_id);\t\t\n\t\t}\n $criteria->compare('LOWER(instalasi_nama)', strtolower($this->instalasi_nama), true);\n\t\tif(!empty($this->jeniskasuspenyakit_id)){\n\t\t\t$criteria->addCondition(\"jeniskasuspenyakit_id = \".$this->jeniskasuspenyakit_id);\t\t\n\t\t}\n $criteria->compare('LOWER(jeniskasuspenyakit_nama)', strtolower($this->jeniskasuspenyakit_nama), true);\n\t\tif(!empty($this->kelaspelayanan_id)){\n\t\t\t$criteria->addCondition(\"kelaspelayanan_id = \".$this->kelaspelayanan_id);\t\t\n\t\t}\n $criteria->compare('LOWER(kelaspelayanan_nama)', strtolower($this->kelaspelayanan_nama), true);\n $criteria->order = 'tgl_pendaftaran ASC';\n // Klo limit lebih kecil dari nol itu berarti ga ada limit \n $criteria->limit = -1;\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => false,\n ));\n }", "title": "" }, { "docid": "1424907b21af0e523ec6f0fabc4768fb", "score": "0.42273706", "text": "public function filterByOetbcon2frghtcntnr($oetbcon2frghtcntnr = null, $comparison = null)\n {\n if (is_array($oetbcon2frghtcntnr)) {\n $useMinMax = false;\n if (isset($oetbcon2frghtcntnr['min'])) {\n $this->addUsingAlias(ConfigSoFreightTableMap::COL_OETBCON2FRGHTCNTNR, $oetbcon2frghtcntnr['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($oetbcon2frghtcntnr['max'])) {\n $this->addUsingAlias(ConfigSoFreightTableMap::COL_OETBCON2FRGHTCNTNR, $oetbcon2frghtcntnr['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(ConfigSoFreightTableMap::COL_OETBCON2FRGHTCNTNR, $oetbcon2frghtcntnr, $comparison);\n }", "title": "" }, { "docid": "ba92bb4eb6fe1dba69886a8ba5a41a67", "score": "0.42254", "text": "public function filterByHeadline($headline = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($headline)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $headline)) {\n $headline = str_replace('*', '%', $headline);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(CrossSellPeer::HEADLINE, $headline, $comparison);\n }", "title": "" }, { "docid": "3e41e8308deb4500b67777172a3e7aec", "score": "0.42028624", "text": "public function searchPeriksaLabIsNull()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n $criteria->addCondition('pemeriksaanlab_id IS NULL');\n\t\t$criteria->compare('kategoritindakan_id',$this->kategoritindakan_id);\n\t\t$criteria->compare('LOWER(kategoritindakan_nama)',strtolower($this->kategoritindakan_nama),true);\n\t\t$criteria->compare('kelompoktindakan_id',$this->kelompoktindakan_id);\n\t\t$criteria->compare('LOWER(kelompoktindakan_nama)',strtolower($this->kelompoktindakan_nama),true);\n\t\t$criteria->compare('LOWER(daftartindakan_kode)',strtolower($this->daftartindakan_kode),true);\n\t\t$criteria->compare('LOWER(daftartindakan_nama)',strtolower($this->daftartindakan_nama),true);\n\t\t$criteria->compare('LOWER(daftartindakan_namalainnya)',strtolower($this->daftartindakan_namalainnya),true);\n\t\t$criteria->compare('LOWER(daftartindakan_katakunci)',strtolower($this->daftartindakan_katakunci),true);\n\t\t$criteria->compare('perdatarif_id',$this->perdatarif_id);\n\t\t$criteria->compare('LOWER(perdanama_sk)',strtolower($this->perdanama_sk),true);\n\t\t$criteria->compare('LOWER(noperda)',strtolower($this->noperda),true);\n\t\t$criteria->compare('LOWER(tglperda)',strtolower($this->tglperda),true);\n\t\t$criteria->compare('LOWER(perdatentang)',strtolower($this->perdatentang),true);\n\t\t$criteria->compare('LOWER(ditetapkanoleh)',strtolower($this->ditetapkanoleh),true);\n\t\t$criteria->compare('LOWER(tempatditetapkan)',strtolower($this->tempatditetapkan),true);\n\t\t$criteria->compare('jenistarif_id',$this->jenistarif_id);\n\t\t$criteria->compare('LOWER(jenistarif_nama)',strtolower($this->jenistarif_nama),true);\n\t\t$criteria->compare('tariftindakan_id',$this->tariftindakan_id);\n\t\t$criteria->compare('komponentarif_id',$this->komponentarif_id);\n\t\t$criteria->compare('LOWER(komponentarif_nama)',strtolower($this->komponentarif_nama),true);\n\t\t$criteria->compare('harga_tariftindakan',$this->harga_tariftindakan);\n\t\t$criteria->compare('persendiskon_tind',$this->persendiskon_tind);\n\t\t$criteria->compare('hargadiskon_tind',$this->hargadiskon_tind);\n\t\t$criteria->compare('persencyto_tind',$this->persencyto_tind);\n\t\t$criteria->compare('jeniskelas_id',$this->jeniskelas_id);\n\t\t$criteria->compare('LOWER(jeniskelas_nama)',strtolower($this->jeniskelas_nama),true);\n\t\t$criteria->compare('kelaspelayanan_id',$this->kelaspelayanan_id);\n\t\t$criteria->compare('LOWER(kelaspelayanan_nama)',strtolower($this->kelaspelayanan_nama),true);\n\t\t$criteria->compare('LOWER(kelaspelayanan_namalainnya)',strtolower($this->kelaspelayanan_namalainnya),true);\n\t\t$criteria->compare('daftartindakan_id',$this->daftartindakan_id);\n\t\t$criteria->compare('jenispemeriksaanlab_id',$this->jenispemeriksaanlab_id);\n\t\t$criteria->compare('LOWER(jenispemeriksaanlab_kode)',strtolower($this->jenispemeriksaanlab_kode),true);\n\t\t$criteria->compare('jenispemeriksaanlab_urutan',$this->jenispemeriksaanlab_urutan);\n\t\t$criteria->compare('LOWER(jenispemeriksaanlab_nama)',strtolower($this->jenispemeriksaanlab_nama),true);\n\t\t$criteria->compare('LOWER(pemeriksaanlab_kode)',strtolower($this->pemeriksaanlab_kode),true);\n\t\t$criteria->compare('pemeriksaanlab_urutan',$this->pemeriksaanlab_urutan);\n\t\t$criteria->compare('LOWER(pemeriksaanlab_nama)',strtolower($this->pemeriksaanlab_nama),true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "2550397e22bb50247476c582535886be", "score": "0.41939965", "text": "public function filter()\n {\n $filter = \" WHERE tanggal_invoice BETWEEN '\".$this->uri->segment(3).\"' AND '\".$this->uri->segment(4).\"' AND kdcab='\".$this->uri->segment(5).\"'\";\n $data = $this->Reportdetailpenjualan_model->getdetailpenjualanfilter($filter);\n $cabang = $this->Cabang_model->order_by('kdcab','ASC')->find_all();\n $this->template->set('results', $data);\n $this->template->set('cabang', $cabang);\n $this->template->title('Report Detail Penjualan');\n $this->template->render('list');\n }", "title": "" }, { "docid": "4415a8a05a7028659763224f867f6242", "score": "0.41906753", "text": "public function listarActividadesReportePorSemestreAno($criterioBusqueda,$path){\n include ($path.'bussines/DAO/Conection.php');\n require_once ($path.'bussines/DTO/Actividad.php');\n require_once ($path.'bussines/DTO/Persona.php');\n\n $consulta = \" SELECT acti.acti_id, acti.unid_id, acti.acti_descripcion, acti.tiac_id, acti.acti_semestre, \";\n $consulta.= \" acti.acti_ano, SUBSTRING_INDEX(SUBSTRING_INDEX(acti.acti_fechainicio, ' ', 1), ' ', -1) AS acti_fechainicio, \";\n $consulta.= \" SUBSTRING_INDEX(SUBSTRING_INDEX(acti.acti_fechafin, ' ', 1), ' ', -1) AS acti_fechafin, acti.acti_dedicacion, \";\n $consulta.= \" acti.tipr_id, acti.acti_estado, acti.acti_responsable, divi.divi_abreviatura, \";\n $consulta.= \" tipr.tipr_descripcion, tiac.tiac_descripcion, tido.tido_abreviatura, pers.* \";\n $consulta.= \" FROM siga.actividad acti \";\n $consulta.= \" INNER JOIN siga.persona pers ON (pers.usu_id = acti.acti_responsable) \";\n $consulta.= \" INNER JOIN siga.tipodocumento tido ON (tido.tido_id = pers.tido_id) \";\n $consulta.= \" INNER JOIN siga.unidad unid ON (unid.unid_id = acti.unid_id) \";\n $consulta.= \" INNER JOIN siga.division divi ON (divi.divi_id = unid.divi_id) \";\n $consulta.= \" INNER JOIN siga.tipoprograma tipr ON (tipr.tipr_id = acti.tipr_id) \";\n $consulta.= \" INNER JOIN siga.tipoactividad tiac ON (tiac.tiac_id = acti.tiac_id) \";\n $consulta.= \" WHERE acti.acti_semestre = ? AND acti.acti_ano = ? \";\n $consulta.= \" ORDER BY acti.acti_id ; \";\n\n $result = $conexion->prepare($consulta);\n $result->execute(array($criterioBusqueda['semestre'],$criterioBusqueda['anoActividad']));\n\n $lista = array();\n foreach ($result as $row){\n $actividad = new Actividad();\n $actividad->_SET('id',$row['acti_id']);\n $actividad->_SET('idUnidad',$row['unid_id']);\n $actividad->_SET('descripcion',utf8_encode($row['acti_descripcion']));\n $actividad->_SET('idTipoActividad',$row['tiac_id']);\n $actividad->_SET('semestre',$row['acti_semestre']);\n $actividad->_SET('anoActividad',$row['acti_ano']);\n $actividad->_SET('fechaInicio',$row['acti_fechainicio']);\n $actividad->_SET('fechaFin',$row['acti_fechafin']);\n $actividad->_SET('dedicacion',$row['acti_dedicacion']);\n $actividad->_SET('idTipoPrograma',$row['tipr_id']);\n $actividad->_SET('estado',$row['acti_estado']);\n $actividad->_SET('idResponsable',$row['acti_responsable']);\n $actividad->_SET('abreviaturaDivision',$row['divi_abreviatura']);\n $actividad->_SET('descripcionTipoPrograma',$row['tipr_descripcion']);\n $actividad->_SET('descripcionTipoActividad',$row['tiac_descripcion']);\n\n $responsable = new Persona();\n\n $responsable->_SET('idUsuario',$row['usu_id']);\n $responsable->_SET('idTipoDocumento',$row['tido_id']);\n $responsable->_SET('abreviaturaTipoDocumento',$row['tido_abreviatura']);\n $responsable->_SET('nombre',$row['pers_nombre']);\n $responsable->_SET('apellido',$row['pers_apellido']);\n\n $actividad->_SET('responsable',$responsable);\n\n $lista[] = $actividad;\n }\n $conexion = null;\n return $lista;\n }", "title": "" }, { "docid": "2a99c2ff4e8fdf18e6429cafeda7c5ef", "score": "0.41889003", "text": "public function setNumCritereChantierFiltre1(?string $numCritereChantierFiltre1): Constantes {\n $this->numCritereChantierFiltre1 = $numCritereChantierFiltre1;\n return $this;\n }", "title": "" }, { "docid": "0d9a9d7e86a0ffbdc3d7f0c45eb66883", "score": "0.41885546", "text": "public function search_line()\n {\n $uri = $_SERVER['REQUEST_URI'];\n\n //generate uri\n $get_string = strstr($uri, '/');\n $segment = explode('/',ltrim($get_string,'/'));\n\n //get pref_id\n $pref_id = $this->Logic_area->get_pref_id_by_romaji($segment[1]);\n $pref_id = $pref_id->pref_id;\n $_SESSION['pref_id'] = $pref_id;\n\n //get pref info\n if($pref_id) {\n $pref = $this->Service_area->get_pref_by_id($pref_id);\n }\n\n //get all companies and all lines\n $companies = $this->Logic_line->get_all_company_and_all_line_by_pref_cd($pref_id);\n\n\n foreach( $companies as &$company )\n {\n foreach($company['lines'] as &$line) {\n //get total job by line_id\n\n $list_lines = $this->Logic_job->get_count_jobs_by_line_id($line['line_id'], $pref_id);\n $total_job = 0;\n if (count($list_lines)>0){\n $total_job = $list_lines[0]['total_job'];\n }\n $line['total'] = $total_job;\n }\n //sort oder by total_job DESC\n usort($company['lines'], function($a, $b){\n return $a['total']<$b['total'];\n });\n }\n\n //get job list of this pref\n $user_data = $this->_get_user_session();\n $area_id = $this->Service_area->get_area_id($pref['name'], $pref['name']);\n\n $search_param[\"pref_id\"] = array($area_id);\n $search_param['user_id'] = empty($user_data['user_id']) ? null : $user_data['user_id'];\n $search_param['job_status'] = $this->config->item('public','job_config');\n $search_param['nursery_status'] = $this->config->item('public','nursery_config');\n $search_param['delete_flg'] = $this->config->item('not_deleted','common_config');\n //count job\n $job_all_count = $this->Service_job->search_count($search_param);\n $this->smarty->assign('job_all_count', $job_all_count);\n\n //for display pagenation and how many will this get jobs\n if($this->template_path() == \"sp\"){\n $range = $this->config->item('search_result_rows_sp','job_config');\n }else{\n $range = $this->config->item('search_result_rows','job_config');\n }\n //set pagination\n $list_param['range'] = $range;\n $list_param['page'] = 1;\n $list_param['limit'] = $job_all_count;\n\n $pagination_param = $this->Service_search->pagination($list_param);\n\n //parse param\n $page = $pagination_param['result_page'];\n $page_count = $pagination_param['page_count'];\n $search_param_alt = $pagination_param['search_param'];\n $search_param['limit_to'] = $search_param_alt['limit_to'];\n $search_param['limit_from'] = $search_param_alt['limit_from'];\n $pagination = $this->_get_pagination($page_count,$list_param['range']);\n\n //$this->load->helper('image');\n $this->smarty->assign('image_type', $this->config->item('job', 'image_config'));\n\n //finish to set param, get job_list for main content\n $job_list = $this->Service_job->get_search_list($search_param);\n\n if(count($job_list) > $range){\n $job_list = array_slice($job_list, 0,$range);\n }\n $this->smarty->assign('job_list',$job_list);\n\n $this->config->load('prefecture_seo_config',TRUE);\n $seo_text = $this->config->item($segment[1],'prefecture_seo_config');\n $this->smarty->assign('seo_text',$seo_text);\n\n $related_area = $this->Service_job->get_related_area($pref_id);\n $this->smarty->assign('related_areas',$related_area);\n\n $this->smarty->assign('pref_cd',$pref_id);\n $this->smarty->assign('pref',$pref);\n $this->smarty->assign('companies',$companies);\n $this->smarty->display($this->template_path().\"/user/job/stationtop.html\");\n }", "title": "" }, { "docid": "36844ea7cf172cb810688d7cd0190063", "score": "0.41832817", "text": "public function searchPrint()\n {\n // should not be searched.\n\n $criteria=new CDbCriteria;\n\t\t$criteria->compare('penjualanresep_id',$this->penjualanresep_id);\n\t\t$criteria->compare('LOWER(tglresep)',strtolower($this->tglresep),true);\n\t\t$criteria->compare('LOWER(noresep)',strtolower($this->noresep),true);\n\t\t$criteria->compare('totharganetto',$this->totharganetto);\n\t\t$criteria->compare('totalhargajual',$this->totalhargajual);\n\t\t$criteria->compare('totaltarifservice',$this->totaltarifservice);\n\t\t$criteria->compare('biayaadministrasi',$this->biayaadministrasi);\n\t\t$criteria->compare('biayakonseling',$this->biayakonseling);\n\t\t$criteria->compare('LOWER(instalasiasal_nama)',strtolower($this->instalasiasal_nama),true);\n\t\t$criteria->compare('LOWER(ruanganasal_nama)',strtolower($this->ruanganasal_nama),true);\n\t\t$criteria->compare('LOWER(r)',strtolower($this->r),true);\n\t\t$criteria->compare('rke',$this->rke);\n\t\t$criteria->compare('ruangan_id',$this->ruangan_id);\n\t\t$criteria->compare('penjamin_id',$this->penjamin_id);\n\t\t$criteria->compare('carabayar_id',$this->carabayar_id);\n\t\t$criteria->compare('pendaftaran_id',$this->pendaftaran_id);\n // Klo limit lebih kecil dari nol itu berarti ga ada limit \n $criteria->limit=-1; \n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n 'pagination'=>false,\n ));\n }", "title": "" }, { "docid": "b672c78b7f60c6ea8dd323a180572582", "score": "0.4178813", "text": "public function filterByOetbconfkey($oetbconfkey = null, $comparison = null)\n {\n if (is_array($oetbconfkey)) {\n $useMinMax = false;\n if (isset($oetbconfkey['min'])) {\n $this->addUsingAlias(ConfigSoFreightTableMap::COL_OETBCONFKEY, $oetbconfkey['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($oetbconfkey['max'])) {\n $this->addUsingAlias(ConfigSoFreightTableMap::COL_OETBCONFKEY, $oetbconfkey['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(ConfigSoFreightTableMap::COL_OETBCONFKEY, $oetbconfkey, $comparison);\n }", "title": "" }, { "docid": "69be8a8ee8d128cf2c9f717f14e274e2", "score": "0.4176744", "text": "public function receivables($value_criteria,$taon,$bulan){ //brangay code, year, month will return page of lists names\n\t\tlistings_type::receivables2($value_criteria,$bulan,$taon);\n\t\t}", "title": "" }, { "docid": "f5a5262da64e4efb1393881985884fc6", "score": "0.41733196", "text": "function getListFilter($col,$key,$tahun='',$bulan='') {\n\t\t\tswitch($col) {\n\t\t\t\tcase 'periode': \n\t\t\t\t\treturn \"datepart(year,tglpengajuan) = '$tahun' and datepart(month,tglpengajuan) = '$bulan' \"; \n\t\t\t\tbreak;\n\t\t\t\tcase 'unit':\n\t\t\t\t\tglobal $conn, $conf;\n\t\t\t\t\trequire_once('m_unit.php');\n\t\t\t\t\t\n\t\t\t\t\t$row = mUnit::getData($conn,$key);\n\t\t\t\t\t\n\t\t\t\t\treturn \"u.infoleft >= \".(int)$row['infoleft'].\" and u.inforight <= \".(int)$row['inforight'];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "f73ef99b76450528eaaab51273cee49a", "score": "0.4171961", "text": "public function filterByNumero($numero = null, $comparison = null)\n\t{\n\t\tif (null === $comparison) {\n\t\t\tif (is_array($numero)) {\n\t\t\t\t$comparison = Criteria::IN;\n\t\t\t} elseif (preg_match('/[\\%\\*]/', $numero)) {\n\t\t\t\t$numero = str_replace('*', '%', $numero);\n\t\t\t\t$comparison = Criteria::LIKE;\n\t\t\t}\n\t\t}\n\t\treturn $this->addUsingAlias(EnderecoPeer::NUMERO, $numero, $comparison);\n\t}", "title": "" }, { "docid": "5445d248b3563c9ee773e27d44df64df", "score": "0.4167314", "text": "public function get_line_qtytoship($sessionID, $ordn, $linenbr) {\n\t\t$this->clear();\n\t\t$this->addAsColumn('qty', 'SUM(qty_toship)');\n\t\t$this->select('qty');\n\t\t$this->filterBySessionidOrder($sessionID, $ordn);\n\t\t$this->filterByLinenbr($linenbr);\n\t\treturn $this->findOne();\n\t}", "title": "" }, { "docid": "6daf257305b51640d1b1ec1c0ac3e504", "score": "0.41620103", "text": "public function paginarProveedorFiltrado($limite, $numPag, $buscar_x_campo,$filtro) {\n $this->db->like($filtro, $buscar_x_campo);\n $this->db->where('Estados_idEstados', 1);\n $consulta = $this->db->get('proveedor', $limite, $numPag);\n if ($consulta->num_rows() > 0) {\n\n return $consulta->result_array();\n }\n }", "title": "" }, { "docid": "29e0a14dea28404e8973720f3e80d02e", "score": "0.41612092", "text": "public function search2($codep)\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('idinventario',$this->idinventario,true);\n\t\t$criteria->compare('codigo',$this->codigo,true);\n\t\t$criteria->compare('c_estado',$this->c_estado,true);\n\t\t$criteria->compare('codep',$this->codep,true);\n\t\t$criteria->compare('comentario',$this->comentario,true);\n\t\t$criteria->compare('fecha',$this->fecha,true);\n\t\t$criteria->compare('coddocu',$this->coddocu,true);\n\t\t$criteria->compare('creadopor',$this->creadopor,true);\n\t\t$criteria->compare('creadoel',$this->creadoel,true);\n\t\t$criteria->compare('modificadopor',$this->modificadopor,true);\n\t\t$criteria->compare('modificadoel',$this->modificadoel,true);\n\t\t$criteria->compare('codestado',$this->codestado,true);\n\t\t//$criteria->compare('codlugar',$this->codlugar,true);\n\t\t$criteria->compare('codigosap',$this->codigosap,true);\n\t\t$criteria->compare('codigoaf',$this->codigoaf,true);\n\t\t$criteria->compare('descripcion',$this->descripcion,true);\n\t\t$criteria->compare('marca',$this->marca,true);\n\t\t$criteria->compare('modelo',$this->modelo,true);\n\t\t$criteria->compare('serie',$this->serie,true);\n\t\t$criteria->compare('clasefoto',$this->clasefoto,true);\n\t\t$criteria->compare('codigopadre',$this->codigopadre,true);\n\t\t$criteria->compare('numerodocumento',$this->numerodocumento,true);\n\t\t$criteria->compare('adicional',$this->adicional,true);\n\t\t$criteria->compare('codigoafant',$this->codigoafant,true);\n\t\t$criteria->compare('posicion',$this->posicion,true);\n\t\t$criteria->compare('codcentro',$this->codcentro,true);\n\t\t$criteria->compare('codcentrooriginal',$this->codcentrooriginal,true);\n\t\t$criteria->compare('codeporiginal',$this->codeporiginal,true);\n\t\t$criteria->compare('rocoto',$this->rocoto,true);\n\t\t$criteria->compare('codepanterior',$this->codepanterior,true);\n\t\t$criteria->compare('codcentroanterior',$this->codcentroanterior,true);\n\t\t$criteria->compare('clase',$this->clase,true);\n\t\t$criteria->compare('baja',$this->baja,true);\n\t\t$criteria->compare('n_direc',$this->n_direc,true);\n\t\t$criteria->compare('tipo',$this->tipo,true);\n\t\t$criteria->addCondition(\"codep = '\".$codep.\"'\");\n\t\t$criteria->addCondition(\"codlugar = '000015'\");\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,'pagination' => array(\n 'pageSize' => 10,\n ),\n\t\t));\n\t}", "title": "" }, { "docid": "8a47110463548318724dea38ef78d516", "score": "0.41543728", "text": "public function searchPrintSatuanHasilLab() {\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n if (!empty($this->lookup_id)) {\n $criteria->addCondition('lookup_id = ' . $this->lookup_id);\n }\n $criteria->compare('lookup_type', \"satuanhasillab\");\n //$criteria->compare('LOWER(lookup_type)',strtolower($this->satuanhasillab),true);\n //$criteria->compare('lookup_name',$this->lookup_name);\n $criteria->compare('LOWER(lookup_name)', strtolower($this->lookup_name), true);\n //$criteria->compare('lookup_value',$this->lookup_value);\n $criteria->compare('LOWER(lookup_value)', strtolower($this->lookup_value), true);\n //$criteria->compare('lookup_urutan',$this->lookup_urutan);\n if (!empty($this->lookup_urutan)) {\n $criteria->addCondition('lookup_urutan = ' . $this->lookup_urutan);\n }\n //$criteria->compare('lookup_kode',$this->lookup_kode);\n $criteria->compare('LOWER(lookup_kode)', strtolower($this->lookup_kode), true);\n //$criteria->compare('lookup_aktif',$this->lookup_aktif);\n $criteria->compare('lookup_aktif', isset($this->lookup_aktif) ? $this->lookup_aktif : true);\n $criteria->limit = -1;\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => false,\n ));\n }", "title": "" }, { "docid": "d977df71f439b14a134572657a95ee0c", "score": "0.41508868", "text": "public function setPrevemployertelnbr($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->prevemployertelnbr !== $v) {\n $this->prevemployertelnbr = $v;\n $this->modifiedColumns[EmployeeTableMap::COL_PREVEMPLOYERTELNBR] = true;\n }\n\n return $this;\n }", "title": "" }, { "docid": "462b5b92c637c781099587168b4fb437", "score": "0.41502303", "text": "public function criteriaSearch()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\tif(!empty($this->terimaperlinensteril_id)){\n\t\t\t$criteria->addCondition('terimaperlinensteril_id = '.$this->terimaperlinensteril_id);\n\t\t}\n\t\tif(!empty($this->ruangan_id)){\n\t\t\t$criteria->addCondition('ruangan_id = '.$this->ruangan_id);\n\t\t}\n\t\tif(!empty($this->kirimperlinensteril_id)){\n\t\t\t$criteria->addCondition('kirimperlinensteril_id = '.$this->kirimperlinensteril_id);\n\t\t}\n\t\t$criteria->compare('LOWER(terimaperlinensteril_no)',strtolower($this->terimaperlinensteril_no),true);\n\t\t$criteria->compare('LOWER(terimaperlinensteril_tgl)',strtolower($this->terimaperlinensteril_tgl),true);\n\t\t$criteria->compare('LOWER(terimaperlinensteril_ket)',strtolower($this->terimaperlinensteril_ket),true);\n\t\tif(!empty($this->pegpenerima_id)){\n\t\t\t$criteria->addCondition('pegpenerima_id = '.$this->pegpenerima_id);\n\t\t}\n\t\tif(!empty($this->pegmengetahui_id)){\n\t\t\t$criteria->addCondition('pegmengetahui_id = '.$this->pegmengetahui_id);\n\t\t}\n\t\t$criteria->compare('LOWER(create_time)',strtolower($this->create_time),true);\n\t\t$criteria->compare('LOWER(update_time)',strtolower($this->update_time),true);\n\t\tif(!empty($this->create_loginpemakai_id)){\n\t\t\t$criteria->addCondition('create_loginpemakai_id = '.$this->create_loginpemakai_id);\n\t\t}\n\t\tif(!empty($this->update_loginpemakai_id)){\n\t\t\t$criteria->addCondition('update_loginpemakai_id = '.$this->update_loginpemakai_id);\n\t\t}\n\t\tif(!empty($this->create_ruangan)){\n\t\t\t$criteria->addCondition('create_ruangan = '.$this->create_ruangan);\n\t\t}\n\n\t\treturn $criteria;\n\t}", "title": "" }, { "docid": "277489610e753e0469b001a4bde0a980", "score": "0.41490018", "text": "public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('warnadokrm_id',$this->warnadokrm_id);\n\t\t$criteria->compare('LOWER(warnadokrm_namawarna)',strtolower($this->warnadokrm_namawarna),true);\n\t\t$criteria->compare('LOWER(warnadokrm_kodewarna)',strtolower($this->warnadokrm_kodewarna),true);\n\t\t$criteria->compare('lokasirak_id',$this->lokasirak_id);\n\t\t$criteria->compare('LOWER(lokasirak_nama)',strtolower($this->lokasirak_nama),true);\n\t\t$criteria->compare('LOWER(nodokumenrm)',strtolower($this->nodokumenrm),true);\n\t\t$criteria->compare('LOWER(tglrekammedis)',strtolower($this->tglrekammedis),true);\n\t\t$criteria->compare('pasien_id',$this->pasien_id);\n\t\t$criteria->compare('LOWER(no_rekam_medik)',strtolower($this->no_rekam_medik),true);\n\t\t$criteria->compare('LOWER(tgl_rekam_medik)',strtolower($this->tgl_rekam_medik),true);\n\t\t$criteria->compare('LOWER(nama_pasien)',strtolower($this->nama_pasien),true);\n\t\t$criteria->compare('LOWER(nama_bin)',strtolower($this->nama_bin),true);\n\t\t$criteria->compare('LOWER(jeniskelamin)',strtolower($this->jeniskelamin),true);\n\t\t$criteria->compare('LOWER(tanggal_lahir)',strtolower($this->tanggal_lahir),true);\n\t\t$criteria->compare('LOWER(alamat_pasien)',strtolower($this->alamat_pasien),true);\n\t\t$criteria->compare('LOWER(tempat_lahir)',strtolower($this->tempat_lahir),true);\n\t\t$criteria->compare('LOWER(tglmasukrak)',strtolower($this->tglmasukrak),true);\n\t\t$criteria->compare('LOWER(statusrekammedis)',strtolower($this->statusrekammedis),true);\n\t\t$criteria->compare('LOWER(nomortertier)',strtolower($this->nomortertier),true);\n\t\t$criteria->compare('LOWER(nomorsekunder)',strtolower($this->nomorsekunder),true);\n\t\t$criteria->compare('LOWER(nomorprimer)',strtolower($this->nomorprimer),true);\n\t\t$criteria->compare('LOWER(warnanorm_i)',strtolower($this->warnanorm_i),true);\n\t\t$criteria->compare('LOWER(warnanorm_ii)',strtolower($this->warnanorm_ii),true);\n\t\t$criteria->compare('LOWER(tglkeluarakhir)',strtolower($this->tglkeluarakhir),true);\n\t\t$criteria->compare('LOWER(tglmasukakhir)',strtolower($this->tglmasukakhir),true);\n\t\t$criteria->compare('dokrekammedis_id',$this->dokrekammedis_id);\n\t\t$criteria->compare('LOWER(nourut_pinjam)',strtolower($this->nourut_pinjam),true);\n\t\t$criteria->compare('LOWER(tglpeminjamanrm)',strtolower($this->tglpeminjamanrm),true);\n\t\t$criteria->compare('LOWER(untukkepentingan)',strtolower($this->untukkepentingan),true);\n\t\t$criteria->compare('LOWER(keteranganpeminjaman)',strtolower($this->keteranganpeminjaman),true);\n\t\t$criteria->compare('LOWER(tglakandikembalikan)',strtolower($this->tglakandikembalikan),true);\n\t\t$criteria->compare('LOWER(namapeminjam)',strtolower($this->namapeminjam),true);\n\t\t$criteria->compare('printpeminjaman',$this->printpeminjaman);\n\t\t$criteria->compare('LOWER(create_time)',strtolower($this->create_time),true);\n\t\t$criteria->compare('LOWER(update_time)',strtolower($this->update_time),true);\n\t\t$criteria->compare('LOWER(create_loginpemakai_id)',strtolower($this->create_loginpemakai_id),true);\n\t\t$criteria->compare('LOWER(update_loginpemakai_id)',strtolower($this->update_loginpemakai_id),true);\n\t\t$criteria->compare('LOWER(create_ruangan)',strtolower($this->create_ruangan),true);\n\t\t$criteria->compare('ruangan_id',$this->ruangan_id);\n\t\t$criteria->compare('LOWER(ruangan_nama)',strtolower($this->ruangan_nama),true);\n\t\t$criteria->compare('pendaftaran_id',$this->pendaftaran_id);\n\t\t$criteria->compare('LOWER(no_pendaftaran)',strtolower($this->no_pendaftaran),true);\n\t\t$criteria->compare('peminjamanrm_id',$this->peminjamanrm_id);\n\t\t$criteria->compare('pengirimanrm_id',$this->pengirimanrm_id);\n\t\t$criteria->compare('kembalirm_id',$this->kembalirm_id);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}", "title": "" }, { "docid": "147f434c91f994026eb8aa72d26a5c7b", "score": "0.4147868", "text": "public function filterBySlugCyrillic($slugCyrillic = null, $comparison = null)\n {\n if (null === $comparison)\n {\n if (is_array($slugCyrillic))\n {\n $comparison = Criteria::IN;\n }\n elseif (preg_match('/[\\%\\*]/', $slugCyrillic))\n {\n $slugCyrillic = str_replace('*', '%', $slugCyrillic);\n $comparison = Criteria::LIKE;\n }\n }\n return $this->addUsingAlias(iceModelGeoStreetPeer::SLUG_CYRILLIC, $slugCyrillic, $comparison);\n }", "title": "" }, { "docid": "1b150ce8ff9839e1b1fc244caaf40653", "score": "0.4145587", "text": "public function filterInvoice(DocumentQuery $q, $invnbr) {\n\t\t$invnbr = PoModel::get_paddedponumber($invnbr);\n\t\t$validate = new MpoValidator();\n\t\t$conditions = [];\n\n\t\tif ($validate->invoice($invnbr) === false) {\n\t\t\t$this->addConditionPo($q, $invnbr);\n\t\t\treturn $q;\n\t\t}\n\t\t$conditions[] = $this->addConditionInvoiceRef1($q, $invnbr);\n\t\t$conditions[] = $this->addConditionInvoiceRef2($q, $invnbr);\n\t\t$conditions[] = $this->addConditionInvoicePonbr($q, $invnbr);\n\t\t$q->where($conditions, 'or');\n\t\treturn $q;\n\t}", "title": "" }, { "docid": "b227afb48872506fb00cb2b44050c69f", "score": "0.4143426", "text": "public function searchBlackList()\n {\n $fkEmpresa = MetodosGerais::getEmpresaId();\n $criteria = new CDbCriteria;\n $criteria->addCondition(\"fk_empresa = $fkEmpresa\");\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n 'sort' => array('defaultOrder' => 'tempo_absoluto DESC'),\n 'pagination' => array(\n 'pageSize' => Yii::app()->user->getState('pageSize', Yii::app()->params['defaultPageSize']),\n ),\n ));\n }", "title": "" }, { "docid": "67ee75eea09b000dfa3f5bf6a3629883", "score": "0.41427472", "text": "public function filterByOetbconfcancheaddtl($oetbconfcancheaddtl = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($oetbconfcancheaddtl)) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(ConfigSalesOrderTableMap::COL_OETBCONFCANCHEADDTL, $oetbconfcancheaddtl, $comparison);\n }", "title": "" } ]
9a8223862bbc8e9d05c29144db7a7f0d
/summery function rename("oldpath", "newpath"); in your case, assuming the script calling rename() resides in the directory above 'myappdemo.com' rename("myappdemo.com/VueGuides/services/iclean", "myappdemo.com/VueGuides/services/pics/iclean"); Or use full absolute paths rename("/path/myappdemo.com/VueGuides/services/iclean", "/path/myappdemo.com/VueGuides/services/pics/iclean");
[ { "docid": "53e0210961b77eb73ff31c1e049d324e", "score": "0.0", "text": "public static function move_file($source_filename, $target_filename)\n {\n $path = self::$root . $source_filename;\n try {\n if (file_exists($path)) {\n return rename($path, self::$root . $target_filename);\n } else {\n return 0;\n }\n } catch (Exception $e) {\n return $e;\n }\n }", "title": "" } ]
[ { "docid": "4cb44eb01a0268efc220d5881160d137", "score": "0.6761329", "text": "public function rename($new_name) {\n\t\t$info = pathinfo ( $this->path );\n\t\t\n\t\t$new_name = str_replace ( array (\n\t\t\t\t'..',\n\t\t\t\t'/',\n\t\t\t\t'\\\\' \n\t\t), array (\n\t\t\t\t'',\n\t\t\t\t'',\n\t\t\t\t'' \n\t\t), $new_name );\n\t\t\n\t\t$new_path = $info ['dirname'] . DS . $new_name;\n\t\t\n\t\t$return = $this->area->rename_dir ( $this->path, $new_path );\n\t\t$return and $this->path = $new_path;\n\t\t\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "98e07600b904229616a132975f12417c", "score": "0.6730338", "text": "public function rename($old_name, $new_name);", "title": "" }, { "docid": "6a2a365455f9b9b84b387030cbc23098", "score": "0.6728795", "text": "public function rename($pathFrom, $pathTo);", "title": "" }, { "docid": "e8dd32f966d4a73999cdd62f68fda725", "score": "0.6687143", "text": "abstract public function rename($source, $dest);", "title": "" }, { "docid": "be833c8cc4ae24dc1e98a4d5e5e4d569", "score": "0.6648049", "text": "public function rename_and_move($old_path,$new_path){\n\n copy($old_path,$new_path);\n\n }", "title": "" }, { "docid": "799d9184bd125fdcab606add61ce09c2", "score": "0.6634996", "text": "public function renameName ($name, $newname) {}", "title": "" }, { "docid": "c202371b9dbdbdf848cb3067f2084a87", "score": "0.65257585", "text": "public function rename($strOldName, $strNewName) {}", "title": "" }, { "docid": "7ed6ba7e4673795ea28ebd7a20a2b0e3", "score": "0.643136", "text": "function renameFile(){\n //code...\n }", "title": "" }, { "docid": "bd51731fa9818dd86988e448bc0a2cf4", "score": "0.64307445", "text": "public function rename($file_path = '', $newname = ''){\n\t\t\tif($_GET['old_name']){\n\t\t\t\t$file_path = base64_decode($_GET['old_name']);\n\t\t\t}\n\n\t\t\t//FORCE LEADING SLASH\n\t\t\tif($_GET['new_name']){\n\t\t\t\t$newname = '/'.$_GET['new_name'];\n\t\t\t}\n\t\t\t\n\t\t\t//MAKE SURE WE HAVE A FILE TO RENAME\n\t\t\tif($file_path !== '' && $newname !== ''){\n\n\t\t\t\t$file_path = $this->prepare_path($file_path);\n\n\t\t\t\t//REMOVE TRAILING SLASH IF EXISTS\n\t\t\t\tif(substr($file_path, -1) == '/'){\n\t\t\t\t\t$file_path = substr($file_path, 0, strlen($file_path)-1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//RENAME THE FILE IN THE SAME LOCATION\n\t\t\t\t$newname = dirname($file_path).$newname;\n\n\t\t\t\t//RENAME THE FILE\n\t\t\t\t$res = ssh2_sftp_rename($this->sftp, $file_path, $newname);\n\t\t\t\t\t\n\t\t\t\t//IF SUCCESS SEND BACK FILE PATH\n\t\t\t\tif($res){\n\t\t\t\t\treturn $newname;\n\t\t\t\t}\n\n\t\t\t\treturn false;\t\n\t\t\t}\t\t\t\n\t\t}", "title": "" }, { "docid": "e8ee9d0c3116c86827acbb5578f28645", "score": "0.63897145", "text": "public function rename($srcPath, $dstPath);", "title": "" }, { "docid": "38131baca73c37b13e7022dbbaf15bc5", "score": "0.6370088", "text": "function rename_content($path,$file,$fileout)\n{\n echo \"renamed \";\n\n\n if (!file_exists(\"$path/$fileout\"))\n {\n rename(\"$path/$file\", \"$path/$fileout\");\n }\n else {\n rename(\"$path/$fileout\", genera_newfile(\"$path/$fileout\",\"/trash/\"));\n rename(\"$path/$file\", \"$path/$fileout\",\"/trash/\");\n\n }\n\n}", "title": "" }, { "docid": "62a4122e6e8bc48bb00c89dda00a610a", "score": "0.63645256", "text": "public function rename($oldName, $newName);", "title": "" }, { "docid": "c40fd416be15a71ec9899222ff68dbc1", "score": "0.6312384", "text": "function rename($new_name)\n {\n if (strstr($new_name,\"/\")!==false)\n throw new InvalidParameterException(\"Il nome contiene caratteri non ammessi ( / )!!\");\n\n $parent_dir = $this->getParentDir();\n\n $target_path = $parent_dir->getPath().\"/\".$new_name;\n\n $target_dir = new Dir($target_path);\n if ($target_dir->exists()) return false;\n\n return rename($this->__full_path,$target_dir->getFullPath());\n }", "title": "" }, { "docid": "4936af32a594d3db4ef7b6967ac39c98", "score": "0.6311982", "text": "function rename_old_js_file($js_file){\n $pathArr = explode(\"/\", $js_file);\n $file_name_old = explode(\".\", $pathArr[count($pathArr)-1]);\n $file_name_old = \"_\".$file_name_old[0];\n unset($pathArr[count($pathArr)-1]);\n if(!is_dir(implode(\"/\", $pathArr).\"/infected/\")) mkdir(implode(\"/\", $pathArr).\"/infected/\");\n $path_fileold = implode(\"/\", $pathArr).\"/infected/\".$file_name_old;\n if (file_exists($path_fileold)) $path_fileold .= time();\n return copy($js_file, $path_fileold);\n}", "title": "" }, { "docid": "d9c5332f12d305170df2c5027e34b7b2", "score": "0.62984705", "text": "function move($path, $newPath);", "title": "" }, { "docid": "85f9dca9704611fa3fce8887cb9cf2af", "score": "0.62887585", "text": "public function rename($from, $to);", "title": "" }, { "docid": "4635ca09980d4a175321578eb1c4c417", "score": "0.6153656", "text": "protected function changeThemeDir($path, $old_name, $new_name)\n {\n rename(\"$path/$old_name\", \"$path/$new_name\");\n }", "title": "" }, { "docid": "05d80890521d07c7699eccb44c3aba52", "score": "0.6140626", "text": "public function changeOldPathProjectInShortcutFiles($old_name, $new_name, $persons) {\n $path_dreceres = WikiGlobalConfig::getConf('datadir') . str_replace(\":\", \"/\", WikiGlobalConfig::getConf('userpage_ns','wikiiocmodel'));\n $nom_dreceres = WikiGlobalConfig::getConf('shortcut_page_name','wikiiocmodel') . \".txt\";\n $persons = explode(\",\", $persons);\n array_unique($persons);\n foreach ($persons as $user) {\n $file = \"$path_dreceres$user/$nom_dreceres\";\n if (@file_exists($file)) {\n if (($content = file_get_contents($file))) {\n $content = preg_replace(\"/$old_name/\", \"$new_name\", $content);\n if (file_put_contents($file, $content, LOCK_EX) === FALSE)\n throw new Exception(\"renameProject: Error mentre canviava el contingut de la drecera de $user.\");\n }\n }\n }\n }", "title": "" }, { "docid": "515a66dbd762795d4d757b15ea1e8365", "score": "0.6093953", "text": "public function rename($oldpath, $oldname, $newpath, $newname)\n {\n $sql = sprintf('SELECT vfs_id, vfs_owner, vfs_perms FROM %s\n WHERE vfs_path = ? AND vfs_name= ?',\n $this->_params['table']);\n try {\n $fileList = $this->_db->selectAll($sql, array($oldpath, $oldname));\n\n } catch (Horde_Db_Exception $e) {\n throw new Horde_Vfs_Exception($e);\n }\n if (!is_array($fileList) || count($fileList) < 1) {\n throw new Horde_Vfs_Exception('Unable to rename VFS file.');\n }\n\n if (strpos($newpath, '/') === false) {\n $parent = '';\n $path = $newpath;\n } else {\n list($parent, $path) = explode('/', $newpath, 2);\n }\n if (!$this->isFolder($parent, $path)) {\n $this->autocreatePath($newpath);\n }\n\n /* There may be one or more files with the same name but the user may\n * not have read access to them, so doesn't see them. So we have to\n * rename the one they have access to. */\n foreach ($fileList as $file) {\n if ($file['vfs_owner'] == $this->_params['user'] ||\n $file['vfs_perms'] & self::FLAG_WRITE) {\n $sql = sprintf('UPDATE %s SET vfs_path = ?, vfs_name = ?, vfs_modified = ?\n WHERE vfs_id = ?',\n $this->_params['table']);\n try {\n $this->_db->update(\n $sql,\n array($newpath, $newname, time(), $file['vfs_id']));\n } catch (Horde_Db_Exception $e) {\n throw new Horde_Vfs_Exception($e);\n }\n }\n }\n\n throw new Horde_Vfs_Exception(sprintf('Unable to rename VFS file %s/%s.', $oldpath, $oldname));\n }", "title": "" }, { "docid": "d3b9a9481662c363773c387f14c3b6f1", "score": "0.60605735", "text": "function NWRename($oldname, $newname, $path = \"./\")\n\t{\n\t\tif (!$path = NWPathComplete($path)) {\n\t\t\tif (DEBUG) NWWriteLog(\"Couldn't resolve path.\");\n\t\t\treturn false;\n\t\t}\n\n\t\t$oldInfo = pathinfo($oldname);\n\t\t$newInfo = pathinfo($newname);\n\n\t\t$oldpath = $path.$oldInfo[\"basename\"];\n\t\t$newpath = NWPlusOne($newInfo[\"basename\"], $path);\n\n\t\tif (!file_exists($oldpath)) {\n\t\t\tif (DEBUG) NWWriteLog(\"$oldpath does not exist.\");\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!rename($oldpath, $newpath)) {\n\t\t\tif (DEBUG) NWWriteLog(\"Couldn't rename $oldpath to $newpath\");\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "8a34cae7da8a410e19208c147ea61b21", "score": "0.6031148", "text": "public function rename($path, $name)\n {\n $userName = $_SESSION['user']->username;\n\n $this->validator->validateRequired($name, 'Name');\n $this->validator->validateRequired($path, 'Path');\n $this->validator->validateFileOwnership($path);\n\n if(!empty($this->validator->getErrors())){\n header('Location: renameFile.php?errors=' . urlencode(json_encode($this->validator->getErrors())) );\n exit();\n }\n\n $file = $this->file->getFileByPath($path);\n $extension = $file->format;\n $newPath = \"/assets/uploads/$userName/$name.$extension\";\n\n $this->validator->validateRenameFile($newPath, $file->id);\n if(!empty($this->validator->getErrors())){\n header('Location: rename.php?errors=' . urlencode(json_encode($this->validator->getErrors())) );\n exit();\n }\n\n try {\n rename($_SERVER['DOCUMENT_ROOT'] . $path, $_SERVER['DOCUMENT_ROOT']. $newPath);\n } catch (\\Exception $exception){\n echo 'Unable To Rename File';\n exit();\n }\n\n $this->file->updateName($file, $name, $newPath);\n\n }", "title": "" }, { "docid": "317ccf52ed1a07cef68665318c99330d", "score": "0.60303205", "text": "public function forceRename();", "title": "" }, { "docid": "b6e3bec459cb1bdf351e94807dfe50d0", "score": "0.60225093", "text": "function rename($old_object, $new_object_name)\n {\n }", "title": "" }, { "docid": "b61206e539365e7ceba641120cfd4a90", "score": "0.59997356", "text": "function renamefile ($filetorename) { // normal file rename policy\n\n\t$filetorename = strtolower($filetorename); // lower-case.\n\t$filetorename = strip_tags($filetorename); // remove HTML tags.\n\t$filetorename = preg_replace('!\\s+!','_',$filetorename); // change space chars to underscores.\n\t$filetorename = stripslashes($filetorename); //remove slashes in the file name\n\t$filetorename = str_replace(\"'\", \"\", $filetorename);\n\t$filetorename = str_replace(\"&\", \"_and_\", $filetorename);\n\n\treturn $filetorename;\n\n}", "title": "" }, { "docid": "1958162f1ab012dab7a84fbf6f504924", "score": "0.5998521", "text": "public function rename($path, $newpath)\n {\n $baseAdapter = $this->getBaseAdapter();\n\n if (($baseAdapter instanceof EmulateRenameDirectoryInterface) && $this->hasDirectory($path)) {\n return $baseAdapter->renameDirectory($path, $newpath);\n }\n\n return parent::rename($path, $newpath);\n }", "title": "" }, { "docid": "fa0cabe5e23fd540a5f0ca94039bd40c", "score": "0.59921104", "text": "function rename ( $path , $to )\n\t{\n\t\tif ( ($path = $this->getPath($path)) === false || ($to = $this->getPath($to,false)) === false )\n\t\t{\n\t\t\t$this->errors[] = 1002 ;\n\t\t\treturn false ;\n\t\t}\n\t\t\n\t\tif ( @rename ( $path , $to ) )\n\t\t{\n\t\t\treturn true ;\n\t\t} else {\n\t\t\t$this->errors[] = 1008 ;\n\t\t\treturn false ;\n\t\t}\n\t}", "title": "" }, { "docid": "b832307ecbb26a96b735973c1893e0e2", "score": "0.5991108", "text": "protected function changeJs($path, $old_name, $new_name)\n {\n rename(\"$path/src/js/{$old_name}.js\", \"$path/src/js/{$new_name}.js\");\n }", "title": "" }, { "docid": "d3e2d6dc1d25f0b4b5cd0265273515dd", "score": "0.5971674", "text": "function RenameFolder($path, $new_name) {\n\t\ttry{\n\t\t\tif(!$this->CheckPath($path))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}else{\n\t\t\t\techo \"<br>rename<br>\";\n\t\t\t\t$this->soap_folder->rename(array('token' => $this->token,'fldPath' => $path,'newName' => $new_name));//($this->token, $path, $new_path);\n\t\t\t\t//(array('token' => $this->token, 'fldPath' => $this->folder->path))\n\t\t\t\techo \"error?\";\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}catch (Exception $e){\n\t\t\techo format_exception($e);\n\t\t}\n\t}", "title": "" }, { "docid": "e2995c039d241b2b44ffb74a2845dc93", "score": "0.5962219", "text": "public function rename($filePath, $newFilePath, $overwrite=false);", "title": "" }, { "docid": "5cd42e724bc82932750c91a2e49329d9", "score": "0.59616256", "text": "function rename($old, $new) \r\n {\r\n ftp_rename( $this->conn, $old, $new );\r\n }", "title": "" }, { "docid": "292b5615ea89f0a22156a316024d28e3", "score": "0.59539557", "text": "public function rename($source, $destination) {\n $this->log(\"Переименовываю $source -> $destination\");\n $this->checkPathSafety($source, $destination);\n\n if (is_dir($source)) {\n $this->copy($source, $destination);\n $this->remove($source);\n } else {\n $this->checkPaths($source);\n $this->checkPaths(dirname($destination), array('is_dir', 'is_executable', 'is_writable'));\n rename($source, $destination);\n }\n }", "title": "" }, { "docid": "5120d9c7ae3f39e220b139f060b49184", "score": "0.5951035", "text": "public function rename($path, $newpath)\n {\n return false;\n }", "title": "" }, { "docid": "f8a5cf7fc7178cd27c5cdb672c37229e", "score": "0.5924329", "text": "function file_upload($source, $target) {\n return rename($source, $target);\n}", "title": "" }, { "docid": "cd1b12f33a5e6f9ca7f0da0c5bce816d", "score": "0.5897643", "text": "final public function rename($oldfile, $newfile) {\n return @rename($oldfile, $newfile);\n }", "title": "" }, { "docid": "d10620c058787e7b6fe2cbf404d6df9e", "score": "0.5882325", "text": "public function rename($remote, $newRemote);", "title": "" }, { "docid": "d6a30ea9200f24ca95fb7eed69a88529", "score": "0.5872607", "text": "public function move($new_path) {\n\t\t$info = pathinfo ( $this->path );\n\t\t$new_path = $this->area->get_path ( $new_path );\n\t\t\n\t\t$new_path = rtrim ( $new_path, '\\\\/' ) . DS . $info ['basename'];\n\t\t\n\t\t$return = $this->area->rename_dir ( $this->path, $new_path );\n\t\t$return and $this->path = $new_path;\n\t\t\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "433a02dd85df2b2eed89be0fc830049e", "score": "0.5858182", "text": "function change_to_rel_path($old_path) {\n $new_path = str_replace(\"SM_PATH . '\", \"../\", $old_path); \n $new_path = str_replace(\"../config/\",\"\", $new_path);\n $new_path = str_replace(\"'\",\"\", $new_path);\n return $new_path;\n}", "title": "" }, { "docid": "d8b2e36fa053a83a1a1e2eeae7c4f365", "score": "0.5847756", "text": "private function renameFolder($old, $new)\n {\n if ($old === $new) {\n return;\n }\n\n $bucket = Auth::user()->getBucket();\n Storage::disk('buckets')->move($bucket.'/'.$old, $bucket.'/'.$new);\n }", "title": "" }, { "docid": "b88fd1e29994b349a6ce84c6aaacdaac", "score": "0.5843051", "text": "public function rename(Request $request){\n\n $path = new FilePath($request);\n $vals = $request->validate([\n 'name' => 'required|string|min:3|max:100',\n ]);\n $response = $this->repo->rename($path, $vals['name']);\n\n return $this->responseOrRedirect($response, $path->getDir());\n }", "title": "" }, { "docid": "ba0c948b0bec6570a12f967a263099a0", "score": "0.5837552", "text": "function _rename($file) {\n\t\t$message = sprintf('Rename %s to:', basename($file));\n\t\t$basename = $this->in($message, null, basename($file));\n\t\treturn dirname($file) . DS . $basename;\n\t}", "title": "" }, { "docid": "b3afe1c008a732044262dc5d39f82b86", "score": "0.58250874", "text": "function wp_rml_rename($name, $id, $supress_validation = false) {\n return folder\\CRUD::getInstance()->update($name, $id, $supress_validation);\n }", "title": "" }, { "docid": "36b16fbc061b2c383bc7d34823aad0ab", "score": "0.58202666", "text": "public function rename($name) {\t\t\r\n\t\t\t\t\r\n\t\t$oldPath = $this->path;\r\n\t\t$newPath = dirname($this->path) . '/' . $name;\r\n\r\n\t\tif (!$this->exists() || rename($oldPath, $newPath)) {\r\n\t\t\t$this->path = $newPath;\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "eabfc9d10953eb9c894817143b136de7", "score": "0.5814586", "text": "function custom_rename_images($image) {\n $info = pathinfo($image);\n $dir = $info['dirname'] . '/';\n $ext = '.' . $info['extension'];\n $name = wp_basename($image, '$ext');\n\n // New Name\n $new_name = $dir . substr($name, 0, -strlen($ext)) .\"-\". $ext;\n\n // Rename the intermediate size\n $did_it = rename($image, $new_name);\n\n // Return if successful\n if ($did_it) return $new_name;\n\n // Return on fail\n return $image;\n}", "title": "" }, { "docid": "fc2c9aa86b98937a83012469d39f2bbe", "score": "0.57988113", "text": "public function rename($old_key, $new_key);", "title": "" }, { "docid": "e55489d460f59a39814ba632147809e4", "score": "0.5796261", "text": "function file_newname($path, $filename) {\n if ($pos = strrpos($filename, '.')) {\n $name = substr($filename, 0, $pos);\n $ext = substr($filename, $pos);\n } else {\n $name = $filename;\n }\n $newpath = $path.'/'.$filename;\n $newname = $filename;\n $counter = 0;\n while (file_exists($newpath)) {\n $newname = $name .'_'. $counter . $ext;\n $newpath = $path.'/'.$newname;\n $counter++;\n }\n return $newname;\n}", "title": "" }, { "docid": "82cbc564b5033f0e0fc47c7b8a8bb282", "score": "0.5770409", "text": "function rename() { return $this->op('$rename', func_get_args()); }", "title": "" }, { "docid": "9911517ce133e37ffe8d2f3b40775bdb", "score": "0.5765783", "text": "public function move() {\n\t\t$rootDir = $this->dynamic_fileroot;\n\t\tif (empty($rootDir)) {\n\t\t\t$rootDir = $this->get['root'];\n\t\t}\n\t\t$rootDir = str_replace('//', '/', $rootDir);\n\t\t$oldPath = $this->getFullPath($this->get['old']);\n\t\t// old path\n\t\t$tmp = explode('/',trim($this->get['old'], '/'));\n\t\t$fileName = array_pop($tmp); // file name or new dir name\n\t\t$path = '/' . implode('/', $tmp) . '/';\n\t\t// new path\n\t\tif (substr($this->get['new'], 0, 1) != \"/\") {\n\t\t\t// make path relative from old dir\n\t\t\t$newPath = $path . '/' . $this->get['new'] . '/';\n\t\t} else {\n\t\t\t$newPath = $rootDir . '/' . $this->get['new'] . '/';\n\t\t}\n\t\t$newPath = preg_replace('#/+#', '/', $newPath);\n\t\t$newPath = $this->expandPath($newPath, true);\n\t\t//!important! check that we are still under ROOT dir\n\t\tif (strncasecmp($newPath, $rootDir, strlen($rootDir))) {\n\t\t\t$this->error(sprintf($this->lang('INVALID_DIRECTORY_OR_FILE'),$this->get['new']));\n\t\t}\n\t\tif(!$this->has_permission('move') || !$this->isValidPath($oldPath)) {\n\t\t\t$this->error(\"No way.\");\n\t\t}\n\t\t$newRelativePath = $newPath;\n\t\t$newPath = $this->getFullPath($newPath);\n\t\t// check if file already exists\n\t\tif (file_exists($newPath.$fileName)) {\n\t\t\tif(is_dir($newPath.$fileName)) {\n\t\t\t\t$this->error(sprintf($this->lang('DIRECTORY_ALREADY_EXISTS'),rtrim($this->get['new'], '/').'/'.$fileName));\n\t\t\t} else {\n\t\t\t\t$this->error(sprintf($this->lang('FILE_ALREADY_EXISTS'),rtrim($this->get['new'], '/').'/'.$fileName));\n\t\t\t}\n\t\t}\n\t\t// create dir if not exists\n\t\tif (!file_exists($newPath)) {\n\t\t\tif(!mkdir($newPath,0755, true)) {\n\t\t\t\t$this->error(sprintf($this->lang('UNABLE_TO_CREATE_DIRECTORY'),$newPath));\n\t\t\t}\n\t\t}\n\t\t// move\n\t\t$this->__log(__METHOD__ . ' - moving '. $oldPath. ' to directory ' . $newPath);\n\t\tif(!rename($oldPath,$newPath . $fileName)) {\n\t\t\tif(is_dir($oldPath)) {\n\t\t\t\t$this->error(sprintf($this->lang('ERROR_RENAMING_DIRECTORY'),$path,$this->get['new']));\n\t\t\t} else {\n\t\t\t\t$this->error(sprintf($this->lang('ERROR_RENAMING_FILE'),$path . $fileName,$this->get['new']));\n\t\t\t}\n\t\t}\n\t\t$array = array(\n\t\t\t'Error'=>\"\",\n\t\t\t'Code'=>0,\n\t\t\t'Old Path'=>$path,\n\t\t\t'Old Name'=>$fileName,\n\t\t\t'New Path'=>$this->formatPath($newRelativePath),\n\t\t\t'New Name'=>$fileName,\n\t\t\t);\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "d72239579ec8e7ea6e81a28cc3663381", "score": "0.57650626", "text": "function renameLogFile( $new_name_file )\n {\n $old_file_name = $this->getLogFile();\n\n $folder = $this->folder;\n\n rename( $folder . $old_file_name, $folder . $new_name_file );\n }", "title": "" }, { "docid": "8a73b12183a36f4d0925ef5d081a0c03", "score": "0.5759382", "text": "function PclZipUtilRename($p_src, $p_dest)\n{\n}", "title": "" }, { "docid": "411bebaa8df515d7dceb2cefc3d7e215", "score": "0.5749816", "text": "public function rename($oldname, $newname) {\n\t\t$this->connectIfNeeded();\n\t\t$this->handle->rename($oldname, $newname);\n\t\t$this->onFileRenamed(\n\t\t\tnew Event(['sender' => $this, 'data' => [\n\t\t\t\t'oldname' => $oldname, \n\t\t\t\t'newname' => $newname\n\t\t\t]])\n\t\t);\n\t}", "title": "" }, { "docid": "9a316308d112835f038bc39285390589", "score": "0.5745251", "text": "public function rename(string $path, string $oldName, string $newName, bool $overwrite = false, bool $inPublic = true): Response {\n $fullPath = $this->context->getPublicPath($path, $inPublic);\n return $this->post(Context::User, \"/CMD_API_FILE_MANAGER\", [\n \"action\" => \"rename\",\n \"path\" => $fullPath,\n \"old\" => $oldName,\n \"filename\" => $newName,\n \"overwrite\" => $overwrite ? \"yes\" : \"no\",\n ]);\n }", "title": "" }, { "docid": "0681b63a2620354454bcee467ae3039a", "score": "0.57276696", "text": "public function rename_file($old, $new)\r\n\t{\r\n\t\tif(!@rename($old, $new))\r\n\t\t\t$this->report_error('$old konnte nicht in $new geaendert werden');\r\n\t}", "title": "" }, { "docid": "90e8e379bcb112dd37d3c394f906d3ec", "score": "0.5711506", "text": "public function renameFolder($oldPath, $newPath) {\n ///\n imap_renamemailbox($this->handler, $this->ref . $this->encode($oldPath), $this->ref . $this->encode($newPath));\n ///\n }", "title": "" }, { "docid": "65ca2674e97c4d293f7731386bb3f110", "score": "0.5711266", "text": "public function rename($oldName, $newName, $options = array()) {\n\t\t\n\t\t$defaults = array(\n\t\t\t'limitPath' => false,\n\t\t\t'throw' => false, \n\t\t\t'chmod' => true, \n\t\t);\n\t\t\n\t\tif(!is_array($options)) $options = array('limitPath' => $options);\n\t\t$options = array_merge($defaults, $options);\n\t\n\t\t// if only basename was specified for the newName then use path from oldName\n\t\tif(basename($newName) === $newName) {\n\t\t\t$newName = dirname($oldName) . '/' . $newName;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t$this->allowPath($oldName, $options['limitPath'], true);\n\t\t} catch(\\Exception $e) {\n\t\t\tif($options['throw']) throw new WireException(\"Rename oldName path invalid: \" . $e->getMessage());\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t$this->allowPath($newName, $options['limitPath'], true);\n\t\t} catch(\\Exception $e) {\n\t\t\tif($options['throw']) throw new WireException(\"Rename newName path invalid: \" . $e->getMessage());\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(!file_exists($oldName)) {\n\t\t\tif($options['throw']) throw new WireException(\"Rename given pathname (oldName) that does not exist: $oldName\");\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(file_exists($newName)) {\n\t\t\tif($options['throw']) throw new WireException(\"Rename to pathname (newName) that already exists: $newName\");\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(!rename($oldName, $newName)) {\n\t\t\tif($options['throw']) throw new WireException(\"Rename failed: $oldName => $newName\");\n\t\t}\n\t\n\t\tif($options['chmod']) {\n\t\t\t$this->chmod($newName);\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "808cfb1c55071ba47f36bdca21fe9b0c", "score": "0.5704722", "text": "function func_rename($cmds)\t{\r\n\t\tif (!$this->isInit) return FALSE;\r\n\r\n\t\t$theNewName = $this->cleanFileName($cmds['data']);\r\n\t\tif ($theNewName)\t{\r\n\t\t\tif ($this->checkFileNameLen($theNewName))\t{\r\n\t\t\t\t$theTarget = $cmds['target'];\r\n\t\t\t\t$type = filetype($theTarget);\r\n\t\t\t\tif ($type=='file' || $type=='dir')\t{\t\t// $type MUST BE file or dir\r\n\t\t\t\t\t$fileInfo = t3lib_div::split_fileref($theTarget);\t\t// Fetches info about path, name, extention of $theTarget\r\n\t\t\t\t\tif ($fileInfo['file']!=$theNewName)\t{\t// The name should be different from the current. And the filetype must be allowed\r\n\t\t\t\t\t\t$theRenameName = $fileInfo['path'].$theNewName;\r\n\t\t\t\t\t\tif ($this->checkPathAgainstMounts($fileInfo['path']))\t{\r\n\t\t\t\t\t\t\tif (!@file_exists($theRenameName))\t{\r\n\t\t\t\t\t\t\t\tif ($type=='file')\t{\r\n\t\t\t\t\t\t\t\t\tif ($this->actionPerms['renameFile'])\t{\r\n\t\t\t\t\t\t\t\t\t\t$fI = t3lib_div::split_fileref($theRenameName);\r\n\t\t\t\t\t\t\t\t\t\tif ($this->checkIfAllowed($fI['fileext'], $fileInfo['path'], $fI['file'])) {\r\n\t\t\t\t\t\t\t\t\t\t\tif (@rename($theTarget, $theRenameName))\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t$this->writelog(5,0,1,'File renamed from \"%s\" to \"%s\"',Array($fileInfo['file'],$theNewName));\r\n $params[\"action\"]=\"moveFile\";\r\n $params[\"sourceFile\"]=$theTarget;\r\n $params[\"destinationFile\"]=$theRenameName;\r\n $this->sendRequestToNodes($params);\r\n\t\t\t\t\t\t\t\t\t\t\t\treturn $theRenameName;\r\n\t\t\t\t\t\t\t\t\t\t\t} else $this->writelog(5,1,100,'File \"%s\" was not renamed! Write-permission problem in \"%s\"?',Array($theTarget,$fileInfo['path']));\r\n\t\t\t\t\t\t\t\t\t\t} else $this->writelog(5,1,101,'Extension of file name \"%s\" was not allowed!',Array($fI['file']));\r\n\t\t\t\t\t\t\t\t\t} else $this->writelog(5,1,102,'You are not allowed to rename files!','');\r\n\t\t\t\t\t\t\t\t} elseif ($type=='dir')\t{\r\n\t\t\t\t\t\t\t\t\tif ($this->actionPerms['renameFolder'])\t{\r\n\t\t\t\t\t\t\t\t\t\tif (@rename($theTarget, $theRenameName))\t{\r\n\t\t\t\t\t\t\t\t\t\t\t$this->writelog(5,0,2,'Directory renamed from \"%s\" to \"%s\"',Array($fileInfo['file'],$theNewName));\r\n $params[\"action\"]=\"moveDir\";\r\n $params[\"sourceDir\"]=$theTarget;\r\n $params[\"destinationDir\"]=$theRenameName;\r\n $this->sendRequestToNodes($params);\r\n\t\t\t\t\t\t\t\t\t\t\treturn $theRenameName;\r\n\t\t\t\t\t\t\t\t\t\t} else $this->writelog(5,1,110,'Directory \"%s\" was not renamed! Write-permission problem in \"%s\"?',Array($theTarget,$fileInfo['path']));\r\n\t\t\t\t\t\t\t\t\t} else $this->writelog(5,1,111,'You are not allowed to rename directories!','');\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else $this->writelog(5,1,120,'Destination \"%s\" existed already!',Array($theRenameName));\r\n\t\t\t\t\t\t} else $this->writelog(5,1,121,'Destination path \"%s\" was not within your mountpoints!',Array($fileInfo['path']));\r\n\t\t\t\t\t} else $this->writelog(5,1,122,'Old and new name is the same (%s)',Array($theNewName));\r\n\t\t\t\t} else $this->writelog(5,2,123,'Target \"%s\" was neither a directory nor a file!',Array($theTarget));\r\n\t\t\t} else $this->writelog(5,1,124,'New name \"%s\" was too long (max %s characters)',Array($theNewName,$this->maxInputNameLen));\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "a4a9e346acbc928b3347342c735fe96f", "score": "0.56809646", "text": "public static function file_rename($args = array())\n {\n $default = array(\n 'access_token' => self::access_token(),\n 'fileId' => '',\n 'new_name' => ''\n );\n $arg = WP_CLI_Util::parse_args($args, $default);\n\n $file_name = preg_replace(self::$preg_filename, '', $arg['new_name']);\n $request = \\WP_CLI\\Utils\\http_request(\"PATCH\", self::$ApiUrl . \"/files/\" . urlencode($arg['fileId']), json_encode(array('name' => $file_name)), array_merge(self::$json_content_type, self::$json_header_request, array('Authorization' => self::$auth_header . ' ' . $arg['access_token'])), array('timeout' => self::$request_timeout));\n if ($request->status_code === 200) {\n return self::response($request);\n }\n\n return self::$failed_connecting;\n }", "title": "" }, { "docid": "d538f3cc27607e727ea8ac9bcb680261", "score": "0.56761086", "text": "protected function rename()\n {\n $name = $this->asksForApplicationName();\n\n return $this->renameBinary($name)\n ->updateComposer($name);\n }", "title": "" }, { "docid": "a6b4788baf5e7d0f25e15ac0ded94489", "score": "0.56681985", "text": "public function renameImage(){\n\t\t$this->load->helper(array('response', 'input'));\n\n\t\t// if the filename is empty do nothing\n\t\tif(empty($this->input->post('new_filename'))){\n\t\t\treturn false;\n\t\t}\n\n\t\t$imageId = sanitizeInteger($this->input->post('id'));\n\t\t$newFilename = sanitizeStringRemoveAllNonAlphanumeric($this->input->post('new_filename'));\n\t\t$currentFilenameResult = $this->images->getImageFilename($imageId);\n\n\t\t// the next lines are to get the file extension\n\t\t$extension = substr($currentFilenameResult->row()->filename, strpos($currentFilenameResult->row()->filename, \".\"));\n\n\n\t\t// check if that name is already used\n\t\t$checkDuplicates = $this->images->checkDuplicatedFilename($newFilename.$extension);\n\t\tif(!$checkDuplicates->row()){\n\t\t\t// this renames the actual file\n\t\t\trename(\"./uploads/\".$currentFilenameResult->row()->filename, \"./uploads/\".$newFilename.$extension);\n\n\t\t\tif($this->images->renameImageFile($imageId, $newFilename.$extension)){\n\t\t\t\techo returnResponse('success', 'OK', 'jsonizeResponse');\n\t\t\t}else{\n\t\t\t\techo returnResponse('error', 'ERROR', 'jsonizeResponse');\n\t\t\t}\n\t\t}else{\n\t\t\techo returnResponse('error', 'Duplicated filename', 'jsonizeResponse');\n\t\t}\n\n\t}", "title": "" }, { "docid": "dfbeddb4063b61ed14600e60a5802f1a", "score": "0.5661197", "text": "function renameFile ($name, $phpendings, $editphp, $showphp, $allowedfile, $dir) {\n\tglobal $_POST;\n\tif ((!in_array(getExt($_POST[\"oldfile\"]), $phpendings) && !in_array(getExt($_POST[\"newfile\"]), $phpendings)) || ($editphp == TRUE && $showphp == TRUE) || (getExt($_POST[\"oldfile\"]) == getExt($_POST[\"newfile\"]))) {\n\t\tif (array_key_exists(getExt($name), $allowedfile) || is_dir(\"{$dir}/{$_POST[\"oldfile\"]}\")) {\n\t\t\tif (is_writeable(\"{$dir}/{$_POST[\"oldfile\"]}\")) {\n\t\t\t\tif (@rename(\"{$dir}/{$_POST[\"oldfile\"]}\", \"{$dir}/{$_POST[\"newfile\"]}\")) {\n\t\t\t\t\techo \"<p class=\\\"okay\\\">File {$_POST[\"oldfile\"]} was renamed to {$_POST[\"newfile\"]}</p>\";\n\t\t\t\t} else {\n\t\t\t\t\techo \"<p class=\\\"error\\\">Error: File {$_POST[\"oldfile\"]} could not be renamed. Possible reason: New file name already exists.</p>\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\techo \"<p class=\\\"error\\\">Error: You do not have permissions to rename {$_POST[\"oldfile\"]}</p>\"; \n\t\t\t}\n\t\t} else {\n\t\t\techo \"<p class=\\\"error\\\">Error: File {$_POST[\"oldfile\"]} could not be renamed. New file ending (.\".getExt($_POST[\"newfile\"]).\") not allowed.</p>\";\n\t\t}\n\t} else {\n\t\techo \"<p class=\\\"error\\\">Error: You do not have permissions to rename {$_POST[\"oldfile\"]}. Either you don't have permission to rename it to a php file or {$_POST[\"oldfile\"]} is a php file.</p>\";\n\t}\n}", "title": "" }, { "docid": "fa0a556a474746006517fb0f0cb32c99", "score": "0.5655147", "text": "public function rename($path_from, $path_to)\n {\n if (self::$logger instanceof Zend_Log) {\n self::$logger->log(\"rename($path_from, $path_to)\", Zend_Log::DEBUG);\n }\n\n // Renaming isn't supported, always return false\n return false;\n }", "title": "" }, { "docid": "39a13a7e1ff8d41a68bcfc901bcb4269", "score": "0.5646222", "text": "function renameImage($currentFullPath, $newName) {\n $info = pathinfo($currentFullPath);\n $dir = $info['dirname'];\n $ext = $info['extension'];\n $newPath = $dir . '/' . $newName . \".$ext\";\n return rename($currentFullPath, $newPath) ? $newPath : FALSE;\n }", "title": "" }, { "docid": "2d413df9139eccd0e6c64995dc9c7143", "score": "0.56424457", "text": "public function move($path);", "title": "" }, { "docid": "41d40cfe01027fd69d9ccc8600a7b8c9", "score": "0.5642309", "text": "public function rename(string $origin, string $target, bool $overwrite = false): void;", "title": "" }, { "docid": "808089dbc5222ac236f1617d9b367b09", "score": "0.56363213", "text": "function rename($from, $to){\r\n\t\treturn @ftp_rename($this->id, $from, $to);\r\n\t}", "title": "" }, { "docid": "378bd0916afdf4b45b2f01d490807a45", "score": "0.5633351", "text": "protected function changeCss($path, $old_name, $new_name)\n {\n rename(\"$path/src/scss/{$old_name}.scss\", \"$path/src/scss/{$new_name}.scss\");\n }", "title": "" }, { "docid": "ef6c21a91a8c5dbaa4cd831ba6265203", "score": "0.5619133", "text": "private function RenamePackage()\n {\n \n $root = $_SERVER['DOCUMENT_ROOT'];\n $folder_orig = \"{$root}/{$this->Package_Directory}/{$this->Package_Folder}\";\n \n $time = date(\"m.d.y - H:i:s\");\n $new_name = \"{$this->Package_Folder} - {$time}\";\n $folder_new = \"{$root}/{$this->Package_Directory}/{$new_name}\";\n \n $result = rename($folder_orig, $new_name);\n \n #echo \"<br />ORIGINAL FILENAME ==> \".$folder_orig;\n #echo \"<br />NEW FILENAME ==> \".$folder_new;\n \n if ($result) {\n $this->OutputMessage(\"Package folder already exists - folder renamed to '{$new_name}'\");\n }\n \n }", "title": "" }, { "docid": "30fffa8a29121664b991a72b1cd1e9fc", "score": "0.56167734", "text": "public function move(string $current, string $newFilename): void;", "title": "" }, { "docid": "2bae6960e8daff8a8ed976c3b4628da0", "score": "0.5606219", "text": "public function rename(string $filename): void\n {\n $this->move($this->directory, $filename);\n }", "title": "" }, { "docid": "0dbf679f8af70f0c53bcf9cd6d773c2e", "score": "0.56031156", "text": "function rename_project( $new_name )\n {\n $new_path = \"localprojects/\".$this->user.\"/\".$new_name;\n \n if( !is_dir( $this->base_path ) ) \n return false;\n \n if( is_dir( $new_path ) ) \n return false;\n\n if( !$this->model->is_project($this->user, $this->project) )\n return false;\n \n if( $this->model->is_project($this->user, $new_name) )\n return false;\n\n rename( $this->base_path, $new_path );\n $this->model->rename_project( $this->user, $this->project, $new_name);\n\n $this->project = $new_name;\n $this->base_path = $new_path;\n \n return true;\n }", "title": "" }, { "docid": "a4cb6252285cd4013ba6cd3dfb80bada", "score": "0.5600072", "text": "public static function renameFile($origin, $newname, $base_dir){\n $data = json_decode(file_get_contents($base_dir.\"/talk.json\"), true);\n $data[\"task\"] = \"renamef\";\n $data[\"old\"] = $origin;\n $data[\"new\"] = $newname;\n self::updateTalk($base_dir, $data);\n }", "title": "" }, { "docid": "f68006e8d2b922a4afe65e06128911ff", "score": "0.55920875", "text": "public function rename_file(Request $request)\n {\n $folderLocation = $request->folder_location;\n $filename = $request->filename;\n $newFilename = $request->new_filename;\n $success = false;\n $error = false;\n\n if (is_array($folderLocation)) {\n $folderLocation = rtrim(implode('/', $folderLocation), '/');\n }\n\n $location = \"{$this->directory}/{$folderLocation}\";\n\n if (!Storage::disk($this->filesystem)->exists(\"{$location}/{$newFilename}\")) {\n if (Storage::disk($this->filesystem)->move(\"{$location}/{$filename}\", \"{$location}/{$newFilename}\")) {\n $success = true;\n } else {\n $error = __('admin.media.error_moving');\n }\n } else {\n $error = __('admin.media.error_may_exist');\n }\n\n return compact('success', 'error');\n }", "title": "" }, { "docid": "33e7332d3294c8e4e6bbb376d44fa14d", "score": "0.55623573", "text": "function renPath($path,$nkey){\r\n\t\t$p=preg_split(\"/\\./\",$path);$k=array_pop($p);$map=$this;\r\n\t\tforeach ($p as $item) {\r\n\t\t\tif (!$map->isMap($item)){return $default;}\r\n\t\t\t$map=$map[$item];\r\n\t\t}\r\n\t\t$v=$map->get($k);\r\n\t\t$map->put($nkey,$v);\r\n\t\t$map->del($k);\r\n\t}", "title": "" }, { "docid": "0c38dc09eaeecdfae6956c31937bd54e", "score": "0.55613846", "text": "public static function rename($strOldPath, $strNewPath, $mixContext = null)\n {\n return rename($strOldPath, $strNewPath, $mixContext);\n }", "title": "" }, { "docid": "e67e081bd4e34a9da388c83bfa23d98e", "score": "0.55468696", "text": "protected function searchAndReplace($path, $old_name, $new_name)\n {\n $text = str_replace($old_name, $new_name, file_get_contents($path));\n\n file_put_contents($path, $text);\n }", "title": "" }, { "docid": "702b1070ecb4bf8ca8ea02e2f22443bc", "score": "0.5532173", "text": "public function renameFile($fromPath, $toPath, $commitMsg = null, $force = false, $author = null);", "title": "" }, { "docid": "42a4590190b55a2ac80201c9b20efc73", "score": "0.55220616", "text": "public static function renameurl($url){\n\t\t$shorturl = $url;\n\t\tif ($shorturl == \".\" or $shorturl == \"..\"){\n\t\t\t$shorturl = \"-HP-\";\n\t\t}\n\t\treturn $shorturl;\n\t}", "title": "" }, { "docid": "fa2d86a52312eb81062b02ff93bb3b60", "score": "0.552034", "text": "public function renameFile($file='')\n {\n $file = str_replace('-dot-', '.', $file);\n $file = str_replace('-slash-', '/', $file);\n\n $this->loadModel('Folders');\n // on récupère les variables issues des autres controleurs\n $settings = $this->Folders->findByType('Films')->first();\n $path = $settings['path'];\n\n if(null != $this->request->query('rename')){\n $new_file = $this->request->query('rename');\n $file = $path.'/'.$file;\n $new_file = $path.'/'.$new_file;\n\n // On créé le fichier avant > permet de créer les dossiers 20XX\n new File ($new_file, true, 0777);\n // on move ! avec rename !\n if(rename($file, $new_file)){\n chmod($new_file, 0777);\n $this->Flash->success(__('Le fichier a été renommé.'));\n return $this->redirect(['action' => 'import']);\n\n }\n }\n $this->set('file', $file);\n }", "title": "" }, { "docid": "d70b97275e211e91f85eabc219c38803", "score": "0.5514179", "text": "public function rename($src, $destination, $override = false, $dryrun = false){\n if($dryrun === true){\n $this->log(\"info\", \"DRYRUN: $src is renamed to $destination with override flag: $override\");\n\n return;\n }\n $this->fs->rename($src, $destination, $override);\n $this->log(\"info\", \"$src is renamed to $destination with override flag: $override\");\n }", "title": "" }, { "docid": "fda38b74d6763dd2884355740c8ccd50", "score": "0.54971695", "text": "function co_sync_file_move($old,$new)\n{\n\tglobal $FILE_BASE;\n\tif (file_exists($FILE_BASE.'/data_custom/sync_script.php'))\n\t{\n\t\trequire_once($FILE_BASE.'/data_custom/sync_script.php');\n\t\tif (substr($old,0,strlen($FILE_BASE))==$FILE_BASE)\n\t\t{\n\t\t\t$old=substr($old,strlen($FILE_BASE));\n\t\t}\n\t\tif (substr($new,0,strlen($FILE_BASE))==$FILE_BASE)\n\t\t{\n\t\t\t$new=substr($new,strlen($FILE_BASE));\n\t\t}\n\t\tif (function_exists('master__sync_file_move')) master__sync_file_move($old,$new);\n\t}\n}", "title": "" }, { "docid": "72b3e0fa6f1bf0276bf882fc31f44863", "score": "0.5493016", "text": "function mvdir($from, $to)\n {\n }", "title": "" }, { "docid": "14f8b22772489e6aabfbf605fdd9a6b7", "score": "0.54873955", "text": "public function newPath($path, $name): string\n {\n if (!$path) {\n return $name;\n }\n\n return $path.'/'.$name;\n }", "title": "" }, { "docid": "538b43759ad5f403705a832fff772f18", "score": "0.5481186", "text": "public function renameOnDFS( $oldPath, $newPath )\n {\n try\n {\n $this->s3client->copyObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $newPath,\n 'CopySource' => $this->bucket . \"/\" . $oldPath,\n 'ACL' => 'public-read'\n )\n );\n $this->delete( $oldPath );\n return true;\n }\n catch ( S3Exception $e )\n {\n eZDebug::writeError( $e->getMessage(), __METHOD__ );\n return false;\n }\n }", "title": "" }, { "docid": "0f4635dcb91e14a442bf5b4540a2fda5", "score": "0.5470484", "text": "public function rename($path, $new_name)\n {\n $target = $this->mergePaths([DS, $this->getParent($path), $new_name]);\n\n return $this->move($path, $target);\n }", "title": "" }, { "docid": "1a0a35490acdf18dd5b05907299156c6", "score": "0.54584754", "text": "public function mv($src, $dest);", "title": "" }, { "docid": "7182187bba65f2a9502d55dc922e16b8", "score": "0.54304177", "text": "static public function rename($oldName , $newName)\n\t{\n\t\t## copy the new upload document from temporary folder to the user mail folder\n\t\treturn rename($oldName , $newName);\n\t}", "title": "" }, { "docid": "842b793a48e7b8d7e05c859be4db7b4d", "score": "0.5425327", "text": "function NWMove($filename, $newpath, $oldpath=\"./\")\n\t{\n\t\tif (!$oldpath = NWPathComplete($oldpath)) {\n\t\t\tif (DEBUG) NWWriteLog(\"Couldn't resolve old path.\");\n\t\t\treturn false;\n\t\t}\n\t\tif (!$newpath = NWPathComplete($newpath)) {\n\t\t\tif (DEBUG) NWWriteLog(\"Couldn't resolve new path.\");\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!file_exists($oldpath.$filename)) {\n\t\t\tif (DEBUG) NWWriteLog(\"$oldpath$filename does not exist.\");\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!rename($oldpath.$filename, $newpath.$filename)) {\n\t\t\tif (DEBUG) NWWriteLog(\"Couldn't move $filename from $oldpath to $newpath\");\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "5d208db7a343de7f55996dd7557c9209", "score": "0.54205364", "text": "public function testUpdatePath()\n {\n\n }", "title": "" }, { "docid": "cea6e797d06e5041cfbb7efa2fa8f324", "score": "0.54154235", "text": "function renameModuleDirectory($oldName, $newName, $uninstallOldModule = false, $moveEditableCSS = false) {\n\tze\\moduleAdm::addNew($skipIfFilesystemHasNotChanged = false);\n\t\n\t$oldId = ze\\module::id($oldName);\n\t\n\tif ($newName && $oldId && ($newId = ze\\module::id($newName))) {\n\t\tforeach([\n\t\t\t'content_types', 'jobs', 'signals',\n\t\t\t'module_dependencies', 'plugin_setting_defs',\n\t\t\t'nested_plugins', 'plugin_instances',\n\t\t\t'plugin_item_link', 'plugin_layout_link'\n\t\t] as $table) {\n\t\t\t$sql = \"\n\t\t\t\tUPDATE IGNORE \". DB_PREFIX. $table. \" SET\n\t\t\t\t\tmodule_id = \". (int) $newId. \"\n\t\t\t\tWHERE module_id = \". (int) $oldId;\n\t\t\tze\\sql::update($sql);\n\t\t}\n\t\t\n\t\t$oldStatus = ze\\row::get('modules', 'status', $oldId);\n\t\t$newStatus = ze\\row::get('modules', 'status', $newId);\n\t\t\n\t\tif (ze::in($newStatus, 'module_not_initialized', 'module_suspended')) {\n\t\t\tze\\row::set('modules', ['status' => $oldStatus], $newId);\n\t\t}\n\t\t\n\t\tif ($moveEditableCSS\n\t\t && is_dir($gtDir = CMS_ROOT. ze\\content::templatePath('grid_templates'). '/skins/')) {\n\t\t\t\n\t\t\tforeach (scandir($gtDir) as $skin) {\n\t\t\t\tif ($skin[0] != '.'\n\t\t\t\t && is_dir($cssDir = $gtDir. $skin. '/editable_css/')\n\t\t\t\t && is_writable($cssDir = $gtDir. $skin. '/editable_css/')) {\n\t\t\t\t\t\n\t\t\t\t\tforeach (scandir($cssDir) as $oldFile) {\n\t\t\t\t\t\tif (is_file($cssDir. $oldFile)\n\t\t\t\t\t\t && ($suffix = ze\\ring::chopPrefix('2.'. $oldName, $oldFile))\n\t\t\t\t\t\t && ($contents = file_get_contents($cssDir. $oldFile))) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$contents = preg_replace('/\\b'. $oldName. '_(\\d)/', $newName. '_$1', $contents);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$newFile = '2.'. $newName. $suffix;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (file_exists($cssDir. $newFile)) {\n\t\t\t\t\t\t\t\tif (is_writable($cssDir. $newFile)) {\n\t\t\t\t\t\t\t\t\tfile_put_contents(\n\t\t\t\t\t\t\t\t\t\t$cssDir. $newFile,\n\t\t\t\t\t\t\t\t\t\t\"\\n\\n\\n\". $contents,\n\t\t\t\t\t\t\t\t\t\tFILE_APPEND | LOCK_EX\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\tunlink($cssDir. $oldFile);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tfile_put_contents($cssDir. $newFile, $contents);\n\t\t\t\t\t\t\t\tunlink($cssDir. $oldFile);\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}\n\t\n\tif ($uninstallOldModule && $oldId) {\n\t\tze\\row::update('modules', ['status' => 'module_not_initialized'], $oldId);\n\t\tze\\row::delete('special_pages', ['module_class_name' => $oldName]);\n\t}\n}", "title": "" }, { "docid": "05c0bfbaea3207fcd1051fb636d08477", "score": "0.54098797", "text": "public function rename($fromPath, $toPath)\r\n {\r\n if (! @rename($this->root . $fromPath, $this->root . $toPath))\r\n {\r\n throw new sfException(sprintf('Cannot rename \"%s\" to \"%s\".', $fromPath, $toPath));\r\n }\r\n }", "title": "" }, { "docid": "a808c9a2830a10956efbb33fa470ab94", "score": "0.5408534", "text": "public function rename($container_id, $path)\n {\n $this->validate($this->request, [\n 'filename' => 'required|alpha_dash|unique_asset_filename:'.$container_id.','.$path\n ]);\n\n $container = AssetContainer::find($container_id);\n $asset = $this->supplementAssetForEditing($container->asset($path));\n\n $asset->rename($this->request->filename);\n\n return $asset->toArray();\n }", "title": "" }, { "docid": "f103cdd2b9db347470021a90c508aa64", "score": "0.540736", "text": "public function renameDir($dirname, $rename) {\n return $this->scenario->runStep(new \\Codeception\\Step\\Action('renameDir', func_get_args()));\n }", "title": "" }, { "docid": "14425a3505432b39550812a2465c998e", "score": "0.54032075", "text": "public function changeFileName($new_name_index='fc')\n\t{\n\t\tif(!isset($_GET[$new_name_index]) || empty($_GET[$new_name_index]))\n\t\t{\n\t\t\t$this->setDownloadName($this->getFileName());\n\t\t}\n\t\telse\n\t\t{\n\t\t\t# remove some bad chars\n\t\t\t$asfname=str_replace(array('\"',\"'\",'\\\\','/'), '', $_GET[$new_name_index]);\n\t\t\tif($asfname==='') { $asfname='NoName'; }\n\t\t\t$this->setDownloadName($asfname);\n\t\t}\n\t}", "title": "" }, { "docid": "1e3196a433ff8e132a3d13c0c2c584f8", "score": "0.5396047", "text": "final public static function rename($old_file, $new_file)\n {\n self::fileExists($old_file);\n if (!@rename($old_file, $new_file))\n {\n throw new \\RuntimeException(__METHOD__ . \": failed to move '{$old_file}' to '{$new_file}'\");\n }\n return true;\n }", "title": "" }, { "docid": "bad3083fa8c053101369e14d9c06091a", "score": "0.53846514", "text": "public static function move($source,$target){\n\t\tif (file_exists($target)) {\n\t\t\tunlink($target);\n\t\t}\n\t\trename($source, $target);\t\n\t}", "title": "" }, { "docid": "04bf69ae7d5800d3c91d7b3c554e5c7d", "score": "0.5384167", "text": "public function renameImageFile($oldFileName, $newFilename) {\n\n\t\t// file path and name\n\t\t$originalFilePath = $this->getUploadFolderLocation().$this->getTaskID().'/'.$oldFileName;\n\t\t// new file path and name\n\t\t$renamedFilePath = $this->getUploadFolderLocation().$this->getTaskID().'/'.$newFilename;\n\n\t\t// make sure original file exists\n\t\tif(!file_exists($originalFilePath)){\n\t\t\tthrow new ImageException(\"Cannot find image file to rename\");\n\t\t}\n\n\t\t// rename the file to it's new name - if failed to rename it then through an image exception\n\t\tif(!rename($originalFilePath, $renamedFilePath)) {\n\t throw new ImageException(\"Failed to update filename\");\n\t }\n\t}", "title": "" }, { "docid": "85d4a9a62d7404159d43d1c5abcd5833", "score": "0.5367141", "text": "public function rename(string $sourceKey, string $destinationKey): void\n {\n }", "title": "" }, { "docid": "e8bbe35ba663b46c438539e81f6a2a41", "score": "0.53628796", "text": "public function rename(string $oldName, string $newName){\n throw new \\Exception(\"Not implemented\");\n }", "title": "" }, { "docid": "66bd57cc8b03ac90f336badaa8c2959b", "score": "0.5360443", "text": "public function rename($filePath, $newFilePath, $overwrite=false) {\t\t\n\t\tif(!file_exists($filePath)) {\n\t\t\tthrow new DirAndFileManagerException('Plik/katalog zrodlowy: ' . $filePath . ' nie istnieje');\n\t\t}\n\t\tif(file_exists($newFilePath) AND ($overwrite == false)) {\n\t\t\tthrow new DirAndFileManagerException('Plik/katalog docelowy: ' . $newFilePath . ' istnieje');\n\t\t}\n\t\tif(!rename($filePath, $newFilePath)) {\n\t\t\tthrow new DirAndFileManagerException('Nie mozna przeniesc lub zmienic nazwy pliku/katalogu: ' . $filePath);\n\t\t}\n\t}", "title": "" }, { "docid": "411fd940573aaac19f700daf73a0f142", "score": "0.5354171", "text": "public function rename( $new_file )\n {\n $res = rename( $this->path, $new_file->getPath() );\n if ( $res === FALSE ){\n _throw( new Charcoal_FileRenameException( $this->getPath() ,$new_file->getPath() ) );\n }\n }", "title": "" }, { "docid": "036de63e4e8ff62c0910929549978b86", "score": "0.53434837", "text": "public static function sai_mod__SYSTEM_SAI_saimod_sys_files_action_rn($cat,$id,$newid){ \n if(!\\SYSTEM\\FILES\\files::rename($cat, $id, $newid)){\n throw new \\SYSTEM\\LOG\\ERROR(\"rename problem\");}\n \n return \\SYSTEM\\LOG\\JsonResult::ok();\n }", "title": "" }, { "docid": "87f1ce5b62eab0274219da4bfa8fe54c", "score": "0.5324691", "text": "public function rename($src, $dest)\n {\n // Correct paths\n $src = str_replace(array('/', '\\\\'), DS, $src);\n $dest = str_replace(array('/', '\\\\'), DS, $dest);\n \n // Make sure the src file exists\n if( !file_exists($src) ) return false;\n \n // Rename the file\n return rename($src, $dest);\n }", "title": "" } ]
7e905252f67b51eaeced1c69336d6007
un asilado tiene muchas dietas
[ { "docid": "03fd488ef0d8918b3e35d8fc32268937", "score": "0.0", "text": "public function diets ()\n \t{\n \t\treturn $this->hasMany('App\\Diet');\n \t}", "title": "" } ]
[ { "docid": "4f3a0c5561db1885ce327fc2573a9ae5", "score": "0.5977728", "text": "public function getDadosSimplificado() {\n\n $aDados = $this->getLinhas();\n $oDados = new \\stdClass();\n $oDados->nMinimoAtualMDEAteBimestre = $aDados[96]->valor;\n $oDados->nPercentualAplicadoComMDE = $aDados[97]->valor;\n\n // Caso ultimo bimestre altera a coluna da formula\n if ($this->verificaUltimoBimestre()) {\n $oDados->nMinimoAtualFUNDEBAteBimestre = $aDados[53]->empenhado_atebim - ($aDados[61]->valor + $aDados[64]->valor);\n } else {\n $oDados->nMinimoAtualFUNDEBAteBimestre = $aDados[53]->liquidado_atebim - ($aDados[61]->valor + $aDados[64]->valor);\n }\n $oDados->nPercentualAplicadoComFUNDEB = $aDados[68]->valor;\n\n return $oDados;\n }", "title": "" }, { "docid": "f8fafcd495908b076e52281ac1403d27", "score": "0.5954156", "text": "function aggrandissement_tableau($array_champs){\r\n $day = 1;\r\n $day_avec_groupe = 0;\r\n\r\n //for($day; $day <= 80; $day++){ // Partie 1 \r\n for($day = 1; $day < 256; $day++){\r\n // À chaque jour, on décrément les nombres\r\n // On créer un tableau contenant les nouveaux nombres à ajouter à la fin de la journée\r\n \r\n foreach($array_champs['liste_nombres'] as $key => $value){\r\n if ($value == 0){ \r\n $array_champs['liste_nombres'][$key] = 6;\r\n array_push($array_champs['liste_nombres'], 8);\r\n\r\n } else {\r\n $array_champs['liste_nombres'][$key] = $value - 1;\r\n }\r\n }\r\n\r\n // Vérification de snombres\r\n $groupe_day = array();\r\n foreach($array_champs['liste_nombres'] as $value){\r\n // Si la key existe, on incrémente sa présence\r\n if (isset($groupe_day[$value])){\r\n $groupe_day[$value]++;\r\n } else {\r\n $groupe_day[$value] = 1;\r\n }\r\n }\r\n\r\n // Si nous avons tous les nombres au moins une fois, on sort...\r\n if (count($groupe_day) == 9){\r\n $array_champs['groupe_precedant'] = $groupe_day;\r\n $day_avec_groupe = $day; // On récupère la jour\r\n $day = 256; // On doit sortir de la boucle FOR\r\n } \r\n } \r\n\r\n for($day_avec_groupe; $day_avec_groupe < 256; $day_avec_groupe++){\r\n // On prepare les information pour la nouvelle journée\r\n $array_champs['groupe_suivant'] = $array_champs['groupe_precedant'];\r\n $array_champs['groupe_suivant'][0] = $array_champs['groupe_precedant'][1];\r\n $array_champs['groupe_suivant'][1] = $array_champs['groupe_precedant'][2];\r\n $array_champs['groupe_suivant'][2] = $array_champs['groupe_precedant'][3];\r\n $array_champs['groupe_suivant'][3] = $array_champs['groupe_precedant'][4];\r\n $array_champs['groupe_suivant'][4] = $array_champs['groupe_precedant'][5];\r\n $array_champs['groupe_suivant'][5] = $array_champs['groupe_precedant'][6];\r\n $array_champs['groupe_suivant'][6] = $array_champs['groupe_precedant'][0] + $array_champs['groupe_precedant'][7];\r\n $array_champs['groupe_suivant'][7] = $array_champs['groupe_precedant'][8];\r\n $array_champs['groupe_suivant'][8] = $array_champs['groupe_precedant'][0];\r\n // Fin de la journée\r\n $array_champs['groupe_precedant'] = $array_champs['groupe_suivant']; \r\n }\r\n\r\n\r\n return $array_champs;\r\n}", "title": "" }, { "docid": "1fa6406a62c7ab2e080c0c4258ceefb2", "score": "0.5913773", "text": "function tasa_15($_19, $uit) { //ya se le aplica tasa SI o SI.\n\n $val_27UIT = 27 * $uit; // 27*3700=99900 \n $dato = 0; \n if ($_19 >= $val_27UIT) { //corta los q exeden 27UIT\n $dato = $_19;//$val_UIT;\n } else if ($_19 < $val_27UIT) {//OKK\n $dato = $_19;\n }\n\n $_20 = $dato * 0.15;\n return ($_20 > 0) ? $_20 : 0;\n}", "title": "" }, { "docid": "d1f3ddd359a753d62dae0ce18aa8bb3e", "score": "0.58556527", "text": "function diskon($jenis, $harga){\r\n if($jenis==\"makanan\"){\r\n return $harga-($harga*(25/100));\r\n }else\r\n if($jenis==\"outfit\"){\r\n return $harga-($harga*(60/100));\r\n }else\r\n if ($jenis==\"bahan pokok\"){\r\n return $harga-($harga*(50/100));\r\n }\r\n }", "title": "" }, { "docid": "cc6053920981c3610465ed1c16b8f2f2", "score": "0.5847872", "text": "function cariTigaAngka(){\n if ($this->isExistBetween()) {\n $mkarray = $this->makearray();\n\n //mencari index 3 angka\n $arrindex = [];\n foreach ($mkarray as $key => $value) {\n\n foreach ($value as $keyDalam => $valueDalam) {\n if ($this->dataFx > $keyDalam) {\n $arrindex[0] = $key - 1;\n $arrindex[1] = $key;\n $arrindex[2] = $key + 1;\n }\n }\n\n }\n\n\n //mendapatkan index 3 angka\n foreach ($arrindex as $key => $value) {\n foreach ($mkarray[$value] as $keyDalam => $valueDalam) {\n $this->getTigaAngka[$keyDalam] = $valueDalam;\n }\n }\n }\n }", "title": "" }, { "docid": "e56d8450c7ca1380576d0cb2e94154f4", "score": "0.58397675", "text": "function imprimirRangos($distancia, $sec, $resultado) {\n\t\t$len = strlen($sec);\n\n\t\tfor($i = 0; $i < count($resultado); $i++) {\n\t\t\t//$ran = ($distancia/100)*getIndiceFixed($len,$resultado[$i]);\n\t\t\t$ran = getRango($distancia,$len,$resultado[$i]);\n\t\t\t$low = getIndiceFixed($len,$resultado[$i]) + ceil($ran);\n\t\t\t$high = getIndiceFixed($len,$resultado[$i]) - ceil($ran);\n\t\t\techo \"[\".$low.\" - \".$high.\"]\".\", \";\n\n\t\t}\n\t\techo \"<br>\";\n\t}", "title": "" }, { "docid": "452f1e7b751156ad93909d9111bc2b26", "score": "0.58315915", "text": "function dias() {\n\t\t$mes_ini = 01;\n\t\t$dia_ini = 1;\n\t\t$ano_ini = 2016;\n\t\t\n\t\t$mes_fim = 12;\n\t\t$dia_fim = 31;\n\t\t$ano_fim = 2030;\n\t\t\n\t\t$dini = mktime(0,0,0,$mes_ini,$dia_ini,$ano_ini); // timestamp da data inicial\n\t\t$dfim = mktime(0,0,0,$mes_fim,$dia_fim,$ano_fim); // timestamp da data final\n\n\t\t$dataFinal = array();\n\t\t\n\t\twhile($dini <= $dfim)//enquanto uma data for inferior a outra\n\t\t{ \n\t\t $dt = date(\"Y-m-d\", $dini);//convertendo a data no formato dia/mes/ano\n\t\t $diasemana = date(\"w\", $dini); \n\t\t \n\t\t if($diasemana == \"0\"){ // [0 Domingo] - [1 Segunda] - [2 Terca] - [3 Quarta] - [4 Quinta] - [5 Sexta] - [6 Sabado]\n\t\t\t echo $diasemana.\" - \".$dt.\"<br>\"; //exibindo a data se for segunda feira \n\t\t }\n\t\t \n\t\t $dataFinal[\"dias_semana_id\"] = $diasemana;\n\t\t $dataFinal[\"dia_mes\"] = $dt;\n \n\t\t $this->db->insert(\"dias_semana_ano\", $dataFinal);\n\t\t $dini += 86400; // adicionando mais 1 dia (em segundos) na data inicial\n\t\t}\n\t\t//exit;\n\t}", "title": "" }, { "docid": "50e2d38dfe57ca094c27d6549cc0cb52", "score": "0.57782316", "text": "function dias_restantes($dia, $mes) {\n\tdefine('year', 365);\n\t//declarar arreglo associative con mes y dias totales\n\t$meses = ['enero' => 31, 'febrero' => 28,\n\t \t'marzo' => 31, 'april' => 30, \n\t\t'mayo' => 31, 'june' => 30, \n\t\t'july' => 31, 'agosto' => 31, \n\t\t'septiembre' => 30, 'octubre' => 31, \n\t\t'noviembre' => 30, 'diciembre' => 31 ];\n\t/*declarar arreglo para guardar numero de dias corridos asta la fecha*/\n\t$diasActuales = [];\n\t//suma total de los valores del arreglo $diasActuales\n\t$suma_dias_actuales = null;\n //iterar $meses \n\tforeach($meses as $key => $value) {\n\t //si key es igual al mes del input\t\n\t if($key === $mes) {\n\t //push valor a nuestro arreglo $suma_dias_actuales\t \n array_push($diasActuales, $dia);\n\t //escapamos la iteration\n\t break; \n\t } \n\t array_push($diasActuales, $value);\n\n\t}\n\t//sumamos los valores de $suma_dias_actuales\n\t$suma_dias_actuales = array_reduce($diasActuales, \"rsum\");\n\t/* al final sustraimos $suma_dias_actuales de los dias total al ano*/ \n \tprint 'falta ' . (year - $suma_dias_actuales) . 'dia para terminar el ano';\t\n}", "title": "" }, { "docid": "c6459d4c15158f6f4ac9136efa9526ce", "score": "0.5747329", "text": "function getPromedio( $i, $medidor, $medidor_caso1, $idcaso ) {\n\t$promedio = 0;\n\t$suma = 0;\n\t$meses = Array( -1 => 11, -2 => 10, -3 => 9, -4 => 8, -5 => 7, -6 => 6, -7 => 5, -8 => 4, -9 => 3, -10 => 2, -11 => 1, -12 => 0 );\n\n for( $j = 1; $j <= 12; $j ++ ) {\n\n if( ($i - $j) < 0 ) {\n $suma += $medidor_caso1[ $meses[ ($i-$j)] ]->v_consumo[\"1\"];\n } else{\n \t $suma += $medidor[$i-$j]->v_consumo[$idcaso];\n }\n }\n\n $promedio = (float) $suma / 12;\n\treturn $promedio;\n}", "title": "" }, { "docid": "d5ae40ac1bb16621bc8ccdd81e63042c", "score": "0.57460904", "text": "function diferenca_entredatas_diasuteis_sig($dataInicial = null, $dataFinal = null, $converteDias = true){\n global $db;\n\n //Caso nao seja informado uma datafinal pega a data atual\n if(empty($dataInicial)){\n $dataInicial = date('d/m/Y H:i:s');\n }\n if(empty($dataFinal)){\n $dataFinal = date('d/m/Y H:i:s');\n }\n //Conversoes para formato do banco de dados\n $dateTimeInicial = formata_datetime_sql_sig($dataInicial);\n $dateTimeFinal = formata_datetime_sql_sig($dataFinal);\n $dataInicial = formata_data_sql_sig($dataInicial);\n $dataFinal = formata_data_sql_sig($dataFinal);\n\n // Retirado da contagem feriados e finais de semana\n $sqlDiasUteis = sprintf(\"SELECT(\n SELECT COUNT('%s'::date+s.a) AS COUNT\n FROM GENERATE_SERIES(0,\n ( SELECT((( TO_DATE('%s','YYYY-MM-DD')) - (TO_DATE('%s','YYYY-MM-DD'))))),1) s(a)\n WHERE EXTRACT('DOW' FROM '%s'::date+s.a)\n BETWEEN 1 AND 5\n ) - (\n SELECT COUNT(EXTRACT(DOW FROM feddata)) AS COUNT\n FROM FERIADOS\n WHERE EXTRACT (DOW FROM feddata) BETWEEN 1 AND 5\n AND FEDDATA BETWEEN to_date('%s','YYYY-MM-DD')\n AND to_date('%s','YYYY-MM-DD')\n )\",$dataInicial,$dataFinal,$dataInicial,$dataInicial,$dataInicial,$dataFinal);\n\n $contDiasUteis = $db->pegaUm($sqlDiasUteis);\n // Conversoes de datas para segundos\n $diasEmSegundos = (($contDiasUteis * 24 * 60 * 60) - 86400);\n // Soma date mais time\n $diferencaTime = converteTimeSegundos($dateTimeFinal) - converteTimeSegundos($dateTimeInicial);\n $totalSegundos = ($diasEmSegundos + $diferencaTime);\n\n if($converteDias == false){\n // retorna segundos\n return $totalSegundos;\n }else{\n // retorna formatacao\n return converte_segundos_em_periodo($totalSegundos,'d',true);\n }\n}", "title": "" }, { "docid": "45070636aae9ca905a02a9d040240e38", "score": "0.5730956", "text": "function actividadDiaria(){\n require_once 'model/Atencion.php';\n $atencion = new Atencion();\n $consulta = $atencion->actividadDiaria();\n $fechas = array();\n foreach ($consulta as $a) {\n $total= $a[\"total\"];\n $fecha=$a[\"fecha\"];\n $fecha = date_create($fecha);\n $dia= date_format($fecha,'d');\n $mes=date_format($fecha,'m'); \n $ano=date_format($fecha,'Y');\n $fechas[intval($dia)]=array($fecha,$mes,$dia,$ano,$total); \n }\n \n for ($i = 1; $i <= 31; $i++) {\n if (empty($fechas[$i])) {\n $fechas[$i]=array(0,0,$i,0,0); \n }\n }\n \n $arreglo=\"\";\n \n for($i = 15; $i >= 0; $i--) {\n //$fecha=\"2017-07-05\"; \n $fecha=date(\"Y-m-d\"); \n $dias= $i;\n $d=date(\"d\", strtotime(\"$fecha -$dias day\"));\n $m=date(\"m\", strtotime(\"$fecha -$dias day\"));\n $Y=date(\"Y\", strtotime(\"$fecha -$dias day\"));\n $f=$fechas[intval($d)];\n $arreglo=$arreglo.\"[gd($Y, $m, $f[2]), $f[4]],\"; \n //print_r($d);\n } \n \n echo $arreglo;\n }", "title": "" }, { "docid": "3992d95a9702c015ca33edb900999ab5", "score": "0.5725033", "text": "public function getTotalIdeal()\n {\n $alternatif = $this->kon->query(\"SELECT * FROM alternatif ORDER BY kode ASC\");\n\n $data = [];\n foreach($alternatif as $alt){\n $nilai = $this->kon->query(\"SELECT * FROM nilai_alternatif WHERE id_alternatif='$alt[id]'\");\n \n $pangkatPositif = 0;\n $pangkatNegatif = 0;\n foreach($nilai as $n){\n $nilaiMatriksY = $this->getMatriksY($n['id_kriteria'], $n['id_alternatif']); \n \n foreach($this->getSolusi() as $s){\n if($s['id_kriteria'] == $n['id_kriteria']){\n $pangkatPositif = $pangkatPositif + pow($nilaiMatriksY - $s['positif'], 2);\n $pangkatNegatif = $pangkatNegatif + pow($nilaiMatriksY - $s['negatif'], 2);\n }\n }\n\n }\n \n $po = number_format(sqrt($pangkatPositif), 5);\n $ne = number_format(sqrt($pangkatNegatif), 5);\n $ref = number_format($ne/($ne+$po), 5);\n $data[] = [\n 'preferensi' => $ref,\n 'id_alternatif' => $alt['id'],\n 'kode' => $alt['kode'],\n 'image' => $alt['photo'],\n 'harga' => $alt['harga'],\n 'prosessor' => $alt['prosessor'],\n 'hardisk' => $alt['hardisk'],\n 'ram' => $alt['ram'],\n 'vga' => $alt['vga'],\n 'layar' => $alt['layar'],\n 'alternatif' => $alt['alternatif'],\n 'positif' => $po,\n 'negatif' => $ne,\n ];\n }\n rsort($data);\n return $data;\n }", "title": "" }, { "docid": "717953cd14a9adb29d5153f4373b9eab", "score": "0.5709529", "text": "function precio_final(){\n\t\t\t$total = $this->precio_base-self::$ayuda;\n\t\t\treturn $total;\n\t\t}", "title": "" }, { "docid": "1cec8d7c6d606cb6a79f4a0ecfce591d", "score": "0.5703889", "text": "private function getLarghezzaColonneTabellaPercentualeFinale() : int\n {\n // quindi per le colonne dati resta il 92%\n $percentualefinale = 95; // il 5% si lascia per la ruzzolina in fondo\n if (true === $this->getTabellaParameter('multiselezione')) {\n $percentualefinale -= 3;\n }\n\n return $percentualefinale;\n }", "title": "" }, { "docid": "71fac32c6645b0f9a3c879430feb167f", "score": "0.5699275", "text": "function calPanier (){\n\t\t\n\t\t$calPanier=0;\n\t\t\n\t\tfor($i=0; $i<count($_SESSION['panier']['nomPlat']);$i++){\n\t\t\n\t\t$calPanier += $_SESSION['panier']['quantPlat'][$i]*$_SESSION['panier']['calPlat'][$i];\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $calPanier;\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "2a669cb6b5fe046403d4154ec7a6d762", "score": "0.56932425", "text": "public function colonne_dispari_7(){\r\n\t\tfor($riga=1; $riga <= $this->limite; $riga++) {\r\n for($colonna=1;$colonna<=$this->limite;$colonna++) {\r\n\t\t\t\tif($colonna%2 != 0)\t\t$this->matrice[$riga-1][$colonna-1] -= 7;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "f3f22935051952bbeef526503e057855", "score": "0.5689359", "text": "function get_magy($povolani,$uroven,$obratnost,$inteligence){\n\t$m = 0;\n\t$i = $inteligence;\n\t$o = $obratnost;\n\t$pov = floor($povolani/2);\n\t$pov2 = $povolani;\n\t$l = $uroven;\n\tswitch($pov2){\n\t\tcase 4: //pyrofor\n\t\tcase 5: //theurg\n\t\t\t$hr1=array(0,0,0,0,0,0,184,256,360,490);\n\t\t\t$hr2=array(0,0,0,0,0,0,201,280,394,525);\n\t\t\t$hr3=array(0,0,0,0,0,0,218,303,426,568);\n\t\t\t$hr4=array(0,0,0,0,0,0,230,320,450,600);\n\t\t\t$hr5=array(0,0,0,0,0,0,242,337,474,632);\n\t\t\t$hr6=array(0,0,0,0,0,0,529,360,506,675);\n\t\t\t$hr7=array(0,0,0,0,0,0,276,384,540,710);\n\t\tbreak;\n\t\tcase 2: //druid\n\t\t\t$hr1=array(0,0,0,0,0,0,18,22,26,30,35,40,46,50,56,62,66,72,79,85,91,98,105,112,120,127,135,143,152,160,169,177,186,195,205,214,224);\n\t\t\t$hr2=array(0,0,0,0,0,0,19,23,27,31,36,40,46,50,57,62,70,76,83,89,96,103,111,118,127,134,143,151,160,169,178,187,197,206,216,227,237);\n\t\t\t$hr3=array(0,0,0,0,0,0,19,23,27,31,36,41,47,51,59,64,73,79,86,93,100,108,115,123,132,140,148,157,167,175,185,195,205,214,225,236,246);\n\t\t\t$hr4=array(0,0,0,0,0,0,20,24,29,34,39,43,50,55,62,69,75,82,89,96,103,111,119,127,136,144,153,162,172,181,191,201,211,221,232,243,254);\n\t\t\t$hr5=array(0,0,0,0,0,0,22,25,30,35,40,44,50,55,63,69,77,85,92,99,106,114,132,131,140,148,158,167,177,187,197,207,217,228,239,250,262);\n\t\t\t$hr6=array(0,0,0,0,0,0,23,26,31,36,42,45,53,58,66,71,80,88,95,103,110,119,127,136,145,154,163,173,184,193,204,215,225,236,248,259,271);\n\t\t\t$hr7=array(0,0,0,0,0,0,24,26,32,39,44,48,55,61,70,76,84,92,99,107,115,124,133,142,152,161,171,181,192,202,213,225,236,247,259,272,284);\n\t\tbreak;\n\t\tcase 3: //chodec\n\t\t\t$hr1=array(0,0,0,0,0,0,15,18,21,24,27,31,34,37,40,44,46,49,53,56,60,64,67,71,74,78,81,85,89,93,96,101,104,109,112,116,121);\n\t\t\t$hr2=array(0,0,0,0,0,0,16,19,22,25,28,31,34,37,40,44,48,52,56,60,63,67,71,75,78,82,86,89,94,98,102,106,110,115,118,123,128);\n\t\t\t$hr3=array(0,0,0,0,0,0,16,19,22,25,28,31,34,38,42,46,50,54,58,62,66,70,74,78,81,85,89,93,98,102,106,110,114,119,123,128,133);\n\t\t\t$hr4=array(0,0,0,0,0,0,17,20,23,27,30,33,37,41,45,49,52,56,60,64,68,72,76,80,84,88,92,96,101,105,109,114,118,123,127,132,137);\n\t\t\t$hr5=array(0,0,0,0,0,0,18,21,24,28,31,34,37,41,45,49,54,58,62,66,70,74,78,82,89,91,95,99,104,108,112,118,122,127,131,136,141);\n\t\t\t$hr6=array(0,0,0,0,0,0,19,22,25,29,32,35,39,43,47,51,56,60,64,68,73,77,81,85,90,94,98,103,108,112,116,122,126,131,136,141,146);\n\t\t\t$hr7=array(0,0,0,0,0,0,20,22,25,31,34,37,41,45,50,54,58,63,67,72,76,80,85,89,94,98,103,107,113,117,122,127,132,137,142,148,153);\n\t\tbreak;\n\t\tcase 6: //mag\n\t\tcase 7: //carodej\n\t\t\t$hr1=array(0,0,0,0,0,0,19,21,24,26,27,29,30,33,36,39,43,46,50,53,57,61,65,69,73,78,82,87,92,97,103,107,113,118,124,130,136);\n\t\t\t$hr2=array(0,0,0,0,0,0,23,26,29,32,35,37,38,42,45,49,54,57,62,66,71,76,81,86,71,97,103,109,115,121,128,134,140,147,15,162,169);\n\t\t\t$hr3=array(0,0,0,0,0,0,26,29,33,36,39,42,44,49,53,57,63,67,71,78,83,89,94,101,107,114,120,127,134,141,149,156,164,172,181,189,198);\n\t\t\t$hr4=array(0,0,0,0,0,0,28,32,36,40,44,47,50,55,60,65,71,76,82,88,94,101,107,114,121,129,136,144,125,160,169,177,186,195,205,214,224);\n\t\t\t$hr5=array(0,0,0,0,0,0,30,35,39,44,48,52,56,61,67,73,79,85,92,98,105,113,120,127,135,144,152,161,170,179,189,198,208,218,229,239,250);\n\t\t\t$hr6=array(0,0,0,0,0,0,33,38,43,48,53,57,62,68,75,81,88,95,102,110,117,126,133,142,151,161,169,179,189,199,210,220,232,243,255,266,279);\n\t\t\t$hr7=array(0,0,0,0,0,0,37,43,48,54,60,65,70,77,84,91,99,106,114,123,131,141,149,159,169,180,190,201,212,223,235,247,259,272,286,298,312);\n\t\tbreak;\n\t}\n\tswitch($pov){\n\t\tcase 1: //hranicar\n\t\t\tif ($i<8){switch($l){case 1: $m=0;break; case 2: $m=3;break; case 3: $m=6;break; case 4: $m=10;break; case 5: $m=12;break;default:$m=$hr1[$l];break;}\n\t\t\t}elseif($i>7 && $i<10){switch($l){case 1: $m=0;break; case 2: $m=3;break; case 3: $m=6;break; case 4: $m=10;break; case 5: $m=13;break;default:$m=$hr2[$l];break;}\n\t\t\t}elseif($i>9 && $i<12){switch($l){case 1: $m=0;break; case 2: $m=3;break; case 3: $m=7;break; case 4: $m=11;break; case 5: $m=13;break;default:$m=$hr3[$l];break;}\n\t\t\t}elseif($i>11 && $i<14){switch($l){case 1: $m=0;break; case 2: $m=3;break; case 3: $m=7;break; case 4: $m=11;break; case 5: $m=14;break;default:$m=$hr4[$l];break;}\n\t\t\t}elseif($i>13 && $i<16){switch($l){case 1: $m=0;break; case 2: $m=3;break; case 3: $m=7;break; case 4: $m=11;break; case 5: $m=15;break;default:$m=$hr5[$l];break;}\n\t\t\t}elseif($i>15 && $i<18){switch($l){case 1: $m=0;break; case 2: $m=3;break; case 3: $m=8;break; case 4: $m=12;break; case 5: $m=15;break;default:$m=$hr6[$l];break;}\n\t\t\t}elseif($i>17){switch($l){case 1: $m=0;break; case 2: $m=3;break; case 3: $m=8;break; case 4: $m=13;break; case 5: $m=16;break;default:$m=$hr7[$l];break;}\n\t\t\t}\n\t\tbreak;\n\t\tcase 2: //alchymista\n\t\t\tif ($l>9){if($o<10){$m=$hr1[9];}elseif($o<13){$m=$hr2[9];}elseif($o<15){$m=$hr3[9];}elseif($o<17){$m=$hr4[9];}elseif($o<19){$m=$hr5[9];}elseif($o>18){$m=$hr6[9];}\n\t\t\t}elseif($o<10){switch($l){case 1: $m=7;break; case 2: $m=15;break; case 3: $m=31;break; case 4: $m=62;break; case 5: $m=126;break;default:$m=$hr1[$l];break;}\n\t\t\t}elseif($o>9 && $o<12){switch($l){case 1: $m=7;break; case 2: $m=16;break; case 3: $m=35;break; case 4: $m=70;break; case 5: $m=131;break;default:$m=$hr2[$l];break;}\n\t\t\t}elseif($o>11 && $o<14){switch($l){case 1: $m=8;break; case 2: $m=17;break; case 3: $m=38;break; case 4: $m=76;break; case 5: $m=142;break;default:$m=$hr3[$l];break;}\n\t\t\t}elseif($o>13 && $o<15){switch($l){case 1: $m=8;break; case 2: $m=18;break; case 3: $m=40;break; case 4: $m=80;break; case 5: $m=150;break;default:$m=$hr4[$l];break;}\n\t\t\t}elseif($o>14 && $o<17){switch($l){case 1: $m=8;break; case 2: $m=19;break; case 3: $m=42;break; case 4: $m=84;break; case 5: $m=158;break;default:$m=$hr5[$l];break;}\n\t\t\t}elseif($o>16 && $o<19){switch($l){case 1: $m=9;break; case 2: $m=20;break; case 3: $m=45;break; case 4: $m=90;break; case 5: $m=169;break;default:$m=$hr6[$l];break;}\n\t\t\t}elseif($o>18){switch($l){case 1: $m=9;break; case 2: $m=21;break; case 3: $m=49;break; case 4: $m=98;break; case 5: $m=184;break;default:$m=$hr7[$l];break;}\n\t\t\t}\n\t\tbreak;\n\t\tcase 3: //kouzelnik\n\t\t\tif ($i<10){switch($l){case 1: $m=7;break; case 2: $m=10;break; case 3: $m=12;break; case 4: $m=14;break; case 5: $m=17;break;default:$m=$hr1[$l];break;}\n\t\t\t}elseif($i>9 && $i<12){switch($l){case 1: $m=7;break; case 2: $m=11;break; case 3: $m=14;break; case 4: $m=17;break; case 5: $m=20;break;default:$m=$hr2[$l];break;}\n\t\t\t}elseif($i>11 && $i<14){switch($l){case 1: $m=8;break; case 2: $m=12;break; case 3: $m=15;break; case 4: $m=19;break; case 5: $m=22;break;default:$m=$hr3[$l];break;}\n\t\t\t}elseif($i>13 && $i<16){switch($l){case 1: $m=8;break; case 2: $m=12;break; case 3: $m=16;break; case 4: $m=20;break; case 5: $m=24;break;default:$m=$hr4[$l];break;}\n\t\t\t}elseif($i>15 && $i<18){switch($l){case 1: $m=8;break; case 2: $m=12;break; case 3: $m=17;break; case 4: $m=21;break; case 5: $m=26;break;default:$m=$hr5[$l];break;}\n\t\t\t}elseif($i>17 && $i<20){switch($l){case 1: $m=9; break; case 2: $m=13; break; case 3: $m=18; break; case 4: $m=23; break; case 5: $m=28; break;default:$m=$hr6[$l];break;}\n\t\t\t}elseif($i>19) {switch($l) {case 1: $m=9; break; case 2: $m=14; break; case 3: $m=20; break; case 4: $m=26; break; case 5: $m=31; break;default:$m=$hr7[$l];break;}\n\t\t\t}\n\t\tbreak;\n\t}\n\treturn $m;\n}", "title": "" }, { "docid": "8c83026a6db276f7a2a559e6d701a3ed", "score": "0.56638736", "text": "function calculo_dias_quincena($fechaini, $fechafin) {//calculos de dias por quincena\r\n $cont = 0;\r\n $band = dias_transcurridos($fechaini, $fechafin); //preguntamos si ya pasamos el fin de mes o el final del rango de fecha \r\n for ($i = 0; $i < $band; $i++) {\r\n $texto1 = date('w', strtotime($fechaini));\r\n if (($texto1 != 0) && ($texto1 != 6)) { //si el dia es diferente de sabado y domingo, se incrementa\r\n $cont++;\r\n }\r\n $year1 = substr($fechaini, 0, 4);\r\n $dia1 = substr($fechaini, 8, 2);\r\n $mes1 = substr($fechaini, 5, 2);\r\n $dia1 = $dia1 + 1;\r\n $dia1 = dia_con_cero($dia1);\r\n $fechaini = $year1 . \"-\" . $mes1 . \"-\" . $dia1;\r\n }\r\n return $cont;\r\n}", "title": "" }, { "docid": "05cb00e9d953468fa0d60f4f732182a5", "score": "0.5655544", "text": "function convertir_desde_metros($valor, $unidad_hasta){\n\n switch ($unidad_hasta) {\n case 'Milimetro':\n return $valor * 1000;\n break;\n case 'Centimetro':\n return $valor * 100;\n break;\n case 'Decimetro':\n return $valor * 10;\n break;\n case 'Metro':\n return $valor * 1;\n break;\n case 'Decametro':\n return $valor / 10;\n break;\n case 'Hectometro':\n return $valor / 100;\n break;\n case 'Kilometro':\n return $valor / 1000;\n break; \n default:\n return 'Unidad de medida no soportada';\n break;\n }\n }", "title": "" }, { "docid": "ac23b19d9f907d50cfdcc0f9bbaf4082", "score": "0.56473565", "text": "private function escreverDisciplinas () {\n\n $aPeriodos = $this->getAvaliacoes();\n $iTamanhoCelulaPeriodos = ($this->iTamanhoDisponivelPeriodo / (count($aPeriodos) * 2));\n $this->oPdf->SetFont('arial', '', 6);\n foreach ($this->oGradeAvaliacao->getGradeAproveitamento() as $oGrade) {\n\n $this->oPdf->Cell(50, $this->iAlturaCelula, $oGrade->sNome, 1, 0);\n $iPeriodo = 1;\n foreach ($oGrade->aAproveitamento as $oAproveitamento) {\n\n if (!$oAproveitamento->oAproveitamento->lApareceBoletim) {\n continue;\n }\n if (!isset($this->aTotalFaltas[$oAproveitamento->iCodigo])) {\n $this->aTotalFaltas[$oAproveitamento->iCodigo] = 0;\n }\n $nNotaComPeso = $oAproveitamento->oAproveitamento->nAproveitamento * $iPeriodo;\n $iFaltas = $oAproveitamento->oAproveitamento->iFaltas;\n $iFaltasAbonadas = $oAproveitamento->oAproveitamento->iFaltasAbonadas;\n $this->aTotalFaltas[$oAproveitamento->iCodigo] += ($iFaltas - $iFaltasAbonadas);\n\n if (!$oAproveitamento->oAproveitamento->lAtingiuMinimo) {\n $this->oPdf->SetFont('arial', 'b', 6);\n }\n $this->oPdf->Cell($iTamanhoCelulaPeriodos, $this->iAlturaCelula, $oAproveitamento->oAproveitamento->nAproveitamento, 1, 0, \"C\");\n $this->oPdf->SetFont('arial', '', 6);\n $this->oPdf->Cell($iTamanhoCelulaPeriodos, $this->iAlturaCelula, ArredondamentoNota::formatar($nNotaComPeso, $this->iAnoCalendario), 1, 0, \"C\");\n $iPeriodo ++;\n }\n\n if ($oGrade->oResultadoFinal->sResultadoFinal == 'R') {\n $this->oPdf->SetFont('arial', 'b', 6);\n }\n $this->oPdf->Cell(11, $this->iAlturaCelula , $oGrade->oResultadoFinal->nAproveitamentoFinal, 1, 0, \"C\");\n $this->oPdf->SetFont('arial', '', 6);\n $this->oPdf->Cell(40, $this->iAlturaCelula, $oGrade->oResultadoFinal->sTermoResultadoFinal, 1, 1, \"C\");\n }\n $this->escreverTotalDeFaltas();\n }", "title": "" }, { "docid": "4e602c35f515304aea74a1d63ef67276", "score": "0.5644268", "text": "public function calcular_filas(){\t\n\t\t$dias_totales = new ColectorDiasMultiples($this->ArchivoFecha($this->ArchivoInicio),$this->ArchivoFecha($this->ArchivoFin));\n\t\t$NuevoArrayDias = $dias_totales->RescatarArray();\n\t\t//Si los dias son igual a 1 entonces\n\t\tif($dias_totales->RescatarCantidad()==1)\n\t\t{\n\t\t\t$filas = new numero_filas($NuevoArrayDias[0].\".cdr\",$this->horainicio_sn,$this->horafin_sn);\n\t\t\t$fila_array = $filas->devolver_filas();\t\t\t\t\n\t\t\tfor($i=0;$i<$filas->cantidad_objetos();$i++){\t\t\t\t\t\n\t\t\t\t$captura[] = str_replace(\" \", \"\",$fila_array[$i]);\n\t\t\t}\n\t\t\t$this->captura = $captura;\t\n\t\t}\n\t\telse\n\t\t//si son mas dias entonces\n\t\t{\n\t\t\tfor($k=0;$k<$dias_totales->RescatarCantidad();$k++)\n\t\t\t{\n\t\t\t\t//Selecciona el primer dia\n\t\t\t\tif($k==0)\n\t\t\t\t{\t\t\t\t\n\t\t\t\t\t//echo $NuevoArrayDias[$k]; \n\t\t\t\t\t//echo \"<br>\";\n\t\t\t\t\t//esta cadena nos devuelve la cantidad de filas desde la hora de inicio en el dia de inico hasta las 23:59:59\n\t\t\t\t\t$filas = new numero_filas($NuevoArrayDias[$k].\".cdr\",$this->horainicio_sn,\"23:59:59\");\n\t\t\t\t\t$fila_array = $filas->devolver_filas();\n\t\t\t\t\t\n\t\t\t\t\tfor($i=0;$i<$filas->cantidad_objetos();$i++){\n\t\t\t\t\t\n\t\t\t\t\t\t$captura[] = str_replace(\" \", \"\",$fila_array[$i]);\t\n\t\t\t\t\t}\t\t\t\n\t\t\t\t}\n\t\t\t\t//selecciona el ultimo dia\n\t\t\t\telseif($k==$dias_totales->RescatarCantidad()-1)\n\t\t\t\t{\n\t\t\t\t\t//echo $NuevoArrayDias[$k]; \n\t\t\t\t\t//echo \"<br>\";\n\t\t\t\t\t//esta cadena nos devuelve la cantidad de filas desde la hora de 00:00:01 en el dia de inico hasta las 23:59:59\n\t\t\t\t\t$filas = new numero_filas($NuevoArrayDias[$k].\".cdr\",\"00:00:01\",$this->horafin_sn);\n\t\t\t\t\t$fila_array = $filas->devolver_filas();\n\t\t\t\t\tfor($i=0;$i<$filas->cantidad_objetos();$i++){\n\t\t\t\t\t\n\t\t\t\t\t\t$captura[] = str_replace(\" \", \"\",$fila_array[$i]);\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//selecciona el resto de dias\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//echo $NuevoArrayDias[$k]; \n\t\t\t\t\t//echo \"<br>\";\n\t\t\t\t\t//esta cadena nos devuelve la cantidad de filas desde la hora de 00:00:01 en el dia de inico hasta las 23:59:59\n\t\t\t\t\t//$this->numero_filas($NuevoArrayDias[$k].\".cdr\",\"00:00:01\",$this->horafin_sn);\n\t\t\t\t\t$filas = new numero_filas($NuevoArrayDias[$k].\".cdr\",\"00:00:01\",\"23:59:59\");\n\t\t\t\t\t$fila_array = $filas->devolver_filas();\n\t\t\t\t\tfor($i=0;$i<$filas->cantidad_objetos();$i++){\n\t\t\t\t\t\n\t\t\t\t\t\t$captura[] = str_replace(\" \", \"\",$fila_array[$i]);\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->captura = $captura;\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\n\t\t}", "title": "" }, { "docid": "b363a8b821b38ac95705f3337afa0bf4", "score": "0.5642284", "text": "function subtraiDias($data,$dias) {\r\n\t$ano = substr ( $data, 0, 4 );\r\n\t$mes = substr ( $data, 4, 2 );\r\n\t$dia = substr ( $data, 6, 2 );\r\n\t$novaData = mktime ( 0, 0, 0, $mes, $dia - $dias, $ano );\r\n\treturn strftime(\"%Y%m%d\", $novaData);\r\n}", "title": "" }, { "docid": "7c9865f5252deeb4ab814271d04a3dd3", "score": "0.5622901", "text": "function hitungluassegitiga($alas, $tinggi) {\n $luas = $alas * $tinggi / 2;\n return $luas;\n}", "title": "" }, { "docid": "9e5515c9e9f630b81ef0b4c7a8e28973", "score": "0.5612607", "text": "function convertir($unidad,$cantidad){\n #de peso\n $conversiones['qq']=100;#quintal 100kg\n $conversiones['ton']=1000;\n $conversiones['g']=0.001;\n $conversiones['kg']=1;\n $conversiones['oz']=0.03;\n $conversiones['lb']=0.45;\n #de volumen\n $conversiones['ml']=0.001;\n $conversiones['lt']=1;\n $resultado=$conversiones[$unidad]*floatval($cantidad);\n return $resultado; \n}", "title": "" }, { "docid": "af394f9322afa7b0ecf243239a9a32d1", "score": "0.560997", "text": "protected function escreverTotalDeFaltas() {\n\n $this->oPdf->Cell(50, $this->iAlturaCelula, 'FALTAS / DIAS', 1, 0);\n $aPeriodos = $this->getAvaliacoes();\n $iTamanhoCelulaPeriodos = ($this->iTamanhoDisponivelPeriodo / (count($aPeriodos) * 2));\n $this->oPdf->SetFont('arial', '', 6);\n $iTamanhoColunasPeriodos = 0;\n $nTotalFaltas = 0;\n foreach ($aPeriodos as $oAvaliacao) {\n\n $iFaltas = $this->aTotalFaltas[$oAvaliacao->getCodigo()];\n $sNomePeriodo = $oAvaliacao->getPeriodoAvaliacao()->getDescricaoAbreviada();\n $this->oPdf->Cell($iTamanhoCelulaPeriodos, $this->iAlturaCelula, $sNomePeriodo, 1, 0, \"C\");\n $this->oPdf->Cell($iTamanhoCelulaPeriodos, $this->iAlturaCelula, $iFaltas, 1, 0, \"C\");\n $iTamanhoColunasPeriodos += $iTamanhoCelulaPeriodos * 2;\n $nTotalFaltas += $iFaltas;\n }\n $this->oPdf->Cell(11, $this->iAlturaCelula, '', 1);\n $this->oPdf->Cell(21, $this->iAlturaCelula, 'TOTAL DE FALTAS', 1, 0, \"L\");\n $this->oPdf->Cell(19, $this->iAlturaCelula, $nTotalFaltas, 1, 1);\n\n $aDisciplinas = $this->oMatricula->getDiarioDeClasse()->getDisciplinas();\n $oDisciplina = $aDisciplinas[0]->getRegencia();\n\n $nPercentualFrequencia = $this->oGradeAvaliacao->getDadosFrequenciaDaDiscplina($oDisciplina)->nPercentualFrequencia;\n $iDiasLetivos = $this->oMatricula->getTurma()->getCalendario()->getDiasLetivos();\n $sResultadoFinal = ResultadoFinal($this->oMatricula->getCodigo(),\n $this->oMatricula->getAluno()->getCodigoAluno(),\n $this->oMatricula->getTurma()->getCodigo(),\n $this->oMatricula->getSituacao(),\n $this->oMatricula->isConcluida() ? 'S' : 'N'\n ) ;\n $this->oPdf->Cell(50, $this->iAlturaCelula, 'DIAS LETIVOS', 'TBL', 0, \"L\");\n $this->oPdf->Cell($iTamanhoCelulaPeriodos, $this->iAlturaCelula, $iDiasLetivos, 'TBR', 0, 'R');\n $this->oPdf->Cell($iTamanhoColunasPeriodos - $iTamanhoCelulaPeriodos, $this->iAlturaCelula, \"PERCENTUAL DE PRESENÇA\", 1, 0, 'C');\n $this->oPdf->Cell(11, $this->iAlturaCelula, \"{$nPercentualFrequencia}%\", 1, 0, 'R');\n $this->oPdf->Cell(40, $this->iAlturaCelula, \"RESULTADO FINAL: {$sResultadoFinal}\", 1, 0, \"L\");\n }", "title": "" }, { "docid": "af66e6cae5d6e22588701385ff470f7f", "score": "0.56068397", "text": "function Imprimegrafica(){\n\t\n\t\t$this->Model->getProspectosUniversidad();\n\t\t\n\t\t$numrecursos = sizeof($this->Model->etapas);\n\t\t\n\t\t$content = \"\";\n\t\tif($numrecursos != 0){\n\t\t\n\t\t\tforeach($this->Model->etapas as $row){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "46e7188951fe7090bf1b59ed0db30b2a", "score": "0.55941415", "text": "function diferenca_entredatas_diascorrentes_sig($dataInicial = null, $dataFinal = null, $converteDias = true){\n global $db;\n\n //Caso nao seja informado uma datafinal pega a data atual\n if(empty($dataInicial)){\n $dataInicial = date('d/m/Y H:i:s');\n }\n if(empty($dataFinal)){\n $dataFinal = date('d/m/Y H:i:s');\n }\n //Conversoes para formato do banco de dados\n $dateTimeInicial = formata_datetime_sql_sig($dataInicial);\n $dateTimeFinal = formata_datetime_sql_sig($dataFinal);\n $dataInicial = formata_data_sql_sig($dataInicial);\n $dataFinal = formata_data_sql_sig($dataFinal);\n\n // Retirado da contagem feriados e finais de semana\n $sqlDiasUteis = sprintf(\"SELECT(\n SELECT COUNT('%s'::date+s.a) AS COUNT\n FROM GENERATE_SERIES(0,\n ( SELECT((( TO_DATE('%s','YYYY-MM-DD')) - (TO_DATE('%s','YYYY-MM-DD'))))),1) s(a)\n WHERE EXTRACT('DOW' FROM '%s'::date+s.a)\n BETWEEN 0 AND 7\n )\",$dataInicial,$dataFinal,$dataInicial,$dataInicial);\n\n $contDiasUteis = $db->pegaUm($sqlDiasUteis);\n // Conversoes de datas para segundos\n $diasEmSegundos = (($contDiasUteis * 24 * 60 * 60) - 86400);\n // Soma date mais time\n $diferencaTime = converteTimeSegundos($dateTimeFinal) - converteTimeSegundos($dateTimeInicial);\n $totalSegundos = ($diasEmSegundos + $diferencaTime);\n\n if($converteDias == false){\n // retorna segundos\n return $totalSegundos;\n }else{\n // retorna formatacao\n return converte_segundos_em_periodo($totalSegundos,'d',true);\n }\n}", "title": "" }, { "docid": "c00a390bf0b18a1f38c94bb9504709d3", "score": "0.5591672", "text": "function datasub($da,$db)\n{\n $data=explode(\"-\",$db);\n $dia1=$data[2];\n $mes1=$data[1];\n $ano1=$data[0];\n $data=explode(\"-\",$da);\n $dia2=$data[2];\n $mes2=$data[1];\n $ano2=$data[0];\n $anos=$ano2-$ano1;\n if($anos==0)\n $meses=$mes2-$mes1;\n else\n $meses=(12-$mes1)+$mes2; \n if($meses==0)\n $dias=$dia2-$dia1;\n else\n $dias=(30-$dia1)+$dia2; \n if($anos>0)\n $anos=$anos-1; \n if($meses>0)\n $meses=$meses-1; \n return ($anos*365+$meses*30+$dias);\n}", "title": "" }, { "docid": "db1e09daf18f90b934b9d3d6ddef8b47", "score": "0.558803", "text": "function dodajOcenu();", "title": "" }, { "docid": "6b99ec442518ac6fb7b29a6ef159fce8", "score": "0.5577429", "text": "public static function getTotalDetalleDiarias(){\n $ventas=Venta::find()->where(['fecha'=>date('Y-m-d')])->all();\n $sumatoria=0;\n foreach($ventas as $venta){\n foreach($venta->detalleventas as $detalle){\n $sumatoria=$sumatoria+($detalle->precioFinal); \n }\n }\n return $sumatoria;\n }", "title": "" }, { "docid": "406973ad2ee503e50398c2c7846a0330", "score": "0.5555625", "text": "public function timeInQodr() {\n $datetime1 = new \\DateTime($this->tgl_join);\n $datetime2 = new \\DateTime(date(\"Y-m-d\"));\n $interval = $datetime1->diff($datetime2);\n $diff=$interval->format('%a');\n $total_hari=$diff;\n $thn=floor($total_hari/365);\n $bln=floor(($total_hari%365)/30.5);\n $hari=floor(($total_hari%365)%30.5);\n if ($thn==0) {$thn='';}else{$thn=$thn.\"thn \";}\n if ($bln==0) {$bln='';}else{$bln=$bln.\"bln \";}\n if ($hari==0) {$hari='';}else{$hari=$hari.\"hari\";}\n $lama_belajar=3; \n $persen=floor($total_hari/(3*365)*100);\n $dataSantri = (array)$this;\n $dataSantri['berapa_lama'] = $thn.$bln.$hari.\" (dari \".$lama_belajar.\" tahun)\";\n $dataSantri['persen_lama'] = $persen;\n \n return $dataSantri;\n }", "title": "" }, { "docid": "9cbaa44cd25cea369d66a4f2cd7491cb", "score": "0.5547846", "text": "public function getDi();", "title": "" }, { "docid": "a47dccfa93fe047b37fa39e8ca3b74fe", "score": "0.55386984", "text": "function proximoDiaUtil($data){\r\n $util = false;\r\n while(diasInuteis($data, $data)){\r\n $data = addDias($data, 1);\r\n }\r\n return $data;\r\n}", "title": "" }, { "docid": "212791c6c9157348b4f68dd29152365d", "score": "0.5532939", "text": "private function calcularEntropia()\n {\n $this->entropia = array();\n $this->entropiaMsj = array();\n for ($i = 0; $i < sizeof($this->shannonFano); $i++) {\n $this->entropia[$i] = - $this->redondear(log($this->probabilidades[$i], 2), 3);\n $this->entropiaMsj[$i] = $this->redondear($this->entropia[$i] * $this->frecuencias[$i], 3);\n }\n }", "title": "" }, { "docid": "4353ab399560c25d39dfc3a9bbb09dc3", "score": "0.55280304", "text": "public function datosPesoFemenino($datosPaciente){\n $peso['titulo'] = 'Grafico de evolucion del peso - Femenino.';\n $peso['Ymin'] = 2;\n $peso['Ymax'] = 8;\n $peso['YminorTickInterval'] = 0.5;\n $peso['Xmin'] = 0;\n $peso['Xmax'] = 13;\n $peso['XminorTickInterval'] = 0.1;\n $peso['tituloY'] = 'Peso(kg)';\n $peso['tituloX'] = 'Edad(semanas)';\n $peso['series'] = array(['name' => 'SD2neg', 'data' => [ [0, 2.4], [1, 2.5], [2, 2.7], [3, 2.9], [4, 3.1], [5, 3.3], [6, 3.5], [7, 3.7], [8, 3.9], [9, 4.1], [10, 4.2], [11, 4.3], [12, 4.4], [13, 4.5] ]],['name' => 'SD1neg', 'data' => [[0, 2.8], [1, 2.9], [2, 3.1], [3, 3.3], [4, 3.5], [5, 3.8], [6, 4.0], [7, 4.2],[8, 4.4], [9, 4.5], [10, 4.7], [11, 4.8], [12, 5.0], [13, 5.1] ]],['name' => 'SD0', 'data' => [ [0, 3.2], [1, 3.3], [2, 3.6], [3, 3.8], [4, 4.1], [5, 4.3], [6, 4.6], [7, 4.8],[8, 5.0], [9, 5.2], [10, 5.4], [11, 5.5], [12, 5.7], [13, 5.8] ]],['name' => 'SD1', 'data' => [\t[0, 3.7], [1, 3.9], [2, 4.1], [3, 4.4], [4, 4.7], [5, 5.0], [6, 5.2], [7, 5.5], [8, 5.7], [9, 5.9], [10, 6.1], [11, 6.3], [12, 6.5], [13, 6.6] ]],['name' => 'SD2', 'data' => [\t[0, 4.2], [1, 4.4], [2, 4.7], [3, 5.0], [4, 5.4], [5, 5.7], [6, 6.0], [7, 6.2], [8, 6.5], [9, 6.7], [10, 6.9], [11, 7.1], [12, 7.3], [13, 7.5] ]]);\n array_push($peso['series'],$datosPaciente);\n return json_encode($peso);\n }", "title": "" }, { "docid": "8594bdcd40f72fbc7f359155cc1ec172", "score": "0.55226237", "text": "public function extrato($dias);", "title": "" }, { "docid": "e3a04978aec3cbe87b5186d9ac6f1111", "score": "0.5514475", "text": "function demi_perimetre($longueur,$largeur){\n return $longueur+$largeur;\n}", "title": "" }, { "docid": "3fb8d3d2b300b4146b39db4705307dce", "score": "0.5494072", "text": "function yNormalizado($i) {\r\n return yMedidos($i) / yMax();\r\n}", "title": "" }, { "docid": "03015f3dd9928dc6dee8eabcd6d7e52d", "score": "0.54899186", "text": "function getTerbilang($angka,$debug){\n\t $angka = str_replace(\".\",\",\",'75.900.500');\n\t // $angka = str_replace(\".\",\",\",$angka);\n\t list ($angka, $desimal) = explode(\",\",$angka);\n\t $panjang=strlen($angka);\n\t for ($b=0;$b<$panjang;$b++){\n\t $myindex=$panjang-$b-1;\n\t $a_bil[$b]=substr($angka,$myindex,1);\n\t }\n\t if ($panjang>9){\n\t $bil=$a_bil[9];\n\t if ($panjang>10){\n\t $bil=$a_bil[10].$bil;\n\t }\n\t\t // var_dump($bil);exit();\n\n\t if ($panjang>11){\n\t $bil=$a_bil[11].$bil;\n\t }\n\t if ($bil!=\"\" && $bil!=\"000\"){\n\t $terbilang .= rp_satuan($bil,$debug).\" milyar\";\n\t }\n\t }\n\n\t if ($panjang>6){\n\t $bil=$a_bil[6];\n\t if ($panjang>7){\n\t $bil=$a_bil[7].$bil;\n\t }\n\n\t if ($panjang>8){\n\t $bil=$a_bil[8].$bil;\n\t }\n\t if ($bil!=\"\" && $bil!=\"000\"){\n\t $terbilang .= rp_satuan($bil,$debug).\" juta\";\n\t }\n\t }\n\t \n\t if ($panjang>3){\n\t $bil=$a_bil[3];\n\t if ($panjang>4){\n\t $bil=$a_bil[4].$bil;\n\t }\n\n\t if ($panjang>5){\n\t $bil=$a_bil[5].$bil;\n\t }\n\t if ($bil!=\"\" && $bil!=\"000\"){\n\t $terbilang .= rp_satuan($bil,$debug).\" ribu\";\n\t }\n\t }\n\n\t $bil=$a_bil[0];\n\t if ($panjang>1){\n\t $bil=$a_bil[1].$bil;\n\t }\n\n\t if ($panjang>2){\n\t $bil=$a_bil[2].$bil;\n\t }\n\t //die($bil);\n\t if ($bil!=\"\" && $bil!=\"000\"){\n\t $terbilang .= rp_satuan($bil,$debug);\n\t }\n\t return trim($terbilang);\n\t}", "title": "" }, { "docid": "0bde08258c45e293f40473f8179c86b2", "score": "0.54889566", "text": "function climatizador(){\n\t\t\t$this->precio_base+=2000;\n\n\t\t}", "title": "" }, { "docid": "d10672ab126bba24a32820d24821b0e7", "score": "0.5482603", "text": "function getRango($distancia,$len,$indice) {\n\t\treturn ($distancia/100)*getIndiceFixed($len,$indice);\n\t}", "title": "" }, { "docid": "3402f81890e4bb5e32b3186eb1c1222f", "score": "0.5481413", "text": "public function intercettate(){\n\t\t \n\t\t$data_attuale=Voce::where('Bozza','=',0)->orderBy('Data','desc')->take(1)->pluck('Data');\n\t\t$data_attuale= new Datetime($data_attuale);\n\t\t$mese_attuale=strftime(\"%b\",$data_attuale->sub(new DateInterval('P1M'))->gettimestamp());\n\t\t$anno_attuale=strftime(\"%Y\",$data_attuale->gettimestamp());\n\n\t\t$missive=Missiva::where('intercettato','=','1')->orderBy('id','desc')->get();\n\n\t\t$selMissiva=array(''=>'');\n\t\t$coinvolto=array();\n\t\tforeach ($missive as $key=>$missiva){\n\t\t\t$data= new Datetime($missiva['data']);\n\t\t\t//in_array($missiva['id'],array(9364,9458,9488,9542,9633)) |\n\t\t\tif ( (strcmp($mese_attuale,strftime(\"%b\",$data->gettimestamp()))==0 & strcmp($anno_attuale,strftime(\"%Y\",$data->gettimestamp()))==0)){\n\t\t\t\t$missiva['data']=strftime(\"%d %b %Y\",$data->gettimestamp());\n\t\t\t\t$selMissiva[$missiva['id']]=$key+1;\n\t\t\t\tif ($missiva['tipo_mittente']=='PG') {\n\t\t\t\t\t$coinvolto[$missiva['id']]=intval($missiva['mittente']);\n\t\t\t\t} else{\n\t\t\t\t\t$coinvolto[$missiva['id']]=intval($missiva['destinatario']);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tunset($missive[$key]);\n\t\t\t}\n\t\t}\n\t\t\t\n\t\t$infiltrato=Abilita::where('Ability','=','Infiltrato')->get(['ID']);\n\t\t$abilita = Abilita::find($infiltrato[0]['ID']);\n\t\t$PG=$abilita->PG()->whereRaw('`Morto` = 0 AND `InLimbo` = 0')->get(['PG.ID','Nome','NomeGiocatore']);\n\t\t$elenco=array_keys($selMissiva);\n\t\tunset($elenco[0]);\n\t\tif ($elenco) {\n\t\tforeach( $PG as $pers) {\n\t\t\t$index=array_rand($elenco);\n\t\t\t$quale=$elenco[$index];\n\t\t\t// se la missiva coinvolge il PG, ritira.\n\t\t\tif ($coinvolto[$quale]==$pers['ID'] & sizeof($elenco)==1){\n\t\t\t\t$quale='';\n\t\t\t\t} else {\n\t\t\t\twhile ($coinvolto[$quale]==$pers['ID']){\n\t\t\t\t\t\t$index=array_rand($elenco);\n\t\t\t\t\t\t$quale=$elenco[$index];\n\t\t\t\t\t}\n\t\t\t\t$pers['missiva']=$quale;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t//non ci sono missive intercettate, elenco vuoto\n\t\tforeach( $PG as $pers) {\n\t\t\t$pers['missiva']='';\n\t\t\t}\n\t\t}\n\n\t\treturn View::make('missiva.intercettate')\n\t\t\t\t\t->with('missive',$missive)\n\t\t\t\t\t->with('selMissiva',$selMissiva)\n\t\t\t\t\t->with('PG',$PG);\n\t\t \n\t\t \n\t }", "title": "" }, { "docid": "5035be048bfeecb69bb5aa2291eb37a3", "score": "0.54800564", "text": "public function get_rendimiento_general(){\n $tareas = $this->tareas_desarrolladas();\n $suma = 0;\n foreach ($tareas as $item) {\n $suma += $item->calificacion();\n }\n\n if (sizeof($tareas) != 0) {\n $suma = $suma/sizeof($tareas);\n return $suma;\n } else {\n return \"No ha realizado tareas\";\n }\n }", "title": "" }, { "docid": "5413cf1b7d3e45202533a534795027b6", "score": "0.5475892", "text": "function addNavegador(){\n $this->precio_base+=3000;\n }", "title": "" }, { "docid": "328ed9c4f7d266bc3989fc492c118cf6", "score": "0.54754", "text": "function getLunesMes() {\r\n\t$periodo = date(\"d-m-Y\");\r\n\t$primer_dia_semana = getDiaSemana($periodo);\r\n\t$dias_mes = getDiasMes($a, $m);\r\n\tif ($primer_dia_semana == 0 && ($dias_mes == 29 || $dias_mes == 30 || $dias_mes == 31)) $lunes = 5;\r\n\telseif ($primer_dia_semana == 5 && $dias_mes == 31) $lunes = 5;\r\n\telseif ($primer_dia_semana == 6 && ($dias_mes == 30 || $dias_mes == 31)) $lunes = 5;\r\n\telse $lunes = 4;\r\n\treturn $lunes;\r\n}", "title": "" }, { "docid": "368ef8899a942091acae264faab6bcee", "score": "0.54735374", "text": "public function annihilate();", "title": "" }, { "docid": "b569d9a441d0729bbbe56d6b450a612a", "score": "0.5469482", "text": "function horasMembros(){\n\n $hora_entrada = explode(\":\",$dados['HORA_ENTRADA']);\n $hora_saida = explode(\":\",$hora_saida);\n\n $acumulador1 = ($hora_entrada[0] * 3600) + ($hora_entrada[1] * 60) + $hora_entrada[2];\n $acumulador2 = ($hora_saida[0] * 3600) + ($hora_saida[1] * 60) + $hora_saida[2];\n $resultado = $acumulador2 - $acumulador1;\n\n $hora_ponto = floor($resultado / 3600);\n $resultado = $resultado - ($hora_ponto * 3600);\n $min_ponto = floor($resultado / 60);\n $resultado = $resultado - ($min_ponto * 60);\n $secs_ponto = $resultado;\n\n //Grava na variável resultado final\n $uniao = array ($hora_ponto,$min_ponto,$secs_ponto);\n $horas_total = implode(\":\",$uniao);\n // echo $total_horas;\n\n //Isola os dados dentro do Array em variáveis sepradas.\n\n // $hora_in = (int) $separador_entrada['0'];\n // $minuto_in = (int) $separador_entrada['1'];\n // $segundo_in = (int) $separador_entrada['2'];\n\n // //Isola os dados dentro do Array em variáveis sepradas.\n\n // $hora_out = (int) $separador_saida['0'];\n // $minuto_out = (int) $separador_saida['1'];\n // $segundo_out = (int) $separador_saida['2'];\n\n // //Subtrai a diferenca das horas, minutos e segundos.\n\n // $hora_total = abs($hora_out - $hora_in);\n // $minuto_total = abs($minuto_out - $minuto_in);\n // $segundo_total = abs($segundo_out - $segundo_in);\n\n // //Uni as variáveis em um Array e converte o Array em um String\n\n // $uniao = array ($hora_total, $minuto_total, $segundo_total);\n // $horas_total = implode(\":\", $uniao);\n\n }", "title": "" }, { "docid": "a9b97ee9496bec1d94800bb7c52699bf", "score": "0.54666966", "text": "function descartar_aulas ($aulas, $aulas_ocupadas){\n $n=count($aulas);\n $m=count($aulas_ocupadas);\n if($n != $m){ //si la longitud de ambos arreglos es distinta debemos descartar al menos 1 aula de $aulas\n $i=0;\n \n //recorro el arreglo aulas \n while ($i < $n){\n $fin=FALSE;\n $j=0;\n //recorro el arreglo aulas_ocupadas\n while (($j < $m) && !$fin){\n \n if(strcmp($aulas[$i]['id_aula'], $aulas_ocupadas[$j]['id_aula'])==0){\n $aulas[$i]=null;\n $fin=TRUE;\n }\n \n $j += 1;\n }\n \n $i += 1;\n }\n }\n else{\n $aulas=array();\n }\n }", "title": "" }, { "docid": "11639b90ca9d53931e9de833f5dc32bc", "score": "0.54564637", "text": "public function get_subtotales()\r{\r//PARAMETRO DE ENVÍO: id_clave_ingreso,cantidad\r//PARAMETRO DE RETORNO: arreglo con el total cálculado de esa clave de ingreso , cantidad, y monto divido por el monto a cobrar y su ajuste tarifario\r$resultado=$this->motorpago->get_total_clave_ingreso('152','3');\rvar_dump($resultado);\r}", "title": "" }, { "docid": "435967764f26bde68b333cf500c3808a", "score": "0.5456099", "text": "function calcDrikBala($pl1, $pl2, $pl3, $pl4, $pl5, $pl6, $pl7, $pl8, $pl9, $planet)\r\n{\r\n \r\n$dkp[1] = $pl1;\r\n$dkp[2] = $pl2;\r\n$dkp[3] = $pl3;\r\n$dkp[4] = $pl4;\r\n$dkp[5] = $pl5;\r\n$dkp[6] = $pl6;\r\n$dkp[7] = $pl7;\r\n$dkp[8] = $pl8;\r\n$dkp[9] = $pl9;\r\n\r\nIf ($planet == \"Sun\")\r\n{\r\n $asp_planet = $dkp[1];\r\n $k = 1;\r\n}\r\nelseif ($planet == \"Moon\")\r\n{\r\n $asp_planet = $dkp[2];\r\n $k = 2;\r\n}\r\nelseif ($planet == \"Mar\")\r\n{\r\n $asp_planet = $dkp[3];\r\n $k = 3;\r\n}\r\nelseif ($planet == \"Mer\")\r\n{\r\n $asp_planet = $dkp[4];\r\n $k = 4;\r\n}\r\nelseif ($planet == \"Jup\")\r\n{\r\n $asp_planet = $dkp[5];\r\n $k = 5;\r\n}\r\nelseif ($planet == \"Ven\")\r\n{\r\n $asp_planet = $dkp[6];\r\n $k = 6;\r\n}\r\nelseif ($planet == \"Sat\")\r\n{\r\n $asp_planet = $dkp[7];\r\n $k = 7;\r\n}\r\n\r\n\r\nfor ($i=1; $i<=7; $i++)\r\n{\r\n echo \"This is Planet : \" . $dkp[$i] . \"<br>\";\r\n\r\n If ($dkp[$i] < $asp_planet)\r\n {\r\n $dk[$i] = $asp_planet - $dkp[$i];\r\n //$dirshti[$i] = findDrishtiValue($dk[$i]);\r\n }\r\n elseif ($dkp[$i] > $asp_planet)\r\n {\r\n $dk[$i] = 360 + $asp_planet - $dkp[$i];\r\n //$dirshti[$i] = findDrishtiValue($dk[$i]);\r\n }\r\n else\r\n {\r\n $dk[$i] = 0;\r\n //$drishti[$i] = 0;\r\n } \r\n\r\n}// For ends\r\n\r\nfor ($j=1; $j<=7; $j++)\r\n{\r\n \r\n $drishti[$j] = findDrishtiValue($dk[$j]);\r\n\r\n If ($j == 1 or $j == 3 or $j == 4 or $j == 7)\r\n {\r\n $drishti[$j] = $drishti[$j] * -1;\r\n }\r\n else\r\n {\r\n $drishti[$j] = $drishti[$j] * 1;\r\n }\r\n //$drishti_tot[$j] = $drishti_tot[$j] + $drishti[$j];\r\n}\r\n\r\n\r\n\r\n//return array($dk[1], $dk[2], $dk[3], $dk[4], $dk[5], $dk[6], $dk[7], $drishti[1], $drishti[2], $drishti[3], $drishti[4], $drishti[5], $drishti[6], $drishti[7]);\r\n\r\nreturn array($drishti[1], $drishti[2], $drishti[3], $drishti[4], $drishti[5], $drishti[6], $drishti[7]);\r\n\r\n\r\n}", "title": "" }, { "docid": "917fd483fca060c4f114300217af0a24", "score": "0.5452711", "text": "function notaMedia($alumnos){\n $nota = 0;\n $cont = 0;\n foreach($alumnos as $alumno){\n $nota += $alumno[\"nota\"];\n $cont++;\n }\n $nota = ($nota/$cont);\n echo \"<h1 class='display-1'> La nota media del curso es $nota</h1>\";\n}", "title": "" }, { "docid": "05d70a79fd160cee3bf79d93886519a9", "score": "0.54503244", "text": "public function datosPercentiloFemenino($datosPaciente){\n $percentilo['titulo'] = 'Gráfico de la evolución del PPC mujeres hasta 13 semanas.';\n $percentilo['YminorTickInterval'] = 0.1;\n $percentilo['XminorTickInterval'] = 0.5;\n $percentilo['tituloY'] = 'Circunferencia cefálica (En cm.)';\n $percentilo['tituloX'] = 'Edad(semanas)';\n $percentilo['series'] = array(['name' => 'P3', 'data' => [ [0, 31.7], [1, 32.4], [2, 33.1], [3, 33.7], [4, 34.2], [5, 34.6], [6, 35], [7, 35.4], [8, 35.7], [9, 36.1], [10, 36.4], [11, 36.7], [12, 36.9], [13, 37.2] ]],['name' => 'P15', 'data' => [ [0, 32.7], [1, 33.3], [2, 34], [3, 34.6], [4, 35.2], [5, 35.6], [6, 36], [7, 36.4],[8, 36.8], [9, 37.1], [10, 37.4], [11, 37.7], [12, 38], [13, 38.2] ]],['name' => 'P50', 'data' => [ [0, 33.9], [1, 34.6], [2, 35.2], [3, 35.8], [4, 36.4], [5, 36.8], [6, 37.3], [7, 37.7],[8, 38], [9, 38.4], [10, 38.7], [11, 39], [12, 39.3], [13, 39.5] ]],['name' => 'P85', 'data' => [ [0, 35.1], [1, 35.8], [2, 36.4], [3, 37], [4, 37.6], [5, 38.1], [6, 38.5], [7, 38.9],[8, 39.3], [9, 39.6], [10, 39.9], [11, 40.2], [12, 40.5], [13, 40.8] ]],['name' => 'P97', 'data' => [ [0, 36.1], [1, 36.7], [2, 37.4], [3, 38], [4, 38.6], [5, 39.1], [6, 39.5], [7, 39.9],[8, 40.3], [9, 40.6], [10, 41], [11, 41.3], [12, 41.6], [13, 41.9] ]]);\n array_push($percentilo['series'],$datosPaciente);\n return json_encode($percentilo);\n }", "title": "" }, { "docid": "89fadf0fda64e815ca66191114dafe20", "score": "0.5443399", "text": "public function HoltWinters($datos,$p=4,$l=12){\n if(count($datos)<$l)\n $l=count($datos); //validacion para que la longitud no sea mas grande que la muestra\n $alfa=0.1;\n $beta=0.2;\n $gamma=0.7;\n for ($i=0; $i <($l-1) ; $i++) { \n array_unshift($datos, -99999);\n }\n $At=array(); //Valor Atenuado del periodo t\n $Tt=array(); //Estimación de la tendencia del periodo t\n $St=array(); //Estimación de la estabilidad del periodo t\n $Ytp=array(); //pronostico del periodo t\n $resultados=array(); //solo los pronosticos de p\n\n //Inicializo $St\n for ($i=0; $i <($l-1) ; $i++) { \n array_push($St, 1);\n array_push($At, -99999);\n array_push($Tt, -99999);\n array_push($Ytp, -99999);\n }\n array_push($Ytp, -99999);\n array_push($At, $datos[$l-1]);\n array_push($Tt, 0);\n array_push($St, 1);\n\n\n for($i=$l;$i<(2*$l-1);$i++){\n $ValorAtenuadot=$alfa*($datos[$i]/$St[$i-$l])+(1-$alfa)*($At[$i-1]+$Tt[$i-1]);\n array_push($At, $ValorAtenuadot);\n $EstimacionTendencia=$beta*($At[$i]-$At[$i-1])+(1-$beta)*$Tt[$i-1];\n array_push($Tt, $EstimacionTendencia);\n }\n for($i=$l;$i<(2*$l-1);$i++){\n $EstimacionEstabilidad=$gamma*($datos[$i]/$At[$i])+(1-$gamma)*$St[$i-$l];\n array_push($St, $EstimacionEstabilidad);\n }\n\n for($i=(2*$l-2);$i<(count($datos)-1);$i++){\n $EstimacionEstabilidad=$gamma*($datos[$i]/$At[$i])+(1-$gamma)*$St[$i-$l];\n array_push($St, $EstimacionEstabilidad);\n $ValorAtenuadot=$alfa*($datos[$i]/$St[$i-$l])+(1-$alfa)*($At[$i-1]+$Tt[$i-1]);\n array_push($At, $ValorAtenuadot);\n $EstimacionTendencia=$beta*($At[$i]-$At[$i-1])+(1-$beta)*$Tt[$i-1];\n array_push($Tt, $EstimacionTendencia);\n }\n\n for($i=$l;$i<(count($datos)+1);$i++){\n $Pronostico=($At[$i-1]+1*$Tt[$i-1])*$St[$i-1-$l+1];\n array_push($Ytp, $Pronostico);\n }\n array_push($resultados, round($Ytp[(count($Ytp)-1)]));\n $contP=2;\n for ($i=(count($datos)+1); $i < (count($datos)+$p); $i++) { \n $Pronostico=($At[(count($At)-1)]+$contP*$Tt[(count($Tt)-1)])*$St[(count($datos)+1)-2-$l+$contP];\n $contP++;\n array_push($resultados, round($Pronostico));\n }\n return $resultados;\n }", "title": "" }, { "docid": "90343c13dd6cf618feb61db14e0b1db1", "score": "0.5440453", "text": "public function ZeroChart(){\n $total=Planet::count();\n $planets=Arrays::planetTypeArray();\n for($i=0; $i<count($planets); $i++){\n $totalType=Planet::where('planet', $i)->count();\n $result[$planets[$i]]=$totalType/$total*100;\n }\n return $result;\n\n }", "title": "" }, { "docid": "b664822189fbbdcf2babf6fd5a9c1de4", "score": "0.54403996", "text": "public function calcPontos($dados){\n $dist_pontos_real = 0;\n $dist_pontos_aux = 0;\n $dist_base = 0;\n $dist_base_coleta = 0;\n $dist_entrega_base = 0;\n $total_km = 0;\n $total_pagar = 0;\n $base = '';\n $trajetos = array();\n $total_tempo = 0;\n $valor_adicional = 0;\n\n foreach ($dados['trajetos'] as $key => $value) {\n array_push($trajetos, $value['origem']);\n }\n\n /*Calcula distância entre os pontos do trajeto*/\n for ($i = 0; $i < count($trajetos) - 1; $i++) {\n $aux = $this->consultaGoogle($trajetos[$i], $trajetos[$i + 1]);\n\n /*verifica se é inferior a 12 km caso sim arredonda para 12km quilometragem minima para cada ponto*/\n if($aux['distance']['value'] < 12){\n $dist_pontos_aux += 12;\n }else{\n $dist_pontos_aux += $aux['distance']['value'];\n }\n\n $dist_pontos_real += $aux['distance']['value'];\n $total_tempo += $aux['duration']['value'];\n }\n\n /*calculando distrancias entre base e pontos iniciais e finais*/\n $base_barra_pontoinicial = $this->consultaGoogle('Av. das Américas, 2300 - Barra da Tijuca, Rio de Janeiro - RJ, 22640-101, Brasil', $trajetos[0]);\n $base_barra_pontofinal = $this->consultaGoogle('Av. das Américas, 2300 - Barra da Tijuca, Rio de Janeiro - RJ, 22640-101, Brasil', $trajetos[count($trajetos) - 1]);\n\n $base_saocristovao_pontoinicial = $this->consultaGoogle('R. do Bonfim, 363 - São Cristóvão, Rio de Janeiro - RJ, 20930-450, Brasil', $trajetos[0]);\n $base_saocristovao_pontofinal = $this->consultaGoogle('R. do Bonfim, 363 - São Cristóvão, Rio de Janeiro - RJ, 20930-450, Brasil', $trajetos[count($trajetos) - 1]);\n\n if ($base_saocristovao_pontoinicial['distance']['value'] > 20.000) {\n $base = 'Barra';\n $dist_base_coleta = $base_barra_pontoinicial['distance']['value'];\n $dist_entrega_base = $base_barra_pontofinal['distance']['value'];\n $total_tempo += $base_barra_pontoinicial['duration']['value'];\n if($dist_base_coleta < 12){\n $dist_base += 12;\n }else{\n $dist_base += $dist_base_coleta;\n }\n if($dist_entrega_base < 12){\n $dist_base += 12;\n }else{\n $dist_base += $dist_entrega_base;\n }\n } else {\n if ($base_barra_pontoinicial['distance']['value'] < $base_saocristovao_pontoinicial['distance']['value']) {\n $base = 'Barra';\n $dist_base_coleta = $base_barra_pontoinicial['distance']['value'];\n $dist_entrega_base = $base_barra_pontofinal['distance']['value'];\n $total_tempo += $base_barra_pontoinicial['duration']['value'];\n if($dist_base_coleta < 12){\n $dist_base += 12;\n }else{\n $dist_base += $dist_base_coleta;\n }\n if($dist_entrega_base < 12){\n $dist_base += 12;\n }else{\n $dist_base += $dist_entrega_base;\n }\n } else {\n $base = 'São Cristovão';\n $dist_base_coleta = $base_saocristovao_pontoinicial['distance']['value'];\n $dist_entrega_base = $base_saocristovao_pontofinal['distance']['value'];\n $total_tempo += $base_saocristovao_pontoinicial['duration']['value'];\n if($dist_base_coleta < 12){\n $dist_base += 12;\n }else{\n $dist_base += $dist_base_coleta;\n }\n if($dist_entrega_base < 12){\n $dist_base += 12;\n }else{\n $dist_base += $dist_entrega_base;\n }\n }\n }\n\n $total_km = $dist_pontos_aux + $dist_base;\n\n /*calculando valor da km moto*/\n if($dados['transporte'] == 'moto') {\n\n $stmt = $this->conn->prepare(\"SELECT valor_km, valor_ponto_extra FROM tarifa WHERE tipo_transporte = :tipo_transporte AND perimetro_inicial = :perimetro_inicial AND perimetro_final = :perimetro_final LIMIT 1\");\n $tipo_transporte = 'moto';\n $tarifa = '';\n $perimetro_inicial = 0;\n $perimetro_final = 0;\n\n if ($total_km <= 120.000) {\n $perimetro_inicial = 0;\n $perimetro_final = 120000;\n $stmt->bindParam(':tipo_transporte',$tipo_transporte);\n $stmt->bindParam(':perimetro_inicial',$perimetro_inicial);\n $stmt->bindParam(':perimetro_final',$perimetro_final);\n $stmt->execute();\n $tarifa = $stmt->fetch();\n $total_pagar = $total_km * $tarifa['valor_km'];\n } else if ($total_km > 120.000 and $total_km <= 200.000) {\n $perimetro_inicial = 120000;\n $perimetro_final = 200000;\n $stmt->bindParam(':tipo_transporte',$tipo_transporte);\n $stmt->bindParam(':perimetro_inicial',$perimetro_inicial);\n $stmt->bindParam(':perimetro_final',$perimetro_final);\n $stmt->execute();\n $tarifa = $stmt->fetch();\n $total_pagar = $total_km * $tarifa['valor_km'];\n } else if ($total_km > 200.000) {\n $perimetro_inicial = 200000;\n $perimetro_final = 0;\n $stmt->bindParam(':tipo_transporte',$tipo_transporte);\n $stmt->bindParam(':perimetro_inicial',$perimetro_inicial);\n $stmt->bindParam(':perimetro_final',$perimetro_final);\n $stmt->execute();\n $tarifa = $stmt->fetch();\n $total_pagar = $total_km * $tarifa['valor_km'];\n }\n\n /*calculando taxa para pontos adicionais*/\n if (count($trajetos) > 2) {\n $pontos_extra = count($trajetos) - 2;\n $valor_adicional = $pontos_extra * $tarifa['valor_ponto_extra'];\n $total_pagar += $valor_adicional;\n }\n\n /*adicionando duas casas decimais*/\n $total_pagar = number_format($total_pagar, 2, '.', ',');\n\n if ($total_pagar < 30.00) {\n $total_pagar = 30.00;\n }\n\n }else{\n $stmt = $this->conn->prepare(\"SELECT valor_km, valor_ponto_extra FROM tarifa WHERE tipo_transporte = :tipo_transporte AND perimetro_inicial = :perimetro_inicial AND perimetro_final = :perimetro_final LIMIT 1\");\n $tipo_transporte = 'carro';\n $tarifa = '';\n $perimetro_inicial = 0;\n $perimetro_final = 0;\n\n if ($total_km <= 120.000) {\n $perimetro_inicial = 0;\n $perimetro_final = 120000;\n $stmt->bindParam(':tipo_transporte',$tipo_transporte);\n $stmt->bindParam(':perimetro_inicial',$perimetro_inicial);\n $stmt->bindParam(':perimetro_final',$perimetro_final);\n $stmt->execute();\n $tarifa = $stmt->fetch();\n $total_pagar = $total_km * $tarifa['valor_km'];\n } else if ($total_km > 120.000 and $total_km <= 200.000) {\n $perimetro_inicial = 120000;\n $perimetro_final = 200000;\n $stmt->bindParam(':tipo_transporte',$tipo_transporte);\n $stmt->bindParam(':perimetro_inicial',$perimetro_inicial);\n $stmt->bindParam(':perimetro_final',$perimetro_final);\n $stmt->execute();\n $tarifa = $stmt->fetch();\n $total_pagar = $total_km * $tarifa['valor_km'];\n } else if ($total_km > 200.000) {\n $perimetro_inicial = 200000;\n $perimetro_final = 0;\n $stmt->bindParam(':tipo_transporte',$tipo_transporte);\n $stmt->bindParam(':perimetro_inicial',$perimetro_inicial);\n $stmt->bindParam(':perimetro_final',$perimetro_final);\n $stmt->execute();\n $tarifa = $stmt->fetch();\n $total_pagar = $total_km * $tarifa['valor_km'];\n }\n\n /*calculando taxa para pontos adicionais*/\n if (count($trajetos) > 2) {\n $pontos_extra = count($trajetos) - 2;\n $valor_adicional = $pontos_extra * $tarifa['valor_ponto_extra'];\n $total_pagar += $valor_adicional;\n }\n\n /*adicionando duas casas decimais*/\n $total_pagar = number_format($total_pagar, 2, '.', ',');\n\n if ($total_pagar < 90.00) {\n $total_pagar = 90.00;\n }\n }\n\n /*motando o array de resposta com os dados*/\n $distancia_total = str_replace(\".\", \",\", $total_km);\n $distancia_base = str_replace(\".\", \",\", $dist_base);\n $distancia_pontos = str_replace(\".\", \",\", $dist_pontos_real);\n\n\n //calculando tempo total\n $minutos = ceil($total_tempo/60);\n $tempo = floor($minutos/60).':'.$minutos%60;\n\n\n\n $return = array(\n 'base' => $base,\n 'distancias' => '<b>Tipo de Veículo: </b>' . $tipo_transporte .'<br><b>Total:</b> '. $distancia_total . ' km<br><b>Base:</b> '. $base. '<br><b>Base -> Coleta:</b> '. $dist_base_coleta . ' km<br><b>Coleta -> Entrega:</b> '. $dist_pontos_real .' km<br><b>Entrega -> Base:</b> '. $dist_entrega_base .' km',\n 'tempo' => $tempo,\n 'distancia_total' => $distancia_total,\n 'total_distancia' => $distancia_pontos,\n 'valor_total' => 'R$ ' . number_format(floor($total_pagar), 2, ',', '.')\n );\n\n echo json_encode($return);\n\n //return $total_pagar . 'base barra:' . $base_barra . 'base saocristovao:' . $base_saocristovao . ' distancia ponto:' . $dist_pontos . ' distancia_base:'. $dist_base . ' distancia_total:' . $total_km;\n\n }", "title": "" }, { "docid": "c771cf3e39ac4a055f381b9f7f615d42", "score": "0.5437654", "text": "public function attributPaladin(){\n $this->pdv *= 3;\n $this->force *= 1.5 ;\n $this->agile *= 0.5;\n $this->vitesse *= 0.8;\n }", "title": "" }, { "docid": "b2de6bbc2ffe772b819138c62c815f88", "score": "0.5437219", "text": "private function setItems() {\n $salida = 0;\n\n foreach ($this->cesta as $value) {\n $salida = $salida + $value['cantidad'];\n }\n\n return $salida;\n }", "title": "" }, { "docid": "102de2f854c4e4f63403ec841e6eac88", "score": "0.5430672", "text": "static function get_horas_dia()\r\n\t{\r\n\t\tfor($a=0;$a<24;$a++){\r\n\t\t\t$horas[$a]['id'] = $a+1;\t\r\n\t\t\t$horas[$a]['desc'] = str_pad($a+1,2,0,STR_PAD_LEFT);\t\r\n\t\t}\r\n\t\treturn $horas;\r\n\t}", "title": "" }, { "docid": "f2d4a45775c78d35c5b23f1646d833bd", "score": "0.54278743", "text": "public function grafikAsalSurat() {\r\n \r\n $sql = \"SELECT asal_surat \r\n FROM suratmasuk \";\r\n $data = $this->select($sql);\r\n $arraydata = array();\r\n foreach ($data as $value) {\r\n if(key_exists($value['asal_surat'], $arraydata)){\r\n $arraydata[$value['asal_surat']][1]++;\r\n }else{\r\n $arraydata[$value['asal_surat']] = array($value['asal_surat'],1);\r\n }\r\n }\r\n return $arraydata;\r\n }", "title": "" }, { "docid": "c09d0ef6b81b3d08d29e6d7f57b8ef50", "score": "0.54267555", "text": "public function geraGraficoDia($idSensor){\n $dia = date(\"d\");\n $mes = date(\"m\");\n $ano = date(\"Y\");\n $dados = array();\n $r = rand(0, 255);\n $g = rand(0, 255);\n $b = rand(0, 255);\n \n //faz a busca pelos dados do sensor\n $sql = $this->select(\"info_sensor\", \"DISTINCT horas\", \"id_sensor = '$idSensor' AND dia = '$dia' AND mes = '$mes' AND ano = '$ano'\", \"horas ASC\");\n if(mysqli_num_rows($sql) > 0){\n \n while($row = mysqli_fetch_array($sql)){\n \n //busca o consumo na hora\n $sqll = $this->select(\"info_sensor\", \"*\", \"id_sensor = '$idSensor' AND dia = '$dia' AND mes = '$mes' AND ano = '$ano' AND horas = '\".$row['horas'].\"'\");\n $totalConsumo = 0;\n while($rowHoras = mysqli_fetch_array($sqll)){\n $totalConsumo += $rowHoras['valor']; \n }\n \n //valores de cada dia\n $dados['labels'][] = $row['horas'];\n $dados['datasets'][0]['data'][] = $totalConsumo;\n }\n }else{\n return;\n }\n return $dados;\n }", "title": "" }, { "docid": "d0fc535213d23b68c4f8e62624c89ca5", "score": "0.5426484", "text": "function OAI_ArmarDias($idperaca, $objDB){\r\n\t//marcamos lo anterior a num dia -2.\r\n\t//verificamos fecha inicial y final\r\n\t//buscamos el dia inicial.\r\n\t//eliminamos TODOS los dias ... SEGUN VERIFICACION.\r\n\t//montamos los dias que falten.\r\n\t//calculamos el numdia.\r\n\t//----\r\n\t$sError='';\r\n\t//verificamos fecha inicial y final\r\n\t$sSQL='SELECT ofer14fechaini60, ofer14fechafinhabilitacion FROM ofer14per_acaparams WHERE ofer14idper_aca='.$idperaca;\r\n\t$tabla=$objDB->ejecutasql($sSQL);\r\n\tif ($objDB->nf($tabla)==0){\r\n\t\t$sError='No se han definido las fechas del periodo';\r\n\t\t}else{\r\n\t\t$fila=$objDB->sf($tabla);\r\n\t\t$sfechaini=$fila['ofer14fechaini60'];\r\n\t\t$sfechafin=$fila['ofer14fechafinhabilitacion'];\r\n\t\tif (!fecha_esvalida($sfechaini)){\r\n\t\t\t$sError='Fecha Inicial Errada {'.$sfechaini.'}';\r\n\t\t\t}\r\n\t\tif (!fecha_esvalida($sfechafin)){\r\n\t\t\t$sError='Fecha Final Errada {'.$sfechafin.'}';\r\n\t\t\t}\r\n\t\t}\r\n\tif ($sError==''){\r\n\t\t$binserta=true;\r\n\t\t$belimina=false;\r\n\t\t//buscamos el dia inicial.\r\n\t\t//la estrategia va a ser ver si tenemos que insertar o si tenemos que eliminar... vemos que el dia inicial y final existan.\r\n\t\t$sSQL='SELECT ofer19orden FROM ofer19diasperaca WHERE ofer19fecha=\"'.$sfechaini.'\" AND ofer19per_aca='.$idperaca;\r\n\t\t$tabla=$objDB->ejecutasql($sSQL);\r\n\t\tif ($objDB->nf($tabla)>0){\r\n\t\t\t//se encontro el dia, verificar que sea el primero\r\n\t\t\t$fila=$objDB->sf($tabla);\r\n\t\t\tif ($fila['ofer19orden']!=1){\r\n\t\t\t\t$belimina=true;\r\n\t\t\t\t}else{\r\n\t\t\t\t//revisar el dia final\r\n\t\t\t\t$sSQL='SELECT ofer19orden FROM ofer19diasperaca WHERE ofer19fecha=\"'.$sfechafin.'\" AND ofer19per_aca='.$idperaca;\r\n\t\t\t\t$tabla=$objDB->ejecutasql($sSQL);\r\n\t\t\t\tif ($objDB->nf($tabla)>0){\r\n\t\t\t\t\t//todos los dias estan, asi que no hay que insertar.\r\n\t\t\t\t\t$binserta=false;\r\n\t\t\t\t\t$sSQL='DELETE FROM ofer19diasperaca WHERE STR_TO_DATE(ofer19fecha,\"%d/%m/%Y\")>STR_TO_DATE(\"'.$sfechafin.'\",\"%d/%m/%Y\") AND ofer19per_aca='.$idperaca;\r\n\t\t\t\t\t$result=$objDB->ejecutasql($sSQL);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t//no encontro el dia final.\r\n\t\t\t\t\t$belimina=true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t//no se encontro el dia eliminar.\r\n\t\t\t$belimina=true;\r\n\t\t\t}\r\n\t\tif ($belimina){\r\n\t\t\t//eliminamos TODOS los dias ...\r\n\t\t\t$sSQL='DELETE FROM ofer19diasperaca WHERE ofer19per_aca='.$idperaca;\r\n\t\t\t$result=$objDB->ejecutasql($sSQL);\r\n\t\t\t}\r\n\t\tif ($binserta){\r\n\t\t\t//montamos los dias .\r\n\t\t\t$orden=2;\r\n\t\t\t$idiasemana=fecha_diasemana($sfechaini);\r\n\t\t\t$sinsert='INSERT INTO ofer19diasperaca (ofer19per_aca, ofer19orden, ofer19fecha, ofer19festivo, ofer19numdia, ofer19diasem) VALUES ('.$idperaca.', 1, \"'.$sfechaini.'\", \"N\", -2, '.$idiasemana.')';\r\n\t\t\t$sfecha=fecha_sumardias($sfechaini, 1);\r\n\t\t\t$idiasemana=fecha_diasemana($sfecha);\r\n\t\t\twhile (!fecha_esmayor($sfecha, $sfechafin)){\r\n\t\t\t\t$sFestivo='N';\r\n\t\t\t\t$snumdia=-2;\r\n\t\t\t\tswitch (substr($sfecha,0,5)){\r\n\t\t\t\t\tcase '01/01':\r\n\t\t\t\t\tcase '01/05':\r\n\t\t\t\t\tcase '20/07':\r\n\t\t\t\t\tcase '07/08':\r\n\t\t\t\t\tcase '12/10':\r\n\t\t\t\t\tcase '11/11':\r\n\t\t\t\t\t$sFestivo='S';\r\n\t\t\t\t\t$snumdia=-1;\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t$sinsert=$sinsert.', ('.$idperaca.', '.$orden.', \"'.$sfecha.'\", \"'.$sFestivo.'\", '.$snumdia.', '.$idiasemana.')';\r\n\t\t\t\t$orden++;\r\n\t\t\t\t$sfecha=fecha_sumardias($sfecha, 1);\r\n\t\t\t\t$idiasemana++;\r\n\t\t\t\tif ($idiasemana>6){$idiasemana=0;}\r\n\t\t\t\t}\r\n\t\t\t$result=$objDB->ejecutasql($sinsert);\r\n\t\t\t}\r\n\t\t//calculamos el numdia.\r\n\t\tif ($binserta||$belimina){\r\n\t\t\t//marcamos lo anterior a num dia -2.\r\n\t\t\t$sSQL='UPDATE ofer19diasperaca SET ofer19numdia=-2 WHERE ofer19numdia>=0 AND ofer19per_aca='.$idperaca;\r\n\t\t\t$result=$objDB->ejecutasql($sSQL);\r\n\t\t\tOAI_DiasCalcular($idperaca, $objDB);\r\n\t\t\t}\r\n\t\t}\r\n\treturn $sError;\r\n\t}", "title": "" }, { "docid": "c8ef808d474ba6c3b46e449ebaf9a50f", "score": "0.5425719", "text": "function nota_media($peliculas){\n $total = count($peliculas);\n $notas = 0;\n\n foreach($peliculas as $pelicula){\n $notas += $pelicula[\"nota\"];\n }\n return ([$notas/$total, $total]);\n}", "title": "" }, { "docid": "22cd8f321e3bbcf34ea6c7e90ccccd2c", "score": "0.541709", "text": "private function getFeeByDimension()\n {\n return 0;\n }", "title": "" }, { "docid": "19c8373cb4e6049db79d1974e56f5677", "score": "0.5412628", "text": "function calificacion_estels($_calificacion){\n\n $_estels=\"\";\n $image1 = \"<img class='estels' src='img/icons/1.png'>\";\n $image2 = \"<img class='estels' src='img/icons/2.png'>\";\n $image3 = \"<img class='estels' src='img/icons/3.png'>\";\n\n if($_calificacion % 2 !=0){\n\n //HI HA MITJA ESTEL\n for ($i=1; $i<($_calificacion/2); $i++){\n $_estels= $_estels.$image1;\n }\n $_estels= $_estels.$image2;\n\n for ($i=0; $i>(($_calificacion/2)-4);$i--){\n $_estels= $_estels.$image3;\n }\n\n }else{\n\n //NOMES ESTELL SENCERA\n for ($i=1; $i<=($_calificacion/2); $i++){\n $_estels= $_estels.$image1;\n }\n\n for ($i=0; $i>(($_calificacion/2)-5);$i--){\n $_estels= $_estels.$image3;\n }\n }\n\n return $_estels;\n }", "title": "" }, { "docid": "21337f5e53feb35d1967b83fa559fd90", "score": "0.5404802", "text": "function denda($tanggalKembali, $tanggalAturanKembali){\n $telat = hariTelat($tanggalKembali, $tanggalAturanKembali);\n $denda = $telat * 500;\n return $denda;\n }", "title": "" }, { "docid": "d4f8f4daa066d3d3b4047e3c4f8981eb", "score": "0.5403075", "text": "function show_piso_cuidad_total($idciudad) {\n\t\t$sql = \"SELECT id_piso, descripcion, calle, numero, cp, idlocalizacion, extras FROM pisos WHERE verificado=true AND libre=1 AND idlocalizacion=\".$idciudad;\n\t\t$resultado_1 = $this -> db -> query($sql);\n\t\t// Ahora lo recorremos para sacar las imagenes y tal y pascual y lo metemos en el array y tal y pascual\n\t\tforeach ($resultado_1 -> result() as $row) {\n\t\t\t$sql2 = \"SELECT imagen from imagenes_pisos WHERE idpiso = \".$row ->id_piso;\n\t\t\t$resultado_2 = $this -> db -> query($sql2);\n\t\t\tif ($resultado_2 -> num_rows()>0) {\n\t\t\t\tforeach ($resultado_2 -> result() as $row2) {\n\t\t\t\t\t// Tiene fotico\n\t\t\t\t\t$imagen = $row2 -> imagen;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t\t// No tiene fotico\n\t\t\t\t\t$imagen = \"sin_imagen.png\";\n\t\t\t}\n\t\t\t$piso[] = array (\"idpiso\" => $row -> id_piso, \"descripcion\" => $row -> descripcion, \"direccion\" => $row -> calle . \", \".$row -> numero, \"poblacion\" => $row -> cp, \"extras\" => $row -> extras, \"imagen\" => $imagen);\n\t\t}\n\t\treturn count($piso);\n\t}", "title": "" }, { "docid": "336975e051a7a8b48361fc4fceb1b865", "score": "0.53907603", "text": "function categoriasMasVendidas(){\n require_once 'model/Atencion.php';\n $atencion = new Atencion();\n $consulta = $atencion->categoriasMasVendidas();\n $suma=0;\n foreach ($consulta as $a) {\n $suma=$suma+$a[\"total\"];\n }\n if (!empty($consulta)){ \n foreach ($consulta as $a) {\n $producto= $a[\"total\"]; \n echo '<div>\n <p>'.$a[\"categoria\"].'</p>\n <div class=\"\">\n <div class=\"progress progress_sm\" style=\"width: 100%;\">\n <div class=\"progress-bar bg-green\" role=\"progressbar\"\n data-transitiongoal=\"'.(($a[\"total\"]/$suma)*100).'\"></div>\n </div>\n </div>\n </div>'; \n }\n }\n else{\n for ($index = 0; $index < 4; $index++) { \n echo '<div>\n <p>No disponible</p>\n <div class=\"\">\n <div class=\"progress progress_sm\" style=\"width: 100%;\">\n <div class=\"progress-bar bg-green\" role=\"progressbar\"\n data-transitiongoal=\"0\"></div>\n </div>\n </div>\n </div>';\n }\n }\n }", "title": "" }, { "docid": "f2c4a46067876cdef30f67d9d200de2d", "score": "0.53886026", "text": "function somar_dias_uteis_sig($str_data, $int_qtd_dias_somar = 7) {\n $str_data = substr($str_data,0,10);\n\n // Se a data estiver no formato brasileiro: dd/mm/aaaa. Converte-a para o padrão americano: aaaa-mm-dd.\n if ( preg_match(\"@/@\",$str_data) == 1 ) {\n $str_data = implode(\"-\", array_reverse(explode(\"/\",$str_data)));\n }\n\n $array_data = explode('-', $str_data);\n $count_days = 0;\n $int_qtd_dias_uteis = 0;\n while ( $int_qtd_dias_uteis < $int_qtd_dias_somar ) {\n $count_days++;\n if ( ( $dias_da_semana = gmdate('w', strtotime('+'.$count_days.' day', mktime(0, 0, 0, $array_data[1], $array_data[2], $array_data[0]))) ) != '0' && $dias_da_semana != '6' ) {\n $int_qtd_dias_uteis++;\n }\n }\n return gmdate('Y-m-d',strtotime('+'.$count_days.' day',strtotime($str_data)));\n}", "title": "" }, { "docid": "251275750ea48fa02bed5149a5303881", "score": "0.5383145", "text": "function inventario_abs()\n {\n\t\t\tinclude_once('../conexion/connection.php');\n\t\t//crear objeto de conexion\n\t\t$con=new conexion();\n\t\t//realizar la consulta para cargar datos\n\t\t$query=\"select id_ingrediente,cantidad from inventario_sum\";\n\t\t\t$bdq= $con->Ejecutar($query) or die (\"error en la consulta\");\n\t\t$datos_entradas= array();\n\t\twhile ($row= mysqli_fetch_array($bdq)) {\n\t\t\t$datos_entradas[]=$row;\n\t\t}\n\t\treturn $datos_entradas;\n\t}", "title": "" }, { "docid": "ccf2fdb83fde80f874b2705d272c7e62", "score": "0.5379901", "text": "function terbilang($angka) {\n $angka = (float)$angka;\n \n // array bilangan\n // sepuluh dan sebelas merupakan special karena awalan 'se'\n $bilangan = array(\n '',\n 'Satu',\n 'Dua',\n 'Tiga',\n 'Empat',\n 'Lima',\n 'Enam',\n 'Tujuh',\n 'Delapan',\n 'Sembilan',\n 'Sepuluh',\n 'Sebelas'\n );\n \n // pencocokan dimulai dari satuan angka terkecil\n if ($angka < 12) {\n // mapping angka ke index array $bilangan\n return $bilangan[$angka];\n } else if ($angka < 20) {\n // bilangan 'belasan'\n // misal 18 maka 18 - 10 = 8\n return $bilangan[$angka - 10] . ' Belas';\n } else if ($angka < 100) {\n // bilangan 'puluhan'\n // misal 27 maka 27 / 10 = 2.7 (integer => 2) 'dua'\n // untuk mendapatkan sisa bagi gunakan modulus\n // 27 mod 10 = 7 'tujuh'\n $hasil_bagi = (int)($angka / 10);\n $hasil_mod = $angka % 10;\n return trim(sprintf('%s Puluh %s', $bilangan[$hasil_bagi], $bilangan[$hasil_mod]));\n } else if ($angka < 200) {\n // bilangan 'seratusan' (itulah indonesia knp tidak satu ratus saja? :))\n // misal 151 maka 151 = 100 = 51 (hasil berupa 'puluhan')\n // daripada menulis ulang rutin kode puluhan maka gunakan\n // saja fungsi rekursif dengan memanggil fungsi terbilang(51)\n return sprintf('Seratus %s', terbilang($angka - 100));\n } else if ($angka < 1000) {\n // bilangan 'ratusan'\n // misal 467 maka 467 / 100 = 4,67 (integer => 4) 'empat'\n // sisanya 467 mod 100 = 67 (berupa puluhan jadi gunakan rekursif terbilang(67))\n $hasil_bagi = (int)($angka / 100);\n $hasil_mod = $angka % 100;\n return trim(sprintf('%s Ratus %s', $bilangan[$hasil_bagi], terbilang($hasil_mod)));\n } else if ($angka < 2000) {\n // bilangan 'seribuan'\n // misal 1250 maka 1250 - 1000 = 250 (ratusan)\n // gunakan rekursif terbilang(250)\n return trim(sprintf('Seribu %s', terbilang($angka - 1000)));\n } else if ($angka < 1000000) {\n // bilangan 'ribuan' (sampai ratusan ribu\n $hasil_bagi = (int)($angka / 1000); // karena hasilnya bisa ratusan jadi langsung digunakan rekursif\n $hasil_mod = $angka % 1000;\n return sprintf('%s Ribu %s', terbilang($hasil_bagi), terbilang($hasil_mod));\n } else if ($angka < 1000000000) {\n // bilangan 'jutaan' (sampai ratusan juta)\n // 'satu puluh' => SALAH\n // 'satu ratus' => SALAH\n // 'satu juta' => BENAR\n // @#$%^ WT*\n \n // hasil bagi bisa satuan, belasan, ratusan jadi langsung kita gunakan rekursif\n $hasil_bagi = (int)($angka / 1000000);\n $hasil_mod = $angka % 1000000;\n return trim(sprintf('%s Juta %s', terbilang($hasil_bagi), terbilang($hasil_mod)));\n } else if ($angka < 1000000000000) {\n // bilangan 'milyaran'\n $hasil_bagi = (int)($angka / 1000000000);\n // karena batas maksimum integer untuk 32bit sistem adalah 2147483647\n // maka kita gunakan fmod agar dapat menghandle angka yang lebih besar\n $hasil_mod = fmod($angka, 1000000000);\n return trim(sprintf('%s Milyar %s', terbilang($hasil_bagi), terbilang($hasil_mod)));\n } else if ($angka < 1000000000000000) {\n // bilangan 'triliun'\n $hasil_bagi = $angka / 1000000000000;\n $hasil_mod = fmod($angka, 1000000000000);\n return trim(sprintf('%s Triliun %s', terbilang($hasil_bagi), terbilang($hasil_mod)));\n } else {\n return 'Wow...';\n }\n}", "title": "" }, { "docid": "5d9a4f22202037133ec14ac428aaadae", "score": "0.5377937", "text": "public function desafiaveis($id = NULL){\n\t\tif ($id==NULL)\n\t\t\t$id = $this->id;\n\t\t$p = $this->ver_posicao($id);// obtem posicao\t\n\t\t$p_bonus = $this->ver_bonus($p); // obtem bonus\n\t\t$p_desafia = $this->ver_desafia($p); // obtem maximo desafiado\n\t\t$desafiaveis = array();\n\t\t$forte = $p-$p_desafia;\n\t\t$fraco = $p-$p_bonus-1;\n\t\tif ($fraco<=1)\t// não há quem desafiar\n\t\t\treturn $desafiaveis;\n\t\tif ($forte<=1)\n\t\t\t$forte = 2; // correção dos limites\n\t\tfor ($i=$forte; $i<=$fraco; $i++) { // cria lista dos desafiaveis em ordem descrescente de posicoes, mais forte primeiro\n\t\t\tif ($i<=1)\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t$desafiavel_id = $this->jogador_na_posicao($i);\n\t\t\t$disponivel = $this->disponivel($desafiavel_id,true);\n\t\t\tif ($disponivel)\n\t\t\t\t$desafiaveis[] = $desafiavel_id;\n\t\t}\n\t\treturn $desafiaveis;\n\t}", "title": "" }, { "docid": "ec865225117d861a9c5062c27f494345", "score": "0.537494", "text": "function matrikSolusiIdealPositif()\n {\n $NormalisasiBobot = $this->normalisasiBobot();\n $NormalisasiBobotTrans = $this->Transpose($NormalisasiBobot);\n $matrikSolusiIdealPositif = array(\n min($NormalisasiBobotTrans[0]),\n max($NormalisasiBobotTrans[1]),\n max($NormalisasiBobotTrans[2]),\n max($NormalisasiBobotTrans[3]),\n );\n return $matrikSolusiIdealPositif;\n }", "title": "" }, { "docid": "d1ce2fe85621b6cb8c162dbecb648fe8", "score": "0.537474", "text": "function findDrishtiValue($dk)\r\n{\r\n \r\n\r\n IF ($dk > 0 and $dk < 30)\r\n {\r\n $drishti = 0;\r\n }\r\n elseif ($dk >= 30 and $dk <= 60)\r\n {\r\n $drishti = ($dk - 30)/2;\r\n }\r\n elseif ($dk >=60 and $dk <= 90)\r\n {\r\n $drishti = ($dk - 60) + 15;\r\n }\r\n elseif ($dk >= 90 and $dk <= 120)\r\n {\r\n $drishti = ((120 - $dk)/2) + 30;\r\n }\r\n elseif ($dk >= 120 and $dk <=150)\r\n {\r\n $drishti = (150-$dk);\r\n }\r\n elseif ($dk >= 150 and $dk <=180)\r\n {\r\n $drishti = (($dk - 150)*2);\r\n }\r\n elseif ($dk >= 180 and $dk <= 300)\r\n {\r\n $drishti = ((300-$dk)/2);\r\n }\r\n else\r\n {\r\n $drishti = 0;\r\n }\r\n\r\nreturn $drishti;\r\n\r\n}", "title": "" }, { "docid": "ee26bdb7f06e32d602d3ed1168fa22d2", "score": "0.53683615", "text": "function refinar_cantidad_buscar_piso($q, $cp, $loc, $rango) {\n\t\t// ATENCION esto tiene un apaño tan sumamente malo que me da verguenza a mi mismo solo de verlo\n\t\t// necesita una optimizacion urgente\n\t\t$piso = array();\n\t\t$sql = \"SELECT id_piso, descripcion, calle, numero, cp, extras, idlocalizacion FROM pisos WHERE verificado=true AND (descripcion like '%\".$q.\"%' OR calle like '%\".$q.\"%')\";\n\n\t\tif ($loc<>0) {\n\t\t\t$sql = $sql.\" AND idlocalizacion=\".$loc.\"\";\n\t\t}\n\n\t\tif ($cp<>\"\") {\n\t\t\t$sql = $sql.\" AND cp='\".$cp.\"'\";\n\t\t}\n\n // Esto es una autentica mierda para solucionar si no envian el $rango\n if ($rango == null) {\n $rango = \"0-100000\";\n }\n\n\t\t// Ahora hacemos bujeritos el rango para meterlo en la secuencia\n\t\t$minmax = explode(\"-\", $rango);\n\n\t\t$resultado_1 = $this -> db -> query($sql);\n\t\t// Ahora lo recorremos para sacar las imagenes y tal y pascual y lo metemos en el array y tal y pascual\n\t\t// Esto es una autentica chapuza de verguenza\n\t\t// hay que revisarlo porque solo por escribir este codigo he hecho llorar al niño jesus\n\t\tforeach ($resultado_1 -> result() as $row) {\n\t\t\t$sql3 = \"SELECT idpiso FROM pisos_precio WHERE precio>=\".$minmax[0].\" AND precio<=\".$minmax[1];\n\n\t\t\t$resultado3 = $this -> db -> query($sql3);\n\t\t\t$valepalrango = false;\n\t\t\tforeach ($resultado3 -> result() as $row3) {\n\t\t\t\tif ($row3 -> idpiso == $row -> id_piso) {\n\t\t\t\t\t// Si vale lo que tiene que valer\n\t\t\t\t\t$valepalrango = true;\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\t// Si se pasa del rango\n\t\t\t\t\t$valepalrango = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Si vale\n\t\t\tif ($valepalrango == true) {\n\t\t\t\t$sql2 = \"SELECT imagen from imagenes_pisos WHERE idpiso = \".$row ->id_piso;\n\t\t\t\t$resultado_2 = $this -> db -> query($sql2);\n\t\t\t\tif ($resultado_2 -> num_rows()>0) {\n\t\t\t\t\tforeach ($resultado_2 -> result() as $row2) {\n\t\t\t\t\t\t// Tiene fotico\n\t\t\t\t\t\t$imagen = $row2 -> imagen;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t\t// No tiene fotico\n\t\t\t\t\t\t$imagen = \"sin_imagen.png\";\n\t\t\t\t}\n\t\t\t\t$sql4 = \"SELECT localizacion FROM localizaciones WHERE idlocalizacion=\".$row -> idlocalizacion;\n\t\t\t\t$resultado4 = $this -> db -> query($sql4);\n\t\t\t\tforeach ($resultado4 -> result() as $row4) {\n\t\t\t\t\t$ciudad = $row4 -> localizacion;\n\t\t\t\t}\n\t\t\t\t$piso[] = array (\"idpiso\" => $row -> id_piso, \"descripcion\" => $row -> descripcion, \"direccion\" => $row -> calle . \", \".$row -> numero, \"poblacion\" => $row -> cp.\" \".$ciudad, \"extras\" => $row -> extras, \"imagen\" => $imagen);\n\t\t\t}\n\t\t}\n\t\treturn count($piso);\n\t}", "title": "" }, { "docid": "3161cdce4ca88b431e48aff0b70d2af6", "score": "0.53658146", "text": "public function getHumulene();", "title": "" }, { "docid": "fbf1d31499063482b5540f7b81506468", "score": "0.53628814", "text": "function calculFraisDePort()\n{\n $totalArticleQuantite = 0;\n for ($i = 0; $i < count($_SESSION['panier']); $i++) {\n $totalArticleQuantite += $_SESSION['panier'][$i]['quantité'];\n }\n return $totalArticleQuantite * 3;\n}", "title": "" }, { "docid": "83554d9daf086a97f907a7e0f19c1635", "score": "0.5362754", "text": "public function getAttaque()\n {\n return $this->_degat;\n }", "title": "" }, { "docid": "35a49ca2fbeb84208184fb05fb4010b2", "score": "0.53584373", "text": "public static function diaAtraso($data){\n $hoje = new DateTime();\n $entrega = new DateTime($data);\n $diff = $entrega->diff($hoje);\n $dia = $diff->format('%R%a');\n if($dia > 0 ) {\n $dias = substr($dia, 1);\n return $dias;\n }else{\n return 0;\n }\n }", "title": "" }, { "docid": "d27a56222efcf7af59d18f99af7ec7c3", "score": "0.5357624", "text": "public static function totalVentasVtasDiarias(){\n $compras=Venta::find()->where(['Fecha'=>date('Y-m-d')])->all();\n $sumatoria=0;\n foreach($compras as $compra){\n foreach($compra->detalleventas as $detalle){\n $sumatoria=$sumatoria+($detalle->Cantidad * $detalle->producto->Precio); \n }\n }\n return $sumatoria;\n }", "title": "" }, { "docid": "9daccde90b4b0234e7161febad01688d", "score": "0.5353845", "text": "function darPuntosPorHorario() {\n leerClase('Semestre');\n $semestre = new Semestre();\n $puntos = $semestre->getValor('Puntos por horario', 10);\n $sql = \"SELECT count(hd.docente_id) as total, hd.hora_id FROM `horario_docente` as hd , hora as h WHERE hd.hora_id = h.id GROUP BY hora_id ORDER BY total DESC \";\n $resp = mysql_query($sql); \n if (!$resp)\n return false;\n\n while ($row = mysql_fetch_array($resp)) {\n if ($row['total'] <= 1 )\n continue;\n $puntos_aumentar = $puntos * $row['total'];\n $sql = \"SELECT * FROM `horario_docente` WHERE `hora_id` = '{$row['hora_id']}' \";\n $resp = mysql_query($sql); \n if ($resp)\n {\n while ($row1 = mysql_fetch_array($resp)) {\n $this->aumentarPuntosDocente($row1['docente_id'], $puntos_aumentar);\n }\n }\n } \n }", "title": "" }, { "docid": "66c4c503615f6c6183514c9d566c5f98", "score": "0.53505516", "text": "function soma_data($pData, $pDias)//formato BR\r\n {\r\n if(ereg(\"([0-9]{4})-([0-9]{2})-([0-9]{2})\", $pData, $vetData))\r\n {\r\n $fAno = $vetData[1];\r\n $fMes = $vetData[2];\r\n $fDia = $vetData[3];\r\n\r\n for($x = 1; $x <= $pDias; $x++){\r\n if($fMes == 1 || $fMes == 3 || $fMes == 5 || $fMes == 7 || $fMes == 8 || $fMes == 10 || $fMes == 12){\r\n $fMaxDia = 31;\r\n }\r\n elseif($fMes == 4 || $fMes == 6 || $fMes == 9 || $fMes == 11){\r\n $fMaxDia = 30;\r\n }\r\n else{\r\n if($fMes == 2 && $fAno % 4 == 0 && $fAno % 100 != 0){\r\n $fMaxDia = 29;\r\n }\r\n elseif($fMes == 2){\r\n $fMaxDia = 28;\r\n }\r\n }\r\n $fDia++;\r\n if($fDia > $fMaxDia){\r\n if($fMes == 12){\r\n $fAno++;\r\n $fMes = 1;\r\n $fDia = 1;\r\n }\r\n else{\r\n $fMes++;\r\n $fDia = 1;\r\n }\r\n }\r\n }\r\n if(strlen($fDia) == 1)\r\n $fDia = \"0\" . $fDia;\r\n if(strlen($fMes) == 1)\r\n $fMes = \"0\" . $fMes;\r\n return \"$fAno-$fMes-$fDia\";\r\n }\r\n }", "title": "" }, { "docid": "fa1c64f0331ac77fa28a4029279de3b0", "score": "0.5345294", "text": "function getTamMedio($idp,$variedad){\n $total = DB::select('id','tam','total','variedad')->from('entregas')->where(array(array('idpuesto','=', $idp),array('tam','<>',0),array('fecha','>','2023-01-01')))->execute();\n $tam_medio=array();\n $total_kg_medio=array();\n foreach($total as $t){\n $v=$t['variedad'];\n if(isset($tam_medio[$v])){\n $tam_medio[$v] += $t['tam']*$t['total'];\n }\n else{\n $tam_medio[$v] = $t['tam']*$t['total'];\n }\n if($t['tam']!=0){\n if(isset($total_kg_medio[$v])){\n $total_kg_medio[$v] += $t['total'];\n }\n else{\n $total_kg_medio[$v] = $t['total'];\n }\n }\n\n }\n foreach($tam_medio as $v => $t){\n $tam_medio[$v]=$t/$total_kg_medio[$v];\n }\n if(isset($tam_medio[$variedad])) return $tam_medio[$variedad];\n else return 0;\n}", "title": "" }, { "docid": "90db6878f8def845f91687c3611e2b6f", "score": "0.5343729", "text": "public function sumarizuj(){\n $e = new Nette\\Utils\\DateTime('00:00');\n $f = clone $e;\n if ( count($this->pole_dochadzky) ){\n foreach ( $this->pole_dochadzky as $key => $den ){\n if ($this->pole_dochadzky[$key]['cas_v_praci']) { //pokial mame definovany cas v praco rozdielny od 0\n $e->add( $this->pole_dochadzky[$key]['cas_v_praci']);\n }\n }\n $this->celkovy_cas = $f->diff($e);//odratame cas\n }//end if ze mame nejaku dochadzku\n\n }", "title": "" }, { "docid": "fbe5d711701ea4a2372e56a2584872ba", "score": "0.53433084", "text": "function chartEdadUno(){\r\n\r\n $query = $this->db->query('SELECT SUM(IF (edad BETWEEN 18 AND 30, 1, 0)) AS uno FROM usuarios WHERE puesto = \"2\" OR puesto = \"3\" OR puesto = \"4\" OR puesto = \"5\" OR puesto = \"6\" OR puesto = \"7\"');\r\n if($query->num_rows() > 0){\r\n foreach($query->result() as $data){\r\n $reporte[] = $data;\r\n }\r\n return $reporte;\r\n }\r\n }", "title": "" }, { "docid": "bd351b4bb73c8b72d7bfe6ce32152aaf", "score": "0.5341535", "text": "function dias_feriados($ano = null)\n\n {\n\n if ($ano === null)\n\n {\n\n $ano = intval(date('Y'));\n\n }\n\n\n\n $pascoa = easter_date($ano); // Limit, dates before 1970 and after 2037 will return a message from easter_date PHP see http://php.net/manual/en/function.easter-date.php\n\n $dia_pascoa = date('j', $pascoa);\n\n $mes_pascoa = date('n', $pascoa);\n\n $ano_pascoa = date('Y', $pascoa);\n\n\n\n $feriados = array(\n\n // National holidays on fixed date (National Brazilians holidays)\n\n mktime(0, 0, 0, 1, 1, $ano), // Confraternização Universal - Lei nº 662, de 06/04/49\n \n mktime(0, 0, 0, 1, 1, ($ano + 1)), // Confraternização Universal - Lei nº 662, de 06/04/49\n\n mktime(0, 0, 0, 4, 21, $ano), // Tiradentes - Lei nº 662, de 06/04/49\n\n mktime(0, 0, 0, 5, 1, $ano), // Dia do Trabalhador - Lei nº 662, de 06/04/49\n\n mktime(0, 0, 0, 9, 7, $ano), // Dia da Independência - Lei nº 662, de 06/04/49\n\n mktime(0, 0, 0, 10, 12, $ano), // N. S. Aparecida - Lei nº 6802, de 30/06/80\n\n mktime(0, 0, 0, 11, 2, $ano), // Todos os santos - Lei nº 662, de 06/04/49\n\n mktime(0, 0, 0, 11, 15, $ano), // Proclamação da republica - Lei nº 662, de 06/04/49\n\n mktime(0, 0, 0, 12, 25, $ano), // Natal - Lei nº 662, de 06/04/49\n\n\n\n // These days have a date depending on easter\n\n mktime(0, 0, 0, $mes_pascoa, $dia_pascoa - 48, $ano_pascoa),//2ºferia Carnaval\n\n mktime(0, 0, 0, $mes_pascoa, $dia_pascoa - 47, $ano_pascoa),//3ºferia Carnaval\t\n\n mktime(0, 0, 0, $mes_pascoa, $dia_pascoa - 2 , $ano_pascoa),//6ºfeira Santa \n\n mktime(0, 0, 0, $mes_pascoa, $dia_pascoa , $ano_pascoa),//Pascoa\n\n mktime(0, 0, 0, $mes_pascoa, $dia_pascoa + 60, $ano_pascoa),//Corpus Cirist\n\n );\n\n\n\n sort($feriados);\n\n\n\n return $feriados;\n\n }", "title": "" }, { "docid": "02f597792c5103fee705f3f49e3e5c7c", "score": "0.5341332", "text": "public function nivelCumplimientoEstandar(){\n\t#lee varia{ble\n\t\t$sv=$_GET[\"sv\"];\n\t\t$sec=$_GET[\"sec\"];\n\t\t$nrep=$_GET[\"nrep\"];\n\t\t$pv=$_GET[\"pv\"];\n\t\t$idc=$_GET[\"idc\"];\n\n\t\t$datini=SubnivelController::obtienedato($sec,1);\n\t \t$londat=SubnivelController::obtienelon($sec,1);\n\t \t$numsec=substr($sec,$datini,$londat);\n\n\t \t$datini=SubnivelController::obtienedato($sec,2);\n\t \t$londat=SubnivelController::obtienelon($sec,2);\n\t \t$numreac=substr($sec,$datini,$londat);\n\t\t\t \n \t $datini=SubnivelController::obtienedato($sec,3);\n\t \t$londat=SubnivelController::obtienelon($sec,3);\n\t \t$numcom=substr($sec,$datini,$londat);\n\t \n \t\t$idsec=$numsec.'.'.$numreac.'.'.$numcom;\n\t\t$tipoeva=DatosEst::buscatipoevaluacion($sv, $idsec, \"cue_reactivosestandar\");\n\t\t\n\t\t$tipoev=$tipoeva[\"re_tipoevaluacion\"];\n\t\t//echo $tipoev;\n\t\tswitch($tipoev) {\n case 0 : // ninguna linea\n $sumapond=0;\n break;\n case 1 : // una linea\n # calculo cumplimiento de un renglon\n\n $nivelcump=DatosEst::nivCumpEstandarUno($sv, $sec, $nrep, 1, \"ins_detalleestandar\");\n \t\n \t $sumapond=$nivelcump[\"totalpon\"];\n \t//echo $sumapond; \n //var_dump($sumapond);\n break;\n case 2 : // todas las lineas\n //echo $sec;\n \t$nivelcump=DatosEst::nivelCumpEstandarDos($sv, $sec, $nrep, \"ins_detalleestandar\");\n \t//var_dump($nivelcump);\n \tif (isset($nivelcump[\"numreg\"])) {\n \t\tif (($nivelcump[\"numreg\"])>0){\n \t\t $sumapond=round(($nivelcump[\"totpond\"]/$nivelcump[\"numreg\"]),0);\n \t\t} else {\n \t\t\t$sumapond=round(($nivelcump[\"totpond\"]));\n \t\t} \n \t}\n break;\t\n } //fin del switch \n\n echo '<small> NIVEL DE CUMPLIMIENTO '.$sumapond.'%</small></h1>'; \n\t}", "title": "" }, { "docid": "eb092a54fbf00301b50f9367d866e49e", "score": "0.5341242", "text": "public function ver_desafia($p){\n\t\tif ($p>=176)\n\t\t\t$p_desafia = 80;\n\t\telseif (($p <= 175) && ($p >= 151))\n\t\t\t$p_desafia = 70;\n\t\telseif (($p <= 150) && ($p >= 126))\n\t\t\t$p_desafia = 60;\n\t\telseif (($p <= 125) && ($p >= 101))\n\t\t\t$p_desafia = 50;\n\t\telseif (($p <= 100) && ($p >= 76))\n\t\t\t$p_desafia = 40;\n\t\telseif (($p <= 75) && ($p >= 51))\n\t\t\t$p_desafia = 30;\n\t\telseif (($p <= 50) && ($p >= 26))\n\t\t\t$p_desafia = 20;\n\t\telseif ($p <= 25)\n\t\t\t$p_desafia = 10;\n\t\treturn $p_desafia;\n\t}", "title": "" }, { "docid": "0ef5ac578c21db8e5397655e8fda5a1a", "score": "0.5340504", "text": "function tiempo( $dform ){\r\n\t\t$txtd = \"\";\r\n\t\t$cant = $dform[\"dur_sin\"];\r\n\t\tswitch ( $dform[\"rb_ds\"] ) {\r\n\t\t\tcase \"dur_d\": $txtd = \"días de evolución\"; break;\r\n\t\t\tcase \"dur_s\": $txtd = \"semanas de evolución\"; break;\r\n\t\t\tcase \"dur_m\": $txtd = \"meses de evolución\"; break;\r\n\t\t\tcase \"dur_ld\": $txtd = \"larga data\"; $cant = \"\"; break;\r\n\t\t}\r\n\t\t$tmp = $cant.\" \".$txtd;\r\n\t\treturn $tmp;\r\n\t}", "title": "" }, { "docid": "9f5e2bb0e8295c65f7b3f646b4f6eef5", "score": "0.5332465", "text": "private function getMetragemCubicaAberto() {\n\n $iMetragemCubicaAberto = ($this->iMetragemCubicaEfetivamenteConsumida - $this->iMetragemCubicaCobrada);\n\n return $iMetragemCubicaAberto;\n }", "title": "" }, { "docid": "972a6088612ba616244c0ab4827715b7", "score": "0.533166", "text": "private function initMap()\n\t{\n\t\t$points = array(); // Un point est un tableau entre la case de départ, la case de fin et la distance entre les deux\n\t\tfor ($i = 0; $i <= $this->nbCasesLargeur * $this->nbCasesLargeur - 1; $i++) {\n\t\t\tif ($this->tabPalissadesEauxTunnels[$i] == 1) { // Ce n'est pas une palissade, on initialise les distances avec les cases autour\n\t\t\t\t// La case qui est à gauche\n\t\t\t\tif ($i % $this->nbCasesLargeur > 0) { // Pas d'initialisation si la case en cours est sur un bord gauche\n\t\t\t\t\t$points[] = array($i, $i - 1, $this->tabPalissadesEauxTunnels[$i - 1]);\n\t\t\t\t}\n\n\t\t\t\t// La case qui est à droite\n\t\t\t\tif (($i + 1) % $this->nbCasesLargeur > 0) { // Pas d'initialisation si la case est sur un bord droit\n\t\t\t\t\t$points[] = array($i, $i + 1, $this->tabPalissadesEauxTunnels[$i + 1]);\n\t\t\t\t}\n\n\t\t\t\t// Initialisation des distances avec les cases du dessus\n\t\t\t\tif ($i >= $this->nbCasesLargeur) { // Si on n'est pas sur la première ligne (car il n'y a rien au dessus)\n\n\t\t\t\t\t// La case directement au dessus\n\t\t\t\t\t$points[] = array($i, $i - $this->nbCasesLargeur, $this->tabPalissadesEauxTunnels[$i - $this->nbCasesLargeur]);\n\n\t\t\t\t\t// La case au dessus, à gauche\n\t\t\t\t\tif ($i % $this->nbCasesLargeur > 0) { // Pas d'initialisation si la case est sur un bord gauche\n\t\t\t\t\t\t$points[] = array($i, $i - $this->nbCasesLargeur - 1, $this->tabPalissadesEauxTunnels[$i - $this->nbCasesLargeur - 1]);\n\t\t\t\t\t}\n\n\t\t\t\t\t// La case au dessus à droite\n\t\t\t\t\tif (($i + 1) % $this->nbCasesLargeur > 0) { // Pas d'initialisation si la case est sur un bord droit\n\t\t\t\t\t\t$points[] = array($i, $i - $this->nbCasesLargeur + 1, $this->tabPalissadesEauxTunnels[$i - $this->nbCasesLargeur + 1]);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Initialisation des distances avec les cases au dessous\n\t\t\t\tif ($i <= $this->nbCasesLargeur * ($this->nbCasesLargeur - 1) - 1) { // Si on n'est pas sur la dernière ligne\n\n\t\t\t\t\t// La case juste en dessous\n\t\t\t\t\t$points[] = array($i, $i + $this->nbCasesLargeur, $this->tabPalissadesEauxTunnels[$i + $this->nbCasesLargeur]);\n\n\t\t\t\t\t// La case en dessous à gauche\n\t\t\t\t\tif ($i % $this->nbCasesLargeur > 0) { // Pas d'initialisation si la case est sur un bord gauche\n\t\t\t\t\t\t$points[] = array($i, $i + $this->nbCasesLargeur - 1, $this->tabPalissadesEauxTunnels[$i + $this->nbCasesLargeur - 1]);\n\t\t\t\t\t}\n\n\t\t\t\t\t// La case en dessous à droite\n\t\t\t\t\tif (($i + 1) % $this->nbCasesLargeur > 0) { // Pas d'initialisation si la case est sur un bord droit\n\t\t\t\t\t\t$points[] = array($i, $i + $this->nbCasesLargeur + 1, $this->tabPalissadesEauxTunnels[$i + $this->nbCasesLargeur + 1]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else { // Cas d'une palissade\n\t\t\t\t$points[] = array($i, $i, $this->infiniteDistance); // Soit une distance infinie, soit pas de distance, au choix ;-)\n\t\t\t}\n\t\t}\n\n\t\t$ourMap = array();\n\t\tfor ($i = 0, $m = count($points); $i < $m; $i++) {\n\t\t\t$x = $points[$i][0];\n\t\t\t$y = $points[$i][1];\n\t\t\t$c = $points[$i][2];\n\t\t\t$ourMap[$x][$y] = $c;\n\t\t\t$ourMap[$y][$x] = $c;\n\t\t}\n\n\t\t// ensure that the distance from a node to itself is always zero\n\t\t// Purists may want to edit this bit out.\n\t\t$matrixWidth = $this->nbCasesLargeur * $this->nbCasesLargeur;\n\t\tfor ($i = 0; $i < $matrixWidth; $i++) {\n\t\t\tfor ($k = 0; $k < $matrixWidth; $k++) {\n\t\t\t\tif ($i == $k) $ourMap[$i][$k] = 0;\n\t\t\t}\n\t\t}\n\n\t\treturn $ourMap;\n\t}", "title": "" }, { "docid": "94f4b2a7207fab34144fbdf4923f07ce", "score": "0.53262174", "text": "function matrikSolusiIdealNegatif()\n {\n $NormalisasiBobot = $this->normalisasiBobot();\n $NormalisasiBobotTrans = $this->Transpose($NormalisasiBobot);\n $matrikSolusiIdealNegatif = array(\n max($NormalisasiBobotTrans[0]),\n min($NormalisasiBobotTrans[1]),\n min($NormalisasiBobotTrans[2]),\n min($NormalisasiBobotTrans[3]),\n );\n return $matrikSolusiIdealNegatif;\n }", "title": "" }, { "docid": "66e22bd134d0fb5e564d7f48e1f95999", "score": "0.53185624", "text": "public function getDerrotas()\n {\n return $this->getPartidos()->where('coalesce(goles_local,0) < coalesce(goles_visitante,0)')->count()\n + $this->getPartidos0()->where('coalesce(goles_local,0) > coalesce(goles_visitante,0)')->count();\n }", "title": "" }, { "docid": "c5cab14b706497ef26950c2426601c1d", "score": "0.53169185", "text": "public function datosPesoMasculino($datosPaciente){\n $peso['titulo'] = 'Grafico de evolucion del peso - Masculino.';\n $peso['Ymin'] = 2;\n $peso['Ymax'] = 8;\n $peso['YminorTickInterval'] = 0.5;\n $peso['Xmin'] = 0;\n $peso['Xmax'] = 13;\n $peso['XminorTickInterval'] = 0.1;\n $peso['tituloY'] = 'Peso(kg)';\n $peso['tituloX'] = 'Edad(semanas)';\n $peso['series'] = array(['name' => 'P3', 'data' => [ [0, 2.5], [1, 2.6], [2, 2.8], [3, 3.1], [4, 3.4], [5, 3.6], [6, 3.8],[7, 4.1], [8, 4.3], [9, 4.4], [10, 4.6], [11, 4.8], [12, 4.9], [13, 5.1] ]],['name' => 'P15', 'data' => [ [0, 2.9], [1, 3.0], [2, 3.2], [3, 3.5], [4, 3.8], [5, 4.1], [6, 4.3],[7, 4.5], [8, 4.7], [9, 4.9], [10, 5.1], [11, 5.3], [12, 5.5], [13, 5.6] ]],['name' => 'P50', 'data' => [ [0, 3.3], [1, 3.5], [2, 3.8], [3, 4.1], [4, 4.4], [5, 4.7], [6, 4.9],[7, 5.2], [8, 5.4], [9, 5.6], [10, 5.8], [11, 6.0], [12, 6.2], [13, 6.4] ]],['name' => 'P85', 'data' => [ [0, 3.7], [1, 3.9], [2, 4.1], [3, 4.4], [4, 4.7], [5, 5.0], [6, 5.2],[7, 5.5], [8, 5.7], [9, 5.9], [10, 6.1], [11, 6.3], [12, 6.5], [13, 6.6] ]],['name' => 'P97', 'data' => [ [0, 4.3], [1, 4.5], [2, 4.9], [3, 5.2], [4, 5.6], [5, 5.9], [6, 6.3],[7, 6.5], [8, 6.8], [9, 7.1], [10, 7.3], [11, 7.5], [12, 7.7], [13, 7.9] ]]);\n array_push($peso['series'],$datosPaciente);\n return json_encode($peso);\n }", "title": "" }, { "docid": "ee57abf1115d77d456472791aa13a3c0", "score": "0.53162545", "text": "Public function hitung_luas() {\n Return $this->alas * $this->tinggi;\n }", "title": "" }, { "docid": "e1bd1a567bcde872b36bc6c48ed08c16", "score": "0.5308658", "text": "function darPuntosPorAsignado()\n {\n //aumentamos puntos a los que no tienes asignacion\n leerClase('Semestre');\n $semestre = new Semestre();\n $puntos = $semestre->getValor('Puntos por no asignado', 50);\n \n //buscamos todos los docentes que hayan sido tribunales este semestre\n $sql = \" SELECT id as docente_id FROM docente WHERE id NOT IN ( SELECT docente_id FROM tribunal Where semestre = '{$semestre->codigo}' ) \";\n $resp = mysql_query($sql); \n if ($resp)\n {\n while ($row1 = mysql_fetch_array($resp)) {\n $this->aumentarPuntosDocente($row1['docente_id'], $puntos);\n }\n }\n //disminuimos puntos a los que tienen asignacion\n leerClase('Semestre');\n $semestre = new Semestre();\n $puntos = $semestre->getValor('Puntos menos por ya asignado', '-6');\n \n //buscamos todos los docentes que hayan sido tribunales este semestre\n $sql = \" SELECT docente_id FROM tribunal Where semestre = '{$semestre->codigo}' \";\n $resp = mysql_query($sql); \n if ($resp)\n {\n while ($row1 = mysql_fetch_array($resp)) {\n $this->aumentarPuntosDocente($row1['docente_id'], $puntos);\n }\n }\n return;\n }", "title": "" }, { "docid": "3b54a667df93784b8875cdc4f819a3b7", "score": "0.5306159", "text": "function geraInfoContratos($idContrato, array $dados)\n{\n //mensalidade = taxas de aluguel, IPTU e Condomínio\n $valorMensalidade = $primeiraMensalidade = $dados['valor'] + $dados['condominio'] + $dados['iptu'];\n //repasse = valorMensalidade menos taxas de administracao e Condomínio\n $valorRepasse = $primeiroRepasse = $valorMensalidade - $dados['condominio'] - $dados['taxaAdministracao'];\n \n $diaRepasse = getDataRepasse($dados['idProprietario']);\n $inicioRepasse = date('Y-m', strtotime($dados['dataInicio'])).\"-\".$diaRepasse;\n\n $diaInicio = date('d', strtotime($dados['dataInicio']));\n $i = 0;\n\n $dataPrimeira = $dados['dataInicio'];\n //calcula desconto para caso o inicio não seja dia primeiro\n if($diaInicio > 1){\n $valorDia = $dados['valor']/30;//$valorMensalidade/30;\n $desconto = $valorDia * $diaInicio;\n $primeiraMensalidade = $valorMensalidade - $desconto;\n $primeiroRepasse = $primeiraMensalidade - $dados['condominio'] - $dados['taxaAdministracao'];\n $aux = $diaInicio-1;\n $dados['dataInicio'] = date('Y-m-d', strtotime($dados['dataInicio'].\"-$aux day\"));\n }\n\n $today = date_create('now', new DateTimeZone('America/Sao_Paulo'));\n \n while($i <= 11){\n $dataMensalidade = date('Y-m-d', strtotime($dados['dataInicio'].\"+$i month\"));\n $dataRepasse = date('Y-m-d', strtotime($inicioRepasse.\"+$i month\"));\n if($i==0){\n $mensalidade = [\n 'parcela' => $i + 1,\n 'valor' => $primeiraMensalidade,\n 'vencimento' => $dataPrimeira,\n ];\n\n $repasse = [\n 'parcela' => $i + 1,\n 'valor' => $primeiroRepasse,\n 'vencimento' => $dataRepasse,\n ];\n }else{\n $mensalidade = [\n 'parcela' => $i + 1,\n 'valor' => $valorMensalidade,\n 'vencimento' => $dataMensalidade,\n ];\n\n $repasse = [\n 'parcela' => $i + 1,\n 'valor' => $valorRepasse,\n 'vencimento' => $dataRepasse,\n ];\n }\n\n $mensalidade['idContrato'] = $repasse['idContrato'] = $idContrato;\n $mensalidade['modified'] = $mensalidade['created'] = $today->format(\"Y-m-d H:i:s\");\n $repasse['modified'] = $repasse['created'] = $today->format(\"Y-m-d H:i:s\");\n\n save('mensalidades',$mensalidade);\n save('repasses',$repasse);\n $i++;\n }\n}", "title": "" }, { "docid": "ab6c88a52e5c757a3db63c033ae1a2d5", "score": "0.53051406", "text": "function inflateTires() {\n \t\t\t;\n \t\t}", "title": "" }, { "docid": "f5b0513ff85793b5d5beec4b556d5078", "score": "0.5302288", "text": "public function get_besoins_ftdp() {\n\t\t$this->besoins_totaux = 0;\n\t\t$this->recolte_totale = 0;\n\t\t$this->revenus_fixes = array();\n\t\tforeach($this->membres as $pseudo => $valeurs) {\n\t\t\tif($valeurs->data_convois['activation'] == 'true') {\n\t\t\t\tif ($valeurs->data_convois['revenu_fixe'] != 'NON') {\n\t\t\t\t\t$this->revenus_fixes[$pseudo] = (int)$valeurs->data_convois['revenu_fixe'];\n\t\t\t\t\t$this->recolte_totale += (int)($valeurs->data_convois['recolte']*$this->parametres_convois['duree_repartition']);\n\t\t\t\t\t$this->recolte_totale -= $valeurs->data_convois['revenu_fixe'];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$this->membres[$pseudo]->get_tdp_unite(13);\n\t\t\t\t\t$formule = str_replace('n_tdp', $valeurs->niveaux->tdp, $this->parametres_convois['formule_tdp']);\n\t\t\t\t\t$formule = str_replace('tdp', $valeurs->niveaux->tdp_TE, $formule);\n\t\t\t\t\tif ($valeurs->data_convois['bonus'] != 0) {\n\t\t\t\t\t\t$this->membres[$pseudo]->data_convois['besoin'] = eval('return '.Text::carToPow($formule).';') * (1+$valeurs->data_convois['bonus']/100);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$this->membres[$pseudo]->data_convois['besoin'] = eval('return '.Text::carToPow($formule).';');\n\t\t\t\t\t}\n\t\t\t\t\t$this->besoins_totaux += $this->membres[$pseudo]->data_convois['besoin'];\n\t\t\t\t\t$this->recolte_totale += (int)($valeurs->data_convois['recolte']*$this->parametres_convois['duree_repartition']);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "36068b3a6f63b7e3b34d0df408e9d670", "score": "0.530006", "text": "function actividadDiariaIngresos(){\n require_once 'model/Atencion.php';\n $atencion = new Atencion();\n $consulta = $atencion->actividadDiariaIngresos();\n $fechas = array();\n foreach ($consulta as $a) {\n $total= $a[\"total\"];\n $fecha=$a[\"fecha\"];\n $fecha = date_create($fecha);\n $dia= date_format($fecha,'d');\n $mes=date_format($fecha,'m'); \n $ano=date_format($fecha,'Y');\n $fechas[intval($dia)]=array($fecha,$mes,$dia,$ano,$total); \n }\n \n for ($i = 1; $i <= 31; $i++) {\n if (empty($fechas[$i])) {\n $fechas[$i]=array(0,0,$i,0,0); \n }\n }\n \n $arreglo=\"\";\n \n for($i = 12; $i >= 0; $i--) {\n //$fecha=\"2017-07-05\"; \n $fecha=date(\"Y-m-d\"); \n $dias= $i;\n $d=date(\"d\", strtotime(\"$fecha -$dias day\"));\n $m=date(\"M\", strtotime(\"$fecha -$dias day\"));\n $D=date(\"D\", strtotime(\"$fecha -$dias day\"));\n $f=$fechas[intval($d)];\n //$arreglo=$arreglo.\"[gd($Y, $m, $f[2]), $f[4]],\"; \n \n $arreglo=$arreglo.'{\"period\": \"'.$D.\" \".$f[2].\" \".$m.'\",\"Hours worked\": '.$f[4].'},';\n //print_r($d);\n } \n \n echo $arreglo;\n }", "title": "" }, { "docid": "eebdcb07dcf435c7fc47f5d13dcbb878", "score": "0.52965695", "text": "function sumasdiasemana($fecha,$dias)\r\n{\r\n\t$datestart= strtotime($fecha);\r\n\t$diasemana = date('N',$datestart); // es para obtener el dia de la semana ejemplo (Jueves = 4) entonces N = 4\r\n\t\r\n\t$totaldias = $diasemana+$dias;\r\n\t\r\n\t$findesemana = intval( $totaldias/5) *2 ; \r\n\t\r\n\t$diasabado = $totaldias % 5 ; \r\n\tif ($diasabado==6) $findesemana++;\r\n\tif ($diasabado==0) $findesemana=$findesemana-2;\r\n\t\r\n\t$total = (($dias+$findesemana) * 86400)+$datestart ; //multiplicacion 86400 de numero de horas en el a�o \r\n\t\r\n//\treturn $twstart=date('Y-m-d', $total);\r\n\treturn $twstart=date('d-m-Y', $total);\r\n}", "title": "" }, { "docid": "f6564013b69e2c55d6217d18887dbf8e", "score": "0.52922374", "text": "function absoluteGetal() {\n//Hier reken je wat je er tussen kan berekenen door middel van the tekst te minnen en te plussen\n if($this->getal1 < $this->getal2){ \n// $this->getal1++; \n $this->getal2--; \n }\n else {\n $this->getal1--; \n// $this->getal2++; \n }\n // Hier heb je een do while waar hij berekent wat er allemaal tussen zit en de uitkomst\n if($this->getal1 < $this->getal2){ \n do {\n echo $this->getal1++.\" + \";\n $this->getal3 += $this->getal1;\n } \n while ($this->getal1 < $this->getal2);\n }\n else{\n do {\n echo $this->getal2++.\"+\";\n $this->getal3 += $this->getal2;\n } \n while ($this->getal1 > $this->getal2);\n } \n echo \" = \".$this->getal3;\n }", "title": "" } ]
f3b5a970908712fb424b5083ea5d234f
Mengambil data yang dikirimkan dengan variable baru agar variablenya dapat digunakan kembali
[ { "docid": "ee5ad3c1a4730597e3cc6a60caf81410", "score": "0.0", "text": "public function addRisk()\n {\n $aspek = $this->input->post('aspek');\n $profil = $this->input->post('profilRisiko');\n $sumber = $this->input->post('sumberRisiko');\n $keterangan = $this->input->post('keterangan');\n\n // menyimpan data yang ditangkap dengan array\n $risk = [\n\n 'aspek' => $aspek,\n 'profil_risiko' => $profil,\n 'sumber_risiko' => $sumber,\n 'keterangan' => $keterangan\n ];\n //insert ke database\n $this->Library_model->add_risk($risk);\n\n //memberikan notifikasi di tampilan\n $this->session->set_flashdata('message', '<div class=\"alert alert-success\" role=\"alert\">Data berhasil ditambahkan</div>');\n\n //merefresh page\n redirect('library/datasumber');\n }", "title": "" } ]
[ { "docid": "f00eb12586ba62871a61856348646e5b", "score": "0.65436935", "text": "public function get_data(){\n\t\t//membuat nilai array\n\t\t$data_mahasiswa =[\n\t\t\t[\"nama\"=>\"Kim Jefry\",\"prodi\"=>\"MIF\"],\n\t\t\t[\"nama\"=>\"Ahmad Kurniawan\",\"prodi\"=>\"TKK\"],\n\t\t\t[\"nama\"=>\"Budi Sudarsono\",\"prodi\"=>\"TIF\"]\n\t\t];\n\t\t//digunakan untuk mengembalikan nilai\n\t\treturn $data_mahasiswa;\n\t}", "title": "" }, { "docid": "f3e95de39ffd93e461673746be6989eb", "score": "0.65265", "text": "function lap_data_biaya_umum() {\n\t\t$uraian = isset($_REQUEST['uraian']) ? $_REQUEST['uraian'] : '';\n\t\t$untuk_kas = isset($_REQUEST['untuk_kas']) ? $_REQUEST['untuk_kas'] : '';\n\t\t$dari_akun = isset($_REQUEST['dari_akun']) ? $_REQUEST['dari_akun'] : '';\n\t\t$sql = \"SELECT biaya_umum.* FROM biaya_umum \";\n\t\t$where = \"\";\n\t\t$q = array(\n\t\t\t'uraian' => $uraian,\n\t\t\t'untuk_kas' => $untuk_kas,\n\t\t\t'dari_akun' => $dari_akun,\n\t\t);\n\t\tif(is_array($q)) {\n\t\t\tif($q['uraian'] != '') {\n\t\t\t\t$where .=\"WHERE biaya_umum.uraian = '\".$q['uraian'].\"' \";\n\t\t\t}\n\t\t\telse if($q['untuk_kas'] != '') {\n\t\t\t\t$where .=\"WHERE biaya_umum.untuk_kas = '\".$q['untuk_kas'].\"' \";\n\t\t\t} else {\n \t\tif($q['dari_akun'] != '') {\n\t\t\t\t\t$where .=\"WHERE biaya_umum.dari_akun = '\".$q['dari_akun'].\"' \";\n\t\t\t\t}\n\t \t}\n\n\t \tif($q['uraian'] != '' && $q['untuk_kas'] != ''){\n\t \t\t$where =\"WHERE biaya_umum.uraian LIKE '%\".$q['uraian'].\"%' AND biaya_umum.untuk_kas = '\".$q['untuk_kas'].\"' \";\n\t \t}\n\n\t \tif($q['uraian'] != '' && $q['dari_akun'] != ''){\n\t \t\t$where =\"WHERE biaya_umum.uraian LIKE '%\".$q['uraian'].\"%' AND biaya_umum.dari_akun = '\".$q['dari_akun'].\"' \";\n\t \t}\n\n\t \tif($q['untuk_kas'] != '' && $q['dari_akun'] != ''){\n\t \t\t$where =\"WHERE biaya_umum.dari_akun = '\".$q['dari_akun'].\"' AND biaya_umum.untuk_kas = '\".$q['untuk_kas'].\"' \";\n\t \t}\n\n\t \tif($q['uraian'] != '' && $q['untuk_kas'] != '' && $q['dari_akun'] != ''){\n\t \t\t$where =\"WHERE biaya_umum.uraian LIKE '%\".$q['uraian'].\"%' AND biaya_umum.untuk_kas = '\".$q['untuk_kas'].\"' AND biaya_umum.dari_akun = '\".$q['dari_akun'].\"'\";\n\t \t}\n\t\t}\n\t\t$sql .= $where;\n\t\t$query = $this->db->query($sql);\n\t\tif($query->num_rows() > 0) {\n\t\t\t$out = $query->result();\n\t\t\treturn $out;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "76d03294e69ff77bd3f049a8790793ca", "score": "0.64349025", "text": "function tampil_pengaturan()\n\t{\n\t\t$ambil = $this->koneksi->query(\"SELECT * FROM pengaturan\");\n\t\t// 2. memcah data ke array agarbisa digunakan id perulangan\n\t\twhile($pecah=$ambil->fetch_assoc())\n\t\t{\n\t\t\t// 3. menyimpan data setiap perulangan ke array yang besar (tas)\n\t\t\t$data[]=$pecah;\n\t\t}\n\t\t// 4. mengembalikan nilai krn datanya mau dipakai ditempat lain\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "7ce67e53262a2a8360bb0920b037e6d9", "score": "0.6427726", "text": "function tampil_data(){\n\t\t//Nama tabel yang diambil datanya dituliskan pada parameter seperti di bawah\n\t\t//Data yang diambil dari database ini dikembalikan ke pemanggil fungsi ini nantinya dengan return\n\t\treturn $this->db->get('user');\n }", "title": "" }, { "docid": "91c265794ba21891815edd81169c7ae6", "score": "0.6401808", "text": "function tampil_pelanggan()\n\t{\n\t\t// 1. mengambil data pelanggan dari tabel pelanggan\n\t\t$ambil = $this->koneksi->query(\"SELECT * FROM pelanggan\");\n\t\t// 2. memcah data ke array agarbisa digunakan id perulangan\n\t\twhile($pecah=$ambil->fetch_assoc())\n\t\t{\n\t\t\t// 3. menyimpan data setiap perulangan ke array yang besar (tas)\n\t\t\t$data[]=$pecah;\n\t\t}\n\t\t// 4. mengembalikan nilai krn datanya mau dipakai ditempat lain\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "1c0691e414b1e2230a0d7d9bdd302717", "score": "0.62408745", "text": "function datakembali()\n {\n $variabel['santrikembali'] = $this->m_perizinan_p->datasantrikembali();\n $this->layout->renderizinp2('back-end/perizinan_p/data_kembali',$variabel,'back-end/perizinan_p/denda_js');\n }", "title": "" }, { "docid": "619702649efa55184baa028b46aa1dc1", "score": "0.61571044", "text": "public function tampilkan_dataNota()\r\n {\r\n\r\n // return $this->db->query($query);\r\n $query= \"SELECT * from barangjual ORDER BY nama_barangjual ASC \";\r\n \r\n return $this->db->query($query);\r\n }", "title": "" }, { "docid": "22137fd90be8c5fe56cd20e08c813d0c", "score": "0.6119292", "text": "function datakembali(){\n $variabel['santrikembali'] = $this->m_perizinan->datasantrikembali();\n $this->layout->render2('back-end/datamaster/perizinan/data_kembali',$variabel,'back-end/datamaster/perizinan/denda_js');\n }", "title": "" }, { "docid": "d3cf36c25a1ba5481dd87cace0fd7829", "score": "0.60985595", "text": "function getDataKartuKeluarga()\n\t{\n\t\treturn $this->db->get('kartu_keluarga');\n\t}", "title": "" }, { "docid": "6df3fd3c5c42ef64d3d987b305f62e2e", "score": "0.60914487", "text": "public function get_data_latih(){\n\t\t$use = array();\n\t\t$sip = 0;\n\t\t$n = 1;\n\t\tforeach($this->data as $row){\n\t\t\tif(count(array_intersect($row['stem'], $this->input)) > 0){\n\t\t\t\t//ada\n\t\t\t\t$use[\"komentar\"][$n] = $row['komentar'];\n\t\t\t\t$use[\"stem\"][$n] = $row['stem'];\n\t\t\t\t$use[\"sentimen\"][$n] = $row['sentimen'];\n\t\t\t\t$n++;\n\t\t\t}\n\t\t\t$sip++;\n\t\t}\n\n\t\t//tweak penyesuaian\n\t\t$use[\"komentar\"][0] = null;\n\t\t$use[\"stem\"][0] = $this->input;\n\t\t$use[\"sentimen\"][0] = null;\n\n\t\t$this->use = $use;\n\t}", "title": "" }, { "docid": "5f157daa9a979db6a088f2d4468a61e4", "score": "0.6076595", "text": "function getDataPerempuan()\n\t{\n\t\treturn $this->db->get_where('data_penduduk', ['jenis_kelamin' => 'PEREMPUAN']);\n\t}", "title": "" }, { "docid": "feb3978840861e1cb8d8af18a2867124", "score": "0.6040764", "text": "function data_umum(){\n\t\t\t\t$sql=\"select *, GROUP_CONCAT(ruas_jalan) as ruas_jalan from data_umum JOIN data_umum_ruas on data_umum.id=data_umum_ruas.id group by data_umum.id \"; \n\t\t\t\t$row = $this-> db -> prepare($sql);\n\t\t\t\t$row -> execute();\n\t\t\t\t$hasil = $row -> fetchAll();\n\t\t\t\treturn $hasil;\n\t\t\t}", "title": "" }, { "docid": "be3e5f1c70bc39cff1a4ba94f22d32b9", "score": "0.6035429", "text": "function getDataMeninggal()\n\t{\n\t\treturn $this->db->get_where('data_penduduk', ['status' => 'MENINGGAL']);\n\t}", "title": "" }, { "docid": "faf2224ff7a2c859d1e011df0cd7736e", "score": "0.60343325", "text": "function tampilkan_data()\n\t{\n\t\t$this->db->query('set search_path to bikesharing');\n\t\treturn $this->db->query('select v.id_voucher,v.nama as nama_voucher, v.kategori, v.nilai_poin, v.deskripsi, v.no_kartu_anggota, p.nama as nama_anggota from voucher v, anggota a, person p where v.no_kartu_anggota=a.no_kartu and a.ktp=p.ktp');\n\t}", "title": "" }, { "docid": "5e6f71fb1800530218e52c238e6846e3", "score": "0.60233355", "text": "public function ambil_data()\n {\n return $this->db->get('tabel_so')->result();\n }", "title": "" }, { "docid": "408583ed758beea2e9d9179db7d966ac", "score": "0.5989265", "text": "public function tampilkanData()\n\t {\n\t \t$query = $this->db->select(\"*\")->from('article')->get();\n\t\treturn $query->result();\n\t }", "title": "" }, { "docid": "5c713527a7683d1bbcebc656ddb8f35d", "score": "0.59892076", "text": "function datarekapguru(){\n $pel = $this->input->get('pelajaran');\n $kel = $this->input->get('kelas');\n $tgl = $this->input->get('tanggal');\n $nip = $this->input->get('guru');\n $variabel['data'] = $this->m_rekap_guru->rekapguru($pel,$kel);\n $variabel['tanggal'] = $tgl;\n $variabel['kelas'] = $kel;\n $variabel['pelajaran'] = $pel;\n $variabel['nip_guru'] =$nip;\n $variabel['namakelas'] = $this->m_rekap_guru->kelas($kel);\n $variabel['matpel'] = $this->m_rekap_guru->pelajaran($pel);\n $variabel['guru'] = $this->m_rekap_guru->dataguru($nip);\n $this->layout->render('back-end/presensi/rekap_presensi/v_data_rekap_guru',$variabel,'back-end/presensi/rekap_presensi/v_rekap_js');\n }", "title": "" }, { "docid": "a7f0eed774f618379f5455564d8f9107", "score": "0.59777784", "text": "public function ambil_data_prodi()\n\t{\n\t\n $data_prodixx=$this->db->query(\"SELECT *\n\t\t\tFROM Akademik_SIMITS.dbo.ProgramStudi a INNER JOIN\n Akademik_SIMITS.dbo.Fakultas b ON a.PS_FA_ID = b.FA_ID\");\n\t\t$data_prodi=$this->simwisuda->query(\"SELECT a.KODEPRODI, a.NAMAPRODI, b.NAMAFAKULTAS_2, b.NAMASINGKATAN\n\t\t\t\t\tFROM PRODI a INNER JOIN\n\t\t\t\t\tFAKULTAS b ON SUBSTRING(a.KODEPRODI, 1, 1) = b.KODEFAKULTAS\");\n\t\t//$result = $this->simwisuda->query($data_prodi); \n\t\t//return $result;\n\t\treturn $data_prodi->result();\n }", "title": "" }, { "docid": "610697660db0dda634747dc9b0d00523", "score": "0.59694463", "text": "function bacaData($type, $nim) {\n $data = mysql_query(\"select * from mahasiswa where nim = '$nim'\");\n while ($hasil = mysql_fetch_array($data)) {\n if ($type == 'nama') {\n echo $hasil['nama'];\n } else if ($type == 'angkatan')\n echo $hasil['angkatan'];\n }\n }", "title": "" }, { "docid": "8b90203e07e8151293e80d3c088ba4ec", "score": "0.5967231", "text": "function pakeistiVarda($naujasVardas){\n $vardas = $naujasVardas;\n }", "title": "" }, { "docid": "349ca19a81a89c94e0a8a2f0ec7b0b85", "score": "0.5967098", "text": "public function getDataKriteria(){\r\n $data['dataku']=array(\r\n array('akhlak','rajin',2),\r\n array('akhlak','cerdas',4),\r\n array('rajin','cerdas',2)\r\n );\r\n\r\n return $data;\r\n }", "title": "" }, { "docid": "3637bb1331d08a357fec29c63186ae0a", "score": "0.59664", "text": "public function run()\n {\n $dusuns = [\n \t[\"name\"=>\"Karanglo\", \"data\"=>[\n \t\t[\"rt\"=>1, \"penduduk\"=>[\n \t\t\t['pendidikan'=>\"Tidak/Belum Sekolah\",\"data\"=>['L'=>12, 'P'=>17]],\n \t\t\t['pendidikan'=>\"Belum Tamat SD\",\"data\"=>['L'=>5, 'P'=>5]],\n \t\t\t['pendidikan'=>\"Tamat SD\",\"data\"=>['L'=>9, 'P'=>9]],\n \t\t\t['pendidikan'=>\"SLTP\",\"data\"=>['L'=>6, 'P'=>10]],\n \t\t\t['pendidikan'=>\"SLTA\",\"data\"=>['L'=>8, 'P'=>11]],\n \t\t\t['pendidikan'=>\"Diploma I/II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Akademi/Diplomat III/S. Muda\",\"data\"=>['L'=>3, 'P'=>2]],\n \t\t\t['pendidikan'=>\"Diploma IV/Strata I\",\"data\"=>['L'=>2, 'P'=>2]],\n \t\t\t['pendidikan'=>\"Strata II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Strata III\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t]],\n \t\t[\"rt\"=>2, \"penduduk\"=>[\n \t\t\t['pendidikan'=>\"Tidak/Belum Sekolah\",\"data\"=>['L'=>19, 'P'=>15]],\n \t\t\t['pendidikan'=>\"Belum Tamat SD\",\"data\"=>['L'=>13, 'P'=>13]],\n \t\t\t['pendidikan'=>\"Tamat SD\",\"data\"=>['L'=>18, 'P'=>22]],\n \t\t\t['pendidikan'=>\"SLTP\",\"data\"=>['L'=>9, 'P'=>14]],\n \t\t\t['pendidikan'=>\"SLTA\",\"data\"=>['L'=>10, 'P'=>7]],\n \t\t\t['pendidikan'=>\"Diploma I/II\",\"data\"=>['L'=>1, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Akademi/Diplomat III/S. Muda\",\"data\"=>['L'=>1, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Diploma IV/Strata I\",\"data\"=>['L'=>1, 'P'=>1]],\n \t\t\t['pendidikan'=>\"Strata II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Strata III\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t]],\n \t\t[\"rt\"=>3, \"penduduk\"=>[\n \t\t\t['pendidikan'=>\"Tidak/Belum Sekolah\",\"data\"=>['L'=>23, 'P'=>25]],\n \t\t\t['pendidikan'=>\"Belum Tamat SD\",\"data\"=>['L'=>20, 'P'=>20]],\n \t\t\t['pendidikan'=>\"Tamat SD\",\"data\"=>['L'=>16, 'P'=>25]],\n \t\t\t['pendidikan'=>\"SLTP\",\"data\"=>['L'=>17, 'P'=>20]],\n \t\t\t['pendidikan'=>\"SLTA\",\"data\"=>['L'=>18, 'P'=>15]],\n \t\t\t['pendidikan'=>\"Diploma I/II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Akademi/Diplomat III/S. Muda\",\"data\"=>['L'=>1, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Diploma IV/Strata I\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Strata II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Strata III\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t]],\n \t\t[\"rt\"=>4, \"penduduk\"=>[\n \t\t\t['pendidikan'=>\"Tidak/Belum Sekolah\",\"data\"=>['L'=>34, 'P'=>28]],\n \t\t\t['pendidikan'=>\"Belum Tamat SD\",\"data\"=>['L'=>15, 'P'=>15]],\n \t\t\t['pendidikan'=>\"Tamat SD\",\"data\"=>['L'=>44, 'P'=>30]],\n \t\t\t['pendidikan'=>\"SLTP\",\"data\"=>['L'=>14, 'P'=>16]],\n \t\t\t['pendidikan'=>\"SLTA\",\"data\"=>['L'=>14, 'P'=>18]],\n \t\t\t['pendidikan'=>\"Diploma I/II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Akademi/Diplomat III/S. Muda\",\"data\"=>['L'=>0, 'P'=>1]],\n \t\t\t['pendidikan'=>\"Diploma IV/Strata I\",\"data\"=>['L'=>3, 'P'=>3]],\n \t\t\t['pendidikan'=>\"Strata II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Strata III\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t]],\n \t\t[\"rt\"=>5, \"penduduk\"=>[\n \t\t\t['pendidikan'=>\"Tidak/Belum Sekolah\",\"data\"=>['L'=>54, 'P'=>38]],\n \t\t\t['pendidikan'=>\"Belum Tamat SD\",\"data\"=>['L'=>23, 'P'=>23]],\n \t\t\t['pendidikan'=>\"Tamat SD\",\"data\"=>['L'=>43, 'P'=>43]],\n \t\t\t['pendidikan'=>\"SLTP\",\"data\"=>['L'=>23, 'P'=>23]],\n \t\t\t['pendidikan'=>\"SLTA\",\"data\"=>['L'=>19, 'P'=>17]],\n \t\t\t['pendidikan'=>\"Diploma I/II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Akademi/Diplomat III/S. Muda\",\"data\"=>['L'=>2, 'P'=>5]],\n \t\t\t['pendidikan'=>\"Diploma IV/Strata I\",\"data\"=>['L'=>5, 'P'=>8]],\n \t\t\t['pendidikan'=>\"Strata II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Strata III\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t]],\n \t\t[\"rt\"=>6, \"penduduk\"=>[\n \t\t\t['pendidikan'=>\"Tidak/Belum Sekolah\",\"data\"=>['L'=>24, 'P'=>33]],\n \t\t\t['pendidikan'=>\"Belum Tamat SD\",\"data\"=>['L'=>26, 'P'=>26]],\n \t\t\t['pendidikan'=>\"Tamat SD\",\"data\"=>['L'=>30, 'P'=>25]],\n \t\t\t['pendidikan'=>\"SLTP\",\"data\"=>['L'=>15, 'P'=>19]],\n \t\t\t['pendidikan'=>\"SLTA\",\"data\"=>['L'=>10, 'P'=>15]],\n \t\t\t['pendidikan'=>\"Diploma I/II\",\"data\"=>['L'=>0, 'P'=>1]],\n \t\t\t['pendidikan'=>\"Akademi/Diplomat III/S. Muda\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Diploma IV/Strata I\",\"data\"=>['L'=>2, 'P'=>2]],\n \t\t\t['pendidikan'=>\"Strata II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Strata III\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t]],\n \t\t[\"rt\"=>7, \"penduduk\"=>[\n \t\t\t['pendidikan'=>\"Tidak/Belum Sekolah\",\"data\"=>['L'=>33, 'P'=>29]],\n \t\t\t['pendidikan'=>\"Belum Tamat SD\",\"data\"=>['L'=>15, 'P'=>15]],\n \t\t\t['pendidikan'=>\"Tamat SD\",\"data\"=>['L'=>30, 'P'=>28]],\n \t\t\t['pendidikan'=>\"SLTP\",\"data\"=>['L'=>15, 'P'=>14]],\n \t\t\t['pendidikan'=>\"SLTA\",\"data\"=>['L'=>7, 'P'=>14]],\n \t\t\t['pendidikan'=>\"Diploma I/II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Akademi/Diplomat III/S. Muda\",\"data\"=>['L'=>2, 'P'=>1]],\n \t\t\t['pendidikan'=>\"Diploma IV/Strata I\",\"data\"=>['L'=>1, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Strata II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Strata III\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t]]\n \t\n \t]],\n \t[\"name\"=>\"Jurang\", \"data\"=>[\n \t\t[\"rt\"=>1, \"penduduk\"=>[\n \t\t\t['pendidikan'=>\"Tidak/Belum Sekolah\",\"data\"=>['L'=>23, 'P'=>14]],\n \t\t\t['pendidikan'=>\"Belum Tamat SD\",\"data\"=>['L'=>12, 'P'=>12]],\n \t\t\t['pendidikan'=>\"Tamat SD\",\"data\"=>['L'=>19, 'P'=>23]],\n \t\t\t['pendidikan'=>\"SLTP\",\"data\"=>['L'=>12, 'P'=>10]],\n \t\t\t['pendidikan'=>\"SLTA\",\"data\"=>['L'=>12, 'P'=>9]],\n \t\t\t['pendidikan'=>\"Diploma I/II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Akademi/Diplomat III/S. Muda\",\"data\"=>['L'=>1, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Diploma IV/Strata I\",\"data\"=>['L'=>1, 'P'=>3]],\n \t\t\t['pendidikan'=>\"Strata II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Strata III\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t]],\n \t\t[\"rt\"=>2, \"penduduk\"=>[\n \t\t\t['pendidikan'=>\"Tidak/Belum Sekolah\",\"data\"=>['L'=>16, 'P'=>24]],\n \t\t\t['pendidikan'=>\"Belum Tamat SD\",\"data\"=>['L'=>18, 'P'=>18]],\n \t\t\t['pendidikan'=>\"Tamat SD\",\"data\"=>['L'=>23, 'P'=>22]],\n \t\t\t['pendidikan'=>\"SLTP\",\"data\"=>['L'=>15, 'P'=>6]],\n \t\t\t['pendidikan'=>\"SLTA\",\"data\"=>['L'=>10, 'P'=>7]],\n \t\t\t['pendidikan'=>\"Diploma I/II\",\"data\"=>['L'=>0, 'P'=>1]],\n \t\t\t['pendidikan'=>\"Akademi/Diplomat III/S. Muda\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Diploma IV/Strata I\",\"data\"=>['L'=>0, 'P'=>1]],\n \t\t\t['pendidikan'=>\"Strata II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Strata III\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t]],\n \t\t[\"rt\"=>3, \"penduduk\"=>[\n \t\t\t['pendidikan'=>\"Tidak/Belum Sekolah\",\"data\"=>['L'=>18, 'P'=>14]],\n \t\t\t['pendidikan'=>\"Belum Tamat SD\",\"data\"=>['L'=>15, 'P'=>15]],\n \t\t\t['pendidikan'=>\"Tamat SD\",\"data\"=>['L'=>27, 'P'=>26]],\n \t\t\t['pendidikan'=>\"SLTP\",\"data\"=>['L'=>8, 'P'=>8]],\n \t\t\t['pendidikan'=>\"SLTA\",\"data\"=>['L'=>5, 'P'=>3]],\n \t\t\t['pendidikan'=>\"Diploma I/II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Akademi/Diplomat III/S. Muda\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Diploma IV/Strata I\",\"data\"=>['L'=>0, 'P'=>1]],\n \t\t\t['pendidikan'=>\"Strata II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Strata III\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t]],\n \t\t[\"rt\"=>4, \"penduduk\"=>[\n \t\t\t['pendidikan'=>\"Tidak/Belum Sekolah\",\"data\"=>['L'=>27, 'P'=>32]],\n \t\t\t['pendidikan'=>\"Belum Tamat SD\",\"data\"=>['L'=>24, 'P'=>24]],\n \t\t\t['pendidikan'=>\"Tamat SD\",\"data\"=>['L'=>29, 'P'=>33]],\n \t\t\t['pendidikan'=>\"SLTP\",\"data\"=>['L'=>6, 'P'=>10]],\n \t\t\t['pendidikan'=>\"SLTA\",\"data\"=>['L'=>5, 'P'=>6]],\n \t\t\t['pendidikan'=>\"Diploma I/II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Akademi/Diplomat III/S. Muda\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Diploma IV/Strata I\",\"data\"=>['L'=>1, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Strata II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Strata III\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t]]\n \t\n \t]],\n \t[\"name\"=>\"Kenteng\", \"data\"=>[\n \t\t[\"rt\"=>1, \"penduduk\"=>[\n \t\t\t['pendidikan'=>\"Tidak/Belum Sekolah\",\"data\"=>['L'=>29, 'P'=>19]],\n \t\t\t['pendidikan'=>\"Belum Tamat SD\",\"data\"=>['L'=>20, 'P'=>20]],\n \t\t\t['pendidikan'=>\"Tamat SD\",\"data\"=>['L'=>21, 'P'=>15]],\n \t\t\t['pendidikan'=>\"SLTP\",\"data\"=>['L'=>13, 'P'=>10]],\n \t\t\t['pendidikan'=>\"SLTA\",\"data\"=>['L'=>9, 'P'=>8]],\n \t\t\t['pendidikan'=>\"Diploma I/II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Akademi/Diplomat III/S. Muda\",\"data\"=>['L'=>0, 'P'=>1]],\n \t\t\t['pendidikan'=>\"Diploma IV/Strata I\",\"data\"=>['L'=>1, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Strata II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Strata III\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t]],\n \t\t[\"rt\"=>2, \"penduduk\"=>[\n \t\t\t['pendidikan'=>\"Tidak/Belum Sekolah\",\"data\"=>['L'=>22, 'P'=>17]],\n \t\t\t['pendidikan'=>\"Belum Tamat SD\",\"data\"=>['L'=>8, 'P'=>8]],\n \t\t\t['pendidikan'=>\"Tamat SD\",\"data\"=>['L'=>17, 'P'=>12]],\n \t\t\t['pendidikan'=>\"SLTP\",\"data\"=>['L'=>9, 'P'=>12]],\n \t\t\t['pendidikan'=>\"SLTA\",\"data\"=>['L'=>4, 'P'=>4]],\n \t\t\t['pendidikan'=>\"Diploma I/II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Akademi/Diplomat III/S. Muda\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Diploma IV/Strata I\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Strata II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Strata III\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t]],\n \t\t[\"rt\"=>3, \"penduduk\"=>[\n \t\t\t['pendidikan'=>\"Tidak/Belum Sekolah\",\"data\"=>['L'=>23, 'P'=>21]],\n \t\t\t['pendidikan'=>\"Belum Tamat SD\",\"data\"=>['L'=>15, 'P'=>15]],\n \t\t\t['pendidikan'=>\"Tamat SD\",\"data\"=>['L'=>14, 'P'=>23]],\n \t\t\t['pendidikan'=>\"SLTP\",\"data\"=>['L'=>17, 'P'=>12]],\n \t\t\t['pendidikan'=>\"SLTA\",\"data\"=>['L'=>5, 'P'=>6]],\n \t\t\t['pendidikan'=>\"Diploma I/II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Akademi/Diplomat III/S. Muda\",\"data\"=>['L'=>1, 'P'=>1]],\n \t\t\t['pendidikan'=>\"Diploma IV/Strata I\",\"data\"=>['L'=>2, 'P'=>1]],\n \t\t\t['pendidikan'=>\"Strata II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Strata III\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t]],\n \t\t[\"rt\"=>4, \"penduduk\"=>[\n \t\t\t['pendidikan'=>\"Tidak/Belum Sekolah\",\"data\"=>['L'=>20, 'P'=>12]],\n \t\t\t['pendidikan'=>\"Belum Tamat SD\",\"data\"=>['L'=>10, 'P'=>10]],\n \t\t\t['pendidikan'=>\"Tamat SD\",\"data\"=>['L'=>11, 'P'=>18]],\n \t\t\t['pendidikan'=>\"SLTP\",\"data\"=>['L'=>14, 'P'=>9]],\n \t\t\t['pendidikan'=>\"SLTA\",\"data\"=>['L'=>10, 'P'=>9]],\n \t\t\t['pendidikan'=>\"Diploma I/II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Akademi/Diplomat III/S. Muda\",\"data\"=>['L'=>1, 'P'=>1]],\n \t\t\t['pendidikan'=>\"Diploma IV/Strata I\",\"data\"=>['L'=>2, 'P'=>2]],\n \t\t\t['pendidikan'=>\"Strata II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Strata III\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t]]\n \t\n \t]],\n\n \t[\"name\"=>\"Gelaran\", \"data\"=>[\n \t\t[\"rt\"=>1, \"penduduk\"=>[\n \t\t\t['pendidikan'=>\"Tidak/Belum Sekolah\",\"data\"=>['L'=>35, 'P'=>40]],\n \t\t\t['pendidikan'=>\"Belum Tamat SD\",\"data\"=>['L'=>20, 'P'=>20]],\n \t\t\t['pendidikan'=>\"Tamat SD\",\"data\"=>['L'=>37, 'P'=>30]],\n \t\t\t['pendidikan'=>\"SLTP\",\"data\"=>['L'=>24, 'P'=>25]],\n \t\t\t['pendidikan'=>\"SLTA\",\"data\"=>['L'=>23, 'P'=>20]],\n \t\t\t['pendidikan'=>\"Diploma I/II\",\"data\"=>['L'=>0, 'P'=>2]],\n \t\t\t['pendidikan'=>\"Akademi/Diplomat III/S. Muda\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Diploma IV/Strata I\",\"data\"=>['L'=>4, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Strata II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Strata III\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t]],\n \t\t[\"rt\"=>2, \"penduduk\"=>[\n \t\t\t['pendidikan'=>\"Tidak/Belum Sekolah\",\"data\"=>['L'=>27, 'P'=>24]],\n \t\t\t['pendidikan'=>\"Belum Tamat SD\",\"data\"=>['L'=>18, 'P'=>18]],\n \t\t\t['pendidikan'=>\"Tamat SD\",\"data\"=>['L'=>27, 'P'=>19]],\n \t\t\t['pendidikan'=>\"SLTP\",\"data\"=>['L'=>11, 'P'=>18]],\n \t\t\t['pendidikan'=>\"SLTA\",\"data\"=>['L'=>26, 'P'=>21]],\n \t\t\t['pendidikan'=>\"Diploma I/II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Akademi/Diplomat III/S. Muda\",\"data\"=>['L'=>3, 'P'=>1]],\n \t\t\t['pendidikan'=>\"Diploma IV/Strata I\",\"data\"=>['L'=>8, 'P'=>6]],\n \t\t\t['pendidikan'=>\"Strata II\",\"data\"=>['L'=>0, 'P'=>1]],\n \t\t\t['pendidikan'=>\"Strata III\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t]],\n \t\t[\"rt\"=>3, \"penduduk\"=>[\n \t\t\t['pendidikan'=>\"Tidak/Belum Sekolah\",\"data\"=>['L'=>17, 'P'=>14]],\n \t\t\t['pendidikan'=>\"Belum Tamat SD\",\"data\"=>['L'=>7, 'P'=>7]],\n \t\t\t['pendidikan'=>\"Tamat SD\",\"data\"=>['L'=>12, 'P'=>14]],\n \t\t\t['pendidikan'=>\"SLTP\",\"data\"=>['L'=>12, 'P'=>6]],\n \t\t\t['pendidikan'=>\"SLTA\",\"data\"=>['L'=>16, 'P'=>17]],\n \t\t\t['pendidikan'=>\"Diploma I/II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Akademi/Diplomat III/S. Muda\",\"data\"=>['L'=>2, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Diploma IV/Strata I\",\"data\"=>['L'=>0, 'P'=>4]],\n \t\t\t['pendidikan'=>\"Strata II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Strata III\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t]],\n \t\t[\"rt\"=>4, \"penduduk\"=>[\n \t\t\t['pendidikan'=>\"Tidak/Belum Sekolah\",\"data\"=>['L'=>16, 'P'=>13]],\n \t\t\t['pendidikan'=>\"Belum Tamat SD\",\"data\"=>['L'=>6, 'P'=>6]],\n \t\t\t['pendidikan'=>\"Tamat SD\",\"data\"=>['L'=>9, 'P'=>13]],\n \t\t\t['pendidikan'=>\"SLTP\",\"data\"=>['L'=>8, 'P'=>10]],\n \t\t\t['pendidikan'=>\"SLTA\",\"data\"=>['L'=>18, 'P'=>13]],\n \t\t\t['pendidikan'=>\"Diploma I/II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Akademi/Diplomat III/S. Muda\",\"data\"=>['L'=>1, 'P'=>1]],\n \t\t\t['pendidikan'=>\"Diploma IV/Strata I\",\"data\"=>['L'=>2, 'P'=>1]],\n \t\t\t['pendidikan'=>\"Strata II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Strata III\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t]]\n \t\n \t]],\n\n \t[\"name\"=>\"Clowok\", \"data\"=>[\n \t\t\t[\"rt\"=>1, \"penduduk\"=>[\n \t\t\t['pendidikan'=>\"Tidak/Belum Sekolah\",\"data\"=>['L'=>24, 'P'=>19]],\n \t\t\t['pendidikan'=>\"Belum Tamat SD\",\"data\"=>['L'=>20, 'P'=>20]],\n \t\t\t['pendidikan'=>\"Tamat SD\",\"data\"=>['L'=>16, 'P'=>15]],\n \t\t\t['pendidikan'=>\"SLTP\",\"data\"=>['L'=>9, 'P'=>8]],\n \t\t\t['pendidikan'=>\"SLTA\",\"data\"=>['L'=>5, 'P'=>10]],\n \t\t\t['pendidikan'=>\"Diploma I/II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Akademi/Diplomat III/S. Muda\",\"data\"=>['L'=>0, 'P'=>2]],\n \t\t\t['pendidikan'=>\"Diploma IV/Strata I\",\"data\"=>['L'=>4, 'P'=>4]],\n \t\t\t['pendidikan'=>\"Strata II\",\"data\"=>['L'=>1, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Strata III\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t]],\n \t\t[\"rt\"=>2, \"penduduk\"=>[\n \t\t\t['pendidikan'=>\"Tidak/Belum Sekolah\",\"data\"=>['L'=>22, 'P'=>28]],\n \t\t\t['pendidikan'=>\"Belum Tamat SD\",\"data\"=>['L'=>16, 'P'=>16]],\n \t\t\t['pendidikan'=>\"Tamat SD\",\"data\"=>['L'=>20, 'P'=>19]],\n \t\t\t['pendidikan'=>\"SLTP\",\"data\"=>['L'=>13, 'P'=>13]],\n \t\t\t['pendidikan'=>\"SLTA\",\"data\"=>['L'=>10, 'P'=>14]],\n \t\t\t['pendidikan'=>\"Diploma I/II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Akademi/Diplomat III/S. Muda\",\"data\"=>['L'=>1, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Diploma IV/Strata I\",\"data\"=>['L'=>1, 'P'=>1]],\n \t\t\t['pendidikan'=>\"Strata II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Strata III\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t]],\n \t\n \t]],\n\n \t[\"name\"=>\"Ampelgading\", \"data\"=>[\n \t\t[\"rt\"=>1, \"penduduk\"=>[\n \t\t\t['pendidikan'=>\"Tidak/Belum Sekolah\",\"data\"=>['L'=>37, 'P'=>28]],\n \t\t\t['pendidikan'=>\"Belum Tamat SD\",\"data\"=>['L'=>28, 'P'=>28]],\n \t\t\t['pendidikan'=>\"Tamat SD\",\"data\"=>['L'=>28, 'P'=>28]],\n \t\t\t['pendidikan'=>\"SLTP\",\"data\"=>['L'=>21, 'P'=>24]],\n \t\t\t['pendidikan'=>\"SLTA\",\"data\"=>['L'=>9, 'P'=>7]],\n \t\t\t['pendidikan'=>\"Diploma I/II\",\"data\"=>['L'=>1, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Akademi/Diplomat III/S. Muda\",\"data\"=>['L'=>1, 'P'=>1]],\n \t\t\t['pendidikan'=>\"Diploma IV/Strata I\",\"data\"=>['L'=>1, 'P'=>2]],\n \t\t\t['pendidikan'=>\"Strata II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Strata III\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t]],\n \t\t[\"rt\"=>2, \"penduduk\"=>[\n \t\t\t['pendidikan'=>\"Tidak/Belum Sekolah\",\"data\"=>['L'=>16, 'P'=>37]],\n \t\t\t['pendidikan'=>\"Belum Tamat SD\",\"data\"=>['L'=>20, 'P'=>20]],\n \t\t\t['pendidikan'=>\"Tamat SD\",\"data\"=>['L'=>29, 'P'=>22]],\n \t\t\t['pendidikan'=>\"SLTP\",\"data\"=>['L'=>14, 'P'=>14]],\n \t\t\t['pendidikan'=>\"SLTA\",\"data\"=>['L'=>4, 'P'=>10]],\n \t\t\t['pendidikan'=>\"Diploma I/II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Akademi/Diplomat III/S. Muda\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Diploma IV/Strata I\",\"data\"=>['L'=>1, 'P'=>4]],\n \t\t\t['pendidikan'=>\"Strata II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Strata III\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t]],\n \t\t[\"rt\"=>3, \"penduduk\"=>[\n \t\t\t['pendidikan'=>\"Tidak/Belum Sekolah\",\"data\"=>['L'=>25, 'P'=>15]],\n \t\t\t['pendidikan'=>\"Belum Tamat SD\",\"data\"=>['L'=>15, 'P'=>15]],\n \t\t\t['pendidikan'=>\"Tamat SD\",\"data\"=>['L'=>15, 'P'=>18]],\n \t\t\t['pendidikan'=>\"SLTP\",\"data\"=>['L'=>14, 'P'=>10]],\n \t\t\t['pendidikan'=>\"SLTA\",\"data\"=>['L'=>13, 'P'=>12]],\n \t\t\t['pendidikan'=>\"Diploma I/II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Akademi/Diplomat III/S. Muda\",\"data\"=>['L'=>0, 'P'=>1]],\n \t\t\t['pendidikan'=>\"Diploma IV/Strata I\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Strata II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Strata III\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t]],\n \t\t[\"rt\"=>4, \"penduduk\"=>[\n \t\t\t['pendidikan'=>\"Tidak/Belum Sekolah\",\"data\"=>['L'=>20, 'P'=>28]],\n \t\t\t['pendidikan'=>\"Belum Tamat SD\",\"data\"=>['L'=>24, 'P'=>24]],\n \t\t\t['pendidikan'=>\"Tamat SD\",\"data\"=>['L'=>19, 'P'=>19]],\n \t\t\t['pendidikan'=>\"SLTP\",\"data\"=>['L'=>9, 'P'=>16]],\n \t\t\t['pendidikan'=>\"SLTA\",\"data\"=>['L'=>14, 'P'=>9]],\n \t\t\t['pendidikan'=>\"Diploma I/II\",\"data\"=>['L'=>0, 'P'=>2]],\n \t\t\t['pendidikan'=>\"Akademi/Diplomat III/S. Muda\",\"data\"=>['L'=>2, 'P'=>2]],\n \t\t\t['pendidikan'=>\"Diploma IV/Strata I\",\"data\"=>['L'=>3, 'P'=>4]],\n \t\t\t['pendidikan'=>\"Strata II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Strata III\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t]],\n \t\t[\"rt\"=>5, \"penduduk\"=>[\n \t\t\t['pendidikan'=>\"Tidak/Belum Sekolah\",\"data\"=>['L'=>17, 'P'=>16]],\n \t\t\t['pendidikan'=>\"Belum Tamat SD\",\"data\"=>['L'=>19, 'P'=>19]],\n \t\t\t['pendidikan'=>\"Tamat SD\",\"data\"=>['L'=>23, 'P'=>17]],\n \t\t\t['pendidikan'=>\"SLTP\",\"data\"=>['L'=>8, 'P'=>14]],\n \t\t\t['pendidikan'=>\"SLTA\",\"data\"=>['L'=>11, 'P'=>13]],\n \t\t\t['pendidikan'=>\"Diploma I/II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Akademi/Diplomat III/S. Muda\",\"data\"=>['L'=>0, 'P'=>2]],\n \t\t\t['pendidikan'=>\"Diploma IV/Strata I\",\"data\"=>['L'=>5, 'P'=>5]],\n \t\t\t['pendidikan'=>\"Strata II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Strata III\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t]]\n\n \t]],\n\n \t[\"name\"=>\"Golak\", \"data\"=>[\n \t\t[\"rt\"=>1, \"penduduk\"=>[\n \t\t\t['pendidikan'=>\"Tidak/Belum Sekolah\",\"data\"=>['L'=>23, 'P'=>26]],\n \t\t\t['pendidikan'=>\"Belum Tamat SD\",\"data\"=>['L'=>10, 'P'=>10]],\n \t\t\t['pendidikan'=>\"Tamat SD\",\"data\"=>['L'=>21, 'P'=>12]],\n \t\t\t['pendidikan'=>\"SLTP\",\"data\"=>['L'=>9, 'P'=>11]],\n \t\t\t['pendidikan'=>\"SLTA\",\"data\"=>['L'=>21, 'P'=>25]],\n \t\t\t['pendidikan'=>\"Diploma I/II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Akademi/Diplomat III/S. Muda\",\"data\"=>['L'=>1, 'P'=>2]],\n \t\t\t['pendidikan'=>\"Diploma IV/Strata I\",\"data\"=>['L'=>2, 'P'=>4]],\n \t\t\t['pendidikan'=>\"Strata II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Strata III\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t]],\n \t\t[\"rt\"=>2, \"penduduk\"=>[\n \t\t\t['pendidikan'=>\"Tidak/Belum Sekolah\",\"data\"=>['L'=>23, 'P'=>33]],\n \t\t\t['pendidikan'=>\"Belum Tamat SD\",\"data\"=>['L'=>18, 'P'=>18]],\n \t\t\t['pendidikan'=>\"Tamat SD\",\"data\"=>['L'=>19, 'P'=>23]],\n \t\t\t['pendidikan'=>\"SLTP\",\"data\"=>['L'=>17, 'P'=>13]],\n \t\t\t['pendidikan'=>\"SLTA\",\"data\"=>['L'=>19, 'P'=>20]],\n \t\t\t['pendidikan'=>\"Diploma I/II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Akademi/Diplomat III/S. Muda\",\"data\"=>['L'=>5, 'P'=>4]],\n \t\t\t['pendidikan'=>\"Diploma IV/Strata I\",\"data\"=>['L'=>6, 'P'=>5]],\n \t\t\t['pendidikan'=>\"Strata II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Strata III\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t]],\n \t\t[\"rt\"=>3, \"penduduk\"=>[\n \t\t\t['pendidikan'=>\"Tidak/Belum Sekolah\",\"data\"=>['L'=>24, 'P'=>25]],\n \t\t\t['pendidikan'=>\"Belum Tamat SD\",\"data\"=>['L'=>10, 'P'=>10]],\n \t\t\t['pendidikan'=>\"Tamat SD\",\"data\"=>['L'=>23, 'P'=>24]],\n \t\t\t['pendidikan'=>\"SLTP\",\"data\"=>['L'=>9, 'P'=>10]],\n \t\t\t['pendidikan'=>\"SLTA\",\"data\"=>['L'=>13, 'P'=>13]],\n \t\t\t['pendidikan'=>\"Diploma I/II\",\"data\"=>['L'=>0, 'P'=>1]],\n \t\t\t['pendidikan'=>\"Akademi/Diplomat III/S. Muda\",\"data\"=>['L'=>1, 'P'=>2]],\n \t\t\t['pendidikan'=>\"Diploma IV/Strata I\",\"data\"=>['L'=>1, 'P'=>1]],\n \t\t\t['pendidikan'=>\"Strata II\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t\t['pendidikan'=>\"Strata III\",\"data\"=>['L'=>0, 'P'=>0]],\n \t\t]],\n \t\n \t]],\n\n ];\n $getDusun = App\\Dusun::with('rukun_tetanggas')->get();\n $getPendidikan = App\\Pendidikan::get();\n foreach($dusuns as $key=>$value){\n \t$dusun_index = $getDusun->search(function($item, $key)use($value){\n \t\treturn $item->name==$value['name'];\n \t});\n \tforeach($value['data'] as $key2=>$value2){\n \t\t$rt_index = $getDusun[$dusun_index]->rukun_tetanggas->search(function($item, $key)use($value2){\n \t\t\treturn $item->rt_no==$value2[\"rt\"];\n \t\t});\n \t\tforeach($value2['penduduk'] as $key3=>$value3){\n \t\t\t$pendidikan_index = $getPendidikan->search(function($item, $key)use($value3){\n \t\t\t\treturn $item->name==$value3['pendidikan'];\n \t\t\t});\n \t\t\t$data = ['rukun_tetangga_id'=>$getDusun[$dusun_index]->rukun_tetanggas[$rt_index]->id, 'pendidikan_id'=>$getPendidikan[$pendidikan_index]->id,'gender'=>'L','jumlah'=>$value3['data']['L']];\n \t\t\t$data2 = ['rukun_tetangga_id'=>$getDusun[$dusun_index]->rukun_tetanggas[$rt_index]->id, 'pendidikan_id'=>$getPendidikan[$pendidikan_index]->id,'gender'=>'P','jumlah'=>$value3['data']['P']];\n \t\t\tApp\\BasedPendidikan::create($data);\n \t\t\tApp\\BasedPendidikan::create($data2);\n \t\t}\n \t}\n \n }\n }", "title": "" }, { "docid": "50aa22481dec0378f513aa2d9145e3f6", "score": "0.5965391", "text": "public function getDataKelompokYoy(Request $r)\n {\n try {\n if ($data = Auth::guard($this->guard)->user()) {\n $nik = $data->nik;\n $kode_lokasi = $data->kode_lokasi;\n }\n\n // $col_array = array('kode_grafik');\n // $db_col_name = array('a.kode_grafik');\n $kode_lokasi = $r->kode_lokasi;\n $kode_grafik1 = $r->query('kode_grafik')[1];\n if ($r->query('kode_grafik')[1] == \"PI01\") {\n $kode_grafik2 = \"PI05\";\n } elseif ($r->query('kode_grafik')[1] == \"PI02\") {\n $kode_grafik2 = \"PI06\";\n } else {\n $kode_grafik2 = $r->query('kode_grafik')[1];\n }\n\n $where = \"WHERE a.kode_grafik = '\" . $kode_grafik2 . \"' and a.kode_fs='FS1' \";\n\n $tahun = intval($r->query('periode')[1]);\n $periode = [];\n for ($i = 0; $i <= 5; $i++) {\n if ($i == 0) {\n array_push($periode, $tahun);\n } else {\n $tahun = $tahun - 100;\n array_push($periode, $tahun);\n }\n }\n\n if (isset($r->jenis) && $r->jenis != \"\") {\n if ($r->jenis == \"PRD\") {\n $n4 = \"n6\";\n } else {\n $n4 = \"n4\";\n }\n } else {\n $n4 = \"n4\";\n }\n\n\n if (isset($r->kode_bidang) && $r->kode_bidang != \"\") {\n $kode_bidang = $r->kode_bidang;\n if(isset($r->kode_pp) && $r->kode_pp != \"\"){\n $kode_pp = $r->kode_pp;\n $sql = \"SELECT DISTINCT a.kode_neraca,UPPER(a.nama) as nama, ISNULL(b.n3,0) AS n3, ISNULL(b.n4,0) AS n4, ISNULL(b.n5,0) AS n5, \n ISNULL(b.n6,0) AS n6\n FROM neraca a\n INNER JOIN (\n SELECT a.kode_neraca,\n SUM(CASE WHEN b.jenis_akun <> 'Pendapatan' THEN ISNULL(b.$n4,0) ELSE -ISNULL(b.$n4,0) END) AS n1,\n SUM(CASE WHEN c.jenis_akun <> 'Pendapatan' THEN ISNULL(c.$n4,0) ELSE -ISNULL(c.$n4,0) END) AS n2,\n SUM(CASE WHEN d.jenis_akun <> 'Pendapatan' THEN ISNULL(d.$n4,0) ELSE -ISNULL(d.$n4,0) END) AS n3,\n SUM(CASE WHEN e.jenis_akun <> 'Pendapatan' THEN ISNULL(e.$n4,0) ELSE -ISNULL(e.$n4,0) END) AS n4,\n SUM(CASE WHEN f.jenis_akun <> 'Pendapatan' THEN ISNULL(f.$n4,0) ELSE -ISNULL(f.$n4,0) END) AS n5,\n SUM(CASE WHEN g.jenis_akun <> 'Pendapatan' THEN ISNULL(g.$n4,0) ELSE -ISNULL(g.$n4,0) END) AS n6\n FROM dash_ypt_grafik_d a\n INNER JOIN dash_ypt_grafik_m x ON a.kode_grafik=x.kode_grafik AND a.kode_lokasi=x.kode_lokasi\n LEFT JOIN exs_neraca_pp b ON a.kode_neraca=b.kode_neraca AND b.kode_lokasi='$kode_lokasi' and b.kode_pp='$kode_pp' AND a.kode_fs=b.kode_fs AND b.periode='\" . $periode[5] . \"'\n LEFT JOIN exs_neraca_pp c ON a.kode_neraca=c.kode_neraca AND c.kode_lokasi='$kode_lokasi' and c.kode_pp='$kode_pp' AND a.kode_fs=c.kode_fs AND c.periode='\" . $periode[4] . \"'\n LEFT JOIN exs_neraca_pp d ON a.kode_neraca=d.kode_neraca AND d.kode_lokasi='$kode_lokasi' and d.kode_pp='$kode_pp' AND a.kode_fs=d.kode_fs AND d.periode='\" . $periode[3] . \"'\n LEFT JOIN exs_neraca_pp e ON a.kode_neraca=e.kode_neraca AND e.kode_lokasi='$kode_lokasi' and e.kode_pp='$kode_pp' AND a.kode_fs=e.kode_fs AND e.periode='\" . $periode[2] . \"'\n LEFT JOIN exs_neraca_pp f ON a.kode_neraca=f.kode_neraca AND f.kode_lokasi='$kode_lokasi' and f.kode_pp='$kode_pp' AND a.kode_fs=f.kode_fs AND f.periode='\" . $periode[1] . \"'\n LEFT JOIN exs_neraca_pp g ON a.kode_neraca=g.kode_neraca AND g.kode_lokasi='$kode_lokasi' and g.kode_pp='$kode_pp' AND a.kode_fs=g.kode_fs AND g.periode='\" . $periode[0] . \"'\n $where \n GROUP BY a.kode_neraca\n )b ON a.kode_neraca=b.kode_neraca \n where a.kode_lokasi='$kode_lokasi' and a.kode_fs='FS1' \";\n }else{\n\n $sql = \"SELECT DISTINCT a.kode_neraca,UPPER(a.nama) as nama, ISNULL(b.n3,0) AS n3, ISNULL(b.n4,0) AS n4, ISNULL(b.n5,0) AS n5, \n ISNULL(b.n6,0) AS n6\n FROM neraca a\n INNER JOIN (\n SELECT a.kode_neraca,\n SUM(CASE WHEN b.jenis_akun <> 'Pendapatan' THEN ISNULL(b.$n4,0) ELSE -ISNULL(b.$n4,0) END) AS n1,\n SUM(CASE WHEN c.jenis_akun <> 'Pendapatan' THEN ISNULL(c.$n4,0) ELSE -ISNULL(c.$n4,0) END) AS n2,\n SUM(CASE WHEN d.jenis_akun <> 'Pendapatan' THEN ISNULL(d.$n4,0) ELSE -ISNULL(d.$n4,0) END) AS n3,\n SUM(CASE WHEN e.jenis_akun <> 'Pendapatan' THEN ISNULL(e.$n4,0) ELSE -ISNULL(e.$n4,0) END) AS n4,\n SUM(CASE WHEN f.jenis_akun <> 'Pendapatan' THEN ISNULL(f.$n4,0) ELSE -ISNULL(f.$n4,0) END) AS n5,\n SUM(CASE WHEN g.jenis_akun <> 'Pendapatan' THEN ISNULL(g.$n4,0) ELSE -ISNULL(g.$n4,0) END) AS n6\n FROM dash_ypt_grafik_d a\n INNER JOIN dash_ypt_grafik_m x ON a.kode_grafik=x.kode_grafik AND a.kode_lokasi=x.kode_lokasi\n LEFT JOIN exs_neraca_bidang b ON a.kode_neraca=b.kode_neraca AND b.kode_lokasi='$kode_lokasi' and b.kode_bidang='$kode_bidang' AND a.kode_fs=b.kode_fs AND b.periode='\" . $periode[5] . \"'\n LEFT JOIN exs_neraca_bidang c ON a.kode_neraca=c.kode_neraca AND c.kode_lokasi='$kode_lokasi' and c.kode_bidang='$kode_bidang' AND a.kode_fs=c.kode_fs AND c.periode='\" . $periode[4] . \"'\n LEFT JOIN exs_neraca_bidang d ON a.kode_neraca=d.kode_neraca AND d.kode_lokasi='$kode_lokasi' and d.kode_bidang='$kode_bidang' AND a.kode_fs=d.kode_fs AND d.periode='\" . $periode[3] . \"'\n LEFT JOIN exs_neraca_bidang e ON a.kode_neraca=e.kode_neraca AND e.kode_lokasi='$kode_lokasi' and e.kode_bidang='$kode_bidang' AND a.kode_fs=e.kode_fs AND e.periode='\" . $periode[2] . \"'\n LEFT JOIN exs_neraca_bidang f ON a.kode_neraca=f.kode_neraca AND f.kode_lokasi='$kode_lokasi' and f.kode_bidang='$kode_bidang' AND a.kode_fs=f.kode_fs AND f.periode='\" . $periode[1] . \"'\n LEFT JOIN exs_neraca_bidang g ON a.kode_neraca=g.kode_neraca AND g.kode_lokasi='$kode_lokasi' and g.kode_bidang='$kode_bidang' AND a.kode_fs=g.kode_fs AND g.periode='\" . $periode[0] . \"'\n $where \n GROUP BY a.kode_neraca\n )b ON a.kode_neraca=b.kode_neraca \n where a.kode_lokasi='$kode_lokasi' and a.kode_fs='FS1' \";\n }\n\n } else {\n\n $sql = \"SELECT DISTINCT a.kode_neraca,UPPER(a.nama) as nama, ISNULL(b.n3,0) AS n3, ISNULL(b.n4,0) AS n4, ISNULL(b.n5,0) AS n5, \n ISNULL(b.n6,0) AS n6\n FROM neraca a\n INNER JOIN (\n SELECT a.kode_neraca,\n SUM(CASE WHEN b.jenis_akun <> 'Pendapatan' THEN ISNULL(b.$n4,0) ELSE -ISNULL(b.$n4,0) END) AS n1,\n SUM(CASE WHEN c.jenis_akun <> 'Pendapatan' THEN ISNULL(c.$n4,0) ELSE -ISNULL(c.$n4,0) END) AS n2,\n SUM(CASE WHEN d.jenis_akun <> 'Pendapatan' THEN ISNULL(d.$n4,0) ELSE -ISNULL(d.$n4,0) END) AS n3,\n SUM(CASE WHEN e.jenis_akun <> 'Pendapatan' THEN ISNULL(e.$n4,0) ELSE -ISNULL(e.$n4,0) END) AS n4,\n SUM(CASE WHEN f.jenis_akun <> 'Pendapatan' THEN ISNULL(f.$n4,0) ELSE -ISNULL(f.$n4,0) END) AS n5,\n SUM(CASE WHEN g.jenis_akun <> 'Pendapatan' THEN ISNULL(g.$n4,0) ELSE -ISNULL(g.$n4,0) END) AS n6\n FROM dash_ypt_grafik_d a\n INNER JOIN dash_ypt_grafik_m x ON a.kode_grafik=x.kode_grafik AND a.kode_lokasi=x.kode_lokasi\n LEFT JOIN exs_neraca b ON a.kode_neraca=b.kode_neraca AND b.kode_lokasi='$kode_lokasi' AND a.kode_fs=b.kode_fs AND b.periode='\" . $periode[5] . \"'\n LEFT JOIN exs_neraca c ON a.kode_neraca=c.kode_neraca AND c.kode_lokasi='$kode_lokasi' AND a.kode_fs=c.kode_fs AND c.periode='\" . $periode[4] . \"'\n LEFT JOIN exs_neraca d ON a.kode_neraca=d.kode_neraca AND d.kode_lokasi='$kode_lokasi' AND a.kode_fs=d.kode_fs AND d.periode='\" . $periode[3] . \"'\n LEFT JOIN exs_neraca e ON a.kode_neraca=e.kode_neraca AND e.kode_lokasi='$kode_lokasi' AND a.kode_fs=e.kode_fs AND e.periode='\" . $periode[2] . \"'\n LEFT JOIN exs_neraca f ON a.kode_neraca=f.kode_neraca AND f.kode_lokasi='$kode_lokasi' AND a.kode_fs=f.kode_fs AND f.periode='\" . $periode[1] . \"'\n LEFT JOIN exs_neraca g ON a.kode_neraca=g.kode_neraca AND g.kode_lokasi='$kode_lokasi' AND a.kode_fs=g.kode_fs AND g.periode='\" . $periode[0] . \"'\n $where\n GROUP BY a.kode_neraca\n )b ON a.kode_neraca=b.kode_neraca \n where a.kode_lokasi='$kode_lokasi' and a.kode_fs='FS1' \";\n }\n\n\n $select = DB::connection($this->sql)->select($sql);\n $res = json_decode(json_encode($select), true);\n\n // $color = ['#1D4ED8', '#EC4899', '#EC4899'];\n $ctg = [];\n for ($i = 0; $i <= 3; $i++) {\n array_unshift($ctg, substr($periode[$i], 0, 4));\n }\n\n $series = [];\n $drill = [];\n $n3 = 0;\n $n4 = 0;\n $n5 = 0;\n $n6 = 0;\n $i = 0;\n $color = [\"#7cb5ec\", \"#434348\", \"#90ed7d\", \"#f7a35c\", \"#8085e9\", \"#f15c80\", \"#e4d354\", \"#2b908f\", \"#f45b5b\", \"#91e8e1\", \"#7cb5ec\", \"#434348\", \"#90ed7d\", \"#f7a35c\", \"#8085e9\", \"#f15c80\", \"#e4d354\", \"#2b908f\", \"#f45b5b\", \"#91e8e1\", \"#7cb5ec\", \"#434348\", \"#90ed7d\", \"#f7a35c\", \"#8085e9\", \"#f15c80\", \"#e4d354\", \"#2b908f\", \"#f45b5b\", \"#91e8e1\", \"#7cb5ec\", \"#434348\", \"#90ed7d\", \"#f7a35c\", \"#8085e9\", \"#f15c80\", \"#e4d354\", \"#2b908f\", \"#f45b5b\", \"#91e8e1\", \"#7cb5ec\", \"#434348\", \"#90ed7d\", \"#f7a35c\", \"#8085e9\", \"#f15c80\", \"#e4d354\", \"#2b908f\", \"#f45b5b\", \"#91e8e1\"];\n foreach ($res as $item) {\n $n3 += floatval($item['n3']);\n $n4 += floatval($item['n4']);\n $n5 += floatval($item['n5']);\n $n6 += floatval($item['n6']);\n\n $dd = [];\n array_unshift($dd, floatval($item['n3']), floatval($item['n4']), floatval($item['n5']), floatval($item['n6']));\n\n $_drill = [\n 'name' => $item['nama'],\n 'color' => $color[$i],\n 'data' => $dd\n ];\n\n array_push($drill, $_drill);\n $i++;\n }\n $data = [];\n $nama = 'Total';\n array_unshift(\n $data,\n array(\n 'y' => floatval($n3),\n 'name' => $nama,\n 'drilldown' => $ctg[0]\n ),\n array(\n 'y' => floatval($n4),\n 'name' => $nama,\n 'drilldown' => $ctg[1]\n ),\n array(\n 'y' => floatval($n5),\n 'name' => $nama,\n 'drilldown' => $ctg[2]\n ),\n array(\n 'y' => floatval($n6),\n 'name' => $nama,\n 'drilldown' => $ctg[3]\n )\n );\n\n $_series = [\n 'name' => $nama,\n 'data' => $data\n ];\n\n array_push($series, $_series);\n\n $success['status'] = true;\n $success['message'] = \"Success!\";\n $success['data'] = [\n 'kategori' => $ctg,\n 'series' => $series,\n 'drilldown' => $drill\n ];\n\n return response()->json($success, $this->successStatus);\n } catch (\\Throwable $e) {\n $success['status'] = false;\n\n $success['data'] = [\n 'status' => false,\n 'message' => \"Error \" . $e,\n 'kategori' => [],\n 'series' => [],\n 'drilldown' => []\n ];\n return response()->json($success, $this->successStatus);\n }\n }", "title": "" }, { "docid": "63caa705844e5c1afed6e177b1b2d20d", "score": "0.59447366", "text": "function data_unduhan_kontraktor(){\n\t\t\t\t$sql=\"select *, GROUP_CONCAT(ruas_jalan) as ruas_jalan from data_umum JOIN data_umum_ruas on data_umum.id=data_umum_ruas.id where data_umum.penyedia_jasa='\".$_SESSION['nm_member'].\"' group by data_umum.id \"; \n\t\t\t\t$row = $this-> db -> prepare($sql);\n\t\t\t\t$row -> execute();\n\t\t\t\t$hasil = $row -> fetchAll();\n\t\t\t\treturn $hasil;\n\t\t\t}", "title": "" }, { "docid": "f9cf705f47323c3140c32e486a7b0d5a", "score": "0.5942288", "text": "function data_jenis_mobil(){\n $x['data']=$this->ModelDataUserPelanggan->get_jenis_mobil();\n $this->load->view('input_data_pelanggan',$x);\n }", "title": "" }, { "docid": "4e179dda37396ba4c3a93aa2cb37af78", "score": "0.594004", "text": "function datakeluar(){\n $variabel['data'] = $this->m_perizinan_p->lihatdata();\n $this->layout->renderizinp2('back-end/perizinan_p/v_data_keluar',$variabel,'back-end/perizinan_p/keluar_js');\n }", "title": "" }, { "docid": "bea872da735ba921e2d4a2daf8c59b01", "score": "0.5927448", "text": "function getDataLakilaki()\n\t{\n\t\treturn $this->db->get_where('data_penduduk', ['jenis_kelamin' => 'LAKI-LAKI']);\n\t}", "title": "" }, { "docid": "ae8e0da86eb099deb35d981569b9c96f", "score": "0.59173447", "text": "function get_js_variables_data()\n\t{\n $sql = '\n\t\t\tselect \n\t\t\t\tproduct_price_list.product_id as id,\n product.name_'.Portal::language().' as name,\n 5 as in_stock,\n unit.name_'.Portal::language().' as unit_name,\n product_price_list.price\n \n\t\t\tfrom \n\t\t\t\tproduct_price_list\n inner join product on product_price_list.product_id = product.id\n\t\t\t\tinner join unit on unit.id = product.unit_id\n\t\t\twhere \n\t\t\t\tproduct.type=\\'EQUIPMENT\\' \n and product_price_list.portal_id=\\''.PORTAL_ID.'\\'\n and product_price_list.department_code =\\'HK\\'\n\t\t\t\tand product.status = \\'avaiable\\'\n\t\t';\n\t\t$items = DB::fetch_all($sql);\n\t\t$GLOBALS['js_variables']['product'] = $items; \n\t}", "title": "" }, { "docid": "da07921eefc389625ab24fbbbd901f96", "score": "0.59065443", "text": "function getDataLahir()\n\t{\n\t\treturn $this->db->get_where('data_penduduk', ['status' => 'DATA LAHIR']);\n\t}", "title": "" }, { "docid": "06bcfaa3f0ee189a6f32d3a182d1774f", "score": "0.5894075", "text": "public function tampil_data()\n {\n $query = $this->db->query(\"SELECT * FROM tb_hadiah ORDER BY id_hadiah DESC\");\n return $query->result();\n }", "title": "" }, { "docid": "70f46eef0689d5bc1b196391a32eb026", "score": "0.58871835", "text": "public function DataVencimento() {\n\n\t\t\t\t\t\t\n\t\t\t\t}", "title": "" }, { "docid": "8d39e81e35d488dfa884bb8c211595a5", "score": "0.5850953", "text": "function get_data($id_tagihan, $thn, $tk, $bln) {\n\n //2019/2019\n //012345678\n $this->load->model(\"M_reff\");\n $ajaran = $this->M_reff->goField(\"tr_tahun_ajaran\", \"nama\", \"where id = '\".$this->M_reff->tahun().\"' \");\n $thn1 = substr($thn, 0,4);\n $thn2 = substr($thn, 5,8);\n\n //$qt = \"SELECT * FROM v_siswa_tk WHERE id_tk ='\".$tk.\"' \";\n\n $this->db->where(\"id_tk\", $tk);\n $qt = $this->db->get(\"v_siswa_tk\")->result_array();\n $ids = array();\n foreach ($qt as $id)\n {\n $ids[] = $id['id_siswa'];\n }\n\n $sl = \"\n id, \n id_tagihan,\n nama_tagihan,\n tgl_tagihan,\n satuan,\n SUM(tagihan) AS jtagihan,\n \";\n\n $this->db->select($sl);\n $this->db->where(\"sts\",1); //pembayaran oleh dana siswa bukan beasiswa\n $this->db->from(\"keu_tagihan_pokok\");\n if ($tk!=\"\") {\n $this->db->where_in(\"id_siswa\",$ids);\n }\n\n if ($thn == $ajaran) {\n \tif ($bln!=\"\") {\n\t \t$this->db->where(\"DATE_FORMAT(tgl_tagihan, '%Y-%m')>=\", $thn1.\"-07\");\n\t\t $this->db->where(\"DATE_FORMAT(tgl_tagihan, '%Y-%m')<=\", $bln);\n\n\t }\n\t else{\n\t\t $this->db->where(\"DATE_FORMAT(tgl_tagihan, '%Y-%m')>=\", $thn1.\"-07\");\n\t\t $this->db->where(\"DATE_FORMAT(tgl_tagihan, '%Y-%m')<=\", $thn2.\"-06\");\n\t }\n }\n else{\n \t$this->db->where(\"DATE_FORMAT(tgl_tagihan, '%Y-%m')>=\", $thn1.\"-07\");\n\t $this->db->where(\"DATE_FORMAT(tgl_tagihan, '%Y-%m')<=\", $thn2.\"-06\");\n }\n\n \n $this->db->where(\"id_tagihan\", $id_tagihan);\n $a = $this->db->get()->row_array();\n\n $sl2 = \"\n id, \n id_tagihan,\n nama_tagihan,\n tgl_tagihan,\n satuan,\n SUM(bayar) AS jbayar,\n \";\n\n $this->db->select($sl2);\n $this->db->where(\"sts\",1); //pembayaran oleh dana siswa bukan beasiswa\n $this->db->from(\"keu_tagihan_pokok\");\n if ($tk!=\"\") {\n $this->db->where_in(\"id_siswa\",$ids);\n }\n\n if ($thn == $ajaran) {\n \tif ($bln!=\"\") {\n\t \t$this->db->where(\"DATE_FORMAT(tgl_tagihan, '%Y-%m')>=\", $thn1.\"-07\");\n\t\t $this->db->where(\"DATE_FORMAT(tgl_tagihan, '%Y-%m')<=\", $bln);\n\n\t }\n\t else{\n\t\t $this->db->where(\"DATE_FORMAT(tgl_tagihan, '%Y-%m')>=\", $thn1.\"-07\");\n\t\t $this->db->where(\"DATE_FORMAT(tgl_tagihan, '%Y-%m')<=\", $thn2.\"-06\");\n\t }\n }\n else{\n \t$this->db->where(\"DATE_FORMAT(tgl_tagihan, '%Y-%m')>=\", $thn1.\"-07\");\n\t $this->db->where(\"DATE_FORMAT(tgl_tagihan, '%Y-%m')<=\", $thn2.\"-06\");\n }\n $this->db->where(\"id_tagihan\", $id_tagihan);\n $b = $this->db->get()->row_array();\n\n $x = array(\n \"jtagihan\" => $a[\"jtagihan\"],\n \"jbayar\" => $b[\"jbayar\"]\n );\n\n return $x;\n }", "title": "" }, { "docid": "9b5f7bd94d9246b4a88a32f204d0cede", "score": "0.5843858", "text": "function data_umum_kontraktor(){\n\t\t\t\t$sql=\"select *, GROUP_CONCAT(ruas_jalan) as ruas_jalan from data_umum JOIN data_umum_ruas on data_umum.id=data_umum_ruas.id where data_umum.penyedia_jasa='\".$_SESSION['perusahaan'].\"' group by data_umum.id \"; \n\t\t\t\t$row = $this-> db -> prepare($sql);\n\t\t\t\t$row -> execute();\n\t\t\t\t$hasil = $row -> fetchAll();\n\t\t\t\treturn $hasil;\n\t\t\t}", "title": "" }, { "docid": "a75eb888599c1ecf29a5baf70b7e7f1e", "score": "0.5824934", "text": "function getDataPaket($conn,$kurikulum,$kodeunit,$semmk) {\n\t\t\t$sql = \"select kodemk, sks from \".self::table().\" where thnkurikulum = '$kurikulum'\n\t\t\t\t\tand kodeunit = '$kodeunit' and semmk = '$semmk' and paket = 1\";\n\t\t\t$rs = $conn->Execute($sql);\n\t\t\t\n\t\t\t$a_data = array();\n\t\t\twhile($row = $rs->FetchRow())\n\t\t\t\t$a_data[] = $row;\n\t\t\t\n\t\t\treturn $a_data;\n\t\t}", "title": "" }, { "docid": "4d47e83c9258ef5cba0fddd7d76e5180", "score": "0.58161306", "text": "public function getDataKelompokAkun(Request $r)\n {\n try {\n if ($data = Auth::guard($this->guard)->user()) {\n $nik = $data->nik;\n $kode_lokasi = $data->kode_lokasi;\n }\n\n $col_array = array('periode');\n $db_col_name = array('b.periode');\n if ($r->query('kode_grafik')[1] == \"PI01\") {\n $kode_grafik = \"PI05\";\n } elseif ($r->query('kode_grafik')[1] == \"PI02\") {\n $kode_grafik = \"PI06\";\n } else {\n $kode_grafik = $r->query('kode_grafik')[1];\n }\n if (isset($r->kode_lokasi) && $r->kode_lokasi != \"\") {\n $lokasi = $r->kode_lokasi;\n } else {\n $lokasi = $kode_lokasi;\n }\n $where = \"WHERE a.kode_lokasi = '$lokasi' AND a.kode_grafik = '\" . $kode_grafik . \"' AND a.kode_fs='FS1'\";\n $where = $this->filterReq($r, $col_array, $db_col_name, $where, \"\");\n\n $sql = \"SELECT a.kode_neraca, a.nama, ISNULL(b.n1,0) AS n1, ISNULL(b.n4,0) AS n4, ISNULL(b.n5,0) AS n5, \n ISNULL(b.capai,0) AS capai\n FROM neraca a\n INNER JOIN (\n SELECT a.kode_lokasi,a.kode_neraca,\n SUM(CASE WHEN b.jenis_akun='Pendapatan' THEN -b.n4 ELSE b.n4 END) AS n1,\n SUM(CASE WHEN b.jenis_akun='Pendapatan' THEN -b.n4 ELSE b.n4 END) AS n4,\n SUM(CASE WHEN b.jenis_akun='Pendapatan' THEN -b.n5 ELSE b.n5 END) AS n5,\n SUM(CASE WHEN b.n1<>0 THEN (b.n4/b.n1)*100 ELSE 0 END) AS capai\n FROM dash_ypt_grafik_d a\n INNER JOIN exs_neraca b ON a.kode_neraca=b.kode_neraca AND a.kode_lokasi=b.kode_lokasi AND a.kode_fs=b.kode_fs\n INNER JOIN dash_ypt_grafik_m c ON a.kode_grafik=c.kode_grafik AND a.kode_lokasi=c.kode_lokasi\n $where\n GROUP BY a.kode_lokasi,a.kode_neraca\n ) b ON a.kode_lokasi=b.kode_lokasi AND a.kode_neraca=b.kode_neraca \n WHERE a.kode_lokasi='$lokasi' AND a.kode_fs='FS1'\";\n\n $select = DB::connection($this->sql)->select($sql);\n $res = json_decode(json_encode($select), true);\n\n $total = 0;\n foreach ($res as $item) {\n $total = $total + floatval(abs($item['n4']));\n }\n\n $idx = 0;\n $chart = [];\n if ($total > 0) {\n foreach ($res as $item) {\n $persen = (floatval(abs($item['n4'])) / $total) * 100;\n $_persen = number_format((float)$persen, 2, '.', '');\n\n $data = [\n 'name' => $item['nama'],\n 'y' => floatval($_persen),\n 'z' => intval($item['n4'])\n ];\n array_push($chart, $data);\n }\n } else {\n foreach ($res as $item) {\n $data = [\n 'name' => $item['nama'],\n 'y' => 0,\n 'z' => 0\n ];\n array_push($chart, $data);\n }\n }\n\n $success['status'] = true;\n $success['message'] = \"Success!\";\n $success['data'] = $chart;\n\n return response()->json($success, $this->successStatus);\n } catch (\\Throwable $e) {\n $success['status'] = false;\n $success['message'] = \"Error \" . $e;\n return response()->json($success, $this->successStatus);\n }\n }", "title": "" }, { "docid": "8921e4db6678beccd56e457035bf84a7", "score": "0.58135974", "text": "public function __construct(){\n\t\t$sql = query(\"SELECT * FROM vw_komentar\");\n\t\t$arr = array();\n\t\t$no = 0;\n\t\tforeach($sql as $row){\n\t\t\t$arr[$no]['komentar'] = $row['komentar'];\n\t\t\t$pecah = explode(\",\",$row['stem']);\n\t\t\tforeach($pecah as $pc){\n\t\t\t\t$arr[$no]['stem'][] = trim($pc);\n\t\t\t}\n\t\t\t$arr[$no]['sentimen'] = $row['sentimen'];\n\t\t\t$no++;\n\t\t}\n\t\t$this->data = $arr;\n\t}", "title": "" }, { "docid": "2486bd0457c785a104fdfcccdfbc3695", "score": "0.58120775", "text": "function genDataIni(){\n $this->datos['sucursales'] = Sucursal::where('estado',1)->orderBy('nombre')->get()->lists('nombre','id');\n $this->datos['trabajadores'] = Trabajador::where('estado',1)->orderBy('nombre')->get()->lists('nombre','id');\n $this->datos['clientes'] = Clientes::where('estado',1)->orderBy('razon_social')->get()->lists('razon_social','id');\n $this->datos['almacenes'] = Almacen::where('estado',1)->orderBy('nombre')->get()->lists('nombre','id');\n }", "title": "" }, { "docid": "eb5d55f5f9da9c506328a5cad1135ee2", "score": "0.5810417", "text": "function confDisponibles($data){\n\n $id_fila = $data['fila'];\n $id_asiento = $data['asiento'];\n $this->db->select('tbl_butaca.id_butaca, tbl_butaca.estado');\n $this->db->from('tbl_butaca');\n $this->db->where('tbl_butaca.fila', $id_fila);\n $this->db->where('tbl_butaca.nro_butaca', $id_asiento);\n $query = $this->db->get();\n $asientos = $query->result_array();\n\n if (isset($asientos))\n {\n return $asientos;\n }\n else\n {\n return 0;\n }\n }", "title": "" }, { "docid": "4a9a4ea27216b448ad33b73b41a07eed", "score": "0.5804162", "text": "function ambil_data(){\n\n\t\t/*Sebagai token yang yang dikrimkan oleh client, dan nantinya akan\n\t\tserver kirimkan balik. Gunanya untuk memastikan bahwa user mengklik paging\n\t\tsesuai dengan urutan yang sebenarnya */\n\t\t$draw=$_REQUEST['draw'];\n\n\t\t/*Jumlah baris yang akan ditampilkan pada setiap page*/\n\t\t$length=$_REQUEST['length'];\n\n\t\t/*Offset yang akan digunakan untuk memberitahu database\n\t\tdari baris mana data yang harus ditampilkan untuk masing masing page\n\t\t*/\n\t\t$start=$_REQUEST['start'];\n\n\t\t/*Keyword yang diketikan oleh user pada field pencarian*/\n\t\t$search=$_REQUEST['search'][\"value\"];\n\n\n\t\t/*Menghitung total desa didalam database*/\n\t\t$total=$this->db->count_all_results(\"tkaryawan\");\n\n\t\t/*Mempersiapkan array tempat kita akan menampung semua data\n\t\tyang nantinya akan server kirimkan ke client*/\n\t\t$output=array();\n\n\t\t/*Token yang dikrimkan client, akan dikirim balik ke client*/\n\t\t$output['draw']=$draw;\n\n\t\t/*\n\t\t$output['recordsTotal'] adalah total data sebelum difilter\n\t\t$output['recordsFiltered'] adalah total data ketika difilter\n\t\tBiasanya kedua duanya bernilai sama, maka kita assignment \n\t\tkeduaduanya dengan nilai dari $total\n\t\t*/\n\t\t$output['recordsTotal']=$output['recordsFiltered']=$total;\n\n\t\t/*disini nantinya akan memuat data yang akan kita tampilkan \n\t\tpada table client*/\n\t\t$output['data']=array();\n\n\n\t\t/*Jika $search mengandung nilai, berarti user sedang telah \n\t\tmemasukan keyword didalam filed pencarian*/\n\t\tif($search!=\"\"){\n\t\t$this->db->like(\"nama\",$search);\n\t\t}\n\n\n\t\t/*Lanjutkan pencarian ke database*/\n\t\t$this->db->limit($length,$start);\n\t\t/*Urutkan dari alphabet paling terkahir*/\n\t\t$this->db->order_by('nama','DESC');\n\t\t$query=$this->db->get('tkaryawan');\n\n\n\t\t/*Ketika dalam mode pencarian, berarti kita harus\n\t\t'recordsTotal' dan 'recordsFiltered' sesuai dengan jumlah baris\n\t\tyang mengandung keyword tertentu\n\t\t*/\n\t\tif($search!=\"\"){\n\t\t$this->db->like(\"nama\",$search);\n\t\t$jum=$this->db->get('tkaryawan');\n\t\t$output['recordsTotal']=$output['recordsFiltered']=$jum->num_rows();\n\t\t}\n\n\n\t\t$nomor_urut=$start+1;\n\t\tforeach ($query->result_array() as $desa) {\n\t\t\t$output['data'][]=array($nomor_urut,$desa['nik'],$desa['nama']);\n\t\t$nomor_urut++;\n\t\t}\n\n\t\techo json_encode($output);\n\n\n\t}", "title": "" }, { "docid": "a95fa96fa5a7d13d5bc6c24e548abd0e", "score": "0.5802512", "text": "function getDataPenduduk()\n\t{\n\t\treturn $this->db->get('data_penduduk');\n\t}", "title": "" }, { "docid": "3174ea957bced259fd29233e5f74c61e", "score": "0.57927173", "text": "public function getRelaseTahun()\n {\n $dbdata = array(); \n $qTahunRelase = $this -> state($this -> sn) -> getTahunRelease();\n $tahunRelase = $qTahunRelase['value'];\n $frekuensiTahun = 10;\n for($i = 0; $i <= 10; $i++){\n $tahunAwal = $tahunRelase + $i;\n $tahunAkhir = $tahunAwal + 1;\n $arrTemp['tahun'] = $tahunAwal;\n //cari total transaksi berdasarkan tahun \n $tahunAwalKomplit = $tahunAwal.\"-01-01 00:00:00\";\n $tahunAkhirKomplit = $tahunAwal.\"-12-31 23:59:59\";\n //data transaksi masuk\n $arrTemp['jlhTransaksi'] = $this -> state($this -> sn) -> jlhTransaksiMasuk($tahunAwalKomplit, $tahunAkhirKomplit);\n $qReleaseTahun = $this -> state($this -> sn) -> getTransaksiMasuk($tahunAwalKomplit, $tahunAkhirKomplit);\n $totalTransaksi = 0;\n foreach($qReleaseTahun as $qt){\n $nilaiTransaksi = $qt['jumlah'];\n $totalTransaksi = $totalTransaksi + $nilaiTransaksi;\n }\n $arrTemp['nilaiTransaksi'] = $totalTransaksi;\n //data transaksi keluar \n \n $arrTemp['jlhTransaksiKeluar'] = $this -> state($this -> sn) -> jlhTransaksiKeluar($tahunAwalKomplit, $tahunAkhirKomplit);\n $qReleaseTahunKeluar = $this -> state($this -> sn) -> getTransaksiKeluar($tahunAwalKomplit, $tahunAkhirKomplit);\n $totalTransaksiKeluar = 0;\n foreach($qReleaseTahunKeluar as $qtk){\n $nilaiTransaksi = $qtk['jumlah'];\n $totalTransaksiKeluar = $totalTransaksiKeluar + $totalTransaksi;\n }\n $arrTemp['nilaiTransaksiKeluar'] = $totalTransaksiKeluar;\n\n $dbdata[] = $arrTemp;\n }\n \n $this -> toJson($dbdata);\n }", "title": "" }, { "docid": "89a267df64d5bc5c4d1a374ade1ec6a5", "score": "0.5791905", "text": "function data_soal_pel_bab($number,$offset,$pel, $bab){\n $this->db->select('id_bank, sumber, kesulitan, judul_soal, jawaban_benar, UUID, publish, random, soal, gambar_soal, pembahasan, bab.judul_bab, mapel.id_mapel, mapel.nama_mapel');\n $this->db->join('tb_bab bab','bab.id_bab=bs.id_bab');\n $this->db->join('tb_mata_pelajaran mapel', 'mapel.id_mapel = bab.id_mapel' );\n $this->db->where('bs.publish','1');\n $this->db->where('mapel.id_mapel',$pel);\n $this->db->where('bs.id_bab',$bab);\n $this->db->order_by('mapel.id_mapel', 'desc');\n return $query = $this->db->get('tb_bank_soal bs',$number,$offset)->result_array(); \n }", "title": "" }, { "docid": "1f8c3196bf8ef11f38de5a7e609ab4dc", "score": "0.57913196", "text": "function data_soal_pel($number,$offset,$pel){\n $this->db->select('id_bank, sumber, kesulitan, judul_soal, jawaban_benar, UUID, publish, random, soal, gambar_soal, pembahasan, bab.judul_bab, mapel.id_mapel, mapel.nama_mapel');\n $this->db->join('tb_bab bab','bab.id_bab=bs.id_bab');\n $this->db->join('tb_mata_pelajaran mapel', 'mapel.id_mapel = bab.id_mapel' );\n $this->db->where('bs.publish','1');\n $this->db->where('mapel.id_mapel',$pel);\n $this->db->order_by('mapel.id_mapel', 'desc');\n return $query = $this->db->get('tb_bank_soal bs',$number,$offset)->result_array(); \n }", "title": "" }, { "docid": "6cc9232e6c0b5a7f1ed4678035519f43", "score": "0.57870346", "text": "public function get_data_penjualan_lt(){\n $sql = \"select sum(s_items.quantity) jumlah_jual,'sales' as proses,\n companies_supplier.name distributor, products.code kode_produk,products.name nama_produk from sma_sale_items s_items \n LEFT JOIN sma_sales sales ON sales.id = s_items.sale_id and sales.warehouse_id = s_items.warehouse_id \n LEFT JOIN sma_companies companies ON companies.id = sales.customer_id \n LEFT JOIN sma_companies companies_lt ON companies_lt.id = sales.biller_id \n LEFT JOIN sma_companies companies_supplier ON companies_supplier.id = companies_lt.cf3 \n LEFT JOIN sma_products products ON products.id = s_items.product_id \n where companies_lt.cf6 !='x' and s_items.quantity != 0 and sales.date like '2017%' \n and products.code like '121%'\n GROUP BY s_items.product_id, companies_supplier.name order by sales.date desc \";\n $data = $this->db->query($sql);\n\t\treturn $data->result_array();\n }", "title": "" }, { "docid": "71fb945d2d07e6b39977f6eb5d58e5e4", "score": "0.5784401", "text": "public function getDataPengabdian($tahun)\n {\n $this->db->from($this->table);\n $this->db->where('Tahun', $tahun);\n $this->db->where('Source', '2');\n return $this->db->get()->result();\n }", "title": "" }, { "docid": "b8966d9243741812d85266b3e4b2f144", "score": "0.57741904", "text": "public function run()\n {\n $data = [\n // Pertanyaan Dosen Penguji 1\n [\n 'unsurPenilaian' => 'Abstrak Proposal',\n 'rangeNilai' => 5,\n 'isPembimbing' => false,\n 'isPenguji1' => true,\n ],\n [\n 'unsurPenilaian' => 'Keterkaitan : Latar belakang masalah, Identifikasi Masalah, Batasan Masalah, Rumusan Masalah, Tujuan Penelitian dan Manfaat Penelitian',\n 'rangeNilai' => 25,\n 'isPembimbing' => false,\n 'isPenguji1' => true,\n ],\n [\n 'unsurPenilaian' => 'Pemahaman terhadap metode/algoritma yang digunakan',\n 'rangeNilai' => 25,\n 'isPembimbing' => false,\n 'isPenguji1' => true,\n ],\n [\n 'unsurPenilaian' => 'Kelengkapan dan Pemahaman Landasan Teori',\n 'rangeNilai' => 20,\n 'isPembimbing' => false,\n 'isPenguji1' => true,\n ],\n [\n 'unsurPenilaian' => 'Kejelasan Metode Penelitian',\n 'rangeNilai' => 10,\n 'isPembimbing' => false,\n 'isPenguji1' => true,\n ],\n [\n 'unsurPenilaian' => 'Kebaruan Pustaka/Referensi',\n 'rangeNilai' => 10,\n 'isPembimbing' => false,\n 'isPenguji1' => true,\n ],\n [\n 'unsurPenilaian' => 'Rancangan Arsitektur Sistem/Struktur Menu/Antarmuka/Prototype/Struktur Collection Data (Untuk analisis forensic)',\n 'rangeNilai' => 5,\n 'isPembimbing' => false,\n 'isPenguji1' => true,\n ],\n\n // Pertanyaan Dosen Pembimbing\n [\n 'unsurPenilaian' => 'Pembimbingan (Checklis berkas)',\n 'rangeNilai' => 10,\n 'isPembimbing' => true,\n 'isPenguji1' => false,\n ],\n [\n 'unsurPenilaian' => 'Abstrak Proposal',\n 'rangeNilai' => 5,\n 'isPembimbing' => true,\n 'isPenguji1' => false,\n ],\n [\n 'unsurPenilaian' => 'Keterkaitan : Latar belakang masalah, Identifikasi Masalah, Batasan Masalah, Rumusan Masalah, Tujuan Penelitian dan Manfaat Penelitian',\n 'rangeNilai' => 20,\n 'isPembimbing' => true,\n 'isPenguji1' => false,\n ],\n [\n 'unsurPenilaian' => 'Pemahaman terhadap metode/algoritma yang digunakan',\n 'rangeNilai' => 10,\n 'isPembimbing' => true,\n 'isPenguji1' => false,\n ],\n [\n 'unsurPenilaian' => 'Kelengkapan dan Pemahaman Landasan Teori',\n 'rangeNilai' => 20,\n 'isPembimbing' => true,\n 'isPenguji1' => false,\n ],\n [\n 'unsurPenilaian' => 'Kejelasan Metodologi Penelitian',\n 'rangeNilai' => 10,\n 'isPembimbing' => true,\n 'isPenguji1' => false,\n ],\n [\n 'unsurPenilaian' => 'Kebaruan Pustaka/Referensi',\n 'rangeNilai' => 10,\n 'isPembimbing' => true,\n 'isPenguji1' => false,\n ],\n [\n 'unsurPenilaian' => 'Rancangan Arsitektur Sistem/Struktur Menu/Antarmuka/Prototype/Struktur Collection Data (Untuk analisis forensic)',\n 'rangeNilai' => 5,\n 'isPembimbing' => true,\n 'isPenguji1' => false,\n ],\n ];\n foreach ($data as $insertData) {\n PertanyaanSemprop::create($insertData);\n }\n }", "title": "" }, { "docid": "4366742f7cc4d4d707618fa6f085db52", "score": "0.5755087", "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": "114de56dff0ced96da772cf28caf44af", "score": "0.5747457", "text": "function datakeluar(){\n $variabel['data'] = $this->m_perizinan->lihatdata();\n $this->layout->render2('back-end/datamaster/perizinan/v_data_keluar',$variabel,'back-end/datamaster/perizinan/keluar_js');\n }", "title": "" }, { "docid": "a7af4fb9d42a5f473076ee7c38c3600b", "score": "0.57451385", "text": "public function getJenisDisposisis($data){\n // print_r($data);\n $user = \"SELECT * FROM tbl_jenis_disposisi WHERE id_jenis_disposisi = :id \";\n // echo $user;\n $this->db->query($user);\n $this->db->bind('id', $data);\n $a = $this->db->singleResult();\n return $a['jenis_disposisi'];\n }", "title": "" }, { "docid": "e7049479807d1810934162c681cf9035", "score": "0.5744808", "text": "private function dataKombinasi($data){\r\n\t\t//ARRAY TGL\r\n\t\tforeach($data as $rowTgl => $valTgl){\r\n\t\t\tif($rowTgl==1){\t\t\t\t\r\n\t\t\t\tforeach($valTgl as $rowTgl1 => $valTgl1){\r\n\t\t\t\t\tif($valTgl1<>''){\r\n\t\t\t\t\t\t$tmp=$valTgl1;\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$aryTgl[]=$tmp;\r\n\t\t\t\t\t};\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t} \r\n\t\t//print_r($aryTgl);\r\n\t\t\r\n\t\t//ARRAY DATA AND ARRAY ADD\r\n\t\tforeach($data as &$record){\r\n\t\t\t//if($row1<>1 AND $row1<>2){\r\n\t\t\t//if($row1==1){\r\n\t\t\t\tforeach($aryTgl as $rowAryTgl => $valAryTgl){\r\n\t\t\t\t\t$record[$rowAryTgl]=$valAryTgl;\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t$dataKombinasi[]=$record;\r\n\t\t\t//}\r\n\t\t} \r\n\t\t\r\n\t\t// print_r($hari1);\r\n\t\t//return $dataKombinasi;\r\n\t\tforeach($dataKombinasi as $rowRslt => $valRslt){\r\n\t\t\tif($rowRslt<>0 AND $rowRslt<>1){\r\n\t\t\t// if($rowRslt==0){\r\n\t\t\t\t$rsltAry[]=$valRslt;\r\n\t\t\t}\r\n\t\t} \r\n\t\t\r\n\t\t$dataProvider = new \\yii\\data\\ArrayDataProvider([\r\n\t\t\t'allModels' => $rsltAry\r\n\t\t]);\r\n\t\treturn $dataProvider->getModels();\r\n\t}", "title": "" }, { "docid": "6d4819ad8f9349910681f72a9ef4eb82", "score": "0.5741863", "text": "protected function loadDbValues($row)\n {\n if (!is_array($row)) {\n return;\n }\n $this->Kapanewon->DbValue = $row['Kapanewon'];\n $this->kapanewon_id->DbValue = $row['kapanewon_id'];\n $this->Jumlah->DbValue = $row['Jumlah'];\n $this->Usaha_Mikro->DbValue = $row['Usaha_Mikro'];\n $this->Usaha_Kecil->DbValue = $row['Usaha_Kecil'];\n $this->Usaha_Menengah->DbValue = $row['Usaha_Menengah'];\n $this->Status_Usaha_Kosong_Salah->DbValue = $row['Status_Usaha_Kosong_Salah'];\n $this->Usaha_Pertanian->DbValue = $row['Usaha_Pertanian'];\n $this->Usaha_Perdagangan->DbValue = $row['Usaha_Perdagangan'];\n $this->Usaha_Kuliner->DbValue = $row['Usaha_Kuliner'];\n $this->Usaha_Bidang_Fashion->DbValue = $row['Usaha_Bidang_Fashion'];\n $this->Usaha_Pendidikan->DbValue = $row['Usaha_Pendidikan'];\n $this->Usaha_Bidang_Otomotif->DbValue = $row['Usaha_Bidang_Otomotif'];\n $this->Usaha_Kerajinan_Tangan->DbValue = $row['Usaha_Kerajinan_Tangan'];\n $this->Usaha_Elektronik_dan_Gadget->DbValue = $row['Usaha_Elektronik_dan_Gadget'];\n $this->Jenis_Usaha_Lain->DbValue = $row['Jenis_Usaha_Lain'];\n $this->Tenaga_Kerja_Laki_laki->DbValue = $row['Tenaga_Kerja_Laki_laki'];\n $this->Tenaga_Kerja_Perempuan->DbValue = $row['Tenaga_Kerja_Perempuan'];\n $this->Jumlah_Tenaga_Kerja->DbValue = $row['Jumlah_Tenaga_Kerja'];\n $this->Aset->DbValue = $row['Aset'];\n $this->Omset_Per_Tahun->DbValue = $row['Omset_Per_Tahun'];\n }", "title": "" }, { "docid": "b8860354d781124e4fd4022cd8c852d0", "score": "0.5741302", "text": "function get_select_bahanBaku($koneksi){\n\t\t$data_bahan_baku = get_all_bahan_baku($koneksi);\n\t\t$data = array(\n\t\t\tarray(\n\t\t\t\t'value' => \"\",\n\t\t\t\t'text' => \"-- Pilih Bahan Baku --\",\n\t\t\t),\n\t\t);\n\t\tforeach ($data_bahan_baku as $row) {\n\t\t\t$dataRow = array();\n\t\t\t$dataRow['value'] = $row['id'];\n\t\t\t$dataRow['text'] = $row['kd_bahan_baku'].\" - \".$row['nama'];\n\n\t\t\t$data[] = $dataRow;\n\t\t}\n\n\t\techo json_encode($data);\n\t}", "title": "" }, { "docid": "38007b463156ea2c8a1c2336fb5d53ff", "score": "0.5740329", "text": "public function mengubah($data){\n\t\t//prepare(menyiapkan) statement PDO\n\t\t $ps =$this->koneksi->prepare($sql); //ps(preparestatment)\n\t\t $ps ->execute($data);\n\t}", "title": "" }, { "docid": "d727b81b593640389f4114625ca386f2", "score": "0.57374597", "text": "function dd_emp_position()\n {\n // ambil data dari db\n $this->db->order_by('id_position', 'asc');\n $this->db->like('id_position','pos');\n $result = $this->db->get('master_position');\n \n // bikin array\n // please select berikut ini merupakan tambahan saja agar saat pertama\n // diload akan ditampilkan text please select.\n //$dd[''] = 'id_position'; untuk placeholder\n if ($result->num_rows() > 0) {\n foreach ($result->result() as $row) {\n // tentukan value (sebelah kiri) dan labelnya (sebelah kanan)\n \t$a = \" -> \";\n $dd[$row->id_position] = $row->id_position .$a. $row->position_desc;\n }\n }\n return $dd;\n }", "title": "" }, { "docid": "0187279a340c9697b4dcd39b7348d35c", "score": "0.57282", "text": "function stokedata(){\n//VARIABLE qui récupérera sous forme de tableau les datas formulaire (prenom et nom)\nglobal $data = array ($_SESSION['prenom'], $_SESSION['nom']);\n\n//vérification des élément de la variable tableaux $data;\necho 'cette fonction fonctionne'\nprint_r ('$data');\necho '$data';\n}", "title": "" }, { "docid": "ea7f13efaeb2cf81c93f00486b1b6d25", "score": "0.5719493", "text": "function load_data($data = NULL) {\n\tif ($data != NULL) :\n\t\t$dia = substr($data, 0, 2);\n\t\t$mes = substr($data, 3, 2);\n\t\t$ano = substr($data, 6, 4);\n\n\t\t$retorno = $ano . \"-\" . $mes . \"-\" . $dia;\n\t\treturn $retorno;\n\telse :\n\t\treturn NULL;\n\n\tendif;\n}", "title": "" }, { "docid": "d3b043b34199c11736ad2e60bbd01635", "score": "0.57134134", "text": "function data_soal($number,$offset){\n $this->db->select('id_bank, sumber, kesulitan, judul_soal, jawaban_benar, UUID, publish, random, soal, gambar_soal, pembahasan, bab.judul_bab, mapel.id_mapel, mapel.nama_mapel');\n $this->db->join('tb_bab bab','bab.id_bab=bs.id_bab');\n $this->db->join('tb_mata_pelajaran mapel', 'mapel.id_mapel = bab.id_mapel' );\n $this->db->where('bs.publish','1');\n $this->db->where('bab.status','1');\n $this->db->where('mapel.status','1');\n $this->db->order_by('bs.id_bank', 'desc');\n return $query = $this->db->get('tb_bank_soal bs',$number,$offset)->result_array(); \n }", "title": "" }, { "docid": "22b20b841afd68021f074ae6a4bec05a", "score": "0.570941", "text": "public function dataUjianGabungan()\n\t{\n\t\t$this->isAnyLogin();\n\t\t$data['ujian'] = $this->M_ujian->getUjianGabunganByNik($this->session->nik);\n\t\t$this->load->view('guru/dataUjianGabungan', $data);\n\t}", "title": "" }, { "docid": "7b60766ef67ca1e400e392c026d62bea", "score": "0.5707587", "text": "public function dataUjian()\n\t{\n\t\t$this->isAnyLogin();\n\t\t$data['ujian'] = $this->M_ujian->getUjianTunggalByNik($this->session->nik);\n\t\t$this->load->view('guru/dataUjian', $data);\n\t}", "title": "" }, { "docid": "15b88ef0b1643e2139cdea78cfa11561", "score": "0.57073265", "text": "public function tampil_data() {\n\t\treturn $this->db->get('dokumen');\n\t}", "title": "" }, { "docid": "55aa41e6585dff41cdd7932d3f0e6b18", "score": "0.570134", "text": "public function getDataPerLembaga(Request $r)\n {\n try {\n if ($data = Auth::guard($this->guard)->user()) {\n $nik = $data->nik;\n $kode_lokasi = $data->kode_lokasi;\n }\n \n $kode_lokasi = $r->kode_lokasi;\n if (isset($r->kode_bidang) && $r->kode_bidang != \"\") {\n $filter_bidang = \" and a.kode_bidang = '$r->kode_bidang' \";\n } else {\n $filter_bidang = \"\";\n }\n if (isset($r->kode_pp) && $r->kode_pp != \"\") {\n $filter_pp = \" and b.kode_pp = '$r->kode_pp' \";\n } else {\n $filter_pp = \"\";\n }\n $col_array = array('periode', 'kode_grafik');\n $db_col_name = array('b.periode', 'a.kode_grafik');\n $where = \"WHERE a.kode_lokasi ='$kode_lokasi' AND a.kode_fs='FS1' \";\n $where = $this->filterReq($r, $col_array, $db_col_name, $where, \"\");\n\n if (isset($r->jenis) && $r->jenis != \"\") {\n if ($r->jenis == \"PRD\") {\n $n4 = \"n6\";\n $n2 = \"n7\";\n $n5 = \"n9\";\n } else {\n $n4 = \"n4\";\n $n2 = \"n2\";\n $n5 = \"n5\";\n }\n } else {\n $n4 = \"n4\";\n $n2 = \"n2\";\n $n5 = \"n5\";\n }\n\n if (isset($r->kode_grafik) && $r->kode_grafik[1] == \"PI04\") {\n $sql = \"SELECT a.kode_bidang, a.nama, ISNULL(b.n2,0) AS n2, ISNULL(b.n4,0) AS n4, ISNULL(b.n5,0) AS n5, \n ISNULL(b.capai,0) as capai,a.skode\n FROM dash_ypt_bidang a\n LEFT JOIN (\n SELECT a.kode_lokasi,p.kode_bidang,\n SUM(CASE WHEN b.jenis_akun='Pendapatan' THEN -b.$n2 ELSE b.$n2 END) AS n2,\n SUM(CASE WHEN b.jenis_akun='Pendapatan' THEN -b.$n4 ELSE b.$n4 END) AS n4,\n SUM(CASE WHEN b.jenis_akun='Pendapatan' THEN -b.$n5 ELSE b.$n5 END) AS n5,\n CASE WHEN sum(b.$n4)<>0 THEN (sum(b.$n2)/sum(b.$n4))*100 ELSE 0 END AS capai\n FROM dash_ypt_grafik_d a\n INNER JOIN exs_neraca_pp b ON a.kode_neraca=b.kode_neraca AND a.kode_lokasi=b.kode_lokasi AND a.kode_fs=b.kode_fs\n INNER JOIN dash_ypt_grafik_m c ON a.kode_grafik=c.kode_grafik AND a.kode_lokasi=c.kode_lokasi\n INNER JOIN pp p ON b.kode_pp=p.kode_pp AND b.kode_lokasi=p.kode_lokasi\n $where $filter_pp\n GROUP BY a.kode_lokasi,p.kode_bidang\n ) b ON a.kode_lokasi=b.kode_lokasi and a.kode_bidang=b.kode_bidang\n WHERE a.kode_lokasi ='$kode_lokasi' $filter_bidang\";\n } else {\n $sql = \"SELECT a.kode_bidang, a.nama, ISNULL(b.n2,0) AS n2, ISNULL(b.n4,0) AS n4, ISNULL(b.n5,0) AS n5, \n ISNULL(b.capai,0) as capai,a.skode\n FROM dash_ypt_bidang a\n LEFT JOIN (\n SELECT a.kode_lokasi,p.kode_bidang,\n SUM(CASE WHEN b.jenis_akun='Pendapatan' THEN -b.$n2 ELSE b.$n2 END) AS n2,\n SUM(CASE WHEN b.jenis_akun='Pendapatan' THEN -b.$n4 ELSE b.$n4 END) AS n4,\n SUM(CASE WHEN b.jenis_akun='Pendapatan' THEN -b.$n5 ELSE b.$n5 END) AS n5,\n CASE WHEN sum(b.$n2)<>0 THEN (sum(b.$n4)/sum(b.$n2))*100 ELSE 0 END AS capai\n FROM dash_ypt_grafik_d a\n INNER JOIN exs_neraca_pp b ON a.kode_neraca=b.kode_neraca AND a.kode_lokasi=b.kode_lokasi AND a.kode_fs=b.kode_fs\n INNER JOIN dash_ypt_grafik_m c ON a.kode_grafik=c.kode_grafik AND a.kode_lokasi=c.kode_lokasi\n INNER JOIN pp p ON b.kode_pp=p.kode_pp AND b.kode_lokasi=p.kode_lokasi\n $where $filter_pp\n GROUP BY a.kode_lokasi,p.kode_bidang\n ) b ON a.kode_lokasi=b.kode_lokasi and a.kode_bidang=b.kode_bidang\n WHERE a.kode_lokasi ='$kode_lokasi' $filter_bidang\";\n }\n\n $select = DB::connection($this->sql)->select($sql);\n $res = json_decode(json_encode($select), true);\n\n $total = 0;\n foreach ($res as $item) {\n $total = $total + floatval(abs($item['n4']));\n }\n\n $chart = [];\n $idx = 0;\n if ($total > 0) {\n foreach ($res as $item) {\n $persen = (floatval($item['n4']) / $total) * 100;\n $_persen = number_format((float)$persen, 2, '.', '');\n\n $name = $item['skode'];\n\n if ($idx == 0) {\n if ($_persen < 0) {\n $value = [\n 'name' => $name,\n 'y' => abs(floatval($_persen)),\n 'sliced' => true,\n 'selected' => true,\n 'negative' => true,\n 'fillColor' => 'url(#custom-pattern)',\n 'color' => 'url(#custom-pattern)',\n 'nilai' => $item['n4']\n ];\n } else {\n\n $value = [\n 'name' => $name,\n 'y' => floatval($_persen),\n 'sliced' => true,\n 'selected' => true,\n 'negative' => false,\n 'nilai' => $item['n4']\n ];\n }\n } else {\n if ($_persen < 0) {\n $value = [\n 'name' => $name,\n 'y' => abs(floatval($_persen)),\n 'negative' => true,\n 'fillColor' => 'url(#custom-pattern)',\n 'color' => 'url(#custom-pattern)',\n 'nilai' => $item['n4']\n ];\n } else {\n $value = [\n 'name' => $name,\n 'y' => floatval($_persen), 'negative' => false,\n 'nilai' => $item['n4']\n ];\n }\n }\n array_push($chart, $value);\n $idx++;\n }\n } else {\n foreach ($res as $item) {\n $_persen = 0;\n $name = $item['skode'];\n if ($_persen < 0) {\n $value = [\n 'name' => $name,\n 'y' => abs(floatval($_persen)),\n 'negative' => true,\n 'fillColor' => 'url(#custom-pattern)',\n 'color' => 'url(#custom-pattern)',\n 'nilai' => $item['n4']\n ];\n } else {\n $value = [\n 'name' => $name,\n 'y' => floatval($_persen),\n 'negative' => false,\n 'nilai' => $item['n4']\n ];\n }\n array_push($chart, $value);\n }\n }\n\n $success['status'] = true;\n $success['message'] = \"Success!\";\n $success['data'] = $chart;\n\n return response()->json($success, $this->successStatus);\n } catch (\\Throwable $e) {\n $success['status'] = false;\n $success['data'] = \"Error \" . $e;\n $success['message'] = \"Error \" . $e;\n return response()->json($success, $this->successStatus);\n }\n }", "title": "" }, { "docid": "b4a601a06db263ca239fe6f4b7715f17", "score": "0.569895", "text": "public function getAsVariable($varialble = array())\n {\n $data = array();\n\n foreach ($varialble as $data) {\n if (isset($data['label']) && isset($data['amount'])) {\n $theData[$data['variable']] = $data['label'] . ' ' . $data['amount'];\n }\n if (isset($data['label']) && !isset($data['amount'])) {\n $theData[$data['variable']] = $data['label'];\n }\n if (!isset($data['label']) && isset($data['amount'])) {\n $theData[$data['variable']] = $data['amount'];\n }\n }\n return $theData;\n }", "title": "" }, { "docid": "2fafeb3c4edf236a726592340e74faee", "score": "0.569156", "text": "function get_data_gaji($id_user, $id_set)\n {\n\n \t$sql=\"SELECT o.id_omzet AS id_omzet, o.id_set AS id_set,o.id_user AS id_user, i.bulan AS bulan, i.minggu AS minggu, i.tanggal_awal AS tanggal_awal, i.tanggal_akhir AS tanggal_akhir,o.tanggal AS tanggal,o.hari AS hari, SUM(o.omzet_lap_1) AS omzet_lap_1, SUM(o.omzet_lap_2) AS omzet_lap_2, SUM(o.omzet_lap_3) AS omzet_lap_3, SUM(o.omzet_lap_4) AS omzet_lap_4, SUM(o.omzet_lap_5) AS omzet_lap_5, SUM(o.omzet_lap_6) AS omzet_lap_6, SUM(o.omzet_lap_7) AS omzet_lap_7, SUM(o.omzet_lap_8) AS omzet_lap_8, SUM(o.omzet_lap_9) AS omzet_lap_9, SUM(o.omzet_lap_10) AS omzet_lap_10, SUM(o.omzet_lap_11) AS omzet_lap_11 FROM credit_set_omzet AS o LEFT JOIN credit_set_input AS i ON i.id_set=o.id_set WHERE o.id_user='$id_user' AND o.id_set='$id_set' AND o.tanggal BETWEEN i.tanggal_awal AND i.tanggal_akhir\";\n\n\t\t$query = $this->db->query($sql);\n\t\tforeach ($query->result_array() as $row) {\n\t\t\t$array[] = $row;\n\t\t}\n\t\tif (!isset($array)) { \n\t\t\t$array='';\n\t\t}\n\t\t$query->free_result();\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "93f89cfb396384cc9f8afcd19a2cb7bc", "score": "0.56678605", "text": "function ambil_data_pendaftaran()\n {\n\n /*Sebagai token yang yang dikrimkan oleh client, dan nantinya akan\n server kirimkan balik. Gunanya untuk memastikan bahwa user mengklik paging\n sesuai dengan urutan yang sebenarnya */\n $draw = $_REQUEST['draw'];\n\n /*Jumlah baris yang akan ditampilkan pada setiap page*/\n $length = $_REQUEST['length'];\n\n /*Offset yang akan digunakan untuk memberitahu database\n dari baris mana data yang harus ditampilkan untuk masing masing page\n */\n $start = $_REQUEST['start'];\n\n /*Keyword yang diketikan oleh user pada field pencarian*/\n $search = $_REQUEST['search'][\"value\"];\n\n /*order yang di klik user*/\n\n $order = $_REQUEST['order'][0][\"column\"];\n $dir = $_REQUEST['order'][0][\"dir\"];\n\n /*Menghitung total desa didalam database*/\n $total = $this->db->count_all_results(\"siswa\");\n\n /*Mempersiapkan array tempat kita akan menampung semua data\n yang nantinya akan server kirimkan ke client*/\n $output = array();\n\n /*Token yang dikrimkan client, akan dikirim balik ke client*/\n $output['draw'] = $draw;\n\n /*\n $output['recordsTotal'] adalah total data sebelum difilter\n $output['recordsFiltered'] adalah total data ketika difilter\n Biasanya kedua duanya bernilai sama, maka kita assignment\n keduaduanya dengan nilai dari $total\n */\n $output['recordsTotal'] = $output['recordsFiltered'] = $total;\n\n /*disini nantinya akan memuat data yang akan kita tampilkan\n pada table client*/\n $output['data'] = array();\n\n\n /*Jika $search mengandung nilai, berarti user sedang telah\n memasukan keyword didalam filed pencarian*/\n if ($search != \"\") {\n $this->db->like(\"siswa.no_peserta\", $search);\n $this->db->or_like('siswa.nisn', $search);\n $this->db->or_like('siswa.nama_lengkap', $search);\n $this->db->or_like('siswa.asal_sekolah', $search);\n $this->db->or_like('siswa.jurusan', $search);\n }\n\n\n /*Lanjutkan pencarian ke database*/\n $this->db->limit($length, $start);\n /*Urutkan dari alphabet paling terkahir*/\n\n switch ($order) {\n case 1 :\n $orderby = 'siswa.no_peserta';\n break;\n case 2 :\n $orderby = 'siswa.nisn';\n break;\n case 3 :\n $orderby = 'siswa.nama_lengkap';\n break;\n case 4 :\n $orderby = 'siswa.asal_sekolah';\n break;\n case 5 :\n $orderby = 'siswa.jurusan';\n break;\n default :\n $orderby = 'siswa.nama_lengkap';\n }\n $this->db->select('*,siswa.nisn as nisnsiswa');\n $this->db->order_by($orderby, $dir);\n $this->db->join(\"nilai_un\", 'siswa.nisn=nilai_un.nisn', 'left');\n $this->db->join(\"nilai_usbn\", 'siswa.nisn=nilai_usbn.nisn', 'left');\n $filter = strtoupper($this->session->userdata(\"filter_jurusan\"));\n if ($filter != \"\") {\n $this->db->where(\"siswa.jurusan\", $filter);\n }\n\n $query = $this->db->get('siswa');\n\n /*Ketika dalam mode pencarian, berarti kita harus mengatur kembali nilai\n dari 'recordsTotal' dan 'recordsFiltered' sesuai dengan jumlah baris\n yang mengandung keyword tertentu\n */\n if ($search != \"\") {\n $this->db->where(\"siswa.jurusan\", $search);\n $this->db->or_like(\"siswa.no_peserta\", $search);\n $this->db->or_like('siswa.nisn', $search);\n $this->db->or_like('siswa.nama_lengkap', $search);\n $this->db->or_like('siswa.asal_sekolah', $search);\n $this->db->or_like('siswa.jurusan', $search);\n $jum = $this->db->get('siswa');\n $output['recordsTotal'] = $output['recordsFiltered'] = $jum->num_rows();\n }\n\n $nomor_urut = $start + 1;\n foreach ($query->result_array() as $data) {\n if ($filter != \"\") {\n if ($data['jurusan'] == $filter) {\n $un = round(($data['ipa'] + $data['matematika'] + $data['bhs_indonesia'] + $data['bhs_inggris']) / 4, 2);\n $usbn = round(($data['pai'] + $data['pkn'] + $data['ips']) / 3, 2);\n $output['data'][] = array($nomor_urut, $data['no_peserta'], $data['nisnsiswa'], $data['nama_lengkap'], $data['asal_sekolah'], $data['jurusan'], $un, $usbn);\n $nomor_urut++;\n }\n } else {\n $un = round(($data['ipa'] + $data['matematika'] + $data['bhs_indonesia'] + $data['bhs_inggris']) / 4, 2);\n $usbn = round(($data['pai'] + $data['pkn'] + $data['ips']) / 3, 2);\n $output['data'][] = array($nomor_urut, $data['no_peserta'], $data['nisnsiswa'], $data['nama_lengkap'], $data['asal_sekolah'], $data['jurusan'], $un, $usbn);\n $nomor_urut++;\n }\n }\n echo json_encode($output);\n }", "title": "" }, { "docid": "e58d0443d0e7c854143603594b3bff17", "score": "0.5657437", "text": "function tambah_data($data)\n\t{\n\t\t$this->db->insert($this->nama_table, $data);\n\t\treturn $this->db->get($this->nama_table)->result();\n\t}", "title": "" }, { "docid": "51c326a5659ed538e278f2cc3ac5aa93", "score": "0.5656747", "text": "public function tambah_data( )\n\t{\n\n\t\t// if ($jumlah_penghasilan > 2500000) {\n\t\t// \t$kat = \"tinggi\";\n\t\t// }else if($jumlah_penghasilan >= 1500000 && $jumlah_penghasilan <= 2500000){\n\t\t// \t$kat = \"sedang\";\n\t\t// }else if($jumlah_penghasilan < 1500000){\n\t\t// \t$kat = \"rendah\";\n\t\t// }\n\n\t\t$data = array(\n\t\t\t// 'id_training' => $this->input->post('id_training', true),\n\t\t\t'nama' => $this->input->post('nama', true),\n\t\t\t'pkh' => $this->input->post('pkh', true),\n\t\t\t'jml_tanggungan' => $this->input->post('jml_tanggungan', true),\n\t\t\t'kepala_rt' => $this->input->post('kepala_rt', true),\n\t\t\t'kondisi_rumah' => $this->input->post('kondisi_rumah', true),\n\t\t\t'jml_penghasilan' => $this->input->post('jml_penghasilan', true),\n\t\t\t'status_rumah' => $this->input->post('status_rumah', true),\n\t\t\t'status_kelayakan' => $this->input->post('status_kelayakan', true)\n\t\t);\n\n\t\t$this->db->insert('tbl_training', $data);\n\t}", "title": "" }, { "docid": "a45b963096b2bb473ad994f9ffab88db", "score": "0.56537837", "text": "function cargar_dato($dato)\t\t\t\r\n {\r\n $ncampos=3;\r\n\tif($ncampos==count($dato))\r\n\t{\r\n $this->tipent_codigo=$dato[0];\r\n\t $this->tipent_nombre=$dato[1];\r\n\t $this->tipent_orden=$dato[2]; \r\n\t} \r\n }", "title": "" }, { "docid": "4a2b4a4f0593ab3def597cdb3f5ca0b1", "score": "0.5651208", "text": "public function h190302_investor_data()\n {\n // $invest_bid_money = M(\"BorrowInvestor\")->where(\"investor_uid=$user_id and status IN (12)\")->sum(\"investor_capital\");\n $data = M()->query(\"select investor_uid , sum(investor_capital) as t from tp_borrow_investor where status = 12 GROUP by investor_uid\");\n $str = '';\n foreach ($data as $key => $value){\n $str .= \"insert into `initial_capital_a` (`capital`,`user_id`) VALUES ({$value['t']},{$value['investor_uid']});<br>\";\n }\n echo $str;die;\n }", "title": "" }, { "docid": "589f931f48a60e69d37edf200a0c2dd5", "score": "0.5640842", "text": "function PocasiSql($data){\n\t\n\t$dnes = $data['id_pocasi_zitra'];\n\t$zitra = VypocitejZitrejsiPocasi($data['id_pocasi_dnes'], $data['id_pocasi_zitra'], $data['rocni_obdobi']);\n\t\n\t$sql = \" id_pocasi_dnes = $dnes, id_pocasi_zitra = $zitra\";\n\treturn $sql;\n}", "title": "" }, { "docid": "ef20b9e72b06ec201808a36da4ffc683", "score": "0.5640415", "text": "public function getDataBoxLabaRugi(Request $r)\n {\n try {\n if ($data = Auth::guard($this->guard)->user()) {\n $nik = $data->nik;\n $kode_lokasi = $data->kode_lokasi;\n }\n $kode_lokasi = $r->kode_lokasi;\n if (isset($r->kode_bidang) && $r->kode_bidang != \"\") {\n $filter_bidang = \" and a.kode_bidang = '$r->kode_bidang' \";\n } else {\n $filter_bidang = \"\";\n }\n\n if (isset($r->kode_pp) && $r->kode_pp != \"\") {\n $filter_pp = \" and b.kode_pp = '$r->kode_pp' \";\n } else {\n $filter_pp = \"\";\n }\n $col_array = array('periode');\n $db_col_name = array('b.periode');\n $where = \"WHERE a.kode_lokasi = '$kode_lokasi' AND a.kode_fs='FS1' \";\n $where = $this->filterReq($r, $col_array, $db_col_name, $where, \"\");\n\n if (isset($r->jenis) && $r->jenis != \"\") {\n if ($r->jenis == \"PRD\") {\n $n4 = \"n6\";\n } else {\n $n4 = \"n4\";\n }\n } else {\n $n4 = \"n4\";\n }\n\n $sql = \"SELECT a.kode_bidang, a.nama, ISNULL(b.pdpt,0) AS pdpt, ISNULL(b.beban,0) AS beban, \n ISNULL(b.shu,0) AS shu,a.skode\n FROM dash_ypt_bidang a\n LEFT JOIN (SELECT p.kode_bidang,a.kode_lokasi,\n SUM(CASE WHEN a.kode_grafik='PI01' THEN (CASE WHEN b.jenis_akun='Pendapatan' THEN -b.$n4 ELSE b.$n4 END) ELSE 0 END) AS pdpt,\n SUM(CASE WHEN a.kode_grafik='PI02' THEN (CASE WHEN b.jenis_akun='Pendapatan' THEN -b.$n4 ELSE b.$n4 END) ELSE 0 END) AS beban,\n SUM(CASE WHEN a.kode_grafik='PI03' THEN (CASE WHEN b.jenis_akun='Pendapatan' THEN -b.$n4 ELSE b.$n4 END) ELSE 0 END) AS shu\t\t\n FROM dash_ypt_grafik_d a\n INNER JOIN exs_neraca_pp b ON a.kode_neraca=b.kode_neraca AND a.kode_lokasi=b.kode_lokasi AND a.kode_fs=b.kode_fs\n INNER JOIN pp p on b.kode_pp=p.kode_pp and b.kode_lokasi=p.kode_lokasi\n INNER JOIN dash_ypt_grafik_m c ON a.kode_grafik=c.kode_grafik AND a.kode_lokasi=c.kode_lokasi\n $where $filter_pp\n GROUP BY a.kode_lokasi,p.kode_bidang\n ) b ON a.kode_lokasi=b.kode_lokasi and a.kode_bidang=b.kode_bidang\n WHERE a.kode_lokasi ='$kode_lokasi' $filter_bidang\";\n\n $select = DB::connection($this->sql)->select($sql);\n $res = json_decode(json_encode($select), true);\n\n $ctg = [];\n $data_pdpt = [];\n $data_beban = [];\n $data_shu = [];\n foreach ($res as $item) {\n $pdpt = floatval(number_format((float)$item['pdpt'], 0, '.', ''));\n $beban = floatval(number_format((float)$item['beban'], 0, '.', ''));\n $shu = floatval(number_format((float)$item['shu'], 0, '.', ''));\n\n $name = $item['skode'];\n\n array_push($ctg, $name);\n array_push($data_pdpt, $pdpt);\n array_push($data_beban, $beban);\n array_push($data_shu, $shu);\n }\n\n $success['status'] = true;\n $success['message'] = \"Success!\";\n $success['data'] = [\n 'kategori' => $ctg,\n 'data_pdpt' => $data_pdpt,\n 'data_beban' => $data_beban,\n 'data_shu' => $data_shu\n ];\n\n return response()->json($success, $this->successStatus);\n } catch (\\Throwable $e) {\n $success['status'] = false;\n $success['data'] = [\n 'kategori' => [],\n 'data_pdpt' => [],\n 'data_beban' => [],\n 'data_shu' => [],\n 'message' => 'Error ' . $e\n ];\n $success['message'] = \"Error \" . $e;\n return response()->json($success, $this->successStatus);\n }\n }", "title": "" }, { "docid": "8dadabd804256486eea9c30d7a4316b1", "score": "0.5639681", "text": "function cargar_dato($dato)\t\t\t\r\n {\r\n $ncampos=1;\r\n\tif($ncampos==count($dato))\r\n\t{\r\n //$this->emp_codigo=$dato[0];\r\n\t $this->emp_nombre=$dato[0]; \r\n\t} \r\n }", "title": "" }, { "docid": "97ca1a796ccd6d86cee9b8e9c9715bea", "score": "0.5639207", "text": "function get_data(){\n\n $data['user_id']=$_SESSION['resturant_userdata']['user_id'];\n\t\t$data['restaurant_id']=$_SESSION['resturant_userdata']['restaurant_id'];\n\t\t$data['company_id']=$_SESSION['resturant_userdata']['user_company_id'];\n\t\t$data['language_code']=$_SESSION['lang_code'];\n return $data;\n }", "title": "" }, { "docid": "e95919c5302f9f50922946ac37aabe57", "score": "0.5637732", "text": "function set_detail_pembelian(){\r\n\t\t$data=array();$rcord=0;$tot_bel=0;$find_batch='';\r\n\t\t$id_beli=rdb('inv_pembelian','ID','ID',\"where NoUrut='\".$_POST['no_trans'].\"' and Tanggal='\".tgltoSql($_POST['tanggal']).\"'\");\r\n\t\t$id_barang=rdb('inv_barang','ID','ID',\"where Nama_Barang='\".addslashes($_POST['nm_barang']).\"'\");\r\n\t\t$find_batch=rdb('inv_material_stok','batch','batch',\"where id_barang='\".$id_barang.\"' and harga_beli='\".$_POST['harga_beli'].\"'\");\r\n\t\t$tot_bel=rdb('inv_pembelian','ID_Bayar','ID_Bayar',\"where NoUrut='\".$_POST['no_trans'].\"' and Tanggal='\".tgltoSql($_POST['tanggal']).\"'\");\r\n\t\t$id_anggota=rdb('inv_pembelian','ID_Pemasok','ID_Pemasok',\"where NoUrut='\".$_POST['no_trans'].\"' and Tanggal='\".tgltoSql($_POST['tanggal']).\"'\");\r\n\t\t$data['tanggal']\t=tgltoSql($_POST['tanggal']);\r\n\t\t$data['id_beli']\t=$id_beli;\r\n\t\t$data['id_barang']\t=rdb('inv_barang','ID','ID',\"where Nama_Barang='\".addslashes($_POST['nm_barang']).\"'\");\r\n\t\t$data['jml_faktur']\t=$_POST['jumlah'];\r\n\t\t$data['Jumlah']\t\t=$_POST['jumlah'];\r\n\t\t$data['Harga_Beli']\t=$_POST['harga_beli'];\r\n\t\t$data['ID_Satuan']\t=$_POST['id_satuan'];\r\n\t\t$data['batch']\t\t=($find_batch=='' || $find_batch==NULL)?date('ymdz').'-'.date('i'):$find_batch;\r\n\t\t$data['Keterangan']\t=$_POST['keterangan'];\r\n\t\t$data['Bulan']\t\t=substr($_POST['tanggal'],3,2);\t\r\n\t\t$data['Tahun']\t\t=substr($_POST['tanggal'],6,4);\t\r\n\t\t$this->Admin_model->replace_data('inv_pembelian_detail',$data);\r\n\t\t$this->Admin_model->upd_data('inv_pembelian',\"set ID_Bayar='\".($tot_bel+$_POST['keterangan']).\"'\",\"where NoUrut='\".$_POST['no_trans'].\"' and Tanggal='\".tgltoSql($_POST['tanggal']).\"'\");\r\n\t\techo rdb('inv_pembelian_detail','ID','ID',\"order by ID desc limit 1\");\r\n\t\t//process to jurnal temp\r\n\t\t$ID_Jenis=empty($_POST['id_jenis'])?'1':$_POST['id_jenis'];\r\n\t\t$TotalHg=$_POST['harga_beli'];\r\n\t\t$this->no_transaksi($_POST['no_trans']);\r\n\t\t$this->tanggal(($_POST['tanggal']));\r\n\t\t$this->JenisBayar('6');\r\n\t\tif($TotalHg!='0'){\r\n\t\t\tif(($ID_Jenis!='4' || $ID_Jenis!='5') && $id_anggota!=''){\r\n\t\t\t\t$this->process_to_jurnal($id_anggota,$TotalHg);\r\n\t\t\t}else if($ID_Jenis=='6' && $id_anggota!=''){\r\n\t\t\t\t$ket='';\t\r\n\t\t\t\t$this->process_to_jurnal($id_anggota,$TotalHg,$ket);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "c237960a61c351d58586b5124ab27c93", "score": "0.56318223", "text": "public function getDataPersonilSatker($data) {\n parent::setConnection('db_pegawai');\n\n $idKey = array(); $dataArr = array();\n $q_cari = 'WHERE 1 ';\n if (!empty($data['kdlokasi'])) {\n $q_cari .= 'AND (kdlokasi = ?)';\n array_push($idKey, $data['kdlokasi']);\n }\n\n if (!empty($data['cari'])) {\n $cari = '%' . $data['cari'] . '%';\n $q_cari .= ' AND ((nama_personil LIKE ?) || (pin_absen LIKE ?)) ';\n array_push($idKey, $cari, $cari);\n }\n\n $query = 'SELECT * FROM view_presensi_personal ' . $q_cari . '';\n $dataArr = $this->getData($query, $idKey);\n return $dataArr;\n }", "title": "" }, { "docid": "dde262b9820573fe0f453874f00c5494", "score": "0.56294507", "text": "function data($valor)\n\t{\n\t\t// meses\n\t\t$dia = substr($valor, 8,2);\n\t\t$mes = substr($valor, 5,2);\n\t\tswitch ($mes)\n\t\t{\n\t\t\tcase 1: $mes = \"Jan\";break;\n\t\t\tcase 2: $mes = \"Fev\";break;\n\t\t\tcase 3: $mes = \"Mar\";break;\n\t\t\tcase 4: $mes = \"Abr\";break;\n\t\t\tcase 5: $mes = \"Mai\";break;\n\t\t\tcase 6: $mes = \"Jun\";break;\n\t\t\tcase 7: $mes = \"Jul\";break;\n\t\t\tcase 8: $mes = \"Ago\";break;\n\t\t\tcase 9: $mes = \"Set\";break;\n\t\t\tcase 10: $mes = \"Out\";break;\n\t\t\tcase 11: $mes = \"Nov\";break;\n\t\t\tcase 12: $mes = \"Dez\";break;\n\t\t}\n\t\t$ano = substr($valor, 0,4);\n\t\techo $dia.\" \".$mes;\n\t}", "title": "" }, { "docid": "2d58ec146e2904ec724deec8b3f76361", "score": "0.5627501", "text": "protected function loadDbValues($row)\n {\n if (!is_array($row)) {\n return;\n }\n $this->Tahun_Periode->DbValue = $row['Tahun_Periode'];\n $this->Periode->DbValue = $row['Periode'];\n $this->Bentuk_Anggota->DbValue = $row['Bentuk_Anggota'];\n $this->Jumlah_Koperasi->DbValue = $row['Jumlah_Koperasi'];\n $this->Aktif->DbValue = $row['Aktif'];\n $this->Pasif->DbValue = $row['Pasif'];\n $this->Jumlah_Anggota->DbValue = $row['Jumlah_Anggota'];\n $this->Anggota_Lakilaki->DbValue = $row['Anggota_Laki-laki'];\n $this->Anggota_Perempuan->DbValue = $row['Anggota_Perempuan'];\n $this->Jumlah_Manajer->DbValue = $row['Jumlah_Manajer'];\n $this->Manajer_Lakilaki->DbValue = $row['Manajer_Laki-laki'];\n $this->Manajer_Perempuan->DbValue = $row['Manajer_Perempuan'];\n $this->Jumlah_Karyawan->DbValue = $row['Jumlah_Karyawan'];\n $this->Karyawan_Lakilaki->DbValue = $row['Karyawan_Laki-laki'];\n $this->Karyawan_Perempuan->DbValue = $row['Karyawan_Perempuan'];\n $this->RAT->DbValue = $row['RAT'];\n $this->Jumlah_Modal_Sendiri->DbValue = $row['Jumlah_Modal_Sendiri'];\n $this->Jumlah_Modal_Luar->DbValue = $row['Jumlah_Modal_Luar'];\n $this->Jumlah_Volume_Usaha->DbValue = $row['Jumlah_Volume_Usaha'];\n $this->SHU->DbValue = $row['SHU'];\n $this->Aset->DbValue = $row['Aset'];\n }", "title": "" }, { "docid": "c78147601d72a8c52949879a88c8c470", "score": "0.56263655", "text": "function mydataone_custom($table, $fieldnya, $panggil, $conn,$filter=\"0\"){\n $row = array();\n $CI = & get_instance();\n \n if($filter==\"0\"){\n $strqr = \"SELECT $fieldnya FROM $table\";\n }else{\n $strqr = \"SELECT $fieldnya FROM $table where $filter\";\n }\n// echo $strqr;\n $query = $conn->query($strqr);\n// print_r($strqr.'<br/>');\n// echo $strqr .\"<br />\";\n $row = $query->row_array();\n $field = $row[\"$panggil\"];\n \n return $field;\n }", "title": "" }, { "docid": "2640723cab8f7f4d103506e466bf25f6", "score": "0.5625287", "text": "public function grid_data()\n\t{\n\t\t\t\n\t\t\t$result = $this->db->query(\"call v_jadwal('\".$this->input->post('departemen').\"','\".$this->input->post('idkelas').\"','\".$this->input->post('infojadwal').\"','\".$this->input->post(\"hari\").\"')\")->result();\n\t\t\t$this->M_API->JSON($result);\n\t\t\t//$this->M_jqxgrid->read();\n\t}", "title": "" }, { "docid": "f89255333757d75029e5c3e03f405457", "score": "0.5618985", "text": "function ambil_data(){\n\t\t$modul=$this->input->post('modul');\n\t\t$id=$this->input->post('id');\n\n\t\tif($modul==\"kota\"){\n\t\techo $this->m_entryp->kota($id);\n\t\t\n\t\t}\n\t\telse if($modul==\"kecamatan\"){\n\t\techo $this->m_entryp->kecamatan($id);\n\n\t\t}\n\t\telse if($modul==\"kelurahan\"){\n\t\techo $this->m_entryp->kelurahan($id);\n\t\t}\n\t\telse if($modul==\"basic\"){\n\t\t//var_dump(\"asd\");\n\t\techo $this->m_entryp->basic($id);\n\t\t}\n\t\telse if($modul==\"alacarte\")\n\t\t{\n\t\techo $this->m_entryp->alacarte($id);\n\t\t}\n\t\telse if($modul==\"subc\")\n\t\t{\n\t\techo $this->m_entryp->get_subcategorydth($id);\n\t\t}\n\t}", "title": "" }, { "docid": "dcf64e1f8deb72b5b7eb34dfa8bbff2b", "score": "0.56181234", "text": "function dd_emp_status()\n {\n // ambil data dari db\n $this->db->order_by('id_position', 'asc');\n $this->db->like('position_desc','karyawan');\n $result = $this->db->get('master_position');\n \n // bikin array\n // please select berikut ini merupakan tambahan saja agar saat pertama\n // diload akan ditampilkan text please select.\n //$dd[''] = 'id_position'; untuk placeholder\n if ($result->num_rows() > 0) {\n foreach ($result->result() as $row) {\n // tentukan value (sebelah kiri) dan labelnya (sebelah kanan)\n \t$a = \" -> \";\n $dd[$row->id_position] = $row->id_position .$a. $row->position_desc;\n }\n }\n return $dd;\n }", "title": "" }, { "docid": "4bb3248f264b3f62a31f1351600e438f", "score": "0.5605374", "text": "public function ambildata()\n {\n $hslmts = array();\n\n $query = $this->db->get('mutasikiddie');\n\n if ($query->num_rows() > 0) {\n $hslmts = $query->result();\n }\n return $hslmts;\n }", "title": "" }, { "docid": "cb1751900853b839a03fe4652894a12d", "score": "0.5601528", "text": "public function getData2()\n {\n $res = $this->db->get('rbb')->result_array();\n foreach ($res as $a => $val) :\n $this->db->join('vendor', \"vendor.KODE_VENDOR = pks.NAMA_VENDOR\");\n $this->db->join('j_project', \"j_project.KODE_JENISPROJECT = pks.JENIS\");\n $r = $this->db->get_where('pks', array('pks.KODE_RBB' => $val[\"KODE_RBB\"]))->result_array();\n foreach ($r as $b => $val) :\n $this->db->join('pembayaran', 'termin_pks.KODE_TERMIN = pembayaran.KODE_TERMIN', 'inner');\n $s = $this->db->get_where('termin_pks', array('termin_pks.NO_PKS' => $val[\"NO_PKS\"]))->result_array();\n $r[$b]['invs'] = $s;\n endforeach;\n $res[$a]['pks'] = $r;\n endforeach;\n // var_dump($res);\n\n // $res = $this->db->get_where('pks', 'pks.KODE_RBB = 12\")->result_array();\n // var_dump($res);\n\n // die;\n return $res;\n }", "title": "" }, { "docid": "bd1754241854d6d88d81fdd346bd92af", "score": "0.56011856", "text": "function cekdata_dg($no,$pt,$div,$bln,$thn){\n\t\t\t$nopr = $no.\"/\".$pt.\"/\".$div.\"/\".$bln.\"/\".$thn;\n\t\t\t//die($nopr);\n\t\t\t\n\t\t\t$sql = $this->db->query(\"select nm_brg, unit_brg, qty_brg, recvendor\n\t\t\t\t\t\t\t\t\t\t\t\t\t from db_prorder where no_pr='$nopr'\")->result(); \n\t\t\t\t\n\t\t\t\t// $getsql = $this->db->where('ref_no',$cekid)\n\t\t\t\t\t\t\t // ->get('db_gldetail')->result();\t\t \t\t\t\t \n\t\t \n\t\t\t$xtampil = array();\t\n\n\t\t\tforeach($sql as $row){\n\t\t\t\t\n\t\t\t $xtampil[] = array \n\t\t\t (\n\t\t\t\t\t'nmbrg' => $row->nm_brg, \n\t\t\t\t\t'satuan' => $row->unit_brg, \n\t\t\t\t\t'qty' => $row->qty_brg, \n\t\t\t\t\t'vendor' => $row->recvendor, \n\t\t\t\t );\n\t\t\t }\n\t\t\t\t\n\t\t die(json_encode($xtampil));\n\t\t}", "title": "" }, { "docid": "e4bad1f9bb3a6ade6ad1b13443eba402", "score": "0.560068", "text": "function tgl_indo_db($value) {\n $tgl = explode (\" \", $value);\n\t$hari = $tgl[0];\n\t$bulan = bulan_value($tgl[1]);\n $tahun = $tgl[2];\n\t$tgl_indo_db = \"$tahun-$bulan-$hari\"; \n\treturn $tgl_indo_db;\n // menjadi 2016-04-01\n}", "title": "" }, { "docid": "04ed8b3544f922a2b6dd2ac2e1abbbe5", "score": "0.5596279", "text": "public function getdata();", "title": "" }, { "docid": "6a7654039c3a84a79b930b48e06d2aac", "score": "0.55888855", "text": "public function data_grafik()\n\t{\n\t\t$bulan = 1;\n\t\t$this->load->model('graph_model');\n\t\t$data = $this->graph_model->data_emp_in();\n\t\techo json_encode($data);\n\t\t//echo date('n');\n\t\t/* echo \"<pre>\";\n\t\techo print_r($data);\n\t\techo \"</pre>\"; */\t\n\t}", "title": "" }, { "docid": "ee24cd6c178bf1dc4238c53ccc111d82", "score": "0.55853283", "text": "function fetch_data() {\n \n $query = $this->db->select('pocet_prijatych.id id, skola.nazev nazev, obor.nazev obor, pocet_prijatych.pocet pocet, pocet_prijatych.rok rok, skola.geolat geolat, skola.geolong geolong')\n //->from('pocet_prijatych, skola')\n ->from('pocet_prijatych') \n //->join('mesto','skola.mesto = mesto.id') mesto.nazev nazevMesta,\n ->join('skola', 'pocet_prijatych.skola = skola.id') \n ->join('obor', 'pocet_prijatych.obor = obor.id')\n \n //->join('mesto','mesto = mesto.id')\n ->get();\n return $query->result();\n }", "title": "" }, { "docid": "46ab3a2344bc61f319f24fc84cf10caa", "score": "0.5584886", "text": "function datakelasbelajar()\n {\n $variabel['data']=$this->m_presensi->lihatdata();\n $this->layout->render('back-end/presensi/presensi_kelas/v_presensi_kelas',$variabel,'back-end/presensi/presensi_kelas/v_preskelas_js');\n }", "title": "" }, { "docid": "55318ac9ae9c9ada2fe1f120e38d12d8", "score": "0.55796957", "text": "function lap_data_log() {\n\t\t$kode_transaksi = isset($_GET['kode_transaksi']) ? $_GET['kode_transaksi'] : '';\n\t\t$cari_nama = isset($_GET['cari_nama']) ? $_GET['cari_nama'] : '';\n\t\t$cari_anggota = isset($_GET['cari_anggota']) ? $_GET['cari_anggota'] : '';\n\t\t$sql = '';\n $sql ='SELECT a.id AS id, a.nomor_pinjaman as nomor_pinjaman, b.ktp as ktp, a.ags_per_bulan as angsuran, a.tempo AS tempo, a.lunas AS lunas, a.tenor as tenor, a.tgl_pinjam AS tgl_pinjam, a.tagihan AS tagihan, a.lama_angsuran AS lama_angsuran,\n\t\ta.biaya_adm AS adm, a.pokok_angsuran AS pokok_angsuran, a.bunga_pinjaman AS bunga_pinjaman,\n\t\tb.ktp AS ktp, b.nama AS nama, b.id AS anggota_id\n FROM\n\t v_hitung_pinjaman a\n\t\tleft join tbl_anggota b on b.id = a.anggota_id\n left join tbl_pinjaman_d c on c.pinjam_id = a.id';\n $sql .= ' where lunas = \"Belum\"';\n\t\t$q = array('kode_transaksi' => $kode_transaksi, \n\t\t\t'cari_anggota' => $cari_anggota,\n 'cari_nama' => $cari_nama\n );\n\t\tif(is_array($q)) {\n\t\t\tif($q['kode_transaksi'] != '') {\n\t\t\t\t$q['kode_transaksi'] = $q['kode_transaksi'];\n\t\t\t\t$sql .=\" AND (a.nomor_pinjaman LIKE '\".$q['kode_transaksi'].\"' OR anggota_id LIKE '\".$q['kode_transaksi'].\"') \";\n\t\t\t} else {\n\t\t\t\tif($q['cari_anggota'] != '') {\n\t\t\t\t\t$sql .=\" AND b.jns_anggotaid = '\".$q['cari_anggota'].\"' \";\n\t\t\t\t}\t\n\t\t\t\tif($q['cari_nama'] != '') {\n\t\t\t\t\t$sql .=\" AND b.nama LIKE '%\".$q['cari_nama'].\"%' \";\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\t$query = $this->db->query($sql);\n\t\tif($query->num_rows() > 0) {\n\t\t\t$out = $query->result();\n\t\t\treturn $out;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "878ddb2c4e999891def329b58a1dedb3", "score": "0.5577809", "text": "function cargar_dato($dato)\t\t\t\r\n {\r\n $ncampos=5;\r\n\tif($ncampos==count($dato))\r\n\t{\r\n\t /*\r\n\t $this->ingpro_codigo=$dato[0];\r\n\t $this->com_codigo=$dato[1]; \r\n $this->pro_codigo=$dato[2];\r\n $this->tip_codigo=$dato[3];\r\n $this->est_codigo=$dato[4];\r\n $this->datpro_nombre=$dato[5];\r\n */\r\n\t $this->com_codigo=$dato[0]; \r\n $this->pro_codigo=$dato[1];\r\n $this->tip_codigo=$dato[2];\r\n $this->est_codigo=$dato[3];\r\n $this->datpro_nombre=$dato[4];\r\n\t} \r\n }", "title": "" }, { "docid": "e7286506aa3f9059b9555f5115e4a3e4", "score": "0.55774105", "text": "public function getDataPerformansiLembaga(Request $r)\n {\n try {\n if ($data = Auth::guard($this->guard)->user()) {\n $nik = $data->nik;\n $kode_lokasi = $data->kode_lokasi;\n }\n\n $kode_lokasi = $r->kode_lokasi;\n if (isset($r->kode_bidang) && $r->kode_bidang != \"\") {\n $filter_bidang = \" and a.kode_bidang = '$r->kode_bidang' \";\n } else {\n $filter_bidang = \"\";\n }\n if (isset($r->kode_pp) && $r->kode_pp != \"\") {\n $filter_pp = \" and b.kode_pp = '$r->kode_pp' \";\n } else {\n $filter_pp = \"\";\n }\n\n $col_array = array('periode', 'kode_grafik');\n $db_col_name = array('b.periode', 'a.kode_grafik');\n $where = \"WHERE a.kode_fs = 'FS1' \";\n $where = $this->filterReq($r, $col_array, $db_col_name, $where, \"\");\n\n if (isset($r->jenis) && $r->jenis != \"\") {\n if ($r->jenis == \"PRD\") {\n $n4 = \"n6\";\n $n2 = \"n7\";\n $n5 = \"n9\";\n } else {\n $n4 = \"n4\";\n $n2 = \"n2\";\n $n5 = \"n5\";\n }\n } else {\n $n4 = \"n4\";\n $n2 = \"n2\";\n $n5 = \"n5\";\n }\n\n if (isset($r->kode_grafik) && $r->kode_grafik[1] == \"PI04\") {\n\n $sql = \"SELECT a.kode_bidang, a.nama, ISNULL(b.n2,0) AS n2, ISNULL(b.n4,0) AS n4, ISNULL(b.n5,0) AS n5, \n ISNULL(b.capai,0) as capai,a.skode\n FROM dash_ypt_bidang a\n LEFT JOIN (\n SELECT a.kode_lokasi,p.kode_bidang,\n SUM(CASE WHEN b.jenis_akun='Pendapatan' THEN -b.$n2 ELSE b.$n2 END) AS n2,\n SUM(CASE WHEN b.jenis_akun='Pendapatan' THEN -b.$n4 ELSE b.$n4 END) AS n4,\n SUM(CASE WHEN b.jenis_akun='Pendapatan' THEN -b.$n5 ELSE b.$n5 END) AS n5,\n CASE WHEN sum(b.$n4)<>0 THEN (sum(b.$n2)/sum(b.$n4))*100 ELSE 0 END AS capai\n FROM dash_ypt_grafik_d a\n INNER JOIN exs_neraca_pp b ON a.kode_neraca=b.kode_neraca AND a.kode_lokasi=b.kode_lokasi AND a.kode_fs=b.kode_fs\n INNER JOIN dash_ypt_grafik_m c ON a.kode_grafik=c.kode_grafik AND a.kode_lokasi=c.kode_lokasi\n INNER JOIN pp p ON b.kode_pp=p.kode_pp AND b.kode_lokasi=p.kode_lokasi\n $where $filter_pp\n GROUP BY a.kode_lokasi,p.kode_bidang\n ) b ON a.kode_lokasi=b.kode_lokasi and a.kode_bidang=b.kode_bidang\n WHERE a.kode_lokasi ='$kode_lokasi' $filter_bidang \";\n } else {\n $sql = \"SELECT a.kode_bidang, a.nama, ISNULL(b.n2,0) AS n2, ISNULL(b.n4,0) AS n4, ISNULL(b.n5,0) AS n5, \n ISNULL(b.capai,0) as capai,a.skode\n FROM dash_ypt_bidang a\n LEFT JOIN (\n SELECT a.kode_lokasi,p.kode_bidang,\n SUM(CASE WHEN b.jenis_akun='Pendapatan' THEN -b.$n2 ELSE b.$n2 END) AS n2,\n SUM(CASE WHEN b.jenis_akun='Pendapatan' THEN -b.$n4 ELSE b.$n4 END) AS n4,\n SUM(CASE WHEN b.jenis_akun='Pendapatan' THEN -b.$n5 ELSE b.$n5 END) AS n5,\n CASE WHEN sum(b.$n2)<>0 THEN (sum(b.$n4)/sum(b.$n2))*100 ELSE 0 END AS capai\n FROM dash_ypt_grafik_d a\n INNER JOIN exs_neraca_pp b ON a.kode_neraca=b.kode_neraca AND a.kode_lokasi=b.kode_lokasi AND a.kode_fs=b.kode_fs\n INNER JOIN dash_ypt_grafik_m c ON a.kode_grafik=c.kode_grafik AND a.kode_lokasi=c.kode_lokasi\n INNER JOIN pp p ON b.kode_pp=p.kode_pp AND b.kode_lokasi=p.kode_lokasi\n $where $filter_pp\n GROUP BY a.kode_lokasi,p.kode_bidang\n ) b ON a.kode_lokasi=b.kode_lokasi and a.kode_bidang=b.kode_bidang\n WHERE a.kode_lokasi ='$kode_lokasi' $filter_bidang \";\n }\n\n $select = DB::connection($this->sql)->select($sql);\n $res = json_decode(json_encode($select), true);\n\n $ctg = [];\n $data_realisasi = [];\n $data_anggaran = [];\n foreach ($res as $item) {\n\n $name = $item['skode'];\n\n $realisasi = floatval(number_format((float)$item['capai'], 2, '.', ''));\n $sisa = 100 - $realisasi;\n $anggaran = 100;\n\n array_push($ctg, $name);\n array_push($data_realisasi, $realisasi);\n array_push($data_anggaran, $anggaran);\n }\n $success['status'] = true;\n $success['message'] = \"Success!\";\n $success['data'] = [\n \"kategori\" => $ctg,\n \"realisasi\" => $data_realisasi,\n \"anggaran\" => $data_anggaran\n ];\n\n return response()->json($success, $this->successStatus);\n } catch (\\Throwable $e) {\n $success['status'] = false;\n $success['message'] = \"Error \" . $e;\n return response()->json($success, $this->successStatus);\n }\n }", "title": "" }, { "docid": "245bc81a7cf630e65bbcb347a0d3a1ba", "score": "0.55771357", "text": "function listarVariables(){\n\t\t$this->procedimiento='gem.f_equipo_variable_sel';\n\t\t$this->transaccion='GEM_EQUVAR_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\n\t\t$this->setParametro('id_uni_cons','id_uni_cons','integer');\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_equipo_variable','int4');\n\t\t$this->captura('valor_max','numeric');\n\t\t$this->captura('valor_min','numeric');\n\t\t$this->captura('nombre','varchar');\n\t\t$this->captura('descripcion','varchar');\n\t\t$this->captura('desc_un_med','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "f3cc019715e2a871db0384b9badc9d63", "score": "0.557501", "text": "public function getDataBoxFirst(Request $r)\n {\n try {\n if ($data = Auth::guard($this->guard)->user()) {\n $nik = $data->nik;\n $kode_lokasi = $data->kode_lokasi;\n }\n\n $kode_lokasi = $r->kode_lokasi;\n if (isset($r->jenis) && $r->jenis != \"\") {\n if ($r->jenis == \"PRD\") {\n $n4 = \"n6\";\n $n2 = \"n7\";\n $n5 = \"n9\";\n } else {\n $n4 = \"n4\";\n $n2 = \"n2\";\n $n5 = \"n5\";\n }\n } else {\n $n4 = \"n4\";\n $n2 = \"n2\";\n $n5 = \"n5\";\n }\n\n $col_array = array('periode');\n $db_col_name = array('b.periode');\n $where = \"WHERE a.kode_lokasi='$kode_lokasi' AND a.kode_fs='FS1' AND a.kode_grafik in ('PI01','PI02','PI03','PI04')\";\n $where = $this->filterReq($r, $col_array, $db_col_name, $where, \"\");\n\n if (isset($r->kode_bidang) && $r->kode_bidang != \"\") {\n $filter_bidang = \" and p.kode_bidang='$r->kode_bidang' \";\n $filter_pp = \"\";\n if(isset($r->kode_pp) && $r->kode_pp != \"\"){\n $filter_pp = \" and p.kode_pp='$r->kode_pp' \";\n }\n $sql = \"SELECT a.kode_grafik, c.nama,\n SUM(CASE WHEN b.jenis_akun='Pendapatan' THEN -b.$n2 ELSE b.$n2 END) AS n2,\n SUM(CASE WHEN b.jenis_akun='Pendapatan' THEN -b.$n4 ELSE b.$n4 END) AS n4,\n SUM(CASE WHEN b.jenis_akun='Pendapatan' THEN -b.$n5 ELSE b.$n5 END) AS n5\n FROM dash_ypt_grafik_d a\n INNER JOIN exs_neraca_pp b ON a.kode_neraca=b.kode_neraca AND a.kode_lokasi=b.kode_lokasi AND a.kode_fs=b.kode_fs\n INNER JOIN dash_ypt_grafik_m c ON a.kode_grafik=c.kode_grafik AND a.kode_lokasi=c.kode_lokasi\n INNER JOIN pp p on b.kode_pp=p.kode_pp and b.kode_lokasi=p.kode_lokasi\n $where $filter_bidang $filter_pp\n group by a.kode_grafik, c.nama\n order by a.kode_grafik \";\n } else {\n\n $sql = \"SELECT a.kode_grafik, c.nama,\n SUM(CASE WHEN b.jenis_akun='Pendapatan' THEN -b.$n2 ELSE b.$n2 END) AS n2,\n SUM(CASE WHEN b.jenis_akun='Pendapatan' THEN -b.$n4 ELSE b.$n4 END) AS n4,\n SUM(CASE WHEN b.jenis_akun='Pendapatan' THEN -b.$n5 ELSE b.$n5 END) AS n5\n FROM dash_ypt_grafik_d a\n INNER JOIN exs_neraca b ON a.kode_neraca=b.kode_neraca AND a.kode_lokasi=b.kode_lokasi AND a.kode_fs=b.kode_fs\n INNER JOIN dash_ypt_grafik_m c ON a.kode_grafik=c.kode_grafik AND a.kode_lokasi=c.kode_lokasi\n $where\n group by a.kode_grafik, c.nama \n order by a.kode_grafik \";\n }\n\n\n $select = DB::connection($this->sql)->select($sql);\n $res = json_decode(json_encode($select), true);\n\n $data = array();\n foreach ($res as $item) {\n $yoy = ($item['n5'] != 0 ? (($item['n4']-$item['n5'])/abs($item['n5']))*100 : 0);\n if($item['kode_grafik'] == 'PI04'){\n try{\n $ach = ($item['n2']/$item['n4'])*100;\n }catch(\\Throwable $e){\n $ach = 0;\n }\n }else{\n try{\n $ach = ($item['n2'] < 0 ? (1+($item['n2']-$item['n4'])/$item['n2'])*100 : (1+($item['n4']-$item['n2'])/$item['n2'])*100 );\n }catch(\\Throwable $e){\n $ach = 0;\n }\n }\n array_push($data,\n [\n \"kode_grafik\" => $item['kode_grafik'],\n \"nama\" => $item['nama'],\n \"n2\" => floatval(number_format((float)$item['n2'], 2,'.', '')),\n \"n4\" => floatval(number_format((float)$item['n4'], 2,'.', '')),\n \"n5\" => floatval(number_format((float)$item['n5'], 2,'.', '')),\n \"ach\" => floatval(number_format((float)$ach, 2,'.', '')),\n \"yoy\" => floatval(number_format((float)$yoy, 2,'.', '')),\n ]);\n }\n\n $orN2 = ($data[1]['n2'] / $data[0]['n2']) * 100;\n $orN4 = ($data[1]['n4'] / $data[0]['n4']) * 100;\n $orN5 = ($data[1]['n5'] / $data[0]['n5']) * 100;\n $orAch = ($data[1]['n2'] / $data[0]['n4']) * 100;\n $orYoy = (($data[1]['n4'] - $data[1]['n5']) / $data[0]['n4']) * 100;\n $data_or = [\n \"kode_grafik\" => \"PI04\",\n \"nama\" => \"OR\",\n \"n2\" => floatval(number_format((float)$orN2, 2, '.', '')),\n \"n4\" => floatval(number_format((float)$orN4, 2, '.', '')),\n \"n5\" => floatval(number_format((float)$orN5, 2, '.', '')),\n \"ach\" => floatval(number_format((float)$orAch, 2, '.', '')),\n \"yoy\" => floatval(number_format((float)$orYoy, 2, '.', '')),\n ];\n\n $success['status'] = true;\n $success['message'] = \"Success!\";\n $success['data'] = [\n \"data_pdpt\" => $data[0],\n \"data_beban\" => $data[1],\n \"data_shu\" => $data[2],\n \"data_or\" => $data_or\n ];\n\n return response()->json($success, $this->successStatus);\n } catch (\\Throwable $e) {\n $success['status'] = false;\n $success['message'] = \"Error \" . $e;\n $success['data'] = [\n \"data_pdpt\" => [],\n \"data_beban\" => [],\n \"data_shu\" => [],\n \"data_or\" => [],\n \"message\" => \"Error \" . $e\n ];\n return response()->json($success, $this->successStatus);\n }\n }", "title": "" }, { "docid": "9e124c3ca699386388174c81c36ef00b", "score": "0.5574914", "text": "function dd_attd_code()\n {\n // ambil data dari db\n $this->db->order_by('id_position', 'asc');\n $this->db->like('id_position','attd');\n $result = $this->db->get('master_position');\n \n // bikin array\n // please select berikut ini merupakan tambahan saja agar saat pertama\n // diload akan ditampilkan text please select.\n //$dd[''] = 'Attendace Code'; //untuk placeholder\n if ($result->num_rows() > 0) {\n foreach ($result->result() as $row) {\n // tentukan value (sebelah kiri) dan labelnya (sebelah kanan)\n $a = \" -> \";\n $dd[$row->id_position] = $row->id_position .$a. $row->position_desc;\n }\n }\n return $dd;\n }", "title": "" }, { "docid": "372aef7ebabc3bbbcd3f0425301f2ed4", "score": "0.5574638", "text": "function get_datajawaban()\n {\n $query = $this->db->query(\"SELECT * FROM jawaban_tessay\");\n return $query;\n }", "title": "" }, { "docid": "c4e0ae2745b6dd97a24297d028e34027", "score": "0.55730367", "text": "public function run()\n {\n\n $data = [\n 'Mallorca'=>[\n 'Alaró'=>[\"Alaro\"],\n 'Alcúdia'=>[\"Port d' Alcudia\",\"Platja d'Alcudia\",\"Ciutat d' Alcudia\"],\n 'Algaida'=>[\"Algaida\",\"Pina\",\"Randa\"],\n 'Andratx'=>[\"Andratx Town\",\"Camp de Mar\",\"Port d'Andratx\",\"Sant Elm\",\"S'Arraco\"],\n 'Ariany'=>[\"Ariany\"],\n 'Artà'=>[\"Artà\",\"Colònia de Sant Pere\",\"Betlem\",\"Montferrutx\",\"Sant Pere\",\"s’Estanyo\"],\n 'Badia Grande'=>[\"Badia Gran\",\"Badia Blava\",\"Tolleric\"],\n 'Banyalbufar'=>[\"Banyalbufar\"],\n 'Binissalem'=>[\"Binissalem\"],\n 'Búger'=>[\"Buger\"],\n 'Bunyola'=>[\"Bunyola\",\"Deya\",\"Palmanyola\"],\n 'Calvià'=>[\"Bendinat\", \"Cala Vinyes\", \"Calvia Pueblo\", \"Cas Catala\", \"Costa de la Calma\", \"Costa d'En Blanes\", \"El Toro\", \"Es Capdellà\", \"Illetes\", \"Magaluf\", \"Palmanova\", \"Peguera\", \"Portals Nous\", \"Puerto Portals\", \"Santa Ponça\", \"Sol de Mallorca\", \"Son Ferrer\"],\n 'Campanet'=>[\"Campanet\"],\n 'Campos'=>[\"Campos\",\"Sa Rapita\",\"Ses Covetes\"],\n 'Capdepera'=>[\"Capdepera\"],\n 'Consell'=>[\"Consell\"],\n 'Costitx'=>[\"Costitx\"],\n 'Deià'=>[\"Deià\"],\n 'Escorca'=>[\"Escorca\"],\n 'Esporles'=>[\"Esporles\",\"Es Verger\",\"Ses Rotgetes\"],\n 'Estellencs'=>[\"Estellencs\"],\n 'Felanitx'=>[\"Felanitx Centro\", \"Portocolom\", \"S'Horta \", \"Cas Concos Des Cavaller\", \"Cala Ferrera \", \"Cala Serena\"],\n 'Inca'=>[\"Inca Centro\", \"Son Amonda\", \"Reis Catòlics\", \"Gran Via de Colom\", \"Cristo Rey\", \"Park Europa\", \"Zona Periurbana\", \"Blanquer\"],\n 'Lloret de Vistalegre'=>[\"Lloret de Vistalegre\"],\n 'Lloseta'=>[\"Lloseta\"],\n 'Llubí'=>[\"Llubí\"],\n 'Llucmajor'=>[\"Llucmajor Centro\", \"s'Arenal\", \"Badia Gran\", \"Badia Blava\", \"les Palmeres\", \"sa Torre\", \"Son Verí Nou\", \"Maioris Décima\", \"Tolleric\", \"Cala Blava\", \"Bellavista\", \"s'Estanyol de Migjorn\", \"Cala Pi\", \"Puigderrós\", \"es Pas de Vallgornera\", \"Vallgornera Nou \"],\n 'Manacor'=>[\"Manacor Centro\", \"Porto Cristo\", \"Cala Magrana\", \"Cala Aguila - Cala Mendia\", \"Cales de Mallorca\", \"S'Illot - Cala Morlanda\", \"Cala Murada\", \"S'Estany den Mas\"],\n 'Manacor de la Vall'=>[\"Manacor de la Vall\"],\n 'Maria de la Salut'=>[\"Maria de la Salut\"],\n 'Marratxi'=>[\"Sa Cabaneta\", \"Es Garrovers\", \"Pòrtal\", \"Sa Cabana - Can Carbonell\", \"Ses Cases Noves\", \"Pont d'Inca\", \"Son Ramonell - Es Figueral\", \"Pla de na Tesa\", \"Marratxinet\", \"Son Ametller\"],\n 'Montuïri'=>[\"Montuïri\"],\n 'Muro'=>[\"Muro\"],\n 'Palma De Mallorca'=>[\"Amanecer\", \"Arenal\", \"Bonanova\", \"Bons Aire\", \"Cala Major\", \"Camp Redó\", \"Can Capes\", \"Can Pastilla\", \"Casco Antiguo (Palma Old Town)\", \"Cas Capiscol\", \"Coll d'EN Rabassa\", \"El Jonquet\", \"El Torreno\", \"Es Forti\", \"Es Pil.lari\", \"Establiments\", \"Estadi Balear\", \"Genova\", \"La Llonja\", \"La Seu - Cort\", \"La Vileta\", \"Las Avenidas\", \"Les Maravelles\", \"Llevant\", \"L'Olivera\", \"Nou Llevant\", \"Paseo Maritimo\", \"Pere Garau\", \"Playa de Palma\", \"Plaza deToros\", \"Portixol - Molinar\", \"Rafal\", \"Sa Casa Blanca\", \"Sa Indiotería\", \"Sant Agustï (San Agustin)\", \"Sant Jordi\", \"Santa Catalina\", \"S'Aranjassa\", \"Secar de la Real\", \"Ses Cadenes\", \"Sindicat\", \"Son Armadans\", \"Son Canals\", \"Son Castello\", \"Son Cotoner\", \"Son Dameto\", \"Son Espanyollet\", \"Son Ferriol\", \"Son Fortesa\", \"Son Gotleu\", \"Son Indioteria\", \"Son Malferit\", \"Son Moix\", \"Son Oliva\", \"Son Pereto\", \"Son Rapinya\", \"Son Roca\", \"Son Sardinia\", \"Son Serra\",\"Son Serra\",\"Son Vida\",\"Son Xigala\",\"Son Ximelis\",\"Zona Colegios\"],\n 'Petra'=>[\"Petra\"],\n 'Pollença'=>[\"Pollença\",\"Puerto Pollenca\"],\n 'Porreres'=>[\"Porreres\"],\n 'Puigpunyent'=>[\"Puigpunyent\",\"Galilea\"],\n 'Sa Pobla'=>[\"Sa Pobla\"],\n 'Sant Llorenç'=>[\"Sant Llorenç Des Cardassar\",\"Sa Coma\",\"Son Carrio\"],\n 'Sant Juan'=>[\"Sant Joan\"],\n 'Santa Eugènia'=>[\"Santa Eugènia\"],\n 'Santa Magalida'=>[\"Santa Margalida\",\"Can Picafort\",\"Son Serra de Marina\"],\n 'Santa Maria del Camí'=>[\"Santa Maria del Camí\"],\n 'Santanyi'=>[\"Santanyi\",\"Cala d'Or\",\"s'Alqueria Blanca\",\"es Llombards\",\"Cala Figuera\",\"Portopetro\",\"Calonge\",\"Cala Llombards\"],\n 'Selva'=>[\"Selva\"],\n 'Sencelles'=>[\"Sencelles\"],\n 'Ses Salines'=>[\"Ses Salines\",\"Colònia de Sant Jordi\"],\n 'Sineu'=>[\"Sineu\"],\n 'Soller'=>[\"Sóller\",\"Port de Sóller\"],\n 'Son Servera'=>[\"Son Servera\",\"Cala Bona\",\"Cala Millor\",\"Costa de los Pinos\"],\n 'Valledemossa'=>[\"Valldemossa\"],\n 'Vilafranca de Bonany'=>[\"vilafranca de Bonany\"],\n ],\n 'Ibiza '=>[],\n 'Menorca'=>[]\n ];\n\n foreach ($data['Mallorca'] as $j => $jsm){\n $dst = ['name'=>$j,'province_name'=>'Mallorca'];\n Distict::firstOrCreate($dst);\n foreach ($jsm as $k => $p){\n $datas = ['name'=>$p,'district_name'=>$j];\n City::firstOrCreate($datas);\n }\n }\n }", "title": "" }, { "docid": "d43d6c81e73ec59fbaa818112c4c76df", "score": "0.5570263", "text": "public function dataHariIni()\n\t{\n\t\t$ina = time() + (60 * 60 * 7);\n\t\t$now = gmdate('Y-m-d', $ina);\n\t\t//end filter otomatis hari ini\n\n\t\treturn $this->db->select('*') \n\t\t->from($this->_kunjungan) \n\t\t->join('tb_user', 'tb_user.nis=tb_kunjungan.nis') \n\t\t->where('tb_kunjungan.tgl_kunjungan', $now) \n\t\t->get(); \n\t}", "title": "" }, { "docid": "e41a59c227da7f97de185d57e7a2589d", "score": "0.55654657", "text": "public function botdimensidir($param){\n\t\t$hasil = $this->db->query(\"SELECT 'Collaborate' as Dimensi, avg(hasilq1) as rata FROM assessment a JOIN tb_pegawai b ON a.target=b.NIP WHERE b.direktorat='$param' UNION SELECT 'Empower Diversity' as Dimensi, avg(hasilq2) as rata FROM assessment a JOIN tb_pegawai b ON a.target=b.NIP WHERE b.direktorat='$param' UNION\n\t\t\tSELECT 'Honesty' as Dimensi, avg(hasilq3) as rata FROM assessment a JOIN tb_pegawai b ON a.target=b.NIP WHERE b.direktorat='$param' UNION\n\t\t\tSELECT 'Commitment' as Dimensi, avg(hasilq4) as rata FROM assessment a JOIN tb_pegawai b ON a.target=b.NIP WHERE b.direktorat='$param' UNION SELECT 'Care & Polite' as Dimensi, avg(hasilq5) as rata FROM assessment a JOIN tb_pegawai b ON a.target=b.NIP WHERE b.direktorat='$param' UNION\n\t\t\tSELECT 'Fast & Easy' as Dimensi, avg(hasilq6) as rata FROM assessment a JOIN tb_pegawai b ON a.target=b.NIP WHERE b.direktorat='$param' UNION\n\t\t\tSELECT 'Adaptive & Creative' as Dimensi, avg(hasilq7) as rata FROM assessment a JOIN tb_pegawai b ON a.target=b.NIP WHERE b.direktorat='$param' UNION\n\t\t\tSELECT 'Persistent' as Dimensi, avg(hasilq8) as rata FROM assessment a JOIN tb_pegawai b ON a.target=b.NIP WHERE b.direktorat='$param' UNION\n\t\t\tSELECT 'Compliance' as Dimensi, avg(hasilq9) as rata FROM assessment a JOIN tb_pegawai b ON a.target=b.NIP WHERE b.direktorat='$param' UNION\n\t\t\tSELECT 'Risk Management' as Dimensi, avg(hasilq10) as rata FROM assessment a JOIN tb_pegawai b ON a.target=b.NIP WHERE b.direktorat='$param' ORDER BY rata ASC LIMIT 3\");\n\t\tif($hasil->num_rows() > 0){\n\t\t\treturn $hasil->result();\n\t\t} else{\n\t\t\treturn array();\n\t\t}\n\t}", "title": "" }, { "docid": "43bdee17200d8dcd0730c6ff84ad1194", "score": "0.5565328", "text": "private function setData() {\n $this->Data = array_map('strip_tags', $this->Data);\n $this->Data = array_map('trim', $this->Data);\n if($this->Data['link'] == '0'): $this->Data['link'] = ''; else: $this->Data['link'] = 'sessao/'.$this->Data['link']; endif;\n $this->Data['data'] = Check::Data($this->Data['data']); \n $this->Data['uppdate'] = Check::Data($this->Data['uppdate']);\n $this->Data['id_pai'] = ($this->Data['id_pai'] == 'null' ? null : $this->Data['id_pai']);\n }", "title": "" }, { "docid": "239612c07b462cabd3181709390a7552", "score": "0.55640286", "text": "function get_data_tabla_usuario($value='') {\n\t\t\t \n\t\t\t$codigo_usuario = $this->session->userdata('user_code');\n\t\t\t\n\t\t\t$codigo_evento_estado_evento = $this->Model_general->get_codigo_estado_evento();\n\t\t\t$estado_evento = $codigo_evento_estado_evento['estado_evento']; \n\t\t\t$codigo_evento = $codigo_evento_estado_evento['codigo_evento']; \t \n\n\t\t\t// Traer el rango de mentalidad segun las preguntas que tenga\n\t\t\t$rm = $this->Model_general->rango_mensalidad();\n\n\t\t\t// Variable a retornar\n\t\t\t$rt = [];\n \n\t\t\t// Como el evento esta activo, traer todas las categorias de las preguntas actuales\n\t\t\t$rt['categorias'] = $this->db->query(\"SELECT\n\t\t\t\t\t\t\t\t\t\tUPPER(c.nombre) categoria, \n\t\t\t\t\t\t\t\t\t\tCOUNT(p.codigo) n_preguntas, \n\t\t\t\t\t\t\t\t\t\tSUM(r.respuesta) puntos\n\t\t\t\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t\t\t\t`categoria_preguntas` c\n\t\t\t\t\t\t\t\t\tINNER JOIN preguntasrp p ON p.categoria_code = c.codigo\n\t\t\t\t\t\t\t\t\tINNER JOIN respuestas_cre_lim r on r.codigo_preg = p.codigo AND r.codigo_evento = '$codigo_evento' AND r.codigo_usuario = '$codigo_usuario'\n\t\t\t\t\t\t\t\t\tGROUP BY c.codigo\n\t\t\t\t\t\t\t\t\tORDER BY\n\t\t\t\t\t\t\t\t\t\tc.nombre\")->result_array();\t\n\t\t \n\n\t\t \t// Agregar Columna mentalidad\n\t\t\tforeach ($rt['categorias'] as $key => $value) {\n\n\t\t\t\t// Rango temporal de mentalidad por un numero dado\n\t\t\t\t$rango_temp = $this->Model_general->rango_mensalidad($value['n_preguntas']);\n\n\n\t\t\t\t// Asignar el tipo de mentalidad en la culumna\n\t\t\t\tif($value['puntos'] <= $rango_temp['ab']) {\n\t\t\t\t\t$rt['categorias'][$key]['mentalidad'] = \"ABUNDANTE\";\n\n\t\t\t\t} else if($value['puntos'] <= $rango_temp['zc']) {\n\t\t\t\t\t$rt['categorias'][$key]['mentalidad'] = \"ZONA DE CONFORT\";\n\n\t\t\t\t} else {\n\t\t\t\t\t$rt['categorias'][$key]['mentalidad'] = \"ESCASA\";\n\t\t\t\t}\n\n\t\t\t}\n\n\n\n\t\t\t// Calcuilando Totales\n\t\t\t$total['total_preguntas'] = 0;\n\t\t\t$total['total_puntos'] = 0;\n\n\t\t\tforeach ($rt['categorias'] as $key => $value) {\n\t\t\t\t$total['total_preguntas'] += $value['n_preguntas'];\n\t\t\t\t$total['total_puntos'] += $value['puntos'];\n\t\t\t}\n\n\t\t\t$rt['totales'][0] = $total;\n\t\t\t// FIN Calcuilando Totales\n\n\n\t\t\t// Calculando Informe\n\t\t\t$txt_mentalidad = \"\";\n\t\t\tif($rt['totales'][0]['total_puntos'] <= $rm['ab']) {\n\t\t\t\t$txt_mentalidad = \" una mentalidad ABUNDANTE\";\n\n\t\t\t} else if($rt['totales'][0]['total_puntos'] <= $rm['zc']) {\n\t\t\t\t$txt_mentalidad = \" una mentalidad en ZONA DE CONFORT\";\n\n\t\t\t} else {\n\t\t\t\t$txt_mentalidad = \" una mentalidad ESCASA\";\n\t\t\t}\n\n\t\t\t$rt['totales'][0]['informe'] = \"Según las respuestas obtenidas en la encuesta cuyo puntaje es de \" . $rt['totales'][0]['total_puntos'] . \", ud tiende\" . $txt_mentalidad;\n\n\t\t\t// Fin Calculando Informe\n\n\t\t\treturn $rt;\n\n\t\t}", "title": "" }, { "docid": "87322195c554ec19b5dee7e1700f60a0", "score": "0.55536795", "text": "function data_soal_level($number,$offset,$l){\n $this->db->select('id_bank, sumber, kesulitan, judul_soal, jawaban_benar, UUID, publish, random, soal, gambar_soal, pembahasan, bab.judul_bab, mapel.id_mapel, mapel.nama_mapel');\n $this->db->join('tb_bab bab','bab.id_bab=bs.id_bab');\n $this->db->join('tb_mata_pelajaran mapel', 'mapel.id_mapel = bab.id_mapel' );\n $this->db->where('bs.publish','1');\n $this->db->where('bs.kesulitan',$l);\n $this->db->order_by('mapel.id_mapel', 'desc');\n return $query = $this->db->get('tb_bank_soal bs',$number,$offset)->result_array(); \n }", "title": "" } ]
ad93e76c6ae9a09564427c735c5ae8a4
Afegim un event al element onload|onunload
[ { "docid": "03cd4409bef5af2ca3ac91c24cdd94aa", "score": "0.0", "text": "function addEvent($event, $accio)\n\t{\n\t\tif (isset($this->Events[strtolower($event)]))\n\t\t{\n\t\t\t\t$this->Events[$event] = $accio;\n\t\t}\n\t\telse \n\t\t{\n\t\t\t\tdie (\"***ERROR \" . __CLASS__ . \"::\" . __FUNCTION__ . \" > Event <b>$event</b> not found.\");\n\t\t}\n\t\t\n\t}", "title": "" } ]
[ { "docid": "c5da1b02c5758b976a984a7c082c1741", "score": "0.7133415", "text": "public function eXpOnUnload()\n {\n }", "title": "" }, { "docid": "79105452070d296fd988046936d2a134", "score": "0.6956193", "text": "function onUnload()\r\n {\r\n //Remove any registered events\r\n foreach($this->_events as $event_ctx=>$event_cookies) {\r\n foreach($event_cookies as $cookie) {\r\n $this->_event_srv->unadvise($event_ctx, $cookie);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "03fb06419e128fd06b32034e47e7297c", "score": "0.63138103", "text": "public function setClearOnLoad($b) {$this->clearOnLoad = $b;}", "title": "" }, { "docid": "c74380fd8cebc3c1d217b3b416f2d6f5", "score": "0.6295876", "text": "public function unload();", "title": "" }, { "docid": "50d027c89960afa62512d9dd4249e15f", "score": "0.62133044", "text": "public function unload($element = 'this', $js = '', $preventDefault = false, $stopPropagation = false, $listenerOn=false) {\n\t\treturn $this->_add_event ( $element, $js, 'unload', $preventDefault, $stopPropagation, true, $listenerOn );\n\t}", "title": "" }, { "docid": "f825270c430584cf118dbe6fbef16f94", "score": "0.61348134", "text": "public function eXpOnUnload()\n {\n Dispatcher::unregister(Event::getClass(), $this, Event::ON_PLAYER_CHAT);\n $this->connection->chatEnableManualRouting(false);\n ChatSelect::EraseAll();\n }", "title": "" }, { "docid": "0dc5883d016c60a70e96477bdc09661a", "score": "0.60874134", "text": "public function unload()\n\t{\n\t}", "title": "" }, { "docid": "56f9f5f952244fbb241552ac035792cf", "score": "0.5993332", "text": "public function onUnload()\r\n\t{\r\n\t\t$this->disconnect();\r\n\t}", "title": "" }, { "docid": "6bc8146714b06593a9b6e6f74f728004", "score": "0.5608682", "text": "public function unload()\n {\n $this->view->invoke('unload');\n }", "title": "" }, { "docid": "3be8e9f2e4e3dd19f962c45291b0c574", "score": "0.55645454", "text": "function on_deactivate(){\n\n }", "title": "" }, { "docid": "b6677cd0da7081aeed9f418bdcbd3199", "score": "0.54592717", "text": "protected function after_load()\n\t{\n\t}", "title": "" }, { "docid": "c753d6b464fb6590553cbc93f3f6b4b6", "score": "0.5445226", "text": "public function afterElementRestore(ElementInterface $element);", "title": "" }, { "docid": "82d21ad18136ac81b41238272621ad4a", "score": "0.5425075", "text": "public function restoreAllEventListeners();", "title": "" }, { "docid": "b91bdd362f6c5f84ae3f9c6474f5e18a", "score": "0.540742", "text": "public function onAfterElementSave();", "title": "" }, { "docid": "3ad5f4034fe5bd44ac45d3796e89d0f5", "score": "0.53815514", "text": "public function after_load(){\n\t}", "title": "" }, { "docid": "b2dcd71bdb2ddf64cb33cf78cfd037c8", "score": "0.5363691", "text": "public function unload()\r\n\t{\r\n\t\tunset ( $GLOBALS['l10n']['plugin_t5_public_preview'] );\r\n\t}", "title": "" }, { "docid": "42a046e47856be9914114196d7e5ebeb", "score": "0.5354942", "text": "public abstract function on_deactivate() ;", "title": "" }, { "docid": "b9e7d9be087d17e5dbc421bf8a5670f7", "score": "0.53320634", "text": "function unload()\n {\n if (count($languages)) {\n foreach($languages as $lang) {\n unset($GLOBALS['I18N_Translator_Text_' . $lang]);\n }\n }\n }", "title": "" }, { "docid": "50f10c2748905b9f46ed8600fdb9eb02", "score": "0.53230256", "text": "protected function afterLoad()\n {\n }", "title": "" }, { "docid": "19509a4d91f25f24ad3846d14ab5e2c8", "score": "0.5316679", "text": "public function unload(array $data){ }", "title": "" }, { "docid": "b10690399197384c5d3f73046ff1df16", "score": "0.5299675", "text": "public function onRefresh(){\n\n \t$this->obHeader->clearHeader($this->idObject);\n\n //recarrega a lista\n $this->getList();\n //limpa [seq] do formulario secundario em sessão ref.:(compilerData.php)\n $this->obsession->setValue('tempBloco',NULL);\n }", "title": "" }, { "docid": "1e29b5c2b523b333ab2a01fbe1709bde", "score": "0.5238631", "text": "public function mh_deactivation() {\n\t\twp_clear_scheduled_hook( 'mh_event_hook' );\n\t}", "title": "" }, { "docid": "07bd1708de814a7248f39f6c3ee899fd", "score": "0.5223911", "text": "public function unload() {\n\t\t// might be called after cleanup\n\t\tif ($this->fields === NULL) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tforeach ($this->fields as $fieldName => $field) {\n\t\t\t$this->unloadField( $fieldName );\n\t\t}\n\t}", "title": "" }, { "docid": "365ad9928c7395e20ce5f4f173caee0d", "score": "0.5208612", "text": "public function afterLoad(): void\n {\n }", "title": "" }, { "docid": "190d8619d535c944ead0853ba876bf58", "score": "0.52080065", "text": "public function on_load() {}", "title": "" }, { "docid": "190d8619d535c944ead0853ba876bf58", "score": "0.52080065", "text": "public function on_load() {}", "title": "" }, { "docid": "266857e6e374198c424803d0f2b78b4d", "score": "0.52033645", "text": "protected function OnLoad(){}", "title": "" }, { "docid": "f0b03922d556daa5df0e2d78fe32569f", "score": "0.5199141", "text": "public static function onDeactivate()\n {\n self::cleanupTplBlocks();\n }", "title": "" }, { "docid": "545105bd4f67977ae6d149c5ce15974a", "score": "0.51981056", "text": "protected abstract function onLoad();", "title": "" }, { "docid": "694fcc6264d9d827e67b67d2e96b82d5", "score": "0.5195681", "text": "public function unload()\n\t{\n\t\t$this->getFloor()->addItems($this->_items);\n\t\t$this->_items = new ItemCollection([]);\n\t}", "title": "" }, { "docid": "680d9aa7a829321c20f39d2b3f03ce27", "score": "0.5146335", "text": "public static function unregisterEventHandler(): void\n\t{\n\t\tUnRegisterModuleDependences(\"main\", \"OnEpilog\", self::$moduleId, __CLASS__, \"showProgressBar\");\n\t\tUnRegisterModuleDependences(\"main\", \"OnEpilog\", self::$moduleId, __CLASS__, \"bindAgent\");\n\t}", "title": "" }, { "docid": "e36fcb0da08bf2b27ce92383018096a7", "score": "0.51392263", "text": "function symposium_deactivate() {\n\n\twp_clear_scheduled_hook('symposium_notification_hook');\n\n}", "title": "" }, { "docid": "9dfc3fe132ef563d6fdbb86cba575002", "score": "0.51278657", "text": "protected function onload() {}", "title": "" }, { "docid": "ca05a2b6353586d0cc8395f70db211c6", "score": "0.5126284", "text": "public function eraseEvents();", "title": "" }, { "docid": "656f5cf1436b86602f0588f99bddd329", "score": "0.5115366", "text": "public function onAfterInitialise ()\n\t\t{\n\n JDEBUG ? JProfiler::getInstance('Application')->mark('PLG (pro_critical) BeforeLoad => onAfterInitialise') : null;\n\n if ( \\Joomla\\CMS\\Factory::getDocument()->getType() !== 'html' )\n {\n $this->SLEEP = true;\n return;\n }#END IF\n\n /**\n * Инит Кеш\n */\n $this->Helper->HelperCache->_onAfterInitialise();\n\n\n\n\n\n JDEBUG ? JProfiler::getInstance('Application')->mark('PLG (pro_critical) AfterLoad => onAfterInitialise') : null;\n\n }", "title": "" }, { "docid": "ebc21358d1ffa77f3a2daab5e725818b", "score": "0.5111942", "text": "function unregister_header_events() {\n\n}", "title": "" }, { "docid": "4ee2e90efe43f0aa21375415f3e035b3", "score": "0.51102674", "text": "function UnInstallEvents(){\n // UnRegisterModuleDependences(\"main\", \"OnEndBufferContent\", $this->MODULE_ID, self::moduleClassEvents, \"OnEndBufferContentHandler\");\n\n return true;\n }", "title": "" }, { "docid": "2f3291ef233389b022551285513ff3d1", "score": "0.50883746", "text": "function deactivation_hook() {\n\t\t// Do stuff\n\t}", "title": "" }, { "docid": "a45bca4eb000a1776540f2b38dc299cd", "score": "0.5087863", "text": "function unregister_nav_events() {\n\tremove_action( 'genesis_after_header', 'genesis_do_nav' );\n}", "title": "" }, { "docid": "a36d1054953debfb4bc027ff6c8e9dfb", "score": "0.5051484", "text": "public function eXpOnLoad()\n {\n }", "title": "" }, { "docid": "1c9305bcedb0b8be8131adb6d67daee5", "score": "0.50395614", "text": "public function onLoad()\r\n {\r\n\r\n }", "title": "" }, { "docid": "5d7758e1b3c570b79196933223f29b33", "score": "0.49862728", "text": "public static function subscriberAreaUninstalled(Zikula_Event $event)\n {\n parent::subscriberAreaUninstalled($event);\n }", "title": "" }, { "docid": "4475877625372cf5af65bccbf30b73c5", "score": "0.4966378", "text": "public static function subscriberAreaUninstalled(Zikula_Event $event)\n {\n }", "title": "" }, { "docid": "1a05c379520f8e7b4feb210218ccf5da", "score": "0.4957543", "text": "public function unloadData() {\n\t\t$this->data = array();\n\t}", "title": "" }, { "docid": "210c9537ff68bb86bbcf52bd112f98f8", "score": "0.4944728", "text": "public static function unregister() {\n\t\tspl_autoload_unregister(get_called_class().'::load');\n\t\tstatic::$registered = false;\n\t}", "title": "" }, { "docid": "1dcca0f5336523b793f57bd410377cb4", "score": "0.49306092", "text": "function deactivate() {\r\n \r\n }", "title": "" }, { "docid": "83fd8aa962026b5f279132dff2e3ff5a", "score": "0.49286133", "text": "public function onClose() {\n\n \t//destroi cabeçalho do form\n \tif($this->header[TConstantes::HEAD_NIVEL] == 1){\n \t\t$this->obHeader->clearHeader();\n \t}else{\n \t$this->obHeader->clearHeader($this->header[TConstantes::FORM]);\n \t}\n \t\n \t//recarrega a lista\n \t$this->getList();\n }", "title": "" }, { "docid": "2348abd93f802d588cfef654802abd36", "score": "0.49274683", "text": "function endloader() {\n echo '\n <script language=\"javascript\" type=\"text/javascript\">\n closeLoader();\n </script>';\n }", "title": "" }, { "docid": "8689b5a1738deae610bbd03a57c085f5", "score": "0.49134418", "text": "function off($eventName, $eventCallBack = NULL)\r\n {\r\n }", "title": "" }, { "docid": "b2a71fc719598c5588124649cb973e62", "score": "0.49098185", "text": "public function onChunkUnloaded(FullChunk $chunk) {}", "title": "" }, { "docid": "d52aa04e1ed439a989974eebabdcda82", "score": "0.48848656", "text": "public static function clear_events()\n {\n }", "title": "" }, { "docid": "e4eb1f92d1e0cebd133b34911daf2372", "score": "0.48764285", "text": "public function deletar()\n {\n }", "title": "" }, { "docid": "e4eb1f92d1e0cebd133b34911daf2372", "score": "0.48764285", "text": "public function deletar()\n {\n }", "title": "" }, { "docid": "f36ecb77c9ab65627bf1ce2380ca745c", "score": "0.4868525", "text": "function easyyoutube_deactivation() {\n\t\t\twp_clear_scheduled_hook('easyyoutube_cron_import');\n\t\t\twp_clear_scheduled_hook('easyyoutube_update_cron_hook');\n\t\t}", "title": "" }, { "docid": "cdbf5eddec8965051bdd66a59e91b628", "score": "0.4866977", "text": "protected function resetLoaded(): void\n {\n $this->loaded = false;\n }", "title": "" }, { "docid": "266c34713c65944e8e7ea81a0919760b", "score": "0.48662445", "text": "public function onLoad($param) {\r\n parent::onLoad($param);\r\n if(!$this->page->IsPostBack && !$this->page->IsCallback) {\r\n $this->initPullDowns();\r\n }\r\n }", "title": "" }, { "docid": "a72c02e0cdd9ed532b66ed95a971fa18", "score": "0.48625016", "text": "private function click_inscription()\n {\n global $vues;\n $_SESSION[$_COOKIE[\"IDJoueur\"]]['mode']=1;\n require($vues['accueil']);\n unset($_SESSION[$_COOKIE[\"IDJoueur\"]]['mode']);\n }", "title": "" }, { "docid": "5083f8633d42936d6180848dc9e7317d", "score": "0.48398748", "text": "public function post_load(){\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "16a8349c5d207bb62c59ca446217a54d", "score": "0.48335886", "text": "public function clearPrimaryListener();", "title": "" }, { "docid": "16a8349c5d207bb62c59ca446217a54d", "score": "0.48335886", "text": "public function clearPrimaryListener();", "title": "" }, { "docid": "6d731977c9b0a2fb60d7ccd1b02a18ce", "score": "0.48143157", "text": "function deactivate() {\n\t}", "title": "" }, { "docid": "a4bacf4d16290555c830a125a9bf94f5", "score": "0.4808133", "text": "function bp_easyalbums_deactivate() {\n\t\n}", "title": "" }, { "docid": "5385530a72ea14372d14a7358d331bef", "score": "0.48062384", "text": "public function restoreEventListeners(string $event);", "title": "" }, { "docid": "d290e51376500860d4e3d083945f13b8", "score": "0.48060232", "text": "abstract public function onUnInstall();", "title": "" }, { "docid": "b21a85294a9ef68b9654ee09fddec2df", "score": "0.48050934", "text": "public static function removeElement(){\r\n\r\n\t\t// TODO - translate from js\r\n\t}", "title": "" }, { "docid": "c200ddefc4c716752284711edb56d6b6", "score": "0.4794742", "text": "function register_deactivation() {\r\n\t\tReg::inst()->register_deactivation_hooks();\r\n\t}", "title": "" }, { "docid": "1b3bde63b985ff1792a5d967e0074b47", "score": "0.47900784", "text": "public function afterInit()\n {\n\n /* Add raw js (after every element) */\n $js_dynamic_element_id = '%%ELEMENT_ID%%';\n $this->El->inlineJS(\"alert('$js_dynamic_element_id')\");\n\n /* Add js file only once (in footer) */\n if ($this->js_added !== true) {\n $this->output_js();\n $this->js_added = true;\n }\n }", "title": "" }, { "docid": "6bd1ad2f5ef05d94efdbf1436435b194", "score": "0.47715265", "text": "protected function _afterLoad()\n {\n \n return parent::_afterLoad();\n }", "title": "" }, { "docid": "2fdbdeaa1326158f4ddbdb8dcd45e93c", "score": "0.47692478", "text": "function deactivate()\r\n { \r\n }", "title": "" }, { "docid": "030eb30e42044158bb9d2b0ffdee8ec7", "score": "0.47683448", "text": "public function _postinit(&$event, $param) {\n // this counters the unset of (inc/init.php:176)\n if(isset($_REQUEST['scour'])) $_REQUEST['purge'] = true;\n\t\t}", "title": "" }, { "docid": "c97285e19bd824418d787afbd955f6e7", "score": "0.47671264", "text": "function DocumentComplete(&$dom, $url) {\n\t\ttry {\n\t\t\t$this->contents = $dom->document->body->outerHTML;\n\t\t\t//$dom->navigate(\"javascript:alert('oi');document.fireEvent('alert');window.close();\");\n\t\t} catch (Exception $e) {\n\t\t\techo $e->getMessage();\n\t\t}\n\t\t//var_dump($ie == $dom);\n\t\t$dom->Quit();\n }", "title": "" }, { "docid": "7afb40869ac93b0b4218e07d515bc621", "score": "0.47654137", "text": "function onWindowClose( $event ){\r\n\t\t$event->Skip();\r\n\t}", "title": "" }, { "docid": "7afb40869ac93b0b4218e07d515bc621", "score": "0.47654137", "text": "function onWindowClose( $event ){\r\n\t\t$event->Skip();\r\n\t}", "title": "" }, { "docid": "7afb40869ac93b0b4218e07d515bc621", "score": "0.47654137", "text": "function onWindowClose( $event ){\r\n\t\t$event->Skip();\r\n\t}", "title": "" }, { "docid": "5b9eb7f4357cf13e8aa2d8e6e3f3e0d7", "score": "0.4764601", "text": "public function _theme_deactivation_hook() {\r\n //unregister all sidebars\r\n hwawc_unregister_all_sidebars();\r\n }", "title": "" }, { "docid": "2daea6cb05d5d337d0b6a1f517f203ff", "score": "0.47625327", "text": "function deactivate()\r\n { \r\n }", "title": "" }, { "docid": "a8c1b6ef50b7eb83c06377fa595cd394", "score": "0.4759209", "text": "public function __destruct(){\n $this->dom->clear();\n unset($this->dom); \n }", "title": "" }, { "docid": "c10868a123ca5f49d07f2ad3414544e9", "score": "0.47554082", "text": "public function unregister() {\n\t\tspl_autoload_unregister(array(\n\t\t\t$this,\n\t\t\t'load'\n\t\t));\n\t}", "title": "" }, { "docid": "f60ce570adede4bae7ee485a77eb0b55", "score": "0.47547445", "text": "public function finalize_page() {\n $this->page->requires->yui_module('moodle-gradingform_random-grading', 'M.gradingform_random.init_grading');\n parent::finalize_page();\n }", "title": "" }, { "docid": "69b6b1764a6186f462a40e0fd836c000", "score": "0.47541857", "text": "public function clearEmbargo();", "title": "" }, { "docid": "d7a6e74ec74cc021f1be35c63d2ff4df", "score": "0.47540933", "text": "private function doneLoading()\n {\n if ($this->is_loading) {\n $this->is_loading = false;\n }\n\n $this->setAsLoaded();\n }", "title": "" }, { "docid": "a60c595c4d4bc5fc1840af5acdd87916", "score": "0.47502753", "text": "function deco()\r\n{\r\n session_destroy();\r\n accueil();\r\n}", "title": "" }, { "docid": "3adb6551c1a5b3214198bb61f331481a", "score": "0.47496527", "text": "public static function teardown($event)\n {\n }", "title": "" }, { "docid": "b70cc211c78057d85c164539331fc84e", "score": "0.47446316", "text": "public static function unregisterOrderUpdateEventHandler(): void\n\t{\n\t\tUnRegisterModuleDependences(\"main\", \"OnEpilog\", self::$moduleId, __CLASS__, \"showProgressBar\");\n\t\tUnRegisterModuleDependences(\"main\", \"OnEpilog\", self::$moduleId, __CLASS__, \"bindAgentOrderUpdate\");\n\t}", "title": "" }, { "docid": "8bf28ff77a88fa0000a96c5f268b6bab", "score": "0.47381562", "text": "public function cleanUp()\n { if (! RuntimeState::G()->is_before_show_done) {\n foreach ($this->beforeShowHandlers as $v) {\n ($v)();\n }\n RuntimeState::G()->is_before_show_done=true;\n }\n RuntimeState::G()->end();\n $this->is_in_exception=false;\n }", "title": "" }, { "docid": "91a55df3f872fb3744930e5acf3b0a05", "score": "0.4735351", "text": "public function clearPageStates()\n {\n \t$this->_pageStates=array();\n }", "title": "" }, { "docid": "e69a554c3d202ca9ee9646b1672d2be3", "score": "0.47350118", "text": "function desregistrar_autoload()\n\t{\n\t\t$nombre_clase = $this->get_clase_autoload();\n\t\t$nombre_metodo = $this->get_metodo_autoload();\n\t\tspl_autoload_unregister(array($nombre_clase, $nombre_metodo));\n\t}", "title": "" }, { "docid": "c34e1ea44dbcb2b1106e4721c93ded97", "score": "0.4730444", "text": "function gyventi(): void;", "title": "" }, { "docid": "447b04ffad4eda2ad409d4407af98902", "score": "0.4728265", "text": "public function unsubscribePlaceOrderEvent()\n {\n // invokes hook registration process on each request\n }", "title": "" }, { "docid": "b5cb394653c08d79c0df0f3bea1fa6a5", "score": "0.4727628", "text": "public static function clearHandlers() {\r\n Event::$_handlers = array();\r\n }", "title": "" }, { "docid": "1ca3495afec81619165bc3db98851054", "score": "0.47244883", "text": "public function exp_onLoad() {\n \n }", "title": "" }, { "docid": "af9748d02acbed0bccae59bf4c141249", "score": "0.4722118", "text": "public function __destruct() {\n\t\t$this->unhook();\n\t}", "title": "" }, { "docid": "8372a8907995b5aa12b250ecf65bbdfe", "score": "0.4718254", "text": "public function ao_ccss_unloadccss( $html_in ) {\n $_unloadccss_js = apply_filters( 'autoptimize_filter_ccss_core_unloadccss_js', '<script>window.addEventListener(\"load\", function(event) {document.getElementById(\"aoatfcss\").media=\"none\";})</script>' );\n\n return str_replace( '</body>', $_unloadccss_js . '</body>', $html_in );\n }", "title": "" }, { "docid": "56dfebecde1802906e0f2b981c884bc1", "score": "0.47122675", "text": "public function onLoad($param)\n\t{\n\t\tif($this->getIsTrackingPageState())\n\t\t{\n\t\t $stateTrackerClass = $this->_stateTrackerClass;\n\t\t\t$this->_stateTracker = new $stateTrackerClass($this->getControl());\n\t\t\t$this->_stateTracker->trackChanges();\n\t\t}\n\t\tparent::onLoad($param);\n\t}", "title": "" }, { "docid": "c852bd471b65aa081091583d89f1d83c", "score": "0.47067344", "text": "function detach(Observer $observer);", "title": "" }, { "docid": "c4f55e120f9ffdce43d95bb34e152b98", "score": "0.46972546", "text": "public function clearWfevents()\n\t{\n\t\t$this->collWfevents = null; // important to set this to NULL since that means it is uninitialized\n\t}", "title": "" }, { "docid": "a90d4fcf70d583b9eecd6ee179f5383b", "score": "0.46945825", "text": "public function onDisable(HCFLoader $loader): void\r\n {\r\n }", "title": "" }, { "docid": "07e1e3674b4d2be6d2031c97e6bd1405", "score": "0.46879357", "text": "public static function clearHandlers() {\n Event::$_handlers = array();\n }", "title": "" }, { "docid": "5896cb1ea2481771b8bfa57f2ca7e8f9", "score": "0.46843624", "text": "public function after_load_caller()\n\t{\n\t\t/*\n\t\tforeach (cms_orm()->get_acts_as($this) as $one_acts_as)\n\t\t{\n\t\t\t$one_acts_as->after_load($this);\n\t\t}\n\t\t*/\n\t\t$this->after_load();\n\t}", "title": "" }, { "docid": "ff7d6e35e06d70dba3eada5814a1a955", "score": "0.4671544", "text": "function wptouch_handle_deactivation() {\n\tglobal $wptouch_pro;\n\tif ( !$wptouch_pro ) {\n\t\twptouch_create_three_object();\n\t}\n\n\t$wptouch_pro->handle_deactivation();\n}", "title": "" }, { "docid": "b547ac0b0e9bc5dce043d7a189420946", "score": "0.4668786", "text": "public static function after_wp_load()\n {\n }", "title": "" } ]
bd2ca0fd039e3dfb3eae861a4e5adc59
You should never get to this action, because the module has its own controller This action is just here to catch wrong routes.
[ { "docid": "c84670136a26496ea5e2c3c3682c297b", "score": "0.0", "text": "public function indexAction() {\n // generate some form for delete action\n $form = new \\Phalcon\\Forms\\Form();\n $csrf = new \\Phalcon\\Forms\\Element\\Hidden('csrf', ['value' => $this->security->getToken()]);\n $csrf->addValidator(\n new \\Phalcon\\Validation\\Validator\\Identical(\n array(\n 'value' => $this->security->getSessionToken(),\n 'message' => 'CSRF validation failed'\n )\n )\n );\n $form->add($csrf);\n $this->view->setVar('form', $form);\n unset($form);\n\n $current_page = (int)$this->request->get('page', null, 1);\n $products = \\Modules\\Products\\Models\\Products::query()\n ->order('id DESC')\n ->execute();\n $paginator = new \\Phalcon\\Paginator\\Adapter\\Model(\n array(\n 'data' => $products,\n 'limit' => 10,\n 'page' => $current_page\n )\n );\n $this->view->setVar('page', $paginator->getPaginate());\n unset($current_page, $products, $paginator);\n }", "title": "" } ]
[ { "docid": "9d99d045f291e2a00819b719ee279d79", "score": "0.70367044", "text": "public function index(){\n print \"Action not found\";\n }", "title": "" }, { "docid": "01b9d791c9f2683d1b407cfc6b63e16a", "score": "0.6707953", "text": "public function dispatch()\n {\n $env = $this->system->getEnv();\n if ($env == 'backend') {\n // Assign routing parameters to waRequest::param()\n // to enable routing.backend.php\n $module = waRequest::get($this->options['module']);\n if (empty($module)) {\n $routing = new waRouting($this->system, array(\n 'default' => array(\n array(\n 'url' => wa()->getConfig()->systemOption('backend_url').'/wadev/*',\n 'app' => 'wadev',\n ),\n ),\n ));\n $routing->dispatch();\n if (!waRequest::param('module')) {\n throw new waException('Page not found', 404);\n }\n }\n }\n parent::dispatch();\n }", "title": "" }, { "docid": "96125a67b2cbbfd578dbf29cf6d9cfa7", "score": "0.6686317", "text": "public function notFoundAction()\n {\n public_exception('api.notFound', 404);\n }", "title": "" }, { "docid": "f1bc61198b2ea2a3a4b41f3fef80c0cf", "score": "0.6662084", "text": "public function mainAction()\n {\n return LogUtil::registerError(__('Sorry! This module is not designed or is not currently configured to be accessed in the way you attempted.'), 403);\n }", "title": "" }, { "docid": "f0baacd6ea691da3fab172fffe6a79ca", "score": "0.6658659", "text": "public function indexAction() {\n $this->setError404();\n\t}", "title": "" }, { "docid": "cf075bd14cd3cc5eaaf79ebb88bf2085", "score": "0.66562366", "text": "function missingController()\n\t{\n\t\t$this->render('../errors/missingController');\n\t}", "title": "" }, { "docid": "6c86d085bb7be9e8a25b4cd6449a2810", "score": "0.66177267", "text": "public function notFoundAccess()\n {\n $this->_request->setModuleName($this->_notFoundPage['module']);\n $this->_request->setControllerName($this->_notFoundPage['controller']);\n $this->_request->setActionName($this->_notFoundPage['action']);\n }", "title": "" }, { "docid": "24ac0a27892b95c8615d67f83340f609", "score": "0.65376437", "text": "public function pageNotFoundAction() {\r\n }", "title": "" }, { "docid": "bbe2072f35ade6adfcd47e044f1480bf", "score": "0.64984876", "text": "function missingAction()\n\t{\n\t\t$this->render('../errors/missingAction');\n\t}", "title": "" }, { "docid": "4dd435908afb3bfffdf6928ace4616f1", "score": "0.6488471", "text": "public function indexAction() {\r\n\t\t$this->_helper->viewRenderer->setNoRender ( false );\r\n\t\t$this->_helper->layout ()->enableLayout ();\r\n\t\t$this->view->assign ( 'controller', $this->_request->getControllerName () );\r\n\t\t$this->view->assign ( 'module', $this->_request->getModuleName () );\r\n\t}", "title": "" }, { "docid": "c19335499631c547f5c0ec56efc50b9e", "score": "0.6464257", "text": "public function actionIndex()\n {\n $this->actionNot_found();\n }", "title": "" }, { "docid": "c091c12759de64de1bb5750d6bf2147c", "score": "0.6462759", "text": "public function initModuleAction()\n {\n //check module\n $params = explode('/', trim($this->uri, '/'));\n if (isset($params['0'])) {\n $module = strtolower($params['0']);\n $allowModules = A::getMainApp()->getConfig('modules');\n if (isset($allowModules[$module])) {\n $this->module = $module;\n $this->_moduleConfig = $allowModules[$module];\n }\n }\n if (is_null($this->module)) {\n throw new AppException(AppException::HTTP400, \"Request module does not exist!\");\n }\n\n //check action\n $this->_rawAction = isset($params['1']) ? $params['1'] : NULL;\n\n //check user actions in config\n if (!is_null($this->_rawAction) && isset($this->_moduleConfig['actions'])) {\n $userActions = $this->_moduleConfig['actions'];\n if (in_array($this->_rawAction, $userActions)) {\n return $this->action = $this->_rawAction;\n }\n }\n\n //check restfull action\n if (ctype_digit($this->_rawAction)) {\n $this->paramToAction['id'] = $this->_rawAction;\n }\n\n if ($this->method == RequestManager::METHOD_GET\n && is_null($this->_rawAction)) {\n return $this->action = MainModule::RESTFULL_ACTION_ITEMS;\n }\n\n if ($this->method == RequestManager::METHOD_GET\n && ctype_digit($this->_rawAction)) {\n return $this->action = MainModule::RESTFULL_ACTION_VIEW;\n }\n\n if ($this->method == RequestManager::METHOD_POST\n && is_null($this->_rawAction)) {\n return $this->action = MainModule::RESTFULL_ACTION_ADD;\n }\n\n if ($this->method == RequestManager::METHOD_PUT\n && ctype_digit($this->_rawAction)) {\n return $this->action = MainModule::RESTFULL_ACTION_EDIT;\n }\n\n if ($this->method == RequestManager::METHOD_DELETE\n && ctype_digit($this->_rawAction)) {\n return $this->action = MainModule::RESTFULL_ACTION_DELETE;\n }\n if (is_null($this->action)) {\n throw new AppException(AppException::HTTP400, \" Request action does not exist!\");\n }\n\n }", "title": "" }, { "docid": "7df94d33462105d370494c4eb48f890d", "score": "0.6456796", "text": "protected function route_404() {}", "title": "" }, { "docid": "5f0dcd599be9947bce2dab5f8e2b3599", "score": "0.64236236", "text": "public function indexAction() {}", "title": "" }, { "docid": "f96c6b23b44806649ac52ae6bcf27bc2", "score": "0.6419556", "text": "public function indexAction ()\n {\n }", "title": "" }, { "docid": "7d9f919d6253afc98d1a929b07464c11", "score": "0.6408698", "text": "public function indexAction()\n {\n throw $this->createNotFoundException();\n }", "title": "" }, { "docid": "631f1581a82c747d05f8a68e97d6c5e3", "score": "0.6394613", "text": "public function pageNotFoundAction()\n {\n echo \"Page not found\";\n\n }", "title": "" }, { "docid": "1c7648141c558917407850442fc03f03", "score": "0.6381749", "text": "public function indexAction()\n {\n echo \"No action specified.\";\n }", "title": "" }, { "docid": "5f5006a9bd4e22d954c0174992aa81f7", "score": "0.6381054", "text": "public function indexAction() {\n\t//\t$this->_forward('requests');//default action\n\t}", "title": "" }, { "docid": "2fd15611a12ae15c6928cff0a9b28912", "score": "0.6373922", "text": "public function notfoundAction() : void\n {\n throw new \\App\\Controllers\\HttpExceptions\\Http404Exception(\n _('API endpoint not available for the HTTP method you are using.'),\n \\App\\Controllers\\AbstractController::ERROR_NOT_FOUND,\n new \\Exception('URI not found: ' . $this->getDi()->getRequest()->getMethod() . ' ' . $this->getDi()->getRequest()->getURI())\n );\n\n }", "title": "" }, { "docid": "e55c9b4f05eb84ca7cbf8f36f675eaee", "score": "0.63662267", "text": "public function indexAction ()\r\n {\r\n }", "title": "" }, { "docid": "b5da1fc6be2b03f7d55c07dc4fd23432", "score": "0.6361151", "text": "public function fooAction()\n {\n // are working when you browse to /module-specific-root/skeleton/foo\n return array();\n }", "title": "" }, { "docid": "0584293712663233550da7e1b2e48d1e", "score": "0.6357212", "text": "public function indexAction() {\n }", "title": "" }, { "docid": "1fa797c8e50513fa2342b89877596d8d", "score": "0.6350458", "text": "public function indexAction() {\n }", "title": "" }, { "docid": "69fc6fb94cafd47d751087bbcf396518", "score": "0.63413596", "text": "public function indexAction() {\n\n }", "title": "" }, { "docid": "bde38c63ec4e1cb88eda9fcbba03fca5", "score": "0.6334972", "text": "public function testIsMatchModuleController() {\n\t\t$url = '/forum/topic';\n\t\t$route = new DefaultRoute('/{module}/{controller}');\n\n\t\t$this->assertTrue($route->isMatch($url));\n\t\t$this->assertEquals([\n\t\t\t'ext' => '',\n\t\t\t'module' => 'forum',\n\t\t\t'controller' => 'topic',\n\t\t\t'action' => 'index',\n\t\t\t'query' => [],\n\t\t\t'args' => []\n\t\t], $route->param());\n\n\t\t// invalid controller\n\t\t$url = '/forum/foobar';\n\t\t$route = new DefaultRoute('/{module}/{controller}');\n\n\t\t$this->assertTrue($route->isMatch($url));\n\t\t$this->assertEquals([\n\t\t\t'ext' => '',\n\t\t\t'module' => 'forum',\n\t\t\t'controller' => 'foobar',\n\t\t\t'action' => 'index',\n\t\t\t'query' => [],\n\t\t\t'args' => []\n\t\t], $route->param());\n\t}", "title": "" }, { "docid": "5e4f5124edb270b8bf09a9842ab36401", "score": "0.6309612", "text": "private function run() {\r\n //escape and get relative path\r\n $full_path = $_SERVER['REQUEST_URI'];\r\n $full_path = substr($full_path, strlen(BASE_URL));\r\n $full_path = preg_replace(array('/\\?.*$/', '/(^\\/|\\/$)/', '/\\/(?=\\/)/'), '', $full_path);\r\n\r\n $slots = explode('/', $full_path);\r\n $config = self::$config;\r\n $module = isset($slots[0]) && $slots[0] != '' ? ucfirst(strtolower($slots[0])) : ( isset($config['defaultModule']) ? $config['defaultModule'] : 'Index');\r\n\r\n $controller = isset($slots[1]) && $slots[1] != '' ? ucfirst(strtolower($slots[1])) : 'Index';\r\n $action = isset($slots[2]) && $slots[2] != '' ? ucfirst(strtolower($slots[2])) : 'Index';\r\n\r\n $params = array();\r\n $p_start = 3;\r\n\r\n for ( $i = $p_start; $i < count($slots); $i++ ) {\r\n $params[] = $slots[$i];\r\n }\r\n\r\n $module = ucfirst(strtolower($module));\r\n $controller = ucfirst(strtolower($controller));\r\n $action = strtolower($action);\r\n\r\n self::$module = $module;\r\n self::$controller = $controller;\r\n self::$action = $action;\r\n self::$params = $params;\r\n\r\n $dir = ROOT . \"/apps/modules/$module\";\r\n $debug = isset(self::$config['debug']) ? self::$config['debug'] : false;\r\n\r\n if ( !is_dir($dir) ) {\r\n if ( $debug ) {\r\n throw new App_Exception(\"Module $module is not found\");\r\n } else {\r\n return $this->setError('404');\r\n }\r\n }\r\n\r\n $dir = $dir . \"/controllers/{$controller}Controller.php\";\r\n\r\n if ( !file_exists($dir) ) {\r\n if ( $debug ) {\r\n throw new App_Exception(\"Controller $controller is not found\");\r\n } else {\r\n return $this->setError('404');\r\n }\r\n } else {\r\n require_once 'App/Action.php';\r\n require_once $dir;\r\n\r\n $controllerClass = \"{$module}{$controller}Controller\";\r\n\r\n if ( class_exists($controllerClass) ) {\r\n $dir_plugin = ROOT . '/apps/Plugins.php';\r\n if ( file_exists($dir_plugin) ) {\r\n require_once 'App/Plugins.php';\r\n require_once $dir_plugin;\r\n }\r\n\r\n $ctrClass = new $controllerClass();\r\n } else {\r\n if ( $debug ) {\r\n throw new App_Exception(\"Class $controllerClass is not found\");\r\n } else {\r\n return self::setError('404');\r\n }\r\n }\r\n\r\n if ( !method_exists($ctrClass, \"{$action}Action\") ) {\r\n if ( $debug ) {\r\n throw new App_Exception(\"Action $action is not found\");\r\n } else {\r\n return self::setError('404');\r\n }\r\n }\r\n return $ctrClass->run();\r\n }\r\n\r\n }", "title": "" }, { "docid": "954d9e2b863d055fdb9fdae0bcd61e3d", "score": "0.6302167", "text": "public function notAuthorizedAction() {\r\n }", "title": "" }, { "docid": "a97ef7dbff8e6bdf19159f2766db1095", "score": "0.62948036", "text": "public function norouteAction()\r\n {\r\n $this->_redirect('/');\r\n }", "title": "" }, { "docid": "a4ee126076ea54e8f3201e3c43e51031", "score": "0.6293121", "text": "public function indexAction()\n {\n }", "title": "" }, { "docid": "a4ee126076ea54e8f3201e3c43e51031", "score": "0.6293121", "text": "public function indexAction()\n {\n }", "title": "" }, { "docid": "a4ee126076ea54e8f3201e3c43e51031", "score": "0.6293121", "text": "public function indexAction()\n {\n }", "title": "" }, { "docid": "a4ee126076ea54e8f3201e3c43e51031", "score": "0.6293121", "text": "public function indexAction()\n {\n }", "title": "" }, { "docid": "390fcfb298b9f84ac736de9dff44e0ee", "score": "0.6288745", "text": "public function __beforeExecuteRoute()\r\n {\r\n }", "title": "" }, { "docid": "6f204e28b23473cd42977dc5036b4b24", "score": "0.62872", "text": "public function fooAction() {\n // are working when you browse to /module-specific-root/skeleton/foo\n return array();\n }", "title": "" }, { "docid": "c61cc4291eeb971ba1277f84bf854c73", "score": "0.62836355", "text": "public function routeTo(){\n $router = new DooUriRouter;\n $routeRs = $router->execute($this->route,Doo::conf()->SUBFOLDER);\n\n if($routeRs[0]!==null && $routeRs[1]!==null){\n //dispatch, call Controller class \n if($routeRs[0][0]!=='['){\n if(strpos($routeRs[0], '\\\\')!==false){\n $nsClassFile = str_replace('\\\\','/',$routeRs[0]);\n $nsClassFile = explode(Doo::conf()->APP_NAMESPACE_ID.'/', $nsClassFile, 2);\n $nsClassFile = $nsClassFile[1];\n require_once Doo::conf()->SITE_PATH . Doo::conf()->PROTECTED_FOLDER . $nsClassFile .'.php'; \n }else{\n require_once Doo::conf()->SITE_PATH . Doo::conf()->PROTECTED_FOLDER . \"controller/{$routeRs[0]}.php\";\n }\n }else{\n $moduleParts = explode(']', $routeRs[0]);\n $moduleName = substr($moduleParts[0],1);\n \n if(isset(Doo::conf()->PROTECTED_FOLDER_ORI)===true){\n require_once Doo::conf()->SITE_PATH . Doo::conf()->PROTECTED_FOLDER_ORI . 'module/'. $moduleName .'/controller/'.$moduleParts[1].'.php'; \n }else{\n require_once Doo::conf()->SITE_PATH . Doo::conf()->PROTECTED_FOLDER . 'module/'. $moduleName .'/controller/'.$moduleParts[1].'.php'; \n Doo::conf()->PROTECTED_FOLDER_ORI = Doo::conf()->PROTECTED_FOLDER;\n }\n \n //set class name\n $routeRs[0] = $moduleParts[1];\n Doo::conf()->PROTECTED_FOLDER = Doo::conf()->PROTECTED_FOLDER_ORI . 'module/'.$moduleName.'/';\n }\n\n if(strpos($routeRs[0], '/')!==false){\n $clsname = explode('/', $routeRs[0]);\n $routeRs[0] = $clsname[ sizeof($clsname)-1 ];\n }\n\n //if defined class name, use the class name to create the Controller object\n $clsnameDefined = (sizeof($routeRs)===4);\n if($clsnameDefined)\n $controller = new $routeRs[3];\n else\n $controller = new $routeRs[0];\n\n $controller->params = $routeRs[2];\n\n if(isset($controller->params['__extension'])===true){\n $controller->extension = $controller->params['__extension'];\n unset($controller->params['__extension']);\n }\n\t\t\tif(isset($controller->params['__routematch'])===true){\n $controller->routematch = $controller->params['__routematch'];\n unset($controller->params['__routematch']);\n }\n\n if($_SERVER['REQUEST_METHOD']==='PUT')\n $controller->init_put_vars();\n\n //before run, normally used for ACL auth\n if($clsnameDefined){\n if($rs = $controller->beforeRun($routeRs[3], $routeRs[1])){\n return $rs;\n }\n }else{\n if($rs = $controller->beforeRun($routeRs[0], $routeRs[1])){\n return $rs;\n }\n }\n\n\t\t\t$routeRs = $controller->$routeRs[1]();\n $controller->afterRun($routeRs);\n return $routeRs;\n }\n //if auto route is on, then auto search Controller->method if route not defined by user\n else if(Doo::conf()->AUTOROUTE){\n\n list($controller_name, $method_name, $method_name_ori, $params, $moduleName )= $router->auto_connect(Doo::conf()->SUBFOLDER, (isset($this->route['autoroute_alias'])===true)?$this->route['autoroute_alias']:null );\n\n if(empty($this->route['autoroute_force_dash'])===false){\n if($method_name!=='index' && $method_name===$method_name_ori && ctype_lower($method_name_ori)===false){\n $this->throwHeader(404);\n return;\n }\n }\n\n if(isset($moduleName)===true){\n Doo::conf()->PROTECTED_FOLDER_ORI = Doo::conf()->PROTECTED_FOLDER;\n Doo::conf()->PROTECTED_FOLDER = Doo::conf()->PROTECTED_FOLDER_ORI . 'module/'.$moduleName.'/';\n }\n\n $controller_file = Doo::conf()->SITE_PATH . Doo::conf()->PROTECTED_FOLDER . \"controller/{$controller_name}.php\";\n\n if(file_exists($controller_file)){\n require_once $controller_file;\n\n\t\t\t\t$methodsArray = get_class_methods($controller_name);\n\n //if the method not in controller class, check for a namespaced class with the same file name.\n if($methodsArray===null && isset(Doo::conf()->APP_NAMESPACE_ID)===true){\n if(isset($moduleName)===true){\n $controller_name = Doo::conf()->APP_NAMESPACE_ID . '\\\\module\\\\'. $moduleName .'\\\\controller\\\\' . $controller_name; \n }else{\n $controller_name = Doo::conf()->APP_NAMESPACE_ID . '\\\\controller\\\\' . $controller_name;\n }\n \t\t\t\t$methodsArray = get_class_methods($controller_name); \n }\n \n //if method not found in both both controller and namespaced controller, 404 error\n if($methodsArray===null){\n if(isset(Doo::conf()->PROTECTED_FOLDER_ORI)===true)\n Doo::conf()->PROTECTED_FOLDER = Doo::conf()->PROTECTED_FOLDER_ORI;\n\t\t\t\t\t$this->throwHeader(404);\n\t\t\t\t\treturn; \n }\n }\n else if(isset($moduleName)===true && isset(Doo::conf()->APP_NAMESPACE_ID)===true){\n if(isset(Doo::conf()->PROTECTED_FOLDER_ORI)===true)\n Doo::conf()->PROTECTED_FOLDER = Doo::conf()->PROTECTED_FOLDER_ORI; \n \n $controller_file = Doo::conf()->SITE_PATH . Doo::conf()->PROTECTED_FOLDER . '/controller/'.$moduleName.'/'.$controller_name .'.php'; \n \n if(file_exists($controller_file)===false){\n\t\t\t\t\t$this->throwHeader(404);\n\t\t\t\t\treturn; \n } \n $controller_name = Doo::conf()->APP_NAMESPACE_ID .'\\\\controller\\\\'.$moduleName.'\\\\'.$controller_name; \n #echo 'module = '.$moduleName.'<br>';\n #echo $controller_file.'<br>'; \n #echo $controller_name.'<br>'; \n\t\t\t\t$methodsArray = get_class_methods($controller_name); \n } \n else{\n if(isset(Doo::conf()->PROTECTED_FOLDER_ORI)===true)\n Doo::conf()->PROTECTED_FOLDER = Doo::conf()->PROTECTED_FOLDER_ORI; \n $this->throwHeader(404);\n return;\n }\n \n //check for REST request as well, utilized method_GET(), method_PUT(), method_POST, method_DELETE()\n $restMethod = $method_name .'_'. strtolower($_SERVER['REQUEST_METHOD']);\n $inRestMethod = in_array($restMethod, $methodsArray);\n \n //check if method() and method_GET() etc. doesn't exist in the controller, 404 error\n if( in_array($method_name, $methodsArray)===false && $inRestMethod===false ){\n if(isset(Doo::conf()->PROTECTED_FOLDER_ORI)===true)\n Doo::conf()->PROTECTED_FOLDER = Doo::conf()->PROTECTED_FOLDER_ORI;\n $this->throwHeader(404);\n return;\n }\n\n //use method_GET() etc. if available\n if( $inRestMethod===true ){\n $method_name = $restMethod;\n }\n\n $controller = new $controller_name;\n\n //if autoroute in this controller is disabled, 404 error\n if($controller->autoroute===false){\n if(isset(Doo::conf()->PROTECTED_FOLDER_ORI)===true)\n Doo::conf()->PROTECTED_FOLDER = Doo::conf()->PROTECTED_FOLDER_ORI;\n $this->throwHeader(404);\n }\n\n if($params!=null)\n $controller->params = $params;\n\n if($_SERVER['REQUEST_METHOD']==='PUT')\n $controller->initPutVars();\n\n //before run, normally used for ACL auth\n if($rs = $controller->beforeRun($controller_name, $method_name)){\n return $rs;\n }\n\n $routeRs = $controller->$method_name();\n $controller->afterRun($routeRs);\n return $routeRs; \n }\n else{\n $this->throwHeader(404);\n }\n }", "title": "" }, { "docid": "0650cb0d46253f906b66066873225a29", "score": "0.6275144", "text": "public function notAuthorizedAction() {\n\n }", "title": "" }, { "docid": "03fde6318a65be495d9099bad755ee8d", "score": "0.62606734", "text": "public function indexAction() {\n $this->getAction();\n }", "title": "" }, { "docid": "0c6b34a202b7587228b7edb07ad32325", "score": "0.6259598", "text": "public function beforeExecuteRoute()\n {\n }", "title": "" }, { "docid": "4c81f10d5593fcfd2f381fb0c29819f1", "score": "0.6257992", "text": "public function indexAction() \n {}", "title": "" }, { "docid": "2ba08c1aa78a76fa30167653272bfeae", "score": "0.6254221", "text": "public function indexAction()\n {\n \n }", "title": "" }, { "docid": "2f65e66b7e924ddb450a1b53d733da89", "score": "0.62514913", "text": "public function indexAction()\r\n {\r\n }", "title": "" }, { "docid": "ac9ae46a534fd1074fbba43e6a003418", "score": "0.6247311", "text": "public function hookActionDispatcher($params) {\n if ($params['controller_type'] === 1 && $params['controller_class'] === 'ContactController') {\n Tools::redirect('pagenotfound'); // redirect contact page to 404 page\n }\n }", "title": "" }, { "docid": "9e7c361aa09abe8c53f1e43ebc99e575", "score": "0.6237446", "text": "public function indexAction()\n {\n\n }", "title": "" }, { "docid": "10ee14edcada8f474e70915ba34b1328", "score": "0.6229532", "text": "protected function file_not_found_action() {\n\t\t$this->logger->debug(__METHOD__.' Calling base controller internal File Not Found Action');\n\t\t$this->payload->message = \"You've requested an unknown resource\";\n\t}", "title": "" }, { "docid": "7ff5a2e3ba224d78085522feb5f8874b", "score": "0.62245446", "text": "public function actionFindRoute()\r\n {\r\n $comment = \"\";\r\n $route = $_POST['AAuthOperation']['name'];\r\n list($controller, $actionId) = Yii::app()->createController($route);\r\n if (!is_object($controller))\r\n {\r\n // no such controller\r\n if (substr($route, -2, 2) == \"/*\")\r\n {\r\n $route = substr($route, 0, -2);\r\n list($controller, $actionId) = Yii::app()->createController($route);\r\n if (is_object($controller) && is_object($controller->module))\r\n {\r\n $reflection = new ReflectionObject($controller->module);\r\n $comment = strtr(trim(preg_replace('/^\\s*\\**( |\\t)?/m', '', trim(trim($reflection->getDocComment()), '/'))), \"\\r\", '');\r\n if (preg_match('/^\\s*@\\w+/m', $comment, $matches, PREG_OFFSET_CAPTURE))\r\n {\r\n $comment = trim(substr($comment, 0, $matches[0][1]));\r\n }\r\n }\r\n }\r\n }\r\n else\r\n {\r\n if ($actionId == \"\")\r\n {\r\n $actionId = $controller->defaultAction;\r\n }\r\n $reflection = new ReflectionObject($controller);\r\n if ($actionId == \"*\")\r\n {\r\n $comment = strtr(trim(preg_replace('/^\\s*\\**( |\\t)?/m', '', trim(trim($reflection->getDocComment()), '/'))), \"\\r\", '');\r\n if (preg_match('/^\\s*@\\w+/m', $comment, $matches, PREG_OFFSET_CAPTURE))\r\n {\r\n $comment = trim(substr($comment, 0, $matches[0][1]));\r\n }\r\n }\r\n else\r\n {\r\n if ($reflection->hasMethod(\"action\" . $actionId))\r\n {\r\n $action = $reflection->getMethod(\"action\" . $actionId);\r\n $comment = strtr(trim(preg_replace('/^\\s*\\**( |\\t)?/m', '', trim(trim($action->getDocComment()), '/'))), \"\\r\", '');\r\n if (preg_match('/^\\s*@\\w+/m', $comment, $matches, PREG_OFFSET_CAPTURE))\r\n {\r\n $comment = trim(substr($comment, 0, $matches[0][1]));\r\n }\r\n }\r\n }\r\n }\r\n $response = array(\r\n \"comment\" => $comment,\r\n \"url\" => $this->createAbsoluteUrl($route),\r\n );\r\n header(\"Content-type: application/json\");\r\n echo json_encode($response);\r\n }", "title": "" }, { "docid": "28f53e65aaba3785f9965146cccfee50", "score": "0.62160546", "text": "public function indexAction() {\n \n }", "title": "" }, { "docid": "f4d68e78a966f8484d1e18a9f58ecd94", "score": "0.6215924", "text": "function handleError (&$controller, &$request, &$user)\n\t{\n\t\t$controller->forward(ERROR_404_MODULE, ERROR_404_ACTION);\n\t\treturn VIEW_NONE;\n\t}", "title": "" }, { "docid": "f4d68e78a966f8484d1e18a9f58ecd94", "score": "0.6215924", "text": "function handleError (&$controller, &$request, &$user)\n\t{\n\t\t$controller->forward(ERROR_404_MODULE, ERROR_404_ACTION);\n\t\treturn VIEW_NONE;\n\t}", "title": "" }, { "docid": "e513850c42e2868fe52b94d519726d83", "score": "0.62068224", "text": "public function indexAction()\n {}", "title": "" }, { "docid": "a69c2f42e0fcbd1c0b1f6d13cdff2713", "score": "0.6203414", "text": "public function indexAction()\n {\n\t\t\n }", "title": "" }, { "docid": "4072073df12f2abe06a9defba30d4320", "score": "0.61911887", "text": "public function action404(){\n http_response_code(404);\n die();\n }", "title": "" }, { "docid": "4e5dedac400142a366b35f0b9fb712d8", "score": "0.6190315", "text": "public function testIsMatchModuleControllerAction() {\n\t\t$url = '/forum/topic/stats';\n\t\t$route = new DefaultRoute('/{module}/{controller}/{action}');\n\n\t\t$this->assertTrue($route->isMatch($url));\n\t\t$this->assertEquals([\n\t\t\t'ext' => '',\n\t\t\t'module' => 'forum',\n\t\t\t'controller' => 'topic',\n\t\t\t'action' => 'stats',\n\t\t\t'query' => [],\n\t\t\t'args' => []\n\t\t], $route->param());\n\n\t\t// single argument\n\t\t$url = '/forum/topic/view/123';\n\t\t$route = new DefaultRoute('/{module}/{controller}/{action}');\n\n\t\t$this->assertTrue($route->isMatch($url));\n\t\t$this->assertEquals([\n\t\t\t'ext' => '',\n\t\t\t'module' => 'forum',\n\t\t\t'controller' => 'topic',\n\t\t\t'action' => 'view',\n\t\t\t'query' => [],\n\t\t\t'args' => [123]\n\t\t], $route->param());\n\n\t\t// multi arguments\n\t\t$url = '/forum/topic/view/123/abc';\n\t\t$route = new DefaultRoute('/{module}/{controller}/{action}');\n\n\t\t$this->assertTrue($route->isMatch($url));\n\t\t$this->assertEquals([\n\t\t\t'ext' => '',\n\t\t\t'module' => 'forum',\n\t\t\t'controller' => 'topic',\n\t\t\t'action' => 'view',\n\t\t\t'query' => [],\n\t\t\t'args' => [123, 'abc']\n\t\t], $route->param());\n\n\t\t// invalid module\n\t\t$url = '/foobar/dashboard/edit';\n\t\t$route = new DefaultRoute('/{module}/{controller}/{action}');\n\n\t\t$this->assertTrue($route->isMatch($url));\n\t\t$this->assertEquals([\n\t\t\t'ext' => '',\n\t\t\t'module' => 'foobar',\n\t\t\t'controller' => 'dashboard',\n\t\t\t'action' => 'edit',\n\t\t\t'query' => [],\n\t\t\t'args' => []\n\t\t], $route->param());\n\n\t\t// invalid controller\n\t\t$url = '/forum/foobar/view/123';\n\t\t$route = new DefaultRoute('/{module}/{controller}/{action}');\n\n\t\t$this->assertTrue($route->isMatch($url));\n\t\t$this->assertEquals([\n\t\t\t'ext' => '',\n\t\t\t'module' => 'forum',\n\t\t\t'controller' => 'foobar',\n\t\t\t'action' => 'view',\n\t\t\t'query' => [],\n\t\t\t'args' => [123]\n\t\t], $route->param());\n\t}", "title": "" }, { "docid": "c8a2c06d205bab4f3d3c5ef11d23dbde", "score": "0.61890626", "text": "public function registerRouteWithControllerAction()\n {\n $this->router->socket(self::DUMMY_URL, ['uses' => 'FooController@foo']);\n }", "title": "" }, { "docid": "9e070a956c74fd9a1f81abc71bbdffd5", "score": "0.6166044", "text": "public function indexAction()\n {\n \n }", "title": "" }, { "docid": "9e070a956c74fd9a1f81abc71bbdffd5", "score": "0.6166044", "text": "public function indexAction()\n {\n \n }", "title": "" }, { "docid": "0f4ee1206d0cfa9892d6766062562558", "score": "0.6156714", "text": "public function indexAction()\n {\n echo \"it works\";\n }", "title": "" }, { "docid": "945ef7e0d8554e54592d7dbff9450b78", "score": "0.6154161", "text": "public function module($moduleUri, $action=null, $params=null){\n if($moduleUri[0]=='/'){\n if(Doo::conf()->SUBFOLDER!='/')\n $_SERVER['REQUEST_URI'] = substr(Doo::conf()->SUBFOLDER, 0, strlen(Doo::conf()->SUBFOLDER)-1) . $moduleUri;\n else\n $_SERVER['REQUEST_URI'] = $moduleUri;\n\n $tmp = Doo::conf()->PROTECTED_FOLDER;\n if(isset(Doo::conf()->PROTECTED_FOLDER_ORI)===true){\n Doo::conf()->PROTECTED_FOLDER = Doo::conf()->PROTECTED_FOLDER_ORI;\n $tmpOri = Doo::conf()->PROTECTED_FOLDER_ORI;\n }\n \n ob_start();\n $this->routeTo();\n $data = ob_get_contents();\n ob_end_clean();\n \n Doo::conf()->PROTECTED_FOLDER = $tmp;\n \n if(isset($tmpOri)===true)\n Doo::conf()->PROTECTED_FOLDER_ORI = $tmpOri;\n \n return $data;\n }\n //if Controller name passed in: Doo::app()->module('admin/SomeController', 'login', array('nav'=>'home'));\n else if(is_string($moduleUri)){\n $controller_name = $moduleUri;\n if(strpos($moduleUri, '/')!==false){\n $arr = explode('/', $moduleUri);\n $controller_name = $arr[sizeof($arr)-1];\n }\n require_once Doo::conf()->SITE_PATH . Doo::conf()->PROTECTED_FOLDER . \"controller/$moduleUri.php\";\n $controller = new $controller_name;\n $controller->params = $params;\n if($rs = $controller->beforeRun($controller_name, $action)){\n $this->throwHeader( $rs );\n return;\n }\n\n ob_start();\n\t\t\t$rs = $controller->{$action}();\n\n if($controller->autorender===true){\n Doo::conf()->AUTO_VIEW_RENDER_PATH = array(strtolower(substr($controller_name, 0, -10)), strtolower(preg_replace('/(?<=\\\\w)(?=[A-Z])/','-$1', $action)));\n }\n $controller->afterRun($rs);\n\n $this->throwHeader( $rs );\n\n $data = ob_get_contents();\n ob_end_clean();\n return $data;\n }\n //if array passed in. For controller file name != controller class name.\n //eg. Doo::app()->module(array('admin/Admin', 'AdminController'), 'login', array('nav'=>'home'));\n else{\n require_once Doo::conf()->SITE_PATH . Doo::conf()->PROTECTED_FOLDER . \"controller/{$moduleUri[0]}.php\";\n $controller = new $moduleUri[1];\n $controller->params = $params;\n if($rs = $controller->beforeRun($moduleUri[1], $action)){\n $this->throwHeader( $rs );\n return;\n }\n\n ob_start();\n\t\t\t$rs = $controller->{$action}();\n\n\t\t\tif($controller->autorender===true){\n Doo::conf()->AUTO_VIEW_RENDER_PATH = array(strtolower(substr($controller_name, 0, -10)), strtolower(preg_replace('/(?<=\\\\w)(?=[A-Z])/','-$1', $action)));\n }\n $controller->afterRun($rs);\n\n $this->throwHeader( $rs );\n\n $data = ob_get_contents();\n ob_end_clean();\n return $data;\n }\n }", "title": "" }, { "docid": "e6d2d11cd4e52eef644c5f069aee0a9d", "score": "0.6148531", "text": "public function handleDefaultRequest() {\n // CHECK FOR MODEL TO LOAD\n \n if ($status = $this->createClientContext($this->module_request)) {\n $this->display($this->template);\n } else {\n $this->redirect($this->getSystemUrl('home'), \"\", 401);\n }\n }", "title": "" }, { "docid": "f92f6ee1cf56a04806634a99438b71fa", "score": "0.61436933", "text": "public function indexAction ()\n {\n \n \n \n }", "title": "" }, { "docid": "eccba07e77f684551ff39cfae2d492e0", "score": "0.6141254", "text": "public function indexAction() {\n\n\t}", "title": "" }, { "docid": "f771e27dab8bc90c8a6b2a338fee2ebc", "score": "0.6138241", "text": "public function indexAction() {\t}", "title": "" }, { "docid": "4ac939d4403431f79524f02e3380ace4", "score": "0.6124341", "text": "public final function indexAction() {\n\t\t$this->_forward('get');\n\t}", "title": "" }, { "docid": "d6406e7c6e4d9c9bc0705b9274b7b195", "score": "0.612388", "text": "public function actionIndex()\n {\n Yii::$app->response->setStatusCode(404);\n }", "title": "" }, { "docid": "dbb97086235c5f8f616fa2bd97bb3445", "score": "0.61234844", "text": "public function pageNotFoundAction() {\n $this->render(\"Error_404\");\n\n }", "title": "" }, { "docid": "4880e5cad8ed078d6dd887134cf57a9d", "score": "0.61164445", "text": "function handlerRouter() {\n if ($_GET['module'] == \"client\")\n handlerFront($_GET['module'],$_GET['function']);\n else {\n // Comprobamos el modulo por get.\n if (!empty($_GET['module']))\n $URI_module = $_GET['module'];\n else\n $URI_module = 'home';\n\n // Comprobamos la funcion por get.\n if (!empty($_GET['function']))\n $URI_function = $_GET['function'];\n else\n $URI_function = false;\n \n handlerModule($URI_module, $URI_function);\n }\n }", "title": "" }, { "docid": "83f9c3236e2846f251c1194ea5f71f21", "score": "0.61108714", "text": "public function index()\n {\n Apollo::getInstance()->getRequest()->error(400, 'No action is specified.');\n }", "title": "" }, { "docid": "a345ba4a756f5e902a01288b2148a16f", "score": "0.61047804", "text": "public function indexAction() : string\n {\n // Deal with the action and return a response.\n return \"Index!!\";\n }", "title": "" }, { "docid": "906b278585fd3c1f89193eb45de2fd92", "score": "0.61034125", "text": "public function dispatch()\n {\n try\n {\n // reinitialize filters (needed for unit and functional tests)\n sfFilter::$filterCalled = array();\n // determine our module and action\n $request = $this->context->getRequest();\n $moduleName = $request->getParameter('module');\n $actionName = $request->getParameter('action');\n if (empty($moduleName) || empty($actionName))\n {\n throw new sfError404Exception(sprintf('Empty module and/or action after parsing the URL \"%s\" (%s/%s).', $request->getPathInfo(), $moduleName, $actionName));\n }\n // make the first request\n $this->forward($moduleName, $actionName);\n }\n catch (sfException $e)\n {\n $e->printStackTrace();\n }\n catch (Exception $e)\n {\n sfException::createFromException($e)->printStackTrace();\n }\n }", "title": "" }, { "docid": "bf62ef717d18896ed1127a60cc1e2adc", "score": "0.609445", "text": "public function indexAction(){\n\n\t}", "title": "" }, { "docid": "91432098d91071e4a163ab24f1a2e111", "score": "0.60924345", "text": "public function fooAction()\n {\n // are working when you browse to /index/index/foo\n return array();\n }", "title": "" }, { "docid": "bb1d9e24b89e6a210d01cda67e4b4dce", "score": "0.60899174", "text": "public function indexAction(){\n\t\t\n\t}", "title": "" }, { "docid": "bc8e2ed053b2a67a9b5cd01c50c0ecd1", "score": "0.60887927", "text": "public function indexAction() {\n throw new Zend_Exception('booo hooo');\n }", "title": "" }, { "docid": "0a604eb00493e63e60ff2407ab30d458", "score": "0.6088517", "text": "function route() {\n\t\ttry{\n\t\t\tif(isset($_GET[\"url\"])) {\n\t\t\t\tforeach ($this->_map as $route) {\n\t\t\t\t\tif ($this->match($route, $_GET[\"url\"], $_SERVER[\"REQUEST_METHOD\"])) {\n\t\t\t\t\t\t//echo $route[\"controller\"], \" will be staged.<br>\";\n\t\t\t\t\t\treturn Core::getInstance($route[\"controller\"])->main();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//todo : no mapped controller, route to 404 page\n\t\t\techo \"404\";\n\t\t}catch(Exception $e){\n\t\t\t//todo : routing error, route to error page.\n\t\t}\n\t}", "title": "" }, { "docid": "6b2de2e0e149c49c67359062dab01de4", "score": "0.6076623", "text": "public function indexAction()\r\n\t{\r\n\t}", "title": "" }, { "docid": "4a9e1724a37e332b024f07ac769114c9", "score": "0.6076402", "text": "public function action_404()\n\t{\n\t\t//return Response::forge(ViewModel::forge('welcome/404'), 404);\n\t}", "title": "" }, { "docid": "04edfd1f22e05b0f0e2e6734beca4a76", "score": "0.60734314", "text": "public function notFound()\n {\n Apollo::getInstance()->getRequest()->error(400, 'Invalid action.');\n }", "title": "" }, { "docid": "ca8017cc43ddd3efac71d813544f5554", "score": "0.6071837", "text": "public function load() {\n \n $controller = $this->getController($this->registry->request->getController());\n \n // check if the action is callable\n $action = $this->registry->request->getAction();\n if (is_callable(array($controller, $action)) === false) {\n $action = 'index';\n } else {\n $action = $action;\n }\n \n // Add filters\n $controller = FilterManager::addFilters($controller, $this->registry);\n \n // run the action\n try {\n $controller->$action();\n } catch (NotAuthenticatedException $e) {\n $controller = $this->getController(AppConstants::CONTROLLER_UNAUTHENTICATED);\n $controller->index();\n } catch (NotAuthorizedException $e) {\n $controller = $this->getController(AppConstants::CONTROLLER_UNAUTHORIZED);\n $controller->index();\n } catch (Exception $e) {\n $controller = $this->getController(AppConstants::CONTROLLER_ERROR);\n print \"Exception: \" . $e->getMessage . \"<br/>\";\n $controller->index();\n }\n }", "title": "" }, { "docid": "f83f809d8f4e88d4f648fb1a677804ee", "score": "0.60667413", "text": "public function indexAction()\r\n {\r\n \r\n \r\n }", "title": "" }, { "docid": "3b61c7e2926ea53fbe8e19b485e9d265", "score": "0.60637665", "text": "public function action_404()\n {\n die('404 '.__('not found'));\n }", "title": "" }, { "docid": "5758d1f237c47a8d5947e6a998f91df5", "score": "0.60562253", "text": "public function doController(){\n\t\tif($this->obj_session->userPermitted('/admin/')){\n\t\t\tredirectRequest('/admin/');\n\t\t}\n\t}", "title": "" }, { "docid": "ec25f474657a4205b7f84e3b02dca124", "score": "0.60558325", "text": "public function indexAction()\n {\n return null;\n }", "title": "" }, { "docid": "258adcccda6c4fb700157a653fa0b07c", "score": "0.60447484", "text": "public function newAction() {\n echo \"new action called in IndexController!\";\n }", "title": "" }, { "docid": "3eb50e0fd2f11313596212c5ca1748a6", "score": "0.6037507", "text": "function indexAction()\n\t{\n\t\t$modules_table = new Modules('modules');\n\t\t$request = new RivetyCore_Request($this->getRequest());\n\n\t\tif ($request->has(\"id\") and $request->has(\"perform\"))\n\t\t{\n\t\t\tswitch ($request->perform)\n\t\t\t{\n\t\t\t\tcase \"enable\":\n\t\t\t\t\tif (!$modules_table->isEnabled($request->id))\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($modules_table->enable($request->id))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (!is_null($modules_table->success))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->view->success = $modules_table->success;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->view->success = \"Module \\\"\".$request->id .\"\\\" enabled.\";\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$this->view->notice = \"Module \\\"\".$request->id .\"\\\" is already enabled.\";\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"disable\":\n\t\t\t\t\tif($modules_table->isEnabled($request->id)){\n\t\t\t\t\t\t if($modules_table->disable($request->id)){\n\t\t\t\t\t\t\tif(!is_null($modules_table->success)){\n\t\t\t\t\t\t\t\t$this->view->success = $modules_table->success;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$this->view->success = \"Module \\\"\".$request->id .\"\\\" disabled.\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t }\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->view->notice = \"Module \\\"\".$request->id .\"\\\" is already disabled.\";\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"install\":\n\t\t\t\t\tif (!$modules_table->exists($request->id))\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($modules_table->install($request->id))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (!is_null($modules_table->success))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->view->success = $modules_table->success;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->view->success = \"Module \\\"\".$request->id .\"\\\" installed.\";\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$this->view->notice = \"Module \\\"\".$request->id .\"\\\" is already installed.\";\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"uninstall\":\n\t\t\t\t\tif ($modules_table->exists($request->id))\n\t\t\t\t\t{\n\t\t\t\t\t\tif($modules_table->disable($request->id))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($modules_table->uninstall($request->id))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(!is_null($modules_table->success))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$this->view->success = $modules_table->success;\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{\n\t\t\t\t\t\t\t\t\t$this->view->success = \"Module \\\"\".$request->id .\"\\\" disabled and uninstalled.\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->view->notice = \"Module \\\"\".$request->id .\"\\\" is not installed.\";\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (count($modules_table->errors) > 0)\n\t\t\t{\n\t\t\t\t$this->view->errors = $modules_table->errors;\n\t\t\t}\n\t\t\tif (!is_null($modules_table->notice))\n\t\t\t{\n\t\t\t\t$this->view->notice = $modules_table->notice;\n\t\t\t}\n\t\t}\n\t\t$basepath = Zend_Registry::get('basepath');\n\t\t$module_dir = $basepath.\"/modules\";\n\t\t$o_module_dir = dir($module_dir);\n\t\t$available_modules = array();\n\n\t\twhile (false !== ($entry = $o_module_dir->read()))\n\t\t{\n\t\t\tif (substr($entry, 0, 1) != \".\")\n\t\t\t{\n\t\t\t\tif ($entry != \"default\")\n\t\t\t\t{\n\t\t\t\t\t$full_dir = $module_dir . \"/\" . $entry;\n\t\t\t\t\tif (file_exists($full_dir . \"/module.ini\") and !$modules_table->exists($entry))\n\t\t\t\t\t{\n\t\t\t\t\t\t$tmp_module = $modules_table->parseIni($entry);\n\t\t\t\t\t\t$tmp_module['id'] = $entry;\n\t\t\t\t\t\t$tmp_module['available'] = true;\n\t\t\t\t\t\t$available_modules[] = $tmp_module;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$o_module_dir->close();\n\t\t$tmp_modules = array();\n\t\t$modules = $modules_table->fetchAll(null, \"id\");\n\t\tif (count($modules) > 0)\n\t\t{\n\t\t\t$tmp_modules = array();\n\t\t\tforeach ($modules as $module)\n\t\t\t{\n\t\t\t\t$module = $module->toArray();\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t$config = $modules_table->parseIni($module['id']);\n\t\t\t\t\tforeach ($config as $key => $val)\n\t\t\t\t\t{\n\t\t\t\t\t\t$module[$key] = $val;\n\t\t\t\t\t}\n\t\t\t\t\t$module['available'] = false;\n\t\t\t\t\t$tmp_modules[] = $module;\n\t\t\t\t}\n\t\t\t\tcatch (Exception $e)\n\t\t\t\t{\n\t\t\t\t\tRivetyCore_Log::report(\"Could not set up \" . $module, $e, Zend_Log::ERR);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->view->modules = array_merge($tmp_modules, $available_modules);\n\t\t$this->view->breadcrumbs = array('Manage Rivety Modules' => null);\n\t}", "title": "" }, { "docid": "78d2c1d4c786f4a003691dc1735a0d2c", "score": "0.60221916", "text": "public static function route() {\n //create HttpRequest object\n self::$HttpRequest = new HttpRequest();\n \n $action = self::$HttpRequest->get_arg('action');\n //route the request to the appropriate sub-controller\n switch ($action) {\n case 'init': //go to the student lookup form.\n $view = new LookupView();\n echo $view->output();\n break;\n \n case 'find-student': //user entered GCID to lookup\n $controller = new StudentController();\n $controller->do_request(self::$HttpRequest);\n break;\n \n case 'access-denied': //user cannot pass authentication\n $view = new AccessDeniedView();\n echo $view->output();\n break;\n \n default: //user has requested resource that doesn't exist.\n $view = new LookupView();\n\t\t\t\t//$view = new ResourcesNotAvailableView();\n echo $view->output();\n break;\n }\n }", "title": "" }, { "docid": "140717097833d2dccb6b40868855dbbf", "score": "0.6016434", "text": "function on404($action, $context = \"\") {\n\t\t###### -> Construct should add this module to the on404 array\n\t\treturn false;\n\t}", "title": "" }, { "docid": "140717097833d2dccb6b40868855dbbf", "score": "0.6016434", "text": "function on404($action, $context = \"\") {\n\t\t###### -> Construct should add this module to the on404 array\n\t\treturn false;\n\t}", "title": "" }, { "docid": "497d1859e6279ead7b94e16ed80d0753", "score": "0.6011746", "text": "public function indexAction() \n\t{\n\n\t}", "title": "" }, { "docid": "b9ae8a600a37c1a1cd3dec7c5f999b1f", "score": "0.6003549", "text": "public function notFoundAction()\r\n\t{\r\n\t\t$this->response->setStatusCode(404, \"Not Found\");\r\n\t}", "title": "" }, { "docid": "69d45b6de4890c6ecf0862fca750dea9", "score": "0.5993731", "text": "public function moduleUser()\n {\n $this->router->get('/user', ['uses' => 'UserController@getList', 'as' => 'simpeg.user.list']);\n $this->router->get('/user/{id}', ['uses' => 'UserController@getDetail', 'as' => 'simpeg.user.detail']);\n }", "title": "" }, { "docid": "9c48ad33a823a19f8ff66d0c0d644da2", "score": "0.59862626", "text": "function missingAction() {\r\n\t\theader($_SERVER[\"SERVER_PROTOCOL\"].\" 404 Not Found\"); \r\n\t\t$params = array();\r\n\t\t$params['request'] = new Bolts_Request($this->getRequest());\r\n\t\t$params['username'] = null;\r\n\t\tif ($this->_auth->hasIdentity()) {\r\n\t\t\t$users_table = new Users();\r\n\t\t\t$user = $users_table->fetchByUsername($this->_identity->username);\r\n\t\t\tif (!is_null($user)) {\r\n\t\t\t\t$this->view->user = $user->toArray();\r\n\t\t\t\t$params['username'] = $user->username;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$params = $this->_Bolts_plugin->doFilter($this->_mca, $params); // FILTER HOOK\r\n\t\t$this->_Bolts_plugin->doAction($this->_mca, $params); // ACTION HOOK\r\n\t\t\r\n\t\tunset($params['request'], $params['username']);\r\n\t\tforeach ($params as $key => $value) {\r\n\t\t\t$this->view->$key = $value;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "6819287cb0de673b48840c31580389c5", "score": "0.59716845", "text": "public function action_index()\n\t{\n\t\theader('HTTP/1.0 404 Not Found');\n// \t\tself::log('404 Not Found: ' . $_SERVER['REQUEST_URL']);\n\t\tfatal_lang_error('simplesef_404', false);\n\t}", "title": "" }, { "docid": "59ef33b1a791fc615f251506834d19f0", "score": "0.5963022", "text": "public function indexAction() : string\n {\n // Deal with the action and return a response.\n return \"index ffs!\";\n }", "title": "" }, { "docid": "4c6d1a1b7cd27bd5bfd878ec55060007", "score": "0.59622675", "text": "public function action() {\n\t}", "title": "" }, { "docid": "0c8f91b2d9de036873c5daf4d3a055eb", "score": "0.5961787", "text": "public function route_to(){\r\n\t\tKumbia::$routed = false;\r\n\t\t$url = get_params(func_get_args());\r\n\t\tif($url['controller']){\r\n\t\t\t$_REQUEST['controller'] = $url['controller'];\r\n\t\t\t$_REQUEST['action'] = \"index\";\r\n\t\t\tKumbia::$routed = true;\r\n\t\t}\r\n\t\tif($url['action']){\r\n\t\t\t$_REQUEST['action'] = $url['action'];\r\n\t\t\tKumbia::$routed = true;\r\n\t\t}\r\n\t\tif($url['id']){\r\n\t\t\t$_REQUEST['id'] = $url['id'];\r\n\t\t\tKumbia::$routed = true;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "title": "" }, { "docid": "36013c3b69e027fc6259e281f0f18db9", "score": "0.5958619", "text": "public function actionNotFound(MvcEvent $event)\n {\n $routeMatch = $event->getRouteMatch();\n $controller = $routeMatch->getParam('controller');\n $action = $routeMatch->getParam('action');\n if($controller && $action == 'not-found'){\n $this->setLayoutTemplate($event);\n //set the \"content\" child template to be {module_name}/404\n $this->setModule404Template($event);\n }\n }", "title": "" }, { "docid": "399e4170abf7e8db3825e7aa2ce15543", "score": "0.5944857", "text": "public function indexAction() {\n\t\t\n\t\t// also access via $this->getRequest();\n\t\t$action = $_GET['action'];\n\t\n\t\tif (!empty($action)) {\n\t\t\tif ($action != 'indexAction')\t {\n\t\t\t\tif (method_exists($this, $action)) {\t\t\t\n\t\t\t\t\t$reflection = new ReflectionMethod($this, $action);\t\t\t\t\n\t\t\t\t\tif ($reflection->isPublic()) {\n\t\t\t\t\t\t$this->{$action}();\n\t\t\t\t\t} else {\n\t \t\t\tthrow new RuntimeException($this->__('The called method is not public.'));\n\t \t\t}\n\t \t\t} else {\n\t \t\t\tthrow new RuntimeException($this->__('The called method not exist.'));\n\t \t\t}\n\t \t} else {\n\t \t\tthrow new RuntimeException($this->__('indexAction method call not allowed.'));\n\t \t}\n\t } else {\n\t \t$this->_redirectUrl(Mage::helper('core/url')->getHomeUrl());\t\n\t }\n\t}", "title": "" }, { "docid": "e5b1398d6de85dd72d495188aa8e8c86", "score": "0.59428144", "text": "public function detailsAction()\n {\n return $this->notFoundAction();\n }", "title": "" }, { "docid": "42dc7a18f51515f2d49d3497ef48c2f4", "score": "0.594227", "text": "public function index()\n\t{\n\t\tredirect('/404/');\n\t}", "title": "" }, { "docid": "9e39be848a74654484ac5587e895ed26", "score": "0.593611", "text": "public function index()\n {\n $this->return404();\n }", "title": "" }, { "docid": "aaa85f7faeb15270e10f47c71147cb6f", "score": "0.59290415", "text": "public function notFound() {\n throw new KumbiaException(NULL, 'no_controller');\n }", "title": "" } ]
d59e72d89710c1d0acf31e57b7101633
Generate Topic Icons for display
[ { "docid": "f943a2881e4695b1a25fb4e19133923d", "score": "0.6827486", "text": "function posting_gen_topic_icons($mode, $icon_id)\n{\n\tglobal $config, $_CLASS;\n\n\t$icons = obtain_icons();\n\n\t$_CLASS['core_template']->assign('S_NO_ICON_CHECKED', ((!$icon_id) ? ' checked=\"checked\"' : ''));\n\n\tif (!empty($icons))\n\t{\n\t\tforeach ($icons as $id => $data)\n\t\t{\n\t\t\tif ($data['display'])\n\t\t\t{\n\t\t\t\t$_CLASS['core_template']->assign_vars_array('topic_icon', array(\n\t\t\t\t\t'ICON_ID'\t\t=> $id,\n\t\t\t\t\t'ICON_IMG'\t\t=> $config['icons_path'] . '/' . $data['img'],\n\t\t\t\t\t'ICON_WIDTH'\t=> $data['width'],\n\t\t\t\t\t'ICON_HEIGHT' \t=> $data['height'],\n\t\n\t\t\t\t\t'S_CHECKED'\t\t=> ($id == $icon_id) ? true : false,\n\t\t\t\t\t'S_ICON_CHECKED' => ($id == $icon_id) ? ' checked=\"checked\"' : ''\n\t\t\t\t));\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\treturn false;\n}", "title": "" } ]
[ { "docid": "6dcda0c9574e65813791e9b17b36b8bc", "score": "0.61092544", "text": "function build_type_icon_tag($kind)\r\n{\r\n\treturn '<img src=\"' . get_icon_file_name ($kind) . '\" border=\"0\" hspace=\"5\" align=\"middle\" alt=\"\" />';\r\n}", "title": "" }, { "docid": "25a6e19e2ff8952607fc182738692a63", "score": "0.6103856", "text": "public function icon_demo() {\n\t\t$icons = array(\n\t\t\t'glass',\n\t\t\t'leaf',\n\t\t\t'dog',\n\t\t\t'user',\n\t\t\t'girl',\n\t\t\t'car',\n\t\t\t'user_add',\n\t\t\t'user_remove',\n\t\t\t'film',\n\t\t\t'magic',\n\t\t\t'envelope',\n\t\t\t'camera',\n\t\t\t'heart',\n\t\t\t'beach_umbrella',\n\t\t\t'train',\n\t\t\t'print',\n\t\t\t'bin',\n\t\t\t'music',\n\t\t\t'note',\n\t\t\t'heart_empty',\n\t\t\t'home',\n\t\t\t'snowflake',\n\t\t\t'fire',\n\t\t\t'magnet',\n\t\t\t'parents',\n\t\t\t'binoculars',\n\t\t\t'road',\n\t\t\t'search',\n\t\t\t'cars',\n\t\t\t'notes_2',\n\t\t\t'pencil',\n\t\t\t'bus',\n\t\t\t'wifi_alt',\n\t\t\t'luggage',\n\t\t\t'old_man',\n\t\t\t'woman',\n\t\t\t'file',\n\t\t\t'coins',\n\t\t\t'airplane',\n\t\t\t'notes',\n\t\t\t'stats',\n\t\t\t'charts',\n\t\t\t'pie_chart',\n\t\t\t'group',\n\t\t\t'keys',\n\t\t\t'calendar',\n\t\t\t'router',\n\t\t\t'camera_small',\n\t\t\t'dislikes',\n\t\t\t'star',\n\t\t\t'link',\n\t\t\t'eye_open',\n\t\t\t'eye_close',\n\t\t\t'alarm',\n\t\t\t'clock',\n\t\t\t'stopwatch',\n\t\t\t'projector',\n\t\t\t'history',\n\t\t\t'truck',\n\t\t\t'cargo',\n\t\t\t'compass',\n\t\t\t'keynote',\n\t\t\t'paperclip',\n\t\t\t'power',\n\t\t\t'lightbulb',\n\t\t\t'tag',\n\t\t\t'tags',\n\t\t\t'cleaning',\n\t\t\t'ruller',\n\t\t\t'gift',\n\t\t\t'umbrella',\n\t\t\t'book',\n\t\t\t'bookmark',\n\t\t\t'wifi',\n\t\t\t'cup',\n\t\t\t'stroller',\n\t\t\t'headphones',\n\t\t\t'headset',\n\t\t\t'warning_sign',\n\t\t\t'signal',\n\t\t\t'retweet',\n\t\t\t'refresh',\n\t\t\t'roundabout',\n\t\t\t'random',\n\t\t\t'heat',\n\t\t\t'repeat',\n\t\t\t'display',\n\t\t\t'log_book',\n\t\t\t'adress_book',\n\t\t\t'building',\n\t\t\t'eyedropper',\n\t\t\t'adjust',\n\t\t\t'tint',\n\t\t\t'crop',\n\t\t\t'vector_path_square',\n\t\t\t'vector_path_circle',\n\t\t\t'vector_path_polygon',\n\t\t\t'vector_path_line',\n\t\t\t'vector_path_curve',\n\t\t\t'vector_path_all',\n\t\t\t'font',\n\t\t\t'italic',\n\t\t\t'bold',\n\t\t\t'text_underline',\n\t\t\t'text_strike',\n\t\t\t'text_height',\n\t\t\t'text_width',\n\t\t\t'text_resize',\n\t\t\t'left_indent',\n\t\t\t'right_indent',\n\t\t\t'align_left',\n\t\t\t'align_center',\n\t\t\t'align_right',\n\t\t\t'justify',\n\t\t\t'list',\n\t\t\t'text_smaller',\n\t\t\t'text_bigger',\n\t\t\t'embed',\n\t\t\t'embed_close',\n\t\t\t'table',\n\t\t\t'message_full',\n\t\t\t'message_empty',\n\t\t\t'message_in',\n\t\t\t'message_out',\n\t\t\t'message_plus',\n\t\t\t'message_minus',\n\t\t\t'message_ban',\n\t\t\t'message_flag',\n\t\t\t'message_lock',\n\t\t\t'message_new',\n\t\t\t'inbox',\n\t\t\t'inbox_plus',\n\t\t\t'inbox_minus',\n\t\t\t'inbox_lock',\n\t\t\t'inbox_in',\n\t\t\t'inbox_out',\n\t\t\t'cogwheel',\n\t\t\t'cogwheels',\n\t\t\t'picture',\n\t\t\t'adjust_alt',\n\t\t\t'database_lock',\n\t\t\t'database_plus',\n\t\t\t'database_minus',\n\t\t\t'database_ban',\n\t\t\t'folder_open',\n\t\t\t'folder_plus',\n\t\t\t'folder_minus',\n\t\t\t'folder_lock',\n\t\t\t'folder_flag',\n\t\t\t'folder_new',\n\t\t\t'edit',\n\t\t\t'new_window',\n\t\t\t'check',\n\t\t\t'unchecked',\n\t\t\t'more_windows',\n\t\t\t'show_big_thumbnails',\n\t\t\t'show_thumbnails',\n\t\t\t'show_thumbnails_with_lines',\n\t\t\t'show_lines',\n\t\t\t'playlist',\n\t\t\t'imac',\n\t\t\t'macbook',\n\t\t\t'ipad',\n\t\t\t'iphone',\n\t\t\t'iphone_transfer',\n\t\t\t'iphone_exchange',\n\t\t\t'ipod',\n\t\t\t'ipod_shuffle',\n\t\t\t'ear_plugs',\n\t\t\t'phone',\n\t\t\t'step_backward',\n\t\t\t'fast_backward',\n\t\t\t'rewind',\n\t\t\t'play',\n\t\t\t'pause',\n\t\t\t'stop',\n\t\t\t'forward',\n\t\t\t'fast_forward',\n\t\t\t'step_forward',\n\t\t\t'eject',\n\t\t\t'facetime_video',\n\t\t\t'download_alt',\n\t\t\t'mute',\n\t\t\t'volume_down',\n\t\t\t'volume_up',\n\t\t\t'screenshot',\n\t\t\t'move',\n\t\t\t'more',\n\t\t\t'brightness_reduce',\n\t\t\t'brightness_increase',\n\t\t\t'circle_plus',\n\t\t\t'circle_minus',\n\t\t\t'circle_remove',\n\t\t\t'circle_ok',\n\t\t\t'circle_question_mark',\n\t\t\t'circle_info',\n\t\t\t'circle_exclamation_mark',\n\t\t\t'remove',\n\t\t\t'ok',\n\t\t\t'ban',\n\t\t\t'download',\n\t\t\t'upload',\n\t\t\t'shopping_cart',\n\t\t\t'lock',\n\t\t\t'unlock',\n\t\t\t'electricity',\n\t\t\t'ok_2',\n\t\t\t'remove_2',\n\t\t\t'cart_out',\n\t\t\t'cart_in',\n\t\t\t'left_arrow',\n\t\t\t'right_arrow',\n\t\t\t'down_arrow',\n\t\t\t'up_arrow',\n\t\t\t'resize_small',\n\t\t\t'resize_full',\n\t\t\t'circle_arrow_left',\n\t\t\t'circle_arrow_right',\n\t\t\t'circle_arrow_top',\n\t\t\t'circle_arrow_down',\n\t\t\t'play_button',\n\t\t\t'unshare',\n\t\t\t'share',\n\t\t\t'chevron-right',\n\t\t\t'chevron-left',\n\t\t\t'bluetooth',\n\t\t\t'euro',\n\t\t\t'usd',\n\t\t\t'gbp',\n\t\t\t'retweet_2',\n\t\t\t'moon',\n\t\t\t'sun',\n\t\t\t'cloud',\n\t\t\t'direction',\n\t\t\t'brush',\n\t\t\t'pen',\n\t\t\t'zoom_in',\n\t\t\t'zoom_out',\n\t\t\t'pin',\n\t\t\t'albums',\n\t\t\t'rotation_lock',\n\t\t\t'flash',\n\t\t\t'google_maps',\n\t\t\t'anchor',\n\t\t\t'conversation',\n\t\t\t'chat',\n\t\t\t'male',\n\t\t\t'female',\n\t\t\t'asterisk',\n\t\t\t'divide',\n\t\t\t'snorkel_diving',\n\t\t\t'scuba_diving',\n\t\t\t'oxygen_bottle',\n\t\t\t'fins',\n\t\t\t'fishes',\n\t\t\t'boat',\n\t\t\t'delete',\n\t\t\t'sheriffs_star',\n\t\t\t'qrcode',\n\t\t\t'barcode',\n\t\t\t'pool',\n\t\t\t'buoy',\n\t\t\t'spade',\n\t\t\t'bank',\n\t\t\t'vcard',\n\t\t\t'electrical_plug',\n\t\t\t'flag',\n\t\t\t'credit_card',\n\t\t\t'keyboard-wireless',\n\t\t\t'keyboard-wired',\n\t\t\t'shield',\n\t\t\t'ring',\n\t\t\t'cake',\n\t\t\t'drink',\n\t\t\t'beer',\n\t\t\t'fast_food',\n\t\t\t'cutlery',\n\t\t\t'pizza',\n\t\t\t'birthday_cake',\n\t\t\t'tablet',\n\t\t\t'settings',\n\t\t\t'bullets',\n\t\t\t'cardio',\n\t\t\t't-shirt',\n\t\t\t'pants',\n\t\t\t'sweater',\n\t\t\t'fabric',\n\t\t\t'leather',\n\t\t\t'scissors',\n\t\t\t'bomb',\n\t\t\t'skull',\n\t\t\t'celebration',\n\t\t\t'tea_kettle',\n\t\t\t'french_press',\n\t\t\t'coffe_cup',\n\t\t\t'pot',\n\t\t\t'grater',\n\t\t\t'kettle',\n\t\t\t'hospital',\n\t\t\t'hospital_h',\n\t\t\t'microphone',\n\t\t\t'webcam',\n\t\t\t'temple_christianity_church',\n\t\t\t'temple_islam',\n\t\t\t'temple_hindu',\n\t\t\t'temple_buddhist',\n\t\t\t'bicycle',\n\t\t\t'life_preserver',\n\t\t\t'share_alt',\n\t\t\t'comments',\n\t\t\t'flower',\n\t\t\t'baseball',\n\t\t\t'rugby',\n\t\t\t'ax',\n\t\t\t'table_tennis',\n\t\t\t'bowling',\n\t\t\t'tree_conifer',\n\t\t\t'tree_deciduous',\n\t\t\t'more_items',\n\t\t\t'sort',\n\t\t\t'filter',\n\t\t\t'gamepad',\n\t\t\t'playing_dices',\n\t\t\t'calculator',\n\t\t\t'tie',\n\t\t\t'wallet',\n\t\t\t'piano',\n\t\t\t'sampler',\n\t\t\t'podium',\n\t\t\t'soccer_ball',\n\t\t\t'blog',\n\t\t\t'dashboard',\n\t\t\t'certificate',\n\t\t\t'bell',\n\t\t\t'candle',\n\t\t\t'pushpin',\n\t\t\t'iphone_shake',\n\t\t\t'pin_flag',\n\t\t\t'turtle',\n\t\t\t'rabbit',\n\t\t\t'globe',\n\t\t\t'briefcase',\n\t\t\t'hdd',\n\t\t\t'thumbs_up',\n\t\t\t'thumbs_down',\n\t\t\t'hand_right',\n\t\t\t'hand_left',\n\t\t\t'hand_up',\n\t\t\t'hand_down',\n\t\t\t'fullscreen',\n\t\t\t'shopping_bag',\n\t\t\t'book_open',\n\t\t\t'nameplate',\n\t\t\t'nameplate_alt',\n\t\t\t'vases',\n\t\t\t'bullhorn',\n\t\t\t'dumbbell',\n\t\t\t'suitcase',\n\t\t\t'file_import',\n\t\t\t'file_export',\n\t\t\t'bug',\n\t\t\t'crown',\n\t\t\t'smoking',\n\t\t\t'cloud-upload',\n\t\t\t'cloud-download',\n\t\t\t'restart',\n\t\t\t'security_camera',\n\t\t\t'expand',\n\t\t\t'collapse',\n\t\t\t'collapse_top',\n\t\t\t'globe_af',\n\t\t\t'global',\n\t\t\t'spray',\n\t\t\t'nails',\n\t\t\t'claw_hammer',\n\t\t\t'classic_hammer',\n\t\t\t'hand_saw',\n\t\t\t'riflescope',\n\t\t\t'electrical_socket_eu',\n\t\t\t'electrical_socket_us',\n\t\t\t'pinterest',\n\t\t\t'dropbox',\n\t\t\t'google_plus',\n\t\t\t'jolicloud',\n\t\t\t'yahoo',\n\t\t\t'blogger',\n\t\t\t'picasa',\n\t\t\t'amazon',\n\t\t\t'tumblr',\n\t\t\t'wordpress',\n\t\t\t'instapaper',\n\t\t\t'evernote',\n\t\t\t'xing',\n\t\t\t'zootool',\n\t\t\t'dribbble',\n\t\t\t'deviantart',\n\t\t\t'read_it_later',\n\t\t\t'linked_in',\n\t\t\t'forrst',\n\t\t\t'pinboard',\n\t\t\t'behance',\n\t\t\t'github',\n\t\t\t'youtube',\n\t\t\t'skitch',\n\t\t\t'foursquare',\n\t\t\t'quora',\n\t\t\t'badoo',\n\t\t\t'spotify',\n\t\t\t'stumbleupon',\n\t\t\t'readability',\n\t\t\t'facebook',\n\t\t\t'twitter',\n\t\t\t'instagram',\n\t\t\t'posterous_spaces',\n\t\t\t'vimeo',\n\t\t\t'flickr',\n\t\t\t'last_fm',\n\t\t\t'rss',\n\t\t\t'skype',\n\t\t\t'e-mail',\n\t\t);\n\t\t?>\n\t\t<style type=\"text/css\">\n\t\t\t@font-face { font-family: 'Glyphicons'; src: url('<?php echo $this->plugin_url ?>/font/glyphicons-regular.eot'); src: url('<?php echo $this->plugin_url ?>/font/glyphicons-regular.eot?#iefix') format('embedded-opentype'), url('<?php echo $this->plugin_url ?>/font/glyphicons-regular.woff') format('woff'), url('<?php echo $this->plugin_url ?>/font/glyphicons-regular.ttf') format('truetype'), url('<?php echo $this->plugin_url ?>/font/glyphicons-regular.svg#glyphicons_halflingsregular') format('svg'); font-weight: normal; font-style: normal; }\n\t\t\t#glyphicons_icons dt:before { font-family: Glyphicons !important; -webkit-font-smoothing: antialiased; *margin-right: .3em; }\n\t\t\t<?php foreach ( $icons as $icon ) : ?>\n\t\t\t.glyphicons-icon-<?php echo $icon ?>:before { content: '<?php echo $this->get_glyphicons_icon( $icon ) ?>'; }\n\t\t\t<?php endforeach ?>\n\t\t</style>\n\t\t<h2 style=\"clear:both\">Glyphicons Library</h2>\n\t\t<div id=\"glyphicons_icons\">\n\t\t\t<?php foreach ( $icons as $icon ) : ?>\n\t\t\t\t<dl><dt class=\"glyphicons-icon-<?php echo $icon ?>\"></dt><dd><?php echo $icon ?></dd></dl>\n\t\t\t<?php endforeach ?>\n\t\t</div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "96ed84745973accbe61ff8479f8fdc46", "score": "0.6078662", "text": "function user_wttwitter_retweetIcon($content = '', $conf = array()) {\n\t\t// config\n\t\t$conf = $conf['userFunc.']; // ts config\n\t\t\n\t\t// let's go\n\t\t$string = $this->cObj->cObjGetSingle($conf['string'], $conf['string.']); // get string from ts\n\t\t$image = $this->cObj->cObjGetSingle($conf['image'], $conf['image.']); // get image from ts\n\t\t\n\t\treturn preg_replace('/RT /', $image . ' ', $string); // replace and return\n\t}", "title": "" }, { "docid": "e48006df7b8dd756c23e0feec7af8a7c", "score": "0.5993059", "text": "public function output_glyphicons() {\n\t\t$normal = $before = array();\n\t\tforeach ( $this->styles['glyphicons']['types'] as $post_type ) {\n\t\t\t$temp = \"#adminmenu #menu-posts-{$post_type} div.wp-menu-image\";\n\t\t\t$normal[] = $temp;\n\t\t\t$before[] = $temp . ':before';\n\t\t}\n\t\tprintf( $this->styles['glyphicons']['base'], implode( ',', $normal ), implode( ',', $before ) );\n\t\tforeach ( $this->styles['glyphicons']['rules'] as $rule ) {\n\t\t\techo $rule;\n\t\t}\n\t}", "title": "" }, { "docid": "82a5fe5b406d828d229d1726ecb4eec1", "score": "0.5950681", "text": "public function action_messageicons()\n\t{\n\t\tglobal $context, $board;\n\n\t\trequire_once(SUBSDIR . '/MessageIcons.subs.php');\n\n\t\t$context['icons'] = getMessageIcons($board);\n\t\t$context['sub_template'] = 'message_icons';\n\t}", "title": "" }, { "docid": "a420d9284dffd7a77b47a08e3dfc1c68", "score": "0.5948123", "text": "public function icon()\n {\n if ($this->locked && $this->pinned) {\n $image = site('forum-thread-icon-locked-pinned');\n } elseif ($this->locked) {\n $image = site('forum-thread-icon-locked');\n } elseif ($this->pinned) {\n $image = site('forum-thread-icon-pinned');\n } else {\n $image = site('forum-thread-icon');\n }\n return url($image);\n }", "title": "" }, { "docid": "84ad71122334478b1e9979018046d3d0", "score": "0.5886564", "text": "public function icon()\n\t{\n\t\tp('Declare an icon name:');\n\t\ttext('@icon paper-plane');\n\t\tp('Prefix with a color to colorize:');\n\t\ttext('@icon red paper-plane');\n\t}", "title": "" }, { "docid": "f384d030fb906609dde9e8bb66426eb5", "score": "0.58650434", "text": "function mybbpublisher_addicon(&$forum) \n{\n global $publisher;\n\n\tif(!is_object($publisher))\n\t{\n\t\tmybbpublisher_load();\n\t}\n\t\n\tif(is_object($publisher))\n\t{\n\t\tif(array_key_exists($forum['fid'], $publisher->forum_icons))\n\t\t{\n\t\t\t$forum['description'] = $publisher->forum_icons[$forum['fid']].$forum['description'];\n\t\t}\n\t}\n\t\n\treturn $forum;\n}", "title": "" }, { "docid": "1d5d0f5ca1711f17f7fb1ca6305d9796", "score": "0.57211477", "text": "function doc_feed_icon($url) {\r\n return '<a href=\"'. check_url($url) .'\" class=\"art-rss-tag-icon\" title=\"' . t('Syndicate content') . '\"></a>';\r\n}", "title": "" }, { "docid": "7cfb8b0be65729cb877754c9266d6b69", "score": "0.5695162", "text": "public function icon();", "title": "" }, { "docid": "d26547e4e9f0592ccf0ad59ca4dabd69", "score": "0.56685156", "text": "protected function iconHelp()\n {\n return '查看更多icon <a href=\"http://fontawesome.io/icons/\" target=\"_blank\">http://fontawesome.io/icons/</a>';\n }", "title": "" }, { "docid": "eeeba9405c08e56cc9b9132471012c30", "score": "0.5667791", "text": "function i3_show_pictograms(){\n \n print i3_product_pictograms_template();\n\n}", "title": "" }, { "docid": "add1f742a1bc0a01abf96f8b98eaca1f", "score": "0.5599419", "text": "public function emoticon(){\n\n $item = array_rand($this->_emoticons);\n return sprintf($this->_linkTemplate, $this->_emoticons[$item]['url'], \n $this->_emoticons[$item]['label'], \n htmlentities($this->_emoticons[$item]['emoticon']));\n }", "title": "" }, { "docid": "29ca7839e82d168b28040623af98fcd5", "score": "0.5590005", "text": "public function html()\n {\n foreach ($this->icons as $size => $href) {\n echo $this->sprintf('<link rel=\"shortcut icon\" sizes=\"%dx%d\" href=\"%s\">', $size, $size, $href);\n }\n }", "title": "" }, { "docid": "ec64cf4b2d707b8496cdb544867f3737", "score": "0.5576786", "text": "function outputIcon($documentID)\n {\n $iconString = $this->id2AssetIcon($documentID);\n if ($documentID == 7) {\n $pos = 1;\n } else {\n $pos = $documentID;\n }\n $tdString = '';\n for ($i = 1; $i <= 6; $i++) {\n $icon = ($i == $pos) ? $iconString : '&nbsp;';\n $tdString .= \"<td align=\\\"center\\\">\". $icon .\"</td>\\n\";\n }\n return $tdString;\n }", "title": "" }, { "docid": "2c73a91e63458bddc6a5112f8c2ebb60", "score": "0.5566588", "text": "function plugin_geticon_faqman() {\n global $_CONF;\n\n return $_CONF['site_url'] . '/faqman/images/faqman.gif';\n}", "title": "" }, { "docid": "760a8b3f44c30155ab934be54cf194aa", "score": "0.55561006", "text": "protected function iconHelp()\n {\n return 'For more icons please see <a href=\"http://fontawesome.io/icons/\" target=\"_blank\">http://fontawesome.io/icons/</a>';\n }", "title": "" }, { "docid": "760a8b3f44c30155ab934be54cf194aa", "score": "0.55561006", "text": "protected function iconHelp()\n {\n return 'For more icons please see <a href=\"http://fontawesome.io/icons/\" target=\"_blank\">http://fontawesome.io/icons/</a>';\n }", "title": "" }, { "docid": "0e74feb5bc10cee9d51b7a6ec754dcbd", "score": "0.55405885", "text": "function dispalySocialMediaIcons() {\n\n // Social Media Template Tag\n\n return getSocialMediaProfiles();\n\n }", "title": "" }, { "docid": "2b24c0ae2525686fa5d233468e52fc0f", "score": "0.5540198", "text": "function i3_product_pictograms_template(){\n \n\t$terms = get_the_terms( $post->ID, 'i3_product_features' ); \n\n\tif (!empty($terms)) { //Only display if there are terms\n\n\t\techo '<ul class=\"i3-pictograms\">';\n\n\t\tforeach ($terms as $term) { \n\n\t \t\t$meta = get_option('option_name');\n\t\t\tif (empty($meta)) $meta = array();\n\t\t\tif (!is_array($meta)) $meta = (array) $meta;\n\t\t\t$meta = isset($meta[$term->term_id]) ? $meta[$term->term_id] : array();\n\t\t\t$images = $meta['image-field'];\n\n\t\t\tif (empty($images)) { // if there is no image display this\n\n\t\t\t\t$img = '<li class=\"i3-pictogram\" style=\"display:none;\">'. __('No image', 'i3pp-plugin').__($term->name).' </li>';\n\n\t\t\t} else { // if there is an image, display it \n\n\t\t\t\tforeach ($images as $att) {\n\n\t\t\t\t\t$src = wp_get_attachment_image_src($att, 'i3-product-pictogram');\n\t\t\t\t\t$src = $src[0];\n\n\t\t\t\t\t// show image\n\t\t\t\t\t$img = '<li class=\"i3-pictogram '.$term->slug.'\" ><img src=\"'.$src.'\" title=\"'.__($term->name).'\"/></li>';\n\n\t\t\t\t}\n\t\t\n\t\t\t} // end if empty images \n\n\t\t\techo $img;\n\n\t\t}// end foreach term\n\n\t\techo '</ul>';\n\n\t}// if there are any terms\n \n}", "title": "" }, { "docid": "b0094052e831fbf9f4601d7a6366688e", "score": "0.5537853", "text": "function bbp_viewed_by_icon_new(){\n\treturn \"<div class='bbpresss_unread_posts_icon new'>New Posts</div>\";\n}", "title": "" }, { "docid": "81284e99c754b74653a54a764785bcdc", "score": "0.5529748", "text": "public function icon() {\n\t\t$icon = 'fa-file-o';\n\n\t\tif (strpos($this->mime_type, 'image/') !== FALSE)\n\t\t\t$icon = 'fa-file-image-o';\n\n\t\tif (strpos($this->mime_type, 'text/') !== FALSE)\n\t\t\t$icon = 'fa-file-text-o';\n\n\t\tif (strpos($this->mime_type, 'word') !== FALSE)\n\t\t\t$icon = 'fa-file-word-o';\n\n\t\tif (strpos($this->mime_type, 'sheet') !== FALSE)\n\t\t\t$icon = 'fa-file-excel-o';\n\n\t\tif (strpos($this->mime_type, 'powerpoint') !== FALSE)\n\t\t\t$icon = 'fa-file-powerpoint-o';\n\n\t\tif (strpos($this->mime_type, 'pdf') !== FALSE)\n\t\t\t$icon = 'fa-file-pdf-o';\n\n\t\tif (strpos($this->mime_type, 'zip') !== FALSE)\n\t\t\t$icon = 'fa-file-zip-o';\n\n\t\treturn $icon . ' fa-file';\n\t}", "title": "" }, { "docid": "79b51d1c72f6ee5e8b7136a1a7218072", "score": "0.55082643", "text": "function lex_custom_post_icons(){\r\n\techo \"\t<style type='text/css'>\r\n\t\t\t\t#dashboard_right_now a.lawyer-count:before,\r\n\t\t\t\t#dashboard_right_now span.lawyer-count:before {\r\n\t\t\t\t content: '\\\\f307';\r\n\t\t\t\t}\t\r\n\t\t\t\t#dashboard_right_now a.case_result-count:before,\r\n\t\t\t\t#dashboard_right_now span.case_result-count:before {\r\n\t\t\t\t content: '\\\\f118';\r\n\t\t\t\t}\r\n\t\t\t\t#dashboard_right_now a.practice_area-count:before,\r\n\t\t\t\t#dashboard_right_now span.practice_area-count:before {\r\n\t\t\t\t content: '\\\\f322';\r\n\t\t\t\t}\r\n\t\t\t\t#dashboard_right_now a.testimonial-count:before,\r\n\t\t\t\t#dashboard_right_now span.testimonial-count:before {\r\n\t\t\t\t content: '\\\\f473';\r\n\t\t\t\t}\r\n\t\t\t\t#dashboard_right_now a.faq-count:before,\r\n\t\t\t\t#dashboard_right_now span.faq-count:before {\r\n\t\t\t\t content: '\\\\f468';\r\n\t\t\t\t}\r\n </style>\";\r\n}", "title": "" }, { "docid": "d2b80311b6f8ca61ea86c69fe42ce4e2", "score": "0.55077875", "text": "function linkIcon($the_link){\n\t$link_style=\"\";\n\t$endStr=substr($the_link,(strlen($the_link)-5), strlen($the_link));\n\t\tif(strpos($endStr,'doc')){\n\n\t\t\t$link_style=\"doc-ico\";\n\n\t\t}elseif(strpos($endStr,'pdf')){\n\t\t\t\t$link_style=\"pdf-ico\";\n\t\t\t\t\n\t\t\t}elseif(strpos($endStr,'pps')){\n\t\t\t\t$link_style=\"pps-ico\";\n\n\t\t}else{\n\t\t\t$link_style=\"web-ico\";\n\t\t}\n\treturn $link_style;\n}", "title": "" }, { "docid": "70028dd50df081a7769d3809ac45b421", "score": "0.549457", "text": "public function render(\\Mittwald\\Typo3Forum\\Domain\\Model\\Forum\\Topic $topic = NULL, $width = NULL) {\n $data = $this->getDataArray($topic);\n\n if($data['new']){\n return parent::render('plugin.tx_typo3forum.renderer.icons.topic_new',$data);\n }else{\n return parent::render('plugin.tx_typo3forum.renderer.icons.topic',$data);\n }\n\n\t}", "title": "" }, { "docid": "b8cb38fe747ddd28e210642557607b3a", "score": "0.54707205", "text": "function type_icon($owner,$private,$tid,&$icon,&$label)\n\t{\n\t\tif (!$owner)\n\t\t{\n\t\t\t$icon = 'accounts';\n\t\t\t$label = lang('accounts');\n\t\t}\n\t\telseif ($private)\n\t\t{\n\t\t\t$icon = 'private';\n\t\t\t$label = lang('private');\n\t\t}\n\t\telseif ($GLOBALS['egw']->accounts->get_type($owner) == 'g')\n\t\t{\n\t\t\t$icon = 'group';\n\t\t\t$label = lang('group %1',$GLOBALS['egw']->accounts->id2name($owner));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$icon = 'personal';\n\t\t\t$label = $owner == $this->user ? lang('personal') : common::grab_owner_name($owner);\n\t\t}\n\t\t// show tid icon for tid!='n' AND only if one is defined\n\t\tif ($tid != 'n' && $this->content_types[$tid]['options']['icon'])\n\t\t{\n\t\t\t$icon = $this->content_types[$tid]['options']['icon'];\n\t\t\t$label = $this->content_types[$tid]['name'].' ('.$label.')';\n\t\t}\n\t}", "title": "" }, { "docid": "f63196a8369b51e6c071ca35b5731553", "score": "0.54619104", "text": "function icon($icon, $alt = '')\n{\n return sprintf('<img class=\"icon\" src=\"%s\" alt=\"%s\" />', site_url(\"icons/$icon.png\"), $alt);\n}", "title": "" }, { "docid": "6bc6cb10fb12ec864b9013d01ababa5d", "score": "0.54524124", "text": "protected function getTemplate()\n\t{\n\t\t$template = '<img alt=\"{.}\" class=\"emoji\" draggable=\"false\"';\n\t\tif ($this->forceImageSize)\n\t\t{\n\t\t\t$template .= ' width=\"' . $this->imageSize . '\" height=\"' . $this->imageSize . '\"';\n\t\t}\n\t\t$template .= '><xsl:attribute name=\"src\">';\n\t\t$template .= ($this->imageSet === 'emojione') ? $this->getEmojiOneSrc() : $this->getTwemojiSrc();\n\t\t$template .= '</xsl:attribute></img>';\n\n\t\treturn $template;\n\t}", "title": "" }, { "docid": "3eb078c101a7e949fbc4b4279abc15ef", "score": "0.54125404", "text": "public static function getIcon()\n {\n return 'fa fa-newspaper-o';\n }", "title": "" }, { "docid": "b1c86057994818772194f424ba7efccd", "score": "0.54050744", "text": "protected function setupIcon() {\n $this->icon = new ExIcon([], $this->pluginId, $this->pluginDefinition);\n $this->icon->setStringTranslation($this->stringTranslation);\n }", "title": "" }, { "docid": "0abffba925851c7d53e0e28fbb813d2e", "score": "0.54026407", "text": "public function topicCloud () {\n $topicListArray = $this->hpl_selectArray(\n\t\t\t\t\t self::TOPICS_TABLE.'.topicName, '.self::TOP_ORG.'.idtopic, COUNT('.self::TOP_ORG.'.idtopic)',\n\t\t\t\t\t self::TOP_ORG.' JOIN '.self::TOPICS_TABLE.' ON '.self::TOP_ORG.'.idtopic='.self::TOPICS_TABLE.'.idtopic GROUP BY '.self::TOP_ORG.'.idtopic',\n\t\t\t\t\t '',\n\t\t\t\t\t self::TOPICS_TABLE.'.topicName'\n\t\t\t\t\t );\n foreach ($topicListArray AS $topic) {\n if ($topic['COUNT('.self::TOP_ORG.'.idtopic)'] >= self::TOPIC_BENCHMARK) {\n\t$place = round(sqrt((int)$topic['COUNT('.self::TOP_ORG.'.idtopic)']));\n\t$output .= '<a href=\"'.self::TOPIC_CLOUD_PATH.'&topicid='.$topic['idtopic'].'\" class=\"topic_value_'.$place.'\">'.$topic['topicName'].'</a>&nbsp;&nbsp;';\n }\n }\n return $output;\n }", "title": "" }, { "docid": "cf2eaf8819bc4c575da94606bb3cecee", "score": "0.5351429", "text": "function print_question_icon($question, $return = false) {\n global $QTYPES, $CFG;\n\n if (array_key_exists($question->qtype, $QTYPES)) {\n $namestr = $QTYPES[$question->qtype]->menu_name();\n } else {\n $namestr = 'missingtype';\n }\n $html = '<img src=\"' . $CFG->wwwroot . '/question/type/' .\n $question->qtype . '/icon.gif\" alt=\"' .\n $namestr . '\" title=\"' . $namestr . '\" />';\n if ($return) {\n return $html;\n } else {\n echo $html;\n }\n}", "title": "" }, { "docid": "9ffcde712356c6af71460ba1c211aa6d", "score": "0.53479207", "text": "public function getIcon()\n\t{\n\t\tif ($this->icon != \"\")\n\t\t{\n\t\t\t$iconElement = config('html.icon.element');\n\t\t\t$iconClassPrefix = config('html.icon.class_prefix');\n\n\t\t\treturn '<'.$iconElement.' class=\"'.$iconClassPrefix.$this->icon.'\"></i> ';\n\t\t}\n\n\t\treturn \"\";\n\t}", "title": "" }, { "docid": "27dc72826ea875e80fa5546ea56f91d8", "score": "0.534625", "text": "function defineIcons(){\n $retVal['bkn']=\"Mostly Cloudy | Mostly Cloudy with Haze | Mostly Cloudy and Breezy\";\n $retVal['skc']=\"Fair | Clear | Fair with Haze | Clear with Haze | Fair and Breezy | Clear and Breezy\";\n $retVal['few']=\"A Few Clouds | A Few Clouds with Haze | A Few Clouds and Breezy\";\n $retVal['sct']=\"Partly Cloudy | Party Cloudy with Haze | Partly Cloudy and Breezy\";\n $retVal['ovc']=\"Overcast | Overcast with Haze | Overcast and Breezy\";\n $retVal['nfg']=\"Fog/Mist | Fog | Freezing Fog | Shallow Fog | Partial Fog | Patches of Fog | Fog in Vicinity | Freezing Fog in Vicinity | Shallow Fog in Vicinity | Partial Fog in Vicinity | Patches of Fog in Vicinity | Showers in Vicinity Fog | Light Freezing Fog | Heavy Freezing Fog\";\n $retVal['smoke']=\"Smoke\";\n $retVal['fzra']=\"Freezing Rain | Freezing Drizzle | Light Freezing Rain | Light Freezing Drizzle | Heavy Freezing Rain | Heavy Freezing Drizzle | Freezing Rain in Vicinity | Freezing Drizzle in Vicinity\";\n $retVal['ip']=\"Ice Pellets | Light Ice Pellets | Heavy Ice Pellets | Ice Pellets in Vicinity | Showers Ice Pellets | Thunderstorm Ice Pellets | Ice Crystals | Hail | Small Hail/Snow Pellets | Light Small Hail/Snow Pellets | Heavy Small Hail/Snow Pellets | Showers Hail | Hail Showers\";\n $retVal['mix']=\"Freezing Rain Snow | Light Freezing Rain Snow | Heavy Freezing Rain Snow | Freezing Drizzle Snow | Light Freezing Drizzle Snow | Heavy Freezing Drizzle Snow | Snow Freezing Rain| Light Snow Freezing Rain | Heavy Snow Freezing Rain | Snow Freezing Drizzle | Light Snow Freezing Drizzle | Heavy Snow Freezing Drizzle\";\n $retVal['raip']=\"Rain Ice Pellets | Light Rain Ice Pellets | Heavy Rain Ice Pellets | Drizzle Ice Pellets | Light Drizzle Ice Pellets | Heavy Drizzle Ice Pellets | Ice Pellets Rain | Light Ice Pellets Rain | Heavy Ice Pellets Rain | Ice Pellets Drizzle | Light Ice Pellets Drizzle | Heavy Ice Pellets Drizzle\";\n $retVal['rasn']=\"Rain Snow | Light Rain Snow | Heavy Rain Snow | Snow Rain | Light Snow Rain | Heavy Snow Rain | Drizzle Snow | Light Drizzle Snow | Heavy Drizzle Snow | Snow Drizzle | Light Snow Drizzle | Heavy Snow Drizzle\";\n $retVal['shra']=\"Rain Showers | Light Rain Showers | Heavy Rain Showers | Rain Showers in Vicinity | Light Showers Rain | Heavy Showers Rain | Showers Rain | Showers Rain in Vicinity | Rain Showers Fog/Mist | Light Rain Showers Fog/Mist | Heavy Rain Showers Fog/Mist | Rain Showers in Vicinity Fog/Mist | Light Showers Rain Fog/Mist | Heavy Showers Rain Fog/Mist | Showers Rain Fog/Mist | Showers Rain in Vicinity Fog/Mist\";\n $retVal['tsra']=\"Thunderstorm | Light Thunderstorm Rain | Heavy Thunderstorm Rain | Thunderstorm Rain Fog/Mist | Light Thunderstorm Rain Fog/Mist | Heavy Thunderstorm Rain Fog/Mist | Thunderstorm Showers in Vicinity | | Light Thunderstorm Rain Haze | Heavy Thunderstorm Rain Haze | Thunderstorm Fog | Light Thunderstorm Rain Fog | Heavy Thunderstorm Rain Fog | Thunderstorm Light Rain | Thunderstorm Heavy Rain | Thunderstorm Rain Fog/Mist | Thunderstorm Light Rain Fog/Mist | Thunderstorm Heavy Rain Fog/Mist | Thunderstorm in Vicinity Fog/Mist | Thunderstorm Showers in Vicinity | Thunderstorm in Vicinity | Thunderstorm in Vicinity Haze | Thunderstorm Haze in Vicinity | Thunderstorm Light Rain Haze | Thunderstorm Heavy Rain Haze | Thunderstorm Fog | Thunderstorm Light Rain Fog | Thunderstorm Heavy Rain Fog | Thunderstorm Hail | Light Thunderstorm Rain Hail | Heavy Thunderstorm Rain Hail | Thunderstorm Rain Hail Fog/Mist | Light Thunderstorm Rain Hail Fog/Mist | Heavy Thunderstorm Rain Hail Fog/Mist | Thunderstorm Showers in Vicinity Hail | | Light Thunderstorm Rain Hail Haze | Heavy Thunderstorm Rain Hail Haze | Thunderstorm Hail Fog | Light Thunderstorm Rain Hail Fog | Heavy Thunderstorm Rain Hail Fog | Thunderstorm Light Rain Hail | Thunderstorm Heavy Rain Hail | Thunderstorm Rain Hail Fog/Mist | Thunderstorm Light Rain Hail Fog/Mist | Thunderstorm Heavy Rain Hail Fog/Mist | Thunderstorm in Vicinity Hail Fog/Mist | Thunderstorm Showers in Vicinity Hail | Thunderstorm in Vicinity Hail | Thunderstorm in Vicinity Hail Haze | Thunderstorm Haze in Vicinity Hail | Thunderstorm Light Rain Hail Haze | Thunderstorm Heavy Rain Hail Haze | Thunderstorm Hail Fog | Thunderstorm Light Rain Hail Fog | Thunderstorm Heavy Rain Hail Fog | Thunderstorm Small Hail/Snow Pellets | Thunderstorm Rain Small Hail/Snow Pellets | Light Thunderstorm Rain Small Hail/Snow Pellets | Heavy Thunderstorm Rain Small Hail/Snow Pellets\";\n $retVal['sn']=\"Snow | Light Snow | Heavy Snow | Snow Showers | Light Snow Showers | Heavy Snow Showers | Showers Snow | Light Showers Snow | Heavy Showers Snow | Snow Fog/Mist | Light Snow Fog/Mist | Heavy Snow Fog/Mist | Snow Showers Fog/Mist | Light Snow Showers Fog/Mist | Heavy Snow Showers Fog/Mist | Showers Snow Fog/Mist | Light Showers Snow Fog/Mist | Heavy Showers Snow Fog/Mist | Snow Fog | Light Snow Fog | Heavy Snow Fog | Snow Showers Fog | Light Snow Showers Fog | Heavy Snow Showers Fog | Showers Snow Fog | Light Showers Snow Fog | Heavy Showers Snow Fog | Showers in Vicinity Snow | Snow Showers in Vicinity | Snow Showers in Vicinity Fog/Mist | Snow Showers in Vicinity Fog | Low Drifting Snow | Blowing Snow | Snow Low Drifting Snow | Snow Blowing Snow | Light Snow Low Drifting Snow | Light Snow Blowing Snow | Heavy Snow Low Drifting Snow | Heavy Snow Blowing Snow | Thunderstorm Snow | Light Thunderstorm Snow | Heavy Thunderstorm Snow | Snow Grains | Light Snow Grains | Heavy Snow Grains | Heavy Blowing Snow | Blowing Snow in Vicinity\";\n $retVal['wind']=\"Windy | Fair and Windy | A Few Clouds and Windy | Partly Cloudy and Windy | Mostly Cloudy and Windy | Overcast and Windy\";\n $retVal['hi_shwrs']=\"Showers in Vicinity | Showers in Vicinity Fog/Mist | Showers in Vicinity Fog | Showers in Vicinity Haze\";\n $retVal['fzrara']=\"Freezing Rain Rain | Light Freezing Rain Rain | Heavy Freezing Rain Rain | Rain Freezing Rain | Light Rain Freezing Rain | Heavy Rain Freezing Rain | Freezing Drizzle Rain | Light Freezing Drizzle Rain | Heavy Freezing Drizzle Rain | Rain Freezing Drizzle | Light Rain Freezing Drizzle | Heavy Rain Freezing Drizzle\";\n $retVal['hi_tsra']=\"Thunderstorm in Vicinity | Thunderstorm in Vicinity Fog/Mist | Thunderstorm in Vicinity Fog | Thunderstorm Haze in Vicinity | Thunderstorm in Vicinity Haze\";\n $retVal['ra1']=\"Light Rain | Drizzle | Light Drizzle | Heavy Drizzle | Light Rain Fog/Mist | Drizzle Fog/Mist | Light Drizzle Fog/Mist | Heavy Drizzle Fog/Mist | Light Rain Fog | Drizzle Fog | Light Drizzle Fog | Heavy Drizzle Fog\";\n $retVal['ra']=\"Rain | Heavy Rain | Rain Fog/Mist | Heavy Rain Fog/Mist | Rain Fog | Heavy Rain Fog\";\n $retVal['nsvrtsra']=\"Funnel Cloud | Funnel Cloud in Vicinity | Tornado/Water Spout\";\n $retVal['dust']=\"Dust | Low Drifting Dust | Blowing Dust | Sand | Blowing Sand | Low Drifting Sand | Dust/Sand Whirls | Dust/Sand Whirls in Vicinity | Dust Storm | Heavy Dust Storm | Dust Storm in Vicinity | Sand Storm | Heavy Sand Storm | Sand Storm in Vicinity\";\n $retVal['mist']=\"Haze\";\n return $retVal;\n }", "title": "" }, { "docid": "75d4850a4f948e9f5e57b1a7f1a9f592", "score": "0.5343212", "text": "public function getIconAttribute()\n {\n $icons = [\n 'archway',\n 'award',\n 'hotel',\n 'images',\n 'map-marked-alt',\n 'store',\n 'server',\n 'portrait',\n 'passport',\n 'moon',\n 'map',\n 'medal',\n 'bookmark',\n 'building',\n 'bus',\n 'book',\n 'camera',\n 'home',\n 'image',\n 'tags'\n ];\n return $icons[rand(0, count($icons) - 1)];\n }", "title": "" }, { "docid": "260b14af10119f8d2c12bc52d53d2065", "score": "0.5333234", "text": "function build_icon($icon)\n\t\t{\n\t\t\tglobal $avia_config;\n\n\t\t\t//special cases\n\t\t\tswitch($icon['social_icon'])\n\t\t\t{\n\t\t\t\tcase 'rss': if(empty($icon['social_icon_link'])) $icon['social_icon_link'] = get_bloginfo('rss2_url'); break;\n\t\t\t\tcase 'twitter':\n\t\t\t\tcase 'dribbble':\n\t\t\t\tcase 'vimeo':\n\t\t\t\tcase 'behance':\n\n\t\t\t\tif(strpos($icon['social_icon_link'], 'http') === false && !empty($icon['social_icon_link']))\n\t\t\t\t{\n\t\t\t\t\t$icon['social_icon_link'] = \"http://\".$icon['social_icon'].\".com/\".$icon['social_icon_link'].\"/\";\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif(empty($icon['social_icon_link'])) $icon['social_icon_link'] = \"#\";\n\t\t\t$blank = \"target='_blank'\";\n\t\t\t\n\t\t\t//dont add target blank to relative urls or urls to the same dmoain\n\t\t\tif(strpos($icon['social_icon_link'], 'http') === false || strpos($icon['social_icon_link'], home_url()) === 0) $blank = \"\";\n\t\t\t\n\t\t\t$html = \"\";\n\t\t\t$html .= \"<\".$this->args['inside'].\" class='\".$this->args['class'].\"_\".$icon['social_icon'].\" av-social-link-\".$icon['social_icon'].\" social_icon_\".$this->counter.\"'>\";\n\t\t\t$html .= \"<a {$blank} href='\".$icon['social_icon_link'].\"' \".av_icon_string($icon['social_icon']).\" title='\".ucfirst($icon['social_icon']).\"'><span class='avia_hidden_link_text'>\".ucfirst($icon['social_icon']).\"</span></a>\";\n\t\t\t$html .= \"</\".$this->args['inside'].\">\";\n\n\t\t\treturn $html;\n\t\t}", "title": "" }, { "docid": "dbd1a7a0b05f9a8275f3fbdae6aa2b5c", "score": "0.53237784", "text": "public function action_groupicons()\n\t{\n\t\tglobal $context, $settings;\n\n\t\t// Only load images\n\t\t$allowedTypes = array('jpeg', 'jpg', 'gif', 'png', 'bmp');\n\t\t$context['membergroup_icons'] = array();\n\t\t$directory = $settings['theme_dir'] . '/images/group_icons';\n\t\t$icons = array();\n\n\t\t// Get all the available member group icons\n\t\t$files = new \\FilesystemIterator($directory, \\FilesystemIterator::SKIP_DOTS);\n\t\tforeach ($files as $file)\n\t\t{\n\t\t\tif ($file->getFilename() === 'blank.png')\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (in_array(strtolower($file->getExtension()), $allowedTypes))\n\t\t\t{\n\t\t\t\t$icons[] = array(\n\t\t\t\t\t'value' => $file->getFilename(),\n\t\t\t\t\t'name' => '',\n\t\t\t\t\t'url' => $settings['images_url'] . '/group_icons/' . $file->getFilename(),\n\t\t\t\t\t'is_last' => false,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t$context['icons'] = array_values($icons);\n\t\t$context['sub_template'] = 'message_icons';\n\t}", "title": "" }, { "docid": "0b1f0bcf91d0d57ac3b9a7019c5a9a08", "score": "0.5313781", "text": "public static function makeIcon(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return '⨯';\n case self::SKIPPED:\n return '-';\n case self::DEPRECATED:\n case self::WARN:\n case self::RISKY:\n case self::NOTICE:\n return '!';\n case self::INCOMPLETE:\n return '…';\n case self::TODO:\n return '↓';\n case self::RUNS:\n return '•';\n default:\n return '✓';\n }\n }", "title": "" }, { "docid": "fa1491d0b62fc6655659ca1603ef5759", "score": "0.52899486", "text": "function reactor_do_tumblog_icons() {\n\tif ( reactor_option('tumblog_icons', false) && ( is_home() || is_archive() ) && current_theme_supports('reactor-tumblog-icons') ) {\n\t\t$output = reactor_tumblog_icon();\n\t\techo $output;\n\t}\n}", "title": "" }, { "docid": "13c41ccfc2e8f20e65db83e2c63a8ccd", "score": "0.52837205", "text": "function icon($code) {\n $icon = \"<span class=\\\"fa fa-\".$code.\"\\\"></span>\";\n return $icon;\n }", "title": "" }, { "docid": "eb52eb459728a928e3fed321f0e03390", "score": "0.5277966", "text": "public function convert_topic_emoticon($icon)\n {\n switch ($icon) {\n case 'smiley':\n return 'cns_emoticons/smile';\n case 'wink':\n return 'cns_emoticons/wink';\n case 'cheesy':\n return 'cns_emoticons/cheeky';\n case 'grin':\n return 'cns_emoticons/grin';\n case 'angry':\n return 'cns_emoticons/angry';\n case 'sad':\n return 'cns_emoticons/sad';\n case 'exclamation':\n return 'cns_emoticons/shocked';\n case 'lamp':\n return 'cns_emoticons/cool';\n case 'question':\n return 'cns_emoticons/blink';\n case 'thumbup':\n return 'cns_emoticons/thumbs';\n case 'thumbdown':\n return 'cns_emoticons/hand';\n case 'xx':\n return '';\n }\n return '';\n }", "title": "" }, { "docid": "edfdf7a8b060aef3df6a3e73a1c2ee93", "score": "0.5265338", "text": "function render_mime_image($mimetype)\n {\n // Generates HTML for the small mimetype icon\n $icon=\"\";\n if (preg_match(\"/audio/\",$mimetype)) $icon=\"imc_audio.gif\";\n if (preg_match(\"/image/\",$mimetype) OR preg_match(\"/shockwave/\",$mimetype)) $icon=\"imc_photo.gif\";\n if (preg_match(\"/video/\",$mimetype) OR preg_match(\"/smil/\",$mimetype)) $icon=\"imc_video.gif\";\n if (preg_match(\"/pdf/\",$mimetype)) $icon=\"imc_pdf.gif\";\n if (!$icon) $icon=\"imc_article.gif\";\n\n $iconstring = \"<img src=\\\"\".SF_ROOT_URL.\"/im/$icon\\\" border=\\\"0\\\" alt=\\\"\\\" />\";\n\n return $iconstring;\n }", "title": "" }, { "docid": "cc186ab5713ce9f85b4f83944b4b8a24", "score": "0.5264564", "text": "static function icon(string $cl, string $alt, bool $white=false): string {\r\n \r\n // The fixed attributes\r\n $src = self::trans();\r\n $title = $alt;\r\n $cl_general = 'mne-icon';\r\n \r\n // The dependent attributes\r\n $cl = self::white_class($cl, $white);\r\n \r\n // Throw it all together\r\n $tag = sprintf('<img src=\"%s\" alt=\"%s\" title=\"%s\" class=\"%s %s\"'\r\n . ' width=\"%s\" height=\"%s\" />', $src, $alt, $title,\r\n $cl_general, $cl, self::icon_width, self::icon_height);\r\n \r\n return $tag;\r\n }", "title": "" }, { "docid": "d514ff7ac97f4dba0fc0602f5afb31e8", "score": "0.5255236", "text": "public function __construct() {\n parent::__construct(\n 'hc2015_social_icons',\n 'HC Social Icons',\n array(\n 'description' => 'Hacking Chinese custom social media icons'\n )\n );\n }", "title": "" }, { "docid": "6d8394592612518ec1d8739bff1dadc9", "score": "0.525369", "text": "function show_simileys($message = '')\n\t{\n\t\t$path = $this->EE->config->item('emoticon_path');\n\n\t\t$title = $this->EE->lang->line('emoticon_heading');\n\n\t\t$r = $this->EE->dsp->heading($title);\n\n\t\t$r .= $message;\n\n\t\t$r .= $this->EE->dsp->table('tableBorder', '0', '', '100%').\n\t\t\t $this->EE->dsp->tr().\n\t\t\t $this->EE->dsp->table_qcell('tableHeading',\n\t\t\t\t\t\t\t\tarray( NBS,\n\t\t\t\t\t\t\t\t\t\t$this->EE->lang->line('emoticon_glyph'),\n\t\t\t\t\t\t\t\t\t\t$this->EE->lang->line('emoticon_image'),\n\t\t\t\t\t\t\t\t\t\t$this->EE->lang->line('emoticon_width'),\n\t\t\t\t\t\t\t\t\t\t$this->EE->lang->line('emoticon_height'),\n\t\t\t\t\t\t\t\t\t\t$this->EE->lang->line('emoticon_alt')\n\t\t\t\t\t\t\t\t\t )\n\t\t\t\t\t\t\t\t).\n\t\t\t $this->EE->dsp->tr_c();\n\n\t\trequire PATH_MOD.'emoticon/emoticons'.EXT;\n\n\t\t$i = 0;\n\n\t\tforeach ($smileys as $key => $val)\n\t\t{\n\t\t\t$style = ($i++ % 2) ? 'tableCellOne' : 'tableCellTwo';\n\n\t\t\t$r .= $this->EE->dsp->tr();\n\n\t\t\t$img = \"<img src=\\\"\".$path.$val['0'].\"\\\" width=\\\"\".$val['1'].\"\\\" height=\\\"\".$val['2'].\"\\\" alt=\\\"\".$val['3'].\"\\\" border=\\\"0\\\" />\";\n\n\t\t\t$r .= $this->EE->dsp->table_qcell($style, $img);\n\t\t\t$r .= $this->EE->dsp->table_qcell($style, $key);\n\t\t\t$r .= $this->EE->dsp->table_qcell($style, $val['0']);\n\t\t\t$r .= $this->EE->dsp->table_qcell($style, $val['1']);\n\t\t\t$r .= $this->EE->dsp->table_qcell($style, $val['2']);\n\t\t\t$r .= $this->EE->dsp->table_qcell($style, $val['3']);\n\n\t\t\t$r .= $this->EE->dsp->tr_c();\n\t\t}\n\n\t\t$r .= $this->EE->dsp->table_c();\n\n\t\t$this->EE->dsp->body = $r;\n\t}", "title": "" }, { "docid": "748cd9c4d0cf05cee4e88ae93e2d6b2a", "score": "0.52536285", "text": "public function displayMatType($file_type){\r\n //image if a file\r\n switch($file_type){\r\n case 'doc':\r\n echo \"<img src='../../images/word.ico'>\";\r\n break;\r\n case 'docx':\r\n echo \"<img src='../../images/word.ico'>\";\r\n break;\r\n case 'mp4':\r\n echo \"<img src='../../images/play.ico'>\";\r\n break;\r\n case 'pdf':\r\n echo \"<img src='../../images/pdf.ico'>\";\r\n break;\r\n }\r\n }", "title": "" }, { "docid": "9b3ab2ce2ecdb1f6373b63191e31b417", "score": "0.52435285", "text": "function simple_links_questions( $id ){\n\tprintf('<img src=\"%squestion.png\" id=\"%s\">', SIMPLE_LINKS_IMG_DIR, $id );\n}", "title": "" }, { "docid": "c276715fa263fceb03f95043bbf773a1", "score": "0.5232401", "text": "public function icon()\n {\n $sidebar = new MenuController();\n $user = $sidebar->maerialUserData();\n $items = $sidebar->materialMenu();\n return view('material.components.icons', compact('items', 'user'));\n }", "title": "" }, { "docid": "7e4a48340a098cd6d5a5ca934559594e", "score": "0.52254456", "text": "function get_icon($ext) {\r\n\tif(allow_video($ext)) {\r\n\t\treturn '/assets/img/file/video.png';\r\n\t} elseif (allow_audio($ext)) {\r\n\t\treturn '/assets/img/file/music.png';\r\n\t} elseif($ext == 'custom_fileext') {\r\n\t\treturn '/assets/img/file/customicon.png';\r\n\t} else {\r\n\t\treturn '/assets/img/file/docs.png';\r\n\t}\r\n}", "title": "" }, { "docid": "531c2596e90bbd56fdba6372c3cd1b5c", "score": "0.5220813", "text": "protected function getIcon($type) {\n if (!$this->enableIcon) {\n return '';\n }\n \n $class = $this->icons[$type];\n \n return CHtml::tag('i', array('class' => $class), '') . ' ';\n }", "title": "" }, { "docid": "d2176ac3fe9f62608a4dee0bd15d4d26", "score": "0.5218455", "text": "abstract public function getIcon(): string;", "title": "" }, { "docid": "7f695d5372855c4f515d476f6cd47f1a", "score": "0.5217889", "text": "public function print()\n {\n foreach ($this->icons as $size => $href) {\n printf('<link rel=\"shortcut icon\" sizes=\"%dx%d\" href=\"%s\">', $size, $size, $href);\n }\n }", "title": "" }, { "docid": "14d753bf9600bdf2abe22f1de40fd39a", "score": "0.5209544", "text": "protected function getTwemojiSrc()\n\t{\n\t\t$src = '//twemoji.maxcdn.com/';\n\t\tif ($this->imageType === 'svg')\n\t\t{\n\t\t\t$src .= 'svg';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$size = $this->getTargetSize([16, 36, 72]);\n\t\t\t$src .= $size . 'x' . $size;\n\t\t}\n\t\t$src .= '/<xsl:value-of select=\"@seq\"/>.' . $this->imageType;\n\n\t\treturn $src;\n\t}", "title": "" }, { "docid": "2e540a0ec0abbb5d7fd19e656cde8998", "score": "0.5202526", "text": "function outputSocialIcons() {\n\tglobal $ybwp_data;\n\n\t$socialicons = '';\n\n\tif( $ybwp_data['opt-text-social-twitter'] != \"\" ) {\n\t\t$socialicons .= '<li class=\"social-twitter\"><a href=\"http://www.twitter.com/'.$ybwp_data['opt-text-social-twitter'].'\" target=\"_blank\" title=\"'.__( 'Twitter', 'yb' ).'\">'.__( 'Twitter', 'yb' ).'</a></li>';\n\t}\n\tif( $ybwp_data['opt-text-social-forrst'] != \"\" ) {\n\t\t$socialicons .= '<li class=\"social-forrst\"><a href=\"'.$ybwp_data['opt-text-social-forrst'].'\" target=\"_blank\" title=\"'.__( 'Forrst', 'yb' ).'\">'.__( 'Forrst', 'yb' ).'</a></li>';\n\t}\n\tif( $ybwp_data['opt-text-social-dribbble'] != \"\" ) {\n\t\t$socialicons .= '<li class=\"social-dribbble\"><a href=\"'.$ybwp_data['opt-text-social-dribbble'].'\" target=\"_blank\" title=\"'.__( 'Dribbble', 'yb' ).'\">'.__( 'Dribbble', 'yb' ).'</a></li>';\n\t}\n\tif( $ybwp_data['opt-text-social-flickr'] != \"\" ) {\n\t\t$socialicons .= '<li class=\"social-flickr\"><a href=\"'.$ybwp_data['opt-text-social-flickr'].'\" target=\"_blank\" title=\"'.__( 'Flickr', 'yb' ).'\">'.__( 'Flickr', 'yb' ).'</a></li>';\n\t}\n\tif( $ybwp_data['opt-text-social-facebook'] != \"\" ) {\n\t\t$socialicons .= '<li class=\"social-facebook\"><a href=\"'.$ybwp_data['opt-text-social-facebook'].'\" target=\"_blank\" title=\"'.__( 'Facebook', 'yb' ).'\">'.__( 'Facebook', 'yb' ).'</a></li>';\n\t}\n\tif( $ybwp_data['opt-text-social-skype'] != \"\" ) {\n\t\t$socialicons .= '<li class=\"social-skype\"><a href=\"'.$ybwp_data['opt-text-social-skype'].'\" target=\"_blank\" title=\"'.__( 'Skype', 'yb' ).'\">'.__( 'Skype', 'yb' ).'</a></li>';\n\t}\n\tif( $ybwp_data['opt-text-social-digg'] != \"\" ) {\n\t\t$socialicons .= '<li class=\"social-digg\"><a href=\"'.$ybwp_data['opt-text-social-digg'].'\" target=\"_blank\" title=\"'.__( 'Digg', 'yb' ).'\">'.__( 'Digg', 'yb' ).'</a></li>';\n\t}\n\tif( $ybwp_data['opt-text-social-googleplus'] != \"\" ) {\n\t\t$socialicons .= '<li class=\"social-googleplus\"><a href=\"'.$ybwp_data['opt-text-social-googleplus'].'\" target=\"_blank\" title=\"'.__( 'Google+', 'yb' ).'\">'.__( 'Google+', 'yb' ).'</a></li>';\n\t}\n\tif( $ybwp_data['opt-text-social-instagram'] != \"\" ) {\n\t\t$socialicons .= '<li class=\"social-instagram\"><a href=\"'.$ybwp_data['opt-text-social-instagram'].'\" target=\"_blank\" title=\"'.__( 'Instagram', 'yb' ).'\">'.__( 'Instagram', 'yb' ).'</a></li>';\n\t}\n\tif( $ybwp_data['opt-text-social-linkedin'] != \"\" ) {\n\t\t$socialicons .= '<li class=\"social-linkedin\"><a href=\"'.$ybwp_data['opt-text-social-linkedin'].'\" target=\"_blank\" title=\"'.__( 'LinkedIn', 'yb' ).'\">'.__( 'LinkedIn', 'yb' ).'</a></li>';\n\t}\n\tif( $ybwp_data['opt-text-social-vimeo'] != \"\" ) {\n\t\t$socialicons .= '<li class=\"social-vimeo\"><a href=\"'.$ybwp_data['opt-text-social-vimeo'].'\" target=\"_blank\" title=\"'.__( 'Vimeo', 'yb' ).'\">'.__( 'Vimeo', 'yb' ).'</a></li>';\n\t}\n\tif( $ybwp_data['opt-text-social-yahoo'] != \"\" ) {\n\t\t$socialicons .= '<li class=\"social-yahoo\"><a href=\"'.$ybwp_data['opt-text-social-yahoo'].'\" target=\"_blank\" title=\"'.__( 'Yahoo', 'yb' ).'\">'.__( 'Yahoo', 'yb' ).'</a></li>';\n\t}\n\tif( $ybwp_data['opt-text-social-tumblr'] != \"\" ) {\n\t\t$socialicons .= '<li class=\"social-tumblr\"><a href=\"'.$ybwp_data['opt-text-social-tumblr'].'\" target=\"_blank\" title=\"'.__( 'Tumblr', 'yb' ).'\">'.__( 'Tumblr', 'yb' ).'</a></li>';\n\t}\n\tif( $ybwp_data['opt-text-social-youtube'] != \"\" ) {\n\t\t$socialicons .= '<li class=\"social-youtube\"><a href=\"'.$ybwp_data['opt-text-social-youtube'].'\" target=\"_blank\" title=\"'.__( 'YouTube', 'yb' ).'\">'.__( 'YouTube', 'yb' ).'</a></li>';\n\t}\n\tif( $ybwp_data['opt-text-social-deviantart'] != \"\" ) {\n\t\t$socialicons .= '<li class=\"social-deviantart\"><a href=\"'.$ybwp_data['opt-text-social-deviantart'].'\" target=\"_blank\" title=\"'.__( 'DeviantArt', 'yb' ).'\">'.__( 'DeviantArt', 'yb' ).'</a></li>';\n\t}\n\tif( $ybwp_data['opt-text-social-behance'] != \"\" ) {\n\t\t$socialicons .= '<li class=\"social-behance\"><a href=\"'.$ybwp_data['opt-text-social-behance'].'\" target=\"_blank\" title=\"'.__( 'Behance', 'yb' ).'\">'.__( 'Behance', 'yb' ).'</a></li>';\n\t}\n\tif( $ybwp_data['opt-text-social-pinterest'] != \"\" ) {\n\t\t$socialicons .= '<li class=\"social-pinterest\"><a href=\"'.$ybwp_data['opt-text-social-pinterest'].'\" target=\"_blank\" title=\"'.__( 'Pinterest', 'yb' ).'\">'.__( 'Pinterest', 'yb' ).'</a></li>';\n\t}\n\tif( $ybwp_data['opt-text-social-delicious'] != \"\" ) {\n\t\t$socialicons .= '<li class=\"social-delicious\"><a href=\"'.$ybwp_data['opt-text-social-delicious'].'\" target=\"_blank\" title=\"'.__( 'Delicious', 'yb' ).'\">'.__( 'Delicious', 'yb' ).'</a></li>';\n\t}\n\tif( $ybwp_data['opt-checkbox-social-rss'] ) {\n\t\t$socialicons .= '<li class=\"social-rss\"><a href=\"'.get_bloginfo('rss2_url').'\" target=\"_blank\" title=\"'.__( 'RSS', 'yb' ).'\">'.__( 'RSS', 'yb' ).'</a></li>';\n\t}\n\n\treturn $socialicons;\n}", "title": "" }, { "docid": "825493e9267c05f58a015ccc059764d1", "score": "0.5199252", "text": "public function getIcon(): string;", "title": "" }, { "docid": "338cec115681f3c24350ae69f3f88097", "score": "0.5196175", "text": "public function get_icon() {\n\t\treturn 'eicon-posts-group';\n\t}", "title": "" }, { "docid": "70128b34cda4d6ca64b66d120eadb97e", "score": "0.51940805", "text": "public function display_category_icons( $tag ) {\n\t\t\n\t\t$category_icons = $this->icons['pt_category_icons']['all_icons'];\n\t\t$map_icons \t\t= $this->icons['pt_map_icons']['all_icons'];\n\t\t\n\t\t// check if in edit taxonomy term page. We will generate the data below based on that.\n\t\t// Since in new term page there is no table wrapping the data which exists in the edit term page\n\t\t$edit_tag_page = ! empty( $_GET['tag_ID'] ) ? true : false;\n\n\t\t// show tag based on if map icons same as category icons\n\t\t$label = empty( $this->options['post_types_settings']['per_category_icons']['same_icons'] ) ? __( 'Category Icons','GMW_PS' ) : __( 'Category / Map Icons','GMW_PS' );\t\t\n\t\t?>\n\n\t\t<?php if ( $edit_tag_page ) { ?>\n\n\t\t\t<tr class=\"form-field term-category-icons-wrap\">\n\t\t\t\n\t\t\t\t<th><?php echo $label; ?></th>\n\t\t\t\n\t\t\t\t<td>\n\t\t\n\t\t<?php } ?>\n\t\t\n\t\t<div class=\"form-field term-category-icons-wrap\">\n\t\t\t\n\t\t\t<?php if ( ! $edit_tag_page ) { ?>\n\n\t\t\t\t<label for=\"gmw-category-icon\"><?php echo $label; ?></label>\n\t\t\t\t\n\t\t\t<?php } ?>\n\n\t\t\t<div class=\"category-icons icons\">\n\t\t\t\t<?php \n\t\t\t\t$cic = 1;\n\t\t\t\t\n\t\t\t\tforeach ( $category_icons as $category_icon ) {\n\t\t\t\t\t\n\t\t\t\t\t$checked = '';\n\t\t\t\t\t\n\t\t\t\t\t// look for checked icon only if in edit tag page \n\t\t\t\t\tif ( $cic == 1 || ( isset( $_GET['taxonomy'] ) && ! empty( $_GET['tag_ID'] ) && ! empty( $this->saved_category_icons[$tag->term_id] ) && $this->saved_category_icons[$tag->term_id] == $category_icon ) ) {\n\t\t\t\t\t\t$checked = 'checked=\"checked\"';\n\t\t\t\t\t}\n\n\t\t\t\t\techo '<label>';\n\t\t\t\t\techo '<input type=\"radio\" name=\"gmw_category_icon\" value=\"'.esc_attr( $category_icon ).'\" '.$checked.'/>';\n\t\t\t\t\techo '<img src=\"'.esc_url( $this->icons['pt_category_icons']['url'].$category_icon ).'\"/>';\n\t\t\t\t\t//echo '<span>'. esc_attr( pathinfo( $category_icon, PATHINFO_EXTENSION ) ) . '</span>';\n\t\t\t\t\techo '</label>';\n\t\t\t\t\t$cic++;\n\t\t\t\t}\t\t\t\t\t\n\t\t\t?>\n\n\t\t\t</div>\n\t\t\n\t\t</div>\n\n\t\t<?php if ( $edit_tag_page ) { ?>\n\t\t\t\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t<?php } ?>\n\n\t\t<!-- hide map icons column if using same as category icons -->\n\t\t<?php if ( empty( $this->options['post_types_settings']['per_category_icons']['same_icons'] ) ) { ?>\n\t\t\t\t\n\t\t\t\t<?php $label = __( 'Category Map Icons','gmw-premium-settings' ); ?>\n\n\t\t\t\t<?php if ( $edit_tag_page ) { ?>\n\t\t\n\t\t\t\t\t<tr class=\"form-field term-category-map-icons-wrap\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t<th><?php echo $label; ?></th>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<td>\n\n\t\t\t\t<?php } ?>\n\n\t\t\t\t<div class=\"form-field term-category-map-icons-wrap\">\n\n\t\t\t\t\t<?php if ( ! $edit_tag_page ) { ?>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<label for=\"gmw-category-icon\">\n\t\t\t\t\t\t\t<?php echo $label; ?>\n\t\t\t\t\t\t</label>\n\n\t\t\t\t\t<?php } ?>\n\n\t\t\t\t\t<div class=\"category-map-icons icons\">\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t$cic = 1;\t\n\t\t\t\t\t\tforeach ( $map_icons as $map_icon ) {\n\t\t\t\t\t\t\t$checked = '';\n\n\t\t\t\t\t\t\t// look for checked icon only if in edit tag page \n\t\t\t\t\t\t\tif ( $cic == 1 || ( isset( $_GET['taxonomy'] ) && ! empty( $_GET['tag_ID'] ) && ! empty( $this->saved_category_map_icons[$tag->term_id] ) && $this->saved_category_map_icons[$tag->term_id] == $map_icon ) ) {\n\t\t\t\t\t\t\t\t$checked = 'checked=\"checked\"';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\techo '<label>';\n\t\t\t\t\t\t\techo '<input type=\"radio\" id=\"gmw-category-icon\" name=\"gmw_category_map_icon\" value=\"'.esc_attr( $map_icon ).'\" '.$checked.'/>';\n\t\t\t\t\t\t\techo '<img src=\"'.esc_url( $this->icons['pt_map_icons']['url'].$map_icon ).'\" />';\n\t\t\t\t\t\t\t//echo '<span>'. esc_attr( pathinfo( $map_icon, PATHINFO_EXTENSION ) ) . '</span>';\n\t\t\t\t\t\t\techo '</label>';\n\t\t\t\t\t\t\t$cic++;\n\t\t\t\t\t\t}\t\t\n\t\t\t\t\t\t?>\n\t\t\t\t\t</div>\n\n\t\t\t\t</div>\n\n\t\t\t\t<?php if ( $edit_tag_page ) { ?>\n\t\t\t\n\t\t\t\t\t\t</td>\n\n\t\t\t\t\t</tr>\n\n\t\t\t\t<?php } ?>\n\n\t\t\t<?php } ?>\n\n\t\t<?php\n\t}", "title": "" }, { "docid": "b5fb2d77f372a03fee0bf3ab3c0b55b9", "score": "0.5194056", "text": "public function _admin_icons() {\n\t\t$post_type = $this->name;\n\n\t\t$small_icon = ( $this->args['small_menu_icon_url'] )\n\t\t\t? $this->args['small_menu_icon_url']\n\t\t\t: '';\n\n\t\t$large_icon = ( $this->args['large_menu_icon_url'] )\n\t\t\t? $this->args['large_menu_icon_url']\n\t\t\t: '';\n\n\t\t$font_icon = ( $this->args['icon'] ) ? $this->args['icon'] : '';\n\n\t\t$css = '';\n\n\t\t// Dashicon\n\t\tif ( $font_icon && version_compare( $GLOBALS['wp_version'], '3.8-alpha', '>' ) ) :\n\t\t\t$css .= \"#menu-posts-{$post_type} .wp-menu-image:before{content:'\\\\{$font_icon}'!important;}\";\n\n\t\t// Custom sprite\n\t\telse :\n\t\t\tif ( $small_icon ) :\n\t\t\t\t$css .= \"menu-posts-{$post_type} .wp-menu-image:before{content:''!important;}\n\t\t\t\t#menu-posts-{$post_type} .wp-menu-image{\n\t\t\t\t\tbackground:url('{$small_icon}') no-repeat 6px -17px!important;\n\t\t\t\t}\n\t\t\t\t#menu-posts-{$post_type}:hover .wp-menu-image,\n\t\t\t\t#menu-posts-{$post_type}.wp-has-current-submenu .wp-menu-image{\n\t\t\t\t\tbackground-position:6px 7px !important;\n\t\t\t\t}\";\n\t\t\tendif;\n\n\t\t\tif ( $large_icon ) :\n\t\t\t\t$css .= \".icon32-posts-{$post_type}{\n\t\t\t\t\tbackground:url('{$large_icon}') no-repeat!important;\n\t\t\t\t}\";\n\t\t\tendif;\n\t\tendif;\n\n\t\t// Don't print an empty style tag\n\t\tif ( ! $css ) return;\n\n\t\t// Remove newlines and tabs\n\t\t$output = str_replace( array( \"\\n\", \"\\t\" ), '', $css );\n\n\t\techo \"<style>{$output}</style>\\n\";\n\t}", "title": "" }, { "docid": "89aba71acf26fa02eec60bbe3b76746d", "score": "0.5193128", "text": "private function getPageIcon()\n {\n if (strlen($this->pageId) > 0)\n {\n if (strlen($this->pageId) > 1)\n if (isset(BaseConfig::$data['pageId'][$this->pageId])) {\n return BaseConfig::$data['pageId'][$this->pageId]['icon'];\n }\n return array_key_exists($this->pageId, BaseConfig::$data['pageId'][(string)$this->pageId[0]]['submenu'])\n ? BaseConfig::$data['pageId'][$this->pageId[0]]['submenu'][$this->pageId]['icon'] :'';\n\n return array_key_exists($this->pageId, BaseConfig::$data['pageId'])\n ? BaseConfig::$data['pageId'][$this->pageId]['icon'] : '';\n }\n }", "title": "" }, { "docid": "a8c427f49dfa1e1c1e95e0c642d8bb30", "score": "0.51856714", "text": "function id2AssetIcon($documentID)\n {\n $theme = $_SESSION['aPrefs']['theme'];\n switch ($documentID) {\n case 1: $iconString = '<img src=\"' . SGL_BASE_URL . '/themes/' . $theme . '/images/docIcons/word.gif\">';break;\n case 2: $iconString = '<img src=\"' . SGL_BASE_URL . '/themes/' . $theme . '/images/docIcons/excel.gif\">';break;\n case 3: $iconString = '<img src=\"' . SGL_BASE_URL . '/themes/' . $theme . '/images/docIcons/ppt.gif\">';break;\n case 4: $iconString = '<img src=\"' . SGL_BASE_URL . '/themes/' . $theme . '/images/docIcons/url.gif\">';break;\n case 5: $iconString = '<img src=\"' . SGL_BASE_URL . '/themes/' . $theme . '/images/docIcons/image.gif\">';break;\n case 6: $iconString = '<img src=\"' . SGL_BASE_URL . '/themes/' . $theme . '/images/docIcons/pdf.gif\">';break;\n case 7: $iconString = '<img src=\"' . SGL_BASE_URL . '/themes/' . $theme . '/images/docIcons/unknown.gif\">';break;\n default: $iconString = '&nbsp';\n }\n return $iconString;\n }", "title": "" }, { "docid": "6fee7c09a953a176a2ac75debb6a2bb1", "score": "0.5184076", "text": "function printSMIcons($root){\n\t\techo \"\t<div id='icons'><ul>\";\n\t\techo \"<li><a target='_blank' href='https://twitter.com/FRC2590'><img src='{$root}images/icons/twitter.png'></li></a>\";\n\t\techo \"<li><a target='_blank' href='http://frc2590.tumblr.com/'><img src='{$root}images/icons/tumblr.png'></li></a>\";\n\t\techo \"<li><a target='_blank' href='http://instagram.com/nemesis2590'><img src='{$root}images/icons/instagram.png'></li></a>\";\n\t\techo \"<li><a target='_blank' href='http://www.youtube.com/user/FRC2590'><img src='{$root}images/icons/youtube.png'></li></a>\";\n\t\techo \"<li><a target='_blank' href='https://www.facebook.com/frc2590'><img src='{$root}images/icons/facebook.png'></li></a>\";\n\t\techo \"<li><a target='_blank' href='http://www.flickr.com/photos/frc2590/sets/'><img src='{$root}images/icons/flickr.png'></li></a>\";\n\t\techo \"</ul></div>\";\n }", "title": "" }, { "docid": "dfcb0d14bd0e360b473b918fe6d9ebad", "score": "0.51814276", "text": "function theme_si_exhibition_page_title($vars){\n $object = $vars['object'];\n $models = implode(' ', $object->models);\n $classes = strtolower(preg_replace('/[^A-Za-z0-9 ]/', '-', $models) ); // Make valid css class\n $title = check_plain($object->label);\n //return \"<span class='title'>$title</span><span class='si-icon $classes'></span>\";\n return \"$title\";//<span class='si-icon $classes'></span>\";\n}", "title": "" }, { "docid": "e39a085c5103dbae18c0073eeb1966e6", "score": "0.5168746", "text": "public function get_icon() {\n\t\treturn 'eicon-image';\n\t}", "title": "" }, { "docid": "4347582c200d62e6fb73c91998d52a50", "score": "0.5168161", "text": "function pendrell_icon( $name = '', $text = '', $desc = '', $class = array() ) {\n $icon = pendrell_icons( $name );\n if ( empty( $icon ) )\n return;\n return ubik_svg_icon( $icon, $text, $desc, $class );\n}", "title": "" }, { "docid": "5b8415e3bd6939626d4eaebed0655eee", "score": "0.5161096", "text": "function getDefaultIcon();", "title": "" }, { "docid": "7a75c5ca9b6de4c2a94ff175958eb9ac", "score": "0.51475286", "text": "public function getIcon()\n {\n switch($this->type){\n case 'error':\n return 'cancel';\n case 'success':\n return 'check';\n case 'warning':\n return 'alert';\n case 'info':\n return 'info';\n }\n }", "title": "" }, { "docid": "0aa51d6fe3f6aac5a5f189fb4def5b28", "score": "0.51462555", "text": "public function icon() {\n\n\t\t?>\n\t\t<style type=\"text/css\">@font-face{font-family: 'archie';src:url('<?php echo plugins_url( '/assets/fonts/archie.eot?velzrt', OMAPI_FILE ); ?>');src:url('<?php echo plugins_url( '/assets/fonts/archie.eot?#iefixvelzrt', OMAPI_FILE ); ?>') format('embedded-opentype'),url('<?php echo plugins_url( '/assets/fonts/archie.woff?velzrt', OMAPI_FILE ); ?>') format('woff'),url('<?php echo plugins_url( '/assets/fonts/archie.ttf?velzrt', OMAPI_FILE ); ?>') format('truetype'),url('<?php echo plugins_url( '/assets/fonts/archie.svg?velzrt#archie', OMAPI_FILE ); ?>') format('svg');font-weight: normal;font-style: normal;}#toplevel_page_optin-monster-api-settings .dashicons-before,#toplevel_page_optin-monster-api-settings .dashicons-before:before,#toplevel_page_optin-monster-api-welcome .dashicons-before,#toplevel_page_optin-monster-api-welcome .dashicons-before:before{font-family: 'archie';speak: none;font-style: normal;font-weight: normal;font-variant: normal;text-transform: none;line-height: 1;-webkit-font-smoothing: antialiased;-moz-osx-font-smoothing: grayscale;}#toplevel_page_optin-monster-api-settings .dashicons-before:before,#toplevel_page_optin-monster-api-welcome .dashicons-before:before{content: \"\\e600\";font-size: 38px;margin-top: -9px;margin-left: -8px;}</style>\n\t\t<?php\n\n\t}", "title": "" }, { "docid": "1682535dfa6b1e2bc46a2ee21b931226", "score": "0.5142988", "text": "function wpo_woocomerce_icon_wishlist_add(){\n \treturn '<i class=\"fa fa-heart-o\"></i><span>'.__('Wishlist','basic').'</span>';\n}", "title": "" }, { "docid": "cbac574d7046117e09d3293a24579868", "score": "0.51423925", "text": "public function get_font_icon() {\n return '';\n }", "title": "" }, { "docid": "fdfb70609e067c9f86790c232ede697f", "score": "0.5141657", "text": "public function testIcon(): void {\n\t\t$result = $this->helper->render('foo-bar');\n\t\t$this->assertTextContains('bi bi-foo-bar', $result);\n\t}", "title": "" }, { "docid": "5556625d61097727e212544b5f40a6be", "score": "0.51371765", "text": "function get_icon_file_name ($type)\r\n{\r\n\tif ($type == 'cat')\r\n\t\treturn api_get_path(WEB_CODE_PATH) . 'img/folder_document.gif';\r\n\telseif ($type == 'evalempty')\r\n\t\treturn api_get_path(WEB_CODE_PATH) . 'img/empty.gif';\r\n\telseif ($type == 'evalnotempty')\r\n\t\treturn api_get_path(WEB_CODE_PATH) . 'img/gradebook_eval_not_empty.gif';\r\n\telseif ($type == 'link')\r\n\t\treturn api_get_path(WEB_CODE_PATH) . 'img/link.gif';\r\n\telse\r\n\t\treturn null;\r\n}", "title": "" }, { "docid": "3f9d20289aed8c22950f472667215303", "score": "0.51360035", "text": "function StringToHtmlImgLinkControl($img, $classes) {\n $imgSrc = \"/blocks/forum_as_news/images/controls-$img.png\";\n return sprintf('<img class=\"%s\" src=\"%s\" />', $classes, $imgSrc);\n}", "title": "" }, { "docid": "a4aaf022e74cd8d996d3ffe11c2f8e36", "score": "0.5135887", "text": "public function iconFunction($moctIcon)\n\t{\n\t\treturn sprintf('<span class=\"mega-octicon octicon-%s\"></span>', $moctIcon);\n\t}", "title": "" }, { "docid": "9d5df5c980d66fc2afee1af48f34f568", "score": "0.51352334", "text": "public function get_icon()\n {\n return 'fa fa-link';\n }", "title": "" }, { "docid": "9d5df5c980d66fc2afee1af48f34f568", "score": "0.51352334", "text": "public function get_icon()\n {\n return 'fa fa-link';\n }", "title": "" }, { "docid": "9d5df5c980d66fc2afee1af48f34f568", "score": "0.51352334", "text": "public function get_icon()\n {\n return 'fa fa-link';\n }", "title": "" }, { "docid": "05538c28d550765c94ca7e51ab74b386", "score": "0.51324666", "text": "function wpo_woocomerce_icon_wishlist( $value='' ){\n \treturn '<i class=\"fa fa-heart-o\"></i><span>'.__('Wishlist','basic').'</span>';\n}", "title": "" }, { "docid": "517b192456cd173e74dabea0d8358f82", "score": "0.513053", "text": "function boilerpress_social_icons() {\n if ( class_exists( 'Subscribe_And_Connect' ) ) {\n echo '<div class=\"subscribe-and-connect-connect\">';\n subscribe_and_connect_connect();\n echo '</div>';\n }\n }", "title": "" }, { "docid": "bf06e1c8d136910c6019d82633a61b78", "score": "0.5127355", "text": "function yz_get_mood_emojis_image( $emoji ) {\r\n\treturn apply_filters( 'yz_get_mood_emojis_image', YZ_PA . 'images/emojis/' . $emoji . '.png', $emoji );\r\n}", "title": "" }, { "docid": "f1a84572525b3031ce9a688c87dd6574", "score": "0.51251316", "text": "public function getIcon($prefix = false) {\n\t\t$icon = parent::get('icon'); \n\t\tif(empty($icon)) return '';\n\t\tif(strpos($icon, 'fa-') === 0) $icon = str_replace('fa-', '', $icon);\n\t\tif(strpos($icon, 'icon-') === 0) $icon = str_replace('icon-', '', $icon); \n\t\treturn $prefix ? \"fa-$icon\" : $icon;\n\t}", "title": "" }, { "docid": "f89bb99379c9f252c37425095fa08fae", "score": "0.51246136", "text": "public static function get_meta_icon() {\n $icon = \"\";\n switch (get_post_format()) {\n case \"image\":\n $icon = '<i class=\"icon-image2\"></i>';\n break;\n case \"gallery\":\n $icon = '<i class=\"icon-images2\"></i>';\n break;\n case \"video\":\n $icon = '<i class=\"icon-movie\"></i>';\n break;\n default:\n break;\n }\n return $icon;\n }", "title": "" }, { "docid": "002158f131c007eeba7a2e1137bb7f78", "score": "0.5120355", "text": "function avia_sc_icon_box_add_icons()\n\t{\n\t\t$files = avia_backend_load_scripts_by_folder( AVIA_BASE.\"images/icons/iconbox\" );\n\t\t$filestring = \"\";\n\t\tforeach($files as $file) { $filestring .= ',\"'.$file.'\"'; }\n\t\t$filestring = substr($filestring, 1);\n\t\n\t\techo \"\\n <script type='text/javascript'>\\n /* <![CDATA[ */ \\n\";\n\t\techo \"avia_framework_globals['iconbox_icons'] = [\\n \\t \".$filestring.\"\\n \\t]; \\n /* ]]> */ \\n \";\n\t\techo \"</script>\\n \\n \";\n\t}", "title": "" }, { "docid": "733601376d1b99d895248d073644b866", "score": "0.51191473", "text": "public function get_icon() {\n\t\treturn 'fa fa-image';\n\t}", "title": "" }, { "docid": "12da9d2929c494252fe9b1bfb3a67344", "score": "0.5113583", "text": "public function getAttachmentTypeIcon()\n {\n\t $extensions = [\n\t\t 'csv' => '<i class=\"fa fa-file-excel\" aria-hidden=\"true\"></i>',\n\t\t 'mp4' => '<i class=\"fa fa-file-video\" aria-hidden=\"true\"></i>',\n\t\t 'pdf' => '<i class=\"fa fa-file-pdf\" aria-hidden=\"true\"></i>',\n\t\t 'plain' => '<i class=\"fa fa-file-excel\" aria-hidden=\"true\"></i>',\n\t\t 'rar' => '<i class=\"fa fa-file-archive\" aria-hidden=\"true\"></i>',\n\t\t 'text' => '<i class=\"fa fa-file-text\" aria-hidden=\"true\"></i>',\n\t\t 'zip' => '<i class=\"fa fa-file-archive\" aria-hidden=\"true\"></i>',\n\t ];\n\n\t if(isset($extensions[$this->extension]) && $extensions[$this->extension]) {\n\t\t return $extensions[$this->extension];\n\t }\n\n $applications = [\n 'csv' => '<i class=\"fa fa-file-excel\" aria-hidden=\"true\"></i>',\n 'pdf' => '<i class=\"fa fa-file-pdf\" aria-hidden=\"true\"></i>',\n 'plain' => '<i class=\"fa fa-file-excel\" aria-hidden=\"true\"></i>',\n 'text' => '<i class=\"fa fa-file-text\" aria-hidden=\"true\"></i>',\n\t 'msword' => '<i class=\"fa fa-file-word\" aria-hidden=\"true\"></i>',\n\t 'application/x-zip-compressed' => '<i class=\"fa fa-file-archive\" aria-hidden=\"true\"></i>',\n\t 'vnd.openxmlformats-officedocument.wordprocessingml.document' => '<i class=\"fa fa-file-word\" aria-hidden=\"true\"></i>',\n\t 'vnd.openxmlformats-officedocument.wordprocessingml.template' => '<i class=\"fa fa-file-word\" aria-hidden=\"true\"></i>',\n\t 'vnd.ms-word.document.macroEnabled.12' => '<i class=\"fa fa-file-word\" aria-hidden=\"true\"></i>',\n\t 'vnd.ms-word.template.macroEnabled.12' => '<i class=\"fa fa-file-word\" aria-hidden=\"true\"></i>',\n 'vnd.ms-excel' => '<i class=\"fa fa-file-excel\" aria-hidden=\"true\"></i>',\n 'vnd.openxmlformats-officedocument.spreadsheetml.sheet' => '<i class=\"fa fa-file-excel\" aria-hidden=\"true\"></i>',\n 'vnd.openxmlformats-officedocument.spreadsheetml.template' => '<i class=\"fa fa-file-excel\" aria-hidden=\"true\"></i>',\n 'vnd.ms-excel.sheet.macroEnabled.12' => '<i class=\"fa fa-file-excel\" aria-hidden=\"true\"></i>',\n 'vnd.ms-excel.template.macroEnabled.12' => '<i class=\"fa fa-file-excel\" aria-hidden=\"true\"></i>',\n 'vnd.ms-excel.addin.macroEnabled.12' => '<i class=\"fa fa-file-excel\" aria-hidden=\"true\"></i>',\n 'vnd.ms-excel.sheet.binary.macroEnabled.12' => '<i class=\"fa fa-file-excel\" aria-hidden=\"true\"></i>',\n 'vnd.ms-powerpoint' => '<i class=\"fa fa-file-powerpoint\" aria-hidden=\"true\"></i>',\n 'vnd.openxmlformats-officedocument.presentationml.presentation' => '<i class=\"fa fa-file-powerpoint\" aria-hidden=\"true\"></i>',\n 'vnd.openxmlformats-officedocument.presentationml.template' => '<i class=\"fa fa-file-powerpoint\" aria-hidden=\"true\"></i>',\n 'vnd.openxmlformats-officedocument.presentationml.slideshow' => '<i class=\"fa fa-file-powerpoint\" aria-hidden=\"true\"></i>',\n 'vnd.ms-powerpoint.addin.macroEnabled.12' => '<i class=\"fa fa-file-powerpoint\" aria-hidden=\"true\"></i>',\n 'vnd.ms-powerpoint.presentation.macroEnabled.12' => '<i class=\"fa fa-file-powerpoint\" aria-hidden=\"true\"></i>',\n 'vnd.ms-powerpoint.template.macroEnabled.12' => '<i class=\"fa fa-file-powerpoint\" aria-hidden=\"true\"></i>',\n 'vnd.ms-powerpoint.slideshow.macroEnabled.12' => '<i class=\"fa fa-file-powerpoint\" aria-hidden=\"true\"></i>',\n ];\n\n $texts = [\n 'csv' => '<i class=\"fa fa-file-excel\" aria-hidden=\"true\"></i>',\n 'pdf' => '<i class=\"fa fa-file-pdf\" aria-hidden=\"true\"></i>',\n 'plain' => '<i class=\"fa fa-file-excel\" aria-hidden=\"true\"></i>',\n 'text' => '<i class=\"fa fa-file-text\" aria-hidden=\"true\"></i>',\n ];\n\n $types = [\n 'audio' => '<i class=\"fa fa-file-audio\" aria-hidden=\"true\"></i>',\n 'archive' => '<i class=\"fa fa-file-archive\" aria-hidden=\"true\"></i>',\n 'image' => '<i class=\"fa fa-file-image\" aria-hidden=\"true\"></i>',\n 'video' => '<i class=\"fa fa-file-video\" aria-hidden=\"true\"></i>',\n ];\n\n $mimetype = $this->getAttachmentType();\n\n foreach($types as $type => $icon)\n {\n if (isset($mimetype[0]) && $mimetype[0] === $type) {\n return $icon;\n }\n }\n\n foreach($applications as $application => $icon)\n {\n if (isset($mimetype[1]) && $mimetype[1] === $application) {\n return $icon;\n }\n }\n\n foreach($texts as $text => $icon)\n {\n if (isset($mimetype[1]) && $mimetype[1] === $text) {\n return $icon;\n }\n }\n\n return '<i class=\"fa fa-file\" aria-hidden=\"true\"></i>';\n }", "title": "" }, { "docid": "22a4758ce3ad48dc7e31b3296934e1e7", "score": "0.51060635", "text": "public function icon()\n {\n switch ($this->resource->status) {\n case 1:\n return 'icon ion-flag';\n case 2:\n return 'icon ion-alert';\n case 3:\n return 'icon ion-eye';\n case 4:\n return 'icon ion-checkmark';\n default:\n return '';\n }\n }", "title": "" }, { "docid": "6a95fc49b20e88801fc0642b9d8c11f7", "score": "0.50989145", "text": "function showTeamlistImages() {\n\t\t$content = '';\n\t\t$content .= 'ERROR: Feature not implemented.';\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "300d8bd80772486cda91936203f3dc2c", "score": "0.50978416", "text": "function bs_icon( $atts )\n\t{\n\t\textract(shortcode_atts(array(\n\t\t\t'type' => '',\n\t\t), $atts));\n\t\t\n\t\treturn '<i ' . $this->get_atts('icon icon-' . $type, $atts) . '></i>';\n\t}", "title": "" }, { "docid": "f1bdb191b54733d8c4f59dd4d7aa8e64", "score": "0.509771", "text": "public function wordTopicCloud ($path='summ') {\n if ($path=='summ'){\n $path = self::WORDTOP_PATH;\n }\n else {\n $path = self::WORDCOMP_PATH;\n }\n $topicListArray = $this->hpl_selectArray(\n\t\t\t\t\t self::TOPICS_TABLE.'.topicName, '.self::TOP_ORG.'.idtopic, COUNT('.self::TOP_ORG.'.idtopic), '.self::TOP_ORG.'.id ',\n\t\t\t\t\t self::TOP_ORG.' JOIN '.self::TOPICS_TABLE.' ON '.self::TOP_ORG.'.idtopic='.self::TOPICS_TABLE.'.idtopic GROUP BY '.self::TOP_ORG.'.idtopic',\n\t\t\t\t\t '',\n\t\t\t\t\t self::TOPICS_TABLE.'.topicName'\n\t\t\t\t\t );\n foreach ($topicListArray AS $topic) {\n if ($this->notesTest($topic['id'])){\n\t if ($topic['COUNT('.self::TOP_ORG.'.idtopic)'] >= 1) {\n\t $place = round(sqrt((int)$topic['COUNT('.self::TOP_ORG.'.idtopic)']));\n\t $output .= '<a href=\"'.$path.'&topicid='.$topic['idtopic'].'\" class=\"topic_value_'.$place.'\">'.$topic['topicName'].'</a>&nbsp;&nbsp;';\n\t }\n }\n }\n return $output;\n }", "title": "" }, { "docid": "0bdcab070b19aca72241b36b0b5f94bd", "score": "0.5093167", "text": "function dwqa_add_guide_menu_icons_styles(){\n\techo '<style type=\"text/css\">#adminmenu .menu-icon-dwqa-question div.wp-menu-image:before {content: \"\\f223\";}</style>';\n}", "title": "" }, { "docid": "b881edf631e3f5119da2e9e6c837ad8c", "score": "0.50903744", "text": "function GetDiagramImageTag () {\r\n\t\t\r\n\t\treturn \"<img src=\\\"$this->file_for_diag\\\">\";\r\n\t}", "title": "" }, { "docid": "bbc4535756b02e5e3924a87a2d00197d", "score": "0.5088178", "text": "function icon($sIcon, $sTitle = null, $sClass = null)\n{\n $args = array('icon' => $sIcon);\n if ($sTitle !== null)\n {\n $args['title'] = $sTitle;\n }\n if ($sClass !== null)\n {\n $args['classnames'] = $sClass;\n }\n\n return ob_load_template_part('templates/partials/shared/icon.php', $args);\n}", "title": "" }, { "docid": "bdf74439f907562a020689ae6c552d22", "score": "0.50867194", "text": "function gmap_geomarkericons($icons, $name, $objet, $id_objet, $type, $format, $prefix, $tag, $folder)\r\n{\r\n\t// Quel fond ?\r\n\t$fond = null;\r\n\tif ($format === \"kml\")\r\n\t{\r\n\t\tif ($tag === \"long\")\r\n\t\t\t$fond = 'modeles/icons_marker';\r\n\t\telse\r\n\t\t\t$fond = 'modeles/icons_short_marker';\r\n\t}\r\n\telse if ($format === \"json\")\r\n\t\t$fond = 'modeles/icons_json_marker';\r\n\tif (!$fond)\r\n\t\treturn '';\r\n\t\t\r\n\t$env = array('icons'=>$icons, 'name'=>$name, 'prefix'=>$prefix, 'folder'=>$folder);\r\n\treturn recuperer_fond($fond, $env);\r\n}", "title": "" }, { "docid": "6a348e9c304458c242e6173aeaaeec43", "score": "0.50867033", "text": "public function getIconAttribute()\n {\n return '<i class=\" mx-1 '.$this->icon_code.'\"/></i>';\n }", "title": "" }, { "docid": "231e2813b2259f013d48cfc64e53bda5", "score": "0.5084141", "text": "public function getArticleTableIconCallback()\n {\n $user = BackendUser::getInstance();\n\n return sprintf(\n 'system/themes/%s/images/%s',\n $user->backendTheme,\n Icons::getTableIcon('tl_article')\n );\n }", "title": "" }, { "docid": "be9317279a057a4161dfbf7677056239", "score": "0.5082766", "text": "function cmsmasters_social_icons() {\n\t$cmsms_option = cmsmasters_get_global_options();\n\t\n\t\n\techo '<div class=\"social_wrap\">' . \"\\n\" . \n\t\t'<div class=\"social_wrap_inner\">' . \"\\n\" . \n\t\t\t'<ul>' . \"\\n\";\n\t\n\t\n\tforeach ($cmsms_option[CMSMS_SHORTNAME . '_social_icons'] as $cmsms_social_icons) {\n\t\t$cmsms_social_icon = explode('|', str_replace(' ', '', $cmsms_social_icons));\n\t\t\n\t\t\n\t\techo '<li>' . \"\\n\\t\" . \n\t\t\t'<a href=\"' . esc_url($cmsms_social_icon[1]) . '\" class=\"' . esc_attr($cmsms_social_icon[0]) . '\" title=\"' . esc_attr($cmsms_social_icon[2]) . '\"' . (($cmsms_social_icon[3] == 'true') ? ' target=\"_blank\"' : '') . '></a>' . \"\\r\" . \n\t\t'</li>' . \"\\n\";\n\t}\n\t\n\t\n\techo '</ul>' . \"\\r\" . \n\t\t'</div>' . \"\\r\" . \n\t'</div>' . \"\\r\";\n}", "title": "" }, { "docid": "c71b7528d742c3b9d3aa485ee2b6e167", "score": "0.5077431", "text": "function _quickiconButton( $link, $image, $text, $path=null, $target='', $onclick='' ) {\n\t \tif( $target != '' ) {\n\t \t\t$target = 'target=\"' .$target. '\"';\n\t \t}\n\t \tif( $onclick != '' ) {\n\t \t\t$onclick = 'onclick=\"' .$onclick. '\"';\n\t \t}\n\t \tif( $path === null || $path === '' ) {\n\t \t\tglobal $option;\n\t \t\t$path = 'components/'.$option.'/assets/images/';\n\t \t}\n\t\t?>\n\t\t<div style=\"float:left;\">\n\t\t\t<div class=\"icon\">\n\t\t\t\t<a href=\"<?php echo $link; ?>\" <?php echo $target;?> <?php echo $onclick;?>>\n\t\t\t\t\t<?php echo JHTML::_('image.administrator', $image, $path, NULL, NULL, $text ); ?>\n\t\t\t\t\t<span><?php echo $text; ?></span>\n\t\t\t\t</a>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t }", "title": "" }, { "docid": "0e5191ff4ea060d17b8f95ee888145a9", "score": "0.50756747", "text": "public function getIcon();", "title": "" }, { "docid": "0e5191ff4ea060d17b8f95ee888145a9", "score": "0.50756747", "text": "public function getIcon();", "title": "" }, { "docid": "90e92f45caa39e8a95e456b72a1b87df", "score": "0.5075002", "text": "function rss_topic() {\n\t\treturn _class('forum_rss', 'modules/forum/')->_display_for_topic();\n\t}", "title": "" }, { "docid": "1e49c80631181d416dec791771a00bc4", "score": "0.50607073", "text": "public function topics()\n\t{\n\t\t$this->registry['session']->check();\n\t\t//\n\t\tif (isset($_POST['topic']))\n\t\t\t{\n\t\t\t\t$theme=new Themes;\n\t\t\t\t$theme->theme=$_POST['topic'];\n\t\t\t\t$theme->createTheme();\n\t\t\t}\n\t\t$theme=new Themes;\n\t\t$theme=$theme->readAllThemes();\n\t\t$this->registry['template']->set('theme',$theme);\n\t\t$this->registry['template']->show(\"admintopics\");\n\t\t$this->registry['template']->unsetAll();\n\t}", "title": "" } ]
d43698c41bf76258e4987144c373e2e5
Sets access rights to files which uploaded with help move_uploaded_file
[ { "docid": "0660316d942a86bb4817d40a671d6315", "score": "0.7509742", "text": "function SetRightsToUploadedFile( $file_name ){\r\n\t@chmod( $file_name, 0666);\r\n}", "title": "" } ]
[ { "docid": "941c8ea005c75b0116d31c0e77343b40", "score": "0.65700704", "text": "public function setWritePermissions()\n {\n if( is_dir(ROOT . '/app/tmp') )\n {\n $this->out('Setting permissions on ROOT/app/tmp ...');\n $this->chMod(ROOT . '/app/tmp/');\n }\n\n if( is_dir(ROOT . '/app/webroot/media') )\n {\n $this->out('Setting permissions on ROOT/app/webroot/media ...');\n $this->chMod(ROOT . '/app/webroot/media/');\n }\n }", "title": "" }, { "docid": "5607e2279bef734f0e6205fe974af408", "score": "0.64459145", "text": "private function setPermissions()\n\t{\n\t\tforeach ($this->foldersToChmod as $folder => $permissions)\n\t\t{\n\t\t\tchmod(__DIR__ . '/' . $folder, $permissions);\n\t\t}\n\n\t\t$this->success('Permissions changed ...');\n\t}", "title": "" }, { "docid": "0a10f0e6134bede3fd563a4f7d1c80fe", "score": "0.6425089", "text": "private function updateFilesAccess($files, $rights) {\r\n\t\t// no files ? bye !\r\n\t\tif(!$files)\r\n\t\t\treturn;\r\n\r\n\t\t// loop through files\r\n\t\tforeach($files as $file) {\r\n\t\t\t// get file\r\n\t\t\t$file = $this->db->files->find($file);\r\n\r\n\t\t\t// get folder\r\n\t\t\t$folder = $this->db->folders->find($file->getFolderId())->toArray();\r\n\r\n\t\t\t// you shouldn't be able to update the access rights for gallery files\r\n\t\t\tif($folder['name'] == 'gallery')\r\n\t\t\t\tcontinue;\r\n\r\n\t\t\t// delete old users\r\n\t\t\t$this->db->f_rights->delete(\"file_id = {$file->getId()}\");\r\n\r\n\t\t\t// save users\r\n\t\t\tforeach($rights[1] as $id) {\r\n\t\t\t\t$user = clone $this->db->f_rights;\r\n\t\t\t\t$user->setFileId($file->getId())\r\n\t\t\t\t\t->setUserId($id)\r\n\t\t\t\t\t->save();\r\n\t\t\t}\r\n\r\n\t\t\t// update file access\r\n\t\t\t$file->setRights($rights[0])->setDateModified(date('Y-m-d H:i:s'))->save(false);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "2c67585c2531e1153f8a88e46bd0489c", "score": "0.62946063", "text": "public function setFilesPermissionInS3($v)\r\n\t{\r\n\t\tif (!is_null($v)){\r\n\t \t$this->putInCustomData(self::CUSTOM_DATA_FILES_PERMISSION_IN_S3, $v);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "5bac7cbe7a77b98bb742eed4caed6268", "score": "0.61831445", "text": "function set_file_public_access($name, $public_access)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $this->_set_parameter($name, 'FilePublicAccess', $public_access);\n }", "title": "" }, { "docid": "eecc6e954c150afd2735b576c4731084", "score": "0.61721927", "text": "public function setPermission(File $f, $access, $enable = null, $owneronly = null)\n {\n $mode = $this->generateAccessMode($f, $enable, $owneronly);\n $this->fs->chmod($f->getAbsolutePath(), $mode);\n }", "title": "" }, { "docid": "db7cf5cbaa10015a0464c77b92f89b7d", "score": "0.61512494", "text": "protected function setApplicationPermissions()\n\t{\n\t\t$files = (array) $this->rocketeer->getOption('remote.permissions.files');\n\t\tforeach ($files as $file) {\n\t\t\t$this->setPermissions($file);\n\t\t}\n\t}", "title": "" }, { "docid": "71ecb07a192e88f513603edf5f1a9bce", "score": "0.6130635", "text": "public function protectUploadsDir() {\n\t\tif ( defined( 'UPLOADS' ) ) {\n\t\t\t$this->contentdir_path = ABSPATH . UPLOADS . '/' . '.htaccess';\n\t\t\t//should be same with protect content dirs\n\t\t\t$this->protectContentDir();\n\t\t}\n\t}", "title": "" }, { "docid": "6d26643773d4f7d25317c42a5ea47ddc", "score": "0.6072226", "text": "public function fructifyPermissions()\n {\n // These folders will be given full write permissions\n $folders =\n [\n './wp-content/uploads'\n ];\n\n // Loop through each folder\n foreach ($folders as $folder)\n {\n $this->taskFileSystemStack()\n ->mkdir($folder)\n ->chmod($folder, 0777)\n ->run();\n }\n }", "title": "" }, { "docid": "4b6a33ecce3d4438a1dbacb9ac34412f", "score": "0.6040898", "text": "private function updatePermissions()\n {\n $pathNames = $this->resolver->names();\n // These should be moved to PathResolver paths eventually.\n $pathNames[] = '%web%/extensions';\n $pathNames[] = '%web%/thumbs';\n\n $dirMode = $this->options->getDirMode();\n foreach ($pathNames as $name) {\n $path = $this->resolver->resolve($name);\n if (!$this->filesystem->exists($path)) {\n $this->filesystem->mkdir($path);\n }\n $this->filesystem->chmod($path, $dirMode);\n }\n }", "title": "" }, { "docid": "4f8ba73b91d7d828b0146a06a5603d78", "score": "0.5932366", "text": "function fileperms ($filename) {}", "title": "" }, { "docid": "e0b8d6b1261cf69a494288d8250dd756", "score": "0.581703", "text": "public static function setPermission( $file, $access=null )\n {\n\n if( $access == null )\n {\n\n $access = Settings::getSetting('filesystem_default_access');\n }\n\n chmod( self::getFilePath( $file ), $access );\n }", "title": "" }, { "docid": "04b11610da43dd55242376d069963fed", "score": "0.5776788", "text": "function uploadFiles(){\n if (isset($_FILES[\"fileToUpload\"])){\n $target_dir = './upload/' ; // should be on mod775 with linux ( serveur )\n $target_file = $target_dir . basename($_FILES[\"fileToUpload\"][\"name\"]); \n move_uploaded_file($_FILES['fileToUpload']['tmp_name'], $target_file); \n }\n}", "title": "" }, { "docid": "e6db6ecd28e9e5d9114d4ce5cb5b5a4a", "score": "0.57333803", "text": "function wpptl_add_photo_uploader_role() {\n add_role( 'wpptl_photo_uploader', 'Photo Uploader', 'upload_files' ); \n}", "title": "" }, { "docid": "80f8bc3cbfb80839585e831715dd8f3b", "score": "0.57057744", "text": "private function createHtaccessFiles()\n {\n $dir = $this->getGalleryDir();\n $this->fileHandler->createFileProtection($dir, Image::OBJECT_TYPE);\n }", "title": "" }, { "docid": "e16486a7f66a0086e5461965daf8c188", "score": "0.5670726", "text": "public static function file_system_write_access() {\n\t\tif ( ! function_exists( 'get_filesystem_method' ) ) {\n\t\t\trequire_once( ABSPATH . 'wp-admin/includes/file.php' );\n\t\t}\n\n\t\trequire_once( ABSPATH . 'wp-admin/includes/template.php' );\n\n\t\t$filesystem_method = get_filesystem_method();\n\t\tif ( 'direct' === $filesystem_method ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tob_start();\n\t\t$filesystem_credentials_are_stored = request_filesystem_credentials( self_admin_url() );\n\t\tob_end_clean();\n\t\tif ( $filesystem_credentials_are_stored ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "b62cf4265f50c2004a3e62a77c492e78", "score": "0.5633932", "text": "private function _accessHelper($folder, $rights) {\r\n\t\t// you shouldn't be able to update the access rights for gallery files\r\n\t\tif($folder['name'] == 'gallery')\r\n\t\t\treturn false;\r\n\r\n\t\t// update access to all the files from the current dir\r\n\t\tforeach($this->db->files->fetchList(\"folder_id = {$folder['id']}\") as $file)\r\n\t\t\t$this->updateFilesAccess(array($file->getId()), $rights);\r\n\t}", "title": "" }, { "docid": "b7c41e27d7ab38492f6405c7ab4f5cf5", "score": "0.5590307", "text": "function update_share_permissions()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $enforce = $this->get_enforce_group_permissions();\n\n if ($enforce == self::ENFORCE_OFF)\n return;\n\n $type = ($enforce == self::ENFORCE_FULL) ? self::TYPE_ALL : self::TYPE_FILE_SHARE;\n $shares = $this->_get_shares($type);\n\n foreach ($shares as $name => $detail)\n $this->_update_folder_attributes($detail['ShareDir'], $detail['ShareOwner'], $detail['ShareGroup'], $detail['ShareSystemPermissions']);\n }", "title": "" }, { "docid": "4e70f4ebf2f21732c05b35c20a261833", "score": "0.5578983", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow',\n\t\t\t\t'users'=>AdminModule::getAdmins(),\n\t\t\t),\n\t\t\t//this stopped uploading of images for some reason!!\n\t\t\t//array('deny', // deny all users\n\t\t\t\t//'users'=>array('*'),\n\t\t\t//),\n\t\t);\n\t}", "title": "" }, { "docid": "4b614b3b556244060f4f1f19d57f789e", "score": "0.55562407", "text": "function chmod ($filename, $mode) {}", "title": "" }, { "docid": "b2b95eddc562e706664328991c5a6cc8", "score": "0.5553893", "text": "function chmod($files, $mode, $umask = 0000, $recursive = false);", "title": "" }, { "docid": "9ccac98dd8122b95e8568560da18211b", "score": "0.5551726", "text": "public function correct_basedir_permission($basedir){\n chmod($basedir,0755);\n }", "title": "" }, { "docid": "24ba7ce1af48201bf82169472ab49498", "score": "0.5550408", "text": "function hsk_user_roles_upload_access($wp_query){\n global $current_user;\n if( is_admin() && !current_user_can('edit_others_posts') ) {\n $wp_query->set( 'author', $current_user->ID );\n add_filter('views_edit-talent', array(&$this,'hsk_user_roles_post_counts'));\n }\n }", "title": "" }, { "docid": "40cda7a979039bb67362cf2b4519b380", "score": "0.5517943", "text": "public function permissions($file, $permissions);", "title": "" }, { "docid": "c4bcf3c362de1fd00869cffc643abb27", "score": "0.5501748", "text": "protected function setUserPermissions() {\n\t\t\t\t\n\t}", "title": "" }, { "docid": "8b434a3878edae3aff20998996b4251f", "score": "0.54856646", "text": "public function adminuser_uploads()\n\t{\n\t\t$allowed = array('png', 'gif', 'jpg', 'JPEG');\n\t\t$output_dir = WWW_ROOT.\"img/useruploads/\";\n\t\tif(isset($_FILES['upl']) && $_FILES['upl']['error'] == 0)\n\t\t{\n\t\t\t$extension = pathinfo($_FILES['upl']['name'], PATHINFO_EXTENSION);\n\t\t\tif(!in_array(strtolower($extension), $allowed)){\n\t\t\t\techo '{\"status\":\"error\"}';\n\t\t\t\texit;\n\t\t\t}\n\t\t\tif(move_uploaded_file($_FILES['upl']['tmp_name'], $output_dir.$_FILES['upl']['name'])){\n\t\t\t\t$newreginfo = $this->Session->read(\"newreginfo\");\n\t\t\t\t$newreginfo['user_profile_picture'] = $_FILES['upl']['name'];\n\t\t\t\t$this->Session->write(\"newreginfo\",$newreginfo);\n\t\t\t\techo '{\"status\":\"success\"}';\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\t\techo '{\"status\":\"error\"}';\n\t\texit;\n\t}", "title": "" }, { "docid": "6f1f70445c3233ebecb00e90a39e5ce2", "score": "0.5478012", "text": "private function check_access()\n {\n }", "title": "" }, { "docid": "df46860a9ab1969c92bc5a23b83d80f2", "score": "0.54550797", "text": "function upload_acl( $acl, $data, $post_id ) {\n\t\treturn 'private';\n\t}", "title": "" }, { "docid": "212c50d7944d010fd1e9d014cff76503", "score": "0.54432493", "text": "function setWikiAttachmentPerms() {\n global $feedback;\n \n $wa = new PHPWikiAttachment($this->gid);\n $wa->initWithId($_POST['object_id']);\n if ($_POST['reset']) {\n $ret = $wa->resetPermissions();\n }\n else {\n $ret = $wa->setPermissions($_POST['ugroups']);\n }\n if(!$ret) {\n exit_error($GLOBALS['Language']->getText('global','error'),\n $GLOBALS['Language']->getText('plugin_phpwiki_actions_wikiserviceadmin', 'update_attachment_perm_err', array($feedback)));\n }\n }", "title": "" }, { "docid": "fb394e3f5c360698b6d61c51f5e86941", "score": "0.5442384", "text": "function setAllowFile($file){\n $this->allow_file = array_map('strtolower', $file);\n $this->forbid_file = array();\n }", "title": "" }, { "docid": "5f83cbceee1d4d177fbf110b1175891e", "score": "0.5418748", "text": "public function silo_permissions($path)\n\t{\n\t}", "title": "" }, { "docid": "ce9de39000466c31782f8e472bfe5004", "score": "0.5413061", "text": "protected static function executableUserRights() {\n // change user rights to grant access from web\n exec(\"chmod 755 assets/ -R\");\n self::$event->getIO()->write(\":: make assets executable for www to upload files via Silverstripe\");\n exec(\"chmod 775 \".self::$config_silverstripe_old);\n self::$event->getIO()->write(\":: make _config.php executable for www to add some lines for installer\");\n exec(\"chmod 775 \".self::$config_silverstripe);\n self::$event->getIO()->write(\":: make config.yml executable for www to add some lines for installer\");\n }", "title": "" }, { "docid": "836ae6d706ebb1a28c501895f8ed32eb", "score": "0.53926843", "text": "public function upload(){\n\n \t\t$allowedExtensions = array(\"tiff\",\"jpg\",\"jpeg\",\"gif\",\"png\");\n\t\t\n\t\t/// Just to be really sure ffmpeg is enabled - necessary to generate thumbnail jpg and webm\n\t\tif (Settings::$encode_video) {\n\t\t\tarray_push($allowedExtensions,\"flv\",\"mov\",\"mpg\",\"mp4\",\"ogv\",\"mts\",\"3gp\",\"webm\");\n\t\t}\n\n\t\t$already_set_rights = false;\n\n \t\t/// Just to be really sure... \n \t\tif( !(CurrentUser::$admin || CurrentUser::$uploader) ){\n \t\t\treturn;\n \t\t}\n\n \t\t/// Set upload path\n \t\t$path = stripslashes(File::r2a($_POST['path']));\n \t\t\n \t\t/// Create dir and update upload path if required\n \t\tif(strlen(stripslashes($_POST['newdir']))>0 && !strpos(stripslashes($_POST['newdir']),'..')){\n\n \t\t\t$path = $path.\"/\".stripslashes($_POST['newdir']);\n \t\t\tif(!file_exists($path)){\n \t\t\t\t@mkdir($path,0750,true);\n \t\t\t\t@mkdir(File::r2a(File::a2r($path),Settings::$thumbs_dir),0750,true);\n \t\t\t}\n\n \t\t\t/// Setup rights\n \t\t\tif(!isset($_POST['inherit'])){\n \t\t\t\tif(isset($_POST['public'])){\n \t\t\t\t\tJudge::edit($path);\n \t\t\t\t}else{\n \t\t\t\t\tJudge::edit($path,$_POST['users'],$_POST['groups']);\t\t\t\t\t\n \t\t\t\t}\n \t\t\t}\n \t\t\t$already_set_rights = true;\n \t\t}\n\t\tif(!isset($_FILES[\"images\"])) return;\n \t\t/// Treat uploaded files\n \t\tforeach ($_FILES[\"images\"][\"error\"] as $key => $error) {\n\n\t\t\t// Check that file is uploaded\n\t\t if ($error == UPLOAD_ERR_OK) {\n\n\t\t\t\t// Name of the stored file\n\t\t $tmp_name = $_FILES[\"images\"][\"tmp_name\"][$key];\n\t\t\n\t\t\t\t// Name on the website\n\t\t $name = $_FILES[\"images\"][\"name\"][$key];\n\t\t\t\t\n\t\t\t\t$info = pathinfo($name);\n\t\t\t\t$base_name = basename($name,'.'.$info['extension']);\n\t\t\n\t\t\t\t// Check filetype\n\t\t\t\tif(!in_array(strtolower($info['extension']),$allowedExtensions)){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Rename until this name isn't taken\n\t\t\t\t$i=1;\n\t\t\t\twhile(file_exists(\"$path/$name\")){\n\t\t\t\t\t$name=$base_name.\"-\".$i.\".\".$info['extension'];\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\n\t\t\t\t// Save the files\n\t\t if(move_uploaded_file($tmp_name, \"$path/$name\")){\n\t\t \t//\t$done .= \"Successfully uploaded $name\";\n\t\t\t\tVideo::FastEncodeVideo(\"$path/$name\");\n\t\t }\n\n\t\t /// Setup rights\n\t \t\t\tif(!$already_set_rights && !isset($_POST['inherit'])){\n \t\t\t\t\tif(isset($_POST['public'])){\n \t\t\t\t\t\tJudge::edit(\"$path/$name\");\n \t\t\t\t\t}else{\n \t\t\t\t\t\tJudge::edit(\"$path/$name\",$_POST['users'],$_POST['groups']);\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": "eeca40fce3e9b5596708f98ab47b0f1d", "score": "0.5391185", "text": "function upload()\n {\n\t\tif (!empty($_FILES)) {\n\n\t\t\t$dir \t\t= application::getVar('dir', '');\n\t\t\t$resize \t= application::getVar('resize', 0);\n $watermark \t= application::getVar('watermark', 0);\n $rename \t= application::getVar('rename', 1);\n\n if($dir != '') { \n $targetPath = FOXY_ASSETS.DS.'img'.DS.$dir.DS;\n } else {\n $targetPath = FOXY_ASSETS.DS.'img'.DS;\n }\n\n\t\t\t$ext = pathinfo($_FILES['file']['name'], PATHINFO_EXTENSION);\n\n $tempFile = $_FILES['file']['tmp_name'];\n\n if($rename == 1) {\n $filename \t= 'foxy_'.time().'_'.$_FILES['file']['name'];\n } else {\n $filename \t= $_FILES['file']['name'];\n }\n \n\t\t\tif($resize == 1) {\n\n\t\t\t\t$this->resize($watermark, $dir, $rename);\n\n\t\t\t} else {\n\n\t\t\t\t$targetFile = $targetPath. $filename;\n\t\t\t\tmove_uploaded_file($tempFile, $targetFile);\n\t\t\t}\n\n \t}\n\t}", "title": "" }, { "docid": "ca4b998d9e5cc4258202015b37f23e46", "score": "0.5386302", "text": "function chown($files, $user, $recursive = false);", "title": "" }, { "docid": "4284e2eaa7998c7059aea52138e061e7", "score": "0.5374391", "text": "public function testFoldersSetFolderPermission()\n {\n }", "title": "" }, { "docid": "2f001d90dfa95b0026c07d0dd15b0701", "score": "0.5374032", "text": "public function secure()\n {\n $release = $this->paths->release;\n $shared = $this->paths->shared;\n $this->section(\"Securing file and folder permissions...\");\n $this->exec(\" find $release -type d -exec chmod 755 {} \\;\n find $release -type f -exec chmod 644 {} \\;\n chmod 440 $release/site/config.php\n chmod 440 $shared/site/config-local.php\", true);\n $this->ok();\n }", "title": "" }, { "docid": "caf22ed532a5e094f9b8ba7bd1f0d26a", "score": "0.53704304", "text": "public function changePermissions($path, $permissions);", "title": "" }, { "docid": "3dfefc6da58dc27bcafb3f810521493f", "score": "0.5369725", "text": "public function testAclOperations()\n {\n //there is no public-read-write\n $result = $this->client->getBucketAcl($this->bucket);\n $found = false;\n foreach($result->accessControlList as $acl) {\n if(strcmp($acl->grantee[0]->id, '*') == 0) {\n $this->assertEquals($acl->permission[0], 'READ');\n $this->assertEquals($acl->permission[1], 'WRITE');\n $found = true;\n }\n }\n $this->assertFalse($found);\n //there is public-read-write\n $this->client->setBucketCannedAcl($this->bucket, CannedAcl::ACL_PUBLIC_READ_WRITE);\n $result = $this->client->getBucketAcl($this->bucket);\n $found = false;\n foreach($result->accessControlList as $acl) {\n if(strcmp($acl->grantee[0]->id, '*') == 0) {\n $this->assertEquals($acl->permission[0], 'READ');\n $this->assertEquals($acl->permission[1], 'WRITE');\n $found = true;\n }\n }\n $this->assertTrue($found);\n //upload customized acl\n $found = false;\n $myAcl = array(\n array(\n 'grantee' => array(\n array(\n 'id' => 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb',\n ),\n array(\n 'id' => 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',\n ),\n ),\n 'permission' => array('FULL_CONTROL'),\n ),\n );\n $this->client->setBucketAcl($this->bucket, $myAcl);\n $result = $this->client->getBucketAcl($this->bucket);\n foreach($result->accessControlList as $acl) {\n foreach($acl->grantee as $grantee) {\n if(strcmp($grantee->id, 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa') == 0) {\n $found = true;\n $this->assertEquals($acl->permission[0], 'FULL_CONTROL');\n }\n }\n }\n $this->assertTrue($found);\n }", "title": "" }, { "docid": "efb9ffcf76b78195b860380459c70779", "score": "0.53685665", "text": "public function write_access() { $this->request_access(self::WRITE_ACCESS); }", "title": "" }, { "docid": "bc39e4f270da6156b2e84d040c8e6e64", "score": "0.5367637", "text": "public function view_file_permissions()\n{\n\t$jinput = JFactory::getApplication()->input;\n\t$jinput->set('view', 'filesstatus');\n\t\n\tparent::display();\n}", "title": "" }, { "docid": "9c39eb98ec4730d0edb258b67171160a", "score": "0.53596056", "text": "function upload($chmod = 0644)\n\t{\n\t\tif ($this->uploadDir == '') {\n\n// 2008-04-02\n//\t\t\t$this->setErrors('Upload directory not set');\n\t\t\t$this->setErrorCodes(5);\n\n\t\t\treturn false;\n\t\t}\n\t\tif (!is_dir($this->uploadDir)) {\n\n// 2008-04-02\n//\t\t\t$this->setErrors('Failed opening directory: '.$this->uploadDir);\n\t\t\t$this->setErrorCodes(8, $this->uploadDir);\n\n\t\t\treturn false;\n\t\t}\n\t\tif (!is_writeable($this->uploadDir)) {\n\n// 2008-04-02\n//\t\t\t$this->setErrors('Failed opening directory with write permission: '.$this->uploadDir);\n\t\t\t$this->setErrorCodes(9, $this->uploadDir);\n\n\t\t\treturn false;\n\t\t}\n\t\tif (!$this->checkMimeType()) {\n\n// 2008-04-02\n//\t\t\t$this->setErrors('MIME type not allowed: '.$this->mediaType);\n\t\t\t$this->setErrorCodes(10, $this->mediaType);\n\n\t\t\treturn false;\n\t\t}\n\t\tif (!$this->checkExtension()) {\n\n// 2008-04-02\n//\t\t\t$this->setErrors('Extension not allowed');\n\t\t\t$this->setErrorCodes(6);\n\n\t\t\treturn false;\n\t\t}\n\t\tif (!$this->checkMaxFileSize()) {\n\n// 2008-04-02\n//\t\t\t$this->setErrors('File size too large: '.$this->mediaSize);\n\t\t\t$this->setErrorCodes(11, $this->mediaSize);\n\n\t\t}\n\t\tif (!$this->checkMaxWidth()) {\n\n// 2008-04-02\n//\t\t\t$this->setErrors(sprintf('File width must be smaller than %u', $this->maxWidth));\n\t\t\t$this->setErrorCodes(12, $this->maxWidth);\n\n\t\t}\n\t\tif (!$this->checkMaxHeight()) {\n\n// 2008-04-02\n//\t\t\t$this->setErrors(sprintf('File height must be smaller than %u', $this->maxHeight));\n\t\t\t$this->setErrorCodes(13, $this->maxHeight);\n\n\t\t}\n\t\tif (count($this->errors) > 0) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!$this->_copyFile($chmod)) {\n\n// 2008-04-02\n//\t\t\t$this->setErrors('Failed uploading file: '.$this->mediaName);\n\t\t\t$this->setErrorCodes(14, $this->mediaName);\n\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "2178ca15fc30189ec0d39c05f6b80044", "score": "0.5353593", "text": "protected static function resetUserRights() {\n // reset rights 644 for files\n exec(\"chmod 644 \".self::$config_silverstripe_old);\n self::$event->getIO()->write(\":: reset rights for _config.php\");\n exec(\"chmod 644 \".self::$config_silverstripe);\n self::$event->getIO()->write(\":: reset rigths config.yml\");\n }", "title": "" }, { "docid": "e2e74ba957aa34b2b9fe6177430ee6ae", "score": "0.5344526", "text": "function phpbb_chmod($filename, $perms = CHMOD_READ)\n\t{\n\t\t// Return if the file no longer exists.\n\t\tif (!file_exists($filename))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!function_exists('fileowner') || !function_exists('filegroup'))\n\t\t{\n\t\t\t$file_uid = $file_gid = false;\n\t\t\t$common_php_owner = $common_php_group = false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tglobal $phpbb_root_path, $phpEx;\n\n\t\t\t// Determine owner/group of common.php file and the filename we want to change here\n\t\t\t$common_php_owner = fileowner($phpbb_root_path . 'common.' . $phpEx);\n\t\t\t$common_php_group = filegroup($phpbb_root_path . 'common.' . $phpEx);\n\n\t\t\t$file_uid = fileowner($filename);\n\t\t\t$file_gid = filegroup($filename);\n\n\t\t\t// Try to set the owner to the same common.php has\n\t\t\tif ($common_php_owner !== $file_uid && $common_php_owner !== false && $file_uid !== false)\n\t\t\t{\n\t\t\t\t// Will most likely not work\n\t\t\t\tif (@chown($filename, $common_php_owner));\n\t\t\t\t{\n\t\t\t\t\tclearstatcache();\n\t\t\t\t\t$file_uid = fileowner($filename);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Try to set the group to the same common.php has\n\t\t\tif ($common_php_group !== $file_gid && $common_php_group !== false && $file_gid !== false)\n\t\t\t{\n\t\t\t\tif (@chgrp($filename, $common_php_group));\n\t\t\t\t{\n\t\t\t\t\tclearstatcache();\n\t\t\t\t\t$file_gid = filegroup($filename);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// And the owner and the groups PHP is running under.\n\t\t$php_uid = (function_exists('posix_getuid')) ? @posix_getuid() : false;\n\t\t$php_gids = (function_exists('posix_getgroups')) ? @posix_getgroups() : false;\n\n\t\t// Who is PHP?\n\t\tif ($file_uid === false || $file_gid === false || $php_uid === false || $php_gids === false)\n\t\t{\n\t\t\t$php = NULL;\n\t\t}\n\t\telse if ($file_uid == $php_uid /* && $common_php_owner !== false && $common_php_owner === $file_uid*/)\n\t\t{\n\t\t\t$php = 'owner';\n\t\t}\n\t\telse if (in_array($file_gid, $php_gids))\n\t\t{\n\t\t\t$php = 'group';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$php = 'other';\n\t\t}\n\n\t\t// Owner always has read/write permission\n\t\t$owner = CHMOD_READ | CHMOD_WRITE;\n\t\tif (is_dir($filename))\n\t\t{\n\t\t\t$owner |= CHMOD_EXECUTE;\n\n\t\t\t// Only add execute bit to the permission if the dir needs to be readable\n\t\t\tif ($perms & CHMOD_READ)\n\t\t\t{\n\t\t\t\t$perms |= CHMOD_EXECUTE;\n\t\t\t}\n\t\t}\n\n\t\tswitch ($php)\n\t\t{\n\t\t\tcase null:\n\t\t\tcase 'owner':\n\t\t\t\t/* ATTENTION: if php is owner or NULL we set it to group here. This is the most failsafe combination for the vast majority of server setups.\n\n\t\t\t\t$result = @chmod($filename, ($owner << 6) + (0 << 3) + (0 << 0));\n\n\t\t\t\tclearstatcache();\n\n\t\t\t\tif (!is_null($php) || (is_readable($filename) && is_writable($filename)))\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t*/\n\n\t\t\tcase 'group':\n\t\t\t\t$result = @chmod($filename, ($owner << 6) + ($perms << 3) + (0 << 0));\n\n\t\t\t\tclearstatcache();\n\n\t\t\t\tif (!is_null($php) || ((!($perms & CHMOD_READ) || is_readable($filename)) && (!($perms & CHMOD_WRITE) || is_writable($filename))))\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\tcase 'other':\n\t\t\t\t$result = @chmod($filename, ($owner << 6) + ($perms << 3) + ($perms << 0));\n\n\t\t\t\tclearstatcache();\n\n\t\t\t\tif (!is_null($php) || ((!($perms & CHMOD_READ) || is_readable($filename)) && (!($perms & CHMOD_WRITE) || is_writable($filename))))\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t\tbreak;\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "318774e2f9173557950d2d65987dcc21", "score": "0.5329513", "text": "public function setAccess($access);", "title": "" }, { "docid": "075f5cd9b80cc8470295b85002f8e335", "score": "0.53209084", "text": "protected function applyPermissions()\n {\n $this->output->write('Updating file permissions...');\n\n foreach (['local', 'site', 'statamic', 'assets'] as $folder) {\n $dir = $this->directory . '/' . $folder;\n $iterator = new \\RecursiveIteratorIterator(new \\RecursiveDirectoryIterator($dir));\n\n foreach ($iterator as $item) {\n chmod($item, 0777);\n }\n }\n\n $this->output->writeln(\" <info>[✔]</info>\");\n\n return $this;\n }", "title": "" }, { "docid": "cb8e5bc42241ea3036f04055036cb00f", "score": "0.53180975", "text": "public function uploadEdit()\n {\n var_dump($_POST);\n $idUser = (int)$_SESSION['POST']['idUser'];\n $idTemp = (int)$_SESSION['POST']['idTemp'];\n $imagesList = (string)$this->editUploadedImages();\n $this->setFieldPostEdit($idUser, $idTemp, $imagesList);\n $this->updateCurrent();\n unset($_SESSION['POST']);\n }", "title": "" }, { "docid": "940e28d44bd16cfe8cd9495ae3bcc659", "score": "0.5287725", "text": "public function accessRules()\n\t{\n\t\treturn array(\n\t\t\tarray('allow', \n\t\t\t\t'actions'=>array('upload'),\n\t\t\t\t'roles'=>array('image_upload'),\n\t\t\t),\n\t\t\tarray('allow', \n\t\t\t\t'actions'=>array('update'),\n\t\t\t\t'roles'=>array('image_update'),\n\t\t\t),\n\t\t\tarray('allow', \n\t\t\t\t'actions'=>array('updateInfo'),\n\t\t\t\t'roles'=>array('image_updateInfo'),\n\t\t\t),\n\t\t\tarray('allow', \n\t\t\t\t'actions'=>array('delete'),\n\t\t\t\t'roles'=>array('image_delete'),\n\t\t\t),\n\t\t\tarray('allow', \n\t\t\t\t'actions'=>array('create'),\n\t\t\t\t'roles'=>array('image_create'),\n\t\t\t),\n\t\t\tarray('allow', \n\t\t\t\t'actions'=>array('update'),\n\t\t\t\t'roles'=>array('image_update'),\n\t\t\t),\n\t\t\tarray('allow', \n\t\t\t\t'actions'=>array('checkbox'),\n\t\t\t\t'roles'=>array('image_checkbox'),\n\t\t\t),\n\t\t\tarray('allow', \n\t\t\t\t'actions'=>array('index'),\n\t\t\t\t'roles'=>array('image_index'),\n\t\t\t),\n\t\t\tarray('allow', \n\t\t\t\t'actions'=>array('reverseStatus'),\n\t\t\t\t'roles'=>array('image_reverseStatus'),\n\t\t\t),\n\t\t\tarray('allow', \n\t\t\t\t'actions'=>array('suggestName'),\n\t\t\t\t'roles'=>array('image_suggestName'),\n\t\t\t),\n\t\t\tarray('allow', \n\t\t\t\t'actions'=>array('edit'),\n\t\t\t\t'roles'=>array('image_edit'),\n\t\t\t),\n\t\t\tarray('deny', \n\t\t\t\t'users'=>array('*'),\n\t\t\t),\t\n\t\t);\n\t}", "title": "" }, { "docid": "5bb5bfc6bdb4923405d710f8a898cccf", "score": "0.5278594", "text": "abstract public static function setup_permissions(): void;", "title": "" }, { "docid": "17507ee2d5c174901871cd0139f32b14", "score": "0.5263593", "text": "function save_files($filename, $part){\n\n $fp=fopen($this->filestore.$filename,\"w+\");\n fwrite($fp,$part);\n fclose($fp);\n chown($this->filestore.$filename, 'apache');\n\n }", "title": "" }, { "docid": "4260cbd0eea4f08def5f1a009e4887eb", "score": "0.526135", "text": "public static function getFileAccessPermission($pageId,$moduleComponentId,$userId,$fileName);", "title": "" }, { "docid": "2e40f9edc390326bb59b3d2264b3a723", "score": "0.52596885", "text": "function index_post(){\n\t\tif (!is_dir('upload/')) {\n\t\t\tmkdir('upload/', 0777, true);\n\t\t}\n\t\t$tmp_file=$_FILES[\"file\"][\"tmp_name\"];\n\t\t$avatar=$_POST['username'].$_FILES[\"file\"][\"name\"];\n\t\tmove_uploaded_file($tmp_file,\"upload/\".$avatar);\n\t\t$this->auth->redirect(DEFAULT_CONTROLLER);\n\t}", "title": "" }, { "docid": "017b7b5fc1c2ad6ccfe61c843f58a01f", "score": "0.525399", "text": "public function update(){ \r\n Security::verifyRole(2); \r\n $url_path = 'assets'. $_FILES['link']['name'];\r\n var_dump(move_uploaded_file( $_FILES['link']['tmp_name'], $url_path));\r\n $_POST['image'] = $url_path;\r\n echo parent::update_register($_POST) ? header('location: ?controller=publi') : 'Error en la actualizacion';\r\n }", "title": "" }, { "docid": "28c8479cbf1f0fe84442c8f4900206e8", "score": "0.524702", "text": "function uploadAssignmentFiles($a_files)\n\t{\n\t\tinclude_once(\"./Modules/Exercise/classes/class.ilFSStorageExercise.php\");\n\t\t$storage = new ilFSStorageExercise($this->getExerciseId(), $this->getId());\n\t\t$storage->create();\n\t\t$storage->uploadAssignmentFiles($a_files);\n\t}", "title": "" }, { "docid": "0dc9e756a2ba53696bbdfb8053ddd579", "score": "0.5243976", "text": "public function add_capabilities(){\n $open_star = get_role('open_star');\n $close_star = get_role('close_star');\n\n $roles_to_edit = array($open_star,$close_star);\n foreach($roles_to_edit as $role){\n $role->add_cap('upload_files');\n }\n }", "title": "" }, { "docid": "9fe5d99e654d1a543a5492add88c9f4c", "score": "0.52420974", "text": "private static function setPerms(string $filename, bool $isFlag, int $perm): bool\n {\n $stat = @\\stat($filename);\n\n if ($stat === false) {\n return false;\n }\n\n // We're on Windows\n if (Sys::isWin()) {\n return true;\n }\n\n [$myuid, $mygid] = [\\posix_geteuid(), \\posix_getgid()];\n\n $isMyUid = $stat['uid'] === $myuid;\n $isMyGid = $stat['gid'] === $mygid;\n\n if ($isFlag) {\n // Set only the user writable bit (file is owned by us)\n if ($isMyUid) {\n return \\chmod($filename, \\fileperms($filename) | \\intval('0' . $perm . '00', 8));\n }\n\n // Set only the group writable bit (file group is the same as us)\n if ($isMyGid) {\n return \\chmod($filename, \\fileperms($filename) | \\intval('0' . $perm . $perm . '0', 8));\n }\n\n // Set the world writable bit (file isn't owned or grouped by us)\n return \\chmod($filename, \\fileperms($filename) | \\intval('0' . $perm . $perm . $perm, 8));\n }\n\n // Set only the user writable bit (file is owned by us)\n if ($isMyUid) {\n $add = \\intval(\"0{$perm}{$perm}{$perm}\", 8);\n\n return self::chmod($filename, $perm, $add);\n }\n\n // Set only the group writable bit (file group is the same as us)\n if ($isMyGid) {\n $add = \\intval(\"00{$perm}{$perm}\", 8);\n\n return self::chmod($filename, $perm, $add);\n }\n\n // Set the world writable bit (file isn't owned or grouped by us)\n $add = \\intval(\"000{$perm}\", 8);\n\n return self::chmod($filename, $perm, $add);\n }", "title": "" }, { "docid": "7fbe53b15894f865a5f1d20532fa525e", "score": "0.5232302", "text": "protected function uploadAvatar()\n {\n if(! $this->file ) return;\n $name = $this->makeFileName();\n $this->user['avatar'] = '/' . $this->baseDir . $name;\n $this->file->move($this->baseDir, $name);\n $this->fitAvatar($this->user['avatar']);\n }", "title": "" }, { "docid": "e7fbe45645ed8f188ae02d2839fb3a0b", "score": "0.52322227", "text": "public function setPermissions($path, $filemode = '0644', $foldermode = '0755')\n\t{\n\t\treturn false;\n\t}", "title": "" }, { "docid": "06b0dfbf3df5cee2ab0bfab7d8cf7427", "score": "0.5226083", "text": "public function setUploadedFile($uploadedFile);", "title": "" }, { "docid": "a3fe74ccea0220fa1da6b443bc1342ca", "score": "0.5215536", "text": "public function setAdminFile($filename, $sourcePath, $fromUpload = true)\n\t{\n\t\t$file = $this->createFile($filename, $sourcePath, $fromUpload);\n\t\t$this->admin_file_id = $file->getId();\n\t\t$this->_adminFile = $file;\n\t}", "title": "" }, { "docid": "1a0fd1404ccf9a5a70acbc1da73f71c2", "score": "0.52147317", "text": "public function accessRules()\r\n {\r\n return array(\r\n array('allow',\r\n 'actions' => array('settings', 'disable', 'enable', 'uploadFile', 'viewFile', 'deleteProduct', 'updateProduct'),\r\n 'users' => array('@'),\r\n 'roles' => array('administrator')\r\n ),\r\n array('deny', // deny all users\r\n 'users' => array('*'),\r\n ),\r\n );\r\n }", "title": "" }, { "docid": "0501b63f71452c8bd79bb2dd5a0c07dc", "score": "0.521246", "text": "function set_file_permission($name, $permission)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $this->_set_parameter($name, 'FilePermission', $permission);\n }", "title": "" }, { "docid": "3ae984856eb838fe42fc8551dfd97235", "score": "0.52117914", "text": "private static function _isAllowed($allows){\n\t\treturn in_array(self::$files['type'], $allows);\n\t}", "title": "" }, { "docid": "ff7976889a594098a1c6b2065791823d", "score": "0.5209791", "text": "function upload( )\n\t{\n\t\tglobal $security, $errors, $Cl_root_path, $db, $basic_lang, $userdata;\n\t\t\n\t\t// first check if the user can do this\n\t\tif ( !( $userdata[ 'user_level' ] >= ADMIN ) )\n\t\t{\n\t\t\t$errors->report_error( sprintf( $basic_lang[ 'Need_login' ], $security->append_sid( '?' . MODE_URL . '=login' ) ), GENERAL_ERROR );\n\t\t}\n\t\t\n\t\t// check if the form was submitted correctly\n\t\tif ( !isset( $_POST[ 'uploadmod' ] ) )\n\t\t{// not\n\t\t\t$errors->report_error( $this->lang[ 'add_errform' ], CRITICAL_ERROR );\n\t\t}\n\t\t\n\t\t// first we check the files to see if there are enough and whatnot\n\t\t$files = array( 'files', 'filemap', 'config', 'sql' ); // will simplify stuff\n\t\t$uploadedfiles = 0; // init counter\n\t\tforeach ( $files as $f )\n\t\t{\n\t\t\tif ( isset( $_FILES[ $f ] ) && $_FILES[ $f ][ 'error' ] != 4 && !empty( $_FILES[ $f ] ) )\n\t\t\t{ // file uploaded\n\t\t\t\t// now check if something was wrong\n\t\t\t\tif ( $_FILES[ $f ][ 'error' ] != 0 )\n\t\t\t\t{ // wrongness\n\t\t\t\t\tswitch ( $_FILES[ $f ][ 'error' ] )\n\t\t\t\t\t{\n\t\t\t\t\t\tcase 1: $errors->report_error( sprintf( $this->lang[ 'add_errsize1' ], $f ), GENERAL_ERROR ); break; // size in php.ini\n\t\t\t\t\t\tcase 2: $errors->report_error( sprintf( $this->lang[ 'add_errsize2' ], $f ), GENERAL_ERROR ); break; // size in HTML\n\t\t\t\t\t\tcase 3: $errors->report_error( sprintf( $this->lang[ 'add_errpart' ], $f ), GENERAL_ERROR ); break; // partial upload\n\t\t\t\t\t\tcase 6: $errors->report_error( $this->lang[ 'add_errtmp' ], GENERAL_ERROR ); break; // no temp (php4.3.10 & 5.0.3)\n\t\t\t\t\t\tcase 7: $errors->report_error( sprintf( $this->lang[ 'add_errwrt' ], $f ), GENERAL_ERROR ); break; // no write (php 5.1.0)\n\t\t\t\t\t}\n\t\t\t\t}else\n\t\t\t\t{ // we're coolish\n\t\t\t\t\tif ( is_uploaded_file( $_FILES[ $f ][ 'tmp_name' ] ) )\n\t\t\t\t\t{ // yep everything's fine except perhaps...\n\t\t\t\t\t\t// check the mime of the file\n\t\t\t\t\t\tswitch ( $f )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase 'files':\n\t\t\t\t\t\t\t\tif ( $_FILES[ $f ][ 'type' ] != 'application/zip' )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$errors->report_error( sprintf( $this->lang[ 'add_errmime' ], $f, $_FILES[ $f ][ 'type' ], 'application/x-zip' ), GENERAL_ERROR );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'map':\n\t\t\t\t\t\t\tcase 'config':\n\t\t\t\t\t\t\t\tif ( $_FILES[ $f ][ 'type' ] != 'text/plain' )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$errors->report_error( sprintf( $this->lang[ 'add_errmime' ], $f, $_FILES[ $f ][ 'type' ], 'text/plan' ), GENERAL_ERROR );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'sql':\n\t\t\t\t\t\t\t\tif ( $_FILES[ $f ][ 'type' ] != 'text/plain' && $_FILES[ $f ][ 'type' ] != 'application/octet-stream' )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$errors->report_error( sprintf( $this->lang[ 'add_errmime' ], $f, $_FILES[ $f ][ 'type' ], 'text/plan' ), GENERAL_ERROR );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$checked[ 'files' ][ $f ] = $_FILES[ $f ]; // add to array of checked entries\n\t\t\t\t\t\t$uploadedfiles++;\n\t\t\t\t\t}else\n\t\t\t\t\t{ // no no no, not this\n\t\t\t\t\t\t$errors->report_error( sprintf( $this->lang[ 'add_hackerr' ], $f ), CRITICAL_ERROR );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// now we can go through all the needed $_GETs and sanitise a bit\n\t\t$gets = array( 'name', 'version', 'description', 'callsign', 'spawn', 'request', 'fetch_restrict', 'useopts' ); // simplify\n\t\tforeach ( $gets as $g )\n\t\t{\n\t\t\t// check if set\n\t\t\tif ( isset( $_POST[ $g ] ) && !empty( $_POST[ $g ] ) )\n\t\t\t{ // is\n\t\t\t\tif ( $g != 'fetch_restrict' )\n\t\t\t\t{\n\t\t\t\t\t$checked[ 'vars' ][ $g ] = strval( $_POST[ $g ] ); // set the var eh\n\t\t\t\t}else\n\t\t\t\t{ // see opts is special :)\n\t\t\t\t\t$checked[ 'vars' ][ 'fetch_restrict' ] = intval( $_POST[ 'fetch_restrict' ] );\n\t\t\t\t}\n\t\t\t}else\n\t\t\t{ // nope\n\t\t\t\t// gotta see if it's essential\n\t\t\t\tswitch ( $g )\n\t\t\t\t{\n\t\t\t\t\tcase 'author':\n\t\t\t\t\tcase 'name':\n\t\t\t\t\tcase 'version':\n\t\t\t\t\tcase 'description':\n\t\t\t\t\tcase 'callsign':\n\t\t\t\t\t\t$errors->report_error( sprintf( $this->lang[ 'add_errinfo' ], $g ), GENERAL_ERROR );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t// again seeuse gets special treatment\n\t\t\t\t\t\tif ( $g == 'fetch_restrict' )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$checked[ 'vars' ][ 'fetch_restrict' ] = FALSE;\n\t\t\t\t\t\t}else\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$checked[ 'vars' ][ $g ] = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// set autho\n\t\t$checked[ 'vars' ][ 'author' ] = $userdata[ 'user_id' ];\n\t\t\n\t\t// some typing saviours\n\t\t$name = $checked[ 'vars' ][ 'name' ];\n\t\t$callsign = $checked[ 'vars' ][ 'callsign' ];\n\t\t$version = $checked[ 'vars' ][ 'version' ];\n\t\t\n\t\t// some more checks\n\t\t\n\t\t// check if the callsign is either unique or this is an update\n\t\t$sql = \"SELECT callsign, version, name FROM \" . DISTROMODULES_TABLE . \" WHERE callsign='$callsign'\";\n\t\tif ( !$res = $db->sql_query( $sql ) )\n\t\t{\n\t\t\t$errors->report_error( 'Could not query callsign', CRITICAL_ERROR );\n\t\t}\n\t\tif ( $db->sql_numrows( $res ) != 0 )\n\t\t{ // not unique\n\t\t\t$row = $db->sql_fetchrow( $res );\n\t\t\tif ( ( $this->verscmp( $version, $row[ 'version' ] ) <= 0 ) && ( $name == $row[ 'name' ] ) && ( $version != '0.0.0' && $row[ 'version' ] != '0.0.0' ) )\n\t\t\t{ // not an update, *gasp*\n\t\t\t\t$errors->report_error( sprintf( $this->lang[ 'add_errcall' ], $callsign ), CRITICAL_ERROR );\n\t\t\t}\n\t\t\t// some dirs need writability\n\t\t\tif ( $uploadedfiles != 0 )\n\t\t\t{ // they indeed do :)\n\t\t\t\tif ( is_dir( $Cl_root_path . 'files/' . $name ) )\n\t\t\t\t{ // dir exists and needs to be writable\n\t\t\t\t\tif ( !is_writable( $Cl_root_path . 'files/' . $name ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t// chmod if possible\n\t\t\t\t\t\tif ( !$this->chmodparent( $Cl_root_path . 'files/' . $name, 0644 ) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$errors->report_error( sprintf( $this->lang[ 'add_errperm' ], $Cl_root_path . 'files/' . $name ), GENERAL_ERROR );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}else\n\t\t\t\t{ // dir doesn't exist so it might not have been needed before but is now :)\n\t\t\t\t\tif ( !is_writable( $Cl_root_path . 'files/' ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t// chmod if possible\n\t\t\t\t\t\tif ( !$this->chmodparent( $Cl_root_path . 'files', 0644 ) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$errors->report_error( sprintf( $this->lang[ 'add_errperm' ], $Cl_root_path . 'files' ), GENERAL_ERROR );\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@mkdir( $Cl_root_path . 'files/' . $name ); // make the folder\n\t\t\t\t\t}else\n\t\t\t\t\t{\n\t\t\t\t\t\t@mkdir( $Cl_root_path . 'files/' . $name );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$unique = FALSE;\n\t\t}else\n\t\t{ // some dirs need creating\n\t\t\t// check if the root for the files is writable\n\t\t\tif ( !is_writable( $Cl_root_path . 'files/' ) )\n\t\t\t{\n\t\t\t\t// chmod if possible\n\t\t\t\tif ( !$this->chmodparent( $Cl_root_path . 'files', 0644 ) )\n\t\t\t\t{\n\t\t\t\t\t$errors->report_error( sprintf( $this->lang[ 'add_errperm' ], $Cl_root_path . 'files' ), GENERAL_ERROR );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( !is_dir( $Cl_root_path . 'files/' . $name ) )\n\t\t\t{\n\t\t\t\t@mkdir( $Cl_root_path . 'files/' . $name ); // make the folder\n\t\t\t}\n\t\t\t$unique = TRUE;\n\t\t}\n\t\t\n\t\t// now that that's taken care of make the specific directory for this module\n\t\tif ( !is_dir( $Cl_root_path . 'files/' . $name . '/' . $version ) )\n\t\t{ // the check has to be made due to meta modules\n\t\t\t@mkdir( $Cl_root_path . 'files/' . $name . '/' . $version );\n\t\t}\n\t\t\n\t\t// now move all the files from temp to their destination\n\t\tif ( is_array( $checked[ 'files' ] ) )\n\t\t{\n\t\t\tforeach ( $checked[ 'files' ] as $i => $f )\n\t\t\t{\n\t\t\t\t// set the destination name\n\t\t\t\t$destination = $Cl_root_path . 'files/' . $name . '/' . $version . '/' . $i;\n\t\t\t\tswitch ( $i )\n\t\t\t\t{\n\t\t\t\t\tcase 'files': \n\t\t\t\t\t\t$destination .= '.zip'; \n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'config':\n\t\t\t\t\tcase 'filemap':\n\t\t\t\t\t\t$destination .= '.txt';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'sql':\n\t\t\t\t\t\t$destination .= '.sql';\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ( !@move_uploaded_file( $f[ 'tmp_name' ], $destination ) )\n\t\t\t\t{\n\t\t\t\t\t// first we need to remove everything that has been done before this (so there isn't stuff left behind)\n\t\t\t\t\tforeach ( $checked[ 'files' ] as $fl => $void )\n\t\t\t\t\t{\n\t\t\t\t\t\t// build destionation (what to delete) name\n\t\t\t\t\t\t$destination = $Cl_root_path . 'files/' . $name . '/' . $version . '/' . $fl;\n\t\t\t\t\t\tswitch ( $fl )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase 'files': \n\t\t\t\t\t\t\t\t$destionation .= '.zip'; \n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'config':\n\t\t\t\t\t\t\tcase 'filemap':\n\t\t\t\t\t\t\t\t$destination .= '.txt';\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'sql':\n\t\t\t\t\t\t\t\t$destination .= '.sql';\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@unlink( $destination );\n\t\t\t\t\t\tif ( $fl == $i )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t@rmdir( $Cl_root_path . 'files/' . $name . '/' . $version ); // remove the dir too\n\t\t\t\t\t\n\t\t\t\t\t// then chmod back to normal or delete the main dir if needed\n\t\t\t\t\tif ( $unique )\n\t\t\t\t\t{\n\t\t\t\t\t\t@rmdir( $Cl_root_path . 'files/' . $name ); // remove the dir\n// \t\t\t\t\t\t@chmod( $Cl_root_path . 'files/', 0555 );\n\t\t\t\t\t}else\n\t\t\t\t\t{\n// \t\t\t\t\t\t@chmod( $Cl_root_path . 'files/' . $name, 0555 );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// then produce the error\n\t\t\t\t\t$errors->report_error( sprintf( $this->lang[ 'add_errup' ], $i ), GENERAL_ERROR );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// now chmod all the files and the dirs back to normal\n\t\tif ( is_array( $checked[ 'files' ] ) )\n\t\t{\n\t\t\tforeach ( $checked[ 'files' ] as $i => $void )\n\t\t\t{\n\t\t\t\tswitch ( $i )\n\t\t\t\t{\n\t\t\t\t\tcase 'files': \n\t\t\t\t\t\t$i .= '.zip'; \n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'config':\n\t\t\t\t\tcase 'filemap':\n\t\t\t\t\t\t$i .= '.txt';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'sql':\n\t\t\t\t\t\t$i .= '.sql';\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t@chmod( $Cl_root_path . 'files/' . $name . '/' . $version . '/' . $i, 0444 );\n\t\t\t}\n\t\t}\n// \t\t@chmod( $Cl_root_path . 'files/' . $name . '/' . $version, 0555 );\n// \t\t@chmod( $Cl_root_path . 'files/' . $name, 0555 );\n// \t\t@chmod( $Cl_root_path . 'files/', 0555 );\n// \t\t@chmod( $Cl_root_path, 0555 );\n\t\t\n\t\t// move on to sql changes\n\t\t\n\t\t// add two values\n\t\t$checked[ 'vars' ][ 'time' ] = time();\n\t\t$checked[ 'vars' ][ 'section' ] = strval( $_GET[ 'w' ] );\n\t\t\n\t\t//build the query\n\t\t$values = array();\n\t\t$values2 = array();\n\t\t\n\t\t// make a hash because this has to be in exactly the right order :)\n\t\t$hash = array( 'id', 'callsign', 'name', 'version', 'spawn', 'request', 'fetch_restrict', 'use_opts', 'summons' );\n\t\t$hash2 = array( 'id', 'callsign', 'author', 'description', 'time', 'section' );\n\t\t\n\t\t// the modhash thingies\n\t\t$announce = ( isset( $_POST[ 'announce_methods' ] ) ) ? strval( $_POST[ 'announce_methods' ] ) : '';\n\t\t$accept = ( isset( $_POST[ 'accept_methods' ] ) ) ? strval( $_POST[ 'accept_methods' ] ) : '';\n\t\t$methods = ( isset( $_POST[ 'mod_methods' ] ) ) ? strval( $_POST[ 'mod_methods' ] ) : '';\n\t\t\n\t\tif ( $unique )\n\t\t{ // fresh insert\n\t\t\t// build the values arrays\n\t\t\tforeach ( $hash as $n )\n\t\t\t{\n\t\t\t\t$values[] = '\\'' . $checked[ 'vars' ][ $n ] . '\\'';\n\t\t\t}\n\t\t\tforeach ( $hash2 as $n )\n\t\t\t{\n\t\t\t\t$values2[] = '\\'' . $checked[ 'vars' ][ $n ] . '\\'';\n\t\t\t}\n\t\t\n\t\t\t$values = implode( ',', $values );\n\t\t\t$values2 = implode( ',', $values2 );\n\t\t\t\n\t\t\t$sql = \"INSERT INTO \" . DISTROMODULES_TABLE . \" VALUES( $values )\";\n\t\t\t$sql2 = \"INSERT INTO \" . MODLIST_TABLE . \" VALUES( $values2 )\";\n\t\t\t$sql3 = \"INSERT INTO \" . MODULES_HASH_TABLE . \" VALUES( '\" . $checked[ 'vars' ][ 'callsign' ] . \"', '$announce', '$accept', '$methods' )\";\n\t\t}else\n\t\t{ // gotta update\t\n\t\t\t// build the values arrays\n\t\t\tforeach ( $hash as $n )\n\t\t\t{\n\t\t\t\t// id, callsign, and summons must not get changed\n\t\t\t\tif ( $n == 'id' || $n == 'callsign' || $n == 'summons' )\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$values[] = $n . ' = \\''. $checked[ 'vars' ][ $n ] . '\\'';\n\t\t\t}\n\t\t\tforeach ( $hash2 as $n )\n\t\t\t{\n\t\t\t\t// id, callsign, and summons must not get changed\n\t\t\t\tif ( $n == 'id' || $n == 'callsign' || $n == 'summons' )\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$values2[] = $n . ' = \\''. $checked[ 'vars' ][ $n ] . '\\'';\n\t\t\t}\n\t\t\t\n\t\t\t$values = implode( ',', $values );\n\t\t\t$values2 = implode( ',', $values2 );\n\t\t\t\n\t\t\t$sql = \"UPDATE \" . DISTROMODULES_TABLE . \" SET $values WHERE callsign = '\" . $checked[ 'vars' ][ 'callsign' ] . \"'\";\n\t\t\t$sql2 = \"UPDATE \" . MODLIST_TABLE . \" SET $values2 WHERE callsign = '\" . $checked[ 'vars' ][ 'callsign' ] . \"'\";\n\t\t\t$sql3 = \"UPDATE \" . MODULES_HASH_TABLE . \" SET announce_methods='$announce', accept_methods='$accept', mod_methods='$methods' WHERE callsign = '\" . $checked[ 'vars' ][ 'callsign' ] . \"'\";\n\t\t}\n\t\t\n\t\tif ( !$db->sql_query( $sql ) || !$db->sql_query( $sql2 ) || !$db->sql_query( $sql3 ) )\n\t\t{\n\t\t\t$errors->report_error( 'Could not insert into database', CRITICAL_ERROR );\n\t\t}\n\t\t\n\t\t\n\t\t// tell the user all went well\n\t\t$errors->report_error( sprintf( $this->lang[ 'add_OK' ], $name, $version ), MESSAGE );\n\t}", "title": "" }, { "docid": "1037490722abc71e301b25fcd9602cb9", "score": "0.5194494", "text": "abstract public function canUpload();", "title": "" }, { "docid": "ae60f535fe2c0565d3f5df77ae527fc8", "score": "0.51891476", "text": "function move_uploaded_file ($filename, $destination) {}", "title": "" }, { "docid": "fad117fe5c2ecd3f2efa47ca874c24d3", "score": "0.51872545", "text": "function assign_access($access, $switch)\n{\n\tglobal $userdata, $template;\n\tglobal $get;\n\n\t$is_allowed = false;\n\tswitch ( $access )\n\t{\n\t\tcase ADMIN:\n\t\t\t$is_allowed = ($userdata['user_level'] == ADMIN);\n\t\t\tbreak;\n\t\tcase MOD:\n\t\t\t$is_allowed = ($userdata['user_level'] == MOD) || ($userdata['user_level'] == ADMIN);\n\t\t\tbreak;\n\t\tcase USER:\n\t\t\t$is_allowed = $userdata['session_logged_in'];\n\t\t\tbreak;\n\t\tcase ANONYMOUS:\n\t\t\t$is_allowed = true;\n\t\t\tbreak;\n\t}\n\t$get->assign_switch($switch, !empty($is_allowed));\n\n\treturn $is_allowed;\n}", "title": "" }, { "docid": "8ad73dae9c42e35e8cf0121af0d06034", "score": "0.51854354", "text": "public function checkWriteAccess() {\n \treturn true;\n }", "title": "" }, { "docid": "aae5f5626fefc73915f9bcc83798a3fa", "score": "0.5174463", "text": "function formulaireupload_autoriser(){}", "title": "" }, { "docid": "a3fb6145970328956ea15fab86df26eb", "score": "0.517", "text": "function chown ($filename, $user) {}", "title": "" }, { "docid": "b5af5ea9c5b754baa96f0fd94a49380c", "score": "0.5166098", "text": "public function init() {\n\t\t$readActions = array('index', 'students','view', 'photoupload', 'managephotos', 'deletephoto', \n\t\t\t'actuallydeletephoto', 'setdefaultphoto', 'viewdefaultphoto', 'pblgroups', 'group','blockchairs',\n\t\t\t'teachingstaff', 'stafflist', 'editdetails', 'doeditdetails');\n\t\t$this->_helper->_acl->allow('student', $readActions);\n\t\t$writeActions = array('setofficialphoto','viewofficialphoto');\n\t\t$this->_helper->_acl->allow('staff', $writeActions);\n\t\t$this->_helper->_acl->allow('admin', array('cohortgroup'));\n\t}", "title": "" }, { "docid": "470608587d0df365373c82b570eda0c1", "score": "0.51567525", "text": "function uploadEditFile( $FVARS, $sServerDir, $arAllowed, $arDenied, $maxSize, $OldFile, $rename=1){\n\t\t\t$sFileName = \"\";\n\t\t\t$oFile = $FVARS ;\n\n\t\t\t//Upload and delete old files, Get the posted file.\n\t\t\tif( !empty( $oFile['name'] ) ){\n\n\t\t\t\t// Get the uploaded file name and extension.\n\t\t\t\t$sFileName = $oFile['name'] ;\n\n\t\t\t\t//File size\n\t\t\t\tif( $oFile['size'] > $maxSize ){\n\t\t\t\t\t$resultReturn[\"Flag\"] = 1;\n\t\t\t\t\t$resultReturn[\"Msg\"] = \"ไฟล์รูปสมาชิกที่ท่าน Upload มีขนาดใหญ่เกินที่กำหนดไว้\";\n\t\t\t\t\t//echo \"File1 \". $resultReturn[\"Msg\"];\t\t\n\t\t\t\t}else{\n\t\t\t\t\t$resultReturn[\"Flag\"] = 0;\n\n\t\t\t\t\t//File Allowed\n\t\t\t\t\t$sOriginalFileName = $sFileName ;\n\t\t\t\t\t$sExtension = substr( $sFileName, ( strrpos($sFileName, '.') + 1 ) ) ;\n\t\t\t\t\t$sExtension = strtolower( $sExtension ) ;\n\n\t\t\t\t\t// Check if it is an allowed extension.\n\t\t\t\t\tif ( ( count($arAllowed) > 0 && !in_array( $sExtension, $arAllowed ) ) || ( count($arDenied) > 0 && in_array( $sExtension, $arDenied ) ) ){\n\t\t\t\t\t\t$resultReturn[\"Flag\"] = 1;\n\t\t\t\t\t\t$resultReturn[\"Msg\"] = \"ไฟล์รูปสมาชิกที่ท่าน Upload ไม่ได้รับอนุญาตครับ\";\n\t\t\t\t\t\t//echo \"File1 \". $resultReturn[\"Msg\"];\t\t\t\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$resultReturn[\"Flag\"] = 0;\n\n\t\t\t\t\t\t\t//echo \"Here Step 3\";\n\n\t\t\t\t\t\t\t//Delete Old Picture \n\t\t\t\t\t\t\t//echo $sServerDir.$OldFile;\n\t\t\t\t\t\t\t//echo \"<br>\";\n\t\t\t\t\t\t\tif (file_exists($sServerDir.$OldFile)){\n\t\t\t\t\t\t\t\t//echo \"exists\";\n\t\t\t\t\t\t\t\t//echo $sServerDir.$OldFile;\n\t\t\t\t\t\t\t\t@unlink($sServerDir.$OldFile );\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t//echo \"Not exists\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//exit;\n\n\t\t\t\t\t\t\t// Initializes the counter used to rename the file, if another one with the same name already exists.\n\t\t\t\t\t\t\t$iCounter = 0 ;\n\n\t\t\t\t\t\t\twhile ( true )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t// Compose the file path.\n\t\t\t\t\t\t\t\t\tif( $rename == 1 )\n\t\t\t\t\t\t\t\t\t\t$sFileName = date('YmdHis').FU::makeRandom().\".\".$sExtension;\n\t\t\t\t\t\t\t\t\t$sFilePath = $sServerDir . $sFileName ;\n\n\t\t\t\t\t\t\t\t\t// If a file with that name already exists.\n\t\t\t\t\t\t\t\t\tif ( is_file( $sFilePath ) )\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$iCounter++ ;\n\t\t\t\t\t\t\t\t\t\t$sFileName = FU::RemoveExtension( $sOriginalFileName ) . '(' . $iCounter . ').' . $sExtension ;\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\tmove_uploaded_file( $oFile['tmp_name'], $sFilePath ) ;\n\n\t\t\t\t\t\t\t\t\t\tif ( is_file( $sFilePath ) )\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$oldumask = umask(0) ;\n\t\t\t\t\t\t\t\t\t\t\tchmod( $sFilePath, 0777 ) ;\n\t\t\t\t\t\t\t\t\t\t\tumask( $oldumask ) ;\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\tbreak ;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$resultReturn[\"sFileName\"] = $sFileName;\n\n\t\t\t\tif( $resultReturn[\"Flag\"] == 1 )\n\t\t\t\t\t$resultReturn[\"sFileName\"] = $OldFile;\n\n\t\t\t}//if( !empty( $_FILES['file1'] ) )\n\t\t\telse{\n\t\t\t\t$resultReturn[\"sFileName\"] = $OldFile;\n\t\t\t}\n\n\t\t\treturn $resultReturn;\n\t\t}", "title": "" }, { "docid": "7048dd3d967f33271e373e1198260e07", "score": "0.51317537", "text": "public function testPermissions() {\n\t\t$this->assertEquals('0777', $this->object->permissions());\n\t\t$this->assertEquals(null, $this->temp->permissions());\n\n\t\t$this->object->chmod(0444);\n\t\t$this->temp->chmod(0444);\n\n\t\t$this->assertEquals('0444', $this->object->permissions());\n\t\t$this->assertEquals(null, $this->temp->permissions());\n\t}", "title": "" }, { "docid": "a97b2d3c8319b85d835c249bf5a10be8", "score": "0.51283914", "text": "function set_ftp_group_access($name, $access)\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $this->_set_parameter($name, 'FtpGroupAccess', implode(' ', $access));\n }", "title": "" }, { "docid": "51db9c73629bbb863e31baa71b62ea51", "score": "0.512627", "text": "abstract public function chmod($pathname, $mode);", "title": "" }, { "docid": "e3207874e839a70dd6789b3ed4dce107", "score": "0.51250374", "text": "public function setOrifile($tmp_file,$filename,$subname){\n\t\t$this->oritmpfile = $tmp_file;\n\t}", "title": "" }, { "docid": "6e0d8687f2cda3b2ef15b73615f38257", "score": "0.5116454", "text": "public function setAllowed($fileType) {\n\t\t\tswitch($fileType) {\n\t\t\t\tcase 'image':\n\t\t\t\t\t$this->allowed = array('jpg', 'jpeg', 'png', 'svg', 'gif');\n\t\t\t\t\t$this->fileType = 'image';\n\t\t\t\t\t$this->targetDir.= 'images/';\n\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$this->allowed = array('jpg', 'jpeg', 'png', 'svg');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "48ee6e5a35969268e10136f442e8793c", "score": "0.51146764", "text": "public function checkUploadFolder() {\n\t\t$absolutePath = PATH_site . $this->uploadFolder;\n\t\tif (!@is_dir($absolutePath)){\n\t\t\tthrow new RuntimeException(\n\t\t\t\t'The folder ' . $absolutePath . ' with the uploaded realty files does not exist. ' .\n\t\t\t\t\t'Please check your configuration and restart the clean-up.',\n\t\t\t\t1333035462\n\t\t\t);\n\t\t}\n\t\tif (!@is_writable($absolutePath)) {\n\t\t\t$ownerUid = fileowner($absolutePath);\n\t\t\t$owner = posix_getpwuid($ownerUid);\n\n\t\t\tthrow new tx_oelib_Exception_AccessDenied(\n\t\t\t\t'The folder ' . $absolutePath . ' is not writable. Please fix file permissions and restart' .\n\t\t\t\t\t' the import. The folder belongs to the user: ' . $owner['name'] . ', ' . $ownerUid .\n\t\t\t\t\t', and has the following permissions: ' . substr(decoct(fileperms($absolutePath)), 2) .\n\t\t\t\t\t'. The user starting this import was: ' . get_current_user() . '.',\n\t\t\t\t1333035471\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "2f2fd724e58b87e706a93aeafc707ffa", "score": "0.51026034", "text": "function isWriteable ( $canContinue, $file, $mode, $desc ) \r\n{\r\n\t@chmod( $file, $mode );\r\n\t$good = is_writable( $file ) ? 1 : 0;\r\n\tMessage ( $desc.' is writable: ', $good );\r\n\treturn ( $canContinue && $good );\r\n}", "title": "" }, { "docid": "d4d8f4f31bd3163d800bb27a2d589e53", "score": "0.5099934", "text": "function is_protected($file) { /*DONE*/\n\t$file_protected = FALSE;\n\tforeach ($this->protected_files as $value) { // Evaluate file being uploaded for list of protected files\n\tif ($file == $value) $file_protected = TRUE;\t\t\n\t}\n\treturn $file_protected;\n\t}", "title": "" }, { "docid": "d716513af31255e315639564733b97d6", "score": "0.50960755", "text": "public function accessRules()\n {\n return array(\n array('allow',\n 'actions' => array(\n 'index',\n 'save',\n 'exportView',\n 'addFile'\n ),\n 'roles' => array('admin', 'super_admin', 'operations_admin', 'limited_admin')\n ),\n array('deny',\n 'users' => array('*')\n )\n );\n }", "title": "" }, { "docid": "f4e05c08dd69799b670cf8b561d01cf5", "score": "0.5089801", "text": "function upload_file() {\n upload_file_to_temp();\n }", "title": "" }, { "docid": "2f5490e5440f80bfdb67b670d3573c50", "score": "0.5087128", "text": "public function accessRules()\n{\nreturn array(\narray('allow', // allow all users to perform 'index' and 'view' actions\n'actions'=>array('index','view','viewcompany'),\n'users'=>array('@'),\n),\narray('allow', // allow authenticated user to perform 'create' and 'update' actions\n'actions'=>array('create','update'),\n'users'=>array('@'),\n),\narray('allow', // allow admin user to perform 'admin' and 'delete' actions\n'actions'=>array('admin','delete','uploadfoto','unggah'),\n'users'=>array('@'),\n),\narray('deny', // deny all users\n'users'=>array('*'),\n),\n);\n}", "title": "" }, { "docid": "2c3f62120f9ef5de5aa30538b29f44f3", "score": "0.50863624", "text": "function effect() {\n\t\t$request = $this->getRequest();\n\n\t\t// Get the submission file.\n\t\t$submissionFile = $this->getSubmissionFile($request);\n\t\tif (!is_a($submissionFile, 'SubmissionFile')) return AUTHORIZATION_DENY;\n\n\t\t// Make sure that it's in the required stage\n\t\tif ($submissionFile->getFileStage() != $this->_fileStage) return AUTHORIZATION_DENY;\n\n\t\tif ($this->_viewable) {\n\t\t\t// Make sure the file is visible.\n\t\t\tif (!$submissionFile->getViewable()) return AUTHORIZATION_DENY;\n\t\t}\n\n\t\t// Made it through -- permit access.\n\t\treturn AUTHORIZATION_PERMIT;\n\t}", "title": "" }, { "docid": "f20d747893aa2152a50471d17edcb902", "score": "0.5080241", "text": "private function _check_permissions() {\n \n }", "title": "" }, { "docid": "958bb3ff5f428fe1a4124bbb63777a38", "score": "0.5077038", "text": "function setFiles($files){\n $this->files = $files;\n }", "title": "" }, { "docid": "b29dcf872a20320b38c01146fb8cd1e9", "score": "0.50684536", "text": "public function upload()\n {\n \tif (null === $this->getFile()) {\n \t\treturn;\n \t}\n \t\n \t// Move arquivo temporario para pasta de uploads\n \t$this->getFile()->move(\n \t\t$this->getUploadRootDir(),\n \t\t$this->getFile()->getClientOriginalName()\n\t\t);\n\n\t\t$this->setPath($this->getFile()->getClientOriginalName());\n\n\t\t// Limpa arquivo temporario\n\t\t$this->file = null;\n }", "title": "" }, { "docid": "280bc9427e31981c225cca7b0b6de410", "score": "0.50605345", "text": "public function _fuploaded()\r\n\t{}", "title": "" }, { "docid": "8552c9731d9b925a51a47e967b26a203", "score": "0.5058654", "text": "public function chmod($files, $mode, $umask = 0000)\n {\n $currentUmask = umask();\n umask($umask);\n\n if (!is_array($files))\n {\n $files = array($files);\n }\n\n foreach ($files as $file)\n {\n $this->logSection(sprintf('chmod %o', $mode), $file);\n chmod($file, $mode);\n }\n\n umask($currentUmask);\n }", "title": "" }, { "docid": "b77390dc8fdcd6212d109f97f214b479", "score": "0.5050409", "text": "public function upload()\n {\n if (null === $this->getFile()) {\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->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->photodeprofil = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }", "title": "" }, { "docid": "d6390ae16658542195ec5907562b54fc", "score": "0.50324994", "text": "protected function setUpMockMoveUploadedFile()\n {\n if (!function_exists(\"runkit_function_rename\")\n || !ini_get('runkit.internal_override')\n ) {\n $this->markTestSkipped(\n 'move_uploaded_file cannot be unit tested without runkit module'\n );\n return;\n }\n runkit_function_rename('move_uploaded_file', 'move_uploaded_file_orig');\n runkit_function_rename('move_uploaded_file_mock', 'move_uploaded_file');\n }", "title": "" }, { "docid": "758212258f6124b2e092b91320cd8433", "score": "0.5009124", "text": "public function testPutFileLocalPermissionDenied ()\n {\n $fs = $this->getMock('\\\\Hdfs\\\\FilesystemWrapper');\n $fs->expects($this->once())\n ->method('isExists')\n ->with(self::LOCAL_FILE)\n ->will($this->returnValue(true));\n $fs->expects($this->once())\n ->method('isReadable')\n ->with(self::LOCAL_FILE)\n ->will($this->returnValue(false));\n $hdfs = new Hdfs\\Web(null, $fs);\n\n try\n {\n $hdfs->putFile(self::LOCAL_FILE, self::REMOTE_FILE);\n $this->assertFalse(true);\n }\n catch(Hdfs\\Exception\\PermissionException $e)\n {\n $this->assertTrue($e->isLocal());\n }\n }", "title": "" }, { "docid": "1503a0f10314385458db3a35aea74a79", "score": "0.50059366", "text": "function uploadAvatar()\n {\n \t// prepare\n \tif (! array_key_exists('avatarfilename', $_POST)) {\n \t\t$this->showForm('请选择要上传的文件。', false);\n \t\treturn;\n \t}\n \t\n \t// move file to user dir\n \t\n \t$tmpfilepath = $this->trimmed('avatarfilename');\n \t\n \t$tmpfilename = substr($tmpfilepath, strrpos($tmpfilepath, '/') + 1);\n \t\n \t$tmpsubpath = Avatar::tmpsubpath($this->cur_user->id);\n \n $imagefile = new ImageFile(null, $tmpsubpath . $tmpfilename);\n \n if (! $imagefile) {\n \t$this->showForm('文件已过期,请重新上传', false);\n \treturn;\n }\n \n if ($imagefile->width == 0\n \t|| $imagefile->height == 0) {\n \t$this->showForm('文件不合法,无法读取', false);\n \treturn;\n }\n\n $filename = Avatar::filename($this->cur_user->id,\n image_type_to_extension($imagefile->type),\n null,\n 'tmp'.common_timestamp());\n\n $filepath = Avatar::path($filename, Avatar::subpath($this->cur_user->id));\n\n rename($tmpsubpath . $tmpfilename, $filepath);\n \n // get the target image size\n $targetWidth = 361;\n \n $aspectRatio = $targetWidth/$imagefile->width;\n \n $renderedHeight = $imagefile->height * $aspectRatio; \n\n $filedata = array('filename' => $filename,\n 'filepath' => $filepath,\n 'width' => $targetWidth,\n 'height' => $renderedHeight,\n 'type' => $imagefile->type,\n \t\t\t\t 'ratio' => $aspectRatio);\n\n $_SESSION['FILEDATA'] = $filedata;\n \n $this->addPassVariable('avatarsettings_filedata', $filedata);\n \n $this->addPassVariable('avatarsettings_isCrop', true);\n \n $this->showForm('选取一块矩形区域作为您的头像',\n true);\n }", "title": "" }, { "docid": "c76630d5deb752f278d707e47fcdb4f4", "score": "0.49950132", "text": "function setSiteLevelAccess( ) \n {\n $sitePriv = RowManager_AccountAdminAccessManager::PRIVILEDGE_SITE;\n $this->setValueByFieldName( 'accountadminaccess_privilege', $sitePriv );\n }", "title": "" }, { "docid": "692a8fb7229558ea77a2a0891a135956", "score": "0.49934372", "text": "public function testSetChmod()\n {\n file_put_contents(self::$temp . DS . 'file.txt', 'Hello World');\n\n Storage::chmod(self::$temp . DS . 'file.txt', 0755);\n\n $actual = substr(sprintf('%o', fileperms(self::$temp . DS . 'file.txt')), -4);\n $expected = ('\\\\' === DS) ? '0666' : '0755';\n\n $this->assertTrue($expected === $actual);\n }", "title": "" }, { "docid": "a7d7dc01310e7d9494e54478cbe2a276", "score": "0.49917647", "text": "public function upload($localFile, $remoteFile, $mode='binary', $perms=null);", "title": "" }, { "docid": "5a89fdb67b6051ded40f762f3a174c99", "score": "0.49883184", "text": "function uploadFileMultiples_folder($fk_id,$is_edit=NULL)\r\n{\r\n //echo 'file';\r\n\t\t$user_ip = $this->getIP();\r\n\t\t//echo 'file_type2='.$user_ip;exit;\r\n\t\t//$user_name = $_SESSION['username'];\r\n\t\t//$full_name = $_SESSION['full_name'];\r\n\r\n\t\t//define a maxim size for the uploaded images in Kb\r\n \t\tdefine (\"MAX_SIZE\",\"8000\"); \r\n\t\t$i=0;\r\n\t\tforeach ($_FILES['uploaded_file']['name'] as $f)\r\n\t\t\t {\r\n\t\t\t\t \r\n\t\t######### Binary checks for file type ###############\r\n\t\t\t$file_type = $this->getImgType($_FILES['uploaded_file']['tmp_name'][$i]);\r\n\t\t\t //echo 'file_type2='.$file_type;exit;\r\n\t\t\tif($file_type == 'other')\r\n\t\t\t {\r\n\t\t\t \t\r\n\t\t\t\techo '<div align=\"center\" style=\"color:#FF0000\">Can not upload this type of file!</div>';\r\n\t\t\t\t\r\n\t\t\t\t //$referer = parse_url($_SERVER['HTTP_REFERER']);\r\n \t\t\t\t //header('location:'. $referer);\r\n\t\t\t\texit;\r\n\t\t\t }\r\n\t\t######################################################\r\n\t\t\r\n\t\t################# Other type check #################\r\n\t\t//get the original name of the file from the clients machine\r\n \t\t$filename = stripslashes($_FILES['uploaded_file']['name'][$i]);\r\n\t\t$file_tmp_name = $_FILES['uploaded_file']['tmp_name'][$i];\r\n\t\t\r\n \t//get the extension of the file in a lower case format\r\n \t\t$extension = $this->getExtension($filename);\r\n \t $extension = strtolower($extension);\r\n \r\n\t\t$allowedExts = array(\"gif\", \"jpeg\", \"jpg\", \"png\", \"pdf\");\r\n\t\t$temp = explode(\".\", $_FILES[\"uploaded_file\"][\"name\"][$i]);\r\n\t\t$extensions = strtolower(end($temp));\r\n\r\n\t\t$file_type = $_FILES[\"uploaded_file\"][\"type\"][$i];\r\n\t\t\r\n\t\t######################################################\r\n\t\t if (( ($_FILES[\"uploaded_file\"][\"type\"][$i] == \"image/gif\")\r\n || ($_FILES[\"uploaded_file\"][\"type\"][$i] == \"image/jpeg\")\r\n || ($_FILES[\"uploaded_file\"][\"type\"][$i] == \"image/jpg\")\r\n || ($_FILES[\"uploaded_file\"][\"type\"][$i] == \"image/pjpeg\")\r\n || ($_FILES[\"uploaded_file\"][\"type\"][$i] == \"image/x-png\")\r\n || ($_FILES[\"uploaded_file\"][\"type\"][$i] == \"image/png\")\r\n || ($_FILES[\"uploaded_file\"][\"type\"][$i] == \"application/pdf\"))\r\n && in_array($extensions, $allowedExts))\r\n {\r\n\t\t\t\t \r\n\t\t\t\t ######### start uploading file #################\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t // $categoryName = get_record_for('gallery_category', 'category_name', array('category_id' => $_POST['category_id']));\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t // $new_file_name = time().'_'.$filename;\r\n\t\t\t\t\t\t\t $new_file_name = time().$i.'.'.$extension;\r\n\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t // $caption = addslashes($_POST['caption']);\r\n\t\t\t\t\t\t\t // $caption = '';\r\n\t\t\t\t\t\t\t //$sql = 'INSERT INTO gallery_images (category_id, image_file, caption) \r\n\t\t\t\t\t\t\t//\t\t VALUES ('.$_POST['category_id'].', \"'.$new_file_name.'\", \"'.$caption.'\")';\r\n\t\t\t \r\n\t\t\t\t\t\t\t//$foldername =\r\n\t\t\t\t\t\t\t\tif (!file_exists('uploads/'.date(\"Y\").'/'.date(\"M\").'/'.date(\"d\").'/')) {\r\n\t\t\t\t\t\t\t\t\t\tmkdir('uploads/'.date(\"Y\").'/'.date(\"M\").'/'.date(\"d\").'/', 0755, true);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$dirpath = 'uploads/'.date(\"Y\").'/'.date(\"M\").'/'.date(\"d\").'/';\r\n\t\t\t\t\t\t\t\t$full_path_file_name = '';\r\n\t\t\t\t\t\t\t\t$full_path_file_name = $dirpath.$new_file_name;\r\n\t\t\t\t\t\t\t\t//echo $full_path_file_name;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t// if(move_uploaded_file($file['tmp_name'],'images/'.$new_file_name))\r\n\t\t\t\t\t\t\t if(move_uploaded_file($file_tmp_name,$dirpath.$new_file_name))\r\n\t\t\t\t\t\t\t {\r\n\t\t\t\t\t\t//\t\t if(mysql_query($sql))\r\n\t\t\t\t\t\t//\t\t {\r\n\t\t\t\t\t\t\t//echo \"here\";\r\n\t\t\t\t\t\t\t//print_r($dbh);\r\n\t\t\t\t\t\t\t\t\t //unset($_POST);\r\n\t\t\t\t\t\t\t\t\t $sMsg = '<span style=\"color:#090\">Added Sucessfully!</span>';\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t //add image insert query\r\n\t\t\t\t\t\t\t\t\t // $insert_image_query=\"INSERT INTO tbl_images SET img_name='$full_path_file_name',fk_id_tbl_visitors='$fk_id', datetime_created=NOW(),user_ip='$user_ip',fk_visitor_scan_id='$fk_visitor_scan_id'\";\r\n\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t $insert_image_query=\"INSERT INTO tbl_upl SET name='$full_path_file_name',type='$file_type',fk_id='$fk_id', date_created=NOW(),user_ip='$user_ip'\";\r\n\t\t\t\t\t\t\t\t\t \t//echo $insert_image_query;\r\n\t\t\t\t\t\t \t\t\tmysqli_query($dbh,'SET GLOBAL max_allowed_packet = ' . 500 * 1024 * 1024);\r\n\t\t\t\t\t\t\t\t\t\tmysqli_query($dbh,$insert_image_query) or die (mysqli_query());\r\n\r\n\t\t\t\t\t\t\t\t\t\techo '<div align=\"center\" style=\"color:green\">Uploaded Successfully!</div>';\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//echo \"here\";\r\n\t\t\t\t\t\t\t//exit;\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//\t\t }\r\n\t\t\t\t\t\t//\t\t else\r\n\t\t\t\t\t\t//\t\t {\r\n\t\t\t\t\t\t//\t\t\t\t\tif(file_exists('../galleryimages/'.$new_file_name))\r\n\t\t\t\t\t\t//\t\t\t\t\t{\r\n\t\t\t\t\t\t//\t\t\t\t\t\tunlink('../galleryimages/'.$new_file_name);\r\n\t\t\t\t\t\t//\t\t\t\t\t}\r\n\t\t\t\t\t\t//\t\t\t\t $sMsg = '<span style=\"color:#F00\">Error on Inserting Record</span>';\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 #####################################################\r\n\t\t\t\t \r\n\t\t\r\n\t//primary id of main table record\r\n\t$p_id =$fk_id;\r\n\r\n\tif($is_edit == 1) //edit document so delete previous document\r\n\t{/*\r\n\t\t$query_upd=\"UPDATE tbl_upl SET is_del='1',date_updated=NOW() WHERE fk_id = '$p_id'\";\r\n\t\tmysql_query($query_upd) or die (mysql_query());*/\r\n\t}\r\n\t\r\n\t\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\techo '<div align=\"center\" style=\"color:green\">Uploaded Successfully!</div>';\r\n\t\t\t\t\t\t\t//exit;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\r\n\t}\r\n\telse\r\n\t {\r\n\t\t echo '<div align=\"center\" style=\"color:red\">Invalid file</div>';\r\n\t\t $errors=1;\r\n\t\t //exit;\r\n\t }\r\n\t\t\r\n\t\t/////////////////////////////////////////////\r\n\t\t\r\n\t\t$i++;\r\n\t} // end foreach\r\n}", "title": "" }, { "docid": "d5c4734325c60be15b1a3e7d20896ffc", "score": "0.49859512", "text": "function upload($file,$path=\"\",$assignedName=\"\") {\n $this->controlFile($file);\n if ($this->isError) {\n echo $this->error;\n }\n else {\n $ext = substr(basename($file['name']), strrpos(basename($file['name']), '.') + 1);\n //giving name start\n if($this->assignedName){\n $filename = time().\".\".$ext;\n }\n else{\n $filename = basename($file['name']);\n }\n\n // Replace path with real value start\n $path_keys = array('%username%' ,'%year%','%month%','%day%');\n $replace_keys = array($userName, date(\"Y\"), date(\"m\"), date(\"d\"));\n // $userName e sağlam bir encapsulation yazılmalı\n for($i=0;$i<=3;$i++) {\n $this->path =str_replace($path_keys[$i], $replace_keys[$i], $this->path);\n }\n $umask = umask(0);\n if(!is_dir($this->path) && !@mkdir($this->path,0777,true)) {\n $this->error=\"Couldn't create folder\";\n //Buraya javascript yazılacak \"Couldn't create folder\" uyarısını çalıştıracak\n $this->isError = TRUE;\n }\n if(!@move_uploaded_file($file['tmp_name'], $this->path.'/'.$filename)) {\n $this->error=\"Couldn't upload the file to server\";\n //Buraya javascript yazılacak \"Couldn't upload the file to server\" uyarısını çalıştıracak\n //SecurityException yazılacak ~Mahmut\n $this->isError = TRUE;\n }\n umask($umask);\n } \n }", "title": "" }, { "docid": "daf4c54c0136c3220d173fcdc973c9f7", "score": "0.49785852", "text": "public function changeMod($setting = false) {\n\tif (!$setting) {$setting = Prefs::FILE_DEFAULT_PERMISSIONS;}\n\tif (!is_numeric($setting)) {throw new DStructGeneralException('FSPermission::changeMod() - value must be numeric');}\n\tchmod($this->path, $setting);\n}", "title": "" }, { "docid": "0c5017307257971ff1d3accc91dea1b8", "score": "0.4972029", "text": "function uploadEditImage( $FVARS, $sServerDir, $arAllowed, $arDenied, $maxSize, $maxWidth, $OldPicture, $rename=1){\n\t\t\t$sFileName = \"\";\n\t\t\t$oFile = $FVARS ;\n\n\t\t\t//Upload and delete old files, Get the posted file.\n\t\t\tif( !empty( $oFile['name'] ) ){\n\n\t\t\t\t// Get the uploaded file name and extension.\n\t\t\t\t$sFileName = $oFile['name'] ;\n\n\t\t\t\t//File size\n\t\t\t\tif( $oFile['size'] > $maxSize ){\n\t\t\t\t\t$resultReturn[\"Flag\"] = 1;\n\t\t\t\t\t$resultReturn[\"Msg\"] = \"ไฟล์รูปสมาชิกที่ท่าน Upload มีขนาดใหญ่เกินที่กำหนดไว้\";\n\t\t\t\t\t//echo \"File1 \". $resultReturn[\"Msg\"];\t\t\n\t\t\t\t}else{\n\t\t\t\t\t$resultReturn[\"Flag\"] = 0;\n\n\t\t\t\t\t//File Allowed\n\t\t\t\t\t$sOriginalFileName = $sFileName ;\n\t\t\t\t\t$sExtension = substr( $sFileName, ( strrpos($sFileName, '.') + 1 ) ) ;\n\t\t\t\t\t$sExtension = strtolower( $sExtension ) ;\n\n\t\t\t\t\t// Check if it is an allowed extension.\n\t\t\t\t\tif ( ( count($arAllowed) > 0 && !in_array( $sExtension, $arAllowed ) ) || ( count($arDenied) > 0 && in_array( $sExtension, $arDenied ) ) ){\n\t\t\t\t\t\t$resultReturn[\"Flag\"] = 1;\n\t\t\t\t\t\t$resultReturn[\"Msg\"] = \"ไฟล์รูปสมาชิกที่ท่าน Upload ไม่ได้รับอนุญาตครับ\";\n\t\t\t\t\t\t//echo \"File1 \". $resultReturn[\"Msg\"];\t\t\t\t\n\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$resultReturn[\"Flag\"] = 0;\n\n\t\t\t\t\t\t\t//Check width pixel\n\t\t\t\t\t\t\t$size = getimagesize($oFile['tmp_name']);\t\n\n\t\t\t\t\t\t\tif($size[0] > $maxWidth) { //ถ้าความกว้างมากกว่า 80 pixels (แก้ไขได้ที่ config)\n\t\t\t\t\t\t\t\t$resultReturn[\"Flag\"] = 1;\n\t\t\t\t\t\t\t\t$resultReturn[\"Msg\"] = \"ไฟล์รูปสมาชิกที่ท่าน Upload มีความกว้างเกินที่กำหนดไว้\";\n\t\t\t\t\t\t\t\t//echo \"File1 \". $resultReturn[\"Msg\"];\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$resultReturn[\"Flag\"] = 0;\n\n\t\t\t\t\t\t\t\t//echo \"Here Step 3\";\n\n\t\t\t\t\t\t\t\t//Delete Old Picture \n\t\t\t\t\t\t\t\tif (file_exists($sServerDir.$OldPicture)){\n\t\t\t\t\t\t\t\t\t@unlink($sServerDir.$OldPicture );\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Initializes the counter used to rename the file, if another one with the same name already exists.\n\t\t\t\t\t\t\t\t$iCounter = 0 ;\n\n\t\t\t\t\t\t\t\twhile ( true )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t// Compose the file path.\n\t\t\t\t\t\t\t\t\tif( $rename == 1 )\n\t\t\t\t\t\t\t\t\t\t$sFileName = date('YmdHis').FU::makeRandom().\".\".$sExtension;\n\t\t\t\t\t\t\t\t\t$sFilePath = $sServerDir . $sFileName ;\n\n\t\t\t\t\t\t\t\t\t// If a file with that name already exists.\n\t\t\t\t\t\t\t\t\tif ( is_file( $sFilePath ) )\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$iCounter++ ;\n\t\t\t\t\t\t\t\t\t\t$sFileName = FU::RemoveExtension( $sOriginalFileName ) . '(' . $iCounter . ').' . $sExtension ;\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\tmove_uploaded_file( $oFile['tmp_name'], $sFilePath ) ;\n\n\t\t\t\t\t\t\t\t\t\tif ( is_file( $sFilePath ) )\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$oldumask = umask(0) ;\n\t\t\t\t\t\t\t\t\t\t\tchmod( $sFilePath, 0777 ) ;\n\t\t\t\t\t\t\t\t\t\t\tumask( $oldumask ) ;\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\tbreak ;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\t\tif( $resultReturn[\"Flag\"] == 1 )\n\t\t\t\t\t$resultReturn[\"sFileName\"] = $OldPicture;\n\t\t\t\telse\n\t\t\t\t\t$resultReturn[\"sFileName\"] = $sFileName;\n\n\t\t\t}//if( !empty( $_FILES['file1'] ) )\n\t\t\telse{\n\t\t\t\t//$resultReturn[\"Flag\"] = 0;\n\t\t\t\t$resultReturn[\"sFileName\"] = $OldPicture;\n\t\t\t}\n\n\t\t\treturn $resultReturn;\n\t\t}", "title": "" } ]
a6179a35973dc6eaa54bb0cf566adbd4
Get the validation error message.
[ { "docid": "99f5d058d863891016135bb593771fbf", "score": "0.0", "text": "public function message()\n {\n return 'No se puede repetir esta asistencia.';\n }", "title": "" } ]
[ { "docid": "65153bf9fabc58f2513062719f2b388f", "score": "0.8515821", "text": "public function getValidationMessage()\n {\n return $this->getProperty(\"ValidationMessage\");\n }", "title": "" }, { "docid": "3c41c51185ad0a29f50dae65cf98eb1c", "score": "0.850115", "text": "public function get_error_message(){\n if($this->unvalidated_field)\n return $this->unvalidated_field->get_last_error();\n }", "title": "" }, { "docid": "fca13caedada3fd364cd7c8dd470686f", "score": "0.84748226", "text": "public function getValidationMessage(){\n\t\treturn $this->validationMessage;\n\t}", "title": "" }, { "docid": "196f9160318cb216daacc1e23b4a833e", "score": "0.8368853", "text": "public function message()\n {\n return 'The validation error message.';\n }", "title": "" }, { "docid": "196f9160318cb216daacc1e23b4a833e", "score": "0.8368853", "text": "public function message()\n {\n return 'The validation error message.';\n }", "title": "" }, { "docid": "0cdc4f05a28e36895f13086479fcdeea", "score": "0.814113", "text": "public function message()\n {\n return 'Invalid validation rule.';\n }", "title": "" }, { "docid": "69bd92fb8509e62fdfb90148e80b7f38", "score": "0.81285214", "text": "public function getErrorMessage() {\n return $this->error_message;\n }", "title": "" }, { "docid": "3d81f592689d3800072638bcc7b167be", "score": "0.81248343", "text": "private function getValidationErrorMessage(): string\n {\n $errors = $this->getValidationErrors()->flatten();\n $message = 'The Ymir API responded with errors';\n\n if ($errors->isEmpty()) {\n return $message;\n }\n\n $message .= \":\\n\";\n\n foreach ($errors as $error) {\n $message .= \"\\n * {$error}\";\n }\n\n return $message;\n }", "title": "" }, { "docid": "0b789e3c9b97675a76f1f8b83a842b6b", "score": "0.8094182", "text": "public function getErrorMessage()\n {\n return $this->error_message;\n }", "title": "" }, { "docid": "0b789e3c9b97675a76f1f8b83a842b6b", "score": "0.8094182", "text": "public function getErrorMessage()\n {\n return $this->error_message;\n }", "title": "" }, { "docid": "a7fd31d18103a059518f0fe0930712ea", "score": "0.8093675", "text": "public function message() {\n $message = 'Validate failed';\n switch ($this->validate_result) {\n case 'format':\n $message = trans('fileupload::validation.json_editor.format');\n break;\n case 'required':\n $message = trans('fileupload::validation.json_editor.required');\n break;\n }\n\n return $message;\n }", "title": "" }, { "docid": "13b1d3a761d9b1c49dabde8d2edf67dd", "score": "0.8015543", "text": "public function getMessage()\n\t{\n\t\treturn $this->errorMessage;\n\t}", "title": "" }, { "docid": "ca098dfa8e5f8a59cd9eeed9c4533169", "score": "0.80147874", "text": "public function getErrorMessage()\n {\n return $this->sErrorMessage;\n }", "title": "" }, { "docid": "fb8ac214f709395517d0d5a1583178dc", "score": "0.7990026", "text": "public function getNotValidMessage()\n {\n return $this->getValidatorChain()->getNotValidMessage();\n }", "title": "" }, { "docid": "ce42870d1c58be8e1093e12e188d4ab5", "score": "0.79605293", "text": "public function getErrorMessage() {\n return $this->error_message;\n }", "title": "" }, { "docid": "865fa4856b8b9f3d7094439d11745e7e", "score": "0.7925499", "text": "public function getMessage()\n {\n return $this->m_error;\n }", "title": "" }, { "docid": "23aa6f039c230208b1430088f6a9ec58", "score": "0.7919193", "text": "public function get_error_message()\n\t{\n\t\treturn $this->error;\n\t}", "title": "" }, { "docid": "135859f04841b3d2b3403888e25c7887", "score": "0.79142797", "text": "function getErrorMessage() {\n return $this->errorMesssage;\n }", "title": "" }, { "docid": "8376b5684c066c400f2fbbf7e6737093", "score": "0.7851712", "text": "public function message()\n {\n return 'Ocorreu um erro com a validação do formulário.';\n }", "title": "" }, { "docid": "bf41553194a275aa10225023b9fcea2e", "score": "0.78305393", "text": "public function getErrorMessage(): string\n {\n return $this->errorMessage;\n }", "title": "" }, { "docid": "4a9e9a61c563a5a422c6d33d0c5f124a", "score": "0.78289425", "text": "public function getErrorMessage() {\n\t\treturn $this->errorMessage;\n\t}", "title": "" }, { "docid": "e98be16e1ea1b98878cc1e9171ae6a73", "score": "0.78278995", "text": "public function getErrorMessage() {\n return $this->errorMessage;\n }", "title": "" }, { "docid": "5dda3106fcebe6aee480c28390a71fa2", "score": "0.78084075", "text": "public function getErrorMessage()\n {\n return $this->errorMessage;\n }", "title": "" }, { "docid": "5dda3106fcebe6aee480c28390a71fa2", "score": "0.78084075", "text": "public function getErrorMessage()\n {\n return $this->errorMessage;\n }", "title": "" }, { "docid": "5dda3106fcebe6aee480c28390a71fa2", "score": "0.78084075", "text": "public function getErrorMessage()\n {\n return $this->errorMessage;\n }", "title": "" }, { "docid": "5dda3106fcebe6aee480c28390a71fa2", "score": "0.78084075", "text": "public function getErrorMessage()\n {\n return $this->errorMessage;\n }", "title": "" }, { "docid": "5dda3106fcebe6aee480c28390a71fa2", "score": "0.78084075", "text": "public function getErrorMessage()\n {\n return $this->errorMessage;\n }", "title": "" }, { "docid": "5dda3106fcebe6aee480c28390a71fa2", "score": "0.78084075", "text": "public function getErrorMessage()\n {\n return $this->errorMessage;\n }", "title": "" }, { "docid": "35947d1396d29b75fce81348a658f5a1", "score": "0.779928", "text": "public function getError() {\n\t\t\treturn $this->validator->getError();\n\t\t}", "title": "" }, { "docid": "28c69b20544d621488bc15e44ff5ea1e", "score": "0.7795445", "text": "public function errorMessage() {\n $errorMsg = $this->getMessage(); \n return $errorMsg; \n }", "title": "" }, { "docid": "04d40f2d931e3e9fc93983a539ee2138", "score": "0.77716756", "text": "public function message()\n {\n return $this->validationFailures;\n }", "title": "" }, { "docid": "52c5cd418e045c15739376468da1626e", "score": "0.7771133", "text": "public function getErrorMessage()\n {\n return $this->getConfig('error_message');\n }", "title": "" }, { "docid": "7b284541bae95aae39d60b7c8477b24e", "score": "0.77663285", "text": "protected function getErrorMessage()\n {\n return $this->module->l('An error occurred while processing payment');\n }", "title": "" }, { "docid": "13bb68a333959a25655fc4b50728d081", "score": "0.77658075", "text": "public function message()\n {\n return $this->error_message;\n }", "title": "" }, { "docid": "8a6209d26ea00681d9e384a53ebeac10", "score": "0.77445906", "text": "protected function getInvalidFormDataMessage()\n {\n $singleName = $this->getEntityNameSingular();\n $message = \"The {$singleName} could not be saved. Please check the \" .\n \"errors and try again.\";\n return $this->translate($message);\n }", "title": "" }, { "docid": "ab3f2a34b1d8cba11a77caefe283a8b3", "score": "0.7735794", "text": "public function getError()\n {\n return $this->error_message;\n }", "title": "" }, { "docid": "80cd1fccf8787584706a93b38a530ca8", "score": "0.7723351", "text": "public function message()\n {\n return $this->error_msg;\n }", "title": "" }, { "docid": "693418b001627272490ccb8e5474da8d", "score": "0.77032304", "text": "public function getErrorMessage() {}", "title": "" }, { "docid": "1ec79b99eed90acf8608b36d8dd653e3", "score": "0.7700995", "text": "public function message()\n {\n return $this->errorMessage;\n }", "title": "" }, { "docid": "e03a3dbe535e42b9a05cd139baf37d8f", "score": "0.76960707", "text": "public function message()\n {\n return $this->errors;\n }", "title": "" }, { "docid": "612d0a0dd935fc35ed4e84b3482ddb62", "score": "0.7692295", "text": "public function getValidationError()\n {\n return $this->error;\n }", "title": "" }, { "docid": "03647fbdb2224b769590bca7eefee8bf", "score": "0.7685468", "text": "public function getErrorMessage()\n {\n return $this->errorMessages[$this->errorCode];\n }", "title": "" }, { "docid": "e5dfb98998791eaf5f4cb7cfd7f1316a", "score": "0.76819307", "text": "public function errorMessage()\n {\n return $this->getMessage();\n }", "title": "" }, { "docid": "7e091fa7ffae5bbdd07a576e81b5d5d4", "score": "0.76754814", "text": "static public function getErrorMessage() {\n\t\t\treturn self::$_errorMessage;\n\t\t}", "title": "" }, { "docid": "863aef85f45db49a0439270830a7d11a", "score": "0.7670069", "text": "public function getError() : string\n {\n return $this->error_message;\n }", "title": "" }, { "docid": "526b36275eafea0387368e3194b21413", "score": "0.76391876", "text": "public static function getErrorMessage(){\n\t\t\treturn self::$errorMessage;\n\t\t}", "title": "" }, { "docid": "9759736fdde7f48f0fcacead49ff7112", "score": "0.76276773", "text": "public function message()\n {\n return $this->error;\n }", "title": "" }, { "docid": "59dfd1524286b2dae46ff146fa630619", "score": "0.7611973", "text": "public function getErrMsg() {\n return $this->get(self::ERR_MSG);\n }", "title": "" }, { "docid": "5878338eeb1bdd16205d779703df0df2", "score": "0.7593284", "text": "public function getErrorMessage();", "title": "" }, { "docid": "85fa66ad6e48b641f16b894bdf811ff6", "score": "0.7582743", "text": "public function getErrorMessage()\n {\n return $this->errorMessages;\n }", "title": "" }, { "docid": "d28cabbae8b4bb2cdf287ba0ad60f39a", "score": "0.75746244", "text": "public function message()\n {\n return $this->isEmail ? trans('validation.email', [':attribute' => $this->value]) : trans('validation.mobile', [':attribute' => $this->value]);\n }", "title": "" }, { "docid": "5943792ee74dd3aed0bcc4f6a3bbcab3", "score": "0.75625616", "text": "function getErrorMessage()\n {\n return is_null($this->_sErrorMessage) ? NULL : (string) $this->_sErrorMessage;\n }", "title": "" }, { "docid": "117a852b986b3ea1abd1f4b6d488a3c8", "score": "0.75545144", "text": "public function getErrorMessage() {\n return $this->lastErrorMsg;\n }", "title": "" }, { "docid": "03a71d2048634d538b8965376e252c4d", "score": "0.75530034", "text": "public function getErrorMessage()\n {\n return parent::getErrorMessage();\n }", "title": "" }, { "docid": "24e64b849919cc7c3eb9aaa22f25129a", "score": "0.7546705", "text": "public function errorMessage() {\n //error message\n $errorMsg = 'Error on line ' . $this->getLine() . ' in ' . $this->getFile()\n . ': <b>' . $this->getMessage() . '</b>';\n return $errorMsg;\n }", "title": "" }, { "docid": "7f47a9c119b6f975be2fdb6b1eb197b3", "score": "0.7483643", "text": "public function errorMessage()\n\t{\n\t\tif ($this->errorMessage)\n\t\t{\n\t\t\treturn $this->errorMessage;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn \"No error\";\n\t\t}\n\t}", "title": "" }, { "docid": "8d72a4f81e2fcd08852420ead686f0b8", "score": "0.74649435", "text": "public function getValidationMsg()\n\t\t\t{\n\t\t\t\t$validationMsg[100]\t= \"Nomor sudah ada.\";\n\t\t\t\t$validationMsg[101]\t= \"Kode Unit Kompetensi sudah ada.\";\n\t\t\t\t$validationMsg[102]\t= \"Nomor Elemen Kompetensi sudah ada.\";\n\t\t\t\t$validationMsg[103]\t= \"Nomor Kriteria Unjuk Kerja sudah ada.\";\n\t\t\t\t$validationMsg[104]\t= \"File tidak valid.\";\n\t\t\t\t$validationMsg[105]\t= \"File sudah ada.\";\t\t\t\t\n\t\t\t\t$validationMsg[106]\t= \"Data berhasil ditambahkan\";\n\t\t\t\t$validationMsg[107]\t= \"Data gagal ditambahkan\";\n\t\t\t\t$validationMsg[108]\t= \"Data berhasil diperbarui\";\n\t\t\t\t$validationMsg[109]\t= \"Data gagal diperbarui\";\n\t\t\t\t$validationMsg[110]\t= \"Data gagal dihapus\";\n\t\t\t\t$validationMsg[111]\t= \"Apakah anda yakin ingin menyimpan data ini?\";\n\t\t\t\t$validationMsg[112]\t= \"Apakah anda yakin ingin mengupdate data ini?\";\n\t\t\t\t$validationMsg[113]\t= \"Apakah anda yakin ingin menghapus data ini?\";\n\t\t\t\t$validationMsg[114]\t= \"Data berhasil dihapus\";\n\t\t\t\t$validationMsg[115]\t= \"Data berhasil diverifikasi\";\n\t\t\t\t$validationMsg[116]\t= \"Data gagal diverifikasi\";\n\n\t\t\t\treturn $validationMsg;\n\t\t\t}", "title": "" }, { "docid": "93f75109c124eafebb57126536af876a", "score": "0.74515957", "text": "public function getErrorMessage ();", "title": "" }, { "docid": "9cd3f6456876e4ff1b4f2e8a8509b587", "score": "0.7450012", "text": "public function getErrorMessage()\n {\n $messages = $this->getMessage();\n $critical = $this->getCritical();\n $msgError = \"\";\n $i = 0;\n foreach ($messages as $message ) {\n\n if ($critical[$i++]) {\n $msgError .= \"{$message}\\n\";\n }\n }\n\n return $msgError;\n }", "title": "" }, { "docid": "b011a1cae7de9228468d7448b691a27d", "score": "0.7444169", "text": "public function getErrorMessage($param) {\n\t\treturn $this->error_message;\n }", "title": "" }, { "docid": "6200043fc792c681e217fb5644a59288", "score": "0.74369895", "text": "public function getErrorMessage()\n {\n if (is_array($this->errorInfo) === false) {\n return null;\n }\n\n return $this->errorInfo[2];\n }", "title": "" }, { "docid": "eb7171f15ecb6c0063f2f3fc010e5fdd", "score": "0.7434722", "text": "public function getMessage()\n {\n if (!$this->isSuccessful() && isset($this->data['error']) && isset($this->data['error']['message'])) {\n return $this->data['error']['message'];\n }\n\n return null;\n }", "title": "" }, { "docid": "048bab2465e9777c761a5210cfc0ae4c", "score": "0.74177736", "text": "public function getErrorMessage(): string\n {\n return $this->response->error->message ?? '';\n }", "title": "" }, { "docid": "2b373dd964d5afd65f9fa3bad78f1784", "score": "0.74171644", "text": "function getValidationError() { return $this->_validation_error; }", "title": "" }, { "docid": "2b373dd964d5afd65f9fa3bad78f1784", "score": "0.74171644", "text": "function getValidationError() { return $this->_validation_error; }", "title": "" }, { "docid": "7d7dcddb263c2655a4023db2d42544d6", "score": "0.7398696", "text": "public function message()\n {\n return $this->responseMessage ?? 'Invalid input.';\n }", "title": "" }, { "docid": "45b3203ce6b70ed6c5483273b6575d6b", "score": "0.739062", "text": "public function message()\n {\n return trans('validation.matrix.invalid');\n }", "title": "" }, { "docid": "b35aed60105e3ec214303f8f12a05d81", "score": "0.7387386", "text": "public function message()\n {\n return 'The Chechbox field is invalid.';\n }", "title": "" }, { "docid": "c1fdd874de8c3f04f6d161edf9197ca5", "score": "0.73854375", "text": "public function getErrorMessageRequired()\n {\n return $this->errorMessageRequired;\n }", "title": "" }, { "docid": "87a3ee27a1ac85d1127d1c26f836ff8a", "score": "0.7380039", "text": "public function getErrMsg()\n {\n return $this->err_msg;\n }", "title": "" }, { "docid": "99c57c9ada67f5749569cfafdf940dce", "score": "0.7341152", "text": "public function getErrorMessage(): ?string {\n return $this->_message;\n }", "title": "" }, { "docid": "8da40a78c457eda7747b08c352ebef6a", "score": "0.73200464", "text": "function getErrorMessage()\n {\n return $this->_error;\n }", "title": "" }, { "docid": "70f711c63411f0895ba19f68b6901ce3", "score": "0.73090154", "text": "public function getErrorMsg()\n {\n return $this->errorMsg;\n }", "title": "" }, { "docid": "db1f05850c6bea51c607dc9a5da28d66", "score": "0.73021436", "text": "public function getErrorMsg()\n {\n return $this->error_msg;\n }", "title": "" }, { "docid": "d59a6437fcf6f280e342785821229536", "score": "0.7288226", "text": "protected function get_error_message()\n\t{\n\t\tswitch ($this->error)\n\t\t{\n\t\t\tcase UPLOAD_ERR_OK:\n\n\t\t\t\treturn null;\n\n\t\t\tcase UPLOAD_ERR_INI_SIZE:\n\n\t\t\t\treturn $this->format(\"Maximum file size is :size Mb\", [ ':size' => (int) ini_get('upload_max_filesize') ]);\n\n\t\t\tcase UPLOAD_ERR_FORM_SIZE:\n\n\t\t\t\treturn $this->format(\"Maximum file size is :size Mb\", [ ':size' => 'MAX_FILE_SIZE' ]);\n\n\t\t\tcase UPLOAD_ERR_PARTIAL:\n\n\t\t\t\treturn $this->format(\"The uploaded file was only partially uploaded.\");\n\n\t\t\tcase UPLOAD_ERR_NO_FILE:\n\n\t\t\t\treturn $this->format(\"No file was uploaded.\");\n\n\t\t\tcase UPLOAD_ERR_NO_TMP_DIR:\n\n\t\t\t\treturn $this->format(\"Missing a temporary folder.\");\n\n\t\t\tcase UPLOAD_ERR_CANT_WRITE:\n\n\t\t\t\treturn $this->format(\"Failed to write file to disk.\");\n\n\t\t\tcase UPLOAD_ERR_EXTENSION:\n\n\t\t\t\treturn $this->format(\"A PHP extension stopped the file upload.\");\n\n\t\t\tdefault:\n\n\t\t\t\treturn $this->format(\"An error has occurred.\");\n\t\t}\n\t}", "title": "" }, { "docid": "9c8ae3ace39fea509f5ed5582c308b4a", "score": "0.72869796", "text": "protected function validationErrorMessages()\n {\n return trans('service/auth/reset.validation');\n }", "title": "" }, { "docid": "3a694a4f929048a92c5058ba7a2ef80b", "score": "0.7272742", "text": "public function getErrorMessage(): string\n {\n static $errors = [\n \\UPLOAD_ERR_INI_SIZE => 'The file \"%s\" exceeds your upload_max_filesize ini directive (limit is %d KiB).',\n \\UPLOAD_ERR_FORM_SIZE => 'The file \"%s\" exceeds the upload limit defined in your form.',\n \\UPLOAD_ERR_PARTIAL => 'The file \"%s\" was only partially uploaded.',\n \\UPLOAD_ERR_NO_FILE => 'No file was uploaded.',\n \\UPLOAD_ERR_CANT_WRITE => 'The file \"%s\" could not be written on disk.',\n \\UPLOAD_ERR_NO_TMP_DIR => 'File could not be uploaded: missing temporary directory.',\n \\UPLOAD_ERR_EXTENSION => 'File upload was stopped by a PHP extension.',\n ];\n\n $errorCode = $this->error;\n $maxFilesize = \\UPLOAD_ERR_INI_SIZE === $errorCode ? self::getMaxFilesize() / 1024 : 0;\n $message = $errors[$errorCode] ?? 'The file \"%s\" was not uploaded due to an unknown error.';\n\n return sprintf($message, $this->getClientOriginalName(), $maxFilesize);\n }", "title": "" }, { "docid": "8026c34cdd94c742e2e9dd267aefec2a", "score": "0.722885", "text": "public function getError() {\n\t\t$name = $this->name();\n\t\treturn $this->form()->getErrorByElementName($name);\n\t}", "title": "" }, { "docid": "fe4c1a33861a1557f3f3e742cc5848d4", "score": "0.72194344", "text": "protected function getMessage() {\n\t\tif($message = $this->defaultMessage) {}\n\t\telse $message = ':attribute is not valid.';\n\n\t\t$params = [\n\t\t\t'attribute' => $this->getName(),\n\t\t];\n\t\treturn $this->format($message, $params);\n\t}", "title": "" }, { "docid": "a1c00de5a60c38f6c481b3f545481ecd", "score": "0.72130704", "text": "public function getErrorMessage() {\n $message = false;\n\n if (!$this->wasSuccessful()) {\n // Check for API status errors\n $api_status_code = $this->getApiStatusCode();\n if ($api_status_code !== false) {\n $message = $this->getApiStatusCodeDescription($api_status_code);\n } else {\n // Check for response parse errors\n $xml_parse_errors = $this->getXmlParseErrors();\n if (!empty($xml_parse_errors)) {\n $message = \"Failed to parse the API response: \" . implode(\", \", $xml_parse_errors);\n } else {\n // Check for HTTP errors\n $http_status_code = $this->getHttpStatusCode();\n if (!is_null($http_status_code)) {\n $message = \"HTTP Error: \" . Zend_Http_Response::responseCodeAsText($http_status_code);\n } else {\n $message = \"Unknown error\";\n }\n }\n }\n }\n\n return $message;\n }", "title": "" }, { "docid": "c80e7d6eea4bfb0ef83b07e2351bf272", "score": "0.7199025", "text": "function getErrorMsg() {\n return $this->errorMsg;\n }", "title": "" }, { "docid": "01cf79dd69eebaf03769e12eb3208858", "score": "0.7198956", "text": "public function message()\n {\n return trans('validation.rut');\n }", "title": "" }, { "docid": "fb6029b87305a38c43d5d21e1990ce7e", "score": "0.7192125", "text": "public function message()\n {\n return Lang::get('validation.regex');\n }", "title": "" }, { "docid": "fcda8f68974790696b92a6492aa18ea8", "score": "0.7178282", "text": "public function message()\n {\n return 'The :attribute is not valid.';\n }", "title": "" }, { "docid": "b31c10bc605dd58881a61e2f96a61559", "score": "0.71763974", "text": "public function getErrorMessage()\n {\n $error = $this->_checkoutSession->getErrorMessage();\n return $error;\n }", "title": "" }, { "docid": "d6c434095ffbee7872e41cfe3cc64896", "score": "0.71741873", "text": "public function message()\n {\n return __('validation.cpf');\n }", "title": "" }, { "docid": "0cbcb9c417711e7b7b5c5f08b0b1f19b", "score": "0.7169085", "text": "public function getError(): string\n {\n return $this->error;\n }", "title": "" }, { "docid": "3682d19a7638dfbb639a4e279d4918d5", "score": "0.7164753", "text": "public function get_error_messages()\n {\n $error_message = implode('. ', $this->_error_messages);\n return $error_message;\n }", "title": "" }, { "docid": "0d92534065ba77ff9c46a2c13ae59d46", "score": "0.7161998", "text": "public function getError(): string {\n\t\treturn $this->error;\n\t}", "title": "" }, { "docid": "c14b8481babd642f5061e48c894725f4", "score": "0.71543217", "text": "public function getError()\n {\n return $this->errMsg;\n }", "title": "" }, { "docid": "c14b8481babd642f5061e48c894725f4", "score": "0.71543217", "text": "public function getError()\n {\n return $this->errMsg;\n }", "title": "" }, { "docid": "bc9865983d93e5c06127cfec04370aa3", "score": "0.71470195", "text": "public function getErrorMessage(){\r\n \r\n \r\n switch( $this->getError() ){\r\n case UPLOAD_ERR_OK:\r\n $message = \"There is no error, the file uploaded with success.\";\r\n break;\r\n case UPLOAD_ERR_INI_SIZE:\r\n $message = \"The uploaded file exceeds the upload_max_filesize directive in php.ini.\";\r\n break;\r\n case UPLOAD_ERR_FORM_SIZE:\r\n $message = \"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.\";\r\n break;\r\n case UPLOAD_ERR_PARTIAL:\r\n $message = \"The uploaded file was only partially uploaded.\";\r\n break;\r\n case UPLOAD_ERR_NO_FILE:\r\n $message = \"No file was uploaded.\";\r\n break;\r\n case UPLOAD_ERR_NO_TMP_DIR:\r\n $message = \"Missing a temporary folder.\";\r\n break;\r\n case UPLOAD_ERR_CANT_WRITE:\r\n $message = \"Failed to write file to disk.\";\r\n break;\r\n case UPLOAD_ERR_EXTENSION:\r\n $message = \"File upload stopped by extension.\";\r\n break;\r\n case 5:\r\n $message = \"Empty file.\";\r\n break;\r\n default:\r\n $message = \"Unknown upload error\";\r\n break;\r\n }\r\n return $message; \r\n \r\n }", "title": "" }, { "docid": "cb3843c63325767c377bf1bdef705f2d", "score": "0.71437126", "text": "#[Pure] public function getErrorString(): string\n {\n $errors = $this->getErrors();\n if (count($errors) == 0) {\n return false;\n }\n return implode(' ', $errors);\n }", "title": "" }, { "docid": "cc3e1b92b271626ab43fb62f6c317723", "score": "0.71430486", "text": "public function getErrMsg() {\n $errMsg = 'Error on line ' . $this->getLine() . ' in ' . $this->getFile()\n . '<br><b>' . $this->getMessage() . ' </b><br>' . 'Upload Form Exception';\n return $errMsg;\n }", "title": "" }, { "docid": "e52b4be382f5e4c9629b25e67e4d4901", "score": "0.7129078", "text": "public function getErrorMessage() {\n return $this->clientErrorMessage;\n }", "title": "" }, { "docid": "598d9a786f118fab83fd29427b3fcd9a", "score": "0.71280354", "text": "public function getError(): string\n\t{\n\t\treturn $this->error;\n\t}", "title": "" }, { "docid": "c3a95ff0f431444ad36f8b7c7a9e0351", "score": "0.71239495", "text": "public function message()\n {\n return trans()->has('validation.enum')\n ? __('validation.enum')\n : 'The :attribute value you have entered is invalid.';\n }", "title": "" }, { "docid": "cce89792ef84aa34ac5d239a18f9ec5d", "score": "0.7110141", "text": "function error_message ( ) {\n\t\t$err = $this->error;\n\t\t$this->error = FALSE;\n\t\treturn $err;\n\t}", "title": "" }, { "docid": "0b37eeca69dbdbc8538d3ab04960ef44", "score": "0.7099195", "text": "protected function getDefaultValidationMessage()\n {\n // Use default message if it's set\n // Use localized message based on the message key otherwise\n // Message key should be overwritten in child classes\n\n $message = empty($this->defaultMessage) ? __($this->defaultMessageLangKey) : $this->defaultMessage;\n\n return $message;\n }", "title": "" }, { "docid": "d8d66376ad0be71bd9a13a691f5bee9d", "score": "0.7088243", "text": "public abstract function getErrorMessage();", "title": "" }, { "docid": "201c4ec094070714f5af8a6489c7536e", "score": "0.70806116", "text": "public function message()\n {\n return 'The phone number is invalid!';\n }", "title": "" } ]
bc06b00a20e85941bb176aff4ea5aa38
Check whether a custom model is to be used.
[ { "docid": "6f254e3015c7d15906ebc593692a177c", "score": "0.0", "text": "public function from($from, $primary_key = null, $db = null) {\n\n if (is_object($from)) {\n\n if ($this->is_custom_model($from, true)) {\n\n // $front is a model that extends our custom Core_Model.\n // See https://github.com/ivantcholakov/codeigniter-base-model\n $this->db = $from;\n $this->primary_key = $this->db->primary_key();\n\n } else {\n\n // Wrong object type has been passed, abort.\n $this->clear();\n }\n\n return $this;\n }\n\n // The normal Query builder has been chosen here.\n\n // Set the Query Builder.\n if (is_object($db)) {\n\n $this->db = $db;\n }\n\n // Set the table and the primary key.\n if (is_object($this->db)) {\n\n $this->db->from($from);\n\n if ($primary_key !== null) {\n $this->primary_key = $primary_key;\n }\n\n } else {\n\n // The Query Builder is missing, abort.\n $this->clear();\n }\n\n return $this;\n }", "title": "" } ]
[ { "docid": "3fc26573a47fe0709da081d3e206cd7d", "score": "0.71454823", "text": "protected function hasModel()\n {\n return isset($this->model) && $this->model instanceof Model;\n }", "title": "" }, { "docid": "1977ab620378e8145874822a354257c1", "score": "0.70254326", "text": "public function isPluginModel($modelName)\n {\n return isset($this->pluginModels[$modelName]);\n }", "title": "" }, { "docid": "84ad6f199ef4b50c7949f47ffeb703c4", "score": "0.6929807", "text": "public function hasValidModelClass()\n {\n return $this->ModelClass && $this->ModelClass != DataObject::class && is_a( $this->ModelClass, DataObject::class, true );\n }", "title": "" }, { "docid": "a46f6dc34d10bca9e3c4719e70952fc8", "score": "0.67077917", "text": "public function hasModel($modelName) {\n if (!is_string($modelName) || $modelName == '') {\n throw new OrmException('Provided modelname is empty or invalid');\n }\n\n return isset($this->models[$modelName]);\n }", "title": "" }, { "docid": "74f0808d3a49e7d574a0fca96909be7c", "score": "0.66661876", "text": "public function isOnSelf()\n {\n $model = $this->getTargetModel();\n\n return $model === $this->getMeta()->getModelClass() || $model === 'self';\n }", "title": "" }, { "docid": "898965e9b50e7f0ed2c11f0ad2756681", "score": "0.66594124", "text": "function hasModel( $a_model )\r\n\t{\r\n\t\tswitch( gettype($a_model) )\r\n\t\t{\r\n\t\t\tcase 'string':\r\n\t\t\t\treturn array_key_exists(Zoombi_String::normalize($a_model), $this->m_models);\r\n\r\n\t\t\tcase 'object':\r\n\t\t\t\tforeach( $this->m_models as $a_model )\r\n\t\t\t\t{\r\n\t\t\t\t\tif( $a_model === $model )\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "9a7e4bb56499b6aea065b2ea07be884a", "score": "0.661405", "text": "protected function _checkElementModelCompliance($model)\n {\n return ($model instanceof BL_CustomGrid_Object);\n }", "title": "" }, { "docid": "2051cd6f8be0c4b96caa5931b6dc28a0", "score": "0.6595386", "text": "protected function isModelUseFilter()\n {\n return method_exists($this->modelClass, 'scopeSetFilterAndRelationsAndSort');\n }", "title": "" }, { "docid": "3e5b8d9fa979c7ed660ac24bd6af82f5", "score": "0.6575721", "text": "public function locateModel()\n\t{\n\t\tforeach ($this->locate_methods as $method)\n\t\t{\n\t\t\tif ($method->invoke())\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\t\treturn FALSE;\t\n\t}", "title": "" }, { "docid": "d85390169c9b78b31bcb9fa27a3ede5f", "score": "0.6574897", "text": "public function test_model_exists()\n {\n return $this->assertNotNull($this->getModel());\n }", "title": "" }, { "docid": "2db574e47307306d02dd3f233c73ab8f", "score": "0.6471969", "text": "public function exists(object $model): bool;", "title": "" }, { "docid": "5ef7009e0948d9b3e3f90981286a3d03", "score": "0.64719164", "text": "public static function exists($model) {\n return class_exists(self::className($model));\n }", "title": "" }, { "docid": "0889bdf9d6e2f928bf700800a5ea5609", "score": "0.63646406", "text": "protected function alreadyUsesRaclUserTrait($model)\n {\n return in_array(RaclUserTrait::class, class_uses($model));\n }", "title": "" }, { "docid": "f662f6ae6c6bc258c293b81a836eec8a", "score": "0.6337027", "text": "public function represents($model): bool;", "title": "" }, { "docid": "157cb951f868b2c4a20594a4d8229f3e", "score": "0.63037133", "text": "abstract public function isAllowedModel(AbstractModel $model);", "title": "" }, { "docid": "54296f016d44c1183d6192afd1aa4f81", "score": "0.6286769", "text": "public function isModelExists($name)\n {\n return isset($this->models[$name]);\n }", "title": "" }, { "docid": "6ec7c4d134dcfc0411d213cb30161303", "score": "0.6249515", "text": "abstract protected function modifyExistence(Model $model): bool;", "title": "" }, { "docid": "15eefd70bf6ef0071740bb58989e3464", "score": "0.62414944", "text": "public function modelExist() {\n if(trim($this->name) == '') return false;\n if(trim($this->url) == '') return false;\n $count = self::find()\n ->where(['name' => $this->name, 'url' => $this->url])\n ->count();\n return $count ? true : false;\n }", "title": "" }, { "docid": "a18515d4b2203945024f4a335f28fcde", "score": "0.623673", "text": "public function hasLoadedModel($modelName)\n {\n $modelName = ucfirst($modelName);\n\n return (isset($this->_loaded[$modelName]));\n }", "title": "" }, { "docid": "ce018a94c4b8f2c9f2884d7ef13c1d64", "score": "0.62290716", "text": "public function hasModelDateTime() {\n\t\treturn ($this->model instanceof ModelDateTime);\n\t}", "title": "" }, { "docid": "5870f707b8a825d2d2804631370b724b", "score": "0.6206601", "text": "public function isModelPart()\n {\n return $this->_type === self::TYPE_MODEL_PART;\n }", "title": "" }, { "docid": "1d612800cedff55a60864a686aa7577b", "score": "0.61728144", "text": "function is_class_load(){ return data_model::is_load(get_class($this)); }", "title": "" }, { "docid": "91c82f003c4e5cf850709070b7c9fd03", "score": "0.61581624", "text": "public function __isset($name) {\n\t\tswitch ($name) {\n\t\t\tcase 'base':\n\t\t\tcase 'here':\n\t\t\tcase 'webroot':\n\t\t\tcase 'data':\n\t\t\tcase 'action':\n\t\t\tcase 'params':\n\t\t\treturn true;\n\t\t}\n\n\t\tif (is_array($this->uses)) {\n\t\t\tforeach ($this->uses as $modelClass) {\n\t\t\t\tlist($plugin, $class) = pluginSplit($modelClass, true);\n\t\t\t\tif ($name === $class) {\n\t\t\t\t return $this->loadModel($modelClass);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ($name === $this->modelClass) {\n\t\t\tlist($plugin, $class) = pluginSplit($name, true);\n\t\t\tif (!$plugin) {\n\t\t\t \t$plugin = $this->plugin ? $this->plugin . '.' : null;\n\t\t\t}\n\t\t\treturn $this->loadModel($plugin . $this->modelClass);\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "f0452e5d7f175098ccd0eca9441f14ca", "score": "0.61526036", "text": "public function isModelRoute()\n {\n return false !== $this->getModelModuleKeyForRouteNameSegment(\n $this->getModelRouteNameSegment()\n );\n }", "title": "" }, { "docid": "9b1be57fbff4f3f9a1d0edb7e93f0cef", "score": "0.6129893", "text": "public function checkModel(ActiveRecord $model);", "title": "" }, { "docid": "ac821aa1ffa9a13a2a8337ddb8c9821b", "score": "0.6111135", "text": "public function itemExists(object $model): bool;", "title": "" }, { "docid": "4c0d26c44cbb3b2519d588ebf0f5bbe4", "score": "0.6104415", "text": "public function has($model);", "title": "" }, { "docid": "ae8c33898f82da7d69d63156fff1f82f", "score": "0.60654336", "text": "public function validateModel($request)\n\t{\n\t\t$hasModel = in_array('model',array_keys($request));\n\t\tif( false==$hasModel )\n\t\t{\n\t\t\t$this->setMessageState('modelIdIsMissing');\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$unitModel = new Unit_Model_UnitModel();\n\t\t\t$exists = $unitModel->exists(array('table'=>'unitModel','column'=>'id'), $request['model']);\n\t\t\tif( false==$exists )\n\t\t\t{\n\t\t\t\t$this->setMessageState('modelIdNotValid');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "97a0604af889d79f1ab247ce2fa10611", "score": "0.6051622", "text": "public function has(string $modelClass): bool\n {\n return isset($this->metas[$modelClass]);\n }", "title": "" }, { "docid": "64e494987b4277d523745fea98df1625", "score": "0.59954524", "text": "protected function modelFileExists($model)\n {\n return file_exists( base_path(lcfirst($model).'.php')) || file_exists( base_path(lcfirst(str_replace('\\\\', '/', $model)).'.php'));\n }", "title": "" }, { "docid": "089baf096d96f0b27e8ceb4a608f2f47", "score": "0.59584546", "text": "protected function _validateModel(){\n return true;\n }", "title": "" }, { "docid": "bba1e4e3a31e52876e2f7387ba163e43", "score": "0.59429204", "text": "public function isExist(){\n\t\techo $this->model->isExist();\n\t}", "title": "" }, { "docid": "56343e87cbb5484005d5bfaa023a2768", "score": "0.5920356", "text": "public function modelsAreScanned()\n {\n return $this->app->make('files')->exists($this->getScannedModelsPath());\n }", "title": "" }, { "docid": "c060d0903bbb29ab46cbbcfabca844f2", "score": "0.586636", "text": "public function validateModelConfig(Mage_Core_Model_Abstract $model)\n {\n $config = $this->getConfig();\n $className = get_class($model);\n $available = array_keys($config->asArray());\n\n return (in_array($className, $available));\n }", "title": "" }, { "docid": "5ebb8d080eabdb77bb53898faf6aa661", "score": "0.5863114", "text": "public static function canUse()\n\t{\n\t\treturn Loader::includeModule('seo') && Loader::includeModule('socialservices');\n\t}", "title": "" }, { "docid": "5f08a0605472ff5a3d8bd56abc377047", "score": "0.585929", "text": "public static function model_exist($page) {\n $path = 'app/models/';\n $models = scandir($path);\n if (in_array($page . '.php', $models)) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "596cff623b59f6627b3f29c549ae6c15", "score": "0.5842745", "text": "public function existsModel($uid, $allowHidden = FALSE) {\n\t\t$model = $this->find($uid);\n\n\t\tif ($model->isGhost()) {\n\t\t\t$this->load($model);\n\t\t}\n\n\t\treturn $model->isLoaded() && (!$model->isHidden() || $allowHidden);\n\t}", "title": "" }, { "docid": "d390a7f445ec30bcdde5c658a7dca46b", "score": "0.5841735", "text": "protected function shouldProcess(Model $model)\n {\n return 'post-stream' === $model->getType();\n }", "title": "" }, { "docid": "fedc3a4423e9224f83c5eedd11ca8b70", "score": "0.5840949", "text": "public function hasMetaSystem()\n {\n return $this->hasField('meta');\n }", "title": "" }, { "docid": "3192f097e9bb282f8d6bbae989e39793", "score": "0.58385175", "text": "protected function isModelClass($snippet)\n {\n return preg_grep(\"/class\\s([a-zA-Z]+)\\sextends\\sModel/\", explode(\"\\n\", $snippet));\n }", "title": "" }, { "docid": "fff78378dcad86cf86b829c7fbd8d542", "score": "0.58260906", "text": "public static function supportsRequired(): bool;", "title": "" }, { "docid": "21cc9be62cc1295992e094b20e6aa71a", "score": "0.58043414", "text": "public function isUsingCustomProvider(): bool;", "title": "" }, { "docid": "954366f1991e1ea1cdefbf6e91f4c6a5", "score": "0.579771", "text": "public function getIsModelAdmin() {\n if ($this->getHolder()->getKey() == \"SiteConfig\")\n return true;\n $parts = explode('.', $this->path);\n return reset($parts) == \"Components\";\n }", "title": "" }, { "docid": "7a6184122439e5c437d26fea6d33c281", "score": "0.5784793", "text": "public function hasCustom(){\n return $this->_has(8);\n }", "title": "" }, { "docid": "d6807ec3233ff16045fa0e87ab973e28", "score": "0.5781979", "text": "public function is_needed() {\n\t\t$post_types = apply_filters( 'be_product_review_schema_post_types', array( 'post' ) );\n\t\tif( is_singular( $post_types ) ) {\n\t\t\t$display = get_post_meta( $this->context->id, 'be_product_review_include', true );\n\t\t\tif( 'on' === $display ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "c1bbef206b716c0b92f3e8e7de67591e", "score": "0.57723916", "text": "function is_plugin_active() {\r\n\t\tif ( class_exists('RGFormsModel') && method_exists('RGFormsModel', 'get_forms') ) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "329dc028b88020d4410613972c925725", "score": "0.57651937", "text": "function test_models_loaded(){\n\n $this->assertTrue(class_exists('BookModel'), 'Verify if the class BookModel has been loaded');\n $this->assertTrue(class_exists('MagazineModel'), 'Verify if the class BookModel has been loaded');\n\n }", "title": "" }, { "docid": "cc175416cfc9326f748a0a24b9cc08b7", "score": "0.57617396", "text": "public function determine_if_model_has_permission()\n {\n $this->assertFalse($this->testUser->can('edit-articles'));\n }", "title": "" }, { "docid": "66c8fe93dc9a19c779efaa5d20d40e05", "score": "0.57496", "text": "private function _process_custom_validate()\n\t{\n\t\t$valid = true;\n\n\t\t$methods = get_class_methods(get_class($this));\n\t\tforeach($methods as $method) {\n\t if (strpos($method, 'validate_') === 0) {\n\t\t\t\tif (!$this->$method()) {\n\t\t\t\t\t$valid = false;\n\t\t\t\t}\n\t }\n\t\t}\n\n\t\treturn $valid;\n\n\t}", "title": "" }, { "docid": "c1ef5c3f3615683442cccd88f7966c57", "score": "0.57369626", "text": "protected function validateModel()\n {\n // Validation is currently only implemented in the subclasses.\n }", "title": "" }, { "docid": "ea957e086cf84fada916778a62e88dfb", "score": "0.57162446", "text": "private function checkForMissedModels()\n {\n $select = $this->connection->select()\n ->from($this->addTemporaryTableSuffix(), [ModelInterface::HMDNR])\n ->distinct(true)\n ->where('model_id is null');\n $modelNotFound = $this->connection->fetchCol($select);\n if ($modelNotFound) {\n $this->errors[] = __('Next model HMDNR are not found during registrations import: %1', implode(', ', $modelNotFound));\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "65e016a286db2c6e81ccdbf84ccf89ae", "score": "0.5708779", "text": "public function isUsingDynamicUpdate(\\Phalcon\\Mvc\\ModelInterface $model): bool\n {\n }", "title": "" }, { "docid": "a070ba4bda3c3b19391089b9d1b01041", "score": "0.5701747", "text": "private function isModelAMemoryOnlyDummy(Tx_Oelib_Model $model) {\n\t\tif (!$model->hasUid()) {\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn isset($this->uidsOfMemoryOnlyDummyModels[$model->getUid()]);\n\t}", "title": "" }, { "docid": "f39406358e033c769ef4cbafdcbdfc05", "score": "0.56968874", "text": "public function isForCustomer()\n {\n return $this->tokenable_type == Customers_model::make()->getMorphClass();\n }", "title": "" }, { "docid": "e0560b7683efebf8ada8e9b14efc5cdd", "score": "0.56857026", "text": "function is_bread_translatable($model): bool\n {\n return \\Illuminate\\Support\\Facades\\Config::get('site.multilingual.enabled', true)\n && isset($model)\n && method_exists($model, 'translatable')\n && $model->translatable();\n }", "title": "" }, { "docid": "45a89ffd932249b4df4b1649e47c58e5", "score": "0.5674907", "text": "public static function isCustom($type, $autoload=true)\n {\n return class_exists($type, $autoload) || interface_exists($type, $autoload) || trait_exists($type, $autoload);\n }", "title": "" }, { "docid": "f4d94fd33e74e7f78a129c7bdc51fa44", "score": "0.56660104", "text": "public function isUniqueModelSimple() {\n\t\treturn $this->model instanceof ModelContainer\n\t\t\t? $this->model->isUniqueModelSimple()\n\t\t\t: $this->model instanceof SimpleModel;\n\t}", "title": "" }, { "docid": "b8e94b99348bce6be0e2970473172b96", "score": "0.56659955", "text": "public function isAnyModelAllowed($type = 'view') \n {\n return true;\n }", "title": "" }, { "docid": "eb60cf9cf0e3967eafaf1cc1d3dfd50b", "score": "0.5661847", "text": "protected function hasModel ($id) {\n\t\treturn isset ($this->models[$id]);\n\t}", "title": "" }, { "docid": "d4b110fd0817b9b5b20187e9147f0027", "score": "0.5651294", "text": "public function shouldShow()\n {\n $modelIsSelected = null != OntoWiki::getInstance()->selectedModel;\n\n if (true == $modelIsSelected) {\n\n $modelIsEditable = OntoWiki::getInstance()->selectedModel->isEditable();\n\n if (true == $modelIsEditable) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "66295636c5de1108d8d723fcbd8be5a8", "score": "0.5644342", "text": "protected function _bindModelByCfg() {\n\t\t$bindModelCfg = $this->_getBindModelCfg();\n\t\tif (empty($bindModelCfg)) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn $this->bindModel($bindModelCfg, false);\n\t}", "title": "" }, { "docid": "3634db68d139a17b22296a17393bd2f7", "score": "0.56389636", "text": "public function getProductUnitIsCustom()\n {\n $this->getProductUnit();\n return $this->_productUnitIsCustom;\n }", "title": "" }, { "docid": "5c6647580c7bedb701f9a60df0979572", "score": "0.5627372", "text": "public function testChecksModelName()\n {\n $this->assertEquals('oggetto_geodetection/location', $this->_collection->getModelName());\n }", "title": "" }, { "docid": "f887314b326edebbc7f6c260c1dd5cc5", "score": "0.56156236", "text": "public function check(ReflectionClass $controller)\n\t{\n\t\t// By default, only let controllers with a model defined into the menu\n\t\tif ($model = Arr::get($controller->getDefaultProperties(), '_model'))\n\t\t\treturn $model;\n\t\t\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "aa30c797de6c302c770a8c4b9d9b45e2", "score": "0.56107414", "text": "public function isThereNeedToConfigure(): bool\n {\n return ! isset($this->configureInstanceOfEntity)\n || isset($this->configureInstanceOfEntity) && $this->configureInstanceOfEntity\n ;\n }", "title": "" }, { "docid": "87775e14999a37ceaa4db96e65549e48", "score": "0.5602225", "text": "public function testChecksModelName()\n {\n $this->assertEquals('oggetto_geodetection/location_relation', $this->_collection->getModelName());\n }", "title": "" }, { "docid": "e6e004d3cec569dd07bd9f654bc9743b", "score": "0.5599318", "text": "public function isMetable($item)\n { \n return in_array(Metable::class, class_uses_recursive($item));\n }", "title": "" }, { "docid": "f89597384e9f2104d5a88e5cc26c017a", "score": "0.55883175", "text": "public function isCandidate(Model $model): bool\n {\n return array_reduce(\n $this->importers,\n function (\n bool $carry,\n ModelImporterInterface $importer\n ) use ($model): bool {\n return $carry || $importer->isCandidate($model);\n },\n false\n );\n }", "title": "" }, { "docid": "f22c177d5487c58f0fb35531bd071964", "score": "0.5583918", "text": "private function meets_requirements() {\n\n if ( ! class_exists( 'GamiPress' ) ) {\n return false;\n }\n\n return true;\n\n }", "title": "" }, { "docid": "2ca9a43805058ec298ddbc680982fa56", "score": "0.55512536", "text": "public static function isValidModuleModel($module) {\n global $APP_DIRECTORY;\n $modulePath = $APP_DIRECTORY . '/modules/' . $module;\n $modelPath = $modulePath . '/models/model.php';\n $modelName = $module . 'Model';\n $validModel = false;\n if (file_exists($modelPath)) {\n require_once($modelPath);\n $validModel = (class_exists($modelName));\n }\n if (!$validModel) {\n CradleCoreException::MVC('Model ' . $modelName . ' is not defined.');\n }\n return $validModel;\n }", "title": "" }, { "docid": "df715f5c0920caad99454b8873fefde6", "score": "0.5543761", "text": "protected function mediaIsPreloaded(HasMediaWithoutConversions $model)\n {\n return isset($model->media);\n }", "title": "" }, { "docid": "90c8b1b4481eda5150507050203c39ba", "score": "0.5520507", "text": "public function canClassify()\n {\n return $this->hasSetHome() && $this->hasSetWork();\n }", "title": "" }, { "docid": "e39c12e9dab2128d0027f71336d772c4", "score": "0.55095756", "text": "public function canUse(&$model = null, $location = null, $event = null)\n\t{\n\t\treturn false;\n\t}", "title": "" }, { "docid": "b1cd574a3f9fcf002f4df42cddde60d3", "score": "0.5493059", "text": "protected function modelBindingRequired(ApiRouteImplementationObject $routeImplementation): bool\n {\n foreach ($routeImplementation->function->parameters as $parameter) {\n return $parameter->name === 'model';\n }\n\n return false;\n }", "title": "" }, { "docid": "4303526455f65e63ab2c86a8c9597d0b", "score": "0.5491982", "text": "public function isApplicable()\n {\n return true;\n }", "title": "" }, { "docid": "7ba67b52a67f467906dc5f42ce55a194", "score": "0.549073", "text": "public static function useProgrammatic()\n {\n return (false !== self::$_useProgrammatic);\n }", "title": "" }, { "docid": "e90201430f4c83af65e506e934f683c3", "score": "0.54887366", "text": "protected function isInResourceModel(PHP_CodeSniffer_File $phpcsFile)\n {\n $namespaceName = $this->getNamespaceName($phpcsFile);\n return $this->isInResourceModelFlag($namespaceName);\n }", "title": "" }, { "docid": "0a591b01cbc35b9b89539c8c235fcd1b", "score": "0.5480812", "text": "private function validate()\n {\n if (is_null( $this->moduleattrs['class'] )) {\n _K::error( 'Workshop class parameter is null' );\n return false;\n }\n\n\n if (!class_exists( $this->moduleattrs['class'] )) {\n _K::error( $this->moduleattrs['class'] . ' not found.' );\n return false;\n }\n\n\n return true;\n }", "title": "" }, { "docid": "06132276ffded0c3bbeaaf73f7153305", "score": "0.54793745", "text": "public static function loadModel( $var_name ) {\n\t\tif ( $var_name == ucfirst( $var_name ) ) { # uppercase\n\t\t\t\n\t\t\t# is it trying to load a model that was already instantiated?\n\t\t\tif ( isset( RESTful_Application::$loadedModels[$var_name] ) ) return true; # only one model object for each model class - zend models correspond to tables\n\t\t\t\n\t\t\t# can we instantiate it now?\n\t\t\t$path = str_replace('_', '/', $var_name);\n\t\t\tif ( file_exists( BASE_PATH . M_PATH . $path . EXT ) ) return require_once( BASE_PATH . M_PATH . $path . EXT );\n\t\t\telse throw new RESTful_Exception( 'Model file can not be found: ' . $var_name );\n\t\t\t\n\t\t\treturn true;\n\t\t\t\n\t\t} else return null;\n\t}", "title": "" }, { "docid": "88679cc36fddf2db527b91e76116aac4", "score": "0.54761684", "text": "public function isMethodExists(Model $class, $method)\n {\n return method_exists($class, $method);\n }", "title": "" }, { "docid": "0c6d08474934d5c2c04024b38dd6d2b5", "score": "0.5472146", "text": "public function hasModel($id)\n {\n return isset($this->models[$id]);\n }", "title": "" }, { "docid": "b4461bb87deb90aa2df8b703f14d26d6", "score": "0.54470015", "text": "public function has($key)\n\t{\n\t\treturn isset($this->models[$key]);\n\t}", "title": "" }, { "docid": "23ed6833099d223bc3f90466afcb0a6d", "score": "0.54272246", "text": "public function isAcceptable($value)\n {\n return ($value instanceof ModelInterface);\n }", "title": "" }, { "docid": "2a010fff4959b7a49571f4f39435b8a2", "score": "0.5424211", "text": "function detect_model() {\n\n\tglobal $DEBUG;\n\n\t// First we try to get ID from object properties.\n\t// If not detected yet - call internal method _detect_model().\n\t$model_id = isset($this->model_id) ? $this->model_id : ($this->model_id = $this->_detect_model());\n\n\t// Saving debug info about model detection\n\tif ($DEBUG) {\n\t\tif ($model_id) {\n\t\t\t$this->log(\"[DEBUG] detect_model() => $model_id\");\n\t\t} else {\n\t\t\t$this->log(\"[DEBUG] detect_model() => UNKNOWN : UA [\".$_SERVER['HTTP_USER_AGENT'].\"]\");\n\t\t};\n\t};\n\n\treturn $model_id;\n\n}", "title": "" }, { "docid": "27f9934ac621c242f7c7b95f4d26bda7", "score": "0.5420205", "text": "function usableForPrecondition()\n\t{\n\t\t// overwrite in inherited classes\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "27da0e7d2cbca69dfecef5a83e78a956", "score": "0.54164886", "text": "public static function supportsCustomAttributes(): bool;", "title": "" }, { "docid": "75197c02cc1ee55c938af4893460e1b0", "score": "0.5395801", "text": "function __shadowExists($model) {\n\t\textract($this->settings[$model->alias]);\n\t\t$db = ConnectionManager::getDataSource($model->useDbConfig);\n\t\t$table = Inflector::singularize($model->table).'_versions';\n\t\t$tables = $db->listSources();\n\t\tif (!in_array($db->config['prefix'] . $table, $tables)) {\n\t\t\tif ($showErrors) {\n\t\t\t\ttrigger_error('Could not locate shadow table: '.$table);\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn $table;\n\t}", "title": "" }, { "docid": "b11bd5dfbaea8e9d277ea9a1a77d1e39", "score": "0.53915554", "text": "public function isCustomProduct(Item $item)\n {\n return $item->getSku() == \\Cart2Quote\\Quotation\\Model\\Quote\\CustomProduct::SKU;\n }", "title": "" }, { "docid": "2a811e51cf2c0311bec3ff540c206b2b", "score": "0.53891236", "text": "public function ensureModel() {\n\t\tif ($this->refreshStatesFromModel()) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\t$webUser = $this->getOwner();\n\t\t\tif (!$webUser->getIsGuest()) {\n\t\t\t\t$webUser->logout(false);\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "066b7c1a502c67ed7ea02d35aba56115", "score": "0.5385765", "text": "private function checkExisting()\n\t{\n\t\tif ($this->armyModel->getArmyId())\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "18b03e70736293b6cecd1d3dfc437482", "score": "0.5383092", "text": "public function isUseSoftDeletes(Model $model)\n {\n return property_exists($model, 'forceDeleting');\n }", "title": "" }, { "docid": "38ec832a56cc28939c817e7c13db2e84", "score": "0.5379247", "text": "public function has_custom_breakpoints() {\n\t\t$breakpoints = $this->get_breakpoints();\n\n\t\tforeach ( $breakpoints as $breakpoint ) {\n\t\t\t/** @var Breakpoint $breakpoint */\n\t\t\tif ( $breakpoint->is_custom() ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "3eba44cda39103e0935cb81f13eda0af", "score": "0.53710675", "text": "public function hasMainboardManufacturer()\n {\n return $this->mainboard_manufacturer !== null;\n }", "title": "" }, { "docid": "27e0ade2453f123b3399c5140669dbf7", "score": "0.5368906", "text": "public function valid($class)\n {\n if (!class_exists($class)) {\n return false;\n }\n //check model class imlements IMetaContainer interface\n if (!isset(class_implements($class)[\"App\\Interfaces\\IMetaContainer\"])) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "3fa9aaf7057af55a9ce088f5c158b21d", "score": "0.5361159", "text": "public function isCandidate(Model $model): bool\n {\n $attributes = $model->attributes();\n\n return array_reduce(\n static::REQUIRED_ATTRIBUTES,\n function (bool $carry, string $attribute) use ($attributes): bool {\n return $carry && !empty($attributes[$attribute]);\n },\n $model instanceof Contact && !empty($attributes)\n );\n }", "title": "" }, { "docid": "c8b9300f6ac7c40268e8cce113dcce91", "score": "0.53503484", "text": "private function isValidate()\r\n {\r\n return ($this->request->isCLI() \r\n && count($this->argv) > 1\r\n && $this->argv[0] == \"complex\"\r\n && method_exists($this, $this->argv[1])\r\n && !in_array($this->argv[1], [\"__construct\", \"isValidate\", \"run\", \"_showMessage\", \"_getOption\"]));\r\n }", "title": "" }, { "docid": "f9c713e4910fabeb0a05c8c62d99115d", "score": "0.53499985", "text": "protected function hasImportableObjects(): bool\n {\n return $this->objects && $this->objects->isNotEmpty();\n }", "title": "" }, { "docid": "6a54b40394f10981585c31e8c174fcc4", "score": "0.532901", "text": "public function isBrand()\n {\n return $this->_type === self::TYPE_BRAND;\n }", "title": "" }, { "docid": "1b83c180781d976b0d60c91af8567d87", "score": "0.53236395", "text": "protected function _hasComponent() {\n return is_object($this->_component);\n }", "title": "" }, { "docid": "9895d1bfb4dc0b95e126cdde3688a2f9", "score": "0.53154385", "text": "public static function isOwner($model){\n if (isset($model->created_by)){\n if($model->created_by == Yii::app()->user->id)\n {\n return true;\n }\n return false;\n }\n else{\n throw new CHttpException(400,'Property not found in model!');\n }\n\n }", "title": "" }, { "docid": "14af470ac2245cbdd2fea1ee76703707", "score": "0.5312903", "text": "protected function shouldInherit()\n {\n if (property_exists($this, 'forcePriceInheritance') && $this->forcePriceInheritance) {\n return true;\n }\n\n if (app()->runningInBackend()) {\n return false;\n }\n\n if (app()->runningInConsole() && ! app()->runningUnitTests()) {\n return false;\n }\n\n return true;\n }", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "b2cc613e9c7ba7a658bd867609bafdaa", "score": "0.0", "text": "public function run()\n {\n Role::insert([\n ['name' => 'admin', 'display_name' => 'Administrateur'],\n ['name' => 'projects-writer', 'display_name' => 'Saisisseur Projets'],\n ['name' => 'processes-writer', 'display_name' => 'Saisisseur Procédures'],\n ['name' => 'user', 'display_name' => 'Consultant']\n ]);\n }", "title": "" } ]
[ { "docid": "5276fa926c7c0e25eef6eaa079aab740", "score": "0.80336106", "text": "public function run()\n\t{\n\t\t// $this->call('UsersTableSeeder');\n\n\t\t// Truncamos los datos de los modelos y insertamos de nuevo en cada seed\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\t\tEstudiante::truncate();\n\t\tCurso::truncate();\n\t\tProfesor::truncate();\n\t\tDB::table('curso_estudiante')->truncate();\n\n\t\tfactory(Profesor::class, 50)->create();\n\t\tfactory(App\\Profesor::class)->create([\n 'nombre' => 'Heisenberg',\n 'email' => '[email protected]',\n 'password' => password_hash('pass', PASSWORD_BCRYPT)\n ]);\n\t\tfactory(Estudiante::class, 500)->create();\n\n\t\tfactory(Curso::class, 40)\n\t\t\t->create()\n\t\t\t->each(function($curso){\n\t\t\t\t$curso\n\t\t\t\t\t->estudiantes()\n\t\t\t\t\t->attach( array_rand(range(1, 500), 40) );\n\t\t\t});\n\n\t}", "title": "" }, { "docid": "0269eae890ef3ba6d0757e56d65e0856", "score": "0.8006653", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $categories = factory(App\\Category::class, 25)->create();\n foreach ($categories as $category) {\n $products = factory(App\\Product::class, random_int(1, 50))->create(['category_id' => $category->id]);\n foreach ($products as $product) {\n factory(App\\Variant::class, random_int(0, 50))->create(['product_id' => $product->id]);\n }\n }\n }", "title": "" }, { "docid": "8aa803bb2ba2d917839552e0913e299d", "score": "0.8006092", "text": "public function run()\n {\n\n $faker = Faker::create();\n\n foreach (range(1,100) as $index) {\n \tApp\\Model\\Author::create([\n \t\t'name' => $faker->name,\n \t]);\n }\n\n \tforeach (range(1,100) as $index) {\n \tApp\\Model\\Publisher::create([\n \t\t'name' => $faker->company,\n \t]);\n }\n\n $authors = Author::where('id', '>', 0)->pluck('id')->toArray();\n $publishers = Publisher::where('id', '>', 0)->pluck('id')->toArray();\n\n foreach (range(1,100) as $index) {\n \t\t\tApp\\Model\\Book::create([\n \t\t'ISBN' => $faker->ean13,\n \t\t'title' => $faker->name,\n \t\t'date' => $faker->date,\n \t\t'author_id' => $faker->randomElement($authors),\n \t\t\t'publisher_id' => $faker->randomElement($publishers), \t\t\n \t]);\n }\n }", "title": "" }, { "docid": "e039b35d9c938323e41faa91de018499", "score": "0.8004318", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Book::create([\n 'user_id'=> 1,\n 'author_id'=>1,\n 'title'=> 'Harry Potter',\n 'cover'=> 'http://bookriotcom.c.presscdn.com/wp-content/uploads/2014/08/HP_pb_new_1.jpg'\n ]);\n\n Book::create([\n 'user_id'=> 1,\n 'author_id'=>1,\n 'title'=> 'Kamasutra',\n 'cover'=> 'https://img1.od-cdn.com/ImageType-400/3363-1/AB1/79E/D3/%7BAB179ED3-D42C-4135-9102-875ABA350C0E%7DImg400.jpg'\n ]);\n\n Book::create([\n 'user_id'=> 1,\n 'author_id'=>1,\n 'title'=> 'THUG kitchen',\n ]);\n\n Author::create([\n 'name'=> 'Testing Author',\n 'year_of_birth'=> '1972',\n ]);\n\n User::create([\n 'name'=>'Matej',\n 'email'=>'[email protected]',\n 'password'=> '$2y$10$ApgqGBJE9dnxIyqa/Csb0.UntecIvpr08K78KvMEN497F25wde1D2'\n ]);\n }", "title": "" }, { "docid": "c84c48444e4e3992123a987e00590d97", "score": "0.7986598", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'is_admin' => true,\n 'status' => true,\n 'reputation'=> '100'\n ]);\n\n User::create([\n 'name' => 'Demo User',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'is_admin' => false,\n 'status' => true,\n 'reputation'=> '10'\n ]);\n\n factory(App\\Model\\Question::class, 100)->create();\n factory(App\\Model\\Answer::class, 250)->create();\n factory(App\\Model\\Tag::class, 50)->create();\n factory(App\\Model\\Comment::class, 50)->create();\n }", "title": "" }, { "docid": "09eb34b0e1c7c9b0454596554413da5b", "score": "0.79473233", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('123'),\n ]);\n\n $faker = Faker::create('lt_LT'); //statinis metodas\n $authors=10;\n $publishers=10;\n\n foreach(range(1, $authors) as $_) {\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName()\n ]);\n }\n\n foreach(range(1, $publishers) as $_) {\n DB::table('publishers')->insert([\n 'title' => $faker->company(),\n ]);\n }\n\n foreach(range(1, 100) as $_) {\n DB::table('books')->insert([\n 'title' => str_replace(['.', '\"', \"'\", ')', '(' ], '', $faker->realText(rand(10, 30))),\n 'isbn' => $faker->isbn13(),\n 'pages' => rand(22, 550),\n 'about' => $faker->realText(500, 4),\n 'author_id' => rand(1, $authors),\n 'publisher_id' => rand(1, $publishers),\n ]);\n }\n\n }", "title": "" }, { "docid": "99b2d608440f609ad0ec4b7fe078bfbe", "score": "0.79405814", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //factory(App\\Article::class, 5)->create();\n DB::table('articles')->insert([\n 'name' => 'Ami N.O.',\n 'description' => 'BCAA for enhanced working out',\n 'provider' => 'Optimum Nutrition',\n 'rating' => 4.2,\n ]);\n DB::table('articles')->insert([\n 'name' => 'Quadra Lean',\n 'description' => 'Weight management ',\n 'provider' => 'RSP Nutrition',\n 'rating' => 4.6,\n ]);\n DB::table('articles')->insert([\n 'name' => 'Combat Whey',\n 'description' => 'Whey Protein for muscle building',\n 'provider' => 'MusclePharm',\n 'rating' => 4.3,\n ]);\n DB::table('articles')->insert([\n 'name' => 'Amino Lean',\n 'description' => 'Weight management ',\n 'provider' => 'RSP Nutrition',\n 'rating' => 4.6,\n ]);\n }", "title": "" }, { "docid": "b353a26c6a30fe5cf356c5d5581c8672", "score": "0.7884727", "text": "public function run()\n {\n //$this->call(UserSeeder::class);\n DB::table('users')->insert([\n 'name' => \"teste\",\n 'email' => \"[email protected]\",\n 'password' => Hash::make('123456'),\n ]);\n\n DB::table('states')->insert([\n 'nome' => \"ativo\",\n 'states_id' => 1,\n ]);\n\n DB::table('states')->insert([\n 'nome' => \"baixado\",\n 'states_id' => 2,\n ]);\n\n DB::table('produtos')->insert([\n\n 'states_id'=>1,\n 'nome'=> \"teste\",\n 'sku'=> 43,\n 'quantidade'=> 200,\n 'descricao'=>\"testando\"\n ]);\n \n DB::table('produtos')->insert([\n 'states_id'=>2,\n 'nome'=> \"teste2\",\n 'sku'=> 44,\n 'quantidade'=> 400,\n 'descricao'=>\"testando2\"\n ]);\n\n\n }", "title": "" }, { "docid": "be8184a1d867e9407161f68458384472", "score": "0.7878079", "text": "public function run()\n {\n // Truncate our existing records to start from scratch.\n Participant::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Participant::create([\n 'name' => $faker->name,\n 'age' => $faker->numberBetween(1,99),\n 'dob' => now(),\n 'profession' => $faker->randomElement($array = array ('Employed','Student')),\n 'locality' => $faker->city,\n 'no_of_guests' => $faker->numberBetween(0,2),\n 'address' => $faker->address\n ]);\n }\n\n }", "title": "" }, { "docid": "c49c4c393bd62d7155e7274754b4a404", "score": "0.7871859", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Martijn Brands',\n 'email' => '[email protected]',\n 'password' => bcrypt('4&Q5Vhgh6H6+c_=%')\n ]);\n\n \t$faker = Faker\\Factory::create();\n \tfor ($i=0; $i < 10; $i++) {\n\n $title = $faker->sentence;\n\n DB::table('posts')->insert([\n 'title' => $title,\n 'description' => $faker->text($maxNbChars = 600),\n 'color' => $faker->hexcolor,\n 'textColor' => $faker->hexcolor,\n 'slug' => str_slug($title)\n ]);\n }\t\n\t \n }", "title": "" }, { "docid": "58993d8340037bf0991b33dfd6a9f8a3", "score": "0.78693", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Review::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($j=0; $j < 10; $j++) { \n for ($i = 1; $i < 6; $i++) {\n Review::create([\n 'score' => $faker->numberBetween(1,5),\n 'buyer_id' => $i,\n 'seller_id' => $i+6,\n 'ad_id' => $faker->numberBetween(0,10),\n ]);\n } \n }\n \n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "5c20ba6fe5501ce36869c85d940b8092", "score": "0.78672695", "text": "public function run()\n {\n $this->call(PackageTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \\App\\Contact::create([\n 'name' => 'Herman Nelissen',\n 'email' => '[email protected]',\n 'created_at' => '2018-10-28 21:35:27',\n 'updated_at' => '2018-10-28 21:35:27'\n ]);\n\n \\App\\Quote::create([\n 'total_price' => 2300,\n 'students' => 500,\n 'product_id' => 1,\n 'contact_id' => 1,\n 'created_at' => '2018-10-28 21:35:27',\n 'updated_at' => '2018-10-28 21:35:27'\n ]);\n\n\n }", "title": "" }, { "docid": "1d45ae2c2a40bb81109d9488190d4318", "score": "0.78528047", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\t\t\t$users = factory(App\\User::class)->times(15)->create();\n $categories = factory(App\\Category::class)->times(10)->create();\n\t\t\t$products = factory(App\\Product::class)->times(30)->create();\n\n foreach ($users as $user){\n if ($user->country == 'Argentina'){\n $user->state='Buenos Aires';\n }\n }\n\n\t\t\tforeach ($products as $oneProduct) {\n\t\t\t\t$oneProduct->user()->associate($users->random(1)->first()->id);\n\t\t\t\t$oneProduct->category()->associate($categories->random(1)->first()->id);\n\t\t\t\t$oneProduct->save();\n\t\t\t}\n }", "title": "" }, { "docid": "9f671912fdabef612f6e0b6f0478edaa", "score": "0.785144", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Question::class, 10)->create()->each(function($q) {\n foreach (range(1,5) as $index) {\n $q->answers()->save(factory(App\\Answer::class)->make());\n }\n foreach (range(1,5) as $index) {\n $q->tags()->save(factory(App\\Tag::class)->make());\n }\n });\n }", "title": "" }, { "docid": "be492c3a599cee49a50ba5a60ed47020", "score": "0.78502", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(\\App\\User::class)->create([\n 'email' => '[email protected]',\n 'password' => bcrypt('secret')\n ]);\n\n factory(\\App\\Category::class, 5)->create(['parent_id' => 0]);\n factory(\\App\\Category::class, 10)->create();\n factory(\\App\\Post::class,20)->create();\n }", "title": "" }, { "docid": "15513b06c4d4867be88d5dd7093d46be", "score": "0.78430516", "text": "public function run()\n {\n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'role' => User::ROLE_ADMIN\n ]);\n \\Factory(User::class, 20)->create();\n \\Factory(Instructor::class, 5)->create();\n \\Factory(Student::class, 10)->create();\n \\Factory(Course::class, 10)->create();\n \\Factory(Content::class, 50)->create();\n \\Factory(Question::class, 10)->create();\n \\Factory(Answer::class, 50)->create();\n\n foreach(Student::all() as $student) {\n $student->courses()->save(Course::all()->random());\n $student->courses()->save(Course::all()->random());\n }\n\n \\Factory(Chat::class, 50)->create();\n }", "title": "" }, { "docid": "ca425680dd8b66e53a9919f358b1bcd1", "score": "0.7839035", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n rutes::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n \trutes::create([\n \t\t'idrutes' => $faker->shuffle(array(1,2,3,4,5,6,7,8,9,10)),\n \t\t'rutnom' => $faker->sentence($nbWords = 3),\n \t\t'rutcreador' => $faker->name,\n \t\t'rutmida' => $faker->shuffle(array(1,2,3,4,5,6,7,8,9,10)),\n \t\t'rutlocals' => $faker->sentences($nb = 3, $asText = false),\n \t\t'rutdescripcio' => $faker->text($maxNbChars = 200),\n \t\t'rutdata' => $faker->date,\n \t\t'rutvaloracio' => $faker->numberBetween($min = 1, $max = 5),\n \t]);\n }\n }", "title": "" }, { "docid": "22dfeb9cc91c700525ce667bb7f0c0b5", "score": "0.78375894", "text": "public function run()\n {\n $this->faker = Faker\\Factory::create();\n $this->emptyDatabase();\n $this->seedContacts();\n $this->seedProjects();\n $this->seedContactProjects();\n }", "title": "" }, { "docid": "7d21aeeff6e058edf6d416a1730ee9a3", "score": "0.7836951", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0');\n\t\tDB::table('authors')->truncate();\n\t\tDB::table('books')->truncate();\n\t\tDB::table('publishers')->truncate();\n\t\tDB::table('book_publisher')->truncate();\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\t\t\n\t\tfor ($recordNb = 1; $recordNb <= 10; $recordNb++) {\n\t\t\tDB::table('book_publisher')->insert(\n\t\t\t\t[\n\t\t\t\t\t'book_id' => factory(App\\Book::class)->create()->id,\n\t\t\t\t\t'publisher_id' => factory(App\\Publisher::class)->create()->id\n\t\t\t\t]\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "56e384c87eaa6052b3df9ff5b3142a6b", "score": "0.78343916", "text": "public function run()\n {\n $faker = Faker::create();\n\n foreach(range(1, 30) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => bcrypt('secret'),\n ]);\n DB::table('products')->insert([\n 'user_id' => $index,\n 'brand' => $faker->company,\n 'name' => $faker->word,\n 'category' => $faker->word,\n 'price' => $faker->randomFloat(2, 0, 99999),\n ]);\n DB::table('services')->insert([\n 'user_id' => $index,\n 'title' => $faker->word,\n 'category' => $faker->word,\n 'price' => $faker->randomFloat(2, 0, 99999),\n ]);\n }\n }", "title": "" }, { "docid": "5e32b70fb5531784e31acdad60483f72", "score": "0.7826476", "text": "public function run()\n {\n $user = User::create([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'phone' => '089639385477',\n 'role' => 0,\n 'password' => Hash::make('user')\n ]);\n $categories = Category::all();\n foreach ($categories as $cat) {\n Article::create([\n 'user_id' => $user->id,\n 'category_id' => $cat->id,\n 'title' => Faker\\Provider\\id_ID\\Address::state(),\n 'description' => Faker\\Provider\\Lorem::text(),\n 'image' => Faker\\Provider\\Image::image(public_path('images/'),400,300, null, false)\n ]);\n }\n }", "title": "" }, { "docid": "b64a5f0743ca2bf1f917364cddd2c87d", "score": "0.7822686", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('game_titles')->insert([\n [\n 'title' => \"ApexLegends\",\n ],\n [\n 'title' => \"Bloodborne\",\n ],\n [\n 'title' => \"CallOfDuty\",\n ],\n ]);\n DB::table('sns')->insert([\n [\n 'name' => \"Twitter\",\n 'url' => \"a\",\n 'icon' => \"https://twitter.com/\",\n ],\n [\n 'name' => \"youtube\",\n 'url' => \"a\",\n 'icon' => \"https://YouTube.com/\",\n ],\n [\n 'name' => \"facebook\",\n 'url' => \"a\",\n 'icon' => \"https://facebook.com/\",\n ],\n [\n 'name' => \"instagram\",\n 'url' => \"a\",\n 'icon' => \"https://instagram.com/\",\n ],\n ]);\n }", "title": "" }, { "docid": "b35f7b7df0771d4dd8ac3b5b25b0f9ba", "score": "0.7820086", "text": "public function run()\n {\n // User::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n $gender = $faker->randomElement(['male', 'female']);\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n User::create([\n 'email' => $faker->email,\n 'password' => Hash::make('password'), //$2a$10$sme1juiwmlQ3l/ccoVOwcu4STJvrmdfb/Sjulpbl1rNvBrC6oLDAK\n 'firstname' => $faker->firstName(),\n 'lastname' => $faker->lastName,\n 'age' => $faker->numberBetween(25, 60),\n 'type' => $gender,\n 'phone' => $faker->phoneNumber,\n // 'group_id' => $faker->numberBetween(1, 3)\n ]);\n } \n }", "title": "" }, { "docid": "19f084569c94eacda8d55e19801f815b", "score": "0.78176606", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // 创建一个用户\n $user = factory(User::class)->create([\n 'name' => 'iwanli',\n 'password' => bcrypt('123123')\n ]);\n // 创建四个分类\n factory(Category::class,4)->create()->each(function($category) use ($user){\n // 创建10片文章\n factory(Post::class, 10)->create([\n 'user_id' => $user->id,\n 'category_id' => $category->id,\n ])->each(function($post){\n // 随机创建2-4个标签\n factory(Tag::class, rand(2,4))->create()->each(function($tag) use ($post){\n // 添加文章和标签的关系\n PostTag::create([\n 'post_id' => $post->id,\n 'tag_id' => $tag->id,\n ]);\n });\n });\n });\n }", "title": "" }, { "docid": "48a2b5245515b10dfedf5039d39b4bac", "score": "0.78135824", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call(ArticleTableSeeder::class);\n /*\n Thêm 1 record vào db\n DB::table('articles')->insert([\n 'title'=>'ABC',\n 'content'=>'laia'\n ]);*/\n }", "title": "" }, { "docid": "365f1b32ad392fb1faece80c6845ee8a", "score": "0.78128964", "text": "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n User::create([\n \"username\" => \"usuario\",\n \"name\" => \"usuario\",\n \"email\" => \"[email protected]\",\n \"password\" => bcrypt(\"usuario\"),\n \"user_type\" => \"admin\"]);\n\n User::create([\n \"username\" => \"pedro\",\n \"name\" => \"pedro\",\n \"email\" => \"[email protected]\",\n \"password\" => bcrypt(\"usuario\"),\n \"user_type\" => \"admin\"]);\n\n\n Subreddit::create([\n \"creator_id\" => 1,\n \"name\" => \"Games\",\n \"description\" => \"A place to talk about videogames\"]);\n\n Subscription::create([\n \"user_id\" => 2,\n \"subreddit_id\" => 1]);\n\n }", "title": "" }, { "docid": "75cb62df6863484c158e7bf137af4153", "score": "0.78091645", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n User::truncate();\n Course::truncate();\n Subject::truncate();\n\n $userQuantity \t\t= 1000;\n $courseQuantity \t= 10;\n $subjectQuantity \t= 200;\n\n factory(User::class, $userQuantity)->create();\n factory(Course::class, $courseQuantity)->create();\n factory(Subject::class, $subjectQuantity)->create()->each(\n \tfunction($subject){\n \t\t$courses = Course::all()->random(mt_rand(1,5))->pluck('id');\n $subject->courses()->attach($courses);\n \n $staff = User::all()->random(mt_rand(1,5))->pluck('id');\n $subject->staffs()->attach($staff);\n \n $student = User::all()->random(mt_rand(1,5))->pluck('id');\n $subject->students()->attach($student);\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "7f26a02b92952342b834fb9336b7495c", "score": "0.78089064", "text": "public function run()\n {\n Eloquent::unguard();\n\n $truncate = [\n 'users',\n 'products',\n 'reviews',\n ];\n // To remove previous data from database\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n foreach ($truncate as $table) {\n DB::table($table)->truncate();\n }\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n\n // $this->call(UsersTableSeeder::class);\n\n factory(App\\User::class,5)->create();\n factory(App\\Model\\Product::class,50)->create();\n factory(App\\Model\\Review::class,50)->create();\n }", "title": "" }, { "docid": "95e059a4616f6c77fd9ef5fb8646df09", "score": "0.7802594", "text": "public function run()\n {\n $faker = Faker::create('App\\Models\\News');\n\n // Creating 10 dummy news with users in the DB\n for ($i=0; $i < 10; $i++) {\n DB::table('news')->insert([\n 'title'=> $faker->sentence($nbWords = 6, $variableNbWords = true),\n 'content'=> $faker->text($maxNbChars = 200),\n // making new user everytime a new news is made via seeder\n 'user_id'=> User::factory()->create()->id,\n 'updated_at' => now(),\n 'created_at' => now(),\n ]);\n }\n\n }", "title": "" }, { "docid": "7576af445bb78ab6c07c30e0d6047f27", "score": "0.7797416", "text": "public function run()\n {\n // \\App\\Models\\User::factory(1)->create();\n \\App\\Models\\User::create([\n 'username'=>'admin',\n 'nickname'=>'John Doe',\n 'password'=>\\bcrypt('123456'),\n ]);\n\n \\App\\Models\\Article::factory()->times(5)->create();\n\n \\App\\Models\\Comment::factory()->times(5)->create();\n\n \\App\\Models\\Feedback::factory()->times(5)->create();\n\n \\App\\Models\\Category::create([\n 'name'=>'历史',\n 'parent_id'=>0\n\n ]);\n\n $this->call([\n SettingSeeder::class,\n ]);\n\n }", "title": "" }, { "docid": "a9ff49d78b82f3a74d3064b1e540bf86", "score": "0.77962416", "text": "public function run()\n {\n \\App\\Models\\User::factory(1)->create();\n\n // $this->call(ArticleTableSeeder::class);\n $this->call(ArticlesTableSeeder::class);\n\n DB::table('articles')->insert([\n 'title' => Str::random(50),\n 'body' => Str::random(50),\n ]);\n\n }", "title": "" }, { "docid": "476cadcd72726378c148f07886c0964c", "score": "0.7794036", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // Administrator\n $administrator = factory(\\App\\User::class)->create(['email' => '[email protected]', 'role' => 'ADMINISTRATOR']);\n\n // Customer Model\n $customerUser = factory(\\App\\User::class)->create(['email' => '[email protected]', 'role' => 'CUSTOMER']);\n $customer = factory(\\App\\Customer::class)->create(['user_id' => $customerUser->id]);\n\n // Products\n for ($i=0; $i < 5; $i++) {\n $productCategory = factory(\\App\\ProductCategory::class)->create();\n $product = factory(\\App\\Product::class)->create();\n $product->productCategories()->sync([$productCategory->id]);\n }\n\n // Delivery Fees\n factory(\\App\\DeliveryFee::class)->create(['from' => 0, 'to' => 3, 'fee' => 50]);\n factory(\\App\\DeliveryFee::class)->create(['from' => 3, 'to' => 6, 'fee' => 75]);\n factory(\\App\\DeliveryFee::class)->create(['from' => 6, 'to' => 9, 'fee' => 100]);\n }", "title": "" }, { "docid": "da9353a2cd732b4fd068cbe28b73cbcc", "score": "0.7791073", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(TacticSeeder::class);\n $this->call(UserSeeder::class);\n\n $courses = Course::with('users')->get();\n\n foreach ($courses as $course) {\n $exercises = Exercise::factory()->count(8)->create(['user_id' => $course->user_id]);\n foreach ($exercises as $exercise) {\n $exercise->courses()->attach($course->id);\n $exercise->tactics()->attach(Tactic::all()->random()->id);\n }\n }\n }", "title": "" }, { "docid": "06d0f251e5b64ba99e07b28c19b0f866", "score": "0.7789157", "text": "public function run()\n {\n\n $roles = ['Admin', 'Teacher', 'Student'];\n foreach ($roles as $role) {\n \\App\\Models\\Role::create([\n 'title' => $role\n ]);\n }\n\n $subjects = ['English', 'Math', 'Physics', 'Computer'];\n foreach ($subjects as $subject) {\n \\App\\Models\\Subject::create([\n 'title' => $subject\n ]);\n }\n\n $levels = ['Primary', 'Elementary', 'Secondary', 'High'];\n foreach ($levels as $level) {\n \\App\\Models\\Level::create([\n 'title' => $level\n ]);\n }\n\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "2e30615d54a3a5cf829c10d31a5c04f7", "score": "0.7787267", "text": "public function run()\n {\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(ProductsTableSeeder::class);\n\n factory(App\\Curso::class, 5)->create();\n\n factory(App\\Alumno::class, 10)->create()->each(function(App\\Alumno $alumno){\n //se relaciona un post con un tag\n $alumno->cursos()->attach([\n rand(1,5), //el primer post se relaciona con las primeras cinco etiquetas\n \n \n ]);\n });\n }", "title": "" }, { "docid": "7c8fed78f76fb9e1e482206dd1ea48d5", "score": "0.7786536", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call(LaratrustSeeder::class);\n\t\tDB::table('settings')->insert(\n array('name' => 'College of Engineering ', 'dean' => 'De Vera, Angel V. Jr.')\n );DB::table('sections')->insert(\n array('name' => 'EC-4-1')\n );DB::table('courses')->insert(\n array('name' => 'ECE')\n );DB::table('subjects')->insert(\n array('name' => 'ECE-525a', 'description' => 'industrial electronics')\n );\n }", "title": "" }, { "docid": "dc3f4e5598777e48341bac775cb1fb7f", "score": "0.7785008", "text": "public function run()\n {\n // create an instance of Faker class to the variable $faker\n $faker = Faker::create();\n\n // get all existing user ids into a $users array\n $users = User::all()->pluck('id')->toArray();\n\n // generate 100 records for the animals table\n foreach (range(1,100) as $index){\n DB::table('animals')->insert([\n //'id'=>$faker->randomNumber($nbDigits = 7, $strict = false),\n 'userid' => 5,\n 'name' =>$faker->firstName(),\n 'birth_year' =>$faker->year($max = 'now'),\n 'description'=>$faker->sentence($nbWords = 6, $variableNbWords = true),\n 'type_of_pet'=>$faker->randomElement($array=array('cat','dog','bird',\n 'rabbit', 'horse','ferret',\n 'fish', 'rat/mice',\n 'amphibian','reptile')),\n 'is_available' => 1,\n 'created_at' => now()\n ]);\n }\n }", "title": "" }, { "docid": "6419861cc2705b3341ba36acf9522390", "score": "0.7781964", "text": "public function run()\n {\n Model::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // disable foreign key constraints\n DB::table('users')->truncate();\n DB::table('posts')->truncate();\n DB::table('comments')->truncate();\n\n factory(App\\User::class, 5)->create()->each(function($user){\n factory(App\\Post::class, random_int(1, 5))->create([\n 'post_author' => $user->id\n ]);\n\n factory(App\\Comment::class, random_int(1,5))->create([\n 'comment_author' => $user->id,\n 'post_id' => random_int(1,5)\n ]);\n });\n\n \\App\\User::create([\n 'name' => 'writer',\n 'username' => 'writer',\n 'email' => '[email protected]',\n 'password' => Hash::make('password'),\n 'remember_token' => str_random(10)\n ])->save();\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 1'); // enable foreign key constraints\n\n Model::reguard();\n }", "title": "" }, { "docid": "c1b6a34aec59e70ff9fc40ff23f7adc0", "score": "0.7775689", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::table('collection_list')->insert([\n 'name' => 'Sprint 2020',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n DB::table('collection_list')->insert([\n 'name' => 'Balticman Russia 2021',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s'),\n ]);\n }", "title": "" }, { "docid": "78cc789dd6e437818d7cdb71821fa4b4", "score": "0.77756286", "text": "public function run()\n\t{\n\t\tModel::unguard();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tDB::table('companies')->truncate();\n\t\tDB::table('employees')->truncate();\n\n\t\tfor ($i=0; $i < 100; $i++) {\n\t\t\t$company = Company::create([\n\t\t\t\t'name' => $faker->company,\n\t\t\t\t'business' => $faker->bs\n\t\t\t]);\n\t\t\tfor ($j=0; $j < 50; $j++) {\n\t\t\t\tEmployee::create([\n\t\t\t\t\t'company_id' => $company->id,\n\t\t\t\t\t'name' => $faker->name,\n\t\t\t\t\t'job_title' => $faker->sentence(3),\n\t\t\t\t\t'phone' => $faker->phoneNumber,\n\t\t\t\t\t'email' => $faker->email,\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\n\t\t// $this->call('UserTableSeeder');\n\t}", "title": "" }, { "docid": "89ce10a423732bada80a9877f588142e", "score": "0.7766349", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $data_services = [\n \t'image_name' => '1.jpg',\n \t'urlservices' => 'bao-gia-chup-anh-ky-yeu',\n \t'title' => 'CHỤP ẢNH KỶ YẾU',\n \t'content' => 'Chụp ảnh kỷ yếu tại Đà Nẵng và các tỉnh miền trung, cho thuê đầy đủ trang phục chụp ảnh kỷ yếu. Các concept mới lạ và vô cùng hấp dẫn đang chờ..'\n ];\n\n $data_test = [\n 'test3' => 'default',\n ];\n\n // DB::table('services')->insert($data_services);\n DB::table('test3')->insert($data_test);\n }", "title": "" }, { "docid": "927afdf7da13d136851abcd125662bfa", "score": "0.7764117", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // BlogCategories::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n $title = $faker->sentence;\n $slug = Str::slug($title);\n BlogCategories::create([\n 'title' => $title,\n 'slug' => $slug,\n 'published' => $faker->boolean($chanceOfGettingTrue = 50),\n ]);\n }\n }", "title": "" }, { "docid": "19e1efc56559470b618ca6cd001870f9", "score": "0.7762184", "text": "public function run()\n {\n // $this->call(UserTableSeeder::class);\n /*\n * $users = factory(App\\User::class, 3)\n ->create()\n ->each(function($u) {\n $u->posts()->save(factory(App\\Post::class)->make());\n });\n */\n\n //$users = factory(\\App\\Entities\\User::class, 49)->create();\n //$categories = factory(\\App\\Entities\\Category::class, 10)->create();\n //$folders = factory(\\App\\Entities\\Folder::class, 150)->create();\n\n $urls = factory(\\App\\Entities\\Url::class, 400)->create()->each(function($u){\n $u->categories()->sync(\\App\\Entities\\Category::all()->random(3));\n $u->folders()->sync(\\App\\Entities\\Category::all()->random(2));\n });\n }", "title": "" }, { "docid": "fb68f54cb7c951e64affa64a0b297782", "score": "0.7761967", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n DB::table('category_product')->truncate();\n\n $quantityUser = 1000;\n $quantityCategory = 30;\n $quantityProduct = 1000;\n $quantityTransaction = 1000;\n\n factory(User::class, $quantityUser)->create();\n factory(Category::class, $quantityCategory)->create();\n\n factory(Product::class, $quantityProduct)->create()->each(function($product){\n $categories = Category::all()->random(mt_rand(1,5))->pluck('id');\n $product->categories()->attach($categories);\n });\n factory(Transaction::class, $quantityTransaction)->create();\n }", "title": "" }, { "docid": "cd90f857c514e1c773f1be87e5dfa64c", "score": "0.775844", "text": "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n \\Illuminate\\Support\\Facades\\DB::statement(\"SET foreign_key_checks=0\");\n \\App\\Models\\Movie::truncate();\n \\Illuminate\\Support\\Facades\\DB::statement(\"SET foreign_key_checks=1\");\n\n for ($i = 0; $i < 20; $i++) {\n \\App\\Models\\Movie::create(\n [\n 'title' => ucfirst($faker->word) . ' ' . ucfirst($faker->word) . ' ' . ucfirst($faker->word) . ' ' . ucfirst($faker->word),\n 'director' => $faker->name,\n 'description' => $faker->text,\n 'poster_path' => 'images/sample_movie_poster/' . rand(1,10) . '.png',\n 'publish_at' => \\Carbon\\Carbon::now()->subDays(rand(1,10)),\n 'rating' => rand(1,5),\n 'comment_count' => rand(1,100),\n 'like_count' => rand(1,500),\n 'unlike_count' => rand(1,30),\n ]\n );\n }\n }", "title": "" }, { "docid": "3efab65efe8beca35c2f5491dd14f940", "score": "0.77582747", "text": "public function run()\n {\n /*\n $this->call([\n UsersTableSeeder::class,\n ]);\n */\n\n // Test user for authentication\n factory(User::class)->create([\n 'name' => 'Elias Johansson',\n 'biography' => 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatum provident magnam voluptates quidem, ipsa molestiae fuga ullam deserunt at aspernatur! Saepe vero, voluptates animi mollitia sint voluptatum ducimus ipsa vel?',\n 'username' => 'EliasJ',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => 'password',\n 'remember_token' => str_random(10),\n ]);\n\n factory(User::class, 10)->create()->each(function ($user) {\n factory(Post::class, rand(0, 5))->create(['user_id' => $user->id])->each(function ($post) {\n\n $randCount = rand(0, User::count());\n $randomUsers = User::inRandomOrder()->take($randCount)->get();\n\n $randomUsers->each(function ($randUser) use ($post) {\n factory(Vote::class)->create(['user_id' => $randUser->id, 'voted_id' => $post->id]);\n });\n });\n });\n\n factory(Follow::class)->create(['follower_id' => 1, 'followee_id' => 2]);\n\n }", "title": "" }, { "docid": "91317243366fd0817cbd1d5874e0d4fd", "score": "0.77558076", "text": "public function run()\n {\n $this->seed('EnquiriesTableSeeder');\n $this->seed('FormsTableSeeder');\n $this->seed('InputsTableSeeder');\n $this->seed('DataTableSeeder');\n }", "title": "" }, { "docid": "e3ecd8841e5c87217a3b633febe5ecb6", "score": "0.77534944", "text": "public function run()\n {\n $this->seed(DataTypesTableSeeder::class);\n $this->seed(DataRowsTableSeeder::class);\n $this->seed(MenusTableSeeder::class);\n $this->seed(MenuItemsTableSeeder::class);\n $this->seed(RolesTableSeeder::class);\n $this->seed(PermissionsTableSeeder::class);\n $this->seed(PermissionRoleTableSeeder::class);\n $this->seed(SettingsTableSeeder::class);\n }", "title": "" }, { "docid": "58699f4c1c3829bc0bf3b1b2107cf4d8", "score": "0.7750479", "text": "public function run()\n {\n \tDB::statement(\"SET FOREIGN_KEY_CHECKS=0\");\n \tfactory(App\\User::class,10)->create()->each(function($user){\n\n \t\t$user->posts()->save(factory(App\\Post::class )->make());\n \t\t\n \t});\n \tfactory(App\\Role::class,3)->create(); \t\n \tfactory(App\\Category::class,5)->create(); \t\n \tfactory(App\\Photo::class,1)->create(); \t\n\n\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "c9df141f7b179d1aa331fe8dbfc58ebc", "score": "0.7749799", "text": "public function run()\n {\n $this->call(RoleSeeder::class);\n $this->call(PermissionAndGroupSeeder::class);\n $this->call(PermissionPierAndCategoriesSeeder::class);\n $this->call(PierCategoriesSeeder::class);\n $this->call(PiersSeeder::class);\n $this->call(UsersSeeder::class);\n $this->call(CountriesSeeder::class);\n $this->call(CompanyTypesSeeder::class);\n Country::whereIn('name', [\n 'INDONESIA',\n 'MALAYSIA',\n 'PHILIPPINES',\n 'SINGAPORE',\n 'THAILAND'\n ])->update(['highlighted'=> true]);\n Boat::factory()->count(60)->create();\n Ship::factory()->count(5000)->create();\n AccessRequest::factory()->count(60)->create();\n Company::factory()->count(10)->create();\n }", "title": "" }, { "docid": "ac07049886266992b4877e0bbac4f46e", "score": "0.7747286", "text": "public function run()\n /*collect alle db seeds voor seeding */\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductsTableSeeder::class);\n $this->call(CouponsTableSeeder::class);\n }", "title": "" }, { "docid": "985b4aaf160ac664b8922a8544515d44", "score": "0.7741914", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n /* $faker = Faker::create();\n foreach (range(1, 20) as $index){\n DB::table('blogs')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => bcrypt('secret'),\n ]);\n } */\n }", "title": "" }, { "docid": "aca9b2cf26903130f7380f92f55a473c", "score": "0.77416915", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n Book::truncate();\n College::truncate();\n\n $userQuantity = 50;\n\n factory(User::class, 50)->create();\n factory(Book::class, 50)->create();\n factory(College::class, 2)->create();\n }", "title": "" }, { "docid": "30d64a1e579c6e0f0a830b95c66b1bfa", "score": "0.7741147", "text": "public function run()\n {\n $this->empresarSeeder();\n $this->empresarPersonaSeeder();\n }", "title": "" }, { "docid": "470a485c944168ddbe9d5621e9882146", "score": "0.7738393", "text": "public function run()\n {\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n factory(Category::class, 6)->create();\n factory(Tag::class, 10)->create();\n factory(Post::class, 30)->create();\n }", "title": "" }, { "docid": "3727173589775f381466040e171579e2", "score": "0.77325696", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call([\n UsersTableSeeder::class,\n PostsTableSeeder::class,\n CommentsTableSeeder::class,\n ]);\n /* DB::table('posts')->insert([\n 'title' => 'Car',\n 'content' => 'Super cool car',\n ]);\n DB::table('posts')->insert([\n 'title' => 'Another Car',\n 'content' => 'Another Super cool car',\n ]);\n DB::table('comments')->insert([\n 'user_id' => '12',\n 'post_id' => '1',\n 'content' => 'Dear Car Talk: I have a 1951 Chevy, straight-6, 3-on-the-tree, with 31,000 actual miles. Nice car.',\n ]);\n DB::table('comments')->insert([\n 'user_id' => '9',\n 'post_id' => '1',\n 'content' => 'Nice car!',\n ]);\n */\n }", "title": "" }, { "docid": "0edbf15de8e4e944dd2074ed1b57afd8", "score": "0.77274126", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n /* factory(App\\User::class,100)->create();\n factory(App\\Modele\\Category::class,20)->create(); \n factory(App\\Modele\\Post::class,1500)->create();\n\n factory(App\\Modele\\Tag::class,50)->create();\n factory(App\\Modele\\Image::class,3500)->create(); \n factory(App\\Modele\\Video::class,1050)->create();\n factory(App\\Modele\\Comment::class,4500)->create();*/ \n }", "title": "" }, { "docid": "cdc741a314743eae755e3c22f3f76551", "score": "0.77273446", "text": "public function run()\n {\n $this->seedUser();\n// $this->seedCategoryAndPosts();\n }", "title": "" }, { "docid": "38858c934978757be077df51a3a020d1", "score": "0.77270466", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // inicializa tabla USERS\n DB::table(\"users\")->insert(\n [\n \"id\"=> 1,\n \"name\" =>\"admin\",\n \"email\"=>\"[email protected]\",\n \"email_verified_at\"=> NULL,\n \"password\"=>'$2y$10$hhTW0KElMnPuQO9GFZT1yOIrXd6LI/KabIAMWv0kYNlql0pZtEMjS',\n \"facebook\" => \"admin\",\n \"twitter\"=>\"admin\",\n \"instagram\"=>\"admin\",\n \"avatar\"=>\"userImage.png\",\n \"rol_id\"=>2, \n \"created_at\" =>NULL,\n \"updated_at\" =>NULL\n ]\n );\n\n // inicializa tabla PAIS\n DB::table(\"pais\")->insert(\n [\n \"id_pais\"=> 1,\n \"nombre_pais\" => \"Argentina\",\n \"created_at\" =>NULL,\n \"updated_at\" =>NULL\n ]\n );\n\n // inicializa tabla PROVINCIAS\n factory(App\\Provincia::class, 23)->create();\n\n // inicializa tabla DESTINOS\n factory(App\\Destino::class, 20)->create();\n\n // inicializa tabla COMENTARIOS\n factory(App\\Comentario::class, 10)->create();\n\n // inicializa tabla FAVORITOS\n factory(App\\Favorito::class, 5)->create();\n \n // inicializa tabla MENSAJES\n factory(App\\Mensaje::class, 5)->create();\n }", "title": "" }, { "docid": "258a68b251e7e52b90e764a986aea0f9", "score": "0.7726887", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(App\\Property::class, 5)->create();\n factory(App\\Contact::class, 5)->create();\n factory(App\\Feature::class, 5)->create();\n factory(App\\Location::class, 5)->create();\n factory(App\\Image::class, 5)->create();\n factory(App\\Video::class, 5)->create();\n factory(App\\Tag::class, 5)->create();\n factory(App\\Employee::class, 5)->create();\n factory(App\\PropertyEmployee::class, 5)->create();\n factory(App\\User::class, 5)->create();\n factory(App\\UserEmployee::class, 5)->create();\n factory(App\\UserDetail::class, 5)->create();\n }", "title": "" }, { "docid": "9ddfa6b8e708696db5d12d34c9d4f728", "score": "0.77260584", "text": "public function run()\n {\n // Seed with fake role.\n // factory(App\\Role::class, 3)->create();\n \n // Seed with real life roles.\n $roles = [\n ['id'=> 250, 'role' => 'Banned', 'vote_weight' => 0, 'spam_threshold' => 0],\n ['id'=> 500, 'role' => 'Registered user', 'vote_weight' => 1, 'spam_threshold' => 10],\n ['id'=> 750, 'role' => 'Confirmed user', 'vote_weight' => 2, 'spam_threshold' => 50],\n ['id'=> 875, 'role' => 'Editor', 'vote_weight' => 3, 'spam_threshold' => 200],\n ['id'=> 1000, 'role' => 'Administrator', 'vote_weight' => 4, 'spam_threshold' => 1000],\n ];\n \n foreach ($roles as $role) {\n Role::create($role);\n }\n }", "title": "" }, { "docid": "da35f91bdc164c9487439ff37cc282a4", "score": "0.7723604", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n Admin::create([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n ]);\n\n Employee::create([\n 'name' => 'pegawai',\n 'address' => 'surabaya',\n 'phone' => 86665656666,\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n ]);\n\n User::create([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n ]);\n }", "title": "" }, { "docid": "65ebc2415901c1804329cb5eda67fd26", "score": "0.7723045", "text": "public function run()\n {\n\n\n\n $faker = Faker\\Factory::create();\n\n DB::table('users_roles')->insert([\n 'name' => 'Admin',\n\n ]);\n DB::table('users_roles')->insert([\n 'name' => 'Editor',\n\n ]);\n DB::table('users_roles')->insert([\n 'name' => 'Guest',\n\n ]);\n }", "title": "" }, { "docid": "1e0f063fa5c69434fdf04122ef66efe5", "score": "0.7722689", "text": "public function run()\n {\n // Wipe the table clean before populating\n DB::table('users')->delete();\n\n $users = array(\n [\n \"name\" => \"Auto Customs Inc.\",\n \"phone\" => '877-204-7002',\n \"email\" => \"[email protected]\",\n ],\n [\n \"name\" => \"Philip Meckling\",\n \"phone\" => '321-501-1234',\n \"email\" => \"[email protected]\",\n ],\n [\n \"name\" => \"Joe Blough\",\n \"phone\" => '888-123-4567',\n \"email\" => \"[email protected]\",\n ],\n\n );\n\n // Run the seeder\n DB::table('users')->insert($users);\n }", "title": "" }, { "docid": "e37cab7241cc60bd3248948e0026f7c7", "score": "0.77219605", "text": "public function run()\n {\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n $this->call(GenreSeeder::class);\n\n $users = User::factory(10)->hasAttached(Role::find(2))->create();\n\n $artists = Artist::factory(10)->create();\n\n // artists and genres must be generated before songs\n $songs = Song::factory(100)->create();\n\n // users must be generated before playlists. \n // playlist_song entries are created with the hasAttached method.\n $playlists = Playlist::factory(10)->hasAttached($songs)->create();\n }", "title": "" }, { "docid": "ad511f434f764c2a5e866a1356beb2a7", "score": "0.77176195", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::table('groups')->insert([['group_name' => 'student'],['group_name' => 'employee']]);\n DB::table('system_roles')->insert([['role_name' => 'none'],['role_name' => 'beadle'],['role_name' => 'osa'],['role_name' => 'teacher']]);\n }", "title": "" }, { "docid": "4315481d0f561c009a68fbd4d76a6b88", "score": "0.7714018", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n $faker = Faker\\Factory::create();\n\n\n DB::table('users')->delete();\n\n for($i = 0; $i < 10; ++$i)\n {\n DB::table('users')->insert([\n 'name' => 'Nom' . $i,\n 'email' => 'email' . $i . '@blop.fr',\n 'avatar' => 'profile.png',\n 'admin' => rand(0, 1),\n 'password' => bcrypt('password' . $i)\n ]);\n }\n\n for ($i=0;$i<10;$i++)\n {\n DB::table('membres_tribunal')->insert( [\n\n 'nom'=>str_random(10),\n 'telephone'=>mt_rand(666666666,699999999),\n 'grade'=> 'Avocat'\n ]);\n }\n }", "title": "" }, { "docid": "32fcf6bca24d0a313359673895169dfc", "score": "0.7712975", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //DB::statement('SET FOREIGN_KEYS_CHECKS = 0');\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); //MySql\n Libro::truncate();\n Libreria::truncate();\n\n $countLibreria = 50;\n $countLibros = 5000;\n\n factory(Libreria::class, $countLibreria)->create();\n factory(Libro::class, $countLibros)->create();\n }", "title": "" }, { "docid": "384e8b5815d2e9af9d70eae3d52245a6", "score": "0.77094305", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // factory(Address::class,1000)->create();\n // factory(User::class,500)->create();\n //factory(Product::class,1500)->create();\n //factory(Image::class,1000)->create();\n factory(Review::class,3500)->create();\n //factory(Category::class,50)->create();\n //factory(Tag::class,150)->create();\n //factory(Role::class,5)->create();\n //factory(Ticket::class,7)->create();\n }", "title": "" }, { "docid": "bdf9c786dbc3525631942e19087b8a23", "score": "0.77054024", "text": "public function run()\n {\n Book::create([\n 'title' => 'The Two Towers',\n 'author' => 'J.R.R. Tolkien'\n ]);\n Book::create([\n 'title' => 'Man in Search of Meaning',\n 'author' => 'Viktor Frankl'\n ]);\n Book::create([\n 'title' => 'The Alchemist',\n 'author' => 'Paolo Coehlo'\n ]);\n Book::create([\n 'title' => 'East of Eden',\n 'author' => 'John Steinbeck'\n ]);\n Book::create([\n 'title' => 'Aeneid',\n 'author' => 'Virgil'\n ]);\n Book::create([\n 'title' => 'Paradiso',\n 'author' => 'Dante Alighieri'\n ]);\n }", "title": "" }, { "docid": "17a5e5a2dc7a47f3dc1d9f42adc78825", "score": "0.77012223", "text": "public function run()\n {\n $this->call(CommunitySeeder::class);\n // $this->call(PolingSeeder::class);\n DB::table('poling')->insert([\n 'title' => 'Pemilihan Ketua',\n 'description' => 'Pemilihan',\n 'start_at' => '2021-08-24',\n 'stop_at' => '2021-08-25'\n ]);\n $this->call(UserSeeder::class);\n $this->call(CandidateSeeder::class);\n }", "title": "" }, { "docid": "02839fd48d7058b2c787b8ed974c5c65", "score": "0.77009976", "text": "public function run()\n {\n // User::truncate();\n // Category::truncate();\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('12345678'),\n 'username' => 'admin',\n 'isAdmin' => '1',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('categories')->insert([\n 'name' => 'ที่นอน',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "6bcd80a79b26bc6230d0dbafbf53a13d", "score": "0.76991385", "text": "public function run()\n {\n //empty the database first\n DB::table('books')->delete();\n\n $books = [\n\n [\n 'user_id' => 1,\n 'title' => 'Laravel 5.7 For Dummies',\n 'description' => 'This is the right book for you if you want to get started with using the Laravel framework',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n\n [\n 'user_id' => 1,\n 'title' => 'Laravel vs Node.js',\n 'description' => 'This is an ebook comparing the difference and similarities between Laravel and Node.js',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n\n ];\n\n DB::table('books')->insert($books);\n }", "title": "" }, { "docid": "03809687e5d587409a10b664ad575d6d", "score": "0.769905", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // create default townships\n $faker = Faker\\Factory::create();\n for ($i = 0; $i < 30; $i++) {\n \\App\\Models\\Township::create([\n 'code' => $faker->numberBetween(1000000, 22002038),\n 'area' => $faker->numberBetween(20, 500),\n 'location' => $faker->address,\n 'latitude' => $faker->numberBetween(232322, 44534445),\n 'longitude' => $faker->numberBetween(232322, 44534445)\n ]);\n }\n }", "title": "" }, { "docid": "33c290db4d794815321050e69479ef9e", "score": "0.76983136", "text": "public function run()\n {\n /**\n * truncates tables before seeding\n */\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n App\\User::truncate();\n App\\Product::truncate();\n App\\Transaction::truncate();\n App\\Category::truncate();\n DB::table('category_product')->truncate();\n\n\n\n /**\n * prevent Events \n */\n User::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n Category::flushEventListeners();\n\n /**\n * seeding table users\n */\n factory(App\\User::class,1000)->create();\n /**\n * seeding table categories\n */\n factory(App\\Category::class,30)->create();\n /**\n * seeding table products and the pivot table\n */\n factory(App\\Product::class,1000)->create()->each(\n function($product){\n $categories = App\\Category::all()->random(mt_rand(1,5))->pluck('id');\n $product->categories()->attach($categories);\n });\n /**\n * seeding table transactions\n */\n factory(App\\Transaction::class,1000)->create();\n\n }", "title": "" }, { "docid": "3ab1da7523b244be048582931b4784b6", "score": "0.76979566", "text": "public function run()\n {\n $this->call(PermissionsTableSeeder::class);\n factory(App\\Product::class, 50)->create();\n factory(App\\User::class, 6)->create();\n\n factory(App\\Category::class, 20)->create();\n factory(App\\Tag::class, 21)->create();\n\n factory(App\\Post::class, 300)->create()->each(function(App\\Post $post){\n $post->tags()->attach([\n rand(1,5),\n rand(6,14),\n rand(15,20),\n\n ]);\n });\n //fregona para cargar tablas pivote recordar dar de alta la relacioón sino no funciona\n\n\n Role::create([\n 'name' => 'Admin',\n 'slug' => 'admin',\n 'special' => 'all-access'\n ]);\n\n App\\User::create([\n 'name'=>'rodrigo',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('rorro'),\n\n ]);\n }", "title": "" }, { "docid": "6b51251d22df55c7b04c27df5213a7b2", "score": "0.7696267", "text": "public function run()\n {\n $categories = factory(Category::class)->times(5)->create();\n // $product = factory(Product::class)->times(5)->create();\n \n foreach ($categories as $category) {\n factory(Product::class)->times(3)->create([\n 'category_id' => $category->id\n ]);\n }\n\n $this->call([\n UsersTableSeeder::class,\n ]);\n }", "title": "" }, { "docid": "fb8674413c8a4104e4b1c436f70ed975", "score": "0.76955414", "text": "public function run()\n {\n //factory('App\\User',60)->create();\n // $this->call(UsersTableSeeder::class);\n /*$faker = Faker::create();\n foreach (range(1,5) as $index) {\n \t$my_category = DB::table('ordercategorgies')->insert([\n\t \t'order_type' => $faker->randomElement(['local food' ,'take away']),\n\t \t'food_photo' => $faker->imageUrl($width = 100, $height = 100),\n\t ]);\n }*/\n // dd($my_food);\n \n }", "title": "" }, { "docid": "a18a3a4890fe667e04bd7d3caf5a59e7", "score": "0.7693552", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n// $categories = Category::factory(5)->create();\n// $sources = Source::factory(5)->create();\n//\n// foreach ($categories as $category)\n// {\n// foreach ($sources as $source)\n// {\n// News::factory(10,\n// [\n// 'category_id' => $category->id,\n// 'source_id' => $source->id,\n// ])\n// ->create();\n// }\n// }\n\n $sources = Source::factory(10)->create();\n\n Category::factory(10)\n ->create()\n ->each(function ($category) use ($sources) {\n News::factory(10,\n [\n 'category_id' => $category->id,\n 'source_id' => $sources[rand(0, count($sources) - 1)]->id,\n ])\n ->create();\n });\n }", "title": "" }, { "docid": "329b24a3b852e37339619d080f8e67c4", "score": "0.7692279", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::table('users')->insert([\n 'name'=>'Information Technology',\n 'abbreviation'=>'IT',\n 'email'=>'[email protected]',\n 'password'=>Hash::make('itpass'),\n 'role'=>'Admin'\n ]);\n\n // DB::table('inventories')->insert([\n // 'motherboard'=>'helasd',\n // 'cpu'=>'asd',\n // 'hdd'=>'dg',\n // 'memory'=>'agdfsd',\n // 'monitor'=>'sdfg',\n // 'case'=>'dsfgd',\n // 'keyboard'=>'',\n // 'mouse'=>'',\n // 'video_card'=>'',\n // 'power_supply'=>'',\n // 'printer'=>'',\n // 'telephone'=>''\n // ]);\n \n DB::table('users')->insert([\n 'name'=>'Human Resource',\n 'abbreviation'=>'HR',\n 'email'=>'[email protected]',\n 'password'=>Hash::make('hrpass'),\n 'role'=>'User'\n ]);\n }", "title": "" }, { "docid": "f312cccea49d3336d07a2c524243b0e9", "score": "0.7691922", "text": "public function run()\n {\n /*\n * In a real production system, I imagine you'd either seed\n * reasonable credentials for a trusted user, or you'd have\n * no seeder and have someone with database access insert\n * the first user manually.\n * It's not necessary for the admin user to be an author,\n * but why waste seeded data?\n * Explicitly stated ID of 1 should fail if there's any data in\n * the table. Only run these seeders on a fresh database.\n */\n DB::table('users')->insert(\n [\n 'id' => 1,\n 'name' => 'Admin Admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'isAdmin' => true,\n 'isAuthor' => true,\n ]\n );\n\n DB::table('users')->insert(\n [\n 'id' => 2,\n 'name' => 'Arthur Author',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'isAuthor' => true,\n ]\n );\n }", "title": "" }, { "docid": "7257c69616adc43e5cde09cbe9609093", "score": "0.768958", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // factory(App\\Articulo::class,10)->create();\n // factory(App\\Periodista::class,10)->create();\n // factory(App\\Sucursal::class,10)->create();\n // factory(App\\Tipo::class,10)->create();\n // factory(App\\Empleado::class,10)->create();\n // factory(App\\Revista::class,10)->create();\n // factory(App\\Periodista_Articulo::class,10)->create();\n factory(App\\Revista_Articulo::class,10)->create();\n //factory(App\\Sucursal_Revista::class,10)->create(); \n }", "title": "" }, { "docid": "0b28aea8b99ae559650697917bb74848", "score": "0.76886624", "text": "public function run()\n {\n $faker = Faker::create();\n Schema::disableForeignKeyConstraints();\n DB::table('positions')->truncate();\n\n $positions = [];\n $stores = DB::table('stores')->take(10)->get();\n\n foreach ($stores as $store) {\n $positions[] =\n [\n 'name' => 'Lightbox_' . $faker->randomNumber(2),\n 'description' => $faker->text,\n 'image_url'=> '',\n 'store_id' => $store->id,\n 'channel' => 'Lightbox',\n 'buffer_days' => 2,\n 'unit' => 'day',\n 'price' => 2000000,\n ];\n $positions[] =\n [\n 'name' => 'Billboard_' . $faker->randomNumber(2),\n 'description' => $faker->text,\n 'image_url'=> '',\n 'store_id' => $store->id,\n 'channel' => 'Billboard',\n 'buffer_days' => 2,\n 'unit' => 'day',\n 'price' => 5000000,\n ];\n }\n\n DB::table('positions')->insert($positions);\n Schema::enableForeignKeyConstraints();\n }", "title": "" }, { "docid": "fdceb467a92f830a50199ac2a220b8b3", "score": "0.7685264", "text": "public function run()\n {\n\n //create 3 users\n //Illuminate\\Support\\Facades\\DB::table('users')->delete();\n factory(App\\Models\\User::class, 3)->create();\n factory(\\App\\Models\\Country::class, 50)->create();\n factory(\\App\\Models\\Genre::class, 10)->create();\n factory(\\App\\Models\\Comment::class, 3)->create();\n\n //assign each film to a genre\n \\App\\Models\\Film::all()->each(function($film) {\n factory(\\App\\Models\\FilmGenres::class, 1)->create(['film_id'=>$film->id]);\n });\n }", "title": "" }, { "docid": "08ef2d96ca9f09f01db166c921bcded0", "score": "0.7680802", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n // $this->call(StaticContentSeeder::class);\n // factory(App\\Menu::class, 20)->create();\n // factory(App\\Page::class, 20)->create();\n // factory(App\\PageItem::class, 20)->create();\n // factory(App\\Company::class, 20)->create();\n // factory(App\\Announcment::class, 20)->create();\n // factory(App\\Survey::class, 20)->create();\n // factory(App\\SurveyQuestion::class, 20)->create();\n // factory(App\\SurveyAnswerOption::class, 20)->create();\n // factory(App\\SurveyHit::class, 20)->create();\n // factory(App\\Transaction::class, 20)->create();\n // factory(App\\StaticContent::class, 20)->create();\n // factory(App\\Search::class, 20)->create();\n // factory(App\\Sector::class, 20)->create();\n // factory(App\\SubscriptionPlan::class, 20)->create();\n }", "title": "" }, { "docid": "b05010d7103a3a12b2577b68b3dba100", "score": "0.76797414", "text": "public function run()\n {\n// DB::table('users')->truncate();\n// DB::table('roles')->truncate();\n\n $this->call(RoleCreateSeeder::class);\n factory(App\\Models\\User::class, 10)->create();\n factory(App\\Models\\Category::class,20)->create();\n factory(App\\Models\\Post::class,1000)->create();\n }", "title": "" }, { "docid": "884fc4f5db946c3ac90deba14a0e705d", "score": "0.76765025", "text": "public function run()\n {\n User::create([\n 'username' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('111'),\n 'role_id' => 1,\n 'email_verified_at' => date('Y-m-d h:i:s'),\n ]);\n\n // $faker = Faker::create();\n \t// foreach (range(1,20) as $index) {\n\t // DB::table('users')->insert([\n // 'username' => strtolower($faker->unique()->firstName()),\n\t // 'email' => $faker->email,\n // 'password' => bcrypt('111'),\n // 'role_id' => 2,\n // 'email_verified_at' => $faker->date('Y-m-d', 'now')\n\t // ]);\n\t // }\n\n }", "title": "" }, { "docid": "b4470aaaaba217c380aa7eb641709475", "score": "0.76755524", "text": "public function run()\n {\n //DB::table('reviews')->delete();\n DatabaseSeeder::ClearTable('reviews');\n\n Review::create(\n array('user_id' => '3', 'text' => 'Отличный питомник, грамотные и доброжелательные заводчики!\n Большое спасибо вам за нашу собаку!', 'published' => '0')\n );\n\n Review::create(\n array('user_id' => '3', 'text' => 'Отличный питомник ,все собачки красивые и породные ,чемпионы,\n с хорошим здоровьем . Мы очень довольны выбором .Всем рекомендуем.', 'published' => '1')\n );\n\n }", "title": "" }, { "docid": "520f4a3190cf8cb42f24a3f54f6e405e", "score": "0.7672424", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker\\Factory::create();\n\n foreach (range(1,10) as $index ){\n \tDB::table('students')->insert([\n \t\t'first_name'=> $faker->firstName,\n \t\t'last_name'=>$faker->lastName,\n \t\t'date_of_birth'=>$faker->DateTime,\n \t\t'student_id'=>$faker->ean8,\n \t\t'gender'=>$faker->boolean,\n \t\t'phone_number'=>$faker->randomDigit,\n \t\t'email'=> $faker->email,\n \t\t'semester'=>$faker->randomDigit,\n \t\t'class'=>$faker->sentence\n\n \t\t]);\n }\n // $this->call(StudentsTableSeeder::run());\n }", "title": "" }, { "docid": "390fa29c1c99b4bb24ad7a2b512bf966", "score": "0.7670938", "text": "public function run()\n {\n // $this->call(RoleSeeder::class);\n // $this->call(PermissionSeeder::class);\n // $this->call(UserSeeder::class);\n $user = User::factory()->create(['name' => 'Jhon Snow']);\n $user2 = User::factory()->create(['name' => 'Cthulhu Doe']);\n $user3 = User::factory()->create(['name' => 'Alsina Dimitresku']);\n $user4 = User::factory()->create(['name' => 'Master']);\n $user5 = User::factory()->create(['name' => 'General', 'email' => '[email protected]', 'password' => 'general']);\n $category = Category::factory()->create(['name' => 'War']);\n $category2 = Category::factory()->create(['name' => 'Magic']);\n $category3 = Category::factory()->create(['name' => 'Villages']);\n\n Post::factory(5)->create(['user_id' => $user->id, 'category_id' => $category->id]);\n Post::factory(5)->create(['user_id' => $user2->id, 'category_id' => $category2->id]);\n Post::factory(3)->create(['user_id' => $user2->id, 'category_id' => $category3->id]);\n Post::factory(6)->create(['user_id' => $user3->id, 'category_id' => $category3->id]);\n Post::factory(3)->create(['user_id' => $user4->id, 'category_id' => $category->id]);\n Post::factory(2)->create(['user_id' => $user4->id, 'category_id' => $category2->id]);\n Post::factory(2)->create(['user_id' => $user5->id, 'category_id' => $category2->id]);\n Post::factory(2)->create(['user_id' => $user5->id, 'category_id' => $category2->id]);\n\n }", "title": "" }, { "docid": "e9fa3efca175f7f31cd9e7dbd866e396", "score": "0.7670763", "text": "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n\n DB::table('users')->insert([\n ['role_id' => '1', 'name' => 'admin', 'email' => '[email protected]', 'password' => bcrypt('11111111'), 'remember_token' => Str::random(10),],\n ['role_id' => '2', 'name' => 'teacher', 'email' => '[email protected]', 'password' => bcrypt('11111111'), 'remember_token' => Str::random(10),],\n ]);\n\n DB::table('roles')->insert([\n ['name' => 'Teacher'], \n ['name' => 'Admin'],\n ['name' => 'Staff'],\n ['name' => 'accountant'],\n ]);\n\n DB::table('days')->insert([\n ['day' => 'Satarday'],\n ['day' => 'Sunday'],\n ['day' => 'Monday'],\n ['day' => 'Tuesday'],\n ['day' => 'Wednesday'],\n ['day' => 'Thusday'],\n ['day' => 'Friday'],\n ]);\n\n // DB::table('periods')->insert([\n // ['name' => 'Period 1'],\n // ['name' => 'Period 2'],\n // ['name' => 'Period 3'],\n // ['name' => 'Period 4'],\n // ['name' => 'Period 5'],\n // ['name' => 'Period 6'],\n // ['name' => 'Period 7'],\n // ]);\n\n DB::table('school_classes')->insert([\n ['name' => 'One'],\n ['name' => 'Two'],\n ['name' => 'Three'],\n ['name' => 'Four'],\n ['name' => 'Five'],\n ['name' => 'Six'],\n ['name' => 'Seven'],\n ]);\n }", "title": "" }, { "docid": "89ec7e3fec2adf84109c14670c573096", "score": "0.76704", "text": "public function run()\n {\n \\App\\Models\\Titre::factory(40)->create();\n \\App\\Models\\Resume::factory(10)->create();\n\n\n $this->call([\n CoordonneeSeeder::class,\n StatistiquesSeeder::class,\n CompetenceSeeder::class,\n PhotoSeeder::class\n ]);\n }", "title": "" }, { "docid": "3b2a01f87307d1f6a7c835e40ee5ee65", "score": "0.76703376", "text": "public function run()\n {\n $books = json_decode(file_get_contents(database_path().'/seedData/books.json'), True);\n\n foreach ($books as $title => $book) {\n Book::create([\n 'title' => $title,\n 'author' => $book['author'],\n 'year_published' => $book['year_published'] ?? null,\n 'image_url' => $book['image_url'] ?? null,\n ]);\n }\n }", "title": "" }, { "docid": "7ccc15187b4ea3c508675a1b9719d8ce", "score": "0.76688737", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n \\App\\Models\\Office::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n //Populate offices table\n $manypopulate = 50;\n\n for($i= 0; $i < $manypopulate; $i++){\n \\App\\Models\\Office::create([\n 'name' => $faker->sentence,\n 'address' => $faker->sentence,\n ]);\n }\n\n }", "title": "" }, { "docid": "91c9b2e508b7a00cf3618bc6f31b7019", "score": "0.76669747", "text": "public function run()\n {\n\n /** @var \\Faker\\Generator $faker */\n $faker = App::make(Faker\\Generator::class);\n\n \\DB::statement(\"SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;\");\n\n $this->clearTable(\"buyers\");\n $this->clearTable(\"sellers\");\n $this->clearTable(\"estates\");\n $this->clearTable(\"agents\");\n $this->clearTable(\"users\");\n $this->clearTable(\"agent_estate\");\n $this->clearTable(\"orders\");\n $this->clearTable(\"proposals\");\n\n \\DB::statement(\"SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;\");\n\n $this->command->comment(\"Seeding users\");\n factory(\\App\\User::class, 200)->create();\n\n $buyers = \\App\\User::where('user_type', 0)->get();\n $sellers = \\App\\User::where('user_type', 1)->get();\n $agents = \\App\\User::where('user_type', 2)->get();\n\n $this->command->comment(\"Seeding buyer\");\n foreach ($buyers as $buyer) {\n /** @var \\App\\Buyer $instance */\n $instance = new \\App\\Buyer;\n $instance->user_id = $buyer->id;\n $instance->save();\n }\n\n $this->command->comment(\"Seeding agent\");\n foreach ($agents as $agent) {\n /** @var \\App\\Agent $instance */\n $instance = new \\App\\Agent;\n $instance->user_id = $agent->id;\n $instance->title = $faker->company;\n $instance->fee = $faker->numberBetween(10000, 200000) / 100;\n $instance->description = $faker->paragraph;\n $instance->save();\n }\n\n $this->command->comment(\"Seeding seller\");\n\n\n foreach ($sellers as $seller) {\n $is_verified = 1 - intval($faker->numberBetween(0, 7) / 5);\n /** @var \\App\\Seller $instance */\n $instance = new \\App\\Seller;\n $instance->user_id = $seller->id;\n $instance->verified = $is_verified;\n $instance->verified_by_agent_id = $is_verified ? App\\Helpers\\Util::randomArrayMember($agents)->id : null;\n $instance->id_card_num = strval($faker->randomNumber(8)) . strval($faker->randomNumber(8));\n $instance->save();\n }\n\n\n $this->command->comment(\"Seeding estates\");\n factory(\\App\\Estate::class, 500)->create();\n\n $this->command->comment(\"Run php artisan seed:relations\");\n return;\n }", "title": "" }, { "docid": "355839e7a0c00a26ac93a195a1884fe3", "score": "0.7666388", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n // Blog::factory(15)->create();\n\n User::factory(15)\n ->create()\n ->each(function ($user) {\n Blog::factory(random_int(2, 5))\n ->seeding()\n ->create(['user_id' => $user])\n ->each(function ($blog) {\n Comment::factory(random_int(1, 3))->create(['blog_id' => $blog]);\n });\n });\n }", "title": "" }, { "docid": "185338e2242eb2e25db37e4fd2d6c989", "score": "0.7666128", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Membresia::truncate();\n\n // Initialize the Faker package. We can use several different locales for it, so\n // let's use the german locale to play with it.\n $faker = \\Faker\\Factory::create('es_ES');\n\n // And now, let's create a few articles in our database:\n for ($i = 1; $i < 30; $i++) {\n Membresia::create([\n 'name' => $faker->name,\n 'dni' => $faker->randomNumber(5),\n 'role' => $faker->name (),\n 'status' => $faker->name (),\n ]);\n }\n\n }", "title": "" }, { "docid": "b51f9ef314a6dd780dd083daea1bf1f0", "score": "0.7664623", "text": "public function run()\n {\n \t$faker= Faker::create();\n\n \t$canino_role = DB::table('especie')\n ->select('id')\n ->where('nombre', 'Canino')\n ->first()\n ->id;\n\n $felino_role = DB::table('especie')\n ->select('id')\n ->where('nombre', 'Felino')\n ->first()\n ->id;\n $ave_role = DB::table('especie')\n ->select('id')\n ->where('nombre', 'Ave')\n ->first()\n ->id; \n\n \t$estatus_activo= DB::table('estatus')\n ->select('id')\n ->where('nombre', 'activo')\n ->first()\n ->id;\n \tfor($i=0; $i<10; $i++){\n\n \t\t\\DB::table('animal')->insert(array(\n \t'idespecie' => $faker->randomElement([$canino_role,$felino_role,$ave_role]),\n \t'idestatususuario' => $estatus_activo,\n \t'nombre' => $faker->firstName,\n \t'comentario'=>$faker->paragraph($nbSentences = 3)\n \t));\t\n \t}\n }", "title": "" }, { "docid": "b97070b0b16872dc6d136f9070202aec", "score": "0.7661499", "text": "public function run()\n\t{\n\t\t//DB::statement('SET FOREIGN_KEY_CHECKS=0');\n\t\t/* Linea::truncate();\n\t\tPedido::truncate();\n EstadoPedido::truncate();\n\t\tRepresentante::truncate();\n\t\tLibroAutor::truncate();\n\t\tLibro::truncate();\n\t\tAutor::truncate();\n\t\tTipoEdicion::truncate();\n\t\tGenero::truncate();\n\t\tNivel::truncate(); */\n\t\t$this->call(UsersTableSeeder::class);\n\t\tfactory(EditorialWeb\\User::class, 10)->create();\n\t\tfactory(EditorialWeb\\Post::class, 50)->create();\n\t\t\n\t\t$this->call(CategoriaSeeder::class);\n\t\t\n\t\t$this->call(NivelesSeeder::class);\n\t\t$this->call(TipoEdicionesSeeder::class);\n\t\t$this->call(AutoresSeeder::class);\n\t\t$this->call(GenerosSeeder::class);\n\t\t$this->call(LibrosSeeder::class);\n\t\t$this->call(LibroAutoresSeeder::class);\n\t\t$this->call(RepresentantesSeeder::class);\n $this->call(EstadoPedidosSeeder::class);\n\t $this->call(PedidosSeeder::class);\n\t\t$this->call(LineasSeeder::class);\n\t\t\n\n\t}", "title": "" }, { "docid": "3bacf019e0a7bd2d72ff258166f87982", "score": "0.76610523", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n 'role'=>'Administrador'\n ]);\n DB::table('functionms')->insert([\n ['title' => 'Função 1'],\n ['title' => 'Função 2'],\n ['title' => 'Função 3'],\n ['title' => 'Função 4'],\n ['title' => 'Função 5']\n ]);\n DB::table('processes')->insert([\n ['title' => 'Processo 1', 'color' => '#333333'],\n ['title' => 'Processo 2', 'color' => '#ff5500'],\n ['title' => 'Processo 3', 'color' => '#005533'],\n ['title' => 'Processo 4', 'color' => '#ff9922'],\n ['title' => 'Processo 5', 'color' => '#bb52f1']\n ]);\n DB::table('setor')->insert([\n 'name'=>'TI',\n 'descricao'=>'Apenas um seed para testes'\n ]);\n DB::table('cargo')->insert([\n 'name'=>'Desenvolvedor',\n 'resumo'=>'Apenas um seed para testes',\n 'descricao'=>'Apenas um seed para testes'\n ]);\n }", "title": "" }, { "docid": "858e059a01a752d81019e1020e108284", "score": "0.76581466", "text": "public function run()\n {\n // Department\n foreach(['Generate Emp'] as $name)\n {\n $department = Department::create([\n 'name' => $name,\n 'active' => true,\n ]);\n\n foreach(range(1, rand(10, 35)) as $index)\n {\n // Employee\n $employee = Employee::create([\n 'username' => $faker->companyEmail(),\n 'password' => bcrypt('qweasd'),\n 'firstname' => $faker->firstName(),\n 'lastname' => $faker->lastName(),\n 'can_login' => true,\n 'active' => true,\n 'department_id' => $department->id,\n 'position_id' => Position::orderByRaw(\"RAND()\")->first()->id\n ]);\n\n // Permission\n Permission::create([\n 'role_id' => Role::where('name', 'general')->first()->id,\n 'employee_id' => $employee->id\n ]);\n }\n }\n }", "title": "" } ]
2d2540fb0faff307ed6cc1e08e9030de
Restore upload values from Session
[ { "docid": "7de99176d30c24b98b39a2f2ffceb5de", "score": "0.78476596", "text": "function RestoreFromSession() {\n\t\t$sSessionID = $this->getSessionID();\n\t\t$this->Action = @$_SESSION[$sSessionID . \"_Action\"];\n\t\t$this->FileSize = @$_SESSION[$sSessionID . \"_FileSize\"];\n\t\t$this->FileName = @$_SESSION[$sSessionID . \"_FileName\"];\n\t\t$this->ContentType = @$_SESSION[$sSessionID . \"_ContentType\"];\n\t\t$this->ImageWidth = @$_SESSION[$sSessionID . \"_ImageWidth\"];\n\t\t$this->ImageHeight = @$_SESSION[$sSessionID . \"_ImageHeight\"];\n\t\t$this->Value = @$_SESSION[$sSessionID . \"_Value\"];\n\t}", "title": "" } ]
[ { "docid": "0c2a11a23d66691e11ade62fad130f34", "score": "0.6823815", "text": "private function restore_post_data() {\r\n \t\treturn Session::pull('form_data'); \r\n \t}", "title": "" }, { "docid": "e47e2455f1fa773e5bcd767166c03567", "score": "0.6752392", "text": "public function restore()\n {\n //retrieve session info\n if ($this->session->has('cart')) {\n\n //get cart\n $session = $this->session->get('cart');\n\n //assign session info\n $this->data = $session['data'];\n $this->rates = $session['rates'];\n $this->lines = $session['lines'];\n $this->coupon = $session['coupon'];\n }\n }", "title": "" }, { "docid": "eda342d9426efd56a0c279e17780bb75", "score": "0.6653019", "text": "function restoreSessionData($sessiondata = null) {\r\n Auth::storage()->restoreSessionData($sessiondata);\r\n }", "title": "" }, { "docid": "61ad1c329147d7ef9c389540eb4f65fa", "score": "0.65279627", "text": "public function restoreFromSession() {\n $data = Yii::app()->user->getState(__CLASS__);\n is_array($data) || $data=array();\n foreach ($data as $product_id => $quantity) {\n $this->put(Product::model()->findByPk($product_id), $quantity);\n }\n }", "title": "" }, { "docid": "dd9dbd7dde201c7a391ff996cdcb2675", "score": "0.63433707", "text": "function SaveToSession() {\n\t\t$sSessionID = $this->getSessionID();\n\t\t$_SESSION[$sSessionID . \"_Action\"] = $this->Action;\n\t\t$_SESSION[$sSessionID . \"_FileSize\"] = $this->FileSize;\n\t\t$_SESSION[$sSessionID . \"_FileName\"] = $this->FileName;\n\t\t$_SESSION[$sSessionID . \"_ContentType\"] = $this->ContentType;\n\t\t$_SESSION[$sSessionID . \"_ImageWidth\"] = $this->ImageWidth;\n\t\t$_SESSION[$sSessionID . \"_ImageHeight\"] = $this->ImageHeight;\t\n\t\t$_SESSION[$sSessionID . \"_Value\"] = $this->Value;\n\t}", "title": "" }, { "docid": "a2805b4ba2b812c4b9072be91b39d68e", "score": "0.63176966", "text": "private function setFiles()\n {\n Session::put('backupFiles', $this->files);\n }", "title": "" }, { "docid": "7f370e877a5048322f209f3c25ce8c18", "score": "0.62017477", "text": "private function restore_session()\n {\n $this->request->session()->renew();\n $this->request->session()->write('user', 'John Smith');\n }", "title": "" }, { "docid": "180b86788a2fce3bb8aa09db05213460", "score": "0.60714364", "text": "function RestoreDbFromSession() {\n\t\t$sSessionID = $this->getSessionID();\n\t\t$this->DbValue = @$_SESSION[$sSessionID . \"_DbValue\"];\n\t}", "title": "" }, { "docid": "08974cca629dad11e1f4749b93c72e54", "score": "0.6025465", "text": "function resume()\n\t{\n\t\t$this->file_name = cast(\"string\", $this->_form->getData($this->_name .\".file_name\"));\n\t\t$this->file_size = (int) $this->_form->getData($this->_name .\".file_size\");\n\t\t$this->file_tmp = cast(\"string\", $this->_form->getData($this->_name .\".file_tmp\"));\n\t\t$this->file_type = cast(\"string\", $this->_form->getData($this->_name .\".file_type\"));\n\t\t$this->status_code = (int) $this->_form->getData($this->_name .\".status_code\");\n\t\t$this->status_description = (string) $this->_form->getData($this->_name .\".status_description\");\n\t\tif( $this->file_tmp !== NULL && !file_exists($this->file_tmp) )\n\t\t\t// Temp. file is gone!\n\t\t\t$this->delete();\n\t}", "title": "" }, { "docid": "8f483c95673b9bc0d78d867591f63695", "score": "0.6014237", "text": "function RemoveFromSession() {\n\t\t$sSessionID = $this->getSessionID();\n\t\tunset($_SESSION[$sSessionID . \"_Action\"]);\n\t\tunset($_SESSION[$sSessionID . \"_FileSize\"]);\n\t\tunset($_SESSION[$sSessionID . \"_FileName\"]);\n\t\tunset($_SESSION[$sSessionID . \"_ContentType\"]);\n\t\tunset($_SESSION[$sSessionID . \"_ImageWidth\"]);\n\t\tunset($_SESSION[$sSessionID . \"_ImageHeight\"]);\n\t\tunset($_SESSION[$sSessionID . \"_Value\"]);\n\t}", "title": "" }, { "docid": "b1cc07fa909ef7861b6e3525a6d24848", "score": "0.601183", "text": "function unsetEditFlowerSession() {\n\t\t\tunset($_SESSION['floweridsessioninput']);\n\t\t\tunset($_SESSION['eflowerid']);\n\t\t\tunset($_SESSION['eflowername']);\n\t\t\tunset($_SESSION['etypeid']);\n\t\t\tunset($_SESSION['eprice']);\n\t}", "title": "" }, { "docid": "d348141d89d48470e7c396e3f8652555", "score": "0.5998136", "text": "public function PopulateFromSession() {\n if(isset($_SESSION[$this->key])) {\n $this->data = $_SESSION[$this->key];\n if(isset($this->data['flash'])) {\n $this->flash = $this->data['flash'];\n unset($this->data['flash']);\n }\n }\n }", "title": "" }, { "docid": "0e861425789e794dc071a0e77a56f56c", "score": "0.5955399", "text": "public function clearTemporaryInput()\n\t{\n\t\tif (session()->has('postInput')) {\n\t\t\tsession()->forget('postInput');\n\t\t}\n\t\t\n\t\tif (session()->has('picturesInput')) {\n\t\t\t$picturesInput = (array)session()->get('picturesInput');\n\t\t\tif (!empty($picturesInput)) {\n\t\t\t\ttry {\n\t\t\t\t\tforeach ($picturesInput as $key => $filePath) {\n\t\t\t\t\t\t$this->removePictureWithItsThumbs($filePath);\n\t\t\t\t\t}\n\t\t\t\t} catch (\\Exception $e) {\n\t\t\t\t\tif (!empty($e->getMessage())) {\n\t\t\t\t\t\tflash($e->getMessage())->error();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsession()->forget('picturesInput');\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (session()->has('paymentInput')) {\n\t\t\tsession()->forget('paymentInput');\n\t\t}\n\t\t\n\t\tif (session()->has('uid')) {\n\t\t\tsession()->forget('uid');\n\t\t}\n\t}", "title": "" }, { "docid": "767c15971a72e15abec41da10355174e", "score": "0.58526886", "text": "public function storeVolumeInSession()\n\t\t\t{\n\t\t\t\t$_SESSION['music_global_voulme'] = $this->getFormField('volume');\n\t\t\t}", "title": "" }, { "docid": "b6ccba50ed0b7d9663538c062211f36a", "score": "0.5803039", "text": "public function DeleteAllValue()\n {\n $this->sessionData = array();\n $_SESSION[$this->sessionName] = serialize($this->sessionData);\n }", "title": "" }, { "docid": "ee472485ccbee9ad5207642c6e7986d4", "score": "0.5799456", "text": "function sessions_start($data) {\n\t\tif (isset($_GET['ACT']) AND isset($_POST['ACT']) AND isset($_POST['FILEUPLOAD'])) {\n\t\t\tunset($_POST['ACT']);\n\t\t\tunset($_POST['FILEUPLOAD']);\n\t\t}\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "394c8c252c19d39de338bd89a2af98f6", "score": "0.5781773", "text": "public function restore();", "title": "" }, { "docid": "394c8c252c19d39de338bd89a2af98f6", "score": "0.5781773", "text": "public function restore();", "title": "" }, { "docid": "805aa07657303c837f4b4f01e304fb47", "score": "0.5776391", "text": "function saveSession()\n\t{\n\n\t\tif (!isset($this->_session['t3d']))\n\t\t\t$this->_setKey($this->extKey, $this->_session);\n\t\telse\n\t\t{\n\t\t\tif(!is_array($this->_session['creator']))\n\t\t\t{\n\t\t\t\t$user = $this->getUser();\n\t\t\t\t$this->_session['creator']['type'] = strtolower(TYPO3_MODE);\n\t\t\t\t$this->_session['creator']['id'] = $user->user['uid'];\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// TODO: Mettre à jour le fichier t3d avec les nouvelles données de session. Ne pas utiliser l'en-tête en cache.\n\t\t\t$t3d = utopia_t3d_editor::loadFile($this->_session['t3d'], 1);\n\n\t\t\t$t3d['header']['meta']['session'] = $this->_session;\n\t\t\t\n\t\t\tutopia_t3d_editor::saveFile($this->_session['t3d'], $t3d);\n\t\t\t\n\t\t\t$this->_setKey($this->extKey, array( 't3d' => $this->_session['t3d'] ));\n\t\t}\n\t}", "title": "" }, { "docid": "1beeb6a54f35d17ca8eae3d4dc42bc15", "score": "0.5735204", "text": "private function resetAutoload(){\n $_SESSION;\n }", "title": "" }, { "docid": "3d2634eb8db0a57bfd866d466e1891a7", "score": "0.5707484", "text": "public static function commit() {\n $_SESSION['LUXION_SESSION'] = serialize(self::$storage);\n }", "title": "" }, { "docid": "e509de5cda3b193a6ed2f197bf94eb90", "score": "0.5698546", "text": "private function clearFiles()\n {\n Session::forget('backupFiles');\n }", "title": "" }, { "docid": "3b83765798da54c104420b9b3a2d67ae", "score": "0.5698393", "text": "public function flushOldInput():void{\n unset($_SESSION['old']);\n }", "title": "" }, { "docid": "a80f26969e98bc57662e57a921a40c89", "score": "0.5696525", "text": "protected function _loadFromSession()\n {\n if (isset($this->sessionData['checked'])) $this->checked = $this->sessionData['checked'];\n }", "title": "" }, { "docid": "a28f954d3683d7bdf2b0729302f55439", "score": "0.5688926", "text": "protected function loadLastSessionData()\n {\n $sessionData = Session::getInstance()->get(self::FLASH_KEY);\n\n if (isset($sessionData['errors'])) {\n $this->oldErrors->setMessages($sessionData['errors']);\n }\n\n if (isset($sessionData['messages'])) {\n $this->oldMessages->setMessages($sessionData['messages']);\n }\n }", "title": "" }, { "docid": "c82f50515fc79f52763804b0fdc96318", "score": "0.5677613", "text": "public function destroyPostFieldsInSession()\n {\n $_SESSION['first_name'] = NULL;\n $_SESSION['last_name'] = NULL;\n $_SESSION['user_phone'] = NULL;\n $_SESSION['user_email'] = NULL;\n $_SESSION['post_code'] = NULL;\n $_SESSION['descr'] = NULL;\n $_SESSION['is_company'] = NULL;\n }", "title": "" }, { "docid": "e7292d7ea7b7b16d0ddb7b020331481f", "score": "0.566975", "text": "public function reflash()\n {\n $this->session['data'][':new:'] = array_merge(\n $this->session['data'][':new:'], $this->session['data'][':old:']\n );\n }", "title": "" }, { "docid": "8f876c0f85052508ae0b74e55ffa9dea", "score": "0.566719", "text": "private function saveState() {\n $_SESSION['on'] = $this->getTvOnOff();\n $_SESSION['channel'] = $this->getChannel();\n $_SESSION['volume'] = $this->getVolume();\n $_SESSION['mute'] = $this->getMute();\n }", "title": "" }, { "docid": "eba9b8ffeb12d39453348986ecde2310", "score": "0.56596136", "text": "protected function clearUserDataFromStorage()\n {\n $this->session->remove($this->getName());\n }", "title": "" }, { "docid": "7502efa0ad58ee2c16ad08e1c54f817a", "score": "0.5654335", "text": "function saveTempTicket($Ticket)\n{\n unset($_SESSION[Ticket]);\n $_SESSION[Ticket] = json_decode($Ticket);\n}", "title": "" }, { "docid": "01db36d50db143e24722feb41ea701ad", "score": "0.56443524", "text": "protected function _saveToSession()\n {\n $this->sessionData['checked'] = $this->checked;\n }", "title": "" }, { "docid": "ab64f5bc2f04738c36e27a37bafb008c", "score": "0.56222755", "text": "public function saveEditorDataToSession() {\r\n $newUrlData = $this->input->post('newUrlData');\r\n $this->session->set_userdata('newUrlData', $newUrlData);\r\n }", "title": "" }, { "docid": "82e9d3b9ac621f88ab3f45c4bcd425e5", "score": "0.5612977", "text": "public function save_session_vars()\n\t{\n\t\t// basics\n\t\t$_SESSION['ck']['user_group'] = ci()->user->user_group_id;\n\t\t$_SESSION['ck']['integration_path'] = APPPATH.'libraries/';\n\t\t//$_SESSION['ck']['url'] = config_item('asset_url').config_item('asset_js_dir').'/backend/ckfinder/';\n\t\t$_SESSION['ck']['url'] = base_url().'uploads/blog/';\n\t\t$_SESSION['ck']['directory'] = FCPATH.'uploads/blog/';\n\n\t\t$_SESSION['ck']['language'] = 'en';\n\t}", "title": "" }, { "docid": "06ab2beb1fe8d26e8aaf1dde7a954f61", "score": "0.55811256", "text": "public function saveSession() {\n\t\t$this->gridSession->page = $this->page;\n\t\t$this->gridSession->order = $this->order;\n\t\t$this->gridSession->filter = $this->filter;\n\t\t$this->gridSession->itemsPerPage = $this->itemsPerPage;\n\t}", "title": "" }, { "docid": "974455e16dd3517efe32172e785a4aa0", "score": "0.5572664", "text": "private function cleanStorage(){\n $this->session->remove('zveen_twitter.requestTokenSecret');\n $this->session->remove('zveen_twitter.oauthAccessToken');\n $this->session->remove('zveen_twitter.oauthAccessTokenSecret');\n }", "title": "" }, { "docid": "bc22c7002ad065065ab5d9bcd61c8174", "score": "0.5558364", "text": "public function flush()\n {\n $this->session['data'] = array(Session::CSRF => $this->token(), ':new:' => array(), ':old:' => array());\n }", "title": "" }, { "docid": "a7eff47b5f603aae853d5fdc73151960", "score": "0.5552178", "text": "private function store_post_data() {\r\n \t\tSession::push('form_data', $_POST); \r\n \t}", "title": "" }, { "docid": "69a040afe8ffc3253b29231ce3ac1c17", "score": "0.5522729", "text": "function FXSession() {\n\n $this->forms = pnSessionGetVar('FormExpressData');\n if ( empty($this->forms) ) {\n pnSessionSetVar('FormExpressData', $this->forms);\n }\n\n }", "title": "" }, { "docid": "9e44a62045c91495788c3eece2cd98a4", "score": "0.5520063", "text": "public function remove() {\n $this->view = 'upload/files';\n \n $key = $this->input->post('key');\n $filehash = $this->input->post('filehash');\n if (is_string($key)) {\n $this->uploads = upload::files_from_session($key);\n unset($this->uploads[$filehash]);\n $this->session->set('uploads-'. $key, $this->uploads);\n }\n \n response::html(View::factory('upload/files')->render());\n }", "title": "" }, { "docid": "7131e4330a23973cfcba9ab06780bf55", "score": "0.5514744", "text": "public function save()\n {\n\n $_SESSION['shop_basket_data'] = $this->basket;\n\n }", "title": "" }, { "docid": "d22621fa537f1dc9a4e9340131ea856c", "score": "0.550934", "text": "protected function restoreIdentity()\n {\n Zend_Auth::getInstance()->setStorage($this->previousIdentityStorage);\n $this->previousIdentityStorage = null;\n }", "title": "" }, { "docid": "82a0add365250f8e7edea773c88ac4e7", "score": "0.5508496", "text": "protected function _loadFromSession()\n {\n if (isset($this->sessionData['text'])) $this->text = $this->sessionData['text'];\n }", "title": "" }, { "docid": "9af97e6a4410c6c01a82b17249319101", "score": "0.5491295", "text": "public function recreateSession ()\n\t{\n\t\t$_SESSION['loggedIn'] = false;\n\t}", "title": "" }, { "docid": "67b7bac0afcbf13504b1715ce343dcbe", "score": "0.5487336", "text": "function cargarVariablesSesion(){\n\tif(!isset($_SESSION['usuario'])){\n\t\t$_SESSION['usuario']=\"\";\n\t}\n\tif(!isset($_SESSION['perfiles'])){\n\t\t$_SESSION['perfiles']=array();\n\t}\n}", "title": "" }, { "docid": "21b2672f058fec3c959c9b344c0311b1", "score": "0.5487174", "text": "function old($key){\n $value = isset($_SESSION['formdata'][$key]) ? $_SESSION['formdata'][$key] : null;\n if($value){\n unset($_SESSION['formdata'][$key]);\n }\n\n return $value;\n}", "title": "" }, { "docid": "867b180aee3c9b737e7491a629ace776", "score": "0.5486914", "text": "private function update_session()\n {\n $_SESSION['pseudo'] = $_POST['info-name'];\n $_SESSION['email'] = $_POST['info-email'];\n $_SESSION['birth-date'] = $_POST['info-dob'];\n $_SESSION['city'] = $_POST['info-city'];\n }", "title": "" }, { "docid": "cedc695290c808492e1cc5ef839bddbd", "score": "0.5481884", "text": "protected function saveSession()\n {\n $this->Session->set($this->syncCtoStats, $this->arrData);\n }", "title": "" }, { "docid": "31abed361e0841c12450c10ddb40e802", "score": "0.5475636", "text": "public function storeInput()\r\n {\r\n if ($this->isMethod('post')) {\r\n $this->session->create('planet_oldInput', $_POST);\r\n }\r\n }", "title": "" }, { "docid": "304bb0913adf4479a33f67c613fd468f", "score": "0.54692876", "text": "private function save()\n {\n Session::start();\n @session_regenerate_id(true);\n if ($this->isAuthorized()) {\n $_SESSION['auth'] = [\n 'email' => $this->email,\n 'data' => $this->data\n ];\n } elseif (isset($_SESSION['auth'])) {\n unset($_SESSION['auth']);\n }\n }", "title": "" }, { "docid": "d940ffbcd707fc599779b3987d487067", "score": "0.54675835", "text": "public function StoreInSession() {\n $_SESSION[$this->key] = $this->data;\n }", "title": "" }, { "docid": "783cb24f97eabbdce8fb460dbcf0f87e", "score": "0.54258925", "text": "function actualizar_datos ( $nombres_cliente, $apellidos_cliente, $imagen_cliente ){\r\n $_SESSION['nombre_cliente'] = $nombres_cliente.\" \".$apellidos_cliente;\r\n if ( $imagen_cliente != null ) $_SESSION['img_cliente'] = $imagen_cliente;\r\n}", "title": "" }, { "docid": "e5eada21a42ed78a4c88aebb7ed65117", "score": "0.5424249", "text": "public function save(): void\n {\n $this->session->put($this->baseIndex.self::SESSION_SUFFIX_INDEX_TAB, $this->indexTab);\n\n $this->session->put($this->keyPrefix.self::SESSION_SUFFIX_FILTERS, $this->filters);\n $this->session->put($this->keyPrefix.self::SESSION_SUFFIX_SORT_DIRECTION, $this->sortDirection);\n $this->session->put($this->keyPrefix.self::SESSION_SUFFIX_LIMIT, $this->limit);\n $this->session->put($this->keyPrefix.self::SESSION_SUFFIX_SORT_FIELD, $this->sortFieldName);\n $this->session->put($this->keyPrefix.self::SESSION_SUFFIX_INDEX_TAB, $this->indexTab);\n\n // Only save the isEmpty boolean to the session if the value is true. Otherwise, null will be loaded as false.\n if ($this->isEmptyFilter) {\n $this->session->put($this->keyPrefix.self::SESSION_SUFFIX_IS_EMPTY, $this->isEmptyFilter);\n } else {\n $this->session->put($this->keyPrefix.self::SESSION_SUFFIX_IS_EMPTY, null);\n }\n\n $this->session->save();\n }", "title": "" }, { "docid": "d346534b25b7960be04dccbf73f8df00", "score": "0.5411336", "text": "public function prepareSession(){\r\n $session_file = __DIR__.'/SessionSaveHandler.php';\r\n $session_file = file_get_contents($session_file);\r\n\r\n /* Replace asset file, so original bootstrap.php file won't be touched */\r\n $new_bootstrap_file = Yii::$app->assetManager->getPublishedPath((new KCFinderAsset)->sourcePath);\r\n $new_bootstrap_file .= '/core/bootstrap.php';\r\n\r\n\t\t$replace = array(\r\n\t\t\t'{sessionName}' => Yii::$app->session->getName(),\r\n\t\t\t'{cookieName}' => Yii::$app->session->getName(),\r\n\t\t\t'{savePath}' => Yii::$app->session->getSavePath(),\r\n\t\t);\r\n $session_file = str_replace( array_keys($replace), array_values($replace), $session_file);\r\n\r\n file_put_contents($new_bootstrap_file, $session_file);\r\n }", "title": "" }, { "docid": "953c621c3a0da318af2d47394be96520", "score": "0.54036057", "text": "function reset()\n\t{\n\t\t$this->_session = array();\n\t}", "title": "" }, { "docid": "5381d032037f020557413360f8a2776f", "score": "0.5399502", "text": "protected function _saveToSession()\n {\n $this->sessionData['text'] = $this->text;\n }", "title": "" }, { "docid": "dcc14dabae93b72402bbb3bf57571735", "score": "0.53970414", "text": "protected function beforesaved()\r\n\t{\r\n\t}", "title": "" }, { "docid": "72f293ee92f1f438400041faaca1f469", "score": "0.5396986", "text": "protected function _setSessionVariables()\n\t{\n\t\t$_SESSION['any_out_of_stock'] = $this->sessionAnyOutOfStock;\n\t}", "title": "" }, { "docid": "8f74efadbb116d17528aa645fdec6287", "score": "0.5396956", "text": "protected function clearSavedInput() {\n unset($_SESSION['saveInput'][$this->getType()]);\n }", "title": "" }, { "docid": "d346a52d92f54c95a78ca7a26573aa4b", "score": "0.5338419", "text": "public function _persistToSession()\n {\n $sessionArray = null;\n if ($this->isSubmittedFilterbox) {\n $sessionArray = ['isSubmittedFilterbox' => 1];\n }\n return $sessionArray;\n }", "title": "" }, { "docid": "7b899c856423b969229b03262852e06d", "score": "0.532443", "text": "protected function saveInput() {\n $_SESSION['saveInput'][$this->getType()] = $this->input;\n }", "title": "" }, { "docid": "da05e2e3ec15c9089e61a99518290653", "score": "0.5320349", "text": "public function refreshuploaded()\n {\n $this->setUploaded(new \\DateTime());\n }", "title": "" }, { "docid": "c5cf9c1d31e456a956f0124fa1e176ee", "score": "0.5315428", "text": "public function saveData()\n\t{\n\t\t$this->session->remove(self::SESSION_INDEX);\n\t\t$this->session->set(self::SESSION_INDEX, $this->messages);\n\t}", "title": "" }, { "docid": "5c899d2a054b528a9149e45aa598ff8f", "score": "0.5312754", "text": "public function postSave()\n {\n // delete old avatar\n if (isset($this->tempAvatarPath)) {\n if( is_file($this->tempAvatarPath) and file_exists($this->tempAvatarPath) ) {\n @unlink($this->tempAvatarPath);\n }\n\n $this->tempAvatarPath = null; // clear the temp avatar path\n }\n\n // upload avatar\n if (null === $this->avatar) {\n return;\n }\n\n $uploadDir = $this->getUploadRootDir() . '/' . $this->userId ;\n $filename = $this->avatarFilename . '.' . $this->avatarFileExt;\n\n // throws a FileException exception\n // catch exception (if thrown) and report error in the frontend\n try{\n $this->avatar->move($uploadDir, $filename);\n }catch(FileException $e){\n $this->setUploadErrorMessage('flash.error.file_upload');\n #$this->setUploadErrorMessage($e->getMessage());\n }\n\n $this->avatar = null; // clear avatar field\n }", "title": "" }, { "docid": "2027b8b804480bef1a21ff5403c2edb1", "score": "0.5309752", "text": "private function moveItems()\n {\n if ($sessionItems = $this->sessionStorage->load()) {\n $items = array_merge($this->loadDb(), $sessionItems);\n $this->saveDb($items);\n $this->sessionStorage->save([]);\n }\n }", "title": "" }, { "docid": "1bc7e5032893b9e7b512b07a016fbc88", "score": "0.5304613", "text": "public function reset()\n {\n session()->forget('_update_download_link');\n session()->forget('_update_download_filename');\n session()->forget('_update_download_offset');\n session()->forget('_temporary_update_path');\n session()->forget('_extracted_update_path');\n\n \\Artisan::call('cache:clear');\n \\Artisan::call('route:clear');\n }", "title": "" }, { "docid": "f2c00101d64c819a1126ddf085e071be", "score": "0.5294337", "text": "public function storeOriginal()\n {\n if (!$this->checkIdentifier()) {\n return $this->send404();\n }\n\n $this->page->setBodyRendering(false);\n\n if (!$this->model->handlePhotoUpload($this->vars['identifier'], 'original', $this->page->request)) {\n $this->page->setStatus('500', 'Upload failed');\n\n } else {\n $this->log('Deltager #' . $this->model->getParticipantIdFromIdentifier($this->vars['identifier']) . ' har uploadet originalt billede', 'Photo', null);\n }\n }", "title": "" }, { "docid": "765968a6f175e46148ac05aa6e5d34e4", "score": "0.5293578", "text": "private function SaveSession()\r\n\t\t{\r\n\t\t\t$_SESSION['script'] = $this->m_Script;\r\n\t\t}", "title": "" }, { "docid": "9eac7e58e1374ef71c2bd71dd2884281", "score": "0.5288643", "text": "function captcha_session_restore($old_session_id) {\n\tif ($old_session_id) {\n\t\t// echo \"restore: \".$old_session_id.\"<br/>\";\n\t\tsession_id($old_session_id);\n\t\tsession_start(array(\n\t\t\t\"use_cookies\" => 0,\n\t\t\t\"use_only_cookies\" => 0,\n\t\t\t\"use_trans_sid\" => 0,\n\t\t\t\"use_strict_mode\" => 0,\n\t\t));\n\t}\n}", "title": "" }, { "docid": "1fa03d11d91052e185f1551a5a32240c", "score": "0.5286205", "text": "private static function cleanupSessionVariables(): void\n {\n self::sessionContinue();\n $allowed = ['currStudent', 'currUser', 'STUDENTS', 'USERS'];\n $keys = array_keys($_SESSION);\n foreach ($keys as $key) {\n if ( ! in_array($key, $allowed)) {\n unset($_SESSION[$key]);\n }\n }\n }", "title": "" }, { "docid": "4d1b371f09779e8032edceaff1673d30", "score": "0.528571", "text": "function set_on_session($id){\n $flag = $this->check_file($id);\n if($flag == true){ //if the flag is true than it has file else it has entry\n $this->session->set_userdata('prescription',$this->presc);\n }\n $this->session->set_userdata('presc_id',$id);\n }", "title": "" }, { "docid": "3ea5749518238dd93f8b3608be52fabb", "score": "0.52822894", "text": "public function save(): void\n {\n if ($this->isActive() && session_name() == $this->getName()) {\n $_SESSION = $this->all();\n session_write_close();\n }\n }", "title": "" }, { "docid": "a62c8bf0d0469d3e1a51ac8eda77461b", "score": "0.5278961", "text": "public function regenerate()\n {\n $this->session['id'] = $this->storage->id();\n $this->exists = false;\n }", "title": "" }, { "docid": "a4235bfdeda73a210afdf08a10171746", "score": "0.52696276", "text": "public static function clearSessionOfFinTsValues()\n {\n Session::remove(AppConstants::$SESSION_FINTS_OBJECT);\n Session::remove(AppConstants::$SESSION_TAN_ACTION);\n Session::remove(AppConstants::$SESSION_TAN_MEDIUM);\n Session::remove(AppConstants::$SESSION_TAN_MODE);\n Session::remove(AppConstants::$SESSION_AVAILABLE_TAN_MEDIA);\n Session::remove(AppConstants::$SESSION_SEPA_ACCOUNT);\n }", "title": "" }, { "docid": "90652a0b49f90113fb890093d40006ab", "score": "0.52680314", "text": "private function getFiles()\n {\n $this->files = Session::get('backupFiles');\n }", "title": "" }, { "docid": "e52f08a47336ae6e333ffafaa01f0e26", "score": "0.52674425", "text": "public function reset() {\n\t\t$this->setProperties(CsvimprovedModelAvailablefields::DbFields('vm_product_files'));\n\t}", "title": "" }, { "docid": "722634abdc630f2d751e477beaa54436", "score": "0.5261976", "text": "public static function reset()\r\n {\r\n $_SESSION = array();\r\n }", "title": "" }, { "docid": "39bc110dbd042fae7f07b7e9f4d1a6bf", "score": "0.5239242", "text": "public function setSession() {\n\t $_SESSION['username'] = $this->username;\n\t $_SESSION['empstartrow'] = (int)$this->empstartrow;\n\t $_SESSION['csrftoken'] = $this->csrftoken;\n\n\n\t $_SESSION['id'] = $this->id;\n\t $_SESSION['utilizador'] = $this->username;\n\t $_SESSION['pede_pwd'] = $this->pede_pwd;\n\n $_SESSION['manutencao'] = $this->username;\n\t $_SESSION['perfil'] = $this->username;\n\t $_SESSION['lang'] = $this->lang;\n\n\t }", "title": "" }, { "docid": "94359383692771ba5b91a397c7bb690b", "score": "0.52349216", "text": "public static function retrieve() {\n if (isset($_SESSION['LUXION_SESSION'])) {\n $storage = unserialize($_SESSION['LUXION_SESSION']);\n if (!is_array($storage)) throw new Exception();\n self::$storage = $storage;\n }\n }", "title": "" }, { "docid": "28662f5ee008161c1358756d7be7459a", "score": "0.5230566", "text": "protected function set_session() : void {\n if ($this->session->userdata(Basket::BASKET) == null || ! is_array($this->session->userdata(Basket::BASKET))) {\n $this->update_basket_array(array());\n }\n }", "title": "" }, { "docid": "ba23c8cb1811034386bf716c32627d90", "score": "0.5224308", "text": "public function loadFromSession()\n {\n $this->owner->setAttributes(Yii::app()->user->getState(get_class($this->getOwner())));\n }", "title": "" }, { "docid": "210bc106caa4fc347f6f4b3b56b5d224", "score": "0.5222283", "text": "private function storeSession() {\n\t\t$_SESSION['user'] = array();\n\t\t$_SESSION['user']['id'] = $this->user['id'];\n\t\t$_SESSION['user']['email'] = $this->user['email'];\n\t\t$_SESSION['user']['first_name'] = $this->user['first_name'];\n\t\t$_SESSION['user']['last_name'] = $this->user['last_name'];\n\t}", "title": "" }, { "docid": "244fe4e160e16995f877638f273f02fc", "score": "0.5204985", "text": "public function restoreState()\n {\n if ($activeCountry = $this->sessionState->getByKey(self::ACTIVE_COUNTRY_KEY)) {\n $this->activeCountry = $activeCountry;\n }\n }", "title": "" }, { "docid": "bcda88f8b6787e9a945955cfcd1f457d", "score": "0.5204948", "text": "public function restore()\n {\n $this->restoreEntrust();\n $this->restoreSoftDelete();\n }", "title": "" }, { "docid": "50d3ba5377fb408d406cb27ce95d57b0", "score": "0.51842195", "text": "protected function uploadInternal()\n {\n $filepath = $this->save();\n\n try {\n $result = $this->extract($filepath);\n unlink($filepath);\n\n return $result;\n } catch (\\Exception $e) {\n unlink($filepath);\n\n throw $e;\n }\n }", "title": "" }, { "docid": "c43d3aaf6a66194935d559798ae894be", "score": "0.51833445", "text": "public function saveSession() {\n\t\t\tsession_write_close();\n\t\t}", "title": "" }, { "docid": "87b9a6303cbb6ce0b3e5d14a727d6b6b", "score": "0.51812786", "text": "private function save() : void\n {\n $_SESSION['cart'] = $this->line_items;\n }", "title": "" }, { "docid": "fc496b79cabd10578fdf76be48f1ef26", "score": "0.5180461", "text": "function clear_errors() {\n\tunset($_SESSION['errors']);\t\n\tunset($_SESSION['presets']);\t\n}", "title": "" }, { "docid": "47f27e44bbe5a366ac7133451c355727", "score": "0.51784515", "text": "public function rvps_init_session(){\r\n\t\t\t$session_name = $this->rvps_session_name();\r\n\r\n\t\t\tif(!isset($_SESSION[$session_name])){\r\n\r\n\t\t\t\t\t$_SESSION[$session_name] = serialize(array());\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "c97496082cbc1f6ed7bb49b0ab6c0276", "score": "0.5174831", "text": "public function clearSession() {\n\t $_SESSION = array();\n\t $this->username = null;\n\t $this->empstartrow = 1;\n\t $this->csrftoken = null;\n\t $this->id = null;\n\t $this->pede_pwd = null;\n\t $this->lang = null; \n\t }", "title": "" }, { "docid": "20786a7eeff0949cd0d385af2d6e09b4", "score": "0.5165173", "text": "protected function filterRestore()\n\t{\n\t\tif (\n\t\t\t$this->arParams[\"SAVE_IN_SESSION\"] === \"Y\"\n\t\t\t&& ($_REQUEST[\"filter\"] ?? '') === ''\n\t\t)\n\t\t{\n\t\t\t$session = Main\\Application::getInstance()->getSession();\n\t\t\t$filterId = (int)($session['spo_filter_id'] ?? 0);\n\t\t\tif ($filterId > 0)\n\t\t\t{\n\t\t\t\t$_REQUEST[\"filter_id\"] = $filterId;\n\t\t\t}\n\t\t\t$filterDateFrom = (string)($session['spo_filter_date_from'] ?? '');\n\t\t\tif ($filterDateFrom !== '')\n\t\t\t{\n\t\t\t\t$_REQUEST[\"filter_date_from\"] = $filterDateFrom;\n\t\t\t}\n\t\t\t$filterDateTo = (string)($session['spo_filter_date_to'] ?? '');\n\t\t\tif ($filterDateTo !== '')\n\t\t\t{\n\t\t\t\t$_REQUEST[\"filter_date_to\"] = $filterDateTo;\n\t\t\t}\n\t\t\t$filterStatus = (string)($session['spo_filter_status'] ?? '');\n\t\t\tif ($filterStatus !== '')\n\t\t\t{\n\t\t\t\t$_REQUEST[\"filter_status\"] = $filterStatus;\n\t\t\t}\n\t\t\t$filterPayed = (string)($session['spo_filter_payed'] ?? '');\n\t\t\tif ($filterPayed !== '')\n\t\t\t{\n\t\t\t\t$_REQUEST[\"filter_payed\"] = $filterPayed;\n\t\t\t}\n\t\t\t$filterCanceled = (string)($session['spo_filter_canceled'] ?? '');\n\t\t\tif ($filterCanceled !== '')\n\t\t\t{\n\t\t\t\t$_REQUEST[\"filter_canceled\"] = $filterCanceled;\n\t\t\t}\n\t\t\t$filterHistory = (string)($session['spo_filter_history'] ?? '');\n\t\t\tif ($filterHistory === \"Y\")\n\t\t\t{\n\t\t\t\t$_REQUEST[\"filter_history\"] = \"Y\";\n\t\t\t}\n\t\t\tunset($session);\n\t\t}\n\t}", "title": "" }, { "docid": "7edcb2999bcdbe54c98f953c4a970691", "score": "0.5162823", "text": "public function preRemoveUpload(){\n //on sauvegarde temporairement le nom du fichier car il dépend de l'id\n $this->tempFileNom = $this->getUploadRootDir().'/'.$this->id.'.'.$this->url ;\n\n }", "title": "" }, { "docid": "65e6c67d833cb41dd1e15cbd1696a0a1", "score": "0.5162669", "text": "protected static function restoreSession() {\n if (static::$hibernate) {\n $data = static::loadHibernatedData();\n \n if (static::$DEBUG)\n Logger::debug(\"Restoring session from hibernation\");\n \n // if there's no data in the cookie, or failed\n if (!$data || empty($data)) {\n if (static::$DEBUG)\n Logger::debug(\"Could not restore session because there was no data or cookie was not available\");\n return false;\n }\n \n if (static::$DEBUG === 2)\n Logger::debug($data, \"hibernated data loaded\");\n \n // hydrate the session using this data\n static::syncSessionData($data);\n }\n \n // check for persistent flag\n static::$syncPersist = (isset(static::$sessionData[static::$syncPersistFlagName]));\n \n // validate & expand\n $valid = static::validateData();\n \n if (!$valid && static::$DEBUG)\n Logger::debug(\"Could not restore session because of data validation failure\");\n \n return $valid;\n }", "title": "" }, { "docid": "d80887a8b432c27ba38164d8a21aa76c", "score": "0.5159831", "text": "public function restored(PhotoAd $photoAd)\n {\n //\n }", "title": "" }, { "docid": "367854061af080cd8a6beceb63f4ce96", "score": "0.515101", "text": "public function reflash()\n {\n $this->flashDataNew = array_merge($_SESSION[$this->flashKey], $this->flashDataNew);\n }", "title": "" }, { "docid": "db933d9bfbacdb9bebb37ba7cf36105f", "score": "0.5148111", "text": "function SaveSessionData($data){\n\t\t// we don't need password match, so we unset it:\n\t\tunset($data['passwordMatch']);\n\t\t$_SESSION['data'] = $data;\n\t\techo \"<p>saved:\". print_r($_SESSION['data']) .\"</p>\";\n\t\techo \"<p>full contents of session variable: <br>\". print_r($_SESSION) .\"</p>\";\n}", "title": "" }, { "docid": "fdae40e29f30a95ea7e18fee5ee74429", "score": "0.51475036", "text": "protected function restoreFactoryState()\n\t{\n\t\t\\JFactory::$application\t= $this->savedFactoryState['application'];\n\t\t\\JFactory::$config\t\t= $this->savedFactoryState['config'];\n\t\t\\JFactory::$dates\t\t= $this->savedFactoryState['dates'];\n\t\t\\JFactory::$session\t\t= $this->savedFactoryState['session'];\n\t\t\\JFactory::$language\t= $this->savedFactoryState['language'];\n\t\t\\JFactory::$document\t= $this->savedFactoryState['document'];\n\t\t\\JFactory::$acl\t\t\t= $this->savedFactoryState['acl'];\n\t\t\\JFactory::$database\t= $this->savedFactoryState['database'];\n\t\t\\JFactory::$mailer\t\t= $this->savedFactoryState['mailer'];\n\t}", "title": "" }, { "docid": "f4e05c08dd69799b670cf8b561d01cf5", "score": "0.51447374", "text": "function upload_file() {\n upload_file_to_temp();\n }", "title": "" }, { "docid": "f4e05c08dd69799b670cf8b561d01cf5", "score": "0.51447374", "text": "function upload_file() {\n upload_file_to_temp();\n }", "title": "" }, { "docid": "cf4174dccf40c875a6a1f3881a9acab0", "score": "0.5137096", "text": "public static function resetBruteForceProtect() {\n Yii::app()->session[self::$flName] = 0;\n }", "title": "" }, { "docid": "b162bde8292088f1e62c30c1bc4303b9", "score": "0.513704", "text": "protected function beforeSaving($session, $project)\n {\n parent::beforeSaving($session, $project);\n $this->saveContents();\n\n if ( isset ($_REQUEST['original']))\n {\n if (substr($_REQUEST['original'], 0, 5) == '_tmp_')\n {\n //DEFINE('_THUMB_WIDTH', 250);\n \n\t\t\t $config = wcmConfig::getInstance();\n\t\t\t\t$creationDate = dateOptionsProvider::fieldDateToArray(date('Y-m-d H:i:s'));\n\n\t\t\t\t$photoDir = $config['wcm.webSite.repository'].'illustration/photo/'.$creationDate['year'].'/'.$creationDate['month'].'/'.$creationDate['day'].'/';\n\n $originalFileName = $_REQUEST['original'];\n\t\t\t\t\n\t\t\t\t$newFileName = photo::getFinalPicName($originalFileName, $photoDir);\n\t\t\t\t\n rename($photoDir.$originalFileName, $photoDir.$newFileName);\n\t\t\t\t\n\t\t\t\t$_REQUEST['original'] = $newFileName;\n\t\t\t\t\n /*try\n {\n $img = new wcmImageHelper($photoDir.$newFileNames['original']);\n\t\t\t\t\t//$img->thumb($photoDir.$newFileNames['thumb'], _THUMB_WIDTH, _THUMB_HEIGHT);\n $img->resize($photoDir.$newFileNames['thumb'], _THUMB_WIDTH, 100000, true);\n\t\t\t\t\tlist($width, $height, $type, $attr) = getimagesize($photoDir.$newFileNames['thumb']);\n\t\t\t\t\t\n\t\t\t\t\t@chmod($photoDir.$newFileNames['original'], 0775);\n\t\t\t\t\t@chmod($photoDir.$newFileNames['thumb'], 0775);\n\t\t\t\t\t\n $_REQUEST['original'] = $newFileNames['original'];\n $_REQUEST['thumbnail'] = $newFileNames['thumb'];\n $_REQUEST['thumbWidth'] = _THUMB_WIDTH;\n $_REQUEST['thumbHeight'] = $height;\n }\n catch(Exception $e)\n {\n @unlink($photoDir.$originalFileName);\n wcmMVC_Action::setError(_BIZ_INVALID_PICTURE);\n }*/\n }\n }\n }", "title": "" } ]
f39f594e5efdaac08286d3c804b77f02
The data of the form.
[ { "docid": "0b817addbdb1eef1d9ac83415d77a818", "score": "0.0", "text": "public function data()\n {\n return [\n\n ];\n }", "title": "" } ]
[ { "docid": "a02e3150970aeeb04671ef7f7faad0cd", "score": "0.7828468", "text": "public function get_form_data() {\n\t\treturn $this->form_data;\n\t}", "title": "" }, { "docid": "547a7fc911b6e6b209baf520e6f99cfe", "score": "0.7435333", "text": "public function form()\n\t{\n\t\treturn $this->serialize();\n\t}", "title": "" }, { "docid": "eaeab8242d85f366d556ea99af808581", "score": "0.73939097", "text": "public function getFormData()\n {\n return $this->form->getData();\n }", "title": "" }, { "docid": "c3a6c6a1f006d5619a8208d6d3982677", "score": "0.7209265", "text": "public function builder_form_data() {\n\n\t\tif ( ! empty( $_GET['form_id'] ) && empty( $this->form_data ) ) {\n\t\t\t$this->form_data = wpforms()->form->get(\n\t\t\t\tabsint( $_GET['form_id'] ),\n\t\t\t\tarray(\n\t\t\t\t\t'content_only' => true,\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "3eb05a290067b18f18df9a357c792268", "score": "0.7120978", "text": "protected function _Get_Form_Data() {\n $entry_data = $this->entry_data;\n // Retrieve the submission decoded fields\n $data = unserialize(base64_decode($entry_data->data_fields));\n // If no usable data was returned\n if (!$data || !is_array($data)) { return ; }\n // Create a list for the html values\n $raw_values = array();\n // Loop through each of the returned data\n foreach ($data as $machine_code => $field_value) {\n // Populate with the value\n $raw_values[$machine_code] = $field_value;\n }\n // Return the html value\n return $raw_values;\n }", "title": "" }, { "docid": "88b4de7e7d900e3263386deb652cfec5", "score": "0.70808035", "text": "protected function loadFormData() {\r\n\r\n // Check the session for previously entered form data.\r\n $data = JFactory::getApplication()->getUserState('com_fbpagebuilder.edit.page.data', array());\r\n if (empty($data)) {\r\n $data = $this->getItem();\r\n }\r\n\r\n return $data;\r\n }", "title": "" }, { "docid": "b44d4679cc5f4a6a908665fe585d530a", "score": "0.7046865", "text": "protected function loadFormData() {\n $data = JFactory::getApplication()->getUserState(\n 'com_formwx.edit.formulario.data', array()\n );\n\n if (empty($data)) {\n $data = $this->getItem();\n }\n\n return $data;\n }", "title": "" }, { "docid": "f5018010890854c94b230202275abbef", "score": "0.69398177", "text": "protected function loadFormData()\n {\n $data = JFactory::getApplication()->getUserState('com_tecnomed.edit.asignada.data', array());\n\n if (empty($data)) {\n $data = $this->getItem();\n }\n\n return $data;\n }", "title": "" }, { "docid": "9c5179e07955d3b35be5c8e18af4836e", "score": "0.6929352", "text": "abstract public function getDataFromForm(array $form_data);", "title": "" }, { "docid": "4a380e340ab20e9f98338300733321e2", "score": "0.6909147", "text": "protected function loadFormData()\n\t{\n\t\t$data = JFactory::getApplication()->getUserState(\n\t\t\t'com_school.edit.markform.data',\n\t\t\tarray()\n\t\t);\n\t\treturn $data;\n\n\t}", "title": "" }, { "docid": "a92dfe8bae03a94840946d94ab243d69", "score": "0.6906645", "text": "public function getFormContent()\n {\n return $this->form->getContent();\n }", "title": "" }, { "docid": "380a288ccaeafecdacdef9036c42e06a", "score": "0.6893703", "text": "public function getFormData()\n {\n $data = $this->getData('form_data');\n if (is_null($data)) {\n $data = Mage::getSingleton('install/session')->getConfigData(true);\n if (empty($data)) {\n $data = Mage::getModel('install/installer_config')->getFormData();\n }\n else {\n $data = new Varien_Object($data);\n }\n $this->setFormData($data);\n }\n return $data;\n }", "title": "" }, { "docid": "47ed071022f7359445059187b79e4953", "score": "0.6877791", "text": "protected function loadFormData() {\r\n\t\t$data = JFactory::getApplication()->getUserState('com_tracker.comment.commented.data', array());\r\n\t\treturn $data;\r\n\t}", "title": "" }, { "docid": "50b616dbd5ba12ada8dbb0c6eff41e22", "score": "0.68640035", "text": "protected function loadFormData() {\n $data = JFactory::getApplication()->getUserState('com_easysdi_processing.edit.myorder.data', array());\n\n if (empty($data)) {\n $data = $this->getData();\n }\n\n return $data;\n }", "title": "" }, { "docid": "e9b42dd0404b843e040b3c63568c7d9c", "score": "0.68577176", "text": "function formData()\n {\n $this->out->elementStart('fieldset', array('id' => 'newpoll-data'));\n $this->out->elementStart('ul', 'form_data');\n\n $this->li();\n $this->out->input('question',\n // TRANS: Field label on the page to create a poll.\n _m('Question'),\n $this->question,\n // TRANS: Field title on the page to create a poll.\n _m('What question are people answering?'));\n $this->unli();\n\n $max = 5;\n if (count($this->options) + 1 > $max) {\n $max = count($this->options) + 2;\n }\n for ($i = 0; $i < $max; $i++) {\n // @fixme make extensible\n if (isset($this->options[$i])) {\n $default = $this->options[$i];\n } else {\n $default = '';\n }\n $this->li();\n $this->out->input('poll-option' . ($i + 1),\n // TRANS: Field label for an answer option on the page to create a poll.\n // TRANS: %d is the option number.\n sprintf(_m('Option %d'), $i + 1),\n $default,\n null,\n 'option' . ($i + 1));\n $this->unli();\n }\n\n $this->out->elementEnd('ul');\n\n $toWidget = new ToSelector($this->out,\n common_current_user(),\n null);\n $toWidget->show();\n\n $this->out->elementEnd('fieldset');\n }", "title": "" }, { "docid": "8b758e17bd7ebdc97198c214ce1ed1f0", "score": "0.68548876", "text": "protected function loadFormData()\n\t{\n\t\t// Check the session for previously entered form data.\n\t\t$data = JFactory::getApplication()->getUserState('com_joomleague.edit.'.$this->name.'.data', array());\n\t\tif (empty($data))\n\t\t{\n\t\t\t$data = $this->getData();\n\t\t}\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "ea44c83bed958c1cdf318b1b1025ad58", "score": "0.68458647", "text": "protected function loadFormData()\n\t\t{\n\t\t\t// Check the session for previously entered form data.\n\t\t\t$data = JFactory::getApplication()->getUserState($this->option.'.edit.'.$this->getName().'.data', array());\n\n\t\t\tif (empty($data)) \n\t\t\t{\n\t\t\t\t$data = $this->getItem();\n\t\t\t}\n\n\t\t\treturn $data;\n\t\t}", "title": "" }, { "docid": "d90d75ed3813fe223dbf0d6e19bde140", "score": "0.6834474", "text": "public function getDataFromForm()\n {\n $arrayOfData = [\n \"productManufacturer\" => $this->form->value(\"productManufacturer\"),\n \"productName\" => $this->form->value(\"productName\"),\n \"productOriginCountry\" => $this->form->value(\"productOriginCountry\"),\n \"productWeight\" => $this->form->value(\"productWeight\"),\n \"productSize\" => $this->form->value(\"productSize\"),\n \"productSellPrize\" => $this->form->value(\"productSellPrize\"),\n \"productBuyPrize\" => $this->form->value(\"productBuyPrize\"),\n \"productColor\" => $this->form->value(\"productColor\"),\n \"productAmount\" => $this->form->value(\"productAmount\"),\n \"productCategoryID\" => $this->form->value(\"productCategoryID\")\n ];\n\n return $arrayOfData;\n }", "title": "" }, { "docid": "630a451407ed6f06e3c463989c7336bb", "score": "0.68256503", "text": "protected function loadFormData() {\n $data = JFactory::getApplication()->getUserState('com_dbapp.edit.contact.data', array());\n if (empty($data)) {\n $data = $this->getItem();\n }\n return $data;\n }", "title": "" }, { "docid": "0c35c958441dcb9e5249d7eba465cef3", "score": "0.68209857", "text": "protected function loadFormData()\n\t{\n\t\t// Check the session for previously entered form data.\n\t\t$data = null; //JFactory::getApplication()->getUserState('com_scremation.edit.tribute.data', array());\n\n\t\tif (empty($data)) {\n\t\t\t$data = $this->getItem();\n \n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "6724b049880ffaafd0e50039921fe4bf", "score": "0.68037987", "text": "protected function loadFormData()\n\t{\n\t\t// Check the session for previously entered form data.\n\t\t$data = JFactory::getApplication()->getUserState('com_sportsmanagement.edit.'.$this->name.'.data', array());\n\t\tif (empty($data))\n\t\t{\n\t\t\t$data = $this->getData();\n\t\t}\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "a472a78d85ba6c4f8e6ef536f41fd032", "score": "0.6801352", "text": "public function getForm()\n {\n return $this->page_control_default_data;\n }", "title": "" }, { "docid": "2890528f23a5f6bf942e7ab2072319b0", "score": "0.6799665", "text": "public function loadFormData()\n\t{\n\t\t// Get the data from the user state or else load it from the database\n\t\t$app \t\t= JFactory::getApplication();\n\t\t$data \t\t= $app->getUserState(\"$this->option.member.data\", array());\n\t\tif (empty($data))\n\t\t\t$data = $this->getItem();\n\n\t\t// Remember, the custom fields are only added afterwards!\n\t\treturn $data; \n\t}", "title": "" }, { "docid": "7dc3e5bc53a163a31fbccc443375066e", "score": "0.6763974", "text": "public static function formData() {\n return array(\n 'name' => array(\n 'type' => 'text',\n 'label' => 'Naziv'\n ),\n 'rules' => array(\n 'type' => 'text',\n 'label' => 'Pravila'\n ),\n 'superuser' => array(\n 'type' => 'checkbox',\n 'label' => 'Super korisnik'\n )\n );\n }", "title": "" }, { "docid": "89f221381b917505220a855ed63a230f", "score": "0.6755982", "text": "public function getPostedData() {\r\n \r\n return $this->_postedData;\r\n \r\n }", "title": "" }, { "docid": "4a2345297f6fd2547e17d62febf7d581", "score": "0.6754408", "text": "public static function formData() {\n return array(\n 'survey_id' => array(\n 'type' => 'dropdown',\n 'label' => 'Anketa',\n 'data' => Helpers::prepareDropDown(Survey::model()->findAll(), 'id', 'name')\n ),\n 'name' => array(\n 'type' => 'text',\n 'label' => 'Naziv'\n ),\n 'type' => array(\n 'type' => 'text',\n 'label' => \"Tip\"\n ),\n 'label' => array(\n 'type' => 'text',\n 'label' => 'Oznaka'\n ),\n 'size' => array(\n 'type' => 'text',\n 'label' => 'Broj znakova'\n ),\n 'options' => array(\n 'type' => 'text',\n 'label' => 'Dodatno'\n ),\n 'required' => array(\n 'type' => 'checkbox',\n 'label' => 'Required'\n )\n );\n }", "title": "" }, { "docid": "608b4a41028bd3369c30743e186414c6", "score": "0.67452025", "text": "function formData()\n {\n $this->out->element('input', array('name' => 'q',\n 'size' => 20,\n 'id' => 'search-q'));\n }", "title": "" }, { "docid": "ad529bf53e5165b0fd41194ef6b3cdad", "score": "0.67417073", "text": "protected function loadFormData()\n\t{\n\t\t// Check the session for previously entered form data.\n\t\t$data = JFactory::getApplication()->getUserState('com_joaktree.edit.map.data', array());\n\n\t\tif (empty($data)) {\t\t\n\t\t\t$data = $this->getItem();\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "8dbb39141e6f1a2c433a42812529c64a", "score": "0.67408115", "text": "protected function loadFormData()\r\n {\r\n $data = JFactory::getApplication()->getUserState(\r\n 'com_location.edit.location.data',\r\n array()\r\n );\r\n\r\n return $data;\r\n }", "title": "" }, { "docid": "d247dca4742fb22ff8a7ffa9fb56505c", "score": "0.6713576", "text": "protected function loadFormData()\n {\n $data = JFactory::getApplication()->getUserState('com_tecnomed.edit.profesional.data', array());\n\n if (empty($data)) {\n $data = $this->getItem();\n }\n\n return $data;\n }", "title": "" }, { "docid": "4920ca095d5f8ab35d1bb5e346892ed4", "score": "0.6712396", "text": "protected function loadFormData()\n {\n return $this->getDataFromSession();\n }", "title": "" }, { "docid": "69d5ca5281cfb28ef7063a266fa3a2d7", "score": "0.67116636", "text": "protected function loadFormData()\n {\n $app = Factory::getApplication();\n $data = $app->getUserState('com_tkdclub.edit.promotion.data', array());\n\n if(empty($data))\n {\n $data = $this->getItem();\n }\n \n return $data;\n }", "title": "" }, { "docid": "6d978634e66c0e7cb096b2c3b2fb2531", "score": "0.6686256", "text": "protected function loadFormData()\r\r\r\n\t{\r\r\r\n\t\t$data = JFactory::getApplication()->getUserState('com_goodcook.edit.recipe.data', array());\r\r\r\n\t\tif (empty($data)) {\r\r\r\n\t\t\t$data = $this->getItem();\r\r\r\n\t\t}\r\r\r\n\t\treturn $data;\r\r\r\n\t}", "title": "" }, { "docid": "eeba67c6cac52478fe0ca21e7809ccdc", "score": "0.66840446", "text": "public function inputData()\n {\n return $this->getInputData();\n }", "title": "" }, { "docid": "f89347d88d0cf5b526a7e6d1888bc375", "score": "0.6683616", "text": "protected function loadFormData()\n\t{\n\n\t\t// Check the session for previously entered form data.\n\t\t$data = JFactory::getApplication()->getUserState('com_jem.edit.venue.data', array());\n\n\t\tif (empty($data)) {\n\t\t\t$data = $this->getItem();\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "a9c60d2e2c0eaaad86b6919d37467a8e", "score": "0.6624875", "text": "protected function loadFormData()\n\t{\n\t\t// Check the session for previously entered form data.\n\t\t$data = JFactory::getApplication()->getUserState(\n\t\t\t'com_simpleshop.edit.product.data',\n\t\t\tarray()\n\t\t);\n\n\t\t//var_dump($data);\n\n\t\tif (empty($data))\n\t\t{\n\t\t\t$data = $this->getItem();\n\t\t}\n\n\t\treturn $data;\n\n\n\t}", "title": "" }, { "docid": "4fd8683a179b8b4100bd99232ba3040e", "score": "0.6606756", "text": "protected function loadFormData()\n\t{\n\t\t// Check the session for previously entered form data.\n\t\t$data = JFactory::getApplication()->getUserState('com_vmimport.edit.import.data', array());\n\n\t\tif (empty($data)) {\n\t\t\t//$data = $this->getItem();\n \n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "ac941969fa76b3449109899701bda792", "score": "0.65993077", "text": "protected function fieldData()\n {\n if ($this->field_data_fetched === false) {\n $this->field_data = array(\n 'label' => false,\n 'description' => false,\n 'size' => false,\n 'maxlength' => false\n );\n\n if ($this->tool['field_id'] !== null) {\n $model = new Dlayer_DesignerTool_FormBuilder_Password_Model();\n $field_data = $model->fieldData($this->tool['site_id'], $this->tool['form_id'], $this->tool['field_id']);\n\n if ($field_data !== false) {\n foreach ($field_data as $row) {\n if (array_key_exists($row['attribute'], $this->field_data) === true) {\n switch ($row['attribute_type']) {\n case 'integer':\n $this->field_data[$row['attribute']] = intval($row['value']);\n break;\n\n default:\n $this->field_data[$row['attribute']] = trim($row['value']);\n break;\n }\n }\n }\n }\n }\n\n $this->field_data_fetched = true;\n }\n }", "title": "" }, { "docid": "cc73a65b6cd5291866c09ff0ea5d55e4", "score": "0.6585313", "text": "public function get_data() {\n\n\t\treturn $this->request_data;\n\t}", "title": "" }, { "docid": "538e8a9b93c715ea87685ef1a28a390a", "score": "0.6581745", "text": "protected function loadFormData()\n\t{\n\t\t$data = JFactory::getApplication()->getUserState('com_forms.edit.field.data', array());\n\n\t\tif (empty($data)) {\n\t\t\t$data = $this->getItem();\n\n\t\t\t// Prime some default values.\n\t\t\tif ($this->getState('field.id') == 0) {\n\t\t\t\t$app = JFactory::getApplication();\n\t\t\t\t$data->set('catid', JRequest::getInt('catid', $app->getUserState('com_forms.fields.filter.category_id')));\n\t\t\t}\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "538e8a9b93c715ea87685ef1a28a390a", "score": "0.6581745", "text": "protected function loadFormData()\n\t{\n\t\t$data = JFactory::getApplication()->getUserState('com_forms.edit.field.data', array());\n\n\t\tif (empty($data)) {\n\t\t\t$data = $this->getItem();\n\n\t\t\t// Prime some default values.\n\t\t\tif ($this->getState('field.id') == 0) {\n\t\t\t\t$app = JFactory::getApplication();\n\t\t\t\t$data->set('catid', JRequest::getInt('catid', $app->getUserState('com_forms.fields.filter.category_id')));\n\t\t\t}\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "ea40383f47e74d3a7f53e9e2f9a35481", "score": "0.65813917", "text": "protected function loadFormData() {\n\t\t// Check the session for previously entered form data.\n\t\t$data = JFactory::getApplication()->getUserState('com_templateck.edit.template.data', array());\n\n\t\tif (empty($data)) {\n\t\t\t$data = $this->getItem();\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "2a6e371591dba6763335537e4fcb81ad", "score": "0.6578625", "text": "function data() {\n\t\treturn $this->_data;\n\t}", "title": "" }, { "docid": "72cefe5cb7a0a82f034905415c786a84", "score": "0.6571085", "text": "public function getData() {\n\t\treturn $this->fieldData = $this->saveData->get();\n\t}", "title": "" }, { "docid": "8ea9d4143403293507fcaed7030a6078", "score": "0.656947", "text": "public function data(){\n\t\treturn $this->_data;\n\t}", "title": "" }, { "docid": "3e29bd8ef40b26fc132d5f2e188fd14c", "score": "0.6562189", "text": "protected function loadFormData() {\n\t\t// Check the session for previously entered form data.\n\t\t$data = JFactory::getApplication()->getUserState('com_cp.edit.cpproducts.data', array());\n\n\t\tif (empty($data)) {\n\t\t\t$data = $this->getItem();\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "c7c341bbdbc82d25725747e5e52b65ba", "score": "0.6561106", "text": "protected function loadFormData() \n\t{\n\t\t// Check the session for previously entered form data.\n\t\t$data = JFactory::getApplication()->getUserState('com_salonbook.edit.salonbook.data', array());\n\t\tif (empty($data)) \n\t\t{\n\t\t\t$data = $this->getAppointment();\n\t\t}\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "95e94e89de0b188a03ce6b8a258896d6", "score": "0.6545986", "text": "public function dataValue() {\n $request = $this->form->getController()->getRequest();\n $post = [];\n if($request) {\n $post = $request->postVars();\n }\n return isset($post[$this->getName()]) ? $post[$this->getName()] : null;\n }", "title": "" }, { "docid": "7f191a42e7acd27b97ebeffd357c0ec8", "score": "0.6540933", "text": "protected function loadFormData()\n\t{\n\t\t// Check the session for previously entered form data.\n\t\t$data = JFactory::getApplication()->getUserState('com_hwdmediashare.edit.extension.data', array());\n\n\t\tif (empty($data))\n\t\t{\n\t\t\t$data = $this->getItem();\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "e8e8b4be3b2af41c51a1420cf134ce5c", "score": "0.65408605", "text": "public function getSubmissionData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "e8e8b4be3b2af41c51a1420cf134ce5c", "score": "0.65408605", "text": "public function getSubmissionData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "e8e8b4be3b2af41c51a1420cf134ce5c", "score": "0.65408605", "text": "public function getSubmissionData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "e8e8b4be3b2af41c51a1420cf134ce5c", "score": "0.65408605", "text": "public function getSubmissionData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "4274961b5c38961432fbaf1affecdeca", "score": "0.654024", "text": "protected function loadFormData() \n\t{\n\t\t// Initialise variables.\n\t\t$app = JFactory::getApplication();\n\n\t\t// Check the session for previously entered form data.\n\t\t$data = $app->getUserState('com_localise.edit.package.data', array());\n\n\t\t// Get the package data.\n\t\tif (empty($data)) \n\t\t{\n\t\t\t$data = $this->getItem();\n\t\t\t$data->title = JText::_($data->title);\n\t\t\t$data->description = JText::_($data->description);\n\t\t}\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "5d011e8d705a77d600ea09c20a5be8a0", "score": "0.65268534", "text": "public function data()\n {\n return $this->_data;\n }", "title": "" }, { "docid": "ea994228e903fa3f51a660c6040cdf32", "score": "0.6511263", "text": "protected function loadFormData()\n {\n // Check the session for previously entered form data.\n $data = JFactory::getApplication()->getUserState('joom.comments', new stdClass);\n\n // Pre-fill the list options\n if (!property_exists($data, 'list'))\n {\n $data->list = array(\n 'direction' => $this->state->{'list.direction'},\n 'limit' => $this->state->{'list.limit'},\n 'ordering' => $this->state->{'list.ordering'},\n 'start' => $this->state->{'list.start'}\n );\n }\n\n return $data;\n }", "title": "" }, { "docid": "7355befea46784cc6fcd0d584b8661df", "score": "0.65094817", "text": "public function data()\n {\n return $this->data;\n }", "title": "" }, { "docid": "d4f155870982673b7b872ea164e17bcb", "score": "0.6508069", "text": "protected function loadFormData() \n\t{\n\t\t$data = JFactory::getApplication()->getUserState('com_squadmanagement.edit.bankitem.data', array());\n\t\tif (empty($data)) \n\t\t{\n\t\t\t$data = $this->getItem();\n\t\t}\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "7028afcb0308304c95ac2b934923b060", "score": "0.65050673", "text": "public function get_submitted_edit_form_data()\n\t{\n\t\t//Because when editing the qual we need to get the qual specific fields\n\t\t//passed by post.\n\t\t$this->credits = $_POST['credits'];\t\n\t}", "title": "" }, { "docid": "163710a33afbc84f99686848e607cc57", "score": "0.6504424", "text": "public function getSubmissionData()\r\n {\r\n return $this->data;\r\n }", "title": "" }, { "docid": "3a2fc567e680d9cbd0876536e19039bc", "score": "0.6503004", "text": "public function data() {\n\t\treturn $this->_data;\n\t}", "title": "" }, { "docid": "ec120d95831471c240d5a078102c1d54", "score": "0.6497318", "text": "protected function loadFormData()\n\t{ //return array();\n\t\treturn $this->getItem();\n\t}", "title": "" }, { "docid": "f117b8a31e3f6b0da3f948a873f2d2a6", "score": "0.64893204", "text": "public function getFormValues();", "title": "" }, { "docid": "208c5d14238c95b81bd1ae019fb59dbc", "score": "0.6486704", "text": "protected function loadFormData()\n\t{\n\t\t// Check the session for previously entered form data.\n\t\t$data = JFactory::getApplication()->getUserState('com_swa.edit.committeemembers.data', array());\n\n\t\tif (empty($data))\n\t\t{\n\t\t\t$data = $this->getItem();\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "0e57291d1637575f80a45f574c81cfc8", "score": "0.64727515", "text": "public function populateFieldData() {\n $html = HtmlDomParser::file_get_html($this->base_uri . $this->form_uri);\n foreach ($html->find('form') as $form) {\n if ($form->action == $this->response_uri) {\n foreach ($form->find('input') as $input) {\n switch ($input->type) {\n case 'hidden':\n $this->fieldData[$input->name] = [\n 'type' => $input->type,\n 'value' => $input->value,\n ];\n\n // Make sure hidden fields are submitted.\n $this->fieldsToSubmit[$input->name] = $input->value;\n\n break;\n case 'text':\n $this->fieldData[$input->name] = [\n 'type' => $input->type,\n ];\n break;\n case 'radio':\n case 'checkbox':\n if (!isset($this->fieldData[$input->name])) {\n $this->fieldData[$input->name] = [\n 'type' => $input->type,\n 'options' => [$input->value],\n ];\n }\n else {\n $this->fieldData[$input->name]['options'][] = $input->value;\n }\n break;\n default:\n break;\n }\n }\n foreach ($form->find('select') as $select) {\n $this->fieldData[$select->name] = [\n 'type' => 'select',\n 'options' => [],\n ];\n foreach ($select->find('option') as $option) {\n $this->fieldData[$select->name]['options'][] = $option->value ? $option->value : $option->text();\n }\n }\n }\n }\n }", "title": "" }, { "docid": "372a1b2554247b6e88cd5fe2b2e662ff", "score": "0.6471629", "text": "public function getDataForForm()\n {\n $ignoreFields = $this->ignoreFormFields;\n $data = $this->getData();\n foreach ($ignoreFields as $field) {\n if (isset($data[$field])) unset($data[$field]);\n }\n return $data;\n }", "title": "" }, { "docid": "c72ee31009d21fbd01fc7a13e6e24932", "score": "0.6468715", "text": "protected function loadFormData()\n {\n $data = JFactory::getApplication()->getUserState('com_eventgallery.edit.googlephotosaccount.data', array());\n\n if (empty($data))\n {\n $data = $this->getItem();\n }\n \n\t\tif (method_exists($this, 'preprocessData')) {\n \t$this->preprocessData('com_eventgallery.googlephotosaccount', $data);\n }\n\n return $data;\n }", "title": "" }, { "docid": "70b163fbbf4d1fb0612dcd909376de83", "score": "0.6461698", "text": "public function getPostData()\n {\n if (isset($_POST[$this->name]))\n {\n return $_POST[$this->name];\n }\n else\n {\n return array();\n }\n }", "title": "" }, { "docid": "af8548df7cb13e02d2ee45a488da3b8c", "score": "0.64597744", "text": "protected function loadFormData()\n\t{\n\t\t// Check the session for previously entered form data.\n\t\t$data = JFactory::getApplication()->getUserState('com_easysdi_map.edit.group.data', array());\n\n\t\tif (empty($data)) {\n\t\t\t$data = $this->getItem();\n \n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "4f453e02645f069f7cb743cf781999db", "score": "0.6459303", "text": "public function form() { return $this->form; }", "title": "" }, { "docid": "d8c2d6cc8f172fdf897ab858427e8e58", "score": "0.6455382", "text": "public function getFormValues()\n {\n return $this->form->getValues();\n }", "title": "" }, { "docid": "dbf1df10faa876055bc38d60b1a29d4f", "score": "0.6443274", "text": "protected function getInputData()\n {\n (new HCMunicipalitiesValidator())->validateForm();\n\n $_data = request()->all();\n\n array_set($data, 'record.country_id', array_get($_data, 'country_id'));\n array_set($data, 'record.name', array_get($_data, 'name'));\n array_set($data, 'record.translation_key', array_get($_data, 'translation_key'));\n\n return $data;\n }", "title": "" }, { "docid": "d90e89ef03631807600a87fb8193e871", "score": "0.64358735", "text": "public function getFormData()\n {\n\n $this->getFormBuilder();\n\n $this->getDataFromBuilder();\n\n\n /*\n * REINIZIALIZZO IL FORM BUILDER\n */\n $this->initFormBuilder();\n\n return $this->formData;\n\n }", "title": "" }, { "docid": "c636387febd6a30a7d3ea35e190cd0b4", "score": "0.64333075", "text": "protected function loadFormData()\n\t{\n\t\t// Check the session for previously entered form data.\n\t\t$data = JFactory::getApplication()->getUserState('com_volunteers.edit.volunteer.data', array());\n\n\t\tif (empty($data))\n\t\t{\n\t\t\t$data = $this->getItem();\n\t\t}\n\n\t\t$this->preprocessData('com_volunteers.volunteer', $data);\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "1244a7245ebeb2cc04cd9c60d70e29cc", "score": "0.6432317", "text": "public function getFormData()\n {\n\n $this->getFormBuilder();\n\n $this->setAggregatesBuilder();\n\n $this->getDataFromBuilder();\n\n\n /*\n * REINIZIALIZZO IL FORM BUILDER\n */\n $this->initFormBuilder();\n\n return $this->formData;\n\n }", "title": "" }, { "docid": "a16bbfbd9389d99bba915ed7d3aa2f8e", "score": "0.6431329", "text": "private function _getFormValues() {\n if ($this->input->post('id', TRUE))\n $data['id'] = $this->input->post('id', TRUE);\n $data['first_name'] = $this->input->post('first_name', TRUE);\n $data['last_name'] = $this->input->post('last_name', TRUE);\n $data['phone'] = $this->input->post('phone', TRUE);\n $data['address'] = $this->input->post('address', TRUE);\n $data['email'] = $this->input->post('email', TRUE);\n $data['password'] = md5($this->input->post('password', TRUE));\n return $data;\n }", "title": "" }, { "docid": "8ec35aace052aa6b7cdde01555596e4b", "score": "0.6413267", "text": "public function getInputData() {\n\t\tif ($this->data) {\n\t\t\treturn array(\n\t\t\t\t'extension' => $this->extensionId,\n\t\t\t\t'dttm' => null,\n\t\t\t\t'data' => $this->data->asArray(),\n\t\t\t);\n\t\t}\n\n\t\treturn null;\n\t}", "title": "" }, { "docid": "d5563e5c9120b6f4ab9b378e15681641", "score": "0.64123213", "text": "public function getPostbackData()\n {\n return $this->postback_data;\n }", "title": "" }, { "docid": "3aed1f92ddaa8ad93494f0cce75e8303", "score": "0.6411709", "text": "public function form_data($args)\n {\n }", "title": "" }, { "docid": "8e6de4f31dfa301e8c782ec37c57511e", "score": "0.64103127", "text": "protected function getInputData()\n {\n (new HCECOrderDetailsValidator())->validateForm();\n\n $_data = request()->all();\n\n if( array_has($_data, 'id') )\n array_set($data, 'record.id', array_get($_data, 'id'));\n\n array_set($data, 'record.order_id', array_get($_data, 'order_id'));\n array_set($data, 'record.good_id', array_get($_data, 'good_id'));\n array_set($data, 'record.combination_id', array_get($_data, 'combination_id'));\n array_set($data, 'record.warehouse_id', array_get($_data, 'warehouse_id'));\n array_set($data, 'record.tax_name', array_get($_data, 'tax_name'));\n array_set($data, 'record.tax_value', array_get($_data, 'tax_value'));\n array_set($data, 'record.amount', array_get($_data, 'amount'));\n array_set($data, 'record.reference', array_get($_data, 'reference'));\n array_set($data, 'record.name', array_get($_data, 'name'));\n array_set($data, 'record.price', array_get($_data, 'price'));\n array_set($data, 'record.price_before_tax', array_get($_data, 'price_before_tax'));\n array_set($data, 'record.price_tax_amount', array_get($_data, 'price_tax_amount'));\n array_set($data, 'record.total_price', array_get($_data, 'total_price'));\n array_set($data, 'record.total_price_before_tax', array_get($_data, 'total_price_before_tax'));\n array_set($data, 'record.total_price_tax_amount', array_get($_data, 'total_price_tax_amount'));\n array_set($data, 'record.is_pre_ordered', array_get($_data, 'is_pre_ordered'));\n\n return $data;\n }", "title": "" }, { "docid": "3c5d4971b93ebe965bdc51afd162b4b0", "score": "0.64103067", "text": "public function getData() {\n return $this->widgetData;\n }", "title": "" }, { "docid": "274cedf909f1c21001004dd4a8a8b42b", "score": "0.6409836", "text": "public final function getFormData(): array|null\n {\n return $this->getForm()?->getData();\n }", "title": "" }, { "docid": "bb9d60262935a6600fbca605e9f75dd6", "score": "0.64059806", "text": "protected function loadFormData()\n\t{\n\t\t// Check the session for previously entered form data.\n\t\t$data = JFactory::getApplication()->getUserState('com_cmc.edit.list.data', array());\n\n\t\tif (empty($data))\n\t\t{\n\t\t\t$data = $this->getItem();\n\n\t\t\t// Prime some default values.\n\t\t\tif ($this->getState('lists.id') == 0)\n\t\t\t{\n\t\t\t\t$app = JFactory::getApplication();\n\t\t\t\t$data->set('id', JFactory::getApplication()->input->getInt('id', $app->getUserState('com_cmc.lists.filter.list_id')));\n\t\t\t}\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "dd4b404123b822e9c868efa0b4c02bfc", "score": "0.64020765", "text": "public function getFormInput()\n {\n $values = $this->getFormValues();\n\n return $values->all();\n }", "title": "" }, { "docid": "07e13b0a9753a7a4f2087b1d3961906c", "score": "0.63931394", "text": "protected function _getFormData() {\n $data = array();\n $filterChain = new Zend_Filter();\n $filterChain->addFilter(new Zend_Filter_StripTags());\n $filterChain->addFilter(new Zend_Filter_StringTrim());\n \n $data['username'] = $filterChain->filter($this->_request->getPost('username'));\n $data['password'] = $filterChain->filter($this->_request->getPost('password'));\n $data['usertype'] = $filterChain->filter($this->_request->getPost('usertype'));\n return $data;\n }", "title": "" }, { "docid": "1dc6e0585ea8e0d4f3ab76be0665c7a8", "score": "0.63901186", "text": "protected function loadFormData() \n\t{\n\t\t// Check the session for previously entered form data.\n\t\t$data = JFactory::getApplication()->getUserState('com_sportsmanagement.edit.match.data', array());\n\t\tif (empty($data)) \n\t\t{\n\t\t\t$data = $this->getItem();\n\t\t}\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "a74babc63652a0d99b6880e4ea23ce5d", "score": "0.63811994", "text": "protected function loadFormData()\r\n {\r\n // Check the session for previously entered form data.\r\n $app = JFactory::getApplication();\r\n $data = $app->getUserState('com_jvoter.edit.contest.data', array());\r\n \r\n if (empty($data))\r\n {\r\n $data = $this->getItem();\r\n \r\n // Pre-select some filters (Status, Category, Access) in edit form if those have been selected in JVoter: Contests\r\n if ($this->getState('contest.id') == 0)\r\n {\r\n $filters = (array) $app->getUserState('com_jvoter.contests.filter');\r\n $data->set(\r\n 'state',\r\n $app->input->getInt(\r\n 'state',\r\n ((isset($filters['published']) && $filters['published'] !== '') ? $filters['published'] : null)\r\n )\r\n );\r\n $data->set('catid', $app->input->getInt('catid', (!empty($filters['category_id']) ? $filters['category_id'] : null))); \r\n $data->set('access',\r\n $app->input->getInt('access', (!empty($filters['access']) ? $filters['access'] : JFactory::getConfig()->get('access')))\r\n );\r\n }\r\n }\r\n \r\n // If there are params fieldsets in the form it will fail with a registry object\r\n if (isset($data->params) && $data->params instanceof Registry)\r\n {\r\n $data->params = $data->params->toArray();\r\n }\r\n \r\n $this->preprocessData('com_jvoter.contest', $data);\r\n \r\n return $data;\r\n }", "title": "" }, { "docid": "dc6851acc4aa53b0934743ece0382e84", "score": "0.6377405", "text": "function formData()\n {\n $sharing = $this->sharing;\n $out = $this->out;\n $counts = $sharing->countResponses();\n\n $out->element('h3', 'sharing-title', _m('Un nuevo usuario ha indicado que le interesa:'));\n $out->element('p', 'sharings-displayName', $sharing->displayName);\n $out->element('p', 'sharings-summary', $sharing->summary);\n\n $out->element('p', 'sharings-summary', sprintf(_m('Este objeto / servicio le interesa a %d usuarios'), $counts));\n\n }", "title": "" }, { "docid": "138639e43615f62457bd63fdd09c348b", "score": "0.6362562", "text": "public function GetFormValues() {\n /**\n * Check to see if we have a form submitted. If we do, we save all the\n * values and store it.\n */\n if(count($_POST) > 0) {\n $this->Values = new stdClass();\n foreach($_POST as $k => $v) {\n $this->Values->$k = $v;\n }\n }\n }", "title": "" }, { "docid": "f54b03bcc04eb719b5e19a8960dd63c1", "score": "0.6361587", "text": "protected function loadFormData()\n\t{\n\t\t$data = JFactory::getApplication()->getUserState('com_subusers.edit.organization.data', array());\n\n\t\tif (empty($data))\n\t\t{\n\t\t\t$data = $this->getData();\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "010af610042060547d2de9cae8751317", "score": "0.63612974", "text": "public function get_data()\n\t{\n\t\treturn $this->_data;\n\t}", "title": "" }, { "docid": "177a1c8fb22cc85f78bdccc8957288b2", "score": "0.63471186", "text": "public function data() {\n\t\treturn [\n\t\t\t'id'=>$this->id,\n\t\t\t'tag'=>$this->tag,\n\t\t\t'name'=>$this->name,\n\t\t\t'semester'=>$this->semester,\n\t\t\t'section'=>$this->sectionId,\n\t\t\t'public'=>$this->public,\n\t\t\t'meta'=>$this->metaData->json()];\n\t}", "title": "" }, { "docid": "6e01a55df5fc56a3d9f7aa92ce24ff93", "score": "0.634033", "text": "protected function loadFormData()\n {\n $app = JFactory::getApplication();\n $data = $app->getUserState('com_catalogue.edit.country.data', array());\n\n if (empty($data)) {\n $data = $this->getItem();\n }\n\n return $data;\n }", "title": "" }, { "docid": "91b85c8d36eb6d924fcef2b262625b3f", "score": "0.6338273", "text": "public function get_data() {\n return $this->data;\n }", "title": "" }, { "docid": "7bfd6ff322cb37a6cfc146682f505a19", "score": "0.63373965", "text": "public function getInputData()\n {\n return array_only($this->inputData, [\n 'name', 'titulo','cedula','email'\n //, 'code'\n //'ciudades'\n\n ]);\n }", "title": "" }, { "docid": "bfccce0f2f6023be24eb8b2e1fbe35d5", "score": "0.6336987", "text": "protected function loadFormData() {\n $data = JFactory::getApplication()->getUserState('com_gglms.edit.file.data', array());\n if (empty($data)) {\n $data = $this->getItem();\n }\n FB::log($data, \" loadFormData file\");\n return $data;\n }", "title": "" }, { "docid": "ce546b5572dc59d007774dbdb75a6667", "score": "0.63349646", "text": "public function get_data() {\r\n return $this->data;\r\n }", "title": "" }, { "docid": "328aa70b5d5e0e29a78fb5307ac826bf", "score": "0.63280755", "text": "protected function loadFormData()\r\n {\r\n // Check the session for previously entered form data.\r\n $data = JFactory::getApplication()->getUserState('com_jbcatalog.edit.adfgroup.data', array());\r\n\r\n if (empty($data))\r\n {\r\n $data = $this->getItem();\r\n\r\n // Prime some default values.\r\n if ($this->getState('adfgroup.id') == 0)\r\n {\r\n $app = JFactory::getApplication();\r\n // $data->set('catid', $app->input->get('catid', $app->getUserState('com_jbcatalog.category.filter.category_id'), 'int'));\r\n }\r\n }\r\n\r\n $this->preprocessData('com_jbcatalog.adfgroup', $data);\r\n\r\n return $data;\r\n }", "title": "" }, { "docid": "c4a915ae59852a14d2f9eba90f7cec44", "score": "0.6317867", "text": "public function getData() {\n\t\treturn $this -> data;\n\t}", "title": "" }, { "docid": "eb4cb0192b853f0bd1c80428f95ee6b1", "score": "0.6298159", "text": "public function get_submitted_edit_form_data()\n {\n $this->credits = $_POST['credits']; \n }", "title": "" }, { "docid": "94631e6101fc698b7553a728308e01be", "score": "0.62971354", "text": "function formData(){\n // creating array\n $form = array(\"currentyear\"=>$this->currentyear,\"gender\"=>$this->gender,\"program\"=>$this->program,\"address\"=>$this->address,\"city\"=>$this->city,\"postalcode\"=>$this->postcode,\"gta\"=>$this->gta,\"previousta\"=>$this->prevta,\"prefhours\"=>$this->prefhrs,\"maxhours\"=>$this->maxhrs);\n\n // creating a json object\n $myJSONform = json_encode($form);\n\n return $myJSONform;\n }", "title": "" } ]
f067b6cbdb7da1ba6a29cbb6fad51a2f
this function is just an alias for tokenise
[ { "docid": "98ac6f2ca188e235180fadd43d8d075d", "score": "0.6089459", "text": "function Tokenize ($command_line) {\n return $this->Tokenise ($command_line);\n }", "title": "" } ]
[ { "docid": "7eaad3925b2edf399cd81aa9a94d8293", "score": "0.6856199", "text": "abstract public function token();", "title": "" }, { "docid": "7eaad3925b2edf399cd81aa9a94d8293", "score": "0.6856199", "text": "abstract public function token();", "title": "" }, { "docid": "32b0bfc550698c906ec0aee0e04284a2", "score": "0.6655662", "text": "function WStokenizer(){\n\t\t$tokens= explode(\" \",$this->text);\n\t\tforeach($tokens as $k=>$tok)\n\t\t\t$this->tokens[]=$tok;\t\t\t\t\n\t}", "title": "" }, { "docid": "f67ac445e115b45cbaa478f90a3daf22", "score": "0.64715654", "text": "function getTokenParsers();", "title": "" }, { "docid": "c887032cfcfaa8dadaa229a3336348a8", "score": "0.644377", "text": "public function gerarToken() : string ;", "title": "" }, { "docid": "b54106cadf930159bc8fb358b78526db", "score": "0.64270926", "text": "function tokenizar ($entrada){\n\t\n\t// signos de puntuacion que se van a extraer\n\t$punctoations = array( \n\t ',', '.', ';', ':', '¿', '?', '¡', '!', '\"', '(', ')', '\\'',\n '[', ']', '+', '=', '*', '&', '^', '%', '$', '#',\n '@', '~', '`', '{', '}', '\\\\', '|', '>', '<','—','…', );\n\t\n\t// se reemplazan los signos de puntucion por nada (se quitan)\n\t$entrada= str_replace($punctoations, \"\", $entrada);\n // se tokeniza separando por espacios\n $texto=explode(\" \",$entrada );\n // se trimea por las dudas\n\t$texto =array_map('trim',$texto );\n\t\t// se retorna la array de tokens\n\treturn $texto;\n}", "title": "" }, { "docid": "29265e8a4ed624375ebd13d6bbe3fbf0", "score": "0.6365338", "text": "function AdvancedTokenizer()\n\t{ \n\t $original= array(\"·\",\"ॱ\",\"·\",'”' , '“' , '؛' , '،' , \".\" , \",\" , \":\" , \";\" , \"[\" , \"]\" , \"(\" , \")\" , \"{\" , \"}\" , \"\\\"\" , \"'\" , \"\\“\" , \"?\" , \"!\" );\n\t $replacement=array(\" · \",\" ॱ \",\" · \",' \" ',' \" ',' ; ',' , ',\" . \",\" , \",\" : \",\" ; \",\" [ \",\" ] \",\" ( \",\" ) \",\" { \",\" } \",\" \\\" \",\" ' \",\" \\“ \",\" ? \",\" ! \");\n\n\t $temp=str_replace($original,$replacement,trim($this->text));\n\t $this->text=preg_replace(\"/[ \\t\\n\\r]+/si\",\" \",$temp); // replace multiple whitespaces with single whitespace\n\t $this->tokens=explode(\" \",$this->text); \n\t}", "title": "" }, { "docid": "5c936edd79d562473ac77a6d9f340252", "score": "0.6354459", "text": "public function isTokenized();", "title": "" }, { "docid": "a7c568bd2812875e7895cb7f225d2bef", "score": "0.63211584", "text": "public function tokenize($string);", "title": "" }, { "docid": "a7c568bd2812875e7895cb7f225d2bef", "score": "0.63211584", "text": "public function tokenize($string);", "title": "" }, { "docid": "e63bba4ca910b6d804b3a14daf804867", "score": "0.62793154", "text": "function tokenize($sentence,$option){\n $tokenization = new tokenization;\n if($option==\"word\" || $option==\"w\"){\n return $tokenization->getWordTokens($sentence);\n }\n return $tokenization->getGroupTokens($sentence);\n\n }", "title": "" }, { "docid": "365b8e94bd830056557e48889dfcd21c", "score": "0.6257463", "text": "protected abstract function tokensIn($source);", "title": "" }, { "docid": "c5716c15531a9e08175382c402290085", "score": "0.6243936", "text": "function strtok ($str, $token) {}", "title": "" }, { "docid": "e3a62071b0aa87fe4dde673f5ad84a3d", "score": "0.6240506", "text": "function tsml_string_tokens($string) {\n\n\t//shorten words that have quotes in them instead of splitting them\n\t$string = html_entity_decode($string);\n\t$string = str_replace(\"'\", '', $string);\n\t$string = str_replace('’', '', $string);\n\t\n\t//remove everything that's not a letter or a number\n\t$string = preg_replace(\"/[^a-zA-Z 0-9]+/\", ' ', $string);\n\t\n\t//return array\n\treturn array_values(array_unique(array_filter(explode(' ', $string))));\n}", "title": "" }, { "docid": "f6e2c7cf0e371d6b662c2df38c547338", "score": "0.60565853", "text": "public function getTokens();", "title": "" }, { "docid": "f6e2c7cf0e371d6b662c2df38c547338", "score": "0.60565853", "text": "public function getTokens();", "title": "" }, { "docid": "41947a7aa6bc48332e96d896493e532e", "score": "0.59542686", "text": "function test($filename)\r\n{\r\n\t$t=new Tokenizer($filename);\r\n\t// simple texts and color\r\n\t\r\n\t$re=$t->tokenize($s=\"red dress\"); \r\n\techo \"$s:\";\r\n\techo \" 1\".(in_array ( \"red\" ,$re[\"properties\"][\"color\"], true )?\"success\":\"failed\");\r\n\techo \" 2\".($re[\"keywords\"]==\"dress\"?\"success\":\"failed\");\r\n\t\r\n echo \"\\n\\n\";\r\n\t\r\n\t$re=$t->tokenize($s=\"brick red dress\"); \r\n\techo \"$s:\";\r\n\techo \" 1\".(in_array ( \"brick red\" ,$re[\"properties\"][\"color\"], true )?\"success\":\"failed\");\r\n\techo \" 2\".($re[\"keywords\"]==\"dress\"?\"success\":\"failed\");\r\n\t\t\r\n echo \"\\n\\n\";\r\n\t\r\n\t$re=$t->tokenize($s=\"blueish dress\");\r\n\techo \"$s:\";\r\n\techo \" 1\".(in_array ( \"blue\" ,$re[\"properties\"][\"color\"], true )?\"success\":\"failed\");\r\n\techo \" 2\".($re[\"keywords\"]==\"dress\"?\"success\":\"failed\");\r\n\t//var_dump($re);\r\n echo \"\\n\\n\";\r\n\t\t\r\n\r\n\t// gender\r\n\t$re=$t->tokenize($s=\"woman dress\");\r\n\techo \"$s:\";\r\n\techo \" 1\".(in_array ( \"woman\" ,$re[\"properties\"][\"gender\"], true )?\"success\":\"failed\");\r\n\techo \" 2\".($re[\"keywords\"]==\"dress\"?\"success\":\"failed\");\r\n echo \"\\n\\n\";\r\n\t\r\n\t$re=$t->tokenize($s=\"men dress\");\r\n\techo \"$s:\";\r\n\techo \" 1\".(in_array ( \"men\" ,$re[\"properties\"][\"gender\"], true )?\"success\":\"failed\");\r\n\techo \" 2\".($re[\"keywords\"]==\"dress\"?\"success\":\"failed\");\r\n echo \"\\n\\n\";\r\n\t\r\n\t// pattern\r\n\t$re=$t->tokenize($s=\"woman rust red white polka dot dress\");\r\n\techo \"$s:\";\r\n\techo \" 1\".(in_array ( \"polka dot\" ,$re[\"properties\"][\"pattern\"], true )?\"success\":\"failed\");\r\n\techo \" 2\".($re[\"keywords\"]==\"dress\"?\"success\":\"failed\");\r\n echo \"\\n\\n\";\r\n\t\r\n\t// brand\r\n\t$re=$t->tokenize($s=\"gap woman rust red white polka dot dress\");\r\n\techo \"$s:\";\r\n\techo \" 1\".(in_array ( \"polka dot\" ,$re[\"properties\"][\"pattern\"], true )?\"success\":\"failed\");\r\n\techo \" 2\".($re[\"keywords\"]==\"dress\"?\"success\":\"failed\");\r\n\techo \"\\n\\n\";\r\n\t\r\n\t$re=$t->tokenize($s=\"forever 21 woman rust red white polka dot dress\");\r\n\techo \"$s:\";\r\n\techo \" 1\".(in_array ( \"polka dot\" ,$re[\"properties\"][\"pattern\"], true )?\"success\":\"failed\");\r\n\techo \" 2\".($re[\"keywords\"]==\"dress\"?\"success\":\"failed\");\r\n\techo \"\\n\\n\";\r\n\tvar_dump($re);\r\n}", "title": "" }, { "docid": "54a5fe5a60633ece00519817976687a2", "score": "0.5943649", "text": "function tokenise($oracion) \n {\n \n \n setlocale(LC_ALL, 'es_ES');\n $oracion = strtolower($oracion);\n \n // antes de tokenizar se reemplaza santa fe por santa_fe\n $oracion = str_replace(\"santa fe\", \"santa_fe\", $oracion);\n\n // antes de tokenizar se reemplaza gobierno nacional por gobierno_nacional\n $oracion = str_replace(\"gobierno nacional\", \"gobierno_nacional\", $oracion);\n\n // antes de tokenizar se reemplaza gobierno provincial por gobierno_provincial\n $oracion = str_replace(\"gobierno provincial\", \"gobierno_provincial\", $oracion);\n\n\n preg_match_all('/[\\w]+/iu', $oracion, $matches);\n\n // se extraen los tokens que son stopwords \n $palabras=removeStopwords($matches[0]);\n return $palabras;\n \n }", "title": "" }, { "docid": "0157b45534cee9e5eea6775f2539612a", "score": "0.5836224", "text": "public function nextToken()\n {\n if ($this->_input === null) {\n return null;\n }\n else {\n $this->_filterInput($this->_input);\n }\n\n while($this->_tokenize == 0 && \n preg_match('/\\b([^\\s])+/',\n $this->_input,\n $match,\n PREG_OFFSET_CAPTURE,\n $this->_position) \n ) {\n $str = $match[0][0];\n $pos = $match[0][1]; \n $endpos = $pos + strlen($str);\n $this->_position = $endpos;\n \n\n $this->_specialString = array();\n $this->_positionsi = 0;\n while(preg_match('/[a-zA-Z0-9]+/', $str, $matchesi, PREG_OFFSET_CAPTURE, $this->_positionsi))\n {\n $posix = 0;\n $this->_specialString[] = $matchesi[0][0];\n $posix = $matchesi[0][1];\n $endposix = $posix + strlen($matchesi[0][0]);\n $this->_positionsi = $endposix;\n }\n \n if(count($this->_specialString) > 1){\n \n $this->_setNoSpaceToken(implode($this->_specialString));\n $this->_setSpaceToken(implode(' ', $this->_specialString));\n $this->_setIndividualToken($this->_specialString);\n }\n /*Index Rule 1 and Index Rule 2*/\n $token = $this->normalize(new Analysis\\Token($str, $pos, $endpos));\n\n// echo \"The string indexed and stored for Rule 1 or Rule 2 is :\".$str;\n// echo \"\\n\";\n return $token;\n }\n\n \n if($this->_tokenize == 1){\n\n $this->_tokenize = 2;\n $strNospace = $this->_getNoSpaceToken();\n $token = $this->normalize(new Analysis\\Token($strNospace, 0, strlen($strNospace)));\n// echo 'The string indexed and stored for Rule 5 is:'.$strNospace;\n// echo \"\\n\";\n return $token;\n }\n\n if($this->_tokenize == 2){\n\n $strSpace = $this->_getSpaceToken();\n $this->_tokenize = 3;\n $token = $this->normalize(new Analysis\\Token($strSpace, 0, strlen($strSpace)));\n// echo 'The string indexed and stored for Rule 6 is:'.$strSpace;\n// echo \"\\n\";\n return $token;\n }\n\n if($this->_tokenize == 3){\n\n $individualString = $this->_getIndividualToken();\n while($this->i < count($individualString)){\n $stri = $individualString[$this->i++];\n $token = $this->normalize(new Analysis\\Token($stri, 0, strlen($stri)));\n// echo 'The string indexed and stored for Rule 4 is:'.$stri;\n// echo \"\\n\"; \n return $token;\n }\n \n $this->_tokenize = 0;\n }\n \n $this->_count = substr_count($this->_input,' ');\n\n if($this->_count && !($this->_FullTokenFlag)){\n \n $posf = 0;\n $this->_FullTokenFlag = 1;\n $endposf = $posf + strlen($this->_input);\n $token = $this->normalize(new Analysis\\Token($this->_input, $posf, $endposf));\n// echo 'The string indexed and stored for Rule 1 is:'.$this->_input;\n// echo \"\\n\";\n return $token;\n }\n\n if($this->_count && !($this->_NoSpaceTokenFlag)){\n\n $posn = 0;\n $this->_NoSpaceTokenFlag = 1;\n $strn = str_replace(' ', '', $this->_input);\n $endposn = $posn + strlen($strn);\n $token = $this->normalize(new Analysis\\Token($strn, $posn, $endposn));\n// echo 'The string indexed and stored for Rule 3 is:'.$strn;\n// echo \"\\n\";\n return $token;\n } \n \n// echo 'Calling next token...';\n// echo \"\\n\";\n return null;\n }", "title": "" }, { "docid": "ba7f50f5b3a078aa66e1e16276b58509", "score": "0.58081", "text": "private function tokenise($text) {\n mb_internal_encoding(\"utf-8\");\n mb_regex_encoding(\"utf-8\");\n $text = mb_strtolower(mb_convert_kana($text, 'as'));\n // remove all non alphanumeric characters from string\n $text = mb_ereg_replace(\"[;,.\\-\\–\\?\\!。、?!]+\", '', $text);\n return preg_split('/\\s+/', $text);\n }", "title": "" }, { "docid": "ba9bc570298a534a2a33446c058c936a", "score": "0.57963085", "text": "public function tokenize(Entity $entity)\n {\n $config = $this->config();\n $title = $entity->get($config['title']);\n $date = $entity->get($config['date']);\n $entity->set($config['token'], md5(uniqid($title . $date, true)));\n $private_token = base64_encode(sha1(uniqid($title . $date, true)));\n $entity->set($config['private_token'], $private_token);\n }", "title": "" }, { "docid": "db2b46f3234f1e45d280c178187c6367", "score": "0.5769092", "text": "public function isTokenized()\n\t{\n\t\treturn true;\n\t}", "title": "" }, { "docid": "a2aae624a961d4694d66119816fce50c", "score": "0.57607263", "text": "public function getTokenTag();", "title": "" }, { "docid": "23059ab99a17f0395d45952344eefb51", "score": "0.57583433", "text": "public function token() {\n }", "title": "" }, { "docid": "cf485cce801979bd72330e87e1ba510c", "score": "0.57189935", "text": "function normaliseToken($token) {\n\t\tif (strcasecmp ( $token, 'and' ) === 0)\n\t\t\treturn 'AND';\n\t\telse if (strcasecmp ( $token, 'or' ) === 0)\n\t\t\treturn 'OR';\n\t\telse if (strcasecmp ( $token, 'not' ) === 0)\n\t\t\treturn 'NOT';\n\t\telse\n\t\t\treturn $token;\n\t}", "title": "" }, { "docid": "3fc85e892189d1140a518f78cdf28f2d", "score": "0.56540215", "text": "public static function tokenize() \n\t{\n\t\tif (isset($_SESSION['token'])) {\n\t\t\tunset($_SESSION['token']);\n\t\t}\n\t\t$token = sha1(uniqid(rand(), true)); \n\t\t$_SESSION['token'] = $token;\n\t\treturn $token;\t\n\t}", "title": "" }, { "docid": "3526e00848f143dbfec48761cd4ef3c9", "score": "0.5641193", "text": "public function extract()\n {\n switch ($this->type) {\n case self::TYPE_KEYWORD:\n $this->keyword = strtoupper($this->token);\n if (! ($this->flags & self::FLAG_KEYWORD_RESERVED)) {\n // Unreserved keywords should stay the way they are because they\n // might represent field names.\n return $this->token;\n }\n\n return $this->keyword;\n case self::TYPE_WHITESPACE:\n return ' ';\n case self::TYPE_BOOL:\n return strtoupper($this->token) === 'TRUE';\n case self::TYPE_NUMBER:\n $ret = str_replace('--', '', $this->token); // e.g. ---42 === -42\n if ($this->flags & self::FLAG_NUMBER_HEX) {\n if ($this->flags & self::FLAG_NUMBER_NEGATIVE) {\n $ret = str_replace('-', '', $this->token);\n sscanf($ret, '%x', $ret);\n $ret = -$ret;\n } else {\n sscanf($ret, '%x', $ret);\n }\n } elseif (($this->flags & self::FLAG_NUMBER_APPROXIMATE)\n || ($this->flags & self::FLAG_NUMBER_FLOAT)\n ) {\n sscanf($ret, '%f', $ret);\n } else {\n sscanf($ret, '%d', $ret);\n }\n\n return $ret;\n case self::TYPE_STRING:\n // Trims quotes.\n $str = $this->token;\n $str = mb_substr($str, 1, -1, 'UTF-8');\n\n // Removes surrounding quotes.\n $quote = $this->token[0];\n $str = str_replace($quote . $quote, $quote, $str);\n\n // Finally unescapes the string.\n //\n // `stripcslashes` replaces escape sequences with their\n // representation.\n //\n // NOTE: In MySQL, `\\f` and `\\v` have no representation,\n // even they usually represent: form-feed and vertical tab.\n $str = str_replace('\\f', 'f', $str);\n $str = str_replace('\\v', 'v', $str);\n $str = stripcslashes($str);\n\n return $str;\n case self::TYPE_SYMBOL:\n $str = $this->token;\n if (isset($str[0]) && ($str[0] === '@')) {\n // `mb_strlen($str)` must be used instead of `null` because\n // in PHP 5.3- the `null` parameter isn't handled correctly.\n $str = mb_substr(\n $str,\n (! empty($str[1]) && ($str[1] === '@')) ? 2 : 1,\n mb_strlen($str),\n 'UTF-8'\n );\n }\n if (isset($str[0]) && ($str[0] === ':')) {\n $str = mb_substr($str, 1, mb_strlen($str), 'UTF-8');\n }\n if (isset($str[0]) && (($str[0] === '`')\n || ($str[0] === '\"') || ($str[0] === '\\''))\n ) {\n $quote = $str[0];\n $str = str_replace($quote . $quote, $quote, $str);\n $str = mb_substr($str, 1, -1, 'UTF-8');\n }\n\n return $str;\n }\n\n return $this->token;\n }", "title": "" }, { "docid": "8dc2229a69f86bfb54f5e64e7bbd6ef6", "score": "0.56297725", "text": "function preprocess_tag($tag) {\n return preg_replace(\"/[-,:.`~!@#$%^&*()_=+\\[{}\\];?<>]+/\", '', $tag);\n}", "title": "" }, { "docid": "79f00153308c4a43425b3511ceea3d03", "score": "0.56171983", "text": "abstract public function urlTokens();", "title": "" }, { "docid": "c1ecccab5f1e379974e8dbf05770961d", "score": "0.56103045", "text": "public static function tokenize($text, $delimeter, $max = 999999) {}", "title": "" }, { "docid": "95004c9cdf81f1eb31f9b572132b182c", "score": "0.560771", "text": "function tokenize($line) {\n\t// Note: This isn't a particularly efficent tokenizer, but it gets the\n\t// job done.\n\t$out = array();\n\twhile (strlen($line)) {\n\t\t$line = trim($line);\n\t\tif (preg_match('/^[0-9]+(\\.[0-9]*)?/', $line, $regs)) {\n\t\t\t# It's a number\n\t\t\t$out[] = $regs[0];\n\t\t\t$line = substr($line, strlen($regs[0]));\n\t\t} else if (preg_match('/^[A-Za-z]+/', $line, $regs)) {\n\t\t\t# It's a variable name\n\t\t\t$out[] = $regs[0];\n\t\t\t$line = substr($line, strlen($regs[0]));\n\t\t} else {\n\t\t\t# It's some other character\n\t\t\t$out[] = $line[0];\n\t\t\t$line = substr($line, 1);\n\t\t}\n\t}\n\treturn $out;\n}", "title": "" }, { "docid": "7a0f570b63eddc1cfb274502d4d77ee8", "score": "0.55760646", "text": "abstract function nextToken();", "title": "" }, { "docid": "41691ddfc6ae50d2827a1c8fcc44586c", "score": "0.5573416", "text": "function limpiar($tags){\n$tags = strip_tags($tags);\n$tags = stripslashes($tags);\n$tags = htmlentities($tags);\nreturn $tags;\n}", "title": "" }, { "docid": "6de687dbf74584ad89628ef19fe860ea", "score": "0.5562479", "text": "public function get_tokenization()\n {\n return $this->tokenization;\n }", "title": "" }, { "docid": "a659d41d69c11c3a6d667e5fc9a7e5ff", "score": "0.5530729", "text": "public function getTokenValue();", "title": "" }, { "docid": "756627881aa1f0d59bc28bd13e0c026a", "score": "0.5528211", "text": "function split_token($token) {\n $timestamp = substr($token, 0, 14);\n $id = substr($token, 14);\n return array($timestamp, $id);\n}", "title": "" }, { "docid": "7771ce3bf053e1b39bd6eb1e74e29077", "score": "0.5482637", "text": "abstract public function getTokenLabel();", "title": "" }, { "docid": "61e2730c9530895a9579fd9499124e40", "score": "0.54632765", "text": "function tags_explode($tags) {\n $list = explode(',', $tags);\n trim_array($list);\n return $list;\n}", "title": "" }, { "docid": "d6dd5049e00b80dc5f6b6b96d6ca578d", "score": "0.5460159", "text": "public abstract function process_token($stackPtr);", "title": "" }, { "docid": "6cecaf57efb48639dda7704b109c4339", "score": "0.5457639", "text": "function csstoolsexp_tokenize_property($value)\n{\n $value = preg_replace('/\\s+/', ' ', $value);\n $preserve_spaces = array(\n '/\"[^\"]*\"/', // double quoted value, eg: \"Nimbus Mono\"\n \"/'[^']*'/\", // single quoted value eg: 'Nimbus Mono'\n '/\\([^\\)]*\\)/', // value in parantheses, eg: url(../my folder/my-file.jpg)\n '/,\\s+/', // comma-separated list, eg: Arial, sans-serif\n );\n foreach ($preserve_spaces as $ps) {\n $value = preg_replace_callback($ps, function ($m) {\n return str_replace(' ', \"°\", $m[0]);\n }, $value);\n }\n $value = array_map(function($p) {\n return str_replace('°', ' ', $p);\n }, explode(' ', $value));\n return $value;\n}", "title": "" }, { "docid": "ef061f9d041382b5d5bd941a3cfc2f81", "score": "0.54357034", "text": "function getToken() {\n\t\treturn $this->tokText;\n\t}", "title": "" }, { "docid": "d6bd182f7fe864b416f5f02b97db91b3", "score": "0.5432744", "text": "function process( Token $token ): ?Token{\n\t\t// strict quoted string\n\t\tif( $token->type == 'QUOTE' ){\n\t\t\t$this->strict_value = new QuotedStr( $this->stream->get() );\n\t\t\treturn $this->strict_value->process( $token );\n\t\t}\n\n\t\twhile($token and in_array($token->type, ['WORD','SYMBOL','INT'])){\n\t\t\t$this->value .= $token->value;\n\t\t\t$token = ($this->stream->get())();\n\t\t}\t\t\n\n\t\treturn $token;\n\t}", "title": "" }, { "docid": "473e4ac50fdc5842a91d2ed5eb18d356", "score": "0.5419845", "text": "public function postTokeniser(Request $request){\r\n\r\n $text = $request->input('text');\r\n $talismane = new Talismane();\r\n $result = $talismane->tokenize($text);\r\n return view('back.corpus.post-tokeniser',compact('result'));\r\n }", "title": "" }, { "docid": "68c7729f99292196ffafbd1717145258", "score": "0.54174817", "text": "static function GetCreamDelimiters() {\n\n }", "title": "" }, { "docid": "70b79e0dc970e53e653384d1435e5979", "score": "0.53832924", "text": "public function ptReadable() {\n // Initialize the output array\n $output = array();\n \n foreach ($this->tokens as $index => $token) { \n \n // if the token is a multidimensional array take care\n $text = (isset($token[3])) ? $token[1].$token[3] : $token[1];\n\n // Remove whitespaces\n $text = str_replace(\"\\n\", \"\", $text);\n $text = str_replace(\"\\n\", \"\", $text);\n\n $output[$index]['value'] = token_name($token[0]);\n $output[$index]['text'] = htmlentities($text);\n $output[$index]['line'] = $token[2];\n \n }\n return $output;\n }", "title": "" }, { "docid": "cba7ac13b69f39bd4c05e409377edf89", "score": "0.5380834", "text": "public function parse() : Token;", "title": "" }, { "docid": "631f64ca44c2af1f9100a103e5df713c", "score": "0.53726035", "text": "private function tokenize($text) {\n\n return explode(' ', $text);\n\n }", "title": "" }, { "docid": "41abfb001a21c6247edb98eda133462c", "score": "0.5361694", "text": "private function tokenise($content)\n\t{\n\t\t$tokens = array();\n\t\tforeach ($this->maps as $alias=>$type) {\n\t\t\t$escalias = preg_quote($alias);\n\t\t\tif (!preg_match_all(\"/(\\d*\\.?\\d+)\\s*($escalias)(?!\\w)/\", $content, $matches, PREG_SET_ORDER)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$matches = self::unique($matches);\n\t\t\tforeach ($matches as $match) {\n\t\t\t\t$tokens[] = array(\n\t\t\t\t\t'original' => $match[0],\n\t\t\t\t\t'converted' => $this->convert($match[1], $match[2]),\n\t\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn $tokens;\n\t}", "title": "" }, { "docid": "8d611d773af7574aa522a952d6250b7f", "score": "0.5343568", "text": "protected static function tokenizeUntyped($str)\n {\n return explode(' ', $str);\n }", "title": "" }, { "docid": "0a7e9879992995131338d76b01197e44", "score": "0.5296614", "text": "function parse ()\n\t{\n\t\t$this->_tokenize();\n\t\treturn $this->_build();\n\t}", "title": "" }, { "docid": "e1e16c55e5b5fa72e91b8a4fe10e0677", "score": "0.5287671", "text": "function Tokenise ($command_line,$upper=null) {\n $raw_tokens = explode (' ', trim ($command_line));\n //the first one is the command\n $command = $raw_tokens[0];\n //the rest are all parameters to the command\n $params = array_slice ($raw_tokens, 1);\n\t\t\t\t\n $tokens['command'] = (isset($upper)? strtoupper ($command) : $command);\n\t\t\t\t\n $tokens['params'] = $params;\n\n return $tokens;\n }", "title": "" }, { "docid": "b94c3ca06d763d3c0ea7c6ffb4b42285", "score": "0.52765656", "text": "public function getToken();", "title": "" }, { "docid": "b94c3ca06d763d3c0ea7c6ffb4b42285", "score": "0.52765656", "text": "public function getToken();", "title": "" }, { "docid": "b94c3ca06d763d3c0ea7c6ffb4b42285", "score": "0.52765656", "text": "public function getToken();", "title": "" }, { "docid": "b94c3ca06d763d3c0ea7c6ffb4b42285", "score": "0.52765656", "text": "public function getToken();", "title": "" }, { "docid": "b94c3ca06d763d3c0ea7c6ffb4b42285", "score": "0.52765656", "text": "public function getToken();", "title": "" }, { "docid": "96545a0021771e70969cf426014b38fc", "score": "0.5275107", "text": "protected function _tokenize($query) {\n\t\t$i = 0;\n\t\t\n\t\twhile(!empty($query[$i]) || is_numeric($query[$i])) {\n\t\t\t$oldErrorReporting = error_reporting(0);\n\t\t\t$tokenLength = $this->_getToken($query, $tokenCode);\n\t\t\terror_reporting($oldErrorReporting);\n\t\t\t\n\t\t\t$this->_tokens[] = array(\n\t\t\t\t'tokenCode' => $tokenCode,\n\t\t\t\t'content' => substr($query, 0, $i + $tokenLength)\n\t\t\t);\n\t\t\t\n\t\t\t$query = substr($query, $i + $tokenLength);\n\t\t\t\n\t\t\tif(!empty($query) || is_numeric($query)) {\n\t\t\t\t$i = 0;\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "d47e9c7b2e893a08556d4b98eff59c12", "score": "0.5269324", "text": "public function getToken(): string;", "title": "" }, { "docid": "d3ff5dac645fb0f7b04402d8766405c4", "score": "0.5266293", "text": "function cotpl_tokenize($str, $delim = array(' '))\n{\n\t$tokens = array();\n\t$idx = 0;\n\t$quote = '';\n\t$prev_delim = false;\n\t$len = mb_strlen($str);\n\tfor ($i = 0; $i < $len; $i++) {\n\t\t$c = mb_substr($str, $i, 1);\n\t\tif (in_array($c, $delim)) {\n\t\t\tif ($quote) {\n\t\t\t if(!isset($tokens[$idx])) $tokens[$idx] = '';\n\t\t\t\t$tokens[$idx] .= $c;\n\t\t\t\t$prev_delim = false;\n\n\t\t\t} elseif ($prev_delim) {\n\t\t\t\tcontinue;\n\n\t\t\t} else {\n\t\t\t\t$idx++;\n\t\t\t\t$prev_delim = true;\n\t\t\t}\n\n\t\t} elseif ($c == '\"' || $c == \"'\") {\n\t\t\tif (!$quote) {\n\t\t\t\t$quote = $c;\n\n\t\t\t} elseif ($quote == $c) {\n\t\t\t\t$quote = '';\n\t\t\t\tif (!isset($tokens[$idx])) {\n\t\t\t\t\t$tokens[$idx] = '';\n\t\t\t\t}\n\n\t\t\t} else {\n if(!isset($tokens[$idx])) $tokens[$idx] = '';\n\t\t\t\t$tokens[$idx] .= $c;\n\t\t\t}\n\t\t\t$prev_delim = false;\n\n\t\t} elseif ($c == '{' && !$quote) {\n\t\t\t// Avoid variable tokenization\n\t\t\t$quote = $c;\n if(!isset($tokens[$idx])) $tokens[$idx] = '';\n\t\t\t$tokens[$idx] .= $c;\n\t\t\t$prev_delim = false;\n\n\t\t} elseif ($c == '}' && $quote) {\n\t\t\t$quote = '';\n if(!isset($tokens[$idx])) $tokens[$idx] = '';\n\t\t\t$tokens[$idx] .= $c;\n\t\t\t$prev_delim = false;\n\n\t\t} else {\n if(!isset($tokens[$idx])) $tokens[$idx] = '';\n\t\t\t$tokens[$idx] .= $c;\n\t\t\t$prev_delim = false;\n\t\t}\n\t}\n\n\treturn $tokens;\n}", "title": "" }, { "docid": "b2559dff708ca30750a6f33c174ccd14", "score": "0.5260108", "text": "function getToken($word)\n {\n if (is_array($word)) {\n return $word[0];\n }\n return false;\n }", "title": "" }, { "docid": "689ae84b319e707747694907068a1218", "score": "0.5245648", "text": "function match_filters(&$text,&$res) {\n\t//%##\\d++@ then a number of |text{...} or |text} or |text) or |text\n\twhile(preg_match(\"@%##(\\d++)\\@((?:\\s*+\\|{1,2}+[^][(){}]++(?:(?:\\{[^][{}]*+\\})|(?=[})]|$)))++)@s\",$text,$reg)) {\n\t\t//1: num token\n\t\t//2: filters\n\t\t$res[$reg[1]][1]->fonctions = trim($reg[2]);\n\t\t//do not add a new resource; just store the fonctions in the field\n\t\t//this will delete the filter from the parent token\n\t\t$text = substr_replace($text,\"%##\".$reg[1].\"@\",strpos($text,$reg[0]),strlen($reg[0]));\n\t}\n\treturn $text;\n}", "title": "" }, { "docid": "a15e14d0fc764e72efe713dba0ab7bf1", "score": "0.52454686", "text": "private function tokenize($sentence) {\r\n\r\n //removing all the characters which ar not letters, numbers or space\r\n $sentence = preg_replace(\"/[^a-zA-Z 0-9]+/\", \"\", $sentence);\r\n\r\n //converting to lowercase\r\n $sentence = strtolower($sentence);\r\n\r\n //an empty array\r\n $keywordsArray = array();\r\n\r\n //splitting text into array of keywords\r\n //http://www.w3schools.com/php/func_string_strtok.asp\r\n $token = strtok($sentence, \" \");\r\n while ($token !== false) {\r\n\r\n //excluding elements which are present in stopWords array\r\n //http://www.w3schools.com/php/func_array_in_array.asp\r\n if (!binarySearch($this->stopWords, $token)) {\r\n array_push($keywordsArray, $token);\r\n }\r\n $token = strtok(\" \");\r\n }\r\n return $keywordsArray;\r\n }", "title": "" }, { "docid": "39d4d5312d92b2f721e15176d0b55cf2", "score": "0.5208063", "text": "function makeac($ac){\n\t$tokens = preg_split('/\\r|\\t/', $ac);\n\tfor($i=0; $i<sizeof($tokens); $i++){\n\t\t$tokens[$i] = ltrim($tokens[$i]);\n\t} \n\n\treturn $tokens;\n}", "title": "" }, { "docid": "2a9d01068aff76950039d0982feda3f6", "score": "0.5201721", "text": "protected function getToken(){\r\n\t\t\t$arr = $this -> oAuth -> getAuthHTTPHeader();\r\n\t\t\t/*\r\n\t\t\t\tarr = array([0] => '<headerName>', [1] => '<TokenType> <token!>')\r\n\t\t\t*/\r\n\t\t\t//Получили строку с кодом\r\n\t\t\t$string = end($arr);\r\n\t\t\t//Получили массив\r\n\t\t\t$data = array_filter(array_map('trim',explode(' ',$string)));\r\n\t\t\treturn end($data);\r\n\t\t}", "title": "" }, { "docid": "ed465c470128d2329bb92943a45fa251", "score": "0.5187581", "text": "public function testTokenizerComplicatedTag()\n {\n $this->assertEquals(array(\n array(\n 'tag' => 'foo',\n 'type' => 'none'\n ),\n array(\n 'tag' => '[bar=foo a=\"b^c\" d=\\']\\']',\n 'name' => 'bar',\n 'attributes' => array(\n 'bar' => 'foo',\n 'a' => 'b^c',\n 'd' => ']'\n ),\n 'type' => 'markup'\n ),\n array(\n 'tag' => 'bar',\n 'type' => 'none'\n ),\n array(\n 'tag' => '[/b]',\n 'name' => '/b',\n 'attributes' => array(),\n 'type' => 'markup'\n )\n ), $this->_parser->tokenize('foo[bar=foo a=\"b^c\" d=\\']\\']bar[/b]'));\n }", "title": "" }, { "docid": "ead8b8d6864768707bd8358f17a381e2", "score": "0.5186325", "text": "protected function scanText()\n {\n if ($this->lastToken->type == 'tag'\n || $this->lastToken->type == 'filter'\n || $this->lastToken->type == 'pipe'\n || $this->lastToken->type == 'attributes'\n || $this->lastToken->type == 'class'\n || $this->lastToken->type == 'id'\n ) {\n $token = $this->scanInput('/([^\\n]+)/', 'text');\n $token->value = preg_replace(\"/ *\\\\\\\\\\(/\", '(', $token->value);\n return $token;\n }\n return null;\n }", "title": "" }, { "docid": "2647fc85232edbaa4fe643269fad1a91", "score": "0.51832056", "text": "public function maketoken_fromarray($data_tweets){\n #seluruh tweet\n \n $i=0;\n \n $token= array();\n $jumlah_tweet = count($data_tweets);\n \n for ($i=0; $i < $jumlah_tweet; $i++) { \n $terms = explode(\" \", strtolower($data_tweets[$i])); //memecah tweet menjadi kata \n $jumlah_term = count($terms);\n for ($j=0; $j < $jumlah_term ; $j++) { \n //memasukkan term ke dalam daftar token\n //melakukan stemming untuk term \n array_push($token, $terms[$j]);\n } \n\n }\n return $token;\n\n }", "title": "" }, { "docid": "629f813927c9e28afa85e0e2934f77c0", "score": "0.5179888", "text": "function sapistats_get_token($value = '') {\n $sanitized = str_replace('\"', '', $value);\n return drupal_hmac_base64($sanitized, sapistats_getPrivateKey() . sapistats_getHashSalt());\n}", "title": "" }, { "docid": "e5877eeba74f49f59c246f2f88a14fea", "score": "0.51734", "text": "function getToken($thisString) {\n\n // List the possible tokens\n $Tokens = array(\n \"Status\",\n \"StatusDetail\",\n \"VendorTxCode\",\n \"VPSTxId\",\n \"TxAuthNo\",\n \"Amount\",\n \"AVSCV2\", \n \"AddressResult\", \n \"PostCodeResult\", \n \"CV2Result\", \n \"GiftAid\", \n \"3DSecureStatus\", \n \"CAVV\",\n\t\"AddressStatus\",\n\t\"CardType\",\n\t\"Last4Digits\",\n\t\"PayerStatus\");\n\n // Initialise arrays\n $output = array();\n $resultArray = array();\n \n // Get the next token in the sequence\n for ($i = count($Tokens)-1; $i >= 0 ; $i--){\n // Find the position in the string\n $start = strpos($thisString, $Tokens[$i]);\n\t// If it's present\n if ($start !== false){\n // Record position and token name\n $resultArray[$i]->start = $start;\n $resultArray[$i]->token = $Tokens[$i];\n }\n }\n \n // Sort in order of position\n sort($resultArray);\n\t// Go through the result array, getting the token values\n for ($i = 0; $i<count($resultArray); $i++){\n // Get the start point of the value\n $valueStart = $resultArray[$i]->start + strlen($resultArray[$i]->token) + 1;\n\t// Get the length of the value\n if ($i==(count($resultArray)-1)) {\n $output[$resultArray[$i]->token] = substr($thisString, $valueStart);\n } else {\n $valueLength = $resultArray[$i+1]->start - $resultArray[$i]->start - strlen($resultArray[$i]->token) - 2;\n\t $output[$resultArray[$i]->token] = substr($thisString, $valueStart, $valueLength);\n } \n\n }\n\n // Return the ouput array\n return $output;\n}", "title": "" }, { "docid": "e5877eeba74f49f59c246f2f88a14fea", "score": "0.51734", "text": "function getToken($thisString) {\n\n // List the possible tokens\n $Tokens = array(\n \"Status\",\n \"StatusDetail\",\n \"VendorTxCode\",\n \"VPSTxId\",\n \"TxAuthNo\",\n \"Amount\",\n \"AVSCV2\", \n \"AddressResult\", \n \"PostCodeResult\", \n \"CV2Result\", \n \"GiftAid\", \n \"3DSecureStatus\", \n \"CAVV\",\n\t\"AddressStatus\",\n\t\"CardType\",\n\t\"Last4Digits\",\n\t\"PayerStatus\");\n\n // Initialise arrays\n $output = array();\n $resultArray = array();\n \n // Get the next token in the sequence\n for ($i = count($Tokens)-1; $i >= 0 ; $i--){\n // Find the position in the string\n $start = strpos($thisString, $Tokens[$i]);\n\t// If it's present\n if ($start !== false){\n // Record position and token name\n $resultArray[$i]->start = $start;\n $resultArray[$i]->token = $Tokens[$i];\n }\n }\n \n // Sort in order of position\n sort($resultArray);\n\t// Go through the result array, getting the token values\n for ($i = 0; $i<count($resultArray); $i++){\n // Get the start point of the value\n $valueStart = $resultArray[$i]->start + strlen($resultArray[$i]->token) + 1;\n\t// Get the length of the value\n if ($i==(count($resultArray)-1)) {\n $output[$resultArray[$i]->token] = substr($thisString, $valueStart);\n } else {\n $valueLength = $resultArray[$i+1]->start - $resultArray[$i]->start - strlen($resultArray[$i]->token) - 2;\n\t $output[$resultArray[$i]->token] = substr($thisString, $valueStart, $valueLength);\n } \n\n }\n\n // Return the ouput array\n return $output;\n}", "title": "" }, { "docid": "0afedac7ea54e5634457d182c91eb267", "score": "0.51731944", "text": "function santitise_input($data) {\n //Removing leading or trailing spaces.\n $data = trim($data);\n //Removing backslashes.\n $data = stripslashes($data);\n //Removing HTML special/control characters.\n $data = htmlspecialchars($data);\n return $data; \n }", "title": "" }, { "docid": "f177c71477dc0054c064561ad94b6304", "score": "0.5170966", "text": "public function getTokens($s){\n $tokens = [];\n $s = $this->formatString($s);\n $s = preg_replace(\"/,\\d+\\)/\",\")\",$s);// remove multinumbers inside parenthesis separated by comma: (11,2)=>(11)\n $fieldArr = explode(\",\", $s);\n foreach ($fieldArr as $fa) {\n array_push($tokens,$this->structureData($fa));\n }\n return $tokens;\n }", "title": "" }, { "docid": "0e7cfe8ce6b586f819379eedc7f6a84b", "score": "0.5166333", "text": "public function nextToken(){\n\t\t\t\tif ($this->_input === null) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\t$len = mb_strlen($this->_input);\n\t\t\t\twhile ($this->_position < $len) {\n\t\t\t\t\t\t$termStartPosition = $this->_position;\n\t\t\t\t\t\t$length=1;\n\t\t\t\t\t\t$current_char = mb_substr($this->_input,$this->_position,1);\n\t\t\t\t\t\t$next_char = mb_substr($this->_input,$this->_position+1,1);\n\t\t\t\t\t\tif(ord($current_char)>127){\n\t\t\t\t\t\t\t\t$i=0;\n\t\t\t\t\t\t\t\twhile ($this->_position < $len && ord( $next_char)>127) {\n\t\t\t\t\t\t\t\t\t\t$this->_position++;\n\t\t\t\t\t\t\t\t\t\t$next_char = mb_substr($this->_input,$this->_position+1,1);\n\t\t\t\t\t\t\t\t\t\t$length=2;\n\t\t\t\t\t\t\t\t\t\tif($i++==1){\n\t\t\t\t\t\t\t\t\t\t\t\t$this->_position--;\n\t\t\t\t\t\t\t\t\t\t\t\t$this->_position--;\n\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\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}else{\n\t\t\t\t\t\t\t\twhile ($this->_position < $len && ctype_alnum( $next_char)) {\n\t\t\t\t\t\t\t\t\t\t$this->_position++;\n\t\t\t\t\t\t\t\t\t\t$length++;\n\t\t\t\t\t\t\t\t\t\t$next_char = mb_substr($this->_input,$this->_position+1,1);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->_position++;\n\n\t\t\t\t\t\t$str = strtolower(trim(mb_substr($this->_input,$termStartPosition,$length)));\n\t\t\t\t\t\t$token = new Zend_Search_Lucene_Analysis_Token(\n\t\t\t\t\t\t\t\t$str,\n\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\tstrlen($str)\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$token = $this->normalize($token);\n\t\t\t\t\t\tif ($token !== null) {\n\t\t\t\t\t\t\t\treturn $token;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t}", "title": "" }, { "docid": "e15c5b8368e5484085fb172290c600e8", "score": "0.5163003", "text": "public function applyFistTransformation(){\n\t $this->tokenDoc->applyTransformation(new QuotesFilter(), false);\n\t $this->tokenDoc->applyTransformation(new PunctuationFilter(), false);\n\t}", "title": "" }, { "docid": "3a729355934a3119ae47f60cde73ccd5", "score": "0.5158603", "text": "function extract_tags($text) {\r\n\t\tglobal $common_words, $other_common_words, $twitter_words;\r\n\t\t// remove urls (they are included in the entities anyway)\r\n\t\t$text = preg_replace(\"/https?:\\/\\/.+($|\\s)/i\", \"\", $text);\r\n\t\t// remove non-word characters\r\n\t\t$text = preg_replace(\"/[^a-z0-9\\s]/i\", \"\", $text);\r\n\t\t// remove common words\r\n\t\t$text = preg_replace(\"/\\b(\" . $common_words . \"|\" . $other_common_words . \"|\" . $twitter_words . \")\\b\\s?/i\", \"\", $text);\r\n\t\t// remove searched twitter handle\r\n\t\t//$text = preg_replace(\"/\\b\". $handle . \"\\b\\s?/i\", \"\", $text);\r\n\t\t\r\n\t\t$words = preg_split(\"/\\s+/\", $text);\r\n\t\treturn $words;\r\n\t}", "title": "" }, { "docid": "1589f9c0f9a39d58d9943900a8bdcc01", "score": "0.5146594", "text": "public function nextToken()\n\t{\n\n\t\twhile ($this->i < strlen($this->e) \n\t\t\t\t&& strpos(\" \\n\\t\\r\", $this->e[$this->i]) !== FALSE)\n\t\t{\n\t\t\t$this->i++;\n\t\t}\n\n\t\tif ($this->i >= strlen($this->e)) \n\t\t{\n\t\t\treturn new Token(TokenType::EOF);\n\t\t}\n\n\t\t // check for INT\n\t\t$inputString = \"\";\n\n\t\twhile ($this->i < strlen($this->e) \n\t\t\t\t&& strpos(\"0123456789\", $this->e[$this->i]) !== FALSE) \n\t\t{\n\t\t\t$inputString .= $this->e[$this->i++];\n\t\t}\n\t\t\n\t\tif (strlen($inputString) > 0)\n\t\t{\n\t\t\treturn new Token(TokenType::INT_TOKEN, $inputString);\n\t\t}\n\n\t\t// check for ID or reserved word \n\t\twhile ($this->i < strlen($this->e) \n\t\t\t\t&& strpos(\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_\", $this->e[$this->i]) !== FALSE) \n\t\t{\n\t\t\t$inputString .= $this->e[$this->i++];\n\t\t}\n\t\t\n\t\tif (strlen($inputString) > 0)\n\t\t{\n\t\t\tif ($inputString == \"if\")\n\t\t\t{\n\t\t\t\treturn new Token(TokenType::IF_TOKEN);\n\t\t\t}\n\t\t\tif ($inputString == \"else\") \n\t\t\t{\n\t\t\t\treturn new Token(TokenType::ELSE_TOKEN);\n\t\t\t}\n\t\t\treturn new Token(TokenType::ID, $inputString);\n\t\t}\n\n\t\t\n\n\t\t // We're left with strings or one character tokens\n\t\t switch ($this->e[$this->i++]) \n\t\t {\n\t\t\tcase \"{\":\n\t\t\t\treturn new Token(TokenType::LBRACKET, \"{\");\n\t\t\tcase \"}\":\n\t\t\t\treturn new Token(TokenType::RBRACKET, \"}\");\n\t\t\tcase \"[\":\n\t\t\t\treturn new Token(TokenType::LSQUAREBRACKET, \"[\");\n\t\t\tcase \"]\":\n\t\t\t\treturn new Token(TokenType::RSQUAREBRACKET, \"]\");\n\t\t\tcase \"<\":\n\t\t\t\treturn new Token(TokenType::LESS, \"<\");\n\t\t\tcase \">\":\n\t\t\t\treturn new Token(TokenType::GREATER, \">\");\n\t\t\tcase \"=\":\n\t\t\t\treturn new Token(TokenType::EQUAL, \"=\");\n\t\t\tcase '\"':\n\t\t\t\t$value = \"\";\n\t\t\t\twhile ($this->i < strlen($this->e) && $this->e[$this->i] != '\"')\n\t\t\t\t{\n\t\t\t\t\t$c = $this->e[$this->i++];\n\t\t\t\t\t\n\t\t\t\t\tif ($this->i >= strlen($this->e))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn new Token(TokenType::OTHER);\n\t\t\t\t\t}\n\t\t\t\t\t// check for escaped double quote\n\t\t\t\t\tif ($c == '\\\\' && $this->e[$this->i] == '\"')\n\t\t\t\t\t{\n\t\t\t\t\t\t$c='\"';\n\t\t\t\t\t\t$this->i++;\n\t\t\t\t\t}\n\t\t\t\t\t$value .= $c;\n\t\t\t\t} \n\t\t\t\t$this->i++;\n\t\t\t\treturn new Token(TokenType::STRING_TOKEN, $value);\n\t\t\tdefault:\n\t\t\t\t//echo \"Other: \" . $this->i . PHP_EOL;\n\t\t\t\t// OTHER should result in exception\n\t\t\t\treturn new Token(TokenType::OTHER);\n\t\t}\n\n\t}", "title": "" }, { "docid": "3458bcececa723d22716e16bc0e0a91a", "score": "0.51452345", "text": "function tokenizePW($string){\n\t\t$salt1 = 'qm&h*';\n\t\t$salt2 = 'pg!@';\n\t\t$token = hash('ripemd128',\"$salt1$string$salt2\");\n\t\treturn $token;\n\t}", "title": "" }, { "docid": "e1a174648b4abf663bcb7e366a387a32", "score": "0.513478", "text": "public function applySecondTransformation(){\n\t $this->tokenDoc->applyTransformation(new LowerCaseFilter(), false);\n\n\t\t$ignoreWordsAndCharactersFilter = new IgnoreWordsAndCharacters(['a', 'the', 'and', 'of', 'in', 'be', 'also', 'as'], '{\"an\":\"a\"}');\n\t\t$this->tokenDoc = $ignoreWordsAndCharactersFilter->applyFilters($this->tokenDoc);\n\t}", "title": "" }, { "docid": "5ce5ca3872919cdee3b0d9caee2b3578", "score": "0.512841", "text": "function decoup_params($line)\n{\n return explode(' ', $line);\n}", "title": "" }, { "docid": "4f246d98cb207f41e3d662cbfd233b20", "score": "0.51219654", "text": "Function Tokenize($string, $separator=\"\") {\r\n if (!strcmp($separator, \"\")) {\r\n $separator = $string;\r\n $string = $this->next_token;\r\n }\r\n for ($character = 0; $character < strlen($separator); $character++) {\r\n if (GetType($position = strpos($string, $separator[$character])) == \"integer\")\r\n $found = (IsSet($found) ? min($found, $position) : $position);\r\n }\r\n if (IsSet($found)) {\r\n $this->next_token = substr($string, $found + 1);\r\n return(substr($string, 0, $found));\r\n } else {\r\n $this->next_token = \"\";\r\n return($string);\r\n }\r\n }", "title": "" }, { "docid": "02362a3eccf564c04192acb148b63d42", "score": "0.51121897", "text": "function parse_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "title": "" }, { "docid": "496900e0d2381a0b01d2a6c7424ba331", "score": "0.51118237", "text": "private function getToken()\n {\n $token = '';\n $string = 'ABCDEFGHIJKLMNOPQRSTUQWXYZ0123456789#@';\n for($i=1;$i<=25;$i++){\n $index = rand(0,37);\n $token = $token.$string[$index];\n }\n return $token;\n }", "title": "" }, { "docid": "22d06a4e23743e9626ba63675ff2589a", "score": "0.5107014", "text": "function analyze_entities($text,$id) {\n\n$language = new LanguageClient([\n 'projectId' => $projectId\n]);\n\n\n$annotation = $language->analyzeEntities($text);\n$entities = $annotation->entities();\n\nforeach ($entities as $entity) {\n printf($entity['name']);\n printf(\",\");\n $temp = $temp. \",\" . $entity['name'];\n\n }\n printf(\"\\n\");\n $temp = substr($temp,1);\n return $temp;\n \n\n}", "title": "" }, { "docid": "9eacacbd290e55648a6ae7eed142826c", "score": "0.51011926", "text": "function parse() {}", "title": "" }, { "docid": "4e4e31f25d659facd3bea4a3aed4b4fc", "score": "0.50863755", "text": "public function getToken():string\n {\n return $this->token;\n }", "title": "" }, { "docid": "e566ae5cb100aeb73eb94b8492f244ba", "score": "0.50742996", "text": "public function nextToken()\n\t {\n\t \tif ($this->_input === null) {\n\t \t\treturn null;\n\t \t}\n\t\t\n\t\twhile ($this->_position < strlen($this->_input)) {\n\t\t\t// skip white space\n\t\t\twhile ($this->_position < strlen($this->_input) && !ctype_alnum($this->_input[$this->_position])) {\n\t\t\t\t$this->_position++;\n\t\t\t}\n\n\t\t\n\t\t\t$termStartPosition = $this->_position;\n\t\t\t\n\t\t\t// read token\n\t\t\twhile ($this->_position < strlen($this->_input) && ctype_alnum($this->_input[$this->_position])) {\n\t\t\t\t$this->_position++;\n\t\t\t}\n\t\t\t\n\t\t\t// Empty token, end of stream.\n\t\t\tif ($this->_position == $termStartPosition) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t\n\t\t\t$token = new Zend_Search_Lucene_Analysis_Token(\n\t\t\t\tsubstr(\n\t\t\t\t\t$this->_input,\n\t\t\t\t\t$termStartPosition,\n\t\t\t\t\t$this->_position - $termStartPosition\n\t\t\t\t),\n\t\t\t\t$termStartPosition,\n\t\t\t\t$this->_position\n\t\t\t);\n\t\t\t$token = $this->normalize($token);\n\t\t\tif ($token !== null) {\n\t\t\t\treturn $token;\n\t\t\t}\n\t\t\t// Continue if token is skipped\n\t\t }\n\t \n\t \treturn null;\n\t \n\t }", "title": "" }, { "docid": "e3ac3046eb0c6260bf5f46bd8b0c524a", "score": "0.50672007", "text": "function token($options)\n {\n $text = $options['text'];\n if ($text == '\\\\') $text = ' ';\n if (isset($options['type']) && $options['type'] == 'escape') {\n $text = '~' . $text;\n }\n else {\n $find = \"/}}}(?!})/\";\n $replace = \"}}}}}}{{{\";\n $text = preg_replace($find, $replace, $text);\n }\n return $text;\n }", "title": "" }, { "docid": "eb22d3aa09738708371927301fde1abd", "score": "0.50667745", "text": "function tokenize_parms( $parms ) {\r\n\r\n $ret = array();\r\n\r\n foreach( $parms as $k => $v ) {\r\n\r\n $s = substr($v, 0, 1);\r\n $s2 = substr($v, 1);\r\n\r\n if( $s === \"w\" || $s === \"h\" ) {\r\n $ret[$s] = $s2;\r\n } else {\r\n $ret[$v] = 1;\r\n }\r\n }\r\n\r\n return( $ret );\r\n}", "title": "" }, { "docid": "55d7964ef8fa4ce767b6ee2626559edd", "score": "0.50619316", "text": "public function tokenLiteral(): string\n {\n }", "title": "" }, { "docid": "42fb63fb92ccb816fac242ed97a4137b", "score": "0.50613654", "text": "function principal($texte){\r\n\t$mots = explode(', ', $texte);\r\n\treturn $mots[0];\r\n}", "title": "" }, { "docid": "706e86abbe3311cb7d5651bd958931b0", "score": "0.50593686", "text": "public function testCapturesStrings()\n {\n $this->assertEquals(['\"this is a string.\"'], Tokenizer::tokenize('\"this is a string.\"'));\n }", "title": "" }, { "docid": "12827d97352ea87f8b65bd83e6eafcd3", "score": "0.5042568", "text": "function tags($input,$type,$sep=', ',$class=\"\")\r\n{\r\n //Exploding using comma\r\n $tags = explode(',',$input);\r\n $count = 1;\r\n $total = count($tags);\r\n $new_tags = '';\r\n foreach($tags as $tag) {\r\n $params = array('name'=>'tag','tag'=>trim($tag),'type'=>$type);\r\n $new_tags .= '<a href=\"'.cblink($params).'\" class=\"'.$class.'\">'.$tag.'</a>';\r\n if($count<$total){\r\n $new_tags .= $sep;\r\n }\r\n $count++;\r\n }\r\n\r\n return $new_tags;\r\n}", "title": "" }, { "docid": "bdd0cf125494581d9f6164987be1740b", "score": "0.5041386", "text": "function passwordSantize($input)\n{\n $input = strip_tags($input);\n return $input;\n}", "title": "" }, { "docid": "4b92aa45d7e43441db2fb8fe72c33e74", "score": "0.50277", "text": "function convert_input($input) {\n print_r($input);\n}", "title": "" }, { "docid": "953ebe09059447653f5ec4de08dc2553", "score": "0.50248843", "text": "public function nextToken(): Token;", "title": "" }, { "docid": "e9eb7430755af78b06188f69a4c03f65", "score": "0.5021123", "text": "function pre_process($line)\n{\t\n\t$mod_tweet=\"\";\n\tglobal $negsmiley, $possmiley;\n\tglobal $logic;\n\t\n\tif ($line!=\"\")\n\t{\n\t\t$line=preg_replace(\"@\\n@\",\"\",$line);\n\t\t$tweet=$line.\" \";\n\t\t\n\t\t#Remove special characters at the end of words and leaves out smileys\n\t\t$words=explode(\" \",$tweet);\n\t\t$words = array_map('trim', $words);\n\t\tfor($x=0;$x<count($words);$x++)\n\t\t{\n\t\t\t$word=$words[$x];\n\t\t\tif (!(in_array($word,$negsmiley) or in_array($word,$possmiley)))\n\t\t\t\t$word=preg_replace('/(^([^a-zA-Z0-9])*|([^a-zA-Z0-9])*$)/', '', $word);\n\t\t\t$mod_tweet=$mod_tweet.\" \".$word;\n\t\t}\n\t\tfwrite($logic,\"No Special Characters: $mod_tweet \\n\");\n\t\t$tweet=trim($mod_tweet);\n\t\t\n\t\t#Removes white spaces and trims the tweet\n\t\t$tweet=strtolower($tweet);\n\t\tfwrite($logic,\"Lower case: $tweet \\n\");\n\t\t\n\t\t#Removes the user name\n\t\t$tweet=$tweet.\" \";\n\t\t$acount=substr_count($tweet,'@');\n\t\twhile($acount !=0)\n\t\t{\n\t\t\t$apos=strpos($tweet,'@');\n\t\t\t$spos=strpos($tweet,' ',$apos);\n\t\t\t$tweet=substr_replace($tweet,\"\",$apos,$spos-$apos);\n\t\t\t$acount = $acount - 1;\n\t\t}\n\t\tfwrite($logic,\"No User name: $tweet \\n\");\n\t\t$tweet=trim($tweet);\n\t\t\n\t\t#Remove the hash sign and keep the hash tag\n\t\t$hcount=substr_count($tweet,'#');\n\t\twhile ($hcount != 0)\n\t\t{\n\t\t\t$hpos=strpos($tweet,'#');\n\t\t\t$tweet=substr_replace($tweet,'',$hpos,1);\n\t\t\t$hcount = $hcount-1;\n\t\t}\n\t\tfwrite($logic,\"Remove hash tag: $tweet \\n\");\n\t\t$tweet=trim($tweet);\n\t\t\n\t\t#Removes words starting with numbers\n\t\t$tweet=trim(str_replace(range(0,9),'',$tweet));\n\t\tfwrite($logic,\"No words starting with numbers: $tweet \\n\");\n\t\t\n\t\t#Removes multiple characters occurring together\n\t\t$mod_tweet=\"\";\n\t\t$words=explode(\" \",$tweet);\n\t\tfor($x=0;$x<count($words);$x++)\n\t\t{\n\t\t\t$current=$words[$x];\n\t\t\t$a=0; $b=1; $c=2;\n\t\t\twhile ($c <= strlen($current))\n\t\t\t{\n\t\t\t\tif(substr($current,$a,1) == substr($current,$b,1) and substr($current,$b,1) == substr($current,$c,1))\n\t\t\t\t{\n\t\t\t\t\t$current=substr_replace($current,'',$c,1);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$a = $a + 1;\n\t\t\t\t\t$b = $b + 1;\n\t\t\t\t\t$c = $c + 1;\n\t\t\t\t}\n\t\t\t}\t\n\t\t\t$mod_tweet=$mod_tweet.\" \".$current;\n\t\t}\n\t\t$tweet=$mod_tweet;\n\t\t$mod_tweet=\"\";\n\t\tfwrite($logic,\"No multiple characters: $tweet \\n\");\n\t\t\n\t\t#Removes all characters less than 3 characters\n\t\t$words=explode(\" \",$tweet);\n\t\tfor($x=0;$x<count($words);$x++)\n\t\t{\n\t\t\tif(strlen($words[$x])>=2)\n\t\t\t\t$mod_tweet = $mod_tweet.\" \".$words[$x];\n\t\t}\n\t\tfwrite($logic,\"Only more than 3 characters: $mod_tweet \\n\");\n\t\treturn $mod_tweet;\n\t}\n}", "title": "" }, { "docid": "994d10272cb866fc392459bfbe11cd12", "score": "0.5002212", "text": "function tronquer($texte) {\n $ligne=preg_split(\"/(?<=[.?!])\\s*(?=[a-z])/i\", $texte);\n echo '<pre>';\n echo '</pre>';\n return $ligne;\n }", "title": "" }, { "docid": "e07540234e1304b854ffa85dd868c472", "score": "0.50010085", "text": "private function parse_input($par) {\n $par = trim($par);\n $par = stripslashes($par);\n $par = htmlspecialchars($par);\n //$par = mysql_real_escape_string($par);\n $par = htmlspecialchars($par, ENT_IGNORE, 'utf-8');\n //$par = strip_tags($par);\n return $par;\n }", "title": "" }, { "docid": "cdc1e655b991f5df2dc57f94f6874dbf", "score": "0.49990818", "text": "public function nextToken() {\n if ($this->pos < $this->len == false) {\n return null;\n }\n\n $return = $this->getString();\n if ($return !== null) {\n return array(self::T_STRING, $return);\n }\n \n $return = $this->getQuotedString();\n if ($return !== null) {\n return array(self::T_QUOTED_STRING, $return);\n }\n\n $return = $this->getDQuotedString();\n if ($return !== null) {\n return array(self::T_QUOTED_STRING, $return);\n }\n \n $return = $this->getNumber();\n if($return !== null){\n return array(self::T_NUMBER, $return);\n }\n \n $return = $this->getWhitespace();\n if($return !==null){\n return array(self::T_WHITESPACE,\"\");\n }\n\n // Return character if not recognized as a token\n $return = $this->query[$this->pos];\n $this->pos++;\n return $return;\n }", "title": "" }, { "docid": "71efca66a710c73273f73317cbe0aefe", "score": "0.4996018", "text": "function explodeArrayKeepDelimeter($delim, $tokens) {\n $array = array();\n foreach($tokens as $token)\n {\n $temp = explode($delim, $token, 20);\n $count = count($temp);\n if($count == 1)\n $array = array_merge((array)$array, (array)$temp);\n else\n {\n $temp2 = array();\n for($i = 0; $i < count($temp); $i++)\n {\n if($count >= 2)\n {\n $temp2 = array_merge($temp2, (array)$temp[$i], (array)$delim, (array)$temp[$i+1]);\n $count--;\n }\n }\n $array = array_values(array_filter(array_merge((array)$array, (array)$temp2)));\n }\n }\n return $array;\n}", "title": "" } ]
d449948498dc279e944b90e8f5a9a00b
send notices to all the handlers of the parent bugs when a child bug is RESOLVED
[ { "docid": "7e47f354ef058e5ba2da3dd3ce19c253", "score": "0.6490008", "text": "function telegram_message_relationship_child_resolved( $p_bug_id ) {\n telegram_message_relationship_child_resolved_closed( $p_bug_id, 'telegram_message_notification_title_for_action_relationship_child_resolved' );\n}", "title": "" } ]
[ { "docid": "d972f9daa593273823cec1faa227ef40", "score": "0.66899204", "text": "function telegram_message_relationship_child_resolved_closed( $p_bug_id, $p_message_id ) {\n # retrieve all the relationships in which the bug is the destination bug\n $t_relationship = relationship_get_all_dest( $p_bug_id );\n $t_relationship_count = count( $t_relationship );\n if( $t_relationship_count == 0 ) {\n # no parent bug found\n return;\n }\n\n if( $p_message_id == 'telegram_message_notification_title_for_action_relationship_child_closed' ) {\n plugin_log_event( sprintf( 'Issue #%d child issue closed', $p_bug_id ) );\n } else {\n plugin_log_event( sprintf( 'Issue #%d child issue resolved', $p_bug_id ) );\n }\n\n for( $i = 0; $i < $t_relationship_count; $i++ ) {\n if( $t_relationship[$i]->type == BUG_DEPENDANT ) {\n $t_src_bug_id = $t_relationship[$i]->src_bug_id;\n $t_status = bug_get_field( $t_src_bug_id, 'status' );\n if( $t_status < config_get( 'bug_resolved_status_threshold' ) ) {\n\n # sent the notification just for parent bugs not resolved/closed\n $t_opt = array();\n $t_opt[] = bug_format_id( $p_bug_id );\n telegram_message_generic( $t_src_bug_id, 'handler', $p_message_id, $t_opt );\n }\n }\n }\n}", "title": "" }, { "docid": "dcea7c54157f1e30d7710cdee6aabf00", "score": "0.60832167", "text": "function telegram_message_relationship_child_closed( $p_bug_id ) {\n telegram_message_relationship_child_resolved_closed( $p_bug_id, 'telegram_message_notification_title_for_action_relationship_child_closed' );\n}", "title": "" }, { "docid": "279d70e44032cdea345fa51da4818968", "score": "0.5892825", "text": "function telegram_message_update_bug( $p_type_event, $p_existing_bug, $p_updated_bug ) {\n # Note that multiple resolved or closed states can exist and thus we need to\n # look at a range of statuses when performing this check.\n $t_resolved_status = config_get( 'bug_resolved_status_threshold' );\n $t_closed_status = config_get( 'bug_closed_status_threshold' );\n $t_resolve_issue = false;\n $t_close_issue = false;\n $t_reopen_issue = false;\n if( $p_existing_bug->status < $t_resolved_status &&\n $p_updated_bug->status >= $t_resolved_status &&\n $p_updated_bug->status < $t_closed_status\n ) {\n $t_resolve_issue = true;\n } else if( $p_existing_bug->status < $t_closed_status &&\n $p_updated_bug->status >= $t_closed_status\n ) {\n $t_close_issue = true;\n } else if( $p_existing_bug->status >= $t_resolved_status &&\n $p_updated_bug->status <= config_get( 'bug_reopen_status' )\n ) {\n $t_reopen_issue = true;\n }\n\n # Send a notification of changes via email.\n if( $t_resolve_issue ) {\n plugin_log_event( sprintf( 'Issue #%d resolved', $p_existing_bug->id ) );\n telegram_message_generic( $p_existing_bug->id, 'resolved', 'telegram_message_notification_title_for_status_bug_resolved' );\n telegram_message_relationship_child_resolved( $p_existing_bug->id );\n } else if( $t_close_issue ) {\n plugin_log_event( sprintf( 'Issue #%d closed', $p_existing_bug->id ) );\n telegram_message_generic( $p_existing_bug->id, 'closed', 'telegram_message_notification_title_for_status_bug_closed' );\n telegram_message_relationship_child_closed( $p_existing_bug->id );\n } else if( $t_reopen_issue ) {\n plugin_log_event( sprintf( 'Issue #%d reopened', $p_existing_bug->id ) );\n telegram_message_generic( $p_existing_bug->id, 'reopened', 'telegram_message_notification_title_for_action_bug_reopened' );\n } else if( $p_existing_bug->handler_id != $p_updated_bug->handler_id ) {\n telegram_message_owner_changed( $p_existing_bug->id, $p_existing_bug->handler_id, $p_updated_bug->handler_id );\n } else if( $p_existing_bug->status != $p_updated_bug->status ) {\n $t_new_status_label = MantisEnum::getLabel( config_get( 'status_enum_string' ), $p_updated_bug->status );\n $t_new_status_label = str_replace( ' ', '_', $t_new_status_label );\n plugin_log_event( sprintf( 'Issue #%d status changed', $p_existing_bug->id ) );\n telegram_message_generic( $p_existing_bug->id, $t_new_status_label, 'telegram_message_notification_title_for_status_bug_' . $t_new_status_label );\n } else {\n plugin_log_event( sprintf( 'Issue #%d updated', $p_existing_bug->id ) );\n telegram_message_generic( $p_existing_bug->id, 'updated', 'telegram_message_notification_title_for_action_bug_updated' );\n }\n }", "title": "" }, { "docid": "025458574b631e6a726554f444448d02", "score": "0.5494478", "text": "public function ApplyChanges()\n {\n parent::ApplyChanges();\n\n $Connection_Type = $this->ReadPropertyString('Connection_Type');\n if ($Connection_Type == 'CONNECTION_Socket') {\n $this->ForceParent(\"{3CFF0FD9-E306-41DB-9B5A-9D06D38576C3}\");\n }\n if ($Connection_Type == 'CONNECTION_TTY') {\n $this->ForceParent(\"{6DC3D946-0D31-450F-A8C6-C42DB8D7D4F1}\");\n }\n\n // Nachrichten abonnieren\n $this->RegisterMessage(0, 10100); // Alle Kernelmessages (10103 muss im MessageSink ausgewertet werden.)\n\n If (IPS_GetKernelRunlevel() == 10103) {\n\n $ParentID = $this->GetParentID();\n // Änderung an den untergeordneten Instanzen\n $this->RegisterMessage($this->InstanceID, 11101); // Instanz wurde verbunden (InstanceID vom Parent)\n $this->RegisterMessage($this->InstanceID, 11102); // Instanz wurde getrennt (InstanceID vom Parent)\n // INSTANCEMESSAGE\n $this->RegisterMessage($ParentID, 10505); // Status hat sich geändert\n\n If (($ParentID > 0) && ($Connection_Type == 'CONNECTION_Socket')) {\n If (IPS_GetProperty($ParentID, 'Host') <> $this->ReadPropertyString('IPAddress')) {\n IPS_SetProperty($ParentID, 'Host', $this->ReadPropertyString('IPAddress'));\n }\n If (IPS_GetProperty($ParentID, 'Port') <> $this->ReadPropertyInteger('Socket')) {\n IPS_SetProperty($ParentID, 'Port', $this->ReadPropertyInteger('Socket'));\n }\n If (IPS_GetProperty($ParentID, 'Open') <> $this->ReadPropertyBoolean(\"Open\")) {\n IPS_SetProperty($ParentID, 'Open', $this->ReadPropertyBoolean(\"Open\"));\n }\n If (IPS_GetName($ParentID) == \"Client Socket\") {\n IPS_SetName($ParentID, \"Victron\");\n }\n if(IPS_HasChanges($ParentID)) {\n $Result = @IPS_ApplyChanges($ParentID);\n If ($Result) {\n $this->_log(\"ApplyChanges\", \"Client Socket connection successful !\");\n }\n else {\n $this->_log(\"ApplyChanges\", \"Client Socket connection not successful !\");\n }\n }\n }\n If (($ParentID > 0) && ($Connection_Type == 'CONNECTION_TTY')) {\n If (IPS_GetProperty($ParentID, 'Port') <> $this->ReadPropertyString('Serial Port')) {\n\n IPS_SetProperty($ParentID, 'Port', $this->ReadPropertyString('Serial Port'));\n IPS_SetProperty($ParentID, 'BaudRate', 19200);\n IPS_SetProperty($ParentID, 'DataBits', 8);\n IPS_SetProperty($ParentID, 'StopBits', 1);\n IPS_SetProperty($ParentID, 'Parity', None);\n }\n If (IPS_GetProperty($ParentID, 'Open') <> $this->ReadPropertyBoolean(\"Open\")) {\n IPS_SetProperty($ParentID, 'Open', $this->ReadPropertyBoolean(\"Open\"));\n }\n If (IPS_GetName($ParentID) == \"Serial Port\") {\n IPS_SetName($ParentID, \"Victron\");\n }\n if(IPS_HasChanges($ParentID)) {\n $Result = @IPS_ApplyChanges($ParentID);\n If ($Result) {\n $this->_log(\"ApplyChanges\", \"Serial Port connection successful !\");\n }\n else {\n $this->_log(\"ApplyChanges\", \"Serial Port connection not successful !\");\n }\n }\n }\n $result = $this->ConnectionTest($Connection_Type);\n If ($result == $this->ReadPropertyBoolean(\"Open\")) {\n if ($Connection_Type == 'CONNECTION_Socket') {\n $this->SetSummary($this->ReadPropertyString('IPAddress'));\n }\n else {\n $this->SetSummary($this->ReadPropertyString('Serial Port'));\n }\n $this->_log(\"ApplyChanges\", \"start initial preparation\");\n if (GetValueBoolean($this->GetIDForIdent(\"ConnectionStatus\")) == false) {\n SetValueBoolean($this->GetIDForIdent(\"ConnectionStatus\"), true);\n }\n\n // Vorbereitung beendet\n $this->_log(\"ApplyChanges\", \"finish initial preparation\");\n $this->SetBuffer(\"ModuleReady\", 1);\n\n $this->SetStatus(102);\n\n }\n else {\n $this->SetStatus(104);\n $this->SetBuffer(\"ModuleReady\", 0);\n }\n }\n }", "title": "" }, { "docid": "44e3a7e30fa678dc9cceb358d48809a8", "score": "0.5470786", "text": "function hrb_dispute_resolved_notify_parties( $dispute, $p2p_post, $status ) {\n\n\t$workspace = appthemes_get_dispute_p2p_post( $dispute->ID );\n\n\t$disputer = get_user_by( 'id', $dispute->post_author );\n\t$disputee = get_user_by( 'id', $workspace->post_author );\n\n\t$project = hrb_p2p_get_workspace_post( $workspace->ID );\n\n\t$project_link = html_link( get_permalink( $project->ID ), $project->post_title );\n\t$workspace_link = html_link( hrb_get_workspace_url( $workspace->ID ), __( 'workspace', APP_TD ) );\n\n\n\t### notify disputee\n\n\t$dispute_decision = APP_DISPUTE_STATUS_REFUND == $status ? __( 'in your favor', APP_TD ) : sprintf( __( 'in favor of \\'%s\\'', APP_TD ), $disputer->display_name );\n\n\t// get the official response from the form posted data since the meta value is not available at the time the notification is triggered\n\t$official_response = _hrb_get_posted_dispute_meta_value( $dispute->ID, array( 'name' => 'official_response', 'type' => 'textarea' ) );\n\n\t$subject_message = sprintf( __( \"Dispute on - %s - has been resolved %s\", APP_TD ), $project_link, $dispute_decision );\n\n\t$content = sprintf(\n\t\t__( 'Hello %2$s,%1$s\n\t\tAfter careful review of the dispute on %3$s, raised by \\'%4$s\\', we decided %5$s. Our official response: %1$s\n\t\t<em>%6$s</em>.', APP_TD ),\n\t\t\"\\r\\n\\r\\n\", $disputee->display_name, $project_link, $disputer->display_name, $dispute_decision, $official_response\n\t);\n\n\t$content .= \"\\r\\n\\r\\n\" . sprintf( __( \"Visit the project %s.\", APP_TD ), $workspace_link );\n\n\t$participant = array(\n\t\t'recipient' => $disputee->ID,\n\t\t'message' => $subject_message,\n\t\t'send_mail' => array(\n\t\t\t'content' => wpautop( $content ),\n\t\t),\n\t\t'meta' => array(\n\t\t\t'subject' => wp_strip_all_tags( $subject_message ),\n\t\t\t'project_id' => $project->ID,\n\t\t\t'action' => hrb_get_workspace_url( $workspace->ID ),\n\t\t),\n\t);\n\n\tappthemes_send_notification( $participant['recipient'], $participant['message'], 'action', $participant['meta'], array( 'send_mail' => $participant['send_mail'] ) );\n\n\n\t### notify disputer\n\n\t$dispute_decision = APP_DISPUTE_STATUS_PAY == $status ? __( 'in your favor', APP_TD ) : sprintf( __( 'in favor of \\'%s\\'', APP_TD ), $disputee->display_name );\n\n\t$subject_message = sprintf( __( \"Your dispute on - %s - has been resolved %s\", APP_TD ), $project_link, $dispute_decision );\n\n\t$content = \"\\r\\n\\r\\n\" . sprintf(\n\t\t__( 'Hello %2$s,%1$s\n\t\tAfter careful review of your dispute on %3$s, we decided %4$s. Our official response: %1$s\n\t\t<em>%5$s</em>.', APP_TD ),\n\t\t\"\\r\\n\\r\\n\", $disputer->display_name, $project_link, $dispute_decision, $official_response\n\t);\n\n\t$content .= \"\\r\\n\\r\\n\" . sprintf( __( \"Visit the project %s.\", APP_TD ), $workspace_link );\n\n\t$participant = array(\n\t\t'recipient' => $disputer->ID,\n\t\t'message' => $subject_message,\n\t\t'send_mail' => array(\n\t\t\t'content' => wpautop( $content ),\n\t\t),\n\t\t'meta' => array(\n\t\t\t'subject' => wp_strip_all_tags( $subject_message ),\n\t\t\t'project_id' => $project->ID,\n\t\t\t'action' => hrb_get_workspace_url( $workspace->ID ),\n\t\t),\n\t);\n\n\tappthemes_send_notification( $participant['recipient'], $participant['message'], 'notification', $participant['meta'], array( 'send_mail' => $participant['send_mail'] ) );\n}", "title": "" }, { "docid": "be0901718a89df1274027f85ca48a7de", "score": "0.5458567", "text": "function hrb_dispute_opened_notify_parties( $dispute_id, $p2p, $workspace ) {\n\n\t$dispute = get_post( $dispute_id );\n\n\t$disputer = get_user_by( 'id', $dispute->post_author );\n\t$disputee = get_user_by( 'id', $workspace->post_author );\n\n\t$project = hrb_p2p_get_workspace_post( $workspace->ID );\n\n\t$project_link = html_link( get_permalink( $project->ID ), $project->post_title );\n\t$workspace_link = html_link( hrb_get_workspace_url( $workspace->ID ), __( 'workspace', APP_TD ) );\n\t$dispute_link = html_link( hrb_get_workspace_url( $workspace->ID ) . '#disputes', __( 'communication channel', APP_TD ) );\n\n\t$note = \"\\r\\n\\r\\n\" . sprintf(\n\t\t__( 'A new %2$s has been opened for both participants and our team to be able to review the decision. We will aim to make a resolution decision on behalf of both parties.%1$s\n\t\tIn the meantime, if a mutual resolution is agreed between both parties, please inform us and we will close the dispute in line with the mutual agreement.', APP_TD ),\n\t\t\"\\r\\n\\r\\n\", $dispute_link\n\t);\n\n\t### notify disputee\n\n\t$subject_message = sprintf( __( \"User %s opened a dispute on - %s -\", APP_TD ), $disputer->display_name, $project_link );\n\n\t$content = sprintf(\n\t\t__( 'Hello %2$s,%1$s\n\t\tUser \\'%3$s\\' does not agree with your decision on %4$s and has opened a dispute.', APP_TD ),\n\t\t\"\\r\\n\\r\\n\", $disputee->display_name, $disputer->display_name, $project_link\n\t) . $note;\n\n\t$content .= \"\\r\\n\\r\\n\" . sprintf( __( \"Visit the project %s.\", APP_TD ), $workspace_link );\n\n\t$participant = array(\n\t\t'recipient' => $disputee->ID,\n\t\t'message' => $subject_message,\n\t\t'send_mail' => array(\n\t\t\t'content' => wpautop( $content ),\n\t\t),\n\t\t'meta' => array(\n\t\t\t'subject' => wp_strip_all_tags( $subject_message ),\n\t\t\t'project_id' => $project->ID,\n\t\t\t'action' => hrb_get_workspace_url( $workspace->ID ),\n\t\t),\n\t);\n\n\tappthemes_send_notification( $participant['recipient'], $participant['message'], 'action', $participant['meta'], array( 'send_mail' => $participant['send_mail'] ) );\n\n\n\t### notify disputer\n\n\t$subject_message = sprintf( __( \"Your dispute on - %s - is now open\", APP_TD ), $project_link );\n\n\t$content = \"\\r\\n\\r\\n\" . sprintf(\n\t\t__( 'Hello %2$s,%1$s\n\t\tYour dispute on %3$s is now open.', APP_TD ),\n\t\t\"\\r\\n\\r\\n\", $disputer->display_name, $project_link\n\t) . $note;\n\n\t$content .= \"\\r\\n\\r\\n\" . sprintf( __( \"Visit the project %s.\", APP_TD ), $workspace_link );\n\n\t$participant = array(\n\t\t'recipient' => $disputer->ID,\n\t\t'message' => $subject_message,\n\t\t'send_mail' => array(\n\t\t\t'content' => wpautop( $content ),\n\t\t),\n\t\t'meta' => array(\n\t\t\t'subject' => wp_strip_all_tags( $subject_message ),\n\t\t\t'project_id' => $project->ID,\n\t\t\t'action' => hrb_get_workspace_url( $workspace->ID ),\n\t\t),\n\t);\n\n\tappthemes_send_notification( $participant['recipient'], $participant['message'], 'notification', $participant['meta'], array( 'send_mail' => $participant['send_mail'] ) );\n}", "title": "" }, { "docid": "3d9605d3c9fbaf2c620032f752969587", "score": "0.54369867", "text": "function update_notices() {\r\n\t\tglobal $hook_suffix;\r\n\t\tif( isset( $this->menus['parent_slug'] ) && 'options-general.php' == $this->menus['parent_slug'] )\r\n\t\t\treturn;\r\n\t\tif( $hook_suffix == $this->hook_suffix && 'options' != $this->menus['type'] )\r\n\t\t\tsettings_errors();\r\n\t}", "title": "" }, { "docid": "20afb192632d9dffd668c1cd2664fae8", "score": "0.54144096", "text": "function testBugsnagNotify()\n {\n error_reporting(-1);\n bugsnag_mini_notify(new Exception(\"This is a test. This is only a test.\"));\n }", "title": "" }, { "docid": "998c95874f9a48cdc04d9562cc9c9cc6", "score": "0.533634", "text": "function _hrb_dispute_comment_notify_parties( $id, $comment ) {\n\n\tif ( ! hrb_is_disputes_enabled() ) {\n\t\treturn;\n\t}\n\n\tif ( key( appthemes_disputes_get_args( 'comment_type' ) ) != $comment->comment_type ) {\n\t\treturn;\n\t}\n\n\t$dispute = get_post( $comment->comment_post_ID );\n\t$workspace = appthemes_get_dispute_p2p_post( $comment->comment_post_ID );\n\n\t$dispute_admin_link = html_link( add_query_arg( array( 'post' => $dispute->ID, 'action' => 'edit' ), admin_url( 'post.php' ) ), __( 'dispute.', APP_TD ) );\n\t$dispute_link = html_link( hrb_get_workspace_url( $workspace->ID ) . '#disputes', $dispute->post_title );\n\n\t$author = get_user_by( 'id', $comment->user_id );\n\n\t$participants = hrb_p2p_get_workspace_participants( $workspace->ID, array( 'connected_meta' => array( 'type' => array( 'employer', 'worker' ) ) ) );\n\t$participants = $participants->results;\n\n\t// notify admin\n\t$participants[] = get_user_by( 'id', 1 );\n\n\t### notify participants and admin\n\n\tforeach( $participants as $participant ) {\n\n\t\tif ( $participant->ID == $author->ID ) continue;\n\n\t\t$subject_message = sprintf( __( 'New comment from \\'%1$s\\' on dispute - %2$s -', APP_TD ), $author->display_name, $dispute_link );\n\n\t\t$content = sprintf(\n\t\t\t__( 'Hello %2$s,%1$s\n\t\t\tThere\\'s a new comment from \\'%3$s\\' on %4$s:%1$s\n\t\t\t%5$s', APP_TD ), \"\\r\\n\\r\\n\", $participant->display_name, $author->display_name, ( user_can( $participant, 'admin_options' ) ? $dispute_admin_link : $dispute_link ), $comment->comment_content\n\t\t);\n\n\t\t$participant = array(\n\t\t\t'recipient' => $participant->ID,\n\t\t\t'message' => $subject_message,\n\t\t\t'send_mail' => array(\n\t\t\t\t'content' => wpautop( $content ),\n\t\t\t),\n\t\t\t'meta' => array(\n\t\t\t\t'subject' => wp_strip_all_tags( $subject_message ),\n\t\t\t\t'action' => hrb_get_workspace_url( $workspace->ID ) . '#disputes',\n\t\t\t),\n\t\t);\n\n\t\tappthemes_send_notification( $participant['recipient'], $participant['message'], 'action', $participant['meta'], array( 'send_mail' => $participant['send_mail'] ) );\n\t}\n\n}", "title": "" }, { "docid": "5ee8ad2daec0df58ff4b3c8636c83fad", "score": "0.5306778", "text": "function ciniki_bugs_bugUpdate(&$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 'bug_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Bug'), \n 'type'=>array('required'=>'no', 'blank'=>'no', 'name'=>'Type', 'validlist'=>array('1', '2', '3')),\n 'priority'=>array('required'=>'no', 'blank'=>'no', 'name'=>'Type', 'validlist'=>array('10','30','50')),\n 'status'=>array('required'=>'no', 'blank'=>'no', 'name'=>'Status', 'validlist'=>array('1', '60')),\n 'subject'=>array('required'=>'no', 'blank'=>'no', 'name'=>'Subject'), \n 'category'=>array('required'=>'no', 'blank'=>'no', 'name'=>'Category'), \n 'options'=>array('required'=>'no', 'blank'=>'no', 'name'=>'Flags'), \n 'assigned'=>array('required'=>'no', 'blank'=>'yes', 'type'=>'idlist', 'name'=>'Assigned'),\n 'followup'=>array('required'=>'no', 'default'=>'', 'blank'=>'yes', 'name'=>'Followup'), \n 'notesfollowup'=>array('required'=>'no', 'default'=>'', 'blank'=>'yes', 'name'=>'Notes'), \n )); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n $args = $rc['args'];\n \n // \n // Make sure this module is activated, and\n // check permission to run this function for this tenant\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'bugs', 'private', 'checkAccess');\n $rc = ciniki_bugs_checkAccess($ciniki, $args['tnid'], 'ciniki.bugs.bugUpdate', $args['bug_id'], $ciniki['session']['user']['id']); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n\n // \n // Turn off autocommit\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', 'dbQuote');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbUpdate');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbAddModuleHistory');\n $rc = ciniki_core_dbTransactionStart($ciniki, 'ciniki.bugs');\n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectUpdate');\n $rc = ciniki_core_objectUpdate($ciniki, $args['tnid'], 'ciniki.bugs.bug', $args['bug_id'], $args, 0x04);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Check if the assigned users has changed\n //\n if( isset($args['assigned']) && is_array($args['assigned']) ) {\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbQueryList');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'threadRemoveUserPerms');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'threadAddUserPerms');\n //\n // Get the list of currently assigned users\n //\n $strsql = \"SELECT user_id \"\n . \"FROM ciniki_bug_users \"\n . \"WHERE bug_id = '\" . ciniki_core_dbQuote($ciniki, $args['bug_id']) . \"' \"\n . \"AND (perms&0x02) = 2 \"\n . \"\";\n $rc = ciniki_core_dbQueryList($ciniki, $strsql, 'ciniki.bugs', 'users', 'user_id');\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.bugs.15', 'msg'=>'Unable to load bug user information', 'err'=>$rc['err']));\n }\n $task_users = $rc['users'];\n // \n // Remove users no longer assigned\n //\n $to_be_removed = array_diff($task_users, $args['assigned']);\n if( is_array($to_be_removed) ) {\n foreach($to_be_removed as $user_id) {\n $rc = ciniki_core_threadRemoveUserPerms($ciniki, 'ciniki.bugs', 'user', \n $args['tnid'], 'ciniki_bug_users', 'ciniki_bug_history', \n 'bug', $args['bug_id'], $user_id, 0x02);\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.bugs.16', 'msg'=>'Unable to update bug user information', 'err'=>$rc['err']));\n }\n }\n }\n $to_be_added = array_diff($args['assigned'], $task_users);\n if( is_array($to_be_added) ) {\n foreach($to_be_added as $user_id) {\n $rc = ciniki_core_threadAddUserPerms($ciniki, 'ciniki.bugs', 'user', \n $args['tnid'], 'ciniki_bug_users', 'ciniki_bug_history',\n 'bug', $args['bug_id'], $user_id, (0x02));\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.bugs.17', 'msg'=>'Unable to update bug information', 'err'=>$rc['err']));\n }\n }\n }\n }\n\n //\n // Check if there is a followup, but after we have adjusted the assigned users\n // so any new users get the unviewed flag set\n //\n if( isset($args['followup']) && $args['followup'] != '' ) {\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'threadAddFollowup');\n $rc = ciniki_core_threadAddFollowup($ciniki, 'ciniki.bugs', 'followup', $args['tnid'], \n 'ciniki_bug_followups', 'ciniki_bug_history', 'bug', $args['bug_id'], array(\n 'user_id'=>$ciniki['session']['user']['id'],\n 'bug_id'=>$args['bug_id'],\n 'content'=>$args['followup']\n ));\n if( $rc['stat'] != 'ok' ) {\n ciniki_core_dbTransactionRollback($ciniki, 'ciniki.bugs');\n return $rc;\n }\n\n //\n // Get the subject\n //\n $strsql = \"SELECT subject \"\n . \"FROM ciniki_bugs \"\n . \"WHERE tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"AND id = '\" . ciniki_core_dbQuote($ciniki, $args['bug_id']) . \"' \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQuery');\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.bugs', 'bug');\n if( $rc['stat'] != 'ok' || !isset($rc['bug']) || !is_array($rc['bug']) ) {\n return $rc;\n }\n $bug = $rc['bug'];\n\n //\n // Notify the other users on this thread there was an update.\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'threadNotifyUsers');\n $rc = ciniki_core_threadNotifyUsers($ciniki, 'ciniki.bugs', 'ciniki_bug_users', 'bug', \n $args['bug_id'], 0x01, \n $ciniki['session']['user']['display_name'] . \" replied to bug #\" . $args['bug_id'] . ': ' . $bug['subject'], \n $args['followup'] . \"\\n\\n\"\n );\n }\n\n //\n // Check if there is a private notes followup\n //\n if( isset($args['notesfollowup']) && $args['notesfollowup'] != '' ) {\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'threadAddFollowup');\n $rc = ciniki_core_threadAddFollowup($ciniki, 'ciniki.bugs', 'followup', $args['tnid'], \n 'ciniki_bug_notes', 'ciniki_bug_history', 'bug', $args['bug_id'], array(\n 'user_id'=>$ciniki['session']['user']['id'],\n 'bug_id'=>$args['bug_id'],\n 'content'=>$args['notesfollowup']\n ));\n if( $rc['stat'] != 'ok' ) {\n ciniki_core_dbTransactionRollback($ciniki, 'ciniki.bugs');\n return $rc;\n }\n }\n\n //\n // Commit the database changes\n //\n $rc = ciniki_core_dbTransactionCommit($ciniki, 'ciniki.bugs');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\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'], 'ciniki', 'bugs');\n\n return array('stat'=>'ok');\n}", "title": "" }, { "docid": "94da535389abf41a877b462cc531bc92", "score": "0.5228222", "text": "function html_button_bug_create_child( $p_bug_id ) {\n\tif( access_has_bug_level( config_get( 'update_bug_threshold' ), $p_bug_id ) ) {\n\t\thtml_button( string_get_bug_report_url(), lang_get( 'create_child_bug_button' ), array( 'm_id' => $p_bug_id ) );\n\t}\n}", "title": "" }, { "docid": "a9fc35ed368703c4e9b683721de14e7f", "score": "0.5227203", "text": "public function notify()\n {\n }", "title": "" }, { "docid": "04d2bc44ead5885911fa242040891b8f", "score": "0.5212911", "text": "function access_ensure_can_reopen_bug( $p_bug_id, $p_user_id=null ) {\r\n\t\tif ( !access_can_reopen_bug( $p_bug_id, $p_user_id ) ) {\r\n\t\t\taccess_denied();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "e538ddd62b93e244c04672358a1b9405", "score": "0.5187231", "text": "function hrb_dispute_opened_notify_admin( $dispute_id ) {\n\n\t$dispute = get_post( $dispute_id );\n\n\t$disputer = get_user_by( 'id', $dispute->post_author );\n\n\t$dispute_link = html_link( add_query_arg( array( 'post' => $dispute_id, 'action' => 'edit' ), admin_url( 'post.php' ) ), __( 'dispute.', APP_TD ) );\n\t$disputes_link = html_link( add_query_arg( array( 'post_type' => APP_DISPUTE_PTYPE, 'post_status' => 'publish' ), admin_url( 'edit.php' ) ), __( 'View all open disputes.', APP_TD ) );\n\n\t$subject = sprintf( __( '[%s] A new dispute was opened', APP_TD ), get_bloginfo( 'name' ) );\n\n\t$content = sprintf(\n\t\t__( 'Hello,%1$s\n\t\tA new %2$s was opened by \\'%3$s\\'.%1$s%1$s\n\t\tPlease review it and decide accordingly.%1$s%1$s\n\t\t%4$s', APP_TD ), \"\\r\\n\\r\\n\", $dispute_link, $disputer->display_name, $disputes_link\n\t);\n\n\tappthemes_send_email( get_option( 'admin_email' ), $subject, wpautop( $content ) );\n}", "title": "" }, { "docid": "b60b50805648b1647f7065867fd5d954", "score": "0.51862824", "text": "public function notify()\n {\n\n }", "title": "" }, { "docid": "b883f49ffed00e677f8c36514e33c6b1", "score": "0.516844", "text": "public function notifyError(){\n\n }", "title": "" }, { "docid": "4e9683b74e39038734164359cb9de526", "score": "0.51220024", "text": "public function notify();", "title": "" }, { "docid": "34176fa720affc15738d8653f7d622c3", "score": "0.508605", "text": "function bugreport_fix($entity, $ajax) {\n\n //permission check need\n $result = array('#type' => 'ajax');\n if ($entity->fixed == 0) {\n $entity->fixed = 1;\n $result['#commands'][] = ajax_command_replace('.foundbug_fix#' . $entity->id, '<div id=' . $entity->id . ' class=\"foundbug_fixed\">fixed</div>');\n }\n else {\n $entity->fixed = 0;\n $result['#commands'][] = ajax_command_replace('.foundbug_fixed#' . $entity->id, '<div id=' . $entity->id . ' class=\"foundbug_fix\">fix</div>');\n }\n entity_get_controller('bugreport')->save($entity);\n\n\n return $result;\n}", "title": "" }, { "docid": "9d18e96cff39af499ef2f854363a8527", "score": "0.50839865", "text": "public function updateBugEmail($bug_id){\n\t\t/** Get All Mods and Admins Emails **/\n\t\t$email_mods_admins = $this->db->select(\"\n\t\t\tSELECT userID\n\t\t\tFROM \".PREFIX.\"users_groups\n\t\t\tWHERE groupID = :where_id1\n\t\t\tOR groupID = :where_id2\n\t\t\",\n\t\tarray(':where_id1' => '3', ':where_id2' => '4'));\n\t\tforeach ($email_mods_admins as $row) {\n\t\t\t$email_mods_admins_addy[] = $this->db->select(\"\n\t\t\t\tSELECT email\n\t\t\t\tFROM \".PREFIX.\"users\n\t\t\t\tWHERE userID = :where_id\n\t\t\t\tLIMIT 1\n\t\t\t\",\n\t\t\tarray(':where_id' => $row->userID));\n\t\t}\n\t\t/** Get Bug Information **/\n\t\t$bug_data = self::getBug($bug_id);\n\t\t/** Get Bug Type for display **/\n\t\t$type = $bug_data[0]->type;\n\t\tif($type == 'Bug'){\n\t\t\t$bug_type = 'Bug';\n\t\t}else if($type == 'Doc'){\n\t\t\t$bug_type = 'Documentation';\n\t\t}else if($type == 'Dup'){\n\t\t\t$bug_type = 'Duplicate';\n\t\t}else if($type == 'Enh'){\n\t\t\t$bug_type = 'Enhancement';\n\t\t}else if($type == 'Hel'){\n\t\t\t$bug_type = 'Help Wanted';\n\t\t}else if($type == 'Inv'){\n\t\t\t$bug_type = 'Invalid';\n\t\t}else if($type == 'Que'){\n\t\t\t$bug_type = 'Question';\n\t\t}else if($type == 'Won'){\n\t\t\t$bug_type = \"Won't Fix\";\n\t\t}\n\t\t/** Get Submitter User Name **/\n\t\t$updater = $this->db->select(\"\n\t\t\tSELECT username\n\t\t\tFROM \".PREFIX.\"users\n\t\t\tWHERE userID = :where_id\n\t\t\tLIMIT 1\n\t\t\",\n\t\tarray(':where_id' => $bug_data[0]->modifi_userID));\n\t\t/** Get Assigned User Name **/\n\t\t$assigned = $this->db->select(\"\n\t\t\tSELECT username, email\n\t\t\tFROM \".PREFIX.\"users\n\t\t\tWHERE userID = :where_id\n\t\t\tLIMIT 1\n\t\t\",\n\t\tarray(':where_id' => $bug_data[0]->assigned_userID));\n\t\t/** Check if Email Settings are set **/\n\t\t$site_mail_setting = EMAIL_FROM_NAME;\n\t\tif(!empty($site_mail_setting)){\n\t\t\t/** EMAIL MESSAGE USING PHPMAILER **/\n\t\t\t$mail = new Helpers\\Mail();\n\t\t\t$mail->setFrom(SITEEMAIL, EMAIL_FROM_NAME);\n\t\t\t$mail->addBCC($email_user[0]->email);\n\t\t\tforeach($email_mods_admins_addy as $row){\n\t\t\t\t$mail->addBCC($row[0]->email);\n\t\t\t}\n\t\t\t$mail->addBCC($assigned[0]->email);\n\t\t\t$mail_subject = SITE_TITLE . \" - BugTracker Update - \".$bug_data[0]->summary;\n\t\t\t$mail->subject($mail_subject);\n\t\t\t$body = \\Helpers\\PageFunctions::displayEmailHeader();\n\t\t\t$body .= \"<h1>\".SITE_TITLE.\" - BugTracker Notification </h1>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<hr/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<b>Bug update submitted by \".$updater[0]->username.\" to BugTracker on \".SITE_TITLE.\"</b>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<hr/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<b>Summary</b>: \".$bug_data[0]->summary.\"<br/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<b>Package</b>: \".$bug_data[0]->version.\"<br/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<b>Version</b>: \".$bug_data[0]->version.\"<br/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<b>Server Information</b>: \".$bug_data[0]->server.\"<br/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<b>Type</b>: \".$bug_type.\"<br/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<b>Folder Location</b>: \".$bug_data[0]->folder.\"<hr/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<b>Status</b>: \".$bug_data[0]->status.\"<br/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<b>Priority</b>: \".$bug_data[0]->priority.\"<br/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<b>Assigned User</b>: \".$assigned[0]->username.\"<br/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<hr/>\";\n\t\t\t$body .= \"You may view bug details at: <a href=\\\"\".SITE_URL.\"BugTracker/View/\".$bug_id.\"\\\">View \".$bug_data[0]->id.\"</a>\";\n\t\t\t$body .= \\Helpers\\PageFunctions::displayEmailFooter();\n\t\t\t$mail->body($body);\n\t\t\t$mail->send();\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "e8e1e1c9b87e2084f38a1b41b9642dd5", "score": "0.50668347", "text": "function send_followup_mails( $f_bug_id, $f_bugnote_text )\n{\n\tglobal $AppUI, $dPconfig;\n\t\n\t$t_bug_table = config_get( 'mantis_bug_table' );\n\t\n\t// Traigo los mails \n\t$query = \"SELECT email, name FROM btpsa_email_followup WHERE bug_id='\".$f_bug_id.\"' \";\n\t$result = db_query($query);\n\n\t$cantidad = db_num_rows($result);\n\t\n\tif($cantidad>0)\n\t{\n\t // Traigo los datos de la incidencia para armar el mensaje\n\t $query_bug = \"SELECT b.summary, b.reporter_id, b.handler_id, b.project_id , p.project_email_support, concat( u.user_last_name , ' ', u.user_first_name) as handler , u.user_job_title, t.description \n\t\t\t FROM \".$t_bug_table.\" as b, projects as p, users as u, btpsa_bug_text_table as t\n\t\t\t WHERE b.id='\".$f_bug_id.\"'\n\t\t\t AND p.project_id = b.project_id\n\t\t\t AND u.user_id = b.handler_id\n\t\t\t AND t.id = b.id\";\n\t //echo \"<pre>$query_bug</pre>\";\n $result_bug = db_query($query_bug);\n\t $data_bug = db_fetch_array($result_bug);\n\t \n\t $sql_handler = \"SELECT concat( user_last_name , ' ', user_first_name) as handler, user_job_title, user_email FROM users WHERE user_id='\".$AppUI->user_id.\"' \";\n\t \t//echo \"<pre>$sql_handler </pre>\";\n\t $result_handler = db_query($sql_handler);\n\t $data_handler = db_fetch_array($result_handler);\n\t \t\n\t $handler = $data_handler['handler'];\n\t $user_job_title = $data_handler['user_job_title'];\n\t $sender_email = $data_handler['user_email'];\n\t \n\t $summary = $data_bug['summary'];\n\t $resolution_text = utf8_encode($f_bugnote_text); \n\t \n\t $subject = $summary;\n\t $message = \"\";\n\t \n\t // Recorro la lista de mails a enviar\n\t while($row = db_fetch_array($result)) \n\t {\n\t \t$receptor = $row['email'];\n\t \t\n\t \t$sxml.= \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?><publicaciones>\";\n\t \t$sxml.= \"<publicacion>\";\n\t \t$sxml.=\"<logo><![CDATA[\".$dPconfig['base_url'].\"/images/logo_calista.jpg]]></logo>\";\n\t \t$sxml.=\"<namereceptor><![CDATA[\".$row['name'].\"]]></namereceptor>\";\n\t $sxml.=\"<resolutiontext><![CDATA[\".$resolution_text.\"]]></resolutiontext>\";\n\t $sxml.=\"<handler><![CDATA[\".$handler.\"]]></handler>\";\n\t $sxml .=\"<cargousuario><![CDATA[\".$user_job_title.\"]]></cargousuario>\";\n\t\t$sxml.= \"</publicacion>\";\n\t\t$sxml.= \"</publicaciones>\";\n\t\t\n\t\t# LOAD XML FILE \n\t\t$XML = new DOMDocument(); \n\t\t$XML->loadXML( $sxml ); \n\t\t\n $XSL = new DOMDocument('1.0','UTF-8'); \n $XSL->loadXML(file_get_contents($dPconfig['root_dir'].'/modules/webtracking/bug_followup_email.xsl')); \n $XSL->documentURI = $dPconfig['root_dir'].'/modules/webtracking/bug_followup_email.xsl'; \n\t\t\n\t\t$xslt = new XSLTProcessor(); \n\t\t$xslt->importStylesheet( $XSL ); \n\t\t\n\t\t#PRINT \n\t\t$message = $xslt->transformToXML( $XML ); \n\t\t\n\t\t$recipients[] =$receptor;\n\t\t$subjects[] = $subject;\n\t\t$messages[] = $message;\n\t\t\n\t }\n\t \n\t if(is_array($recipients))\n\t foreach ($recipients as $i => $recipient) {\n\t\t $message = $messages[$i];\n\t\t $subject = $subjects[$i];\n\t\t \n\t\t if ($sender_email==\"\"){ $sender_email =$dPconfig['mailfrom']; }\n\t\t \n\t\t $sender_email = \"$handler <$sender_email>\";\n\t\t \n\t\t echo \"sender mail: $sender_email <br>\";\n\t\t echo \"Mail por defecto: \".$dPconfig['mailfrom'].\"<br>\";\n\t\t echo \"Destinatario: \".$recipient.\"<br>\";\n\t\t echo \"Message: \".$message; \n\t\t \n\t\t $m= new Mail;\n\t\t $m->From($sender_email); \n\t\t $m->To($recipient);\n\t\t $m->Subject($subject,\"utf-8\");\n\t\t $m->IsHtml(true);\n\t\t $m->Body($message);\n\t\t $m->Send();\n\t }\n\n \n\t}else{\n\t\treturn;\n\t}\n}", "title": "" }, { "docid": "b4b7f98b54e7951007780f91d54b16a7", "score": "0.5028498", "text": "public function notify() {\n\n\t\tif ( empty( $this->conflict ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tWP::add_admin_notice(\n\t\t\t\\sprintf( /* translators: %1$s - Plugin name causing conflict; %2$s - Plugin name causing conflict. */\n\t\t\t\t\\esc_html__( 'Heads up! WP Mail SMTP has detected %1$s is activated. Please deactivate %2$s to prevent conflicts.', 'wp-mail-smtp' ),\n\t\t\t\t$this->get_conflict_name(),\n\t\t\t\t$this->get_conflict_name()\n\t\t\t),\n\t\t\tWP::ADMIN_NOTICE_WARNING\n\t\t);\n\t}", "title": "" }, { "docid": "e70c951e3172e7b861bbabf36743a956", "score": "0.49702325", "text": "function mail_bug_updates($bug, $in, $from, $ncomment, $edit = 1, $id = false)\n{\n global $tla, $bug_types, $siteBig, $site_method, $site_url, $basedir;\n\n $text = [];\n $headers = [];\n $changed = bug_diff($bug, $in);\n $from = str_replace([\"\\n\", \"\\r\"], '', $from);\n\n /* Default addresses */\n list($mailto, $mailfrom, $bcc, $params) = get_package_mail(oneof(@$in['package_name'], $bug['package_name']), $id, oneof(@$in['bug_type'], $bug['bug_type']));\n\n $headers[] = [' ID', $bug['id']];\n\n switch ($edit) {\n case 4:\n $headers[] = [' Patch added by', $from];\n $from = \"\\\"{$from}\\\" <{$mailfrom}>\";\n break;\n case 3:\n $headers[] = [' Comment by', $from];\n $from = \"\\\"{$from}\\\" <{$mailfrom}>\";\n break;\n case 2:\n $from = spam_protect(txfield('email', $bug, $in), 'text');\n $headers[] = [' User updated by', $from];\n $from = \"\\\"{$from}\\\" <{$mailfrom}>\";\n break;\n default:\n $headers[] = [' Updated by', $from];\n }\n\n $fields = [\n 'email' => 'Reported by',\n 'sdesc' => 'Summary',\n 'status' => 'Status',\n 'bug_type' => 'Type',\n 'package_name' => 'Package',\n 'php_os' => 'Operating System',\n 'php_version' => 'PHP Version',\n 'assign' => 'Assigned To',\n 'block_user_comment' => 'Block user comment',\n 'private' => 'Private report',\n 'cve_id' => 'CVE-ID',\n ];\n\n foreach ($fields as $name => $desc) {\n $prefix = ' ';\n if (isset($changed[$name])) {\n $headers[] = [\"-{$desc}\", $changed[$name]['from']];\n $prefix = '+';\n }\n\n /* only fields that are set get added. */\n if ($f = txfield($name, $bug, $in)) {\n if ($name == 'email') {\n $f = spam_protect($f, 'text');\n }\n $foo = isset($changed[$name]['to']) ? $changed[$name]['to'] : $f;\n $headers[] = [$prefix.$desc, $foo];\n }\n }\n\n /* Make header output aligned */\n $maxlength = 0;\n $actlength = 0;\n foreach ($headers as $v) {\n $actlength = strlen($v[0]) + 1;\n $maxlength = (($maxlength < $actlength) ? $actlength : $maxlength);\n }\n\n /* Align header content with headers (if a header contains more than one line, wrap it intelligently) */\n $header_text = '';\n\n $spaces = str_repeat(' ', $maxlength + 1);\n foreach ($headers as $v) {\n $hcontent = wordwrap($v[1], 72 - $maxlength, \"\\n{$spaces}\"); // wrap and indent\n $hcontent = rtrim($hcontent); // wordwrap may add spacer to last line\n $header_text .= str_pad($v[0] . ':', $maxlength) . \" {$hcontent}\\n\";\n }\n\n if ($ncomment) {\n# $ncomment = preg_replace('#<div class=\"changeset\">(.*)</div>#sUe', \"ltrim(strip_tags('\\\\1'))\", $ncomment);\n $ncomment = preg_replace_callback('#<div class=\"changeset\">(.*)</div>#sU', function ($m) { return ltrim(strip_tags($m[0])); }, $ncomment);\n\n $text[] = \" New Comment:\\n\\n{$ncomment}\";\n }\n\n $old_comments = get_old_comments($bug['id'], empty($ncomment));\n# $old_comments = preg_replace('#<div class=\"changeset\">(.*)</div>#sUe', \"ltrim(strip_tags('\\\\1'))\", $old_comments);\n $old_comments = preg_replace_callback('#<div class=\"changeset\">(.*)</div>#sU', function ($m) { return ltrim(strip_tags($m[0])); }, $old_comments);\n\n $text[] = $old_comments;\n\n $wrapped_text = join(\"\\n\", $text);\n\n /* user text with attention, headers and previous messages */\n $user_text = <<< USER_TEXT\nATTENTION! Do NOT reply to this email!\nTo reply, use the web interface found at\n{$site_method}://{$site_url}{$basedir}/bug.php?id={$bug['id']}&edit=2\n\n{$header_text}\n{$wrapped_text}\nUSER_TEXT;\n\n /* developer text with headers, previous messages, and edit link */\n $dev_text = <<< DEV_TEXT\nEdit report at {$site_method}://{$site_url}{$basedir}/bug.php?id={$bug['id']}&edit=1\n\n{$header_text}\n{$wrapped_text}\n\n--\nEdit this bug report at {$site_method}://{$site_url}{$basedir}/bug.php?id={$bug['id']}&edit=1\nDEV_TEXT;\n\n if (preg_match('/.*@php\\.net\\z/', $bug['email'])) {\n $user_text = $dev_text;\n }\n\n // Defaults\n $subj = $bug_types[$bug['bug_type']];\n $sdesc = txfield('sdesc', $bug, $in);\n\n /* send mail if status was changed, there is a comment, private turned on/off or the bug type was changed to/from Security */\n if (empty($in['status']) || $in['status'] != $bug['status'] || $ncomment != '' ||\n (isset($in['private']) && $in['private'] != $bug['private']) ||\n (isset($in['bug_type']) && $in['bug_type'] != $bug['bug_type'] &&\n ($in['bug_type'] == 'Security' || $bug['bug_type'] == 'Security'))) {\n if (isset($in['bug_type']) && $in['bug_type'] != $bug['bug_type']) {\n $subj = $bug_types[$bug['bug_type']] . '->' . $bug_types[$in['bug_type']];\n }\n\n $old_status = $bug['status'];\n $new_status = $bug['status'];\n\n if (isset($in['status']) && $in['status'] != $bug['status'] && $edit != 3) { /* status changed */\n $new_status = $in['status'];\n $subj .= \" #{$bug['id']} [{$tla[$old_status]}->{$tla[$new_status]}]\";\n } elseif ($edit == 4) { /* patch */\n $subj .= \" #{$bug['id']} [PATCH]\";\n } elseif ($edit == 3) { /* comment */\n $subj .= \" #{$bug['id']} [Com]\";\n } else { /* status did not change and not comment */\n $subj .= \" #{$bug['id']} [{$tla[$bug['status']]}]\";\n }\n\n // the user gets sent mail with an envelope sender that ignores bounces\n bugs_mail(\n $bug['email'],\n \"{$subj}: {$sdesc}\",\n $user_text,\n \"From: {$siteBig} Bug Database <{$mailfrom}>\\n\" .\n \"Bcc: {$bcc}\\n\" .\n \"X-PHP-Bug: {$bug['id']}\\n\" .\n \"X-PHP-Site: {$siteBig}\\n\" .\n \"In-Reply-To: <bug-{$bug['id']}@{$site_url}>\"\n );\n\n // Spam protection\n $tmp = $edit != 3 ? $in : $bug;\n $tmp['new_status'] = $new_status;\n $tmp['old_status'] = $old_status;\n foreach (['bug_type', 'php_version', 'package_name', 'php_os'] as $field) {\n $tmp[$field] = strtok($tmp[$field], \"\\r\\n\");\n }\n\n // but we go ahead and let the default sender get used for the list\n bugs_mail(\n $mailto,\n \"{$subj}: {$sdesc}\",\n $dev_text,\n \"From: {$from}\\n\".\n \"X-PHP-Bug: {$bug['id']}\\n\" .\n \"X-PHP-Site: {$siteBig}\\n\" .\n \"X-PHP-Type: {$tmp['bug_type']}\\n\" .\n \"X-PHP-Version: {$tmp['php_version']}\\n\" .\n \"X-PHP-Category: {$tmp['package_name']}\\n\" .\n \"X-PHP-OS: {$tmp['php_os']}\\n\" .\n \"X-PHP-Status: {$tmp['new_status']}\\n\" .\n \"X-PHP-Old-Status: {$tmp['old_status']}\\n\" .\n \"In-Reply-To: <bug-{$bug['id']}@{$site_url}>\",\n $params\n );\n }\n\n /* if a developer assigns someone else, let that other person know about it */\n if ($edit == 1 && $in['assign'] && $in['assign'] != $bug['assign']) {\n\n $email = $in['assign'] . '@php.net';\n\n // If the developer assigns him self then skip\n if ($email == $from) {\n return;\n }\n\n bugs_mail(\n $email,\n $bug_types[$bug['bug_type']] . ' #' . $bug['id'] . ' ' . txfield('sdesc', $bug, $in),\n \"{$in['assign']} you have just been assigned to this bug by {$from}\\n\\n{$dev_text}\",\n \"From: {$from}\\n\" .\n \"X-PHP-Bug: {$bug['id']}\\n\" .\n \"In-Reply-To: <bug-{$bug['id']}@{$site_url}>\"\n );\n }\n}", "title": "" }, { "docid": "76761b99fef5e60aed11b98d72b4810f", "score": "0.49639845", "text": "function access_ensure_can_close_bug( $p_bug_id, $p_user_id=null ) {\r\n\t\tif ( !access_can_close_bug( $p_bug_id, $p_user_id ) ) {\r\n\t\t\taccess_denied();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "ee253a8601a69cb7a54ed8f3efa2be09", "score": "0.49435982", "text": "function sig_handler($signo) {\n global $pids, $pidFile, $log;\n\n $log->debug(\"Received signal: $signo\");\n\n if ($signo == SIGTERM || $signo == SIGHUP || $signo == SIGINT){\n // If we are being restarted or killed, quit all children\n\n /*\n * Look for zombie processes that have exited on their own.\n * pcntl_waitpid will return the PID that exited, or 0 or ERROR.\n * WNOHANG means do not sit and wait if the child is not ready for us\n * to clean up immediately. The first param -1 means any child of the current process.\n */\n $deadAndGone = pcntl_waitpid(-1, $status, WNOHANG);\n while($deadAndGone > 0){\n // Remove the gone pid from the array\n unset($pids[array_search($deadAndGone, $pids)]);\n $log->debug(\"netricd: Cleaned up dead process: $deadAndGone\");\n\n // Look for another one\n $deadAndGone = pcntl_waitpid(-1, $status, WNOHANG);\n }\n\n // Send the same signal to the children which we recieved\n foreach($pids as $p) {\n $log->debug(\"\\tKilling child $p\");\n posix_kill($p,$signo);\n }\n\n // Women and Children first (wait for them to exit)\n foreach($pids as $p) {\n $log->debug(\"\\tWaiting for child $p\");\n pcntl_waitpid($p,$status);\n $log->debug(\"\\tdone\");\n }\n\n $log->debug(\n \"netricd: Parent [\"\n . getmypid()\n . \"] - all child processes have exited, \"\n . \" now clearing the pid file and exiting.\"\n );\n\n exit();\n } else if($signo == SIGUSR1) {\n print \"netricd: \" . count($pids) . \" children are running\\n\";\n }\n}", "title": "" }, { "docid": "17567d82407f02c0c4334d652df8ab5b", "score": "0.49375862", "text": "public function notification()\n {\n $this->controleurContact->notificationAction();\n }", "title": "" }, { "docid": "1ed9428f2b45a16b608d664c28c0c15d", "score": "0.49362862", "text": "public function signaler() {\r\n $com_report = $this->requete->getParametre(\"id\");\r\n $this->commentaire->reportCommentaire($com_report);\r\n }", "title": "" }, { "docid": "b81990279d7f4d5b73f457f3ae893cb8", "score": "0.49272764", "text": "function sendIssueNotification($issue, $comment, $event_data, $type, $exclude = 0)\n{\n\tglobal $smcFunc, $context, $sourcedir, $modSettings, $user_info, $language, $txt, $memberContext;\n\n\trequire_once($sourcedir . '/Subs-Post.php');\n\n\tif ($type == 'new_comment')\n\t\t$comment['body'] = trim(un_htmlspecialchars(strip_tags(strtr(parse_bbc($comment['body'], false), array('<br />' => \"\\n\", '</div>' => \"\\n\", '</li>' => \"\\n\", '&#91;' => '[', '&#93;' => ']')))));\n\n\tif (empty($comment['body']))\n\t\t$comment['body'] = '';\n\t\t\n\t// Load Versions\n\t$request = $smcFunc['db_query']('', '\n\t\tSELECT id_version, member_groups\n\t\tFROM {db_prefix}project_versions AS ver\n\t\tWHERE id_project = {int:project}',\n\t\tarray(\n\t\t\t'project' => $issue['project'],\n\t\t)\n\t);\n\t\n\t$versions = array();\n\t\n\twhile ($row = $smcFunc['db_fetch_assoc']($request))\n\t\t$versions[$row['id_version']] = explode(',', $row['member_groups']);\n\t$smcFunc['db_free_result']($request);\n\n\t$request = $smcFunc['db_query']('', '\n\t\tSELECT\n\t\t\tmem.id_member, mem.email_address, mem.notify_regularity, mem.notify_send_body, mem.lngfile,\n\t\t\tln.sent, mem.id_group, mem.additional_groups, mem.id_post_group,\n\t\t\tp.id_project, p.member_groups, i.private_issue, IFNULL(dev.id_member, 0) AS is_developer,\n\t\t\ti.subject, i.id_reporter, i.versions\n\t\tFROM {db_prefix}log_notify_projects AS ln\n\t\t\tINNER JOIN {db_prefix}issues AS i ON (i.id_issue = ln.id_issue)\n\t\t\tINNER JOIN {db_prefix}projects AS p ON (p.id_project = i.id_project)\n\t\t\tINNER JOIN {db_prefix}members AS mem ON (mem.id_member = ln.id_member)\n\t\t\tLEFT JOIN {db_prefix}project_developer AS dev ON (dev.id_project = p.id_project AND dev.id_member = mem.id_member)\n\t\tWHERE ln.id_issue = {int:issue}\n\t\t\tAND mem.is_activated = {int:is_activated}\n\t\t\tAND mem.id_member != {int:poster}\n\t\tORDER BY mem.lngfile',\n\t\tarray(\n\t\t\t'is_activated' => 1,\n\t\t\t'issue' => $issue['id'],\n\t\t\t'poster' => $exclude,\n\t\t\t'any' => '*',\n\t\t)\n\t);\n\n\twhile ($row = $smcFunc['db_fetch_assoc']($request))\n\t{\n\t\tif ($row['id_group'] != 1 && empty($row['is_developer']))\n\t\t{\n\t\t\tif (!empty($row['private_issue']) && $row['id_reporter'] != $row['id_member'])\n\t\t\t\tcontinue;\n\n\t\t\t$p_allowed = explode(',', $row['member_groups']);\n\n\t\t\t$row['additional_groups'] = explode(',', $row['additional_groups']);\n\t\t\t$row['additional_groups'][] = $row['id_group'];\n\t\t\t$row['additional_groups'][] = $row['id_post_group'];\n\n\t\t\t// can see project?\n\t\t\tif (count(array_intersect($p_allowed, $row['additional_groups'])) == 0)\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\t$row['versions'] = explode(',', $row['versions']);\n\t\t\t\n\t\t\t// Can see any of versions?\n\t\t\tif (!empty($row['versions']) && $row['versions'] !== array(0))\n\t\t\t{\n\t\t\t\t$can_see = false;\n\t\t\t\t\n\t\t\t\tforeach ($row['versions'] as $ver)\n\t\t\t\t{\n\t\t\t\t\tif (isset($versions[$ver]) && count(array_intersect($versions[$ver], $row['additional_groups'])) > 0)\n\t\t\t\t\t\t$can_see = true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t\t$can_see = true;\n\n\t\t\tif (!$can_see)\n\t\t\t\tcontinue;\n\t\t}\n\n\t\t$row['subject'] = un_htmlspecialchars($row['subject']);\n\n\t\tloadLanguage('Project', empty($row['lngfile']) || empty($modSettings['userLanguage']) ? $language : $row['lngfile'], false);\n\t\tloadLanguage('ProjectEmail', empty($row['lngfile']) || empty($modSettings['userLanguage']) ? $language : $row['lngfile'], false);\n\n\t\t$update_body = '';\n\n\t\tif (isset($event_data['changes']))\n\t\t{\n\t\t\t$changes = ProjectTools_ChangesParser::Parse($event_data['changes']);\n\t\t\t$update_body = strip_tags(implode(\"\\n\", $changes));\n\t\t}\n\n\t\t$replacements = array(\n\t\t\t'ISSUENAME' => $row['subject'],\n\t\t\t'ISSUELINK' => ProjectTools::get_url(array('issue' => $issue['id'] . '.0'), $row['id_project']),\n\t\t\t'BODY' => $comment['body'],\n\t\t\t'UPDATES' => $update_body,\n\t\t\t'UNSUBSCRIBELINK' => ProjectTools::get_url(array('issue' => $issue['id'] . '.0', 'sa' => 'subscribe'), $row['id_project']),\n\t\t);\n\n\t\tif (!empty($replacements['BODY']))\n\t\t\t$replacements['BODY'] .= \"\\n\\n\" . $update_body;\n\t\telse\n\t\t\t$replacements['BODY'] = $update_body;\n\n\t\tif (isset($comment['id']))\n\t\t\t$replacements['COMMENTLINK'] = ProjectTools::get_url(array('issue' => $issue['id'] . '.com' . $comment['id']), $issue['project']);\n\n\t\tif ($type == 'new_comment' && empty($row['notify_send_body']) && !empty($update_body))\n\t\t{\n\t\t\t$replacements['BODY'] = $update_body;\n\t\t\t$type .= '_body';\n\t\t}\n\n\t\t$emailtype = 'notification_project_' . $type;\n\n\t\t$emaildata = loadEmailTemplate($emailtype, $replacements, '', false);\n\t\tsendmail($row['email_address'], $emaildata['subject'], $emaildata['body'], null, null, false, 4);\n\t}\n\n\t// Back to original language\n\tloadLanguage('Project');\n}", "title": "" }, { "docid": "772192b7149a74b6d56e990b29599d19", "score": "0.49256805", "text": "function postChildEvent() { }", "title": "" }, { "docid": "3671f2a924df1c128ff568547527ed93", "score": "0.4924998", "text": "function send_bug_report($reportdate,$bug_descipt,$other_related,$reg_related,$user_related,$sch_related,$grades_related,$grades_misc_related){\n\tglobal $conn;\n\n\t$message=\"<html><head><title>Bug Report \".$reportdate.\"</title></head><body>\";\n\t$message.=\"Bug Description : <p>\";\n\t$message.= $bug_descipt.\"</p><br/>\";\n\t\n\tif($other_related==1){\n\t\t$reg_related=1;\n\t\t$user_related=1;\n\t\t$sch_related=1;\n\t\t$message.= \"Days : <br/>\";\n\t\t$message.= \"<table cellspacing='4' cellpadding='4' border='1' align='center'>\";\n\t\t$message.= \"<tr><td>ID </td><td> Title </td><td> On/Off </td><td> Num of Schedules </td></tr>\";\n\t\t$q = \"SELECT * FROM days \";\n\t\t$result = mysql_query($q,$conn);\n\t\twhile($row=mysql_fetch_array($result)){\n\t\t\t$day= $row['id']-1;\n\t\t\t$inquery = \"SELECT * FROM schedules WHERE day='\".$day.\"' \";\n\t\t\t$inresult = mysql_query($inquery,$conn);\n\t\t\t$numofsch=mysql_num_rows($inresult);\n\t\t\t\n\t\t\t$message.= \"<tr><td>\".$row['id'].\" </td><td> \".$row['title'].\" </td><td> \".$row['onoff'].\" </td><td> \".$numofsch.\"</td></tr>\";\n\t\t}\n\t\t$message.= \"</table><br/><br/>\";\n\t}\n\t\n\tif($reg_related==1){\n\t\t$user_related=1;\n\t\t$sch_related=1;\n\t\t$message.= \"Student Slots : <br/>\";\n\t\t$message.= \"<table cellspacing='4' cellpadding='4' border='1' align='center'>\";\n\t\t$message.= \"<tr><td>ID </td><td> Username </td><td> Sch_Code </td><td> GroupID</td></tr>\";\n\t\t$q = \"SELECT * FROM studentslots \";\n\t\t$result = mysql_query($q,$conn);\n\t\twhile($row=mysql_fetch_array($result)){\n\t\t\t$inquery = \"SELECT * FROM users WHERE id='\".$row['user_id'].\"' \";\n\t\t\t$inresult = mysql_query($inquery,$conn);\n\t\t\t$inrow=mysql_fetch_array($inresult);\n\t\t\t\n\t\t\t$message.= \"<tr><td>\".$row['id'].\" </td><td> \".$inrow['username'].\" </td><td> \".$row['sch_date_id'].\" </td><td> \".$row['gid'].\"</td></tr>\";\n\t\t}\n\t\t$message.= \"</table><br/><br/>\";\n\t}\n\t\n\tif($user_related == 1){\n\t\t$message.= \"Users : <br/>\";\n\t\t$message.= \"<table cellspacing='4' cellpadding='4' border='1' align='center'>\";\n\t\t$message.= \"<tr><td>Username </td><td> AEM </td><td> Activated </td><td> Type </td><td> Last Name</td></tr>\";\n\t\t$q = \"SELECT username,aem,activated,type,last_name FROM users \";\n\t\t$result = mysql_query($q,$conn);\n\t\twhile($row=mysql_fetch_array($result)){\n\t\t\t$message.= \"<tr><td>\".$row['username'].\" </td><td> \".$row['aem'].\" </td><td> \".$row['activated'].\" </td><td> \".$row['type'].\" </td><td> \".$row['last_name'].\"</td></tr>\";\n\t\t}\n\t\t$message.= \"</table><br/><br/>\";\n\t}\n\t\n\tif($sch_related == 1){\n\t\t$message.= \"Schedules : <br/>\";\n\t\t$q = \"SELECT * FROM schedules\";\n\t\t$result = mysql_query($q,$conn);\n\t\twhile($row=mysql_fetch_array($result)){\n\t\t\t$message.= \"<table cellspacing='4' cellpadding='4' border='1' align='center'>\";\n\t\t\t$message.= \"<tr><td>\".$row['title'].\"</td></tr>\t\t<tr><td>ID: \".$row['id'].\"</td><td>\tGroupID: \".$row['gid'].\"</td><td> Day: \".$row['day'].\"</td></tr>\";\n\t\t\t$message.= \"<tr><td>Made at: \".$row['start_date'].\"</td><td> Deadline: \".$row['fin_date'].\"</td><td> On/Off: \".$row['onoff'].\"</td></tr>\";\n\t\t\t$message.= \"<tr><td>Starts at: \".$row['start_hour'].\":\".$row['start_minute'].\"</td><td> Ends at: \".$row['fin_hour'].\":\".$row['fin_minute'].\"</td><td> With step: \".$row['minutes'].\":\".$row['seconds'].\"</td></tr>\";\n\t\t\tif(isset($row['en_date'])){\n\t\t\t\t$message.= \"<tr><td>Auto enable date: \".$row['en_date'].\"</td><td>hour:\".$row['en_hour'].\"</td></tr>\";\n\t\t\t}else{\n\t\t\t\t$message.= \"<tr><td>No auto enable</td></tr>\";\n\t\t\t}\n\t\t\tif(isset($row['ar_start'])){\n\t\t\t\t$message.= \"<tr><td>Auto reccuring day: \".$row['ar_start'].\"</td><td>Untill:\".$row['ar_fin'].\"</td></tr>\";\n\t\t\t}else{\n\t\t\t\t$message.= \"<tr><td>No auto reccuring</td></tr>\";\n\t\t\t}\n\t\t\t$message.= \"</table><br/>\";\n\t\t}\n\t}\n\t\n\tif($grades_related == 1){\n\t\t$message.= \"Grades : <br/>\";\n\t\t$message.= \"<table cellspacing='4' cellpadding='4' border='1' align='center'>\";\n\t\t$message.= \"<tr><td>lab id </td><td> user id </td><td> class id </td><td> grade </td><td> updated time</td><td> lock grade</td><td> id</td></tr>\";\n\t\t$q = \"SELECT * FROM igrades \";\n\t\t$result = mysql_query($q,$conn);\n\t\twhile($row=mysql_fetch_array($result)){\n\t\t\t$message.= \"<tr><td>\".$row['lab_id'].\" </td><td> \".$row['user_id'].\" </td><td> \".$row['class_id'].\" </td><td> \".$row['grade'].\" </td><td> \".$row['update_time'].\"</td><td> \".$row['lock_grade'].\"</td><td> \".$row['id'].\"</td></tr>\";\n\t\t}\n\t\t$message.= \"</table><br/><br/>\";\n\t}\n\t\n\tif($grades_misc_related == 1){\n\t\t$message.= \"Classes : <br/>\";\n\t\t$message.= \"<table cellspacing='4' cellpadding='4' border='1' align='center'>\";\n\t\t$message.= \"<tr><td>class name</td><td>id </td></tr>\";\n\t\t$q = \"SELECT * FROM iclasses \";\n\t\t$result = mysql_query($q,$conn);\n\t\twhile($row=mysql_fetch_array($result)){\n\t\t\t$message.= \"<tr><td>\".$row['name'].\" </td><td> \".$row['id'].\" </td></tr>\";\n\t\t}\n\t\t$message.= \"</table><br/><br/>\";\n\t\t\n\t\t$message.= \"Labs : <br/>\";\n\t\t$message.= \"<table cellspacing='4' cellpadding='4' border='1' align='center'>\";\n\t\t$message.= \"<tr><td>lab name</td><td>class id</td><td>id</td><td>lock</td><td>lock date</td><td>lock hour</td><td>lock minutes</td><td>multiplier</td></tr>\";\n\t\t$q = \"SELECT * FROM ilabs \";\n\t\t$result = mysql_query($q,$conn);\n\t\twhile($row=mysql_fetch_array($result)){\n\t\t\t$message.= \"<tr><td>\".$row['name'].\" </td><td>\".$row['class_id'].\" </td><td> \".$row['id'].\" </td><td> \".$row['lock'].\" </td><td> \".$row['lock_date'].\" </td><td> \".$row['lock_hour'].\" </td><td> \".$row['lock_minutes'].\" </td><td> \".$row['multiplier'].\" </td></tr>\";\n\t\t}\n\t\t$message.= \"</table><br/><br/>\";\n\t}\n\t\n\t$message.=\"</body></html>\";\n\tbugreport($message,$reportdate);\n}", "title": "" }, { "docid": "17381b9b1573703c04e1fea05495f591", "score": "0.49187145", "text": "public function newBugEmail($bug_id){\n\t\t/** Get All Mods and Admins Emails **/\n\t\t$email_mods_admins = $this->db->select(\"\n\t\t\tSELECT userID\n\t\t\tFROM \".PREFIX.\"users_groups\n\t\t\tWHERE groupID = :where_id1\n\t\t\tOR groupID = :where_id2\n\t\t\",\n\t\tarray(':where_id1' => '3', ':where_id2' => '4'));\n\t\tforeach ($email_mods_admins as $row) {\n\t\t\t$email_mods_admins_addy[] = $this->db->select(\"\n\t\t\t\tSELECT email\n\t\t\t\tFROM \".PREFIX.\"users\n\t\t\t\tWHERE userID = :where_id\n\t\t\t\tLIMIT 1\n\t\t\t\",\n\t\t\tarray(':where_id' => $row->userID));\n\t\t}\n\t\t/** Get Bug Information **/\n\t\t$bug_data = self::getBug($bug_id);\n\t\t/** Get Bug Type for display **/\n\t\t$type = $bug_data[0]->type;\n\t\tif($type == 'Bug'){\n\t\t\t$bug_type = 'Bug';\n\t\t}else if($type == 'Doc'){\n\t\t\t$bug_type = 'Documentation';\n\t\t}else if($type == 'Dup'){\n\t\t\t$bug_type = 'Duplicate';\n\t\t}else if($type == 'Enh'){\n\t\t\t$bug_type = 'Enhancement';\n\t\t}else if($type == 'Hel'){\n\t\t\t$bug_type = 'Help Wanted';\n\t\t}else if($type == 'Inv'){\n\t\t\t$bug_type = 'Invalid';\n\t\t}else if($type == 'Que'){\n\t\t\t$bug_type = 'Question';\n\t\t}else if($type == 'Won'){\n\t\t\t$bug_type = \"Won't Fix\";\n\t\t}\n\t\t/** Get Submitter User Name **/\n\t\t$creator = $this->db->select(\"\n\t\t\tSELECT username\n\t\t\tFROM \".PREFIX.\"users\n\t\t\tWHERE userID = :where_id\n\t\t\tLIMIT 1\n\t\t\",\n\t\tarray(':where_id' => $bug_data[0]->creator_userID));\n\t\t/** Check if Email Settings are set **/\n\t\t$site_mail_setting = EMAIL_FROM_NAME;\n\t\tif(!empty($site_mail_setting)){\n\t\t\t/** EMAIL MESSAGE USING PHPMAILER **/\n\t\t\t$mail = new Helpers\\Mail();\n\t\t\t$mail->setFrom(SITEEMAIL, EMAIL_FROM_NAME);\n\t\t\t$mail->addBCC($email_user[0]->email);\n\t\t\tforeach($email_mods_admins_addy as $row){\n\t\t\t\t$mail->addBCC($row[0]->email);\n\t\t\t}\n\t\t\t$mail_subject = SITE_TITLE . \" - BugTracker New - \".$bug_data[0]->summary;\n\t\t\t$mail->subject($mail_subject);\n\t\t\t$body = \\Helpers\\PageFunctions::displayEmailHeader();\n\t\t\t$body .= \"<h1>\".SITE_TITLE.\" - BugTracker Notification </h1>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<hr/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<b>New Bug submitted by \".$creator[0]->username.\" to BugTracker on \".SITE_TITLE.\"</b>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<hr/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<b>Summary</b>: \".$bug_data[0]->summary.\"<br/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<b>Package</b>: \".$bug_data[0]->version.\"<br/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<b>Version</b>: \".$bug_data[0]->version.\"<br/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<b>Server Information</b>: \".$bug_data[0]->server.\"<br/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<b>Type</b>: \".$bug_type.\"<br/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<b>Folder Location</b>: \".$bug_data[0]->folder.\"<br/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<hr/>\";\n\t\t\t$body .= \"You may view bug details at: <a href=\\\"\".SITE_URL.\"BugTracker/View/\".$bug_id.\"\\\">View \".$bug_data[0]->id.\"</a>\";\n\t\t\t$body .= \\Helpers\\PageFunctions::displayEmailFooter();\n\t\t\t$mail->body($body);\n\t\t\t$mail->send();\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "3827e3f76de3e483e4621e551ffec2d9", "score": "0.49161008", "text": "private function add_bug(&$p_email,$p_overwrite_project_id = FALSE, $p_project_info,\n $p_replyToFromEmail = '', $str2remove = null)\n\t{\n\t $ret = new stdClass();\n\t $ret->isResolved = 0;\n\t $ret->bugID = 0;\n\t $ret->bugIDHit = 0;\n\t \n\t $p_mmpid = $p_project_info['mail_manager'] ? $p_project_info['id'] : 0;\n\t $sender = $p_email['From_parsed']['email']; // 20130110\n\t $original_subject = $p_email['Subject']; // 20130110\n\t $original_cc = $p_email['carbonCopy']; // 20130131\n\t $this->show_memory_usage( 'Start add bug' );\n\n\n // TESI\n\t\t$t_project_id = ( $p_overwrite_project_id === FALSE ) ? $this->_mailbox[ 'project_id' ] : $p_overwrite_project_id;\n\t\t$add_as_note = false;\n \n // TESI - FOR Delsanto request\n\t\t$target = array();\n $target['mantis_begin'] = 'mantis_begin';\n\t\t$target['mantis_end'] = 'mantis_end';\n\t\t$area = array();\n $area['mantis_begin'] = stripos($p_email['X-Mantis-Body'],$target['mantis_begin']);\n\t\t$area['mantis_end'] = stripos($p_email['X-Mantis-Body'],$target['mantis_end']); \t\t\n\t\t\n\t\t$embdata = null;\n\t\tif( ($area['mantis_begin'] !== FALSE) && ($area['mantis_end'] !== FALSE) )\n\t\t{\n\t\t\t$embdata = $this->extractEmbedded($p_email,$t_project_id,$area,$target);\t\n\t\t}\t\n\n\t\tlist($p_email['Subject'],$p_email['FusionReactor']) = $this->build_subject($p_email,$t_project_id);\n\n if ( $this->_mail_add_bugnotes )\n {\n // check if BUGID is present on subject.\n // do not think for Tesi we are going to follow this path\n // IDEA CHANGED!!!\n echo \"\\n (tesi) Standard process to understand (using ticke number on subject) \";\n echo \"\\n (tesi) \" . $p_email['Subject'];\n \n $op = $this->mail_is_a_bugnote($p_email[ 'Subject' ]);\n var_dump($op);\n \n $ret->bugID = $ret->bugIDHit = $op['bug_id'];\n $ret->isResolved = $op['is_resolved'];\n }\n else\n {\n $ret->bugID = $ret->bugIDHit = FALSE;\n }\n\n // TESI\n // For some projects like this regarding application monitoring\n // the choice is to use subject as access key.\n //\n // For projects that we plan to use to manage customer requests\n // we do not want to use this kind of logic.\n //\n if($ret->bugID === false && $p_project_info['mail_get_by_context'])\n {\n $ret->bugID = $this->mail_get_by_context($p_email['Subject'],$t_project_id );\n $add_as_note = intval($ret->bugID) > 0 ? TRUE : FALSE;\n echo \"\\n (tesi) DEBUG WILL ADD AS NOTE ? \" . ($add_as_note ? 'Yes' : 'No');\n \n if($add_as_note)\n {\n $ret->bugIDHit = $ret->bugID ;\n // Because we are working without GUI, do not want trigger error\n $fman_bug = bug_cache_row($ret->bugID,DONT_TRIGGER_ERROR_ON_BUG_NOT_FOUND);\n if( $fman_bug !== FALSE )\n {\n $ret->isResolved = isset($this->resolvedStatusSet[$fman_bug['status']]);\n \n \n if(!$ret->isResolved)\n {\n // Want to add new bug if notes count is too high, because this creates\n // fatal error when trying to insert mail on mail table.\n // MySQL complains with max packate size exceeded \n $c_bug_id = db_prepare_int($ret->bugID);\n $t_bugnote_table = db_get_table( 'mantis_bugnote_table' );\n $query = \"SELECT bugnote_text_id FROM $t_bugnote_table WHERE bug_id=\" . db_param();\n $result = db_query_bound( $query, array($c_bug_id) );\n $bugnote_count = db_num_rows($result);\n echo \"\\n (tesi) \\$bugnote_count:$bugnote_count\";\n if( $bugnote_count > BUGCOUNT_LIMIT_TO_OPEN_NEW )\n {\n // Set original issue as Resolved\n // Open a New ONE\n // \n // bug_resolve($ret->bugID, OPEN, $p_status = null, \n // $p_fixed_in_version = '', $p_duplicate_id = null, \n // $p_handler_id = null, $p_bugnote_text = '', \n // $p_bugnote_private = false, $p_time_tracking = '0:00' );\n $p_bugnote_text = \" Troppe note (limite=\" . BUGCOUNT_LIMIT_TO_OPEN_NEW . \")- Chiusa in automatico \";\n bug_resolve($ret->bugID, OPEN,null,'',null,null, $p_bugnote_text);\n }\n }\n }\n echo \"\\n (tesi) Target Bug ID: $ret->bugIDHit - Hmmm, is resolved? \" . ($ret->isResolved ? 'Yes' : 'No');\n }\n }\n\n\t\t// TESI - 20121220\n if( $ret->isResolved )\n {\n // This way I'm going to force creation of new bug\n $add_as_note = FALSE;\n $ret->bugIDHit = $ret->bugID;\n }\n\n\t\t// TESI\n\t\techo \"\\n (tesi) add_as_note:\" . ($add_as_note ? 1 : 0);\n\t\t$t_bug_id_can_be_used = !$is_resolved &&\n\t\t ($ret->bugID !== FALSE && intval($ret->bugID) > 0 && !bug_is_readonly($ret->bugID));\n\t\t\n\t\tif($add_as_note === FALSE && $t_bug_id_can_be_used)\n\t\t{\n\t\t echo \"\\n (tesi) \" . __LINE__ . \" - Original Plugin ADD NOTE Management \";\n\t\t echo \"\\n (tesi) Issue Exists and IS NOT READ ONLY \";\n\t\t \n\t\t\t// @TODO@ Disabled for now until we find a good solution on how to handle the reporters possible lack of access permissions\n // access_ensure_bug_level( config_get( 'add_bugnote_threshold' ), $f_bug_id );\n\n\t\t\t$t_description = $p_email[ 'X-Mantis-Body' ];\n\n\t\t\t$t_description = $this->identify_replies( $t_description );\n\t\t\t$t_description = $this->apply_mail_save_from( $p_email[ 'From' ], $t_description );\n\n\t\t\t# Event integration\n\t\t\t# Core mantis event already exists within bignote_add function\n\t\t\t$t_bugnote_text = event_signal( 'EVENT_ERP_BUGNOTE_DATA', $t_description,$ret->bugID);\n\t\t\t$t_status = bug_get_field($ret->bugID, 'status' );\n\t\t\tif ( $this->_bug_resolved_status_threshold <= $t_status )\n\t\t\t{\n\t\t\t\t# Reopen issue and add a bug note\n\t\t\t\tbug_reopen($ret->bugID, $t_description);\n\t\t\t}\n\t\t\telseif ( !is_blank( $t_description ) )\n\t\t\t{\n\t\t\t\t# Add a bug note\n\t\t\t\tbugnote_add($ret->bugID, $t_description);\n\t\t\t}\n\t\t}\n\t\telseif ($add_as_note === TRUE && $t_bug_id_can_be_used )\n\t\t{\n\t\t\t// TESI\n\t\t\t//echo '$this->mail_substr'; var_dump($this->mail_substr);\n\t\t\t//echo '$this->mail_substr[' . $t_project_id . ']'; var_dump($this->mail_substr[$t_project_id]);\n\t\t echo \"\\n (tesi) \" . __LINE__ . \" - TESI ADD NOTE Management \";\n\n\t\t\t// if we have another string to search on subject we apply special process.\n\t\t\t$doStandard = true;\n\t\t\tif( isset($this->mail_substr[$p_mmpid][$t_project_id]) )\n\t\t\t{\n\t\t\t\t$msg2write = $this->apply_mail_save_from($p_email['From'],$p_email['X-Mantis-Body']);\n\t\t\t\tlist($doStandard,$dummy,$saveAsAttach) = $this->process_substr($p_email['Subject'],$p_email['FusionReactor'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $msg2write,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $this->mail_substr[$p_mmpid][$t_project_id]);\n\t\t\t}\n\t\t\t\n\t\t\tif( $doStandard )\n\t\t\t{\n\t\t\t\t$dummy = $this->apply_mail_save_from($p_email['From'], $p_email['dateAsString']);\n\t\t\t}\n\t\t\tbugnote_add($ret->bugID, $dummy);\n\t\t\n\t\t\tif($saveAsAttach) // francisco 20121113\n\t\t\t{\n\t\t\t if( !is_null($msg = $this->bruteForceAddFile($ret->bugID,$msg2write) ) )\n\t\t\t {\n\t\t\t bugnote_add($ret->bugID, 'Error Attaching:' . $msg );\n\t\t\t }\n \t\t} \n\t\t}\n\t\telseif ( $this->_mail_add_bug_reports )\n\t\t{\n\t\t\t// @TODO@ Disabled for now until we find a good solution on how to handle the reporters possible lack of access permissions\n // access_ensure_project_level( config_get('report_bug_threshold' ) );\n\t\t\t$f_master_bug_id = ( ($ret->bugID !== FALSE && (intval($ret->bugID) > 0 ) && bug_is_readonly($ret->bugID)) \n\t\t\t ? $ret->bugID : 0 );\n\t\t\t$this->fix_empty_fields( $p_email );\n\n\t\t\t$t_bug_data = new BugData;\n\t\t\t$t_bug_data->build\t\t\t\t\t= '';\n\t\t\t$t_bug_data->platform\t\t\t\t= '';\n\t\t\t$t_bug_data->os\t\t\t\t\t\t= '';\n\t\t\t$t_bug_data->os_build\t\t\t\t= '';\n\t\t\t$t_bug_data->version\t\t\t\t= '';\n\t\t\t$t_bug_data->profile_id\t\t\t\t= 0;\n\t\t\t$t_bug_data->handler_id\t\t\t\t= 0;\n\t\t\t$t_bug_data->view_state\t\t\t\t= $this->_default_bug_view_status;\n\n\t\t\t$t_bug_data->handler_id\t= 0;\n $gofor = 'handler_mail';\n\t\t\tif( isset($embdata['field'][$gofor]) )\n\t\t\t{\n\t\t\t $t_bug_data->handler_id = user_get_id_by_email($embdata['field'][$gofor]); \n\t\t\t}\n\n\n\t\t\t// TESI - Change for EMBEDDED DATA - Delsanto\n\t\t\t$t_bug_data->category_id = 0;\n $gofor = 'category_id';\n\t\t\tif( isset($embdata['field'][$gofor]) )\n\t\t\t{\n\t\t\t $t_bug_data->category_id = $embdata['field'][$gofor];\n\t\t\t}\n\n if($t_bug_data->category_id <= 0)\n {\n\t\t\t // 20130213\n\t\t\t // Check if default category exists in Project\n\t\t\t $t_bug_data->category_id = $this->category_get_by_name($t_project_id,DEFAULT_CATEGORY_NAME);\n\t\t\t}\n\n $t_bug_data->category_id = intval($t_bug_data->category_id);\n if($t_bug_data->category_id <= 0)\n {\n\t\t\t $t_bug_data->category_id = intval($this->_mailbox['global_category_id']);\n\t\t }\n\n\n\n\n\t\t\t$t_bug_data->reproducibility\t\t= $this->_default_bug_reproducibility;\n\t\t\t$t_bug_data->severity\t\t\t\t= $this->_default_bug_severity;\n\t\t\t$t_bug_data->priority\t\t\t\t= $p_email[ 'Priority' ];\n\t\t\t$t_bug_data->projection\t\t\t= $this->_default_bug_projection;\n\t\t\t$t_bug_data->eta\t\t\t\t\t = $this->_default_bug_eta;\n\t\t\t$t_bug_data->resolution\t\t\t= $this->_default_bug_resolution;\n\t\t\t$t_bug_data->status\t\t\t\t\t= $this->_bug_submit_status;\n\t\t\t$t_bug_data->summary\t\t\t\t= $p_email[ 'Subject' ];\n\n\n\t\t\t// TESI\n\t\t\t// if we have another string to search on subject we apply special process.\n\t\t\t$t_bug_data->description = $mgs2write = $this->apply_mail_save_from($p_email['From'], $p_email['X-Mantis-Body']);\n\t\t\tif( isset($this->mail_substr[$p_mmpid][$t_project_id]) )\n\t\t\t{\n\t\t\t\tlist($doStandard,$t_bug_data->description,$saveAsAttach) = $this->process_substr($t_bug_data->summary,\n\t\t $p_email['FusionReactor'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $mgs2write,\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $this->mail_substr[$p_mmpid][$t_project_id]);\n\t\t\t}\n\n\t\t\t$t_bug_data->steps_to_reproduce\t\t= $this->_default_bug_steps_to_reproduce;\n\t\t\t$t_bug_data->additional_information\t= $this->_default_bug_additional_info;\n\t\t\t$t_bug_data->due_date\t\t\t\t= date_get_null();\n\n $t_bug_data->project_id = $t_project_id; // TESI\n\t\t\t$t_bug_data->reporter_id\t\t\t= $p_email[ 'Reporter_id' ];\n\n \t\t# Allow plugins to pre-process bug data\n\t\t\t$t_bug_data = event_signal( 'EVENT_REPORT_BUG_DATA', $t_bug_data );\n\t\t\t$t_bug_data = event_signal( 'EVENT_ERP_REPORT_BUG_DATA', $t_bug_data );\n\n\t\t\t# Create the bug\n\t\t\t$ret->bugID = $t_bug_data->create();\n\n // TESI\n\t\t\t// now add custom fields\n\t\t\t// function custom_field_value_to_database( $p_value, $p_type ) {\n\t\t\tif(!is_null($embdata))\n\t\t\t{\n\t\t\t\tforeach($embdata['cf'] as $cfname => $cfdata)\n\t\t\t\t{\n\t\t\t\t\t// var_dump($this->cfCacheByName[$cfname]);\n\t\t\t\t\t// var_dump($cfname);\n\t\t\t\t\t// var_dump($cfdata);\n\t\t\t\t\t$val4db = custom_field_value_to_database($cfdata,$this->cfCacheByName[$cfname]['type']);\n\t\t\t\t\tcustom_field_set_value($this->cfCacheByName[$cfname]['id'],$ret->bugID, $val4db);\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t// Lets link a readonly already existing bug to the newly created one\n\t\t\tif ( $f_master_bug_id > 0 )\n\t\t\t{\n\t\t\t\t$f_rel_type = BUG_RELATED;\n\n\t\t\t\t# update master bug last updated\n\t\t\t\tbug_update_date( $f_master_bug_id );\n\n\t\t\t\t# Add the relationship\n\t\t\t\trelationship_add($ret->bugID, $f_master_bug_id, $f_rel_type );\n\n\t\t\t\t# Add log line to the history (both issues)\n\t\t\t\thistory_log_event_special($f_master_bug_id, BUG_ADD_RELATIONSHIP, \n\t\t\t\t relationship_get_complementary_type( $f_rel_type ), $ret->bugID );\n\t\t\t\thistory_log_event_special($ret->bugID, BUG_ADD_RELATIONSHIP, $f_rel_type, $f_master_bug_id);\n\n\t\t\t\t# Send the email notification\n\t\t\t\temail_relationship_added( $f_master_bug_id,$ret->bugID, relationship_get_complementary_type( $f_rel_type ) );\n\t\t\t}\n\n\t\t\thelper_call_custom_function( 'issue_create_notify', array($ret->bugID) );\n\n\t\t\t# Allow plugins to post-process bug data with the new bug ID\n\t\t\tevent_signal( 'EVENT_REPORT_BUG', array( $t_bug_data, $ret->bugID) );\n\t\t\temail_new_bug($ret->bugID);\n\n\t\t\t// TESI\n\t\t\tif($saveAsAttach)\n\t\t\t{\n\t\t\t if( !is_null($msg = $this->bruteForceAddFile($ret->bugID,$mgs2write)))\n\t\t\t {\n\t\t\t bugnote_add($ret->bugID, 'Error Attaching:' . $msg );\n\t\t\t }\n\t\t\t} \n \n // TESI - 2013010 - send fixed mail.\n // $sender\n // \n $target_project = project_cache_row( $t_project_id, false );\n if( isset($target_project['mail_reply_to_enabled']) && $target_project['mail_reply_to_enabled'] )\n {\n $reply_to = $sender;\n if( isset($target_project['mail_reply_to']) && strlen(trim($target_project['mail_reply_to'])) > 0)\n {\n $reply_to = $target_project['mail_reply_to'];\n } \n\n //if( isset($target_project['mail_reply_to_cc']) && strlen(trim($target_project['mail_reply_to_cc'])) > 0)\n //{\n // $reply_to .= \",\" . $target_project['mail_reply_to_cc'];\n //} \n echo \"\\n (tesi) REPLY TO BEFORE EMAIL STORE:\" . $reply_to;\n\n $in_cc = '';\n if( isset($target_project['use_received_cc']) && $target_project['use_received_cc']) \n {\n $in_cc = $original_cc;\n }\n\n if( isset($target_project['mail_reply_to_cc']) && strlen(trim($target_project['mail_reply_to_cc'])) > 0)\n {\n if($in_cc != '')\n {\n $in_cc .= \",\";\n } \n $in_cc .= $target_project['mail_reply_to_cc'];\n } \n\n $add2sub = $t_bug_data->summary;\n echo \"\\n (tesi) STR 2 REMOVE:\" . $str2remove;\n if(!is_null($str2remove))\n {\n \t \t $add2sub = str_replace($str2remove, '', $t_bug_data->summary); \n echo \"\\n (tesi) \\$add2sub:\" . $add2sub;\n }\n\n\n // build new subject \n $t_subject = '[TICKET ' . bug_format_id($ret->bugID) . '] ' . $add2sub;\n\n $t_contents = sprintf($target_project['mail_reply_body'],$ret->bugID,$ret->bugID,$ret->bugID,$ret->bugID);\n \n // 20130213\n $t_contents .= BODY_PIECES_SEPARATOR . $mgs2write;\n // $t_ok = email_store($reply_to, $t_subject, $t_contents,null,$p_replyToFromEmail);\n $t_ok = email_store($reply_to, $t_subject, $t_contents,null,$p_replyToFromEmail,$in_cc);\n }\n \n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Not allowed to add bugs and not allowed / able to add bugnote. Need to stop processing\n\t\t\t$this->custom_error( 'Not allowed to create a new issue. Email ignored' );\n\t\t\treturn $ret;\n\t\t}\n\n\t\t$this->custom_error('Reporter: ' . $p_email[ 'Reporter_id' ] . ' - ' . \n\t\t $p_email[ 'From_parsed' ][ 'email' ] . ' --> Issue ID: #' . $ret->bugID );\n\t\t$this->show_memory_usage( 'Start processing attachments' );\n\n\t\t# Add files\n\t\tif ( $this->_allow_file_upload )\n\t\t{\n\t\t\tif ( count( $p_email[ 'X-Mantis-Parts' ] ) > 0 )\n\t\t\t{\n\t\t\t\t$t_rejected_files = NULL;\n\n\t\t\t\tforeach ( $p_email[ 'X-Mantis-Parts' ] as $part )\n\t\t\t\t{\n\t\t\t\t\t$t_file_rejected = $this->add_file($ret->bugID, $part );\n\n\t\t\t\t\tif ( $t_file_rejected !== TRUE )\n\t\t\t\t\t{\n\t\t\t\t\t\t$t_rejected_files .= $t_file_rejected;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( !is_null( $t_rejected_files ) )\n\t\t\t\t{\n\t\t\t\t\t$part = array(\n\t\t\t\t\t\t'name' => 'Rejected files.txt',\n\t\t\t\t\t\t'ctype' => 'text/plain',\n\t\t\t\t\t\t'body' => 'List of rejected files' . \"\\n\\n\" . $t_rejected_files,\n\t\t\t\t\t);\n\n\t\t\t\t\t$t_reject_rejected_files = $this->add_file($ret->bugID, $part );\n\t\t\t\t\tif ( $t_reject_rejected_files !== TRUE )\n\t\t\t\t\t{\n\t\t\t\t\t\t$part[ 'body' ] .= $t_reject_rejected_files;\n\t\t\t\t\t\t$this->custom_error( 'Failed to add \"' . $part[ 'name' ] .\n\t\t\t\t\t\t '\" to the issue. See below for all errors.' . \"\\n\" . $part[ 'body' ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "a0adc069ecb562ed93c19c9cb3875bae", "score": "0.49042153", "text": "private function sendMessagesToParents($children){\n foreach($children as $child){\n $status = $child->getStatus();\n\n if ($status === childStatus::not_here_late){\n $messageController = $this->notificationMessageFactory->create($child, messageStatus::child_late);\n $messageController->sendStatusNotification();\n }\n else if ($status === childStatus::here_due){\n $messageController = $this->notificationMessageFactory->create($child, messageStatus::child_ready);\n $messageController->sendStatusNotification();\n }\n }\n }", "title": "" }, { "docid": "6c19cdca684dc1df0b75b5d674765030", "score": "0.4893096", "text": "function error_log_jira_update_db_and_jira($watchdog_item, $severity_name, array $options, $project_key) {\n\n $timestamp = $watchdog_item->timestamp;\n $wid = $watchdog_item->wid;\n // Checks what message needed.\n if (isset($watchdog_item->message) && isset($watchdog_item->variables)) {\n if ($watchdog_item->variables === 'N;') {\n $db_message = $watchdog_item->message;\n }\n else {\n $db_message = format_string($watchdog_item->message, unserialize($watchdog_item->variables));\n $db_message = filter_xss($db_message, array());\n }\n }\n\n // Check if a value exist in the table.\n $select_same_variables = db_select('error_log_jira', 'j')\n ->fields('j')\n ->condition('wid', $wid, '=')\n ->execute();\n\n // If the value does not exists in the table, then creates this value.\n if ($select_same_variables->rowCount() == 0) {\n db_insert('error_log_jira')\n ->fields(array(\n 'timestamp' => $timestamp,\n 'wid' => $wid,\n 'message' => $db_message,\n 'resolution_updated' => time(),\n 'resolution' => 'Unresolved',\n ))\n ->execute();\n\n // Looks for the item of the watchdog if is Resolved or not.\n $jql_string = ('project = ' . $project_key .\n ' and description ~ \"\\\"' . $db_message . '\\\"\" and resolution = Unresolved');\n $jira_search = jira_rest_issue_search($jql_string, $options);\n\n // If this item of watchdog is Unresolved, then do nothing.\n if (empty($jira_search)) {\n error_log_jira_create_issue($watchdog_item, $severity_name, $options, $project_key);\n }\n }\n}", "title": "" }, { "docid": "bbe0b7eeb3b22f0dd8203c260459bb37", "score": "0.48878878", "text": "public function logAnalysedNodeIssue(): void\n {\n $this->nodeIssueCounter++;\n }", "title": "" }, { "docid": "84e936cb8f66d6d3e03eb4bb70e2fe42", "score": "0.48778358", "text": "function openBugs()\n\t{\n\t\t$open = array();\n\t\tforeach( $this->bugs as $b)\n\t\t{\n\t\t\t$si = array_search($b['status'],$this->statuses);\n\t\t\tif($si >= BZB_CLOSED)\n\t\t\t\tcontinue;\n\t\t\t$open[] = $this->showBug($b['id'],TRUE);\n\t\t}\n\t\t\n\t\t$num_bugs = count($open);\n\t\t\n\t\tif($num_bugs < 5)\n\t\t\t$this->pm($open);\n\t\telseif($num_bugs == 0)\n\t\t{\n\t\t\t$this->pm(\"yay, no open bugs!\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->pm(\"$num_bugs found, sending you a private message, \".$this->getUser());\n\t\t\tforeach($open as $l)\n\t\t\t\t$this->pm($l, $this->getUser());\n\t\t}\n\t}", "title": "" }, { "docid": "3dec34912bd70619af3f51c4a2a272f8", "score": "0.48721892", "text": "static public function notify(sfEvent $e)\n {\n $mailer = $e->getSubject()->getMailer();\n $reported_item = $e['reported_item'];\n $report_log = $e['report_log'];\n $recipients = sfConfig::get('app_moderation_emails');\n \n $default_from_name = sprintf('moderation-bot@%s', $e->getSubject()->getRequest()->getHost());\n\n $from = array(\n sfConfig::get('app_moderation_notify_from_email', $default_from_name) => sfConfig::get('app_moderation_notify_from_name', 'Moderation Bot')\n );\n \n // throw some helpful messages, unlike the original sfDoctrineApply plugin!\n if($recipients === false || empty($recipients))\n {\n throw new Exception('You need to define app_moderation_emails emails in your configuration'); \n }\n \n // load the partial helper, as this method will be called statically\n // so $this->getPartial() is out of the question.\n sfProjectConfiguration::getActive()->loadHelpers(array('Partial'));\n \n $mailer->composeAndSend(\n $from,\n $recipients,\n sfConfig::get('app_moderation_notify_subject', 'An item was reported'),\n get_partial('report/email', array(\n 'reported_item' => $reported_item,\n 'report_log' => $report_log\n ))\n ); \n }", "title": "" }, { "docid": "8e81f3f3d3066f807262f2cfeb6cb170", "score": "0.48480427", "text": "public function notify()\n {\n $this->body = '<div style=\"font-family: Verdana, Arial;\">';\n\n //The exception resume\n $this->addTitle('Resume');\n\n $this->beginTable();\n if ($this->exception)\n {\n $this->addRow('Message',$this->exception->getMessage());\n }\n else\n {\n $this->addRow('Subject',$this->subject);\n }\n $this->addRow('Environment', $this->env);\n $this->addRow('Generated at' , date('H:i:s j F Y'));\n $this->body .= '</table>';\n\n\n //The exception itself\n if ($this->exception)\n {\n $this->addTitle('Exception');\n\n $this->beginTable();\n $this->addRow('Trace',$this->exception);\n\n $this->body .= '</table>';\n }\n\n //Aditional Data\n $this->addTitle('Additional Data');\n $this->beginTable();\n foreach($this->data as $key=>$value){\n $this->addRow($key,$value);\n }\n $this->body .= '</table>';\n\n\n // REQUEST PARAMETER\n if(count($_POST)){\n $this->addTitle('$_POST Data');\n $this->beginTable();\n foreach($_POST as $key => $value){\n $this->addRow($key, $value);\n }\n $this->body .'</table>';\n }\n\n if(count($_GET)){\n $this->addTitle('$_GET Data');\n $this->beginTable();\n foreach($_GET as $key => $value){\n $this->addRow($key, $value);\n }\n $this->body .'</table>';\n }\n\n //User attributes and credentials\n $this->addTitle('User');\n $this->beginTable();\n\n $user = $this->context->getUser();\n \n $subtable = array();\n foreach ($user->getAttributeHolder()->getAll() as $key => $value){\n if (is_array($value))\n {\n $value = 'Array: ' . var_export($value,true);\n }\n $subtable[] = '<b>'.$key.'</b>: '.$value;\n }\n \n $subtable = implode('<br/>',$subtable);\n \n $this->addRow('Attributes',$subtable);\n $this->addRow('Credentials',implode(', ',$user->getCredentials()));\n \n $this->body .= '</table>';\n \n $this->body .= '</div>';\n\n\n $mail = $this->context->getMailer()->compose($this->to, $this->to, $this->subject,'');\n $mail->setBody($this->body, 'text/html');\n\n $this->context->getMailer()->send($mail);\n return true;\n }", "title": "" }, { "docid": "049dd3d86a1ecc0362147f128924fc46", "score": "0.48303345", "text": "public static function watch_for_resend(){\n\t\tif( isset( $_GET[ '_cf_resend' ], $_GET[ 'e' ], $_GET[ 'f' ] ) && self::verify_nonce($_GET[ '_cf_resend' ] ) ){\n\t\t\tif ( ! current_user_can( Caldera_Forms::get_manage_cap( 'resend-email' ) ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$form = Caldera_Forms_Forms::get_form( $_GET[ 'f' ] );\n\t\t\tif( is_array( $form ) ){\n\t\t\t\t$resender = new Caldera_Forms_Email_Resend( absint( $_GET[ 'e' ] ), $form );\n\n\t\t\t\t$resender->resend();\n\t\t\t\tcf_redirect( add_query_arg( 'message_resent', 'true', Caldera_Forms_Admin::main_admin_page_url() ) );\n\t\t\t\texit;\n\n\t\t\t}\n\n\n\t\t}\n\n \t}", "title": "" }, { "docid": "02215d4ba2eec9a0ef772b2bd93f2d0c", "score": "0.4829227", "text": "public function notify()\n {\n foreach($this->observadores as $observador)\n $observador->update($this);\n }", "title": "" }, { "docid": "bf950e300b767f9838d1ce558dc13970", "score": "0.48202068", "text": "function postUpdate($rec)\n {\n foreach($this->m_history_fields as $field)\n {\n if($rec[$field]!=$rec[\"atkorgrec\"][$field])\n $this->updateHistory($rec[\"bug_id\"],$field,$rec[\"atkorgrec\"][$field],$rec[$field]);\n } \n\n // 18/09/07 It added foreign key fields for history\n $m_history_fields_fk_name = array(\"severity_id\",\"status_id\",\"resolution_id\",\"project_id\",\"component_id\",\"version_id\",\"milestone_id\",\"os_id\");\n\n foreach($m_history_fields_fk_name as $field)\n {\n if($rec[$field][\"name\"]!=$rec[\"atkorgrec\"][$field][\"name\"])\n $this->updateHistory($rec[\"bug_id\"],$field,$rec[\"atkorgrec\"][$field][\"name\"],$rec[$field][\"name\"]);\n } \n\t// assignedto and qa_contact have another person field\n\t$m_history_fields_fk_person = array(\"assigned_to\", \"qa_contact\");\n foreach($m_history_fields_fk_person as $field)\n {\n if($rec[$field][\"firstname\"]!=$rec[\"atkorgrec\"][$field][\"firstname\"])\n $this->updateHistory($rec[\"bug_id\"],$field,$rec[\"atkorgrec\"][$field][\"lastname\"].\", \".$rec[\"atkorgrec\"][$field][\"firstname\"],$rec[$field][\"lastname\"].\", \".$rec[$field][\"firstname\"]);\n } \n \n // 12/09/2007 It adds to see if it changed the person assigned to send your mail\n if($rec[\"assigned_to\"]!=$rec[\"atkorgrec\"][\"assigned_to\"])\n return $this->sendEmail($rec);\n }", "title": "" }, { "docid": "0d19c8d0952824c8d8e4743fa6949677", "score": "0.48194286", "text": "static function notify_state_changes(): void {\r\n\r\n // Get and order all modules\r\n $modules = self::order_modules(JKNAPI::all_modules());\r\n\r\n $to_resume = self::to_notify_resume($modules);\r\n $to_pause = self::to_notify_pause($modules);\r\n\r\n if ($to_resume) JKNNotices::add_resume_notice($to_resume);\r\n if ($to_pause) JKNNotices::add_pause_notice($to_pause);\r\n }", "title": "" }, { "docid": "e193b5d89099990532fd1c43f2906004", "score": "0.48038676", "text": "public function getAffectedBugRevs() {\n\t\t$dbw = wfGetDB( DB_MASTER );\n\n\t\t// Update bug references table...\n\t\t$affectedBugs = array();\n\t\t$m = array();\n\t\tif ( preg_match_all( self::BugReference, $this->message, $m ) ) {\n\t\t\t$data = array();\n\t\t\tforeach ( $m[1] as $bug ) {\n\t\t\t\t$data[] = array(\n\t\t\t\t\t'cb_repo_id' => $this->repoId,\n\t\t\t\t\t'cb_from' => $this->id,\n\t\t\t\t\t'cb_bug' => $bug\n\t\t\t\t);\n\t\t\t\t$affectedBugs[] = intval( $bug );\n\t\t\t}\n\t\t\t$dbw->insert( 'code_bugs', $data, __METHOD__, array( 'IGNORE' ) );\n\t\t}\n\n\t\t// Also, get previous revisions that have bugs in common...\n\t\t$affectedRevs = array();\n\t\tif ( count( $affectedBugs ) ) {\n\t\t\t$res = $dbw->select( 'code_bugs',\n\t\t\t\tarray( 'cb_from' ),\n\t\t\t\tarray(\n\t\t\t\t\t'cb_repo_id' => $this->repoId,\n\t\t\t\t\t'cb_bug' => $affectedBugs,\n\t\t\t\t\t'cb_from < ' . intval( $this->id ), # just in case\n\t\t\t\t),\n\t\t\t\t__METHOD__,\n\t\t\t\tarray( 'USE INDEX' => 'cb_repo_id' )\n\t\t\t);\n\t\t\tforeach ( $res as $row ) {\n\t\t\t\t$affectedRevs[] = intval( $row->cb_from );\n\t\t\t}\n\t\t}\n\n\t\treturn $affectedRevs;\n\t}", "title": "" }, { "docid": "ebb7db17cca9377db19541c8db84f157", "score": "0.48025966", "text": "function telegram_message_bugnote_add_generic( $p_bugnote_id, $p_files = array(), $p_exclude_user_ids = array() ) {\n if( OFF == plugin_config_get( 'enable_telegram_message_notification' ) || plugin_config_get( 'api_key' ) == NULL ) {\n plugin_log_event( 'telegram notifications disabled.' );\n return;\n }\n\n telegram_session_start();\n\n ignore_user_abort( true );\n\n $t_bugnote = bugnote_get( $p_bugnote_id );\n\n plugin_log_event( sprintf( 'Note ~%d added to issue #%d', $p_bugnote_id, $t_bugnote->bug_id ) );\n\n $t_project_id = bug_get_field( $t_bugnote->bug_id, 'project_id' );\n $t_separator = plugin_config_get( 'telegram_message_separator2' );\n $t_time_tracking_access_threshold = config_get( 'time_tracking_view_threshold' );\n $t_view_attachments_threshold = config_get( 'view_attachments_threshold' );\n $t_message_id = 'telegram_message_notification_title_for_action_bugnote_submitted';\n\n//\t$t_subject = email_build_subject( $t_bugnote->bug_id );\n $t_recipients = telegram_message_collect_recipients( $t_bugnote->bug_id, 'bugnote', /* extra_user_ids */ array(), $p_bugnote_id );\n $t_recipients_verbose = array();\n\n # send telegram message to every recipient\n foreach( $t_recipients as $t_user_id => $t_telegram_user_id ) {\n if( in_array( $t_user_id, $p_exclude_user_ids ) ) {\n plugin_log_event( sprintf( 'Issue = #%d, Note = ~%d, Type = %s, Msg = \\'%s\\', User = @U%d excluded, Telegram User = \\'%s\\'.', $t_bugnote->bug_id, $p_bugnote_id, 'bugnote', 'telegram_message_notification_title_for_action_bugnote_submitted', $t_user_id, $t_telegram_user_id ) );\n continue;\n }\n\n # Load this here per user to allow overriding this per user, or even per user per project\n if( plugin_config_get( 'telegram_message_notifications_verbose', /* default */ null, FALSE, $t_user_id, $t_project_id ) == ON ) {\n $t_recipients_verbose[$t_user_id] = $t_telegram_user_id;\n continue;\n }\n\n plugin_log_event( sprintf( 'Issue = #%d, Note = ~%d, Type = %s, Msg = \\'%s\\', User = @U%d, Telegram User = \\'%s\\'.', $t_bugnote->bug_id, $p_bugnote_id, 'bugnote', $t_message_id, $t_user_id, $t_telegram_user_id ) );\n\n # load (push) user language\n lang_push( user_pref_get_language( $t_user_id, $t_project_id ) );\n\n// $t_message = plugin_lang_get( 'telegram_message_notification_title_for_action_bugnote_submitted' ) . \"\\n\";\n\n $t_show_time_tracking = access_has_bug_level( $t_time_tracking_access_threshold, $t_bugnote->bug_id, $t_user_id );\n $t_formatted_note = telegram_message_format_bugnote( $t_bugnote, $t_project_id, $t_show_time_tracking, $t_separator );\n $t_message = trim( $t_formatted_note ) . \"\\n\";\n// $t_message .= $t_separator . \"\\n\";\n # Files attached\n if( count( $p_files ) > 0 &&\n access_has_bug_level( $t_view_attachments_threshold, $t_bugnote->bug_id, $t_user_id ) ) {\n $t_message .= lang_get( 'bugnote_attached_files' ) . \"\\n\";\n\n foreach( $p_files as $t_file ) {\n $t_message .= '- ' . $t_file['name'] . ' (' . number_format( $t_file['size'] ) .\n ' ' . lang_get( 'bytes' ) . \")\\n\";\n }\n\n $t_message .= $t_separator . \"\\n\";\n }\n\n $t_contents = $t_message . \"\\n\";\n\n $data = [\n 'text' => $t_contents\n ];\n\n $t_results = telegram_session_send_message( $t_telegram_user_id, $data );\n\n foreach( $t_results as $t_result ) {\n if( $t_result->isOk() ) {\n telegram_message_realatationship_add( $t_bugnote->bug_id, $t_telegram_user_id, $t_result->getResult()->getMessageId() );\n }\n }\n\n lang_pop();\n }\n\n # Send telegram messages out for users that select verbose notifications\n telegram_message_generic_to_recipients(\n $t_bugnote->bug_id, 'bugnote', $t_recipients_verbose, $t_message_id );\n}", "title": "" }, { "docid": "49fcafd12a3466fd5cae1fcd935fa053", "score": "0.47973636", "text": "function access_can_reopen_bug ( $p_bug_id, $p_user_id=null ) {\r\n\t\tif ( $p_user_id === null ) {\r\n\t\t $p_user_id = auth_get_current_user_id();\r\n\t\t}\r\n\r\n\t\t# If allow_reporter_reopen is enabled, then reporters can always reopen\r\n\t\t# their own bugs\r\n\t\tif ( ON == config_get( 'allow_reporter_reopen' ) &&\r\n\t\t\tbug_is_user_reporter( $p_bug_id, $p_user_id ) ) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn access_has_bug_level( config_get( 'reopen_bug_threshold' ), $p_bug_id, $p_user_id );\r\n\t}", "title": "" }, { "docid": "fdb5ced5e9449d3d949343d2205238e4", "score": "0.47780913", "text": "public function notify() {\n\t\t// Loops though all observers and sends updates one at a time.\n\t\tforeach ($this->observers as $value) {\n\n\t\t\t$value->update($this);\n\t\t}\n\t}", "title": "" }, { "docid": "b8d829d4a650ce4503c07b7edef2318c", "score": "0.47700378", "text": "private function resolveIssue()\n\t{\n\t $issueid = $this->_request['issueid']; \n\t $comments = $this->_request['comments']; \n\t $status = \"true\"; \n\t $date_resolved = $this->_request['date_resolved']; \n\t$resolvedby = $this->_request['resolved_by']; \n\t\n\t // Cross validation if the request method is POST else it will return \"Not Acceptable\" status\n\tif($this->get_request_method() != \"POST\"){\n\t\t$this->response('',406,\"\");\n\t}\t \n\t$sql = \"UPDATE issue SET status='\".$status.\"', resolvedby='\".$resolvedby.\"', date_resolved='\".$date_resolved.\"', \n user_comments='\".$comments.\"' WHERE issueid ='\".$issueid.\"'\";\n\t\n\t$this->setQueryData($sql,\"Successfully marked issue has resolved\",\"Failed to resolve issues, query was \".$sql);\t//set query results\t\n\t\t \n \t}", "title": "" }, { "docid": "1cd3ced27adcec29f6ce8a5094ae0cc8", "score": "0.47671673", "text": "protected function rebuildWarning()\n {\n $this->stdErr->writeln([\n '<comment>The remote environment must be rebuilt for the change to take effect.</comment>',\n \"Use 'git push' with new commit(s) to trigger a rebuild.\"\n ]);\n }", "title": "" }, { "docid": "a51b6da28afb13790b8f2e9426e411b6", "score": "0.47543627", "text": "public function commitCommentReply($parentID,$commentorID,$content)\n {\n //inserts comment into Comments (all other valyes default or auto-increment)\n $this->database->update(\"INSERT INTO Comments (commentor, content) VALUES (\\\"$commentorID\\\",\\\"$content\\\") \");\n //selects the latest inserted comment (the one above)\n $result = $this->database->retrieve(\"SELECT commentID FROM Comments ORDER BY commentID DESC LIMIT 1\");\n $childID = $result[0][\"commentID\"]; //gets ID of child post\n $this->database->update(\"INSERT INTO CommentReplies (parent, child) VALUES (\\\"$parentID\\\",\\\"$childID\\\")\");\n }", "title": "" }, { "docid": "1fbb1374886705ae4de27deeb061f687", "score": "0.4753823", "text": "function hrb_dispute_period_ended_notify_parties( $workspace, $end_time ) {\n\n\t$participants = hrb_p2p_get_workspace_participants( $workspace->ID );\n\tif ( ! $participants ) {\n\t\treturn;\n\t}\n\n\t$project = hrb_p2p_get_workspace_post( $workspace->ID );\n\n\t$workspace_link = html_link( hrb_get_workspace_url( $workspace->ID ), $workspace->post_title );\n\n\tforeach( $participants->results as $worker ) {\n\t\t$subject_message = sprintf( __( 'The deadline to open a dispute - %3$s - as ended', APP_TD ), $workspace_link );\n\n\t\t$content = sprintf(\n\t\t\t__( 'Hello %1$s,%2$s\n\t\t\tjust to inform you that the deadline to open a dispute on %3$s as ended.%2$s\n\t\t\tThe employer will be fully refunded for this project.', APP_TD ),\n\t\t\t$worker->display_name, \"\\r\\n\\r\\n\", $workspace_link\n\t\t);\n\n\t\t$participant = array(\n\t\t\t'recipient' => $worker->ID,\n\t\t\t'message' => $subject_message,\n\t\t\t'send_mail' => array(\n\t\t\t\t'content' => wpautop( $content ),\n\t\t\t),\n\t\t\t'meta' => array(\n\t\t\t\t'subject' => wp_strip_all_tags( $subject_message ),\n\t\t\t\t'project_id' => $project->ID,\n\t\t\t\t'action' => hrb_get_workspace_url( $workspace->ID ),\n\t\t\t),\n\t\t);\n\n\t\tappthemes_send_notification( $participant['recipient'], $participant['message'], 'action', $participant['meta'], array( 'send_mail' => $participant['send_mail'] ) );\n\t}\n\n}", "title": "" }, { "docid": "aa70dbc21d812b5414a1b773bb62dbc4", "score": "0.47387162", "text": "public function post_index() {\n\n\t\tif(!Input::get('comment')) {\n\t\t\treturn Redirect::to(Project\\Issue::current()->to() . '#new-comment')\n\t\t\t\t->with('notice-error', __('tinyissue.you_put_no_comment'));\n\t\t}\n\t\t$comment = \\Project\\Issue\\Comment::create_comment(Input::all(), Project::current(), Project\\Issue::current());\n\n//\t\t//Email to followers\n//\t\t$this->Courriel (\"Issue\", true, Project::current()->id, Project\\Issue::current()->id, \\Auth::user()->id, array('comment'), array('tinyissue'));\n\t\t/*Notifications by email to those who concern */\n\t\t\\Mail::letMailIt(array(\n\t\t\t'ProjectID' => Project::current()->id, \n\t\t\t'IssueID' => Project\\Issue::current()->id, \n\t\t\t'SkipUser' => true,\n\t\t\t'Type' => 'Issue', \n\t\t\t'user' => \\Auth::user()->id,\n\t\t\t'contenu' => array('comment'),\n\t\t\t'src' => array('tinyissue')\n\t\t\t),\n\t\t\t\\Auth::user()->id, \n\t\t\t\\Auth::user()->language\n\t\t);\n\n\n\t\t$message = __('tinyissue.your_comment_added').(((Input::get('status') == 0 || Input::get('Fermons') == 0) && \\Project\\User::GetRole(Project::current()->id) != 1) ? ' --- '.__('tinyissue.issue_has_been_closed') : '');\n\t\t$retour = '/project/'.Project::current()->id.'/issues?tag_id=1'; \n\t\treturn Redirect::to($retour)->with('notice', $message);\n\t}", "title": "" }, { "docid": "edbf4d20d17e71e867e3254decea937e", "score": "0.47294897", "text": "function send_site_admin_warning($altered)\n\t{\n\t\t$affected_paths = array_diff($altered, $this->emailed);\n\n\t\tif (count($affected_paths))\n\t\t{\n\t\t\tee()->load->library('notifications');\n\t\t\tee()->notifications->send_checksum_notification($affected_paths);\n\n\t\t\t// add them to the existing emailed and update\n\t\t\t$affected_paths = array_unique(array_merge($this->emailed, $affected_paths));\n\n\t\t\tforeach($this->checksums as $site_id => $checksums)\n\t\t\t{\n\t\t\t\t$checksum_paths = array_keys($checksums);\n\n\t\t\t\t// did we send emails for this site id?\n\t\t\t\t$old_emailed = array_intersect($checksum_paths, $this->emailed);\n\t\t\t\t$new_emailed = array_intersect($checksum_paths, $affected_paths);\n\n\t\t\t\tif (count($new_emailed))\n\t\t\t\t{\n\t\t\t\t\t$checksums['emailed'] = array_unique(array_merge($old_emailed, $new_emailed));\n\t\t\t\t\t$this->_update_config($checksums, $site_id);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "c1e466687165690ad7d3db4fdffe196d", "score": "0.4719199", "text": "protected function notices( $notices ) {\n\t\t$notices[] = new Notice( __( 'Note: Comment relevance is automatically transferred to its parent, causing the Comment parent to be returned as a result.', 'searchwp' ), [\n\t\t\t'type' => 'info',\n\t\t\t'icon' => 'dashicons dashicons-info',\n\t\t\t'placement' => 'details',\n\t\t] );\n\n\t\treturn $notices;\n\t}", "title": "" }, { "docid": "60aea76e4a097100123643b8e767eeb5", "score": "0.4704339", "text": "public function notify(Throwable $e, int $status = 500): void\n {\n // send info to black hole, like this https://www.jpl.nasa.gov/images/universe/20190410/blackhole20190410.jpg\n }", "title": "" }, { "docid": "098d4dc630d316e331ddbf66b8270151", "score": "0.46848235", "text": "function action_update_sexe_process( $p_bug_id ) {\n\t$f_sexe = gpc_get_string( 'sexe' );\n\tbug_set_field( $p_bug_id, 'sexe', $f_sexe );\n\treturn true;\n}", "title": "" }, { "docid": "3048011c22600a6f80e026a81aa6eb2c", "score": "0.46791545", "text": "private static function track_imported_child_forms( $form_id, $parent_form_id, &$child_forms ) {\n\t\tif ( $parent_form_id ) {\n\t\t\t$child_forms[ $form_id ] = $parent_form_id;\n\t\t}\n\t}", "title": "" }, { "docid": "5323349fed88274f127c308c252e7ce5", "score": "0.4671875", "text": "function oqp_notify_for_post($new_status, $old_status, $post, $do_emails) {\r\n //TO FIX TO CHECK\r\n\t//if (oqp_user_is_dummy($post->post_author)) $do_emails = true;\r\n\r\n\r\n\t//get author info\r\n\t$user_id = $post->post_author;\r\n\t$user_info = get_userdata($user_id);\r\n\t\r\n\t//abord if post status has been changed by author\r\n\tif ((get_current_user_id()==$user_id) && (!OQP_DEBUG)) return false;\r\n\t\r\n\t//get author email\r\n\t$email = get_the_author_meta('user_email',$user_id);\r\n\t\r\n\t//NOTIFICATION TYPE\r\n\t\r\n\tif (($new_status=='pending') && ($old_status=='draft')) {\r\n\t\t$type='pending';\r\n\t}elseif($new_status=='publish') {\r\n\t\tif ($old_status!='publish') {\r\n\t\t\t$type='publish';\t\t\t\r\n\t\t}else { //update\r\n\t\t\t//TO FIX TO DO CHECK DELAY\r\n\t\t\t$type='update';\r\n\t\t}\r\n\t}elseif($new_status=='trash') {\r\n\t\tif (($old_status=='pending') || ($old_status=='publish')) {//only for pending or published posts\r\n\t\t\t$type='trash';\r\n\t\t}\r\n\t}\r\n\t\r\n\tif (!$type) return false;\r\n\r\n\tif ($type=='pending') {\r\n\t\r\n\t\toqp_notify_author_post_pending_email($post,$email,$do_emails);\r\n\t\tdo_action('oqp_notify_post_pending',$post,$do_emails);\r\n\t\t\r\n\t}elseif($type=='publish') {\r\n\r\n\t\toqp_notify_author_post_publish_email($post,$email,$do_emails);\r\n\t\tdo_action('oqp_notify_post_publish',$post,$do_emails);\r\n\t\t\r\n\t}elseif($type=='update') {\r\n\t\t//oqp_notify_author_post_update_email($post,$email,$do_emails);\r\n\t\tdo_action('oqp_notify_post_update',$post,$do_emails);\r\n\t\t\r\n\t}elseif($type=='trash') {\r\n\t\r\n\t\toqp_notify_author_post_trash_email($post,$email,$do_emails);\r\n\t\tdo_action('oqp_notify_post_trash',$post,$do_emails);\r\n\t\t\r\n\t}\r\n\r\n}", "title": "" }, { "docid": "b85b07e78f1da884fe84fa3791d84b2c", "score": "0.46654138", "text": "function hrb_unopened_disputes_refund_or_notify() {\n\n\t$workspace_unopened_disputes = new WP_Query( array(\n\t\t'post_type' => HRB_WORKSPACE_PTYPE,\n\t\t'post_status' => array( HRB_PROJECT_STATUS_CANCELED, HRB_PROJECT_STATUS_CLOSED_INCOMPLETE ),\n\t\t'meta_query' => array(\n\t\t\t'relation' => 'AND',\n\t\t\tarray(\n\t\t\t\t'key' => 'dispute_end_date',\n\t\t\t\t'value' => current_time('mysql'),\n\t\t\t\t'compare' => '>',\n\t\t\t\t'type' => 'datetime',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'key' => 'opened_dispute',\n\t\t\t\t'value' => 'dummy',\n\t\t\t\t'compare' => 'NOT EXISTS',\n\t\t\t),\n\t\t),\n\t\t'nopaging' => true,\n\t) );\n\n\t$time = current_time( 'mysql' );\n\n\tforeach( $workspace_unopened_disputes->posts as $workspace ) {\n\n\t\t$end_time = get_post_meta( $workspace->ID, 'dispute_end_date', true );\n\n\t\t### fire a hook if dispute for the current workspace has expired\n\n\t\tif ( $end_time < $time ) {\n\t\t\thrb_dispute_period_ended_notify_parties( $workspace, $end_time );\n\n\t\t\tdo_action( 'hrb_workspace_dispute_period_ended', $workspace->ID, $end_time );\n\t\t} else {\n\n\t\t\t### fire a hook each time a pre-set dispute deadline notification time is reached\n\n\t\t\t$notify_times = get_post_meta( $workspace->ID, 'dispute_end_notify_times', true );\n\n\t\t\tforeach ( (array) $notify_times as $notify_time => $notified ) {\n\t\t\t\t// skip if notifications for this time period were already sent\n\t\t\t\tif ( $notified ) continue;\n\n\t\t\t\tif ( $notify_time < $time ) {\n\t\t\t\t\thrb_dispute_period_ending_notify_parties( $workspace, $end_time, $notify_time, $notify_times );\n\n\t\t\t\t\tdo_action( 'hrb_workspace_dispute_period_ending', $workspace, $end_time, $notify_time, $notify_times );\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}\n}", "title": "" }, { "docid": "6413fb955b5fe55b1cc5329a2fe946a2", "score": "0.46585426", "text": "public function register_notifications() {\n\t\tif ( ! defined( 'WPSEO_VERSION' ) ) {\n\t\t\tadd_action( 'admin_notices', array( $this, 'message_plugin_not_activated' ) );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! $this->has_required_version() ) {\n\t\t\tadd_action( 'admin_notices', array( $this, 'message_minimum_version' ) );\n\t\t}\n\t}", "title": "" }, { "docid": "028263365eef4231d227700ea8c68ce7", "score": "0.46568552", "text": "function _elgg_create_notice_of_pending_upgrade($event, $type, $object) {\n\tif ($object instanceof \\ElggUpgrade) {\n\t\t// Link to the Upgrades section\n\t\t$link = elgg_view('output/url', [\n\t\t\t'href' => 'admin/upgrades',\n\t\t\t'text' => elgg_echo('admin:view_upgrades'),\n\t\t]);\n\n\t\t$message = elgg_echo('admin:pending_upgrades');\n\n\t\telgg_add_admin_notice('pending_upgrades', \"$message $link\");\n\t}\n}", "title": "" }, { "docid": "298745e20ca4bae20e10f3c53b82c0ff", "score": "0.4655416", "text": "function og_mailinglist_log_email_sent($source, $nid, $cid = 0, $parent_message_id = 0, $headers = array()) {\n $message_id = isset($headers['message-id']) ? $headers['message-id'] : 0;\n $references = isset($headers['references']) ? $headers['references'] : 0;\n\n if (isset($headers['in-reply-to'])) {\n $in_reply_to = $headers['in-reply-to'];\n $len = strlen($in_reply_to);\n // If references string exceeds 512 characters we will cut it from left\n // to fit the database column.\n if ($len > 512) {\n $start = strpos($in_reply_to, '<', $len - 512);\n $in_reply_to = substr($in_reply_to, $start);\n // If no < found, just drop it entirely.\n if (strlen($in_reply_to) > 512) {\n watchdog('og_mailinglist', 'An email with nid=@nid, cid=@cid came in which had too long and unsplittable reference list: %refs', array('@nid' => $nid, '@cid' => $cid, '%refs' => $in_reply_to), WATCHDOG_ERROR);\n $in_reply_to = 0;\n }\n }\n }\n else {\n $in_reply_to = 0;\n }\n\n $data = array(\n 'nid' => $nid,\n 'cid' => $cid,\n 'source' => $source,\n 'message_id' => $message_id,\n 'in_reply_to' => $in_reply_to,\n 'references_header' => $references,\n 'parent_message_id' => $parent_message_id,\n );\n return drupal_write_record('og_mailinglist_source', $data);\n}", "title": "" }, { "docid": "5cf796df9966001fd400e2bec759a992", "score": "0.465339", "text": "public function sendNotification() {\n\n\t\t# create message\n\t\t$mail = t3lib_div::makeInstance('t3lib_mail_Message');\n\n\t\t# set from\n\t\t$mail->setFrom(array($GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress'] => $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromName']));\n\n\t\t# set recipient\n\t\t$mail->setTo($this->settings['notificationEmailAddress']);\n\t\t$mail->setSubject('Error 404: ' . $this->request['host']);\n\n\t\t# set message\n\t\t$message = array();\n\t\t$message[] = 'Address: ' . $this->request['address'];\n\t\t$message[] = 'Path: ' . $this->request['path'];\n\t\t$message[] = 'Host: ' . $this->request['host'];\n\t\t$message[] = 'Referrer: ' . (($this->request['referrer']) ? $this->request['referrer'] : '(empty)');\n\t\t$message[] = 'User Agent: ' . (($this->request['user_agent']) ? $this->request['user_agent'] : '(empty)');\n\t\t$message[] = 'IP Address: ' . $this->request['ip_address'];\n\t\t$message[] = 'Count: ' . $this->request['count'];\n\n\t\t$mail->setBody(implode(chr(10), $message));\n\n\t\t# send the message\n\t\t$mail->send();\n\t}", "title": "" }, { "docid": "4cbd968bd7044dceb78cc9c69b84f2e6", "score": "0.4652889", "text": "public function updateBuggy()\n {\n $this->setBuggy(self::HEALTH_OK);\n\n if (null == $this->getCefBegin() || trim($this->getCefBegin()) == '') {\n $this->setBuggy(self::HEALTH_BUGGY);\n }\n\n if ($this->isDeadLineExceeded()) {\n $this->setBuggy(self::HEALTH_BUGGY);\n }\n\n if ($this->isFullFinished()) {\n if (null == $this->getCefEnd() || trim($this->getCefEnd()) == '') {\n $this->setBuggy(self::HEALTH_BUGGY);\n }\n\n if (null == $this->getGlobalKpiCorrectionConsideration()) {\n $this->setBuggy(self::HEALTH_BUGGY);\n }\n\n if (null == $this->getGlobalKpiHomeworkPerformed()) {\n $this->setBuggy(self::HEALTH_BUGGY);\n }\n\n if (null == $this->getGlobalKpiParticipation()) {\n $this->setBuggy(self::HEALTH_BUGGY);\n }\n\n if (null == $this->getGlobalKpiVocabularyRetention()) {\n $this->setBuggy(self::HEALTH_BUGGY);\n }\n }\n\n $courses = $this->getCourses();\n if (null == $courses) {\n $this->courses = new ArrayCollection();\n $courses = new ArrayCollection();\n }\n\n $adminNotifs = $this->getAdminNotifs();\n if (null == $adminNotifs) {\n $adminNotifs = new ArrayCollection();\n $this->adminNotifs = new ArrayCollection();\n }\n\n // admin notif txt 40j\n if (count($courses) < $this->getTotalHours() && count($courses) > 0) {\n\n $adminNotif40d = null;\n foreach ($adminNotifs as $notif) {\n if ($notif->getType() == AdminNotif::TYPE_TXT_40D_AFTER_COURS) {\n $adminNotif40d = $notif;\n }\n }\n $after40d = new DateTime('now');\n $after40d->modify('+1 hour');\n\n $i = 0;\n $lastCoursFound = false;\n do {\n $lastCours = $courses[$i];\n if ($lastCours instanceof Cours) {\n $lastCoursFound = true;\n $after40d->setTimestamp($lastCours->getDtEnd()\n ->getTimestamp());\n }\n $i++;\n } while ($i < count($courses) && $lastCoursFound == true);\n $after40d->modify('+40 days');\n\n if (null == $adminNotif40d) {\n $adminNotif40d = new AdminNotif();\n $adminNotif40d->setType(AdminNotif::TYPE_TXT_40D_AFTER_COURS);\n }\n $adminNotif40d->setStatus(AdminNotif::PENDING);\n $adminNotif40d->setDtStart($after40d);\n $adminNotif40d->setTimeCredit($this);\n $this->addAdminNotif($adminNotif40d);\n } else {\n foreach ($adminNotifs as $notif) {\n if ($notif->getType() == AdminNotif::TYPE_TXT_40D_AFTER_COURS) {\n if ($notif->getStatus() == AdminNotif::PENDING) {\n $this->removeAdminNotif($notif);\n }\n }\n }\n }\n\n $adminNotifs = $this->getAdminNotifs();\n if (null == $adminNotifs) {\n $adminNotifs = new ArrayCollection();\n }\n // admin notif txt tc edit\n if (count($courses) == $this->getTotalHours()) {\n if (null == $this->getImprovement1() || null == $this->getImprovement2() || null == $this->getImprovement3() || null == $this->getImprovement4() || null == $this->getImprovement5() || null == $this->getLevelDesc1() || null == $this->getLevelDesc2() || null == $this->getLevelDesc3() || null == $this->getLevelDesc4() || null == $this->getLevelDesc5() || null == $this->getLevelDesc6() || null == $this->getLevelDesc7() || null == $this->getProgress1() || null == $this->getProgress2() || null == $this->getProgress3() || null == $this->getProgress4() || null == $this->getProgress5() || null == $this->getProgress6() || null == $this->getProgress7()) {\n $after1h = new DateTime('now');\n $after1h->modify('+1 hour');\n $after1h->setTimestamp($courses[0]->getDtEnd()\n ->getTimestamp());\n\n $adminNotiftxtTcEdit = null;\n foreach ($adminNotifs as $notif) {\n if ($notif->getType() == AdminNotif::TYPE_TXT_TIMECREDIT_EDIT) {\n $adminNotiftxtTcEdit = $notif;\n }\n }\n\n if (null == $adminNotiftxtTcEdit) {\n $adminNotiftxtTcEdit = new AdminNotif();\n $adminNotiftxtTcEdit->setType(AdminNotif::TYPE_TXT_TIMECREDIT_EDIT);\n }\n $adminNotiftxtTcEdit->setStatus(AdminNotif::PENDING);\n $adminNotiftxtTcEdit->setDtStart($after1h);\n $adminNotiftxtTcEdit->setTimeCredit($this);\n $this->addAdminNotif($adminNotiftxtTcEdit);\n } else {\n foreach ($adminNotifs as $notif) {\n if ($notif->getType() == AdminNotif::TYPE_TXT_TIMECREDIT_EDIT) {\n $this->removeAdminNotif($notif);\n }\n }\n }\n } else {\n foreach ($adminNotifs as $notif) {\n if ($notif->getType() == AdminNotif::TYPE_TXT_TIMECREDIT_EDIT) {\n $this->removeAdminNotif($notif);\n }\n }\n }\n\n $teacherNotifs = $this->getTeacherNotifs();\n if (null == $teacherNotifs) {\n $teacherNotifs = new ArrayCollection();\n $this->teacherNotifs = new ArrayCollection();\n }\n // teacher notif txt tc\n if (count($courses) == $this->getTotalHours()) {\n if (null == $this->getImprovement1() || null == $this->getImprovement2() || null == $this->getImprovement3() || null == $this->getImprovement4() || null == $this->getImprovement5() || null == $this->getLevelDesc1() || null == $this->getLevelDesc2() || null == $this->getLevelDesc3() || null == $this->getLevelDesc4() || null == $this->getLevelDesc5() || null == $this->getLevelDesc6() || null == $this->getLevelDesc7() || null == $this->getProgress1() || null == $this->getProgress2() || null == $this->getProgress3() || null == $this->getProgress4() || null == $this->getProgress5() || null == $this->getProgress6() || null == $this->getProgress7()) {\n $after1h = new DateTime('now');\n $after1h->modify('+1 hour');\n $after1h->setTimestamp($courses[0]->getDtEnd()\n ->getTimestamp());\n $teacherNotifTxtTcEdit = null;\n $lastTeacher = $courses[0]->getTeacher();\n if (null != $lastTeacher) {\n foreach ($teacherNotifs as $notif) {\n if ($notif->getType() == TeacherNotif::TYPE_TXT_TIMECREDIT_EDIT) {\n $teacherNotifTxtTcEdit = $notif;\n }\n }\n if (null == $teacherNotifTxtTcEdit) {\n $teacherNotifTxtTcEdit = new TeacherNotif();\n $teacherNotifTxtTcEdit->setType(TeacherNotif::TYPE_TXT_TIMECREDIT_EDIT);\n }\n $teacherNotifTxtTcEdit->setTeacher($lastTeacher);\n $teacherNotifTxtTcEdit->setStatus(TeacherNotif::PENDING);\n $teacherNotifTxtTcEdit->setDtStart($after1h);\n $teacherNotifTxtTcEdit->setTimeCredit($this);\n $this->addTeacherNotif($teacherNotifTxtTcEdit);\n } else {\n foreach ($teacherNotifs as $notif) {\n if ($notif->getType() == TeacherNotif::TYPE_TXT_TIMECREDIT_EDIT) {\n $this->removeTeacherNotif($notif);\n }\n }\n }\n } else {\n foreach ($teacherNotifs as $notif) {\n if ($notif->getType() == TeacherNotif::TYPE_TXT_TIMECREDIT_EDIT) {\n $this->removeTeacherNotif($notif);\n }\n }\n }\n } else {\n foreach ($teacherNotifs as $notif) {\n if ($notif->getType() == TeacherNotif::TYPE_TXT_TIMECREDIT_EDIT) {\n $this->removeTeacherNotif($notif);\n }\n }\n }\n\n $teacherNotifs = $this->getTeacherNotifs();\n if (null == $teacherNotifs) {\n $teacherNotifs = new ArrayCollection();\n }\n // teacher notif email tc\n if (count($courses) == $this->getTotalHours()) {\n if (null == $this->getImprovement1() || null == $this->getImprovement2() || null == $this->getImprovement3() || null == $this->getImprovement4() || null == $this->getImprovement5() || null == $this->getLevelDesc1() || null == $this->getLevelDesc2() || null == $this->getLevelDesc3() || null == $this->getLevelDesc4() || null == $this->getLevelDesc5() || null == $this->getLevelDesc6() || null == $this->getLevelDesc7() || null == $this->getProgress1() || null == $this->getProgress2() || null == $this->getProgress3() || null == $this->getProgress4() || null == $this->getProgress5() || null == $this->getProgress6() || null == $this->getProgress7()) {\n $after1h = new DateTime('now');\n $after1h->modify('+1 hour');\n $after1h->setTimestamp($courses[0]->getDtEnd()\n ->getTimestamp());\n $teacherNotifEmailTcEdit = null;\n $lastTeacher = $courses[0]->getTeacher();\n if (null != $lastTeacher) {\n foreach ($teacherNotifs as $notif) {\n if ($notif->getType() == TeacherNotif::TYPE_EMAIL_TIMECREDIT_EDIT) {\n $teacherNotifEmailTcEdit = $notif;\n }\n }\n if (null == $teacherNotifEmailTcEdit) {\n $teacherNotifEmailTcEdit = new TeacherNotif();\n $teacherNotifEmailTcEdit->setType(TeacherNotif::TYPE_EMAIL_TIMECREDIT_EDIT);\n $teacherNotifEmailTcEdit->setTeacher($lastTeacher);\n $teacherNotifEmailTcEdit->setStatus(TeacherNotif::PENDING);\n $teacherNotifEmailTcEdit->setDtStart($after1h);\n $teacherNotifEmailTcEdit->setTimeCredit($this);\n $this->addTeacherNotif($teacherNotifEmailTcEdit);\n } elseif ($teacherNotifEmailTcEdit->getStatus() == TeacherNotif::ERROR) {\n $teacherNotifEmailTcEdit = new TeacherNotif();\n $teacherNotifEmailTcEdit->setType(TeacherNotif::TYPE_EMAIL_TIMECREDIT_EDIT);\n $teacherNotifEmailTcEdit->setTeacher($lastTeacher);\n $teacherNotifEmailTcEdit->setStatus(TeacherNotif::PENDING);\n $teacherNotifEmailTcEdit->setDtStart($after1h);\n $teacherNotifEmailTcEdit->setTimeCredit($this);\n $this->addTeacherNotif($teacherNotifEmailTcEdit);\n } elseif ($teacherNotifEmailTcEdit->getStatus() == TeacherNotif::PENDING) {\n $teacherNotifEmailTcEdit->setTeacher($lastTeacher);\n $teacherNotifEmailTcEdit->setStatus(TeacherNotif::PENDING);\n $teacherNotifEmailTcEdit->setDtStart($after1h);\n $teacherNotifEmailTcEdit->setTimeCredit($this);\n $this->addTeacherNotif($teacherNotifEmailTcEdit);\n }\n } else {\n foreach ($teacherNotifs as $notif) {\n if ($notif->getType() == TeacherNotif::TYPE_EMAIL_TIMECREDIT_EDIT && $notif->getStatus() == TeacherNotif::PENDING) {\n $this->removeTeacherNotif($notif);\n }\n }\n }\n } else {\n foreach ($teacherNotifs as $notif) {\n if ($notif->getType() == TeacherNotif::TYPE_EMAIL_TIMECREDIT_EDIT && $notif->getStatus() == TeacherNotif::PENDING) {\n $this->removeTeacherNotif($notif);\n }\n }\n }\n } else {\n foreach ($teacherNotifs as $notif) {\n if ($notif->getType() == TeacherNotif::TYPE_EMAIL_TIMECREDIT_EDIT && $notif->getStatus() == TeacherNotif::PENDING) {\n $this->removeTeacherNotif($notif);\n }\n }\n }\n\n $traineeNotifs = $this->getTraineeNotifs();\n if (null == $traineeNotifs) {\n $traineeNotifs = new ArrayCollection();\n $this->traineeNotifs = new ArrayCollection();\n }\n // trainee notif txt survey begin\n if (count($courses) >= 2) {\n if ($this->getSurveyBegin() == self::SURVEY_NOTFILLED) {\n $after1hAfter2c = new DateTime('now');\n $after1hAfter2c->modify('+1 hour');\n $i = 2;\n $secondCoursFound = false;\n do {\n $secondCours = $courses[count($courses) - $i];\n if ($secondCours instanceof Cours) {\n $secondCoursFound = true;\n $after1hAfter2c->setTimestamp($secondCours->getDtEnd()\n ->getTimestamp());\n }\n $i++;\n } while ($i <= count($courses) && $secondCoursFound != true);\n\n $traineeNotifTxtSB = null;\n foreach ($traineeNotifs as $notif) {\n if ($notif->getType() == TraineeNotif::TYPE_TXT_SURVEYBEGIN) {\n $traineeNotifTxtSB = $notif;\n }\n }\n\n if (null == $traineeNotifTxtSB) {\n $traineeNotifTxtSB = new TraineeNotif();\n $traineeNotifTxtSB->setType(TraineeNotif::TYPE_TXT_SURVEYBEGIN);\n }\n $traineeNotifTxtSB->setTrainee($this->getTrainee());\n $traineeNotifTxtSB->setStatus(TraineeNotif::PENDING);\n $traineeNotifTxtSB->setDtStart($after1hAfter2c);\n $traineeNotifTxtSB->setTimeCredit($this);\n $this->addTraineeNotif($traineeNotifTxtSB);\n } else {\n foreach ($traineeNotifs as $notif) {\n if ($notif->getType() == TraineeNotif::TYPE_TXT_SURVEYBEGIN) {\n if ($notif->getStatus() == TraineeNotif::PENDING) {\n $this->removeTraineeNotif($notif);\n }\n }\n }\n }\n } else {\n foreach ($traineeNotifs as $notif) {\n if ($notif->getType() == TraineeNotif::TYPE_TXT_SURVEYBEGIN) {\n if ($notif->getStatus() == TraineeNotif::PENDING) {\n $this->removeTraineeNotif($notif);\n }\n }\n }\n }\n\n $traineeNotifs = $this->getTraineeNotifs();\n if (null == $traineeNotifs) {\n $traineeNotifs = new ArrayCollection();\n }\n // trainee notif email survey begin\n if (count($courses) > 2) {\n if ($this->getSurveyBegin() == self::SURVEY_NOTFILLED) {\n $after1hAfter2c = new DateTime('now');\n $after1hAfter2c->modify('+1 hour');\n $i = 2;\n $secondCoursFound = false;\n do {\n $secondCours = $courses[count($courses) - $i];\n if ($secondCours instanceof Cours) {\n $secondCoursFound = true;\n $after1hAfter2c->setTimestamp($secondCours->getDtEnd()\n ->getTimestamp());\n }\n $i++;\n } while ($i <= count($courses) && $secondCoursFound != true);\n $traineeNotifEmailSB = null;\n foreach ($traineeNotifs as $notif) {\n if ($notif->getType() == TraineeNotif::TYPE_EMAIL_SURVEYBEGIN) {\n $traineeNotifEmailSB = $notif;\n }\n }\n\n if (null == $traineeNotifEmailSB) {\n $traineeNotifEmailSB = new TraineeNotif();\n $traineeNotifEmailSB->setType(TraineeNotif::TYPE_EMAIL_SURVEYBEGIN);\n $traineeNotifEmailSB->setTrainee($this->getTrainee());\n $traineeNotifEmailSB->setStatus(TraineeNotif::PENDING);\n $traineeNotifEmailSB->setDtStart($after1hAfter2c);\n $traineeNotifEmailSB->setTimeCredit($this);\n $this->addTraineeNotif($traineeNotifEmailSB);\n } elseif ($traineeNotifEmailSB->getStatus() == TraineeNotif::ERROR) {\n $traineeNotifEmailSB = new TraineeNotif();\n $traineeNotifEmailSB->setType(TraineeNotif::TYPE_EMAIL_SURVEYBEGIN);\n $traineeNotifEmailSB->setTrainee($this->getTrainee());\n $traineeNotifEmailSB->setStatus(TraineeNotif::PENDING);\n $traineeNotifEmailSB->setDtStart($after1hAfter2c);\n $traineeNotifEmailSB->setTimeCredit($this);\n $this->addTraineeNotif($traineeNotifEmailSB);\n } elseif ($traineeNotifEmailSB->getStatus() == TraineeNotif::PENDING) {\n $traineeNotifEmailSB->setTrainee($this->getTrainee());\n $traineeNotifEmailSB->setStatus(TraineeNotif::PENDING);\n $traineeNotifEmailSB->setDtStart($after1hAfter2c);\n $traineeNotifEmailSB->setTimeCredit($this);\n $this->addTraineeNotif($traineeNotifEmailSB);\n }\n } else {\n foreach ($traineeNotifs as $notif) {\n if ($notif->getType() == TraineeNotif::TYPE_EMAIL_SURVEYBEGIN) {\n if ($notif->getStatus() == TraineeNotif::PENDING) {\n $this->removeTraineeNotif($notif);\n }\n }\n }\n }\n } else {\n foreach ($traineeNotifs as $notif) {\n if ($notif->getType() == TraineeNotif::TYPE_EMAIL_SURVEYBEGIN) {\n if ($notif->getStatus() == TraineeNotif::PENDING) {\n $this->removeTraineeNotif($notif);\n }\n }\n }\n }\n\n $traineeNotifs = $this->getTraineeNotifs();\n if (null == $traineeNotifs) {\n $traineeNotifs = new ArrayCollection();\n }\n // trainee notif txt survey end\n if (count($courses) == $this->getTotalHours()) {\n if ($this->getSurveyEnd() == self::SURVEY_NOTFILLED) {\n $after1h = new DateTime('now');\n $after1h->setTimestamp($courses[0]->getDtEnd()\n ->getTimestamp());\n $traineeNotifTxtSE = null;\n foreach ($traineeNotifs as $notif) {\n if ($notif->getType() == TraineeNotif::TYPE_TXT_SURVEYEND) {\n $traineeNotifTxtSE = $notif;\n }\n }\n\n if (null == $traineeNotifTxtSE) {\n $traineeNotifTxtSE = new TraineeNotif();\n $traineeNotifTxtSE->setType(TraineeNotif::TYPE_TXT_SURVEYEND);\n }\n $traineeNotifTxtSE->setTrainee($this->getTrainee());\n $traineeNotifTxtSE->setStatus(TraineeNotif::PENDING);\n $traineeNotifTxtSE->setDtStart($after1h);\n $traineeNotifTxtSE->setTimeCredit($this);\n $this->addTraineeNotif($traineeNotifTxtSE);\n } else {\n foreach ($traineeNotifs as $notif) {\n if ($notif->getType() == TraineeNotif::TYPE_TXT_SURVEYEND) {\n if ($notif->getStatus() == TraineeNotif::PENDING) {\n $this->removeTraineeNotif($notif);\n }\n }\n }\n }\n } else {\n foreach ($traineeNotifs as $notif) {\n if ($notif->getType() == TraineeNotif::TYPE_TXT_SURVEYEND) {\n if ($notif->getStatus() == TraineeNotif::PENDING) {\n $this->removeTraineeNotif($notif);\n }\n }\n }\n }\n\n $traineeNotifs = $this->getTraineeNotifs();\n if (null == $traineeNotifs) {\n $traineeNotifs = new ArrayCollection();\n }\n // trainee notif email survey end\n if (count($courses) == $this->getTotalHours()) {\n if ($this->getSurveyEnd() == self::SURVEY_NOTFILLED) {\n $after1h = new DateTime('now');\n $after1h->modify('+1 hour');\n $after1h->setTimestamp($courses[0]->getDtEnd()\n ->getTimestamp());\n $traineeNotifEmailSE = null;\n foreach ($traineeNotifs as $notif) {\n if ($notif->getType() == TraineeNotif::TYPE_EMAIL_SURVEYEND) {\n $traineeNotifEmailSE = $notif;\n }\n }\n\n if (null == $traineeNotifEmailSE) {\n $traineeNotifEmailSE = new TraineeNotif();\n $traineeNotifEmailSE->setType(TraineeNotif::TYPE_EMAIL_SURVEYEND);\n $traineeNotifEmailSE->setTrainee($this->getTrainee());\n $traineeNotifEmailSE->setStatus(TraineeNotif::PENDING);\n $traineeNotifEmailSE->setDtStart($after1h);\n $traineeNotifEmailSE->setTimeCredit($this);\n $this->addTraineeNotif($traineeNotifEmailSE);\n } elseif ($traineeNotifEmailSE->getStatus() == TraineeNotif::ERROR) {\n $traineeNotifEmailSE = new TraineeNotif();\n $traineeNotifEmailSE->setType(TraineeNotif::TYPE_EMAIL_SURVEYEND);\n $traineeNotifEmailSE->setTrainee($this->getTrainee());\n $traineeNotifEmailSE->setStatus(TraineeNotif::PENDING);\n $traineeNotifEmailSE->setDtStart($after1h);\n $traineeNotifEmailSE->setTimeCredit($this);\n $this->addTraineeNotif($traineeNotifEmailSE);\n } elseif ($traineeNotifEmailSE->getStatus() == TraineeNotif::PENDING) {\n $traineeNotifEmailSE->setTrainee($this->getTrainee());\n $traineeNotifEmailSE->setStatus(TraineeNotif::PENDING);\n $traineeNotifEmailSE->setDtStart($after1h);\n $traineeNotifEmailSE->setTimeCredit($this);\n $this->addTraineeNotif($traineeNotifEmailSE);\n }\n } else {\n foreach ($traineeNotifs as $notif) {\n if ($notif->getType() == TraineeNotif::TYPE_EMAIL_SURVEYEND) {\n if ($notif->getStatus() == TraineeNotif::PENDING) {\n $this->removeTraineeNotif($notif);\n }\n }\n }\n }\n } else {\n foreach ($traineeNotifs as $notif) {\n if ($notif->getType() == TraineeNotif::TYPE_EMAIL_SURVEYEND) {\n if ($notif->getStatus() == TraineeNotif::PENDING) {\n $this->removeTraineeNotif($notif);\n }\n }\n }\n }\n\n $traineeNotifs = $this->getTraineeNotifs();\n if (null == $traineeNotifs) {\n $traineeNotifs = new ArrayCollection();\n }\n // trainee notif email +15d\n if (count($courses) < $this->getTotalHours() && count($courses) > 0) {\n\n $traineeNotif15d = null;\n foreach ($traineeNotifs as $notif) {\n if ($notif->getType() == TraineeNotif::TYPE_EMAIL_15D_AFTER_COURS) {\n $traineeNotif15d = $notif;\n }\n }\n $after15d = new DateTime('now');\n $after15d->modify('+1 hour');\n $i = 0;\n $lastCoursFound = false;\n do {\n $lastCours = $courses[$i];\n if ($lastCours instanceof Cours) {\n $lastCoursFound = true;\n $after15d->setTimestamp($lastCours->getDtEnd()\n ->getTimestamp());\n }\n $i++;\n } while ($i < count($courses) && $lastCoursFound == true);\n $after15d->modify('+15 days');\n\n if (null == $traineeNotif15d) {\n $traineeNotif15d = new TraineeNotif();\n $traineeNotif15d->setType(TraineeNotif::TYPE_EMAIL_15D_AFTER_COURS);\n $traineeNotif15d->setTrainee($this->getTrainee());\n $traineeNotif15d->setStatus(TraineeNotif::PENDING);\n $traineeNotif15d->setDtStart($after15d);\n $traineeNotif15d->setTimeCredit($this);\n $this->addTraineeNotif($traineeNotif15d);\n } elseif ($traineeNotif15d->getStatus() == TraineeNotif::ERROR) {\n $traineeNotif15d = new TraineeNotif();\n $traineeNotif15d->setType(TraineeNotif::TYPE_EMAIL_15D_AFTER_COURS);\n $traineeNotif15d->setTrainee($this->getTrainee());\n $traineeNotif15d->setStatus(TraineeNotif::PENDING);\n $traineeNotif15d->setDtStart($after15d);\n $traineeNotif15d->setTimeCredit($this);\n $this->addTraineeNotif($traineeNotif15d);\n } elseif ($traineeNotif15d->getStatus() == TraineeNotif::PENDING) {\n $traineeNotif15d->setTrainee($this->getTrainee());\n $traineeNotif15d->setStatus(TraineeNotif::PENDING);\n $traineeNotif15d->setDtStart($after15d);\n $traineeNotif15d->setTimeCredit($this);\n $this->addTraineeNotif($traineeNotif15d);\n }\n } else {\n foreach ($adminNotifs as $notif) {\n if ($notif->getType() == TraineeNotif::TYPE_EMAIL_15D_AFTER_COURS) {\n if ($notif->getStatus() == TraineeNotif::PENDING) {\n $this->removeTraineeNotif($notif);\n }\n }\n }\n }\n\n $traineeNotifs = $this->getTraineeNotifs();\n if (null == $traineeNotifs) {\n $traineeNotifs = new ArrayCollection();\n }\n // trainee notif email +30d\n if (count($courses) < $this->getTotalHours() && count($courses) > 0) {\n\n $traineeNotif30d = null;\n foreach ($traineeNotifs as $notif) {\n if ($notif->getType() == TraineeNotif::TYPE_EMAIL_30D_AFTER_COURS) {\n $traineeNotif30d = $notif;\n }\n }\n $after30d = new DateTime('now');\n $after30d->modify('+1 hour');\n $i = 0;\n $lastCoursFound = false;\n do {\n $lastCours = $courses[$i];\n if ($lastCours instanceof Cours) {\n $lastCoursFound = true;\n $after30d->setTimestamp($lastCours->getDtEnd()\n ->getTimestamp());\n }\n $i++;\n } while ($i < count($courses) && $lastCoursFound == true);\n $after30d->modify('+30 days');\n\n if (null == $traineeNotif30d) {\n $traineeNotif30d = new TraineeNotif();\n $traineeNotif30d->setType(TraineeNotif::TYPE_EMAIL_30D_AFTER_COURS);\n $traineeNotif30d->setTrainee($this->getTrainee());\n $traineeNotif30d->setStatus(TraineeNotif::PENDING);\n $traineeNotif30d->setDtStart($after30d);\n $traineeNotif30d->setTimeCredit($this);\n $this->addTraineeNotif($traineeNotif30d);\n } elseif ($traineeNotif30d->getStatus() == TraineeNotif::ERROR) {\n $traineeNotif30d->setTrainee($this->getTrainee());\n $traineeNotif30d->setStatus(TraineeNotif::PENDING);\n $traineeNotif30d->setDtStart($after30d);\n $traineeNotif30d->setTimeCredit($this);\n $this->addTraineeNotif($traineeNotif30d);\n } elseif ($traineeNotif30d->getStatus() == TraineeNotif::PENDING) {\n $traineeNotif30d->setTrainee($this->getTrainee());\n $traineeNotif30d->setStatus(TraineeNotif::PENDING);\n $traineeNotif30d->setDtStart($after30d);\n $traineeNotif30d->setTimeCredit($this);\n $this->addTraineeNotif($traineeNotif30d);\n }\n } else {\n foreach ($adminNotifs as $notif) {\n if ($notif->getType() == TraineeNotif::TYPE_EMAIL_30D_AFTER_COURS) {\n if ($notif->getStatus() == TraineeNotif::PENDING) {\n $this->removeTraineeNotif($notif);\n }\n }\n }\n }\n }", "title": "" }, { "docid": "10a9792351ae6ba3941cfa8d33e37dd4", "score": "0.46483633", "text": "function admin_notices()\n {\n }", "title": "" }, { "docid": "fc0f2f86730eb723faaafc368f187e21", "score": "0.4646734", "text": "public function updateParentJobOrder() {\n\n //define variables\n $isSuccess = FALSE;\n $message = \"\";\n $data = array();\n $code = SuccessClass::$CODE_SUCCESSFUL;\n\n try\n {\n \n \n\n $isSuccess = ( $message == \"\" ); \n\n //initialize an instance from success class\n $success = SuccessClass::initialize($isSuccess);\n\n if( $isSuccess )\n {\n //get post data \n $id = $this->input->post('id');\n $field = trim($this->input->post('field'));\n $value = trim($this->input->post('value'));\n \n $updateData = array(\n $field => $value\n );\n \n $this->contractorclass->updateConParentJob($id, $updateData);\n \n \n \n }\n }\n catch( Exception $e )\n {\n $success = SuccessClass::initialize(FALSE);\n $message = $e->getMessage();\n $message = $message . \" - \" . $e->getTraceAsString(); \n //log the exception\n $this->logClass->log(\"exception : \", $message);\n $code = SuccessClass::$CODE_EXCEPTION_OCCURED;\n }\n\n //set the variables\n $success -> setMessage($message);\n $success -> setCode($code);\n $success -> setData($data);\n \n //convert result data to json and set output\n $this->output\n ->set_content_type('application/json')\n ->set_output(json_encode($success)); \n \n }", "title": "" }, { "docid": "9f056e634204fc80b1433ddc50a0abd0", "score": "0.46430406", "text": "public function admin_notices() {\n\t\tif (isset($_GET['msg'])) {\n\t\t\t$class = (isset($_GET['r']) && $_GET['r'] == 'success') ? 'updated' : 'error';\n\t\t\t?>\n\t\t\t<div class=\"<?php echo esc_attr($class); ?>\">\n\t\t\t\t<p><?php echo esc_html(urldecode(stripslashes($_GET['msg']))); ?></p>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}\n\t}", "title": "" }, { "docid": "38bb403f3dd58a2c13ae5c41b690a057", "score": "0.46406052", "text": "public function testRespondsToParentCall() {\n\t\terror_reporting(($backup = error_reporting()) & ~E_USER_DEPRECATED);\n\n\t\t$this->assertTrue(MockPost::respondsTo('invokeMethod'));\n\t\t$this->assertFalse(MockPost::respondsTo('fooBarBaz'));\n\n\t\terror_reporting($backup);\n\t}", "title": "" }, { "docid": "99f57351a955d80db3d4a2b12442b8a6", "score": "0.46313506", "text": "public function notify()\n {\n foreach ($this->observers as $observer) {\n /**\n * @var SplObserver\n */\n $observer->update($this);\n }\n }", "title": "" }, { "docid": "a9b759257cd3d04edd1893193be7ba08", "score": "0.46311533", "text": "function update($parent)\n\t{\n\n\t}", "title": "" }, { "docid": "ee3b1584d7ca7e49a6de3058fbdcf37e", "score": "0.46307725", "text": "function mybrary_service_notification_update ($data)\n{\n global $user;\n\n $response = array(\n 'status' => 'error',\n 'message' => t('Oops! Something goes wrong.')\n );\n \n // check required fields\n $errors = array();\n if (empty($data['nid'])) {\n $errors[] = t('Id is missing');\n }\n \n if (empty($data['field_status'])) {\n $errors[] = t('Status is missing');\n }\n \n if (empty($errors)) {\n // load item to update\n $node = node_load($data['nid']);\n \n if ($node) {\n $node->field_status[$node->language] = array(array('value' => $data['field_status']));\n \n try {\n \n node_save($node);\n \n $response = array(\n 'status' => 'success',\n 'message' => t('Successfully updated notification.')\n );\n } catch (Exception $e) {\n watchdog('mybrary_service_notification',\n 'Notification update error [' . $e->getCode() . '] ' .\n $e->getMessage(), NULL, WATCHDOG_ERROR);\n $response = services_error($e->getMessage(), 500);\n }\n } else {\n $response['message'] = t('Not found notification with ID: !id.', array('!id' => $data['nid']));\n }\n \n } else {\n $response['message'] = implode(\"; \", $errors);\n }\n\n return $response;\n}", "title": "" }, { "docid": "2be674216d55b67847bd919e1b08f29c", "score": "0.4630647", "text": "public function _adminNotices() {\n\n\t\t// get warp xml\n\t\t$xml = $this['dom']->create($this['path']->path('warp:warp.xml'), 'xml');\n\n\t\t// cache writable ?\n\t\tif (!file_exists($this->cache_path) || !is_writable($this->cache_path)) {\n\t\t\t$update['cache'] = \"Cache not writable, please check directory permissions ({$this->cache_path})\";\n\t\t}\n\n\t\t// update check\n\t\tif ($url = $xml->first('updateUrl')->text()) {\n\n\t\t\t// create check urls\n\t\t\t$urls['tmpl'] = sprintf('%s?application=%s&version=%s&format=raw', $url, get_template(), $this->xml->first('version')->text());\n\t\t\t$urls['warp'] = sprintf('%s?application=%s&version=%s&format=raw', $url, 'warp', $xml->first('version')->text());\n\n\t\t\tforeach ($urls as $type => $url) {\n\n\t\t\t\t// only check once a day\n\t\t\t\t$hash = md5($url.date('Y-m-d'));\n\t\t\t\tif ($this['option']->get(\"{$type}_check\") != $hash) {\n\t\t\t\t\tif ($request = $this['http']->get($url)) {\n\t\t\t\t\t\t$this['option']->set(\"{$type}_check\", $hash);\n\t\t\t\t\t\t$this['option']->set(\"{$type}_data\", $request['body']);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// decode response and set message\n\t\t\t\tif (($data = json_decode($this['option']->get(\"{$type}_data\"))) && $data->status == 'update-available') {\n\t\t\t\t\t$update[$type] = $data->message;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\t// show notice\n\t\tif (!empty($update)) {\n\t\t\techo '<div class=\"update-nag\">'.implode('<br>', $update).'</div>';\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "726d2499f6058f1bcfb62c6eee98a687", "score": "0.46291137", "text": "private function sendNotificationEvents()\r\n {\r\n // Keep track of previous notifications sent to avoid duplicates. \r\n static $prevNotifications = array();\r\n\r\n // Poll database for new messages for each conversation. \r\n $messagesDao = MessagesDao::getInstance();\r\n $currNotifications = $messagesDao->getMsgNotifications(\r\n $this->currConversation->conversation_id, $this->user->user_id, $this->user->is_crew);\r\n\r\n if(count($currNotifications) > 0)\r\n {\r\n // Create array containing the current parent & thread ids. \r\n $thisConvoAndThreads = array();\r\n if($this->currConversation->parent_conversation_id == null)\r\n {\r\n $thisConvoAndThreads = array_merge(\r\n array($this->currConversation->conversation_id),\r\n $this->currConversation->thread_ids);\r\n }\r\n else\r\n {\r\n $thisConvoAndThreads = array_merge(\r\n array($this->currConversation->parent_conversation_id),\r\n $this->conversations[$this->currConversation->parent_conversation_id]->thread_ids);\r\n }\r\n\r\n // Consolidate thread notifications with parent if either:\r\n // a) threads are disabled OR\r\n // b) the user is viewing a different convo altogether\r\n $mission = MissionConfig::getInstance();\r\n $tempNotifications = array();\r\n foreach($currNotifications as $convoId => $convo)\r\n {\r\n if(!isset($this->conversations[$convoId]))\r\n {\r\n $conversationsDao = ConversationsDao::getInstance();\r\n $this->conversations = $conversationsDao->getConversations($this->user->user_id);\r\n $this->sendNewConversations();\r\n }\r\n\r\n // If no threads AND message received in a thread (would only happen if disabling threads during a mission)\r\n // OR threads are enabled and you receive a message in a different coversation, then \r\n // consolidate notifications for parent. \r\n if((!$mission->feat_convo_threads && $this->conversations[$convoId]->parent_conversation_id != null) ||\r\n ($mission->feat_convo_threads && !in_array($convoId, $thisConvoAndThreads)))\r\n {\r\n // Consolidate notifications for parent conversation\r\n $id = $convoId;\r\n if($this->conversations[$convoId]->parent_conversation_id != null)\r\n {\r\n $id = $this->conversations[$convoId]->parent_conversation_id;\r\n }\r\n\r\n // Initialize the notification for that convo\r\n if(!isset($tempNotifications[$id]))\r\n {\r\n $tempNotifications[$id]['num_new'] = 0;\r\n $tempNotifications[$id]['num_important'] = 0;\r\n }\r\n\r\n // Assign results from query for number of new messages and important messages\r\n $tempNotifications[$id]['num_new'] += $convo['num_new'];\r\n $tempNotifications[$id]['num_important'] += $convo['num_important'];\r\n }\r\n // Otherwise, assume the notifications can be sent with the thread/conversation id. \r\n else\r\n {\r\n $tempNotifications[$convoId] = $convo;\r\n }\r\n }\r\n\r\n // Save notifications. \r\n $currNotifications = $tempNotifications;\r\n\r\n // Ensure we only send new notifications by iterating through the list of new\r\n // notificaitons and comparing that to the previous list sent. \r\n // Note that num_important is sent as a binary flag (either there were important \r\n // messages or not).\r\n $newNotifications = array();\r\n foreach($currNotifications as $convoId => $msgs)\r\n {\r\n if(count($prevNotifications) == 0)\r\n {\r\n $newNotifications[$convoId] = $currNotifications[$convoId];\r\n $newNotifications[$convoId]['notif_important'] = ($msgs['num_important'] > 0) ? 1:0;\r\n }\r\n else if(!isset($prevNotifications[$convoId]))\r\n {\r\n $newNotifications[$convoId] = $currNotifications[$convoId];\r\n $newNotifications[$convoId]['notif_important'] = ($currNotifications[$convoId]['num_important']) ? 1:0;\r\n }\r\n else if($prevNotifications[$convoId]['num_new'] != $currNotifications[$convoId]['num_new'])\r\n {\r\n $newNotifications[$convoId] = $currNotifications[$convoId];\r\n $newNotifications[$convoId]['notif_important'] = \r\n ($prevNotifications[$convoId]['num_important'] != $currNotifications[$convoId]['num_important']) ? 1:0;\r\n }\r\n }\r\n\r\n // Send a new message indicating the conversation id and num messages. \r\n foreach($newNotifications as $convoId=>$numMsgs)\r\n {\r\n if($convoId != $this->currConversation->conversation_id)\r\n {\r\n $this->sendEventStream(\r\n 'notification', \r\n array(\r\n 'conversation_id' => $convoId,\r\n 'num_messages' => $numMsgs['num_new'],\r\n 'num_important' => $numMsgs['num_important'],\r\n 'notif_important' => $numMsgs['notif_important'],\r\n )\r\n );\r\n }\r\n }\r\n\r\n // Track notifications already sent. \r\n $prevNotifications = $currNotifications;\r\n }\r\n }", "title": "" }, { "docid": "5d784765c26a70791df1f79b671a7618", "score": "0.46285453", "text": "function network_admin_notices()\n {\n }", "title": "" }, { "docid": "87310105ce0ce37ee86f1520afa2cd50", "score": "0.4626835", "text": "function save($store, $parententryid, $action)\n\t\t{\n\t\t\t$result = false;\n\n\t\t\t// Save the properties\n\t\t\t$messageProps = $GLOBALS[\"operations\"]->saveAppointment($store, $parententryid, $action);\n\t\t\t\n\t\t\t/**\n\t\t\t * If there is an error in exception then send the failed action to the client\n\t\t\t * and send the error message with it.\n\t\t\t */\n\t\t\tif(isset($messageProps[\"isexceptionallowed\"])) {\n\t\t\t\t$data = array();\n\t\t\t\t$data[\"attributes\"] = array(\"type\" => \"failed\");\n\t\t\t\t\n\t\t\t\tif($messageProps[\"isexceptionallowed\"] === \"false\"){\n\t\t\t\t\t$data[\"action_type\"] = \"moveoccurence\";\n\t\t\t\t\t$data[\"error_message\"] = _(\"Unable to reschedule occurrence: either the new occurrence skips over an existing occurrence, or an occurrence is already present on this day.\");\n\t\t\t\t}\n \t\t\t\tarray_push($this->responseData[\"action\"],$data);\n \t\t\t\t$GLOBALS[\"bus\"]->addData($this->responseData);\n \t\t\t} else if (isset($messageProps['error'])) {\n\t\t\t\t$data = array();\n\t\t\t\t$data[\"attributes\"] = array(\"type\" => \"failed\");\n\t\t\t\t\n\t\t\t\t$data[\"action_type\"] = \"bookresource\";\n\t\t\t\t$data[\"errorcode\"] = $messageProps['error'];\n\t\t\t\t$data[\"displayname\"] = $messageProps['displayname'];\n\n\t\t\t\tarray_push($this->responseData[\"action\"], $data);\n\t\t\t\t$GLOBALS[\"bus\"]->addData($this->responseData);\n\t\t\t} else if(isset($messageProps[\"remindertimeerror\"])) {\n\t\t\t\t$data = array();\n\t\t\t\t$data[\"attributes\"] = array(\"type\" => \"failed\");\n\t\t\t\t\n\t\t\t\tif(!$messageProps[\"remindertimeerror\"]){\n\t\t\t\t\t$data[\"action_type\"] = \"remindertime\";\n\t\t\t\t\t$data[\"error_message\"] = _(\"Cannot set a reminder to appear before the previous occurence. Reset reminder to save the change\");\n\t\t\t\t}\n \t\t\t\tarray_push($this->responseData[\"action\"],$data);\n \t\t\t\t$GLOBALS[\"bus\"]->addData($this->responseData);\n \t\t\t}\n\n\t\t\t// Send notifications that this object has changed\n\t\t\tif($messageProps){\n\t\t\t\t$GLOBALS[\"bus\"]->notify($this->entryid, TABLE_SAVE, $messageProps);\n\t\t\t\t$result = true;\n\t\t\t}\n\t\t\treturn $result;\n\t\t}", "title": "" }, { "docid": "5b7f6e6ebcd0063872c2c56376bf371b", "score": "0.4626474", "text": "function access_ensure_bug_level( $p_access_level, $p_bug_id, $p_user_id=null ) {\r\n\t\tif ( !access_has_bug_level( $p_access_level, $p_bug_id, $p_user_id ) ) {\r\n\t\t\taccess_denied();\r\n\t\t}\r\n \t}", "title": "" }, { "docid": "ade0ff7129e56260767f254895c44cdd", "score": "0.46237576", "text": "function hrb_dispute_period_ending_notify_parties( $workspace, $end_time, $notify_time, $notify_times ) {\n\n\t$participants = hrb_p2p_get_workspace_participants( $workspace->ID );\n\tif ( ! $participants ) {\n\t\treturn;\n\t}\n\n\t$project = hrb_p2p_get_workspace_post( $workspace->ID );\n\n\t$workspace_link = html_link( hrb_get_workspace_url( $workspace->ID ), $workspace->post_title );\n\n\t$days_left = appthemes_days_between_dates( $end_time, $notify_time );\n\n\tforeach ( $participants->results as $worker ) {\n\t\t$subject_message = sprintf( __( '%1$d %2$s left to open a dispute on - %3$s -', APP_TD ), $days_left, _n( 'Day', 'Days', $days_left, APP_TD ), $workspace_link );\n\n\t\t$content = sprintf(\n\t\t\t__( 'Hello %1$s,%2$s\n\t\t\tjust to inform you that the deadline for opening a dispute on %3$s ends in %4$d %5$s.%2$s\n\t\t\tIf you do not open a dispute before this time, the employer will be fully refunded and you will not get paid.', APP_TD ),\n\t\t\t$worker->display_name, \"\\r\\n\\r\\n\", $workspace_link, $days_left, _n( 'Day', 'Days', $days_left, APP_TD )\n\t\t);\n\n\t\t$participant = array(\n\t\t\t'recipient' => $worker->ID,\n\t\t\t'message' => $subject_message,\n\t\t\t'send_mail' => array(\n\t\t\t\t'content' => wpautop( $content ),\n\t\t\t),\n\t\t\t'meta' => array(\n\t\t\t\t'subject' => wp_strip_all_tags( $subject_message ),\n\t\t\t\t'project_id' => $project->ID,\n\t\t\t\t'action' => hrb_get_workspace_url( $workspace->ID ),\n\t\t\t),\n\t\t);\n\n\t\tappthemes_send_notification( $participant['recipient'], $participant['message'], 'action', $participant['meta'], array( 'send_mail' => $participant['send_mail'] ) );\n\t}\n\n\t// update the notify times meta\n\n\t$notify_times[ $notify_time ] = 1;\n\n\tupdate_post_meta( $workspace->ID, 'dispute_end_notify_times', $notify_times );\n}", "title": "" }, { "docid": "2b77432628f8dd415d0f5222d71666ee", "score": "0.46195725", "text": "public function handleActions() {\n\n\t\t// Log exception in database\n\t\tif (in_array($this->_intSeverity, array(1, 2, 3, 4)) && $GLOBALS['db']) {\n\t\t\t$objErrorLog = new ErrorLog();\n\t\t\t$objErrorLog->addErrorToLog($this);\n\t\t\t$intErrorLogId = $objErrorLog->getId();\n\t\t}\n\t\t\n\t\t// Display error message to user\n\t\tif (in_array($this->_intSeverity, array(1, 2, 3, 5))) {\n\t\t\t$objDisplay = new UIErrorDisplay($this->_strErrorTitle, $this->_strMessage, !(is_a($this, 'PermissionsException') || is_a($this, 'SnafuException')), $intErrorLogId, $this);\n\t\t\techo $objDisplay->draw();\n\t\t}\n\t\t\n\t\texit;\n\t\n\t}", "title": "" }, { "docid": "739a66bcc3fa5a7dd1c445092628129e", "score": "0.4614452", "text": "public function manageAlert() {\n $sql = $this->db->select()->from(array(TABLE_NOTIFICATION_UPDATE_DATA), array('update_body'))\n ->where('trigger_id = ?', $this->tid)\n ->where('api_key = ?', 0);\n\n $msg_text = $this->db->fetchOne($sql);\n\n foreach ($this->ph as $key => $val) {\n $msg_text = str_replace('{' . $key . '}', $val, $msg_text);\n $msg_text = str_replace('%7B' . $key . '%7D', $val, $msg_text);\n }\n\t\t//by ashis for dont know\n\t\t$alertto=$this->flagdata==1?$this->mail['from_id']:0;\t\n $insert_data = array('user1' => $this->mail['from_id'],\n 'user2' => $this->mail['to_id'],\n 'created_date' => time(),\n 'modified_date' => time(),\n 'message_type' => '4',\n 'request_text' => $msg_text,\n 'ipaddress' => $_SERVER['REMOTE_ADDR'],\n 'readby' => $this->mail['from_id'],\n\t\t\t'alert_to'=>$alertto);\n $this->db->insert(TABLE_CHAT, $insert_data);\n $this->result_arr['alert'] = is_numeric($this->db->lastInsertId()) ? 'INSERTED' : 'ERROR';\n }", "title": "" }, { "docid": "a46ac40f092dadb1da1a604ae9c9e235", "score": "0.46136516", "text": "function view_note( $p_event, $p_bug_id, $p_bugnote_id, $p_private ) {\n\t\tif ( !access_has_bug_level( plugin_config_get( 'view_threshold' ), $p_bug_id ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( isset( $this->update_cache[$p_bugnote_id] ) ) {\n\t\t\t$t_update = $this->update_cache[$p_bugnote_id];\n\t\t\t$t_css = $p_private ? 'bugnote-private' : 'bugnote-public';\n\t\t\t$t_css2 = $p_private ? 'bugnote-note-private' : 'bugnote-note-public';\n\t\t\t$t_revisions = '';\n\t\t\tif ( isset( $this->revision_cache[$p_bugnote_id] )\n\t\t\t\t\t&& ((int) $this->revision_cache[$p_bugnote_id] > 1)) {\n\t\t\t\t$t_revisions = '<a href=\"' . plugin_page( 'revision_page' ) . '&bugnote_id=' . $p_bugnote_id . '\">' .\n\t\t\t\t\tsprintf( lang_get( 'view_num_revisions' ), $this->revision_cache[$p_bugnote_id] ) . '</a>';\n\t\t\t}\n\n\t\t\techo '<tr class=\"bugnote\"><td class=\"', $t_css, '\">',\n\t\t\tplugin_lang_get( 'bonuses_fines' ),\n\t\t\t\"<br/>\",\n\t\t\t$t_revisions,\n\t\t\t'</td><td class=\"', $t_css2, '\">',\n\t\t\t\tuser_get_name($t_update['user_id']) . ': ' . motives_format_amount($t_update['amount']),\n\t\t\t'</td></tr>';\n\t\t}\n\t}", "title": "" }, { "docid": "c7009282c1c323dbf513b4b1e58588c7", "score": "0.4610993", "text": "function html_button_bug_reopen( $p_bug_id ) {\n\t$t_status = bug_get_field( $p_bug_id, 'status' );\n\t$t_project = bug_get_field( $p_bug_id, 'project_id' );\n\t$t_reopen_status = config_get( 'bug_reopen_status', null, null, $t_project );\n\n\tif( access_has_bug_level( config_get( 'reopen_bug_threshold', null, null, $t_project ), $p_bug_id ) ||\n\t\t\t(( bug_get_field( $p_bug_id, 'reporter_id' ) == auth_get_current_user_id() ) && ( ON == config_get( 'allow_reporter_reopen', null, null, $t_project ) ) ) ) {\n\t\thtml_button( 'bug_change_status_page.php', lang_get( 'reopen_bug_button' ), array( 'id' => $p_bug_id, 'new_status' => $t_reopen_status, 'reopen_flag' => ON ) );\n\t}\n}", "title": "" }, { "docid": "fd8a6cd11c1c09c162aaaa0bfbeb1d6c", "score": "0.46109185", "text": "function add_note( $p_event, $p_bug_id, $p_bugnote_id ) {\n\t\tif ( !access_has_bug_level( plugin_config_get( 'update_threshold' ), $p_bug_id ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$f_amount = gpc_get_int( 'plugin_motives_amount', 0 );\n\t\t$f_user_id = gpc_get_int( 'plugin_motives_user', 0 );\n\t\tif ( $f_user_id > 0 && $f_amount != 0) {\n\t\t\t$t_reporter_id = auth_get_current_user_id();\n\t\t\tmotives_add( $p_bug_id, $p_bugnote_id, $t_reporter_id, $f_user_id, $f_amount );\n\t\t\tmotives_revision_add( $p_bug_id, $p_bugnote_id, $t_reporter_id, $f_user_id, $f_amount );\n\t\t}\n\t}", "title": "" }, { "docid": "6d48685cf058353c5460454d7102739c", "score": "0.4607351", "text": "function deleteLostIssues() {\r\n\t\r\n\t$GLOBALS['log']->setID('deleteLostIssues');\r\n\t$GLOBALS['log']->begin('Deleting lost issues and content');\r\n\t\r\n\t// reset id arrays\r\n\t$nl_id = array();\r\n\t$is_id = array();\r\n\t$cn_id = array();\r\n\t\r\n\t// show existing newsletters\r\n\tif ($nl_rs = executeQuery(\"SELECT id, name, active FROM newsletter\")) {\r\n\t\twhile ( $nl_r = $nl_rs->getrow() ) {\r\n\t\t\t$nl_id[] = $nl_r['id'];\r\n\t\t\techo sprintf(\"Newsletter (%s) %s is%s Active<br>\",$nl_r['id'],$nl_r['name'],($nl_r['active']?'':' not'));\r\n\t\t\t// show active issues\r\n\t\t\tif ($is_rs = executeQuery(\"SELECT id, title, date FROM issue WHERE newsletter_id=\".$nl_r['id'])) {\r\n\t\t\t\twhile ( $is_r = $is_rs->getrow() ) {\r\n\t\t\t\t\t#$is_id[] = $is_r['id'];\r\n\t\t\t\t\techo sprintf(\"... Issue (%s) %s von %s<br>\",$is_r['id'],$is_r['title'],$is_r['date']);\r\n\t\t\t\t\t// show active content\r\n\t\t\t\t\tif ($cn_rs = executeQuery(\"SELECT id, title, url FROM content WHERE issue_id=\".$is_r['id'].\" ORDER BY flags, displayorder\")) {\r\n\t\t\t\t\t\twhile ( $cn_r = $cn_rs->getrow() ) {\r\n\t\t\t\t\t\t\t#$cn_id[] = $cn_r['id'];\r\n\t\t\t\t\t\t\techo sprintf(\"...... Content (%s) %s - %s<br>\",$cn_r['id'],$cn_r['title'],$cn_r['url']);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$cn_rs->free();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$is_rs->free();\r\n\t\t\t}\r\n\t\t}\r\n\t\t$nl_rs->free();\r\n\t}\r\n\t\r\n\t// show non active issues\r\n\techo '<span style=\"color:red\">';\r\n\t$cond = \"newsletter_id NOT IN (\".join(',',$nl_id).\")\";\r\n\tif ($is_rs = executeQuery(\"SELECT id, title, date FROM issue WHERE \".$cond)) {\r\n\t\twhile ( $is_r = $is_rs->getrow() ) {\r\n\t\t\t$GLOBALS['log']->message(sprintf(\"Found lost Issue (%s) %s dated %s\",$is_r['id'],$is_r['title'],$is_r['date']));\r\n\t\t\tif (\r\n\t\t\t\texecuteSQL(\"DELETE FROM content WHERE issue_id=\".$is_r['id'])\r\n\t\t\t\t&& executeSQL(\"DELETE FROM issue WHERE id=\".$is_r['id'])\r\n\t\t\t\t) $GLOBALS['log']->message(\"...... DELETED\");\r\n\t\t}\r\n\t\t$is_rs->free();\r\n\t}\r\n\tif ( !executeSQL(\"DELETE FROM newsletter_subscription_form WHERE \".$cond) ) $GLOBALS['log']->error(\"Could not delete newsletter_subscription_form entries\");\r\n\tif ( !executeSQL(\"DELETE FROM subscription_form_subscriber WHERE \".$cond) ) $GLOBALS['log']->error(\"Could not delete subcription_form_subscriber entries\");\r\n\tif ( !executeSQL(\"DELETE FROM topic WHERE \".$cond) ) $GLOBALS['log']->error(\"Could not delete topic entries\");\r\n\t$GLOBALS['log']->end(true);\r\n}", "title": "" }, { "docid": "069109f47aebbd90d13738e3153cf496", "score": "0.46062285", "text": "public static function init() {\n\t\tadd_action(\n\t\t\t'wp_ajax_mainwp-child_dismiss_warnings',\n\t\t\tarray(\n\t\t\t\tself::get_class_name(),\n\t\t\t\t'dismiss_warnings',\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "05c403147261710df97393d78f6b282e", "score": "0.45914114", "text": "function checkbackend_campaign_addition_fcv_detailsEntry($parentid,$version)\n\t{\n\t\t\n\t\t\n\t\t$retunArray= array();\n\t\t\n\t\t$sql=\"select * from backend_campaign_addition_fcv_details where parentid='\".$parentid.\"' and version='\".$version.\"' and processed_flag=1 and isdeleted=0\";\n\t\t$restulset= parent::execQuery($sql,$this->finance);\n\t\t\n\t\tif(mysql_num_rows($restulset))\n\t\t{\t\n\t\t\t$retunArray['process_message'] ='Entry present on backend_campaign_addition_fcv_details for parentid = '.$parentid.' and version '.$version;\n\t\t\t$retunArray['process_status'] = 'fail';\n\t\t\t$retunArray['status'] = 'fail';\n\n\t\t}else\n\t\t{\n\t\t\t$retunArray['process_status'] = 'pass';\n\t\t\t$retunArray['status'] = 'pass';\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tif(DEBUG_MODE)\n\t\t{\n\t\t\techo '<br><b>sql</b>'.$sql; \n\t\t\techo '<br><b>Error:</b>'.$this->mysql_error;\n\t\t\techo '<br><b> mysql_num_rows </b>'.mysql_num_rows($restulset);\n\t\t\techo '<br><b>retunArray</b>'; print_r($retunArray);\n\t\t}\n\t\treturn $retunArray;\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "e9d19dd908ba62b028ef187468e1e721", "score": "0.45764908", "text": "public function handleChild() {\n \n // Install child signal handler.\n pcntl_signal(SIGINT, array($this, 'handleSignal'));\n pcntl_signal(SIGHUP, array($this, 'handleSignal'));\n\n // Handle initialization of protocol. This is called once for \n // every new child created.\n $this->protocol->initialize();\n \n $requests= 0;\n while (!$this->terminate && $requests < $this->maxrequests) {\n $read= array($this->socket->getHandle());\n $null= NULL;\n $timeout= NULL;\n\n // Check to see if there are sockets with data on it. In case we can\n // find some, loop over the returned sockets. In case the select() call\n // fails, break out of the loop and terminate the server - this really\n // should not happen!\n do {\n $socketSelectInterrupted = FALSE;\n if (FALSE === socket_select($read, $null, $null, $timeout)) {\n\n // If socket_select has been interrupted by a signal, it will return FALSE,\n // but no actual error occurred - so check for \"real\" errors before throwing\n // an exception. If no error has occurred, skip over to the socket_select again.\n if (0 !== socket_last_error($this->socket->_sock)) {\n throw new SocketException('Call to select() failed');\n } else {\n $socketSelectInterrupted = TRUE;\n if ($this->terminate || $this->restart) return;\n }\n }\n // if socket_select was interrupted by signal, retry socket_select\n } while ($socketSelectInterrupted);\n\n $m= $this->socket->accept();\n\n // Sanity check\n if (!($m instanceof Socket)) {\n $this->cat && $this->cat->warn('Accepted socket type error ', xp::typeOf($m));\n return;\n }\n\n // Handle accepted socket\n if ($this->protocol instanceof SocketAcceptHandler) {\n if (!$this->protocol->handleAccept($m)) {\n $m->close();\n continue;\n }\n }\n \n $tcp= getprotobyname('tcp');\n $this->tcpnodelay && $m->setOption($tcp, TCP_NODELAY, TRUE);\n $this->protocol->handleConnect($m);\n\n // Handle communication while client is connected.\n // If meanwhile the server is about to be shut\n // down, break loop and disconnect the client.\n do {\n try {\n $this->protocol->handleData($m);\n } catch (IOException $e) {\n $this->protocol->handleError($m, $e);\n break;\n }\n } while ($m->isConnected() && !$m->eof() && !$this->terminate);\n\n $m->close();\n $this->protocol->handleDisconnect($m);\n $requests++;\n $this->cat && $this->cat->debug(\n 'Child', getmypid(), \n 'requests=', $requests, 'max= ', $this->maxrequests\n );\n \n delete($m);\n }\n }", "title": "" }, { "docid": "46ba407aa41905d3e7905273b2b4e8a4", "score": "0.45686808", "text": "public function process()\n {\n // $this->getTrap()->store();\n }", "title": "" }, { "docid": "e32f64945841a455b4bcaa42e4182579", "score": "0.45675972", "text": "function _node_onchange_child() {\n\t\t$this->_client = -1;\n\t\tparent::_node_onchange_child();\n\t}", "title": "" }, { "docid": "28e8ab9294ac8d3fc010cd748378d1ef", "score": "0.456736", "text": "public function notify() {\r\n\r\n $get = $this->input->get();\r\n\r\n $oTrx = NULL;\r\n $error = 0;\r\n $errorMsg = \"\";\r\n\r\n try {\r\n\r\n // Empty response\r\n if(empty($get)) { throw new Exception(\"Couldn't find transaction response\", 400); }\r\n\r\n $get = (object)$get;\r\n\r\n // Find transaction\r\n $oTrx = $this->transactionv2_model->findByAttr('trx', $get->orderid);\r\n if(empty($oTrx)) {\r\n $error = $this->config->item(\"cardinal_TRX_NOT_FOUND\");\r\n $errorMsg = \"Transaction not found\";\r\n }\r\n\r\n $idTrx = $oTrx->idTrx;\r\n $oCardinalTrx = $this->cardinal_model->findByAttr(\"idTrx\", $idTrx); \r\n //print_r($oCardinalTrx); exit;\r\n if(empty($oCardinalTrx)) { throw new Exception(\"Cardinal transaction (idTrx: $idTrx) not found\", $this->config->item(\"cardinal_TRX_NOT_FOUND\")); }\r\n\r\n $idCardinal = $oCardinalTrx->idCardinal;\r\n\r\n // At this point we can update info\r\n $hash = $get->hash;\r\n unset($get->hash);\r\n $get->hash_post = $hash;\r\n\r\n if(is_null($this->cardinal_model->updateTrx($idCardinal, $get))) {\r\n $error = $this->config->item(\"cardinal_NOTIFY_FAILURE\");\r\n $errorMsg = \"Couldn't update Cardinal transaction\";\r\n }\r\n $oCardinalTrx = $this->cardinal_model->findByAttr(\"idTrx\", $idTrx); \r\n\r\n // Responses\r\n if($get->response != self::RESPONSE_OK) {\r\n $error = $this->config->item(\"cardinal_TRX_FAILED\");\r\n $errorMsg = \"Transaction failed by Cardinal gateway. \" . $get->responsetext;\r\n }\r\n\r\n if($get->response_code != self::RESPONSE_CODE_OK) {\r\n $error = $this->config->item(\"cardinal_TRX_REJECTED\");\r\n $errorMsg = \"Transaction was rejected by Cardinal gateway. \" . $get->responsetext;\r\n }\r\n\r\n // Minimal validations\r\n if((float)$get->amount != (float)$oTrx->amount) {\r\n $error = $this->config->item(\"cardinal_TRX_BAD_PRICE\");\r\n $errorMsg = \"Transaction's price doesn't match. Process aborted\";\r\n }\r\n\r\n if($get->cvvresponse == self::CVV2_NO_MATCH) {\r\n $error = $this->config->item(\"cardinal_TRX_BAD_CVV2\");\r\n $errorMsg = \"CVV2 doesn't match. Process aborted\";\r\n }\r\n\r\n // If error is on, throw exception after update state\r\n if($error > 0) { throw new Exception($errorMsg, $error); }\r\n\r\n // Notify\r\n $this->_notify3rdParty(\r\n $oTrx->urlNotify, // notify 3rd party (commerce)\r\n 1, // 0 NOK, 1 OK\r\n $oTrx->codExternal, // trx 3rd party (commerce)\r\n \"OK\" // description\r\n );\r\n\r\n $oCommerce = $this->core_model->getCommerceById($oTrx->idCommerce);\r\n /*echo \"<pre>\";\r\n print_r();\r\n echo \"</pre>\"; exit;*/\r\n $data = [\r\n \"orderId\" => $oCardinalTrx->orderid,\r\n \"authCode\" => $oCardinalTrx->authcode,\r\n \"bgColor\" => !is_null($oCommerce->bgColor) ? \"#\".$oCommerce->bgColor : \"#\".$this->config->item(\"BgColorDefault\"),\r\n \"fontColor\" => !is_null($oCommerce->fontColor) ? \"#\".$oCommerce->fontColor : \"#\".$this->config->item(\"FontColorDefault\"),\r\n \"logo\" => !is_null($oCommerce->logo) ? $this->config->item(\"LogosPath\").$oCommerce->logo : NULL,\r\n \"amount\" => '$'.number_format(floatval($oTrx->amount), 0, ',', '.'),\r\n \"urlOk\" => $oTrx->urlOk,\r\n \"creationDate\" => date(\"d/m/Y H:i:s\", strtotime($oTrx->creationDate)),\r\n \"status\" => $oCardinalTrx->responsetext,\r\n \"commerceName\" => $oCommerce->name\r\n ];\r\n\r\n $this->load->view('cardinal/success', $data);\r\n\r\n } catch(Exception $e) {\r\n\r\n if(!is_null($oTrx)) {\r\n\r\n // Update error state in transaction\r\n $this->sanitize->generateLog(__METHOD__, $e->getMessage(), 'error');\r\n $this->core_model->updateStageTrx($oTrx->idTrx, $e->getCode());\r\n\r\n // Notify to commerce\r\n $this->_notify3rdParty(\r\n $oTrx->urlNotify, // notify 3rd party (commerce)\r\n 0, // 0 NOK, 1 OK\r\n $oTrx->codExternal, // trx 3rd party (commerce)\r\n $e->getMessage() // description\r\n );\r\n }\r\n\r\n\r\n $pass = [\r\n 'logo' => false,\r\n 'message' => \"No se pudo completar la transacción requerida: \" . $e->getMessage()\r\n ];\r\n\r\n $this->load->view('transaction/unexpected', $pass);\r\n\r\n }\r\n\r\n }", "title": "" }, { "docid": "ad9cbb97bf7b651abf29288a3c6b90d4", "score": "0.45593464", "text": "private function re_run_notification() {\n\t\t$content = sprintf(\n\t\t\t/* translators: %1$s expands to Yoast SEO, %2$s is a link start tag to the Onboarding Wizard, %3$s is the link closing tag. */\n\t\t\tesc_html__( 'Want to make sure your %1$s settings are still OK? %2$sOpen the configuration wizard again%3$s to validate them.', 'wordpress-seo' ),\n\t\t\t'Yoast SEO',\n\t\t\t'<a href=\"' . esc_url( admin_url( 'admin.php?page=' . WPSEO_Configuration_Page::PAGE_IDENTIFIER ) ) . '\">',\n\t\t\t'</a>'\n\t\t);\n\n\t\treturn $this->notification( __( 'Check SEO configuration', 'wordpress-seo' ), $content );\n\t}", "title": "" }, { "docid": "e97a7d248aadb5811e8f20c718fd08b3", "score": "0.4554782", "text": "function update_comment($iassign_submissionid) {\r\n global $USER, $DB, $OUTPUT;\r\n if (! has_capability ( 'mod/iassign:submitiassign', $this->context, $USER->id ) or is_siteadmin())\r\n $receiver = 1; // student message to teacher\r\n else\r\n $receiver = 2; // teacher message to student\r\n\r\n $verify_message = $DB->get_records ( 'iassign_submission_comment', array ('iassign_submissionid' => $iassign_submissionid ) ); //\r\n\r\n if ($verify_message) {\r\n foreach ( $verify_message as $message ) {\r\n if ($message->receiver == $receiver) {\r\n $newentry = new stdClass ();\r\n $newentry->id = $message->id;\r\n $newentry->return_status = 1;\r\n if (! $DB->update_record ( 'iassign_submission_comment', $newentry )) {\r\n print_error ( 'error_update', 'iassign' );\r\n } // if (!$DB->update_record('iassign_submission_comment', $newentry))\r\n } // if ($message->receiver == $receiver)\r\n add_to_log ( $this->course->id, \"iassign\", \"update comment\", \"view.php?id={$this->iassign->id }\", $iassign_submissionid, $this->cm->id, $USER->id );\r\n } // foreach ($verify_message as $message)\r\n }\r\n }", "title": "" }, { "docid": "80ec856f18d0ec72cd3471db7c76882f", "score": "0.45535994", "text": "public function slate_update_notify($params) {\n $current_time = $this->get_current_time();\n $accept_notifycation = strtotime(date(\"Y-m-d H:i:s\", strtotime('+1 minutes', $current_time)));\n\n $data = [\n 'sender' => $params['sender'],\n 'fixed_timestamp' => $accept_notifycation,\n 'sendout_id' => $params['sendout_id']\n ];\n\n $final_data = [];\n $type_sender = [\n REVIEW_CONTRACTOR => [$params['receiver_HM'], $accept_notifycation],\n REVIEW_CONTRACTOR_REMINDER => [$params['receiver_HM'], strtotime(\"+4 hours\", $accept_notifycation)],\n REVIEW_CONTRACTOR_REMINDER_SR => [$params['receiver_PC_SR'], strtotime(\"+6 hours\", $accept_notifycation)]\n ];\n foreach ($type_sender as $type => $sender) {\n if (!empty($sender[0])) {\n $tmp_data = $data;\n $tmp_data['receipients'] = $sender[0];\n $tmp_data['typeID'] = $type;\n $tmp_data['trigger_timestamp'] = $sender[1];\n $final_data[] = $tmp_data;\n }\n }\n\n if (!empty($final_data))\n $this->datasave($final_data);\n }", "title": "" }, { "docid": "50ceee0b7e09e1feef535cb75c0247c2", "score": "0.45482877", "text": "function write()\n\t{\n\t\t$fs = new FileStorage( $this->bugfile, FS_WRITE);\n\t\t$fs->write( $this->encode($this->bugs) );\n\t}", "title": "" }, { "docid": "d6c7e9ae058fb4506387fa2c52f4ad65", "score": "0.4547334", "text": "function update($parent) {\n // $parent is the class calling this method\n echo '<p>' . JText::_('COM_AA4J_UPDATE_TEXT') . '</p>';\n $parent->getParent()->setRedirectURL('index.php?option=com_aa4j');\n }", "title": "" }, { "docid": "1536dd12d16148a61e15e14d3e87ff26", "score": "0.4543421", "text": "function triggerDependencies(Sailor $sailor) {\n foreach ($sailor->getRegattas() as $regatta) {\n UpdateManager::queueRequest($regatta, UpdateRequest::ACTIVITY_RP);\n }\n foreach ($sailor->getSeasonsActive() as $season) {\n UpdateManager::queueSchool($sailor->school, UpdateSchoolRequest::ACTIVITY_ROSTER, $season);\n }\n }", "title": "" }, { "docid": "39aa624b3ef0d257dead3e50d369c970", "score": "0.45431507", "text": "function update($parent)\n\t{\n\t\t$this->getHeader(); ?>\n\t\t<h2><?php echo JText::_('COM_JEM_UPDATE_STATUS'); ?>:</h2>\n\t\t<p><?php echo JText::sprintf('COM_JEM_UPDATE_TEXT', $parent->get('manifest')->version); ?></p>;\n\t\t<?php\n\t}", "title": "" }, { "docid": "b5c8dfb80d57966d433ce54f3dcc53a5", "score": "0.4541576", "text": "public function sendEmailsAndTexts(){\n $facilityDao = new FacilityDAO();\n $facilityIds = $facilityDao->findAllFacilityIds();\n $childDao = new childDAO();\n foreach($facilityIds as $id){\n $this->sendMessagesToParents($childDao->findChildrenInFacility($id));\n }\n }", "title": "" }, { "docid": "cacd21b3c3d876ffdb4fdca0de451d3f", "score": "0.45377314", "text": "public function updated(Inspection $inspection)\n\t{\n if ($inspection->ready == 1 && $inspection->reviewed == 1 && $inspection->approved == NULL) {\n // sent email to approval\n // info('sent email to approval');\n\t\t\t// $users = \\App\\Model\\Login::find([2,7]);\n\t\t\t$sr = \\App\\Model\\SystemRole::find(1);\t\t\t// approval\n\t\t\t// $users = $sr->hasmanyposition()->hasmanystaff()->where('active', 1)->get();\n\t\t\t$users = $sr->hasmanyposition()->get();\n\t\t\tforeach ($users as $v) {\n\t\t\t\tforeach($v->hasmanystaff()->where('active', 1)->get() as $k){\n\t\t\t\t\tforeach($k->hasmanylogin()->where('active', 1)->get() as $l){\n\t\t\t\t\t\t$l->notify(new InspectionUserNotification($inspection, $status = 'Review'));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n } elseif ($inspection->ready == 1 && $inspection->reviewed == NULL && $inspection->approved == NULL) {\n // sent email to reviewer\n // info('sent email to reviewer');\n\t\t\t// $users = \\App\\Model\\Login::find([3,6,7,14]);\n\t\t\t$sr = \\App\\Model\\SystemRole::find(2);\t\t\t// reviewer\n\t\t\t// $users = $sr->hasmanyposition()->hasmanystaff()->where('active', 1)->get();\n\t\t\t$users = $sr->hasmanyposition()->get();\n\t\t\tforeach ($users as $v) {\n\t\t\t\tforeach($v->hasmanystaff()->where('active', 1)->get() as $k){\n\t\t\t\t\tforeach($k->hasmanylogin()->where('active', 1)->get() as $l){\n\t\t\t\t\t\t$l->notify(new InspectionUserNotification($inspection, $status = 'Review'));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n } elseif ($inspection->ready == NULL && $inspection->reviewed == NULL && $inspection->approved == NULL) {\n // sent email to creator\n // info('sent email to creator = '.$inspection->staff_id);\n // $user = App\\Model\\Login::find(7);\n $inspection->belongtostaff->notify(new InspectionUserNotification($inspection, $status = 'Update'));\n }\n\t}", "title": "" }, { "docid": "03b0dd3a96079927111122aedce8bfb2", "score": "0.4536668", "text": "function postflight($type, $parent)\n\t{\n\t\t// $type is the type of change (install, update or discover_install)\n\t\techo '<p>' . JText::_('COM_JEM_POSTFLIGHT_' . $type . '_TEXT') . '</p>';\n\n\t\tif ($type == 'update') {\n\n\t\t}\n\t}", "title": "" }, { "docid": "834644686613e38c45b983c2dae163e4", "score": "0.4536211", "text": "public function notice()\n {\n if ($this->is_open) {\n $this->listen();\n }\n }", "title": "" }, { "docid": "1f8d2193030b8e1160f7884659b8d370", "score": "0.45348182", "text": "public function report(Exception $exception)\n {\n \t# Search throught all Handler defined in Package\n\n \tforeach($this -> getHandlers() as $handler){\n \t\t$handler -> report($exception);\n \t}\n\n parent::report($exception);\n }", "title": "" }, { "docid": "5ba2b36428f289cd46dfd0f413c92b34", "score": "0.4533492", "text": "function html_button_bug_monitor( $p_bug_id ) {\n\tif( access_has_bug_level( config_get( 'monitor_bug_threshold' ), $p_bug_id ) ) {\n\t\thtml_button( 'bug_monitor_add.php', lang_get( 'monitor_bug_button' ), array( 'bug_id' => $p_bug_id ) );\n\t}\n}", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "2f9db505006bdaee90a64c0a110d8f5f", "score": "0.0", "text": "public function index()\n {\n $products = Produit::all();\n\n return view('welcome')->with('products', $products);\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": "90f60a2d2b3c2500e55bda8c3ba362da", "score": "0.71897656", "text": "public function index()\n {\n $resources = $this->resourceRepository->all();\n\n return $this->sendResponse($resources->toArray(), \"Resources retrieved successfully\");\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": "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": "19fc4ced7c3387dd13afa92c5a8afae5", "score": "0.7055708", "text": "public function do_list()\r\n\t{\r\n\t\t$sorter = array(\r\n\t\t\t'name' => \"sorter\",\r\n\t\t\t'default' => 'name ASC',\r\n\t\t\t'options' => array(\r\n\t\t\t\t\"name ASC\" => \"Name\",\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t\t$result = $this->model->get_records(array(\r\n\t\t\t'conditionset' => array(\r\n\t\t\t),\r\n\t\t\t'sorter' => $sorter,\r\n\t\t\t'limit' => 10\r\n\t\t\t));\r\n\r\n\t\tinclude($this->get_path(self::ACTION_TYPE_LIST));\r\n\t}", "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": "03aab1a3d0f29df3c9c01f676da4d986", "score": "0.69908047", "text": "public function index()\n\t{\n\t\t$this->listing('recent');\n\t}", "title": "" }, { "docid": "c93e1e2d6b3b2e51a961fef1bdfbb734", "score": "0.69853497", "text": "public function index()\n {\n //\n $pagesize = 20;\n $query = DataResource::orderBy('listorder','desc');\n $list = $query->paginate($pagesize);\n return view('admin.resources',['data'=>$list,'url'=>$this->url]);\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": "18cd5639adcca5b283e7352aa46af4de", "score": "0.69587684", "text": "public function index()\n {\n $this->userCollectListing('0', 'ALL');\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": "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": "22231d816d7e2f1e58fb69799b2104dc", "score": "0.68639404", "text": "public function index()\n {\n $resources = Resource::all();\n\n return view('resources.index', compact('resources'));\n }", "title": "" }, { "docid": "06987da1b6d89d3d1c996205e8a37e46", "score": "0.6860631", "text": "public function index()\n {\n //$records = Category::paginate();\n $records = Category::all();\n //return CategoryResource::collection($records);\n return $this->showAll($records);\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": "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": "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": "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": "c455819674d3f353cb9e20703ef52803", "score": "0.67255723", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "e875f9f43f0899fd4868233dc7733127", "score": "0.67253584", "text": "public function index()\n {\n //\n $loan = Loan::all();\n return LoanResource::collection($loan);\n }", "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": "d5baeaa346c5c7d82493b224630a04fd", "score": "0.6693349", "text": "public function list()\n {\n return view('list', [\n 'component' => 'data-list',\n 'title' => 'Assets',\n 'create_url' => 'assets/create',\n 'count' => Asset::count(),\n 'columns' => [\n 'Path' => 'path',\n ],\n 'rows' => Asset::paginate(10)\n ]);\n }", "title": "" }, { "docid": "350cb7824776140ada3444d8b63c2b9a", "score": "0.66861296", "text": "public function actionList() {\n \n $allartists = array();\n $allartists = Artist::getArtistList();\n $role = Role::getRoles();\n \n require_once(ROOT . '/views/lists/artistlist.php');\n }", "title": "" }, { "docid": "e499e3e7f1a366ffebb6385468f3a0c5", "score": "0.6677873", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $lists = $em->getRepository('HunterBundle:Lists')->findAll();\n\n return $this->render('lists/index.html.twig', array(\n 'lists' => $lists,\n ));\n }", "title": "" }, { "docid": "fc34d7bf0a8503064964866cc73ae555", "score": "0.66639954", "text": "function action_ResourceList()\n {\n\n $this->view = 'ResourceList';\n }", "title": "" }, { "docid": "3768e67b371a22f226e966a98bb745f7", "score": "0.6653828", "text": "public static function list()\n {\n $data = [];\n $data[\"products\"] = DefaultModel::getProducts();\n\n View::createRoot(\"product-list\", $data)->render();\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": "7fe029aedf53dcfabf4dbd68136e211f", "score": "0.6647669", "text": "public function index()\n {\n $items = Item::all();\n return ItemResource::Collection($items);\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": "ddd89648877f652ca4fa01f7cfa10b0c", "score": "0.6634571", "text": "public function index()\n {\n return \\response()->json($this->listing->all());\n }", "title": "" }, { "docid": "a3074d45fbccf32cdbe6810d56d21449", "score": "0.6627834", "text": "public function listAction()\n {\n $this->service->setPaginatorOptions($this->getAppSetting('paginator'));\n $page = (int) $this->param($this->view->translate('page'), 1);\n $projects =$this->service->retrieveAllInvestmentProjects($page);\n $this->view->projects = $projects;\n $this->view->paginator = $this->service->getPaginator($page);\n $this->view->role = Zend_Auth::getInstance()->getIdentity()->roleName;\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": "a14d9338522a9ff2dff64321e93eddd2", "score": "0.6606226", "text": "public function listAction() {\n\t\t\t$this->view->assign('tags', $this->tagRepository->findAll());\n\t\t}", "title": "" }, { "docid": "1fe94a4f4bf96984fb89ede920f77850", "score": "0.6602104", "text": "public function index()\n {\n \t$listings = Listing::orderBy( 'created_at', 'desc' )->get();\n return view( '/listings',compact( 'listings' ) );\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": "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": "bb496e1f3376022c7114e22d5ed48267", "score": "0.6573981", "text": "public function index()\n\t{\n\t\t$this->getItem();\n\t}", "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": "c4bb31a9775a0e667ef62e4f3a23aeab", "score": "0.6563258", "text": "public function listAction() {\n $this->_datatable();\n return array();\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": "25bbf4f08be5c7ace0982ed3e61db475", "score": "0.6553109", "text": "public function list()\n {\n //\n }", "title": "" }, { "docid": "25bbf4f08be5c7ace0982ed3e61db475", "score": "0.6553109", "text": "public function list()\n {\n //\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": "7335a64fbf88651c9293fc7e0bf1a4a1", "score": "0.6548072", "text": "public function getIndex()\r\n { \r\n $response = $this->modelService->getAll();\r\n //return resources listing view\r\n return view(\\OogleeBConfig::get('config.post_index.index'), compact('response'));\r\n }", "title": "" }, { "docid": "83b5665a886532759f6d6fd3177eb43d", "score": "0.65461665", "text": "public function actionList()\n\t{\n\t\t$this->subLayout = \"@humhub/views/layouts/_sublayout\";\n\t\t$data = Desire::getAll(10);\n\t\t$articles = $data['articles'];\n\t\t$count = $data['count'];\n\n\n\n\t\treturn $this->render('list', [\n\t\t\t'articles' => $articles,\n\t\t\t'count' => $count,\n\t\t\t'ajaxUrl' => '/desire/desire/list-ajax?sort='.Yii::$app->request->get('sort'),\n\t\t]);\n\t}", "title": "" }, { "docid": "bc892b43167344bb7550a0e63635634f", "score": "0.6540258", "text": "public function index()\n {\n $students = Student::all();\n return StudentResource::collection($students);\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": "2a2a07c1f7a2727a0de83a5fa87aabaa", "score": "0.65362406", "text": "public function index()\n {\n $books=Book::paginate(10);\n return BookResource::collection($books);\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": "68de2d9bace6b0d21d880e30663096bd", "score": "0.6525593", "text": "public function index()\n {\n return response([\n 'listas' => \\App\\Http\\Resources\\ListaResource::collection(\n Lista::where('user_id', auth()->id())->get()\n ),\n 'message' => 'Listado com sucesso.'\n ], 200);\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": "" } ]
97338e013aa566fedf7a8ede189b4569
Set the MIME type of the content.
[ { "docid": "0f766c3d2b64fbcfe77e5297b7a363fb", "score": "0.6974651", "text": "public function setContentType($content_type) {\n $this->_content_type = $content_type;\n }", "title": "" } ]
[ { "docid": "8318d089993d3059d3b1c249a095d471", "score": "0.8028882", "text": "public static function setContentType ($content_type) {}", "title": "" }, { "docid": "bf33dc3bd6da535e51a5fcce70405046", "score": "0.79501855", "text": "public function setMimetype($value) \n {\n $this->mimetype = $value;\n }", "title": "" }, { "docid": "a2e970f167fd35cfbec6d94f7ccb4bda", "score": "0.79373014", "text": "public function setContentType ($content_type) {}", "title": "" }, { "docid": "01c44285b52415fd59c8442ee9ecf1ab", "score": "0.787693", "text": "public function setMimeType($mime_type);", "title": "" }, { "docid": "eb63bb6e3cbe2f7b8e41a17f67eb84d6", "score": "0.77897877", "text": "public function set_content_type($mime) {\n $this->content_type = strtolower($mime);\n }", "title": "" }, { "docid": "5a5611c595ce4145e0662671fd9b2672", "score": "0.76872236", "text": "public function setContentType(string $type);", "title": "" }, { "docid": "5eba32c5246100962df894634eccdbf6", "score": "0.7655591", "text": "public function setContentType($type);", "title": "" }, { "docid": "3177e8b58c3e2f16d087a850745a3b55", "score": "0.7637976", "text": "public function setContentType($content_type)\n {\n\n }", "title": "" }, { "docid": "3ce43b51aa5a2c0e7f025fe75387af16", "score": "0.75089103", "text": "public function setMimeType($mime);", "title": "" }, { "docid": "11b55e4691da3486e3520a083f46965c", "score": "0.7490713", "text": "public function set_content_type($mime) {\n foreach ($this->driver as $driver) {\n $driver->set_content_type($mime);\n }\n }", "title": "" }, { "docid": "4a26c6f2c690eb6856b8bb841cdd4269", "score": "0.7470599", "text": "public function setContentType($type)\r\n {\r\n $this->withHeader('Content-Type', $type);\r\n }", "title": "" }, { "docid": "ed8fd530a03f3de819a1f42ca1f4a417", "score": "0.746936", "text": "public function setContentType(string $mime, string $charset = 'UTF-8');", "title": "" }, { "docid": "64ed2b1b7c7360f89d8868396d6d4b77", "score": "0.7440264", "text": "public function setContentType($value)\n {\n $this->headers['Content-Type'] = $this->fixContentType($value);\n }", "title": "" }, { "docid": "3d7c3103561d5ad51a1c01bb866a2fd3", "score": "0.7332367", "text": "public function setContentType($type) {\n $this->content_type = $type;\n }", "title": "" }, { "docid": "2f35b7decf14d0d3270de4f805aa22e5", "score": "0.72894317", "text": "public function setContentType($mimetype)\n {\n $this->content_type = $mimetype;\n }", "title": "" }, { "docid": "02ab6d6c8f389ba9a84ee7125827ea6b", "score": "0.724991", "text": "public function set_contenttype($type = '') {\n if (empty($type)) return true;\n \n if (in_array($type, array_keys($this->accept_types))) {\n $this->contenttype = $this->accept_types[$type];\n } else {\n $this->error(\"$type is not a valid Content Type\");\n }\n }", "title": "" }, { "docid": "b4e57b83ca5730d15dc1d45e4c583aab", "score": "0.7214108", "text": "public function setContenttype($c) {\n $this->contenttype= $c;\n }", "title": "" }, { "docid": "031681d29d33e3491e07f0214a57780c", "score": "0.71810406", "text": "public function setMimeType($mime_type) {\n $this->mimeType = $mime_type;\n }", "title": "" }, { "docid": "6d2264fcb3304e6eac535a88da5c9f15", "score": "0.71430725", "text": "public static function SetMime($type, $force = false)\n\t{\n\t\tif(self::$_MIMESET && !$force)\n\t\t{\n\t\t return false;\n\t\t}\n\t\telse\n\t\t{\n\t\t header(\"Content-type: \".$type);\n\t\t self::$_MIMESET = true;\n\t\t}\n\t}", "title": "" }, { "docid": "e0e97db49ffbb6686a2980b45b858eb3", "score": "0.70648706", "text": "public function setMimeType(string $mime): void\n {\n $this->mimetype = $mime;\n }", "title": "" }, { "docid": "12fca7a25b86c6015eb34432eb5566df", "score": "0.70597196", "text": "public function setContentType($contentType, $charset=null) {}", "title": "" }, { "docid": "fc87a874644d6aafee8a64d506e0f281", "score": "0.70517206", "text": "public function setContentType(?string $value): void {\n $this->getBackingStore()->set('contentType', $value);\n }", "title": "" }, { "docid": "386fb789939e7ca481e6b1dcc7693630", "score": "0.70286053", "text": "public function setContentType($type) {\n\t\tif(self::PlainTextContent !== $type && self::HtmlContent != $type) {\n\t\t\tAppLog::error('invalid content type', __FILE__, __LINE__, __FUNCTION__);\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->m_contentType = $type;\n\t\treturn true;\n\t}", "title": "" }, { "docid": "0b05395573432c1b7cd56d3db708b4b0", "score": "0.7014369", "text": "public function setContentType($content_type) {\n $this->contentType = $content_type;\n }", "title": "" }, { "docid": "d4061a35a75b857de8240138a6ada51e", "score": "0.69984955", "text": "private function setContentType(string $type) {\n header('Content-Type: ' . $type);\n }", "title": "" }, { "docid": "54cad72e57cdad07d08da16c4a4c2398", "score": "0.6978454", "text": "public function setContentType($val)\n {\n $this->_propDict[\"contentType\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "af462a02f939b3ed30cb096b5a7e897e", "score": "0.6965725", "text": "public static function setContentType($mimetype = 'application/octet-stream')\n {\n self::appendHeader('Content-Type', $mimetype);\n }", "title": "" }, { "docid": "6130a05b601a4d9fa3c6b32ec5541618", "score": "0.69545543", "text": "function setContentType($type, $charset = false) {\n\t\t$this->setHeader('Content-Type', $type . ($charset ? '; charset=' . $charset : ''));\n\t}", "title": "" }, { "docid": "c65beaa0dda55274a3efee82fd68f6cd", "score": "0.6819037", "text": "public function setContentType($value)\n {\n return $this->set('ContentType', $value);\n }", "title": "" }, { "docid": "c65beaa0dda55274a3efee82fd68f6cd", "score": "0.6819037", "text": "public function setContentType($value)\n {\n return $this->set('ContentType', $value);\n }", "title": "" }, { "docid": "c65beaa0dda55274a3efee82fd68f6cd", "score": "0.6819037", "text": "public function setContentType($value)\n {\n return $this->set('ContentType', $value);\n }", "title": "" }, { "docid": "c65beaa0dda55274a3efee82fd68f6cd", "score": "0.6819037", "text": "public function setContentType($value)\n {\n return $this->set('ContentType', $value);\n }", "title": "" }, { "docid": "c65beaa0dda55274a3efee82fd68f6cd", "score": "0.6819037", "text": "public function setContentType($value)\n {\n return $this->set('ContentType', $value);\n }", "title": "" }, { "docid": "c65beaa0dda55274a3efee82fd68f6cd", "score": "0.6819037", "text": "public function setContentType($value)\n {\n return $this->set('ContentType', $value);\n }", "title": "" }, { "docid": "9c4c2301d00ec1035c4880b5ae972f58", "score": "0.68066895", "text": "public function mime(string $type): void\n {\n $this->withMimeType($type);\n }", "title": "" }, { "docid": "a21ac43ee4aeeea366d2fb0480cec66f", "score": "0.6778403", "text": "function esportz_set_content_type()\r\n{\r\n return \"text/html\";\r\n}", "title": "" }, { "docid": "0d2929570595e8b4f2ed0a71ebc0f9db", "score": "0.6769226", "text": "public function withMimeType(string $type): void\n {\n static::$mimeType = $type;\n }", "title": "" }, { "docid": "9183b7e48116f842ec18d744ebbb65d5", "score": "0.67384094", "text": "private static function setContentType($contentType){\n header('Content-Type: '.$contentType);\n }", "title": "" }, { "docid": "91eed71d34ce7ef0a9d20257688ac138", "score": "0.66889745", "text": "function hz_set_contenttype($type, $charset = 'UTF-8')\n{\n\tswitch ($type) {\n\t\tcase 'javascript':\n\t\t\t@header('Content-Type: text/javascript; charset='.$charset);\n\t\t\tbreak;\n\n\t\tcase 'json':\n\t\t\t@header('Content-Type: application/json; charset='.$charset);\n\t\t\tbreak;\n\n\t\tcase 'xml':\n\t\t\t@header('Content-Type: application/xml; charset='.$charset);\n\t\t\tbreak;\n\n\t\tcase 'css':\n\t\t\t@header('Content-Type: text/css; charset='.$charset);\n\t\t\tbreak;\n\n\t\tcase 'plain':\n\t\t\t@header('Content-Type: text/plain; charset='.$charset);\n\t\t\tbreak;\n\n\t\tcase 'html':\n\t\tdefault:\n\t\t\t@header('Content-Type: text/html; charset='.$charset);\n\t\t\tbreak;\n\t}\n}", "title": "" }, { "docid": "4422a40240cefcf1e0c14b38ab295bd3", "score": "0.668144", "text": "public function setContentType(string $contentType): void\n {\n $this->contentType = $contentType;\n }", "title": "" }, { "docid": "4422a40240cefcf1e0c14b38ab295bd3", "score": "0.668144", "text": "public function setContentType(string $contentType): void\n {\n $this->contentType = $contentType;\n }", "title": "" }, { "docid": "140a21985a9fbd762c03bc2b77720c56", "score": "0.66721094", "text": "function set_html_content_type(){\n return 'text/html';\n }", "title": "" }, { "docid": "ddef17c3940714670d7e50741b7dc571", "score": "0.664824", "text": "public function set_mimetype($mimetype)\n {\n $this->mimetype = $mimetype;\n }", "title": "" }, { "docid": "55dada5bf6774c0a9934e4c8b5a7de37", "score": "0.6640763", "text": "public function setMimeType($mimeType)\n {\n return $this->setHeader('Content-Type', \"{$mimeType}; charset=\" . self::RESPONSE_CHARSET, true);\n }", "title": "" }, { "docid": "b477aaa882682d5e443e7bfa6be10bb8", "score": "0.66362154", "text": "public function setContentType($data)\n {\n $this->contentType = $data;\n\n return $this;\n }", "title": "" }, { "docid": "2dd7d7586b15c0a176a5ad62ac0c5787", "score": "0.66177154", "text": "public function setContentType($type) {\n\t\t\n\t\tif (isset($this->allow_content_types[$type])) {\n\t\t\t$this->content_type = $type;\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "83b561cd2884d09288a482ade73b69d6", "score": "0.6612208", "text": "function set_html_mail_content_type() {\n return 'text/html';\n }", "title": "" }, { "docid": "36e569c9f02c6d4f4bc4e12e22e3353d", "score": "0.65868974", "text": "public function setContentType($type, $charset='utf-8'){\n if(headers_sent())return;\n\n $extensions = array('html'=>'text/html',\n 'xml'=>'application/xml',\n 'json'=>'application/json',\n 'js'=>'application/javascript',\n 'css'=>'text/css',\n 'rss'=>'application/rss+xml',\n 'yaml'=>'text/yaml',\n 'atom'=>'application/atom+xml',\n 'pdf'=>'application/pdf',\n 'text'=>'text/plain',\n 'png'=>'image/png',\n 'jpg'=>'image/jpeg',\n 'gif'=>'image/gif',\n 'csv'=>'text/csv'\n\t\t\t\t\t\t);\n if(isset($extensions[$type]))\n header(\"Content-Type: {$extensions[$type]}; charset=$charset\");\n }", "title": "" }, { "docid": "d6d8c41ec15717bff85bb58050d24fb9", "score": "0.6574884", "text": "public function setContentType(?ContentTypeInfo $value): void {\n $this->getBackingStore()->set('contentType', $value);\n }", "title": "" }, { "docid": "b0d834161b4c1063288328d50b7ecd60", "score": "0.65596205", "text": "public function get_content_type() {\n\t\tif ( ! $this->content_type && $this->html ) {\n\t\t\t$this->content_type = apply_filters( 'everest_forms_email_default_content_type', 'text/html', $this );\n\t\t} elseif ( ! $this->html ) {\n\t\t\t$this->content_type = 'text/plain';\n\t\t}\n\n\t\treturn apply_filters( 'everest_forms_email_content_type', $this->content_type, $this );\n\t}", "title": "" }, { "docid": "db43eef5883320b0863c50140b85202d", "score": "0.6543553", "text": "public function setMimeType($mimeType) {\n\t\treturn $this->_viewType = (string)$mimeType;\n\t}", "title": "" }, { "docid": "5c3db6e87889af178e83ac739abb079b", "score": "0.6528939", "text": "public static function setContentTypeHeader($type='application/json') {\n\t\tif (!self::$send_content_type_header) {\n\t\t\t// We send json data\n\t\t\theader( 'Content-Type: '.$type . '; charset=utf-8');\n\t\t\tself::$send_content_type_header = true;\n\t\t}\n\t}", "title": "" }, { "docid": "9de6cc3bc8aad3b6b8e15e8304b8481f", "score": "0.65250295", "text": "private function _setContentType($content_type)\n {\n $client = RESTHttpClient:: getHttpClient();\n $client->createOrUpdateHeader('Content-Type', $content_type);\n }", "title": "" }, { "docid": "ce51ba0d17bf3338c05570a0a1cf811a", "score": "0.65062535", "text": "public function setMime($mime)\n {\n $this->setMimes($mime);\n }", "title": "" }, { "docid": "ff7b72fde5158f85a0e2493730383d45", "score": "0.6483418", "text": "function email_set_content_type(){\n return \"text/html\";\n}", "title": "" }, { "docid": "3d9c8438df84020975745a000ada8950", "score": "0.6470117", "text": "public function setContentType( $contentType )\n {\n $this->_daContent->setContentType( $this->getId(), $contentType );\n }", "title": "" }, { "docid": "4977f6b336a94b706bea1b551425c19f", "score": "0.6464292", "text": "public function setMediaType($type = '');", "title": "" }, { "docid": "695a7351a267f0042ee272292f04f6aa", "score": "0.64560694", "text": "public function contentType($type = '')\n {\n $this->attach->setContentType($type);\n return $this;\n }", "title": "" }, { "docid": "3b6ae8b245dec4400214f63347f84654", "score": "0.64377004", "text": "public function setType($type)\n {\n\n if (!in_array($type, static::ALLOWED_MIME_TYPES)) {\n throw new InvalidArgumentException(\n 'Invalid mime type for file content. Must be one of: ' . implode(', ', static::ALLOWED_MIME_TYPES)\n );\n }\n\n $this->setAttributeRaw('type', $type);\n\n return $this;\n }", "title": "" }, { "docid": "1d3d39522476d1ddf2061936879182df", "score": "0.64001393", "text": "public function setMimes()\n {\n $args = func_get_args();\n $this->_acceptableMimeTypes = array();\n if (in_array(false, $args) === false) {\n $this->_acceptableMimeTypes = $args;\n }\n }", "title": "" }, { "docid": "9729e62a06b5a56c9e90967ea63c37b7", "score": "0.63899297", "text": "protected function initContentType()\n {\n if (empty($this->contentType)) {\n $this->contentType = lcfirst(class_basename(get_class($this)));\n }\n }", "title": "" }, { "docid": "b5aaa29078546cb93162eda7fbe8194d", "score": "0.6373052", "text": "public function setContent(string $content, int $type = self::PlainTextContent): bool {\n\t\tif(self::PlainTextContent !== $type && self::HtmlContent != $type) {\n\t\t\tAppLog::error(\"invalid content type $type\", __FILE__, __LINE__, __FUNCTION__);\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->m_content = $content;\n\t\t$this->m_contentType = $type;\n\t\treturn true;\n\t}", "title": "" }, { "docid": "c0460a2014f7ab304492212cf3894e79", "score": "0.6369652", "text": "public function setContentType($contentType)\n {\n $this->contentType = $contentType;\n }", "title": "" }, { "docid": "7a41096f7ce174cfdf81b01980407f7d", "score": "0.6340483", "text": "public function type($type)\n {\n $this->header->apply(new \\Flower\\Response\\Header\\ContentType($type));\n }", "title": "" }, { "docid": "7faafc94d362a03b3affba1a2f9058ff", "score": "0.6336834", "text": "public function setContentType($contentType)\n {\n $this->_contentType=$contentType;\n }", "title": "" }, { "docid": "ce4a1f0bc4897a6f0c93dd1b10448d88", "score": "0.6335961", "text": "public function set_html_content_type() {\n\t\t\treturn 'text/html';\n\t\t}", "title": "" }, { "docid": "b7f1e3ddddedec84bf4642278bc5563d", "score": "0.6322309", "text": "public function setType() {\r\n $this->setOriginalName();\r\n $i = strrpos($this->original_file_name, \".\");\r\n if (!$i) {\r\n $this->file_type = NULL;\r\n } else {\r\n $l = strlen($this->original_file_name) - $i;\r\n $this->file_type = substr($this->original_file_name, $i + 1, $l);\r\n }\r\n\r\n $this->file_type = strtolower($this->file_type);\r\n }", "title": "" }, { "docid": "f291e6a241af7d70cf9421a33664af2f", "score": "0.632092", "text": "private function setContentType($strContentType) {\r\n\t\t$this->strContentType = $strContentType;\r\n\t}", "title": "" }, { "docid": "743702a6afbe2c1851b0bb1bf341dd6b", "score": "0.63186365", "text": "public function setContentType($content_type)\n\t{\n\t\tif (! is_string($content_type) && $content_type != null) {\n\t\t\tthrow new \\Vcms\\Exception\\InvalidType(\"string\", $content_type, '$status_code');\n\t\t}\n\t\t$this->content_type = $content_type;\n\t}", "title": "" }, { "docid": "26568cd56df5d47c6507749dba0db81a", "score": "0.6315552", "text": "function setHeader($type) {\n header(\"Content-Type: $type\");\n }", "title": "" }, { "docid": "f1f30ecdbb79e703e681388e59070ac8", "score": "0.6314332", "text": "function http_send_content_type ($content_type = null) {}", "title": "" }, { "docid": "eaf001b1a395112046fa8dbafa0ec56a", "score": "0.63033336", "text": "public function setDefaultMimeType($mime)\n {\n $this->defmime = $mime;\n }", "title": "" }, { "docid": "955aba0cfc3b15f76a02f81a189c20e2", "score": "0.6298218", "text": "public function setContentType(string $contentType): void {\n header($contentType);\n }", "title": "" }, { "docid": "bc6bd34a678805b3c5ee707a2cb15e82", "score": "0.62962455", "text": "public function setMimeType($var)\n {\n GPBUtil::checkString($var, True);\n $this->mime_type = $var;\n\n return $this;\n }", "title": "" }, { "docid": "bc6bd34a678805b3c5ee707a2cb15e82", "score": "0.62962455", "text": "public function setMimeType($var)\n {\n GPBUtil::checkString($var, True);\n $this->mime_type = $var;\n\n return $this;\n }", "title": "" }, { "docid": "13842d4426a42b441214b980bbb7c445", "score": "0.62933975", "text": "public function getContentType()\r\n {\r\n return \"text/plain\";\r\n }", "title": "" }, { "docid": "cacfc6b0d2e024a21a46f1509fc3076c", "score": "0.6282488", "text": "public function setMime($mime)\n\t{\n\t\t# Clean it up...\n\t\t$mime=trim($mime);\n\t\t# The Mime types.\n\t\t$mimetype_values=array('image/gif', 'image/jpeg', 'image/png', 'application/x-shockwave-flash', 'image/psd', 'image/bmp', 'image/tiff', 'application/octet-stream', 'image/jp2', 'image/iff', 'image/vnd.wap.wbmp', 'image/xbm', 'image/vnd.microsoft.icon');\n\t\tif(in_array($mime, $mimetype_values))\n\t\t{\n\t\t\t$this->mime=$mime;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "9176b0365d91ad9db6002a8d29d13f52", "score": "0.6275192", "text": "public abstract function contentType();", "title": "" }, { "docid": "17ded377854936ff88bb17ce247d4d79", "score": "0.62711716", "text": "public function setContent($content)\n {\n if (!is_string($content)) {\n throw new TypeException('$content must be of type string.');\n }\n if (!$this->isBase64($content)) {\n $this->content = base64_encode($content);\n } else {\n $this->content = $content;\n }\n }", "title": "" }, { "docid": "8798fb97de70b961ed106fe4cd3b5294", "score": "0.6270105", "text": "public function getContentType()\n {\n return 'text/html';\n }", "title": "" }, { "docid": "4f2977a9c1c02efd8f1bd7fe7c977fb0", "score": "0.62637216", "text": "public function set_html_content_type() {\n\n\t\treturn 'text/html';\n\n\t}", "title": "" }, { "docid": "33db158f1103106a0deb3db5084860ee", "score": "0.62464803", "text": "public function getContentType()\n\t{\n\t\treturn $this->mime;\n\t}", "title": "" }, { "docid": "a57e5d63024e63174403b1e9d12bfadf", "score": "0.6232628", "text": "public function getMimeType()\n {\n return 'text/html';\n }", "title": "" }, { "docid": "4edf1a468b070a8877473d26e072c044", "score": "0.62157655", "text": "private function adjustResponseContentType()\n {\n $content_type = $this->data->get('content_type', 'html');\n\n // If it's html, we don't need to continue.\n if ($content_type === 'html') {\n return;\n }\n\n // Translate simple content types to actual ones\n switch ($content_type) {\n case 'xml':\n $content_type = 'text/xml';\n break;\n case 'atom':\n $content_type = 'application/atom+xml; charset=UTF-8';\n break;\n case 'json':\n $content_type = 'application/json';\n break;\n case 'text':\n $content_type = 'text/plain';\n }\n\n // Adjust the response\n $this->response->header('Content-Type', $content_type);\n }", "title": "" }, { "docid": "bd14f8bcf0a2290ffa552b5cdddc1b8e", "score": "0.6185823", "text": "function setMimeTypeClassFunction($fce)\n\t{\n\t\t$this->parseType = $fce;\n\t}", "title": "" }, { "docid": "b228ba0870266fda2cfe799291b29939", "score": "0.61397564", "text": "public function type() {\n\t\tif(!$this->content_type) {\n\t\t\tif($mime = $this->get_header('Content-Type')) {\n\t\t\t\t$actual_mime = array_shift(explode(';', $mime));\n\t\t\t\t\n\t\t\t\tif(array_key_exists($actual_mime, self::$header_content_type_map)) {\n\t\t\t\t\t$this->content_type = self::$header_content_type_map[$actual_mime];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $this->content_type;\n\t}", "title": "" }, { "docid": "8eb15e37ded6c8b395ca946a83f1ff8f", "score": "0.6136884", "text": "public function getContentType()\n {\n return 'text/plain';\n }", "title": "" }, { "docid": "f7f1e14054828a2746ca5fc424e3d624", "score": "0.6131766", "text": "function setType($type = self::TEXT) {\r\n\t\t\tif($type != self::HTML && $type != self::TEXT)\r\n\t\t\t$this->mailType = self::TEXT;\r\n\t\t\telse\r\n\t\t\t$this->mailType = $type;\r\n\t\t}", "title": "" }, { "docid": "e94fd0dc9f91616d8ee73ef9dcef5799", "score": "0.612897", "text": "public function setFileType($file_type)\n {\n $this->file_type = $file_type;\n }", "title": "" }, { "docid": "1deeac7e39f0b6f4948b9cef06277580", "score": "0.61284876", "text": "public function getMimetype() \n {\n return $this->mimetype;\n }", "title": "" }, { "docid": "c11375b694b6b931bc10c5de2029ebb9", "score": "0.6119167", "text": "protected function loadContentType()\n {\n\n $this->typeLabel = 'File';\n $this->typeId = 'ada4190d-a0c3-4470-9afd-aa9ab11a2e6b';\n\n $this->formClassList[] = FileContentForm::class;\n $this->formClassList[] = UrlFileContentForm::class;\n $this->formClassList[] = FileContentSearchForm::class;\n\n $this->viewClassList[] = FileContentView::class;\n $this->viewClassList[] = DownloadButtonView::class;\n\n }", "title": "" }, { "docid": "27ecafd5a909b8260fb5df66d3a4353c", "score": "0.61188793", "text": "public function set_type($type) {\n\t\tif (empty($type)) {\n\t\t\t$type = 'text';\n\t\t}\n\t\t$this->type = $type;\n\t}", "title": "" }, { "docid": "eb8df907f4a8d9edd7775cccdace7465", "score": "0.60859925", "text": "public function byContentType()\n {\n $this->sort = 'mime';\n return $this;\n }", "title": "" }, { "docid": "9482563768f1e314198b21c43b70bfe6", "score": "0.60772306", "text": "public function setContentType($type)\n {\n $this->getHeaders()->set(Headers::CONTENT_TYPE, $type);\n\n return $this;\n }", "title": "" }, { "docid": "7d73a33ed773f93449324e01e241307e", "score": "0.6053457", "text": "function setAllowedMime($mimeTypes) {\r\n\r\n $this->_allowedMime = $mimeTypes;\r\n\r\n }", "title": "" }, { "docid": "abb42267cd41b038d5fe34b7299fb07e", "score": "0.60335356", "text": "public function setContentType($contentType) : self\n {\n $this->initialized['contentType'] = true;\n $this->contentType = $contentType;\n return $this;\n }", "title": "" }, { "docid": "1d01ef82a683ae991cd3c92ad93e1ec7", "score": "0.6016067", "text": "abstract function content_type();", "title": "" }, { "docid": "cc8259cd1c82984e9a638e2b2c528947", "score": "0.6015549", "text": "function set_filetype($filetype){\r\n\t\t$this->filetype=$filetype;\r\n\t}", "title": "" }, { "docid": "4a08fee783c288014e9eddca77896386", "score": "0.6009095", "text": "public function getMimetype() {\n\t\treturn $this->mimetype;\n\t}", "title": "" }, { "docid": "2513461ecaa2f0892aeef112a6bd0e84", "score": "0.59908926", "text": "function contentType( $type=NULL ) {\n if( isset( $type ) ) {\n $this->_contentType = $type;\n }\n return $this->_contentType;\n }", "title": "" } ]
95188290d2a3edd4b7dfd7ef3723a8cb
Totally remove all cached beans
[ { "docid": "caa48695407d5211ca2fc858859016f3", "score": "0.7252977", "text": "public static function clearCache()\n {\n self::$loadedBeans = array();\n self::$definitions = array();\n self::$total = 0;\n self::$hits = 0;\n }", "title": "" } ]
[ { "docid": "822b56c37c5cf4c64bacc6677155d74d", "score": "0.7164477", "text": "public function clearAllCache();", "title": "" }, { "docid": "0905ecca9e7f7ba186de40ead2567b77", "score": "0.712795", "text": "function cleanAllBeans() {\n\t\n}", "title": "" }, { "docid": "b58f0d4854b2463c1f4d4ba5a200bdec", "score": "0.69223773", "text": "function clear_cache() {\n $t = array(\n AM_SLUG.'_lazyloader',\n AM_SLUG.'_force_load',\n );\n foreach ($t as $d) { delete_transient($d); }\n }", "title": "" }, { "docid": "c10ebd325f40650d5c9f3180195529cb", "score": "0.6764988", "text": "public static function clearCache(): void\n {\n static::$classesCache = null;\n static::$namespacedClassesCache = null;\n }", "title": "" }, { "docid": "caf198fbe93db0d38b57562d158c30c5", "score": "0.6703719", "text": "private function _cleanCaches(){\n\t\t//clear stash cache\n\t\t$stashFileSystem = new StashFileSystem(array('path' => STASH_PATH));\n\t\t$stash = new Stash($stashFileSystem);\n\n\t\t$toClean = array('artist', 'movie', 'saga', 'storage', 'loan');\n\t\tforeach( $toClean as $t ){\n\t\t\t$stash->setupKey($t);\n\t\t\t$stash->clear();\n\n\t\t\tif( isset($_SESSION[$t.'s']) ) unset($_SESSION[$t.'s']['list']);\n\t\t}\n\t}", "title": "" }, { "docid": "b6b7423ee2839fd1ec9c1f76b621f9e1", "score": "0.6673074", "text": "private function _cleanCaches(){\n\t\t//clear stash cache\n\t\t$stashFileSystem = new StashFileSystem(array('path' => STASH_PATH));\n\t\t$stash = new Stash($stashFileSystem);\n\n\t\t$toClean = array('album', 'band', 'storage', 'loan');\n\t\tforeach( $toClean as $t ){\n\t\t\t$stash->setupKey($t);\n\t\t\t$stash->clear();\n\n\t\t\tif( isset($_SESSION[$t.'s']) ) unset($_SESSION[$t.'s']['list']);\n\t\t}\n\t}", "title": "" }, { "docid": "ebe4746e55d69bc4fd4b8522563eba5b", "score": "0.66565967", "text": "protected function clearCaches(): void {\n\t\t_elgg_services()->accessCache->clear();\n\t\t_elgg_services()->dataCache->clear();\n\t\t_elgg_services()->entityCache->clear();\n\t\t_elgg_services()->sessionCache->clear();\n\t\t_elgg_services()->queryCache->clear();\n\t}", "title": "" }, { "docid": "e98d7b1cad37345e4359a19b9b432df8", "score": "0.6628108", "text": "protected function clearCaches() {\n\t\t_elgg_services()->accessCache->clear();\n\t\t_elgg_services()->dataCache->clear();\n\t\t_elgg_services()->entityCache->clear();\n\t\t_elgg_services()->sessionCache->clear();\n\t\t_elgg_services()->queryCache->clear();\n\t}", "title": "" }, { "docid": "980abcdae245a8197dfd0edf7d22e24d", "score": "0.6625851", "text": "public function cache_delete_all()\n {\n }", "title": "" }, { "docid": "2ee2c7824e513edc27e862f97c4e95a4", "score": "0.65991116", "text": "public static function cleanup()\n {\n if (empty(self::$_cache)) {\n self::cacheInit();\n }\n self::$_cache_handlers = array();\n\n // remove information about cache handlers\n self::cleanCacheHandlers(array('full' => true));\n\n // remove all the cache\n return self::$_cache->cleanup();\n }", "title": "" }, { "docid": "30b616571a58497df2e1ba364385f217", "score": "0.6561309", "text": "public function clearAllCache()\n {\n $this->nop_cache = [];\n }", "title": "" }, { "docid": "ea845e00a3f7a1d943d2a1b29fb76bd4", "score": "0.6556121", "text": "public static function clearCache() {\n\t\t$cache = DevblocksPlatform::getCacheService();\n\t\t$cache->remove(self::CACHE_ALL);\n\t}", "title": "" }, { "docid": "097b170b9685991fdeea95ddeb813e78", "score": "0.65418106", "text": "public function clearCache() {\n $this->loaded = [];\n $this->cache->clean();\n }", "title": "" }, { "docid": "8ee09a361045b574a11bfa5c86f573a5", "score": "0.6513434", "text": "public function clearCache();", "title": "" }, { "docid": "8ee09a361045b574a11bfa5c86f573a5", "score": "0.6513434", "text": "public function clearCache();", "title": "" }, { "docid": "8ee09a361045b574a11bfa5c86f573a5", "score": "0.6513434", "text": "public function clearCache();", "title": "" }, { "docid": "6ba5b748f090d96d8795ea41a7a1cb21", "score": "0.6507345", "text": "public function clear()\n {\n foreach ($this->jobs as $name => $job) {\n $key = $this->makeCacheKey($name);\n $this->cache->forget($key);\n }\n\n $this->jobs = array();\n }", "title": "" }, { "docid": "b1022cf485cdfb3e4214520cecb328fd", "score": "0.64967597", "text": "public static function clearCache() {\n\t\tparent::clearCache(__CLASS__);\n\t}", "title": "" }, { "docid": "53a3e0efbcdd7becdbe9a6e5e25cf717", "score": "0.64944375", "text": "function cleanCache() {\n $cache = array();\n }", "title": "" }, { "docid": "9ec36bf9acb49c25c5956abfea5e14bf", "score": "0.6490247", "text": "public function clearAllCache()\n {\n if (($cache = Yii::app()->getComponent('cmsCache')) !== null) {\n $cache->delete(self::CACHE_RULES_PREFIX_KEY);\n }\n }", "title": "" }, { "docid": "048da6b7404da052817b5113cdfdc7d4", "score": "0.64775956", "text": "public function clearContainerCache() {\n $this->modx->cacheManager->refresh(array(\n 'db' => array(),\n 'auto_publish' => array('contexts' => array($this->object->get('context_key'))),\n 'context_settings' => array('contexts' => array($this->object->get('context_key'))),\n 'resource' => array('contexts' => array($this->object->get('context_key'))),\n ));\n }", "title": "" }, { "docid": "048da6b7404da052817b5113cdfdc7d4", "score": "0.64775956", "text": "public function clearContainerCache() {\n $this->modx->cacheManager->refresh(array(\n 'db' => array(),\n 'auto_publish' => array('contexts' => array($this->object->get('context_key'))),\n 'context_settings' => array('contexts' => array($this->object->get('context_key'))),\n 'resource' => array('contexts' => array($this->object->get('context_key'))),\n ));\n }", "title": "" }, { "docid": "5577174940b3a075df4bcdeebf281140", "score": "0.64745504", "text": "public static function clear()\n {\n static::getServiceLocator()->clear();\n }", "title": "" }, { "docid": "7158f62f0edb62b7656081a74d4e01a8", "score": "0.64276934", "text": "public static function clearCache()\n\t{\n\t\tparent::clearCache(__CLASS__);\n\t}", "title": "" }, { "docid": "7158f62f0edb62b7656081a74d4e01a8", "score": "0.64276934", "text": "public static function clearCache()\n\t{\n\t\tparent::clearCache(__CLASS__);\n\t}", "title": "" }, { "docid": "c96791456e32562aa3bf9cf410a1c209", "score": "0.6426658", "text": "public function clear()\r\n {\r\n $this->cache->clean();\r\n }", "title": "" }, { "docid": "6cac2b93d6e85f50fa7ab7074b9a74eb", "score": "0.6424582", "text": "public function __destruct()\n {\n foreach(glob(__DIR__.'/cache/*.*') as $file){\n unlink($file);\n }\n @unlink(__DIR__.'/cache/.webassets.cacheinf');\n }", "title": "" }, { "docid": "719d53f5a6c05f58f32cda82f4a98263", "score": "0.64216954", "text": "function bp_widget_cache_invalidate_all() {\n\tforeach( (array) bp_widget_get_cache_classes() as $widget_class ) {\n\t\tdelete_site_transient( bp_widget_get_transient_key( $widget_class ) );\n\t}\n}", "title": "" }, { "docid": "e44e3602a5fee80b91f84239f9df2085", "score": "0.6420517", "text": "public function clearAllInstancePools()\n {\n $finder = sfFinder::type('file')->name('*TableMap.php');\n foreach ($finder->in($this->configuration->getModelDirs()) as $file)\n {\n $omClass = basename($file, 'TableMap.php');\n if (class_exists($omClass) && is_subclass_of($omClass, 'BaseObject'))\n {\n $peer = constant($omClass.'::PEER');\n call_user_func(array($peer, 'clearInstancePool'));\n }\n }\n }", "title": "" }, { "docid": "5c825c4a5e28623280f0d07258c09e57", "score": "0.64177996", "text": "protected function invalidateCaches()\n {\n $assemblyLineClass = \\iveeCore\\Config::getIveeClassName('SolarSystem');\n $assemblyLineClass::getInstancePool()->deleteFromCache($this->updatedIDs);\n }", "title": "" }, { "docid": "2b08b27a7359f7042b62dcbaf3cb353f", "score": "0.6413495", "text": "public function clear(): void\n {\n $this->cache->deleteAll();\n }", "title": "" }, { "docid": "2b08b27a7359f7042b62dcbaf3cb353f", "score": "0.6413495", "text": "public function clear(): void\n {\n $this->cache->deleteAll();\n }", "title": "" }, { "docid": "4bb21740e27ad70f7c211ebfbf45ff93", "score": "0.6384843", "text": "public function purgeCache()\n\t{\n\t\tif(xcache_isset($this->prefixArr))\n\t\t{\n\t\t\t$tmp = xcache_get($this->prefixArr);\n\t\t\t\n\t\t\tforeach($tmp as $key)\n\t\t\t{\n\t\t\t\txcache_unset($key);\n\t\t\t}\n\t\t\t\n\t\t\txcache_unset($this->prefixArr);\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "a0077c0202c770ee81e855b786c47dd7", "score": "0.6367085", "text": "function purgeAll();", "title": "" }, { "docid": "2fe5c9b0a475be870b6b1b9163a03f63", "score": "0.63641626", "text": "public function clearExpiredCacheEntries();", "title": "" }, { "docid": "2185635b6f9f000169323fb9db216f90", "score": "0.6346713", "text": "public static function clearCache()\r\n\t{\r\n\t\tparent::clearCache(__CLASS__);\r\n\t}", "title": "" }, { "docid": "2185635b6f9f000169323fb9db216f90", "score": "0.6346713", "text": "public static function clearCache()\r\n\t{\r\n\t\tparent::clearCache(__CLASS__);\r\n\t}", "title": "" }, { "docid": "a8fb25804815ba91258d27a41630ae3f", "score": "0.6329421", "text": "function clear_all_cache()\r\n {\r\n $pattern = sprintf('%s/%s', $this->get_upload_dir(), '*/*');\r\n $glob = glob($pattern);\r\n if(is_array($glob) && !empty($glob))\r\n {\r\n foreach($glob as $file)\r\n unlink($file);\r\n }\r\n }", "title": "" }, { "docid": "b8efd9d2e3c049007436765995098607", "score": "0.6323477", "text": "public static function removeAll()\n {\n self::$registry = array();\n return;\n }", "title": "" }, { "docid": "aa90232d849aa326ffd896140db17a13", "score": "0.6283845", "text": "protected function emptyCache()\n {\n Cache::forget('tags');\n }", "title": "" }, { "docid": "458722c40c5acaeed7011c453d72a6c8", "score": "0.6273465", "text": "public static function clean()\n {\n self::$_pools = array();\n }", "title": "" }, { "docid": "8344bb07f8558a1314c7fae73d101b24", "score": "0.62659407", "text": "public function cleanCache()\n {\n delete_transient($this->updatePluginsSlug);\n delete_transient($this->updatePluginsLastCheckedSlug);\n delete_transient($this->updateThemesSlug);\n delete_transient($this->updateThemesLastCheckedSlug);\n\n // We also clear the pages cache\n clear_all_cache();\n }", "title": "" }, { "docid": "259461d96bbec0980192392655aa6546", "score": "0.6258439", "text": "public static function destroyAllInstances(): void {\n\t\tstatic::$instance = [];\n\t}", "title": "" }, { "docid": "94fb95f3334a02a80d696cbb39d95259", "score": "0.6258323", "text": "public static function reset()\n {\n // Delete all rows from all db controllers and unset them from the cache\n foreach (self::$cachedWrapper as $dbName => $wrapper)\n {\n $wrapper->deleteAll();\n }\n }", "title": "" }, { "docid": "d20f63e23f84485e0239bd61a9293ef7", "score": "0.6233616", "text": "public function clearCachedRoles()\n {\n Cache::forget($this->getCachePrefix().'_roles');\n }", "title": "" }, { "docid": "8eeb04a2e92e273ba95b77cc107cc936", "score": "0.62328124", "text": "public static function clearCache(): void\n {\n $glob = glob(__DIR__ . '/data/*.cache');\n foreach ($glob as $file) {\n unlink($file);\n }\n }", "title": "" }, { "docid": "c4b7e78d4865235d2c7436ab31e1066a", "score": "0.6221204", "text": "public static function purgeAll() {\n\n\t\t$moufManager = MoufManager::getMoufManager();\n\t\t$instances = $moufManager->findInstances(\"Mouf\\\\Utils\\\\Cache\\\\CacheInterface\");\n\n\t\t$compositeException = new CompositeException();\n\n\t\tforeach ($instances as $instanceName) {\n\t\t\ttry {\n\t\t\t\t$cacheService = $moufManager->getInstance($instanceName);\n\t\t\t\t/* @var $cacheService CacheInterface */\n\n\t\t\t\t$cacheService->purgeAll();\n\t\t\t} catch (\\Exception $e) {\n\t\t\t\t$compositeException->add($e);\n\t\t\t}\n\t\t}\n\n\t\tif (!$compositeException->isEmpty()) {\n\t\t\tthrow $compositeException;\n\t\t}\n\t}", "title": "" }, { "docid": "dec66e20b144abbaeb8cb40d420321aa", "score": "0.6212238", "text": "public function clearCache() {\n\t\t$this->cache->flush('sly.addon', true);\n\t\t$this->pkgService->clearCache();\n\t}", "title": "" }, { "docid": "ba397ac8881c470e1155e50395fb30ef", "score": "0.62074006", "text": "protected function clearCache()\n {\n /** @var Config\\Caches $config */\n $config = $this->container->create('Di\\\\Config\\\\Caches');\n\n $cachesToClear = $this->clearCaches;\n\n /* If no specific cache was requested, get a list of all caches that can be cleared. */\n if (!is_array($cachesToClear)) {\n $this->output('Clearing all caches.', self::OUTPUT_LEVEL_NOTICE);\n $cachesToClear = array_keys($config->data);\n }\n\n /* Clear each cache type. */\n foreach ($cachesToClear as $cacheType) {\n $this->clearCacheType($config, $cacheType);\n }\n }", "title": "" }, { "docid": "8ce4df3c0d54869fb703618f91eec0d7", "score": "0.61985105", "text": "public function subcleanCache()\n\t{\n\t\t$this->cleanCache();\n\t}", "title": "" }, { "docid": "af5b36ac07dbce2254243d08b1bea374", "score": "0.6197434", "text": "public function clearCachedDefinitions() {\n $this->state->set(self::class, isset($this->optionalService));\n }", "title": "" }, { "docid": "08c74025603d84ead4aced197b9f3982", "score": "0.61973333", "text": "public function clean() {\n\n\t\t$expired = new APCIterator('user', null, APC_ITER_VALUE, 100, APC_LIST_DELETED);\n\t\tapc_delete($expired);\n\t}", "title": "" }, { "docid": "9530cf45dcbc28162952f6681b67085a", "score": "0.6195522", "text": "public function clear_list_cache() {\n if( !is_null($ttl = $this->get_cache_setting('ttl_list')) ) {\n if( !is_null($svc = $this->get_service('list')) ) {\n $this->clear_object_service_cache($svc);\n }\n }\n }", "title": "" }, { "docid": "f23f946760cbccaebcb13dbfd950dfd2", "score": "0.61935735", "text": "public function clearCachedDefinitions() {\n unset($this->pluginDefinitions);\n }", "title": "" }, { "docid": "e226a1d5a7cad3bc039b9c7128b92b78", "score": "0.617869", "text": "public function clearCache()\n {\n\n }", "title": "" }, { "docid": "5dd73d8eb2d78f9363342fafe126146c", "score": "0.6172523", "text": "public static function cleanServiceList(): void\n {\n static::$localServiceList = [];\n }", "title": "" }, { "docid": "ffbcffd0e49d5b97636965430628d726", "score": "0.6170185", "text": "public function __destruct()\n\t{\n\t\tCacheManager::remove($this);\n\t\tunset(self::$instances[$this->name]);\n\t}", "title": "" }, { "docid": "c0f021ade0ee3efa3d8827e73e0a7e01", "score": "0.61613464", "text": "public function clearAnnotationsCache()\n\t{\n\t\tarray_map( 'unlink', glob( __DIR__ . \"/../annotations/cache/*\" ) );\n\t}", "title": "" }, { "docid": "87cc56edb63764f516b7e71a3b641ca2", "score": "0.6160164", "text": "public function cleanCache()\n {\n if (self::$mustCleanCache) {\n /** @var \\FivePercent\\Component\\Cache\\CacheInterface $cache */\n $container = $this->getContainer();\n\n if ($container->has('cache')) {\n $cache = $this->getContainer()->get('cache');\n $cache->cleanup();\n self::$mustCleanCache = false;\n }\n }\n }", "title": "" }, { "docid": "f2169304ca7d981e5545cccb25c810a0", "score": "0.61579156", "text": "public function clearCache() {\n $this->modx->cacheManager->refresh(array(\n 'db' => array(),\n 'auto_publish' => array('contexts' => array($this->object->get('context_key'))),\n 'context_settings' => array('contexts' => array($this->object->get('context_key'))),\n 'resource' => array('contexts' => array($this->object->get('context_key'))),\n ));\n }", "title": "" }, { "docid": "978f316b553d7c588c9fb0b743503a0b", "score": "0.61515605", "text": "public function invalidate() {\n PhpStorageFactory::get('twig')->deleteAll();\n $this->templateClasses = [];\n $this->state->delete(static::CACHE_PREFIX_METADATA_KEY);\n }", "title": "" }, { "docid": "93a5c57702d960df5c897fa7bf1924bb", "score": "0.614865", "text": "public function clearCache()\n {\n if($list = File::files($this->storage_path)){\n foreach($list as $cache){\n unlink($cache);\n }\n }\n }", "title": "" }, { "docid": "f7d811c65ab53b74cf6f3a43717ed61d", "score": "0.61477596", "text": "public function collectGarbage() {\n\t\tparent::collectGarbage();\n\t\t$cacheManager = GeneralUtility::makeInstance(CacheManager::class);\n\t\t$cacheManager->collectGarbage();\n\t}", "title": "" }, { "docid": "9760b0d079e10e457f737aab25efdb41", "score": "0.6143962", "text": "function cacheClear ()\n {\n $target = $this->kernelSettings->storagePath . DIRECTORY_SEPARATOR . $this->cachingSettings->cachePath;\n (new CleanDir($target))->run ();\n }", "title": "" }, { "docid": "ea2d090703c12aa57f9b7ba5e02feff9", "score": "0.6139331", "text": "private function clearInstanceCaches()\n {\n $this->cachedVersionRequirement = null;\n $this->cachedRequiredVersionId = null;\n $this->cachedLimitedVersionId = null;\n $this->cachedVersionLimit = null;\n }", "title": "" }, { "docid": "554a7510ebab1caabec70dc33f6382f1", "score": "0.61358166", "text": "public function removeAll() {\n \n // @todo\n return;\n \n if (!$items = $this->getStats('items')) {\n return;\n }\n $Apc = $this->getApc();\n foreach ($items['items'] as $key => $item) {\n $dump = $Apc->getStats('cachedump', $key, $item['number'] * 2);\n foreach (array_keys($dump) as $ckey) {\n $Apc->delete($ckey);\n }\n }\n $this->stats = null;\n }", "title": "" }, { "docid": "10fabb57601e443cdec7f56129d5e880", "score": "0.6125114", "text": "public function deleteAll()\n {\n if (! $this->_active) {\n return;\n }\n \n $this->memcache->flush();\n }", "title": "" }, { "docid": "10fabb57601e443cdec7f56129d5e880", "score": "0.6125114", "text": "public function deleteAll()\n {\n if (! $this->_active) {\n return;\n }\n \n $this->memcache->flush();\n }", "title": "" }, { "docid": "c4e2c0c34051bb7f4167c070f3e876bf", "score": "0.6119691", "text": "public static function reset() {\n static::$cached = [];\n }", "title": "" }, { "docid": "4e7d34d2ee9dc14f30c4c07f3674d4a7", "score": "0.6118133", "text": "public function removeAll()\n {\n $this->storage = [];\n }", "title": "" }, { "docid": "05e79e562de9d43bad0763a8d9658a03", "score": "0.61139745", "text": "public function clearCache()\n {\n $this->modx->cacheManager->refresh(array(\n 'db' => array(),\n 'auto_publish' => array('contexts' => array($this->resource->get('context_key'))),\n 'context_settings' => array('contexts' => array($this->resource->get('context_key'))),\n 'resource' => array('contexts' => array($this->resource->get('context_key'))),\n ));\n }", "title": "" }, { "docid": "95b7794766d5dc89c06e7e89edc42d7d", "score": "0.6102046", "text": "public function clearAll()\n {\n $this->cached = [];\n return $this;\n }", "title": "" }, { "docid": "d80926d722b68fb7d81bba0c8dfadc38", "score": "0.60918844", "text": "public function purgeAll()\n {\n // Clear all of CloudFront's caches\n $this->invalidateCdnPath('/*');\n }", "title": "" }, { "docid": "b36163578c059cc14d525120ad329f84", "score": "0.6090565", "text": "private function clearSiteCaches()\n {\n $obj = Craft::$app->sites;\n $refObject = new \\ReflectionObject($obj);\n if ($refObject->hasProperty('_sitesById')) {\n $refProperty1 = $refObject->getProperty('_sitesById');\n $refProperty1->setAccessible(true);\n $refProperty1->setValue($obj, null);\n }\n if ($refObject->hasProperty('_sitesByHandle')) {\n $refProperty2 = $refObject->getProperty('_sitesByHandle');\n $refProperty2->setAccessible(true);\n $refProperty2->setValue($obj, null);\n }\n $obj->init(); // reload sites\n }", "title": "" }, { "docid": "1e66566098376d28d0389e384700e44b", "score": "0.6076693", "text": "public function clearCrossAppCache() \n {\n try \n {\n $this->getCache()->removePattern('ca.*');\n \n if (sfConfig::get('sf_logging_enabled')) \n {\n sfContext::getInstance()->getLogger()->info(sprintf('Cleared %s cross app cache', $this->getManagedApp()));\n }\n }\n catch (Exception $e) { }\n }", "title": "" }, { "docid": "ece6957c064744920bf2ea9e076a212b", "score": "0.6065164", "text": "public function clearCache() {\n $cache = self::getCache();\n $cache->clear();\n }", "title": "" }, { "docid": "a99abcb5940b1a70e4639a74c9bfa681", "score": "0.6052456", "text": "public function clearAll ()\n {\n return $this->__cache->flushAll();\n }", "title": "" }, { "docid": "aa0217b71c5ce6e7033cf1ff483e4fc4", "score": "0.60462296", "text": "private function _clearCachedConfig()\n\t{\n // Suffixes of cache files.\n\t $aFileSuffixes = array(\n\t\t 'adisabledmodules',\n 'amodulepaths',\n 'amodulefiles',\n 'amodules'\n );\n\n\t\t$compileDir = oxRegistry::getConfig()->getConfigParam('sCompileDir');\n\t\t\n\t\tforeach ($aFileSuffixes as $sFileSuffix){\n\t\t\t$sFileName = 'config.'.$this->sShopId.'.'.$sFileSuffix.'.txt';\t// Naming shape of cache files.\n\t\t\n\t\t\tif (file_exists($compileDir.$sFileName))\n\t\t\t{\n\t\t\t\t@unlink($compileDir.$sFileName);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "6752ea4fb53d599238c51fa40c240b60", "score": "0.6041422", "text": "public static function cleanup()\n\t{\n\t\t$path = self::cache_dir();\n\t\t\n\t\t// only delete files\n\t\treturn self::_delete_all($path, true);\n\t}", "title": "" }, { "docid": "188e55f5a3c8e5b24b3598e1fa114c52", "score": "0.60296816", "text": "public static function clearCache(): void\n {\n static::$items = [];\n static::$worlds = [];\n }", "title": "" }, { "docid": "5a34ef08bd8769636e98cb978437da52", "score": "0.60291845", "text": "public static function cleanRegistry()\n {\n static::$registry = array();\n }", "title": "" }, { "docid": "f548efd0540bfeb3afe6e0fafde7a447", "score": "0.6026083", "text": "public function resetCache() {\n foreach($this->application->languages as $lang) {\n Cache::instance()->delete(self::cacheKey($lang->locale, $this->source));\n }\n }", "title": "" }, { "docid": "ae3db11d9f4b03faacdd1412a9613bb0", "score": "0.6025528", "text": "public function cleanCache() {\n $maxTTL = 24*60*60;\n\n $cacheDir = scandir(__DIR__.'/cache/');\n unset($cacheDir[0]);\n unset($cacheDir[1]);\n foreach ($cacheDir as $dir) {\n // skip .htacces, .gitignore and other .xxx\n if (preg_match(\"/^\\./ius\", $dir)) {\n continue;\n }\n $path2 = scandir(__DIR__.'/cache/'.$dir);\n unset($path2[0]);\n unset($path2[1]);\n foreach ($path2 as $dir2) {\n $path3 = scandir(__DIR__.'/cache/'.$dir.'/'.$dir2);\n unset($path3[0]);\n unset($path3[1]);\n\n foreach ($path3 as $file) {\n // skip no-MD5 files\n if (strlen($file) != 32) {\n continue;\n }\n $f = __DIR__.'/cache/'.$dir.'/'.$dir2.'/'.$file;\n $time = filemtime($f);\n // remove old files\n if ($time < time() - $maxTTL) {\n @unlink($f);\n }\n }\n }\n }\n }", "title": "" }, { "docid": "da1731bdc98eb401ba90f8d568a83340", "score": "0.60240376", "text": "public function tearDown()\n {\n foreach (glob($this->config['directories']['cache'] . '/*.min.css') as $file) {\n unlink($file);\n }\n }", "title": "" }, { "docid": "38030c41f179578c8094efc8fc8bbd72", "score": "0.6023309", "text": "protected function garbageCollect()\n {\n $config = $this->app['config']->get('core.acl.general');\n\n $this->sweep($this->app['acl.activations'], $config['activations']['lottery']);\n }", "title": "" }, { "docid": "2ebefbdef6182c518e7377ddad380a6a", "score": "0.6019047", "text": "static public function unregisterAll()\n\t{\n\t\tself::$tags = null;\n\t\tself::$tags = array();\n\t}", "title": "" }, { "docid": "130ff5bdeff05004bfde6e829b3f4939", "score": "0.60178155", "text": "public function cleanUpBeans() {\n // Get UIDs of users created during this scenario.\n if (!empty($this->userLog)) {\n // Select all beans created by the scenario users.\n $query = new EntityFieldQuery();\n $result = $query->entityCondition('entity_type', 'bean')\n ->propertyCondition('uid', $this->userLog, 'IN')\n ->execute();\n // Loop through all beans that were found and delete them.\n if (isset($result['bean'])) {\n $bids = array_keys($result['bean']);\n foreach ($bids as $bid) {\n $bean = bean_load($bid);\n bean_delete($bean);\n }\n }\n }\n }", "title": "" }, { "docid": "8fe7e9b671ee4f61bd44a6883477b640", "score": "0.60009295", "text": "final public static function clearCache() {\n self::getModX()->getCacheManager()->refresh();\n }", "title": "" }, { "docid": "8d40d6f863412be6a7975ce797f25e21", "score": "0.59994423", "text": "static function resetAll() {\n self::finalizeAll();\n self::$instances = [];\n self::$active = [];\n self::$inactive = [];\n }", "title": "" }, { "docid": "639b2eb7b92099b2a5eebe64cecbbc23", "score": "0.5998376", "text": "function _clearCache()\n {\n $dir = atkconfig(\"atktempdir\").\"holidays\";\n if ($handle = opendir($dir)) {\n while (false !== ($file = readdir($handle))) {\n if ($file != \".\" && $file != \"..\") {\n unlink($dir.\"/\".$file);\n }\n }\n closedir($handle);\n }\n }", "title": "" }, { "docid": "da56079a5632cdb7909f3d6f18652f49", "score": "0.5994152", "text": "protected function cache_garbage_collect() {\n self::list_cached_files();\n if (count($this->_cachedFiles) > 1)\n {\n foreach ($this->_cachedFiles as $filename)\n {\n if (!strpos($filename, $this->_currentSha1))\n {\n unlink($filename);\n }\n }\n }\n }", "title": "" }, { "docid": "8c0a783771ee5192c25690664b8772e8", "score": "0.59888685", "text": "function clear_cache() {\n global $g_image_cache;\n\n foreach ($g_image_cache as $key => $value) {\n unlink($value);\n };\n }", "title": "" }, { "docid": "6b97061bf0a69fe3503c173227e7dbd9", "score": "0.5981641", "text": "public function clearCache() {\n $this->_statments = [];\n }", "title": "" }, { "docid": "14fb5a9f668db73ab2a830a4542d86cd", "score": "0.59816027", "text": "public function remove_cache_flush() {\r\n\t\twp_clear_scheduled_hook( 'pvc_flush_cached_counts' );\r\n\t\tremove_action( 'pvc_flush_cached_counts', array( Post_Views_Counter()->get_instance( 'cron' ), 'flush_cached_counts' ) );\r\n\t}", "title": "" }, { "docid": "ef283fbcf2d8055f61548bc119f2e3e9", "score": "0.5980307", "text": "public function flushCache()\n {\n Yii::$app->cache->delete(ModuleAutoLoader::CACHE_ID);\n }", "title": "" }, { "docid": "15fa80ed89f10346cfb7621ffd4ef4a0", "score": "0.5976312", "text": "public static function GarbageCollect() {\n\t\t//Delete any carts older than our timeout that don't have a customer ID attached (since those can always be restored)\n\t\t$objCarts = Cart::model()->findAll(\"cart_type = :type AND customer_id IS NULL AND modified<:date\",\n\t\t\tarray(':type'=>CartType::cart,\n\t\t\t\t':date'=>date(\"Y-m-d H:i:s\",strtotime(\"-\"._xls_get_conf('CART_LIFE',30).\"days\"))\n\t\t\t));\n\t\tforeach ($objCarts as $objCart)\n\t\t{\n\t\t\tforeach ($objCart->cartItems as $item)\n\t\t\t\t$item->delete();\n\t\t\t$objCart->delete();\n\t\t}\n\t}", "title": "" }, { "docid": "106058c02db407f6b41de10e5d8e1dba", "score": "0.5973882", "text": "public function garbageCollection()\n {\n $em = $this->_doctrine->getManager();\n\n // Set max lifetime\n $lifetime = $this->_config['max_lifetime'] * 60;\n\n $q = $em->createQuery('delete from MetricsBundle:Cache st where st.created < :now');\n $q->setParameter('now', time() - $lifetime);\n return $q->execute();\n }", "title": "" }, { "docid": "13bfb1e2a3071ea48c854d2187a5df19", "score": "0.59737027", "text": "public function gc()\n {\n $this->_deleteFile($this->_cache_dir, true, false, true);\n }", "title": "" }, { "docid": "5855b2cf84f316dc8ab1f15b17af99e3", "score": "0.5971825", "text": "public static function clearInstancePool()\n\t{\n\t\tself::$instances = array();\n\t}", "title": "" }, { "docid": "5855b2cf84f316dc8ab1f15b17af99e3", "score": "0.5971825", "text": "public static function clearInstancePool()\n\t{\n\t\tself::$instances = array();\n\t}", "title": "" } ]
e87c5ac8c1c04a1517e083f3961cf32c
Operation addRequestsCreateNewLocationAsync Add Requests: Create (New Location)
[ { "docid": "adda660c42429163daf3e888b5a5960e", "score": "0.6139864", "text": "public function addRequestsCreateNewLocationAsync($api_key, $v, $content_type, $body)\n {\n return $this->addRequestsCreateNewLocationAsyncWithHttpInfo($api_key, $v, $content_type, $body)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" } ]
[ { "docid": "a228a5013c46a05a856368f8e103ec9e", "score": "0.66513467", "text": "public function addRequestsCreateNewLocation($api_key, $v, $content_type, $body)\n {\n $this->addRequestsCreateNewLocationWithHttpInfo($api_key, $v, $content_type, $body);\n }", "title": "" }, { "docid": "5d350d533fd06c1e9179c7b2c5a766c6", "score": "0.5967846", "text": "protected function addRequestsCreateNewLocationRequest($api_key, $v, $content_type, $body)\n {\n // verify the required parameter 'api_key' is set\n if ($api_key === null || (is_array($api_key) && count($api_key) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $api_key when calling addRequestsCreateNewLocation'\n );\n }\n // verify the required parameter 'v' is set\n if ($v === null || (is_array($v) && count($v) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $v when calling addRequestsCreateNewLocation'\n );\n }\n // verify the required parameter 'content_type' is set\n if ($content_type === null || (is_array($content_type) && count($content_type) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $content_type when calling addRequestsCreateNewLocation'\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 addRequestsCreateNewLocation'\n );\n }\n\n $resourcePath = '/accounts/me/newlocationaddrequests';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($api_key !== null) {\n $queryParams['api_key'] = ObjectSerializer::toQueryValue($api_key);\n }\n // query params\n if ($v !== null) {\n $queryParams['v'] = ObjectSerializer::toQueryValue($v);\n }\n // header params\n if ($content_type !== null) {\n $headerParams['Content-Type'] = ObjectSerializer::toHeaderValue($content_type);\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\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": "6226880e78e4ba661472323ae7304e4f", "score": "0.59570736", "text": "public function addPtLocations(Request $request)\n {\n try {\n DB::beginTransaction();\n $this->userId = loginId();\n $obj = TrainingProgramPriceSetup::where('user_id', '=', $this->userId)->where('type', '=', 4)->first();\n $objLocation = new TrainingSessionLocation();\n $objLocation->training_program_price_setup_id = $obj->id;\n $objLocation->is_listing = 1;\n $objLocation->price_changed = 1;\n $objLocation->save();\n $ptSessionLocations = TrainingSessionLocation::where('id', '=', $objLocation->id)->get();\n $objCount = TrainingSessionLocation::where('training_program_price_setup_id', '=', $obj->id)->count();\n $this->isClientShow();\n\n $view = view('client.partials.setting-partials._common-pt-locations', compact('ptSessionLocations', 'objCount'))->render();\n DB::commit();\n } catch (\\Exception $e) {\n DB::rollback();\n }\n return response()->json(['success' => 'true', 'data' => $view]);\n }", "title": "" }, { "docid": "15fb3bbcb6a2fd094ca74e8cf52ccd0b", "score": "0.5747832", "text": "public function addRequestsCreateExistingLocation($api_key, $v, $content_type, $body)\n {\n $this->addRequestsCreateExistingLocationWithHttpInfo($api_key, $v, $content_type, $body);\n }", "title": "" }, { "docid": "ac564a601b3b0af18b6d5741ddba3b3a", "score": "0.56153214", "text": "public function addRequestsCreateExistingLocationAsync($api_key, $v, $content_type, $body)\n {\n return $this->addRequestsCreateExistingLocationAsyncWithHttpInfo($api_key, $v, $content_type, $body)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "dd151f87a5b671859544d64da39f2063", "score": "0.5512516", "text": "public function addLocation(Request $request)\n {\n $location = new Location();\n\n $data = json_decode($request->getContent(), true);\n\n $form = $this->createForm(LocationType::class, $location);\n $form->submit($data);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($location);\n $em->flush();\n\n return $this->redirectToRoute('get_location', array('id' => $location->getId()));\n\n }\n return $this->json([\n 'message' => '',\n 'path' => 'src/Controller/Api/GeoController.php',\n ]);\n }", "title": "" }, { "docid": "8645af41c0f0dd37559e70876b5ee5bc", "score": "0.5469053", "text": "protected function addRequestsCreateExistingLocationRequest($api_key, $v, $content_type, $body)\n {\n // verify the required parameter 'api_key' is set\n if ($api_key === null || (is_array($api_key) && count($api_key) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $api_key when calling addRequestsCreateExistingLocation'\n );\n }\n // verify the required parameter 'v' is set\n if ($v === null || (is_array($v) && count($v) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $v when calling addRequestsCreateExistingLocation'\n );\n }\n // verify the required parameter 'content_type' is set\n if ($content_type === null || (is_array($content_type) && count($content_type) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $content_type when calling addRequestsCreateExistingLocation'\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 addRequestsCreateExistingLocation'\n );\n }\n\n $resourcePath = '/accounts/me/existinglocationaddrequests';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($api_key !== null) {\n $queryParams['api_key'] = ObjectSerializer::toQueryValue($api_key);\n }\n // query params\n if ($v !== null) {\n $queryParams['v'] = ObjectSerializer::toQueryValue($v);\n }\n // header params\n if ($content_type !== null) {\n $headerParams['Content-Type'] = ObjectSerializer::toHeaderValue($content_type);\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\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": "5eaaa4cf5e2509f0afce6484441cd7a7", "score": "0.54471964", "text": "public function action_request() {\n\t if (Input::method() != 'POST') { $this->response($this->no_access); return; }\n\t \n\t $location_id = $this->param('id');\n\t $location = Model_Location::find($location_id);\n\t\n\t if (!$location) {\n\t return $this->_error_response(Code::ERROR_INVALID_LOCATION_ID);\n\t }\n\t\n\t $current_user = $this->user_login->user;\n\t $location_request = new Model_Location_Request();\n\t $location_request->location = $location;\n\t \n\t $location_request_query = Model_Location_Request::query()\n \t ->where('location_id', $location_id)\n \t ->where('user_id', $current_user->id);\n\t \n\t if ($location_request_query->get_one() == null) {\n \t $current_user->location_requests[] = $location_request;\n \t \n \t if (!$current_user->save()) {\n \t return $this->_error_response(Code::ERROR_SAVING_LOCATION_REQUEST);\n \t }\n\t } else {\n\t return $this->_error_response(Code::ERROR_EXISTENT_LOCATION_REQUEST);\n\t }\n\t \n\t $data = array(\n\t 'data' => array('status' => true),\n\t 'meta' => array('error' => '', 'status' => 1)\n\t );\n\t $this->response($data);\n\t}", "title": "" }, { "docid": "ec0bc01cc8edb1914c55d819f71c1811", "score": "0.5384724", "text": "public function addRequestsCreateNewLocationWithHttpInfo($api_key, $v, $content_type, $body)\n {\n $returnType = '';\n $request = $this->addRequestsCreateNewLocationRequest($api_key, $v, $content_type, $body);\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": "343376dc5a0cc30c2b7f64150d8a9c56", "score": "0.5360261", "text": "public function addAddress($request);", "title": "" }, { "docid": "900f456a92cb5d9047d69e60354b7dbd", "score": "0.5343388", "text": "public function addLocation(LocationRequest $request)\n {\n $data = $request->validated();\n $location = $this->locationService->addLocation($data);\n return $this->respondWithSuccess($location, 201);\n }", "title": "" }, { "docid": "83d30b54e94e7662ae4284f858ab99aa", "score": "0.5306619", "text": "function create() {\n\n $this->db->set('sr_address', $this->input->post('sr_address'));\n $this->db->set('sr_lat', $this->input->post('sr_lat'));\n $this->db->set('sr_lng', $this->input->post('sr_lng'));\n $this->db->set('sr_created', time());\n $this->db->insert('services_requests');\n\n }", "title": "" }, { "docid": "dd195093302b147b06cae1dd8d8ed131", "score": "0.5244416", "text": "public function addRequestsCreateNewLocationAsyncWithHttpInfo($api_key, $v, $content_type, $body)\n {\n $returnType = '';\n $request = $this->addRequestsCreateNewLocationRequest($api_key, $v, $content_type, $body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "64b696c8a98db45a27b009fc4b80d27a", "score": "0.52125835", "text": "public function addGeoPosition(Request $request){\n\t\t$this->geopos->addGeoPosition($request->all() );\n\n\t}", "title": "" }, { "docid": "ebf50df2145ef08b13367dc9cf9ea213", "score": "0.5166903", "text": "private function _insert_request()\n\t{\n\t\treturn $this->EE->db->insert('rest_requests', array(\n\t\t\t'name' => $this->EE->input->post('name'),\n\t\t\t'url' => $this->EE->input->post('url'),\n\t\t\t'verb' => $this->EE->input->post('verb'),\n\t\t\t'format' => $this->EE->input->post('format'),\n\t\t\t'params' => self::_format_params(),\n\t\t\t'record_type' => $this->EE->input->post('record_type'),\n\t\t\t'site_id' => config_item('site_id')\n\t\t));\n\t}", "title": "" }, { "docid": "39725be5185205572e0f53fa9f1047f0", "score": "0.5145181", "text": "public function addAddress($aRequest)\n\t{\n\t}", "title": "" }, { "docid": "903627dc4c33acace3aff5c699348ba7", "score": "0.5130425", "text": "public function createFromLocationV2Event(Request $request)\n {\n $req = $request->all();\n $eventParams = $req['event']['ereignis'];\n $locParams = $req['event']['unternehmen'];\n $result = $req['result'] && $req['result'] !== 0 ? $req['result'] : null;\n\n $newLoc = new Location([\n 'company_register_id' => $locParams['id'],\n 'company_register_event_id' => $eventParams['id'],\n 'result' => $result,\n 'title' => $locParams['name'],\n 'street' => $locParams['strasse'],\n 'zip' => $locParams['plz'],\n 'country' => $locParams['land'] ? $locParams['land'] : 'Deutschland',\n 'phoneNumber' => $locParams['telefon'],\n 'email' => $locParams['email'],\n 'homepage' => $locParams['domain'],\n 'city' => $locParams['ort'],\n 'werbeaktion' => $locParams['werbeaktion'],\n 'canLogin' => 0, // to avoid default true\n 'said_whatsapp' => 0 // to avoid null values\n ]);\n\n if ($newLoc->saveOrFail()) {\n $createdLoc = Location::where('id', $newLoc->id)->first();\n return response()->json($createdLoc, 201);\n }\n }", "title": "" }, { "docid": "a4029345c802eff0601d264ca4b34300", "score": "0.5045866", "text": "public function addAddresses( array $request_body )\n {\n $endpoint = '/addresses';\n $data = ['access_token' => $this->config['access_token']];\n // combine $data array and $addresses array into single $data array\n $data = $data + $request_body;\n\n // Make API Call\n $result = samsara::callAPI('POST', $this->config['base_url'] . $endpoint, $data);\n\n return $result;\n }", "title": "" }, { "docid": "5edd68da68d84166cbb60ec5e1051488", "score": "0.50272596", "text": "public function store(CreateRequestsRequest $request)\n\t{\n\t \n\t\tRequests::create($request->all());\n\n\t\treturn redirect()->route(config('quickadmin.route').'.requests.index');\n\t}", "title": "" }, { "docid": "87ffc384daa6238e51b9e5a17f9d911c", "score": "0.502132", "text": "public function create($parent, Google_Service_MyBusiness_Location $postBody, $optParams = array())\n {\n $params = array('parent' => $parent, 'postBody' => $postBody);\n $params = array_merge($params, $optParams);\n return $this->call('create', array($params), \"Google_Service_MyBusiness_Location\");\n }", "title": "" }, { "docid": "6d424c6da0d9f3771c43c981affc5b1f", "score": "0.49999833", "text": "public function store(Request $request)\n {\n $response = [\n 'status' => 'pass',\n 'message' => 'A new record has been created successfully.'\n ];\n\n Location::create($request->all());\n\n return $response;\n }", "title": "" }, { "docid": "431b94899167015e0a1a6042c9e99a55", "score": "0.49656534", "text": "public function addaddress(Request $request){\n\t\tif(session('customers_create')==0){\n\t\t\tprint Lang::get(\"labels.You do not have to access this route\");\n\t\t}else{\t\n\t\t\n\t\t$title = array('pageTitle' => Lang::get(\"labels.AddAddress\"));\n\t\t\t\t\n\t\t$language_id \t\t\t\t= $request->language_id;\n\t\t$customers_id \t\t\t\t= $request->id;\t\t\n\t\t\n\t\t$customerData = array();\n\t\t$message = array();\n\t\t$errorMessage = array();\n\t\t\n\t\t$customer_addresses = DB::table('address_book')\n\t\t\t->leftJoin('zones', 'zones.zone_id', '=', 'address_book.entry_zone_id')\n\t\t\t->leftJoin('countries', 'countries.countries_id', '=', 'address_book.entry_country_id')\n\t\t\t->where('customers_id', '=', $customers_id)->get();\t\n\t\t\n\t\t$countries = DB::table('countries')->get();\t\n\t\t\n\t\t$customerData['message'] = $message;\n\t\t$customerData['errorMessage'] = $errorMessage;\n\t\t$customerData['customer_addresses'] = $customer_addresses;\t\n\t\t$customerData['countries'] = $countries;\n\t\t$customerData['customers_id'] = $customers_id;\t\n\t\t\n\t\treturn view(\"admin.addaddress\",$title)->with('data', $customerData);\n\t\t}\n\t}", "title": "" }, { "docid": "e9ba4dd4089b162b1607987238552ca4", "score": "0.49513003", "text": "public function addNewReservation(Request $request)\n {\n $reservationList = $this->reservationRepository->findByDateAndTime($request->date, $request->time);\n // Then get the user by email, to get the user id.\n $user = $this->userService->findByEmail($request->email);\n\n return $this->addUserToReservation($request, $reservationList, $user);\n }", "title": "" }, { "docid": "8d32f626563c80dfe5ddf65cf39d4cfa", "score": "0.49313116", "text": "public function addNew(Request $request)\n {\n $this->response = 'jenis_ijin.form';\n \n return $this->done();\n }", "title": "" }, { "docid": "b8a2b6fac0a0c2855d9d2bc941910f8e", "score": "0.49138495", "text": "function __service_request_node_create($request) {\n\t$request = _services_arg_value($request, 'request');\n\n $node = (object) NULL;\n \n foreach ($request as $key => $value) {\n $node->$key = $value;\n }\n\n if (isset($node->field_order_type['und']) && $node->field_order_type['und'][0]['value'] == 2) $node->comment = 2;\n\n node_save($node);\n\n // -- create responce\n if (isset($node->nid)) {\n $responce = array(\n 'nid' => $node->nid,\n 'path' => $node->path,\n );\n }\n else return services_error('Invalid data. Request was not created.', 404);\n \n return $responce;\n}", "title": "" }, { "docid": "e88cbc5b00977a3818edb16e26ffc69c", "score": "0.48980814", "text": "function NewRequest()\r\n\t{\r\n\t\t$doc = document::GetInstance();\r\n\t\t$oDocType = documentType::GetInstance();\r\n\t\t$oOrg = organization::GetInstance();\r\n\t\t$oPriority = documentPriority::GetInstance();\r\n\t\t\r\n\t\tglobal $g_oUserSession;\r\n\t\t\r\n\t\t$docTitle = \"\";\r\n\t\t$docType = \"\";\r\n\t\t$docOrg = \"\";\r\n\t\t$docDescription = \"\";\t\t\r\n\t\t$docPriority = \"\";\r\n\t\t$docDeadline = \"\";\r\n\t\t$rqNumber = \"\";\r\n\t\t\r\n\t\t$docTypeId = -1;\r\n\t\t$docOrgId = -1;\r\n\t\t$reqType = 2;\r\n\t\t$priorityId = 1;\r\n\r\n\t\tif(isset($_POST['title']))\r\n\t\t{\r\n\t\t\t$docTitle = $_POST['title'];\r\n\t\t}\r\n\r\n\t\t$docTitle = preg_replace('/\\s+/', ' ', trim($docTitle));\r\n\r\n\t\tif(!$doc->ValidateTitle($docTitle))\r\n\t\t{\r\n\t\t\treturn $this->OutputCreateRequestResults('false', \"The new document title is smaller than 5 characters or contains an invalid character.\");\r\n\t\t}\r\n\r\n\t\tif(isset($_POST['type']))\r\n\t\t{\r\n\t\t\t$docType = $_POST['type'];\r\n\t\t\t$docTypeId = $oDocType->GetID($docType);\r\n\t\t}\r\n\r\n\t\tif($docTypeId < 0)\r\n\t\t{ \r\n\t\t\treturn $this->OutputCreateRequestResults('false', \"Please select a document type for the new document.\");\r\n\t\t}\r\n\t\t\r\n\t\tif(isset($_POST['organization']))\r\n\t\t{\r\n\t\t\t$docOrg = $_POST['organization'];\r\n\t\t\t$docOrgId = $oOrg->GetID($docOrg);\r\n\t\t}\r\n\r\n\t\tif($docOrgId < 0)\r\n\t\t{ \r\n\t\t\treturn $this->OutputCreateRequestResults('false', \"Please select an organization that the new document will belong to.\");\r\n\t\t}\r\n\t\t\t\t\r\n\t\tif(isset($_POST['description']))\r\n\t\t{\r\n\t\t\t$docDescription = $_POST['description'];\r\n\t\t}\t\t\r\n\t\t\r\n\t\t$docDescription = preg_replace('/\\s+/', ' ', trim($docDescription));\r\n\r\n\t\tif(!$this->ValidateText($docDescription))\r\n\t\t{ \r\n\t\t\treturn $this->OutputCreateRequestResults('false', \"The new document description is smaller than 1 character or contains an invalid character.\");\r\n\t\t}\r\n\r\n\t\tif(!$g_oUserSession->HasRight($this->rights_Add, $docOrgId))\r\n\t\t{\r\n\t\t\treturn $this->OutputCreateRequestResults('false', $g_oUserSession->results->GetMessage());\r\n\t\t}\r\n\t\t\r\n\t\tif(isset($_POST['priority']))\r\n\t\t{\r\n\t\t\t$docPriority = $_POST['priority'];\r\n\t\t\t$priorityId = $oPriority->GetID($docPriority);\r\n\t\t}\t\t\r\n\t\t\r\n\t\tif(isset($_POST['deadline']))\r\n\t\t{\r\n\t\t\t$docDeadline = $_POST['deadline'];\r\n\t\t}\t\r\n\t\t\t\r\n\t\t/*--------------------------------------------------------------------------\r\n\t\t\tChecks to make sure the Expiration Date is after the date of submission. \r\n\t\t----------------------------------------------------------------------------*/\t\t \r\n\t\tif(strlen($docDeadline) != 0)\r\n\t\t{\r\n\t\t\t$todays_date = date(\"Y-m-d\");\r\n\t\t\t\r\n\t\t\t/*--------------------------------------------------------------------------\r\n\t\t\t\tMake sure we have a valid year\r\n\t\t\t----------------------------------------------------------------------------*/\t\t\t\r\n\t\t\t$dateFields = explode('-', $docDeadline);\r\n \t\t\t\r\n \t\t\tif(sizeof($dateFields) != 3)\r\n \t\t\t{\r\n \t\t\t\treturn $this->OutputCreateRequestResults('false', \"Deadline date is invalid: $docDeadline\");\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\t$year = intval($dateFields[0]);\r\n \t\t\t$month = intval($dateFields[1]);\r\n \t\t\t$day = intval($dateFields[2]);\r\n \t\t\t\r\n \t\t\tif(($year == 0) || ($month == 0) || ($day == 0))\r\n \t\t\t{\r\n \t\t\t\treturn $this->OutputFormResults('false', \"Deadline date is invalid.\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$today = strtotime($todays_date);\r\n\t\t\t$expiration_date = strtotime($docDeadline);\r\n\r\n\t\t\tif ($expiration_date <= $today) \r\n\t\t\t{ \r\n \t\t\t\treturn $this->OutputCreateRequestResults('false', \"Deadline date must be after the submission date.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\t\r\n\t\tif(isset($_POST['rq']))\r\n\t\t{\r\n\t\t\t$rqNumber = $_POST['rq'];\r\n\r\n\t\t\tif(strlen($rqNumber) > 0)\r\n\t\t\t{\r\n\t\t\t\tif(!$this->ValidateText($rqNumber))\r\n\t\t\t\t{ \r\n\t\t\t\t\t$rqNumber = preg_replace('/\\s+/', ' ', trim($rqNumber));\r\n\t\t\t\t\treturn $this->OutputCreateRequestResults('false', \"The RQ# entered contains invalid characters.\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\t\r\n\t\t$reqId = $this->CreateTransaction($g_oUserSession->GetUserID(), $reqType);\r\n\r\n\t\tif($reqId < 0)\r\n\t\t{ \r\n\t\t\treturn $this->OutputCreateRequestResults('false', $this->results->GetMessage());\r\n\t\t}\r\n\r\n\t\tif(!$this->AddNewRequest($reqId, $docTitle, $docDescription, $docTypeId, $docOrgId, $priorityId, $docDeadline, $rqNumber))\r\n\t\t{\r\n\t\t\treturn $this->OutputCreateRequestResults('false', $this->results->GetMessage());\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t\tEmail the new DCR to the DMS_Admin\r\n\t\t*/\r\n\t\tif(!$this->EmailNewDCRAdmin($reqId, $docTitle, $docType, $docDescription, $docOrgId))\r\n\t\t{\r\n\t\t\treturn $this->results->Set('false', $this->results->GetMessage());\r\n\t\t}\r\n\r\n\t\treturn $this->OutputCreateRequestResults('true', \"Added document creation request: [$reqId].\");\r\n\t}", "title": "" }, { "docid": "9d7cc5e18c2ac52a84dcf41a93935b96", "score": "0.48643956", "text": "public function addLocation(Request $request)\n {\n $user = Auth::user();\n\n if($request['city'] != null)\n {\n $city = $request['city'];\n $beacon = Beacon::where('city', '=', $city)->where('country', '=', $request['country'])->first();\n\n if(is_null($beacon))\n {\n flash()->overlay('No beacons in this area yet, please submit a beacon request');\n return redirect('newLocation');\n }\n setCoordinates($user, $beacon->beacon_tag);\n $user->location = 0;\n $user->update();\n flash()->overlay('Location changed to: ' . $city);\n }\n else\n {\n $beacon = Beacon::where('country', '=', $request['country'])->first();\n if(is_null($beacon))\n {\n flash()->overlay('No beacons in this country yet, please submit a beacon request');\n return redirect('/newLocation');\n }\n\n setCoordinates($user, $beacon->beacon_tag);\n $user->location = 1;\n $user->update();\n flash()->overlay('Location changed to: ' . $beacon->country);\n }\n\n return redirect ('/home');\n }", "title": "" }, { "docid": "dcd7ec0d3d8fdd08a947cdf61571f7da", "score": "0.4854792", "text": "public function allocateAddress($request);", "title": "" }, { "docid": "aaa28bd7c37a5b4cdaec79fc26c1c893", "score": "0.4814062", "text": "public function addRequestsCreateExistingLocationWithHttpInfo($api_key, $v, $content_type, $body)\n {\n $returnType = '';\n $request = $this->addRequestsCreateExistingLocationRequest($api_key, $v, $content_type, $body);\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": "6ea559da1444ac1c2cf70f7d7eda5fc9", "score": "0.48120412", "text": "public function new_add_request(Request $request)\n {\n \n $newDomainName = $request->get('new_domain_name');\n $newDomainName = Domain::where('name', $newDomainName)->get()->first()->name;\n return $this->add_new($newDomainName);\n }", "title": "" }, { "docid": "4aa73f271e2e91c8024daafafc43601f", "score": "0.4785241", "text": "public function requestAddAction()\n {\n $request = new Application_Model_Request();\n\n $request->setDomain($this->_getParam('domain'));\n $request->setKeyword($this->_getParam('keyword'));\n\n\n if($this->validation($request)) {\n\n $this->request->save($request);\n\n if($request->getId() != NULL){\n if ($this->googlePageParse($request)) {\n $this->redirect('/index/history');\n }\n }\n }else{\n $this->redirect('/',array('errors', $this->errors));\n }\n\n }", "title": "" }, { "docid": "48e93eb9d892deede853818bb589a1fa", "score": "0.4770729", "text": "public function addRequestsCreateExistingLocationAsyncWithHttpInfo($api_key, $v, $content_type, $body)\n {\n $returnType = '';\n $request = $this->addRequestsCreateExistingLocationRequest($api_key, $v, $content_type, $body);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n return [null, $response->getStatusCode(), $response->getHeaders()];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "24c1c4de598de9e47e7abb7fc0c30837", "score": "0.47367138", "text": "public function fleetAddAddress( array $request_body )\n {\n\n $endpoint = '/fleet/add_address';\n $data = ['access_token' => $this->config['access_token']];\n\n // combine $data array and $addresses array into single $data array\n $data = $data + $request_body;\n\n // check to see if group_id key is in array, if not add default group_id from config class\n // @todo move into checkFleetAddress private function\n if(array_key_exists('group_id', $data)) {\n $group_id = ['groupId' => $this->config['group_id']];\n $data = $data = $group_id;\n }\n\n // Make API Call\n $result = samsara::callAPI('POST', $this->config['base_url'] . $endpoint, $data);\n\n return $result;\n\n }", "title": "" }, { "docid": "2f611c1cce27f68f7f97af554153ff3d", "score": "0.47349364", "text": "public function addLocation($location);", "title": "" }, { "docid": "2f611c1cce27f68f7f97af554153ff3d", "score": "0.47349364", "text": "public function addLocation($location);", "title": "" }, { "docid": "20daf3b6c703896e2cf2c2220937393f", "score": "0.47308892", "text": "public static function create()\n {\n return new AddtagRequest();\n }", "title": "" }, { "docid": "b80b2227e61e71171515bfc06f5da35c", "score": "0.46634683", "text": "public function postLocation(Request $request)\n {\n // taking the requests and validating(requsts,user defined rules)\n $validator = Validator::make($request->all(), [\n \n 'physical_address' => 'required',\n 'longitude' => 'required',\n 'latitude' => 'required',\n \n 'user_id' => 'required',\n\n ]);\n\n if ($validator->fails()) {\n return response()->json(['error' => $validator->errors()]);\n }\n\n //creating a location\n $location = Location::create(\n [\n \n 'physical_address' => $request->location,\n 'longitude' => $request->longitude,\n 'latitude' => $request->latitude,\n \n 'user_id' => $request->user_id,\n\n ]\n );\n return response()->json(['location' => $location], 201);\n }", "title": "" }, { "docid": "0adbf7d577a30240a4f26c7770def1dd", "score": "0.4647069", "text": "public function create(Request $request)\n {\n $networks = Network::all();\n $clients = Client::all();\n $routes = Route::all();\n $users = User::all();\n return view('route_maps.create',compact('networks','clients','routes','users'));\n }", "title": "" }, { "docid": "363675ab7120835c6f916e36e75ada2b", "score": "0.46465164", "text": "public function addRequest($request)\n {\n $this->queue[] = $request;\n }", "title": "" }, { "docid": "e570ac6b13b9b772c770c4b68d551bbf", "score": "0.4644391", "text": "protected function addAZRLocationRequest($body = null)\n {\n\n $resourcePath = '/rooms/locations';\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', 'application/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'application/xml'],\n ['application/json', 'multipart/form-data']\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 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "1d7c1e50216bb27331b89403f9007ab1", "score": "0.46396598", "text": "public function add()\n\t{\n\t\t$this->EE->cp->set_breadcrumb(REST_URL, lang('rest_module_name'));\n\t\t$this->EE->view->cp_page_title = lang('add_request');\n\n\n\t\tif ($this->EE->form_validation->run() )\n\t\t{\n\t\t\tif (self::_insert_request())\n\t\t\t{\n\t\t\t\t$this->EE->session->set_flashdata('message_success', sprintf(lang('request_saved_message'), $this->EE->input->post('name')));\n\t\t\t\t$this->EE->functions->redirect(REST_URL);\n\t\t\t}\n\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->data->error = lang('request_save_failed_message');\n\t\t\t}\n\t\t}\n\n\t\t// Validation failedd, report error and re-populate param array\n\t\telse\n\t\t{\n\t\t\t$this->data->error = validation_errors();\n\t\t\t\n\t\t\tparse_str(self::_format_params(), $request['params']);\n\t\t}\n\n\t\t// Set the form action\n\t\t$this->data->form_action = REST_PARAMS.AMP.'method=add';\n\t\t$this->data->request =& $request;\n\n\t\treturn $this->EE->load->view('form', get_object_vars($this->data), TRUE);\n\t}", "title": "" }, { "docid": "18c83e10dd099c795f3b171b78b94c51", "score": "0.46334487", "text": "function AddNewRequest($reqId, $docTitle, $docDesc, $typeId, $orgId, $priorityId, $docDeadline, $rqNumber)\r\n\t{\r\n\t\t$arInsert = array();\r\n\t\t$arInsert[$this->field_Id] = $reqId;\r\n\t\t$arInsert['dcrNew_Title'] = $docTitle;\r\n\t\t$arInsert['dcrNew_Description'] = $docDesc;\r\n\t\t$arInsert['docType_ID'] = $typeId;\r\n\t\t$arInsert['org_ID'] = $orgId;\r\n\t\t$arInsert['dcrPriority_ID'] = $priorityId;\r\n\t\t\t\t\t\t\r\n\t\tif(strlen($docDeadline))\r\n\t\t{\r\n\t\t\t$arInsert['dcrNew_Deadline'] = $docDeadline;\r\n\t\t}\r\n\r\n\t\tif(strlen($rqNumber))\r\n\t\t{\r\n\t\t\t$arInsert['dcrNew_RQNumber'] = $rqNumber;\r\n\t\t}\r\n\r\n\t\tif(!$this->db->insert(\"tblDCRNew\", $arInsert))\r\n\t\t{\r\n\t\t\t$this->results->Set('false', \"Failed entering new DCR data.\");\r\n\t\t\treturn false;\t\r\n\t\t}\r\n\r\n\t\t$this->results->Set('true', \"Transaction created properly.\");\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "b6a07fbb5faac0b8fce2e19865a92d41", "score": "0.4630859", "text": "public function createAction(Request $request)\n {\n $entity = new ObjectLocation();\n $form = $this->createCreateForm($entity);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('objectlocation_show', array('id' => $entity->getId())));\n }\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "title": "" }, { "docid": "f2c79db3f163a95cb43545f7f0ace6f4", "score": "0.46251372", "text": "public function create()\n {\n return view('requests.create');\n }", "title": "" }, { "docid": "bc3a8c6c35e7fc98a13834e2edc36d4b", "score": "0.46238652", "text": "public function executeRequestNew(sfWebRequest $request)\n {\n $this->forward404Unless($request->isMethod(sfRequest::GET));\n \n // Get the ride id\n $this->rideId = $request->getParameter('ride_id');\n \n // Get the carpool information based on the ride id\n $this->ride = Doctrine_Core::getTable('Carpools')->find(array($this->rideId));\n \n $this->form = new SeatsRequestForm();\n }", "title": "" }, { "docid": "b13ea28f88e2f8296ebe9ceaa2f05a62", "score": "0.46184677", "text": "public function store(LocationRequest $request)\n {\n $this->repository->create($request->all());\n\n return response()->json(['message' => trans('general.success_insert',['attribute' => trans('location.location')])]);\n }", "title": "" }, { "docid": "279ba845e1bd76ae4d606b0baecc9a40", "score": "0.46170065", "text": "function fun_addLocations($region_id, $location_name, $location_desc, $latitude, $longitude, $zoom_level, $location_zip, $status) {\n\t\tif($location_name == '' || $region_id == '') {\n\t\t\treturn false;\n\t\t} else {\n\t\t\t$strInsQuery = \"INSERT INTO \" . TABLE_LOCATION . \" \n\t\t\t(location_id, region_id, location_name, location_desc, latitude, longitude, zoom_level, location_zip, status) \n\t\t\tVALUES(null, '\".$region_id.\"', '\".fun_db_input($location_name).\"', '\".fun_db_input($location_desc).\"', '\".$latitude.\"', '\".$longitude.\"', '\".$zoom_level.\"', '\".$location_zip.\"', '\".$status.\"')\";\n\t\t\t$this->dbObj->fun_db_query($strInsQuery);\n\t\t\treturn $this->dbObj->getIdentity();\n\t\t}\n\t}", "title": "" }, { "docid": "d8751dd1a49408e84d473fc52a5af8eb", "score": "0.4616949", "text": "public function store(Request $request)\n {\n $create = Location::create($request->all());\n return response()->json($create);\n }", "title": "" }, { "docid": "e007b1838143e64842d513cb3dc39356", "score": "0.45959237", "text": "public function store(Request $request)\n {\n return timeandlocation::create([\n 'userid' => $request->get('userid'),\n 'checkIn' =>$request->get('checkIn'),\n 'checkOut' =>$request->get('checkOut'),\n 'lat1' => $request->get('lat1'),\n 'lon1' =>$request->get('lon1'),\n ]);\n }", "title": "" }, { "docid": "5aa2dab558db59252f76d3714e8772d1", "score": "0.4593916", "text": "public function create()\n\t{\n\t\tdate_default_timezone_set('Asia/Manila');\n\t\tif (Session::has('empid') && Session::has('empname') && Session::has('empemail')) {\n\t\t\t$id = Session::get('empid', 'default');\n\t\t\t$name = Session::get('empname', 'default');\n\t\t\t$email = Session::get('empemail', 'default');\n\t\t\t$level = Session::get('emplevel', 'default');\n\t\t\t$create_requests = create_request::where('employee_id', '=', $id)->get();\n\t\t\t$supervisor = DB::table('hierarchies')->select('supervisor_id')->get();\n\t\t\t$request_types = DB::table('request_types')\n\t\t\t->lists('request_type', 'request_type');\n\t\t\treturn View::make('create_requests.create')\n\t\t\t\t->with('id', $id)\n\t\t\t\t->with('name', $name)\n\t\t\t\t->with('email', $email)\n\t\t\t\t->with('level', $level)\n\t\t\t\t->with('supervisor', $supervisor)\n\t\t\t\t->with('create_requests', $create_requests)\n\t\t\t\t->with('request_types', $request_types);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSession::flash('message', 'Please login first!');\n\t\t\t\treturn Redirect::to('login/employee');\n\t\t}\n\t}", "title": "" }, { "docid": "32e043f0cad20f2e20b3bd14bd7f28ec", "score": "0.4592761", "text": "public function addApiRequest($userID, $request)\n\t{\n\t\treturn $this->pdo->queryInsert(\n\t\t\tsprintf(\n\t\t\t\t\"INSERT INTO user_requests (user_id, request, timestamp) VALUES (%d, %s, NOW())\",\n\t\t\t\t$userID,\n\t\t\t\t$this->pdo->escapeString($request)\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "7cf7ca3d173ae553d3086a89c97944f0", "score": "0.45741105", "text": "public function actionCreate(int $safety_place_id, string $latitude, string $longitude)\n {\n if (is_null($longitude) || is_null($latitude)) {\n Yii::$app->session->setFlash('error', Yii::t('app', 'Revise su configuración para aceptar acceso al sensor GPS del celular'));\n\n return $this->redirect(Yii::$app->request->referrer);\n }\n\n $model = new Requests();\n $model->user_id = Yii::$app->user->identity->id ?? 0;\n $model->safety_place_id = $safety_place_id;\n $model->lat = $latitude;\n $model->long = $longitude;\n $model->loadDefaultValues();\n\n if ($model->load(Yii::$app->request->post())) {\n $transaction = Yii::$app->db->beginTransaction();\n try {\n $generalSettings = GeneralSettings::findOne(1);\n $model->folio = $generalSettings->requests_folio;\n if (!$model->save()) {\n $transaction->rollBack();\n\n return $this->redirect(Yii::$app->request->referrer);\n }\n\n $generalSettings->updateCounters(['requests_folio' => 1]);\n $transaction->commit();\n\n return $this->redirect(['view', 'id' => $model->id]);\n } catch (\\Throwable $th) {\n $transaction->rollBack();\n Yii::$app->session->setFlash('error', $th->getMessage());\n\n return $this->redirect(Yii::$app->request->referrer);\n }\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "faa0e76abde62ce2d18bdd3406a52661", "score": "0.4572115", "text": "public function create($requestData)\n {\n $sourceLatitude = $requestData->origin[0];\n $sourceLongitude = $requestData->origin[1];\n $destinationLatitude = $requestData->destination[0];\n $destinationLongitude = $requestData->destination[1];\n\n //here we need to validate the source and dest lat long\n $validateSourceDestLatLong = $this->routeCoordinatesValidator\n ->validate(\n $sourceLatitude,\n $sourceLongitude,\n $destinationLatitude,\n $destinationLongitude\n );\n\n if (!$validateSourceDestLatLong) {\n $this->error = $this->routeCoordinatesValidator->getError();\n $this->errorCode = JsonResponse::HTTP_NOT_ACCEPTABLE;\n return false;\n }\n\n $distance = $this->getDistance(\n $sourceLatitude,\n $sourceLongitude,\n $destinationLatitude,\n $destinationLongitude\n );\n\n if (!$distance instanceof \\App\\Http\\Models\\Distance) {\n $this->error = $distance;\n $this->errorCode = JsonResponse::HTTP_INTERNAL_SERVER_ERROR;\n return false;\n }\n\n //Create new record\n $order = new Order();\n $order->status = Order::UNASSIGNED_ORDER_STATUS;\n $order->distance_id = $distance->id;\n $order->distance_value = $distance->distance;\n $order->save();\n\n return $order;\n }", "title": "" }, { "docid": "f2a7e78ab36552c0b319b52c5f7bb921", "score": "0.4566741", "text": "protected function listZRLocationsRequest($parent_location_id = null, $type = null, $page_size = '30', $next_page_token = null)\n {\n if ($page_size !== null && $page_size > 300) {\n throw new \\InvalidArgumentException('invalid value for \"$page_size\" when calling RoomsLocationApi.listZRLocations, must be smaller than or equal to 300.');\n }\n\n\n $resourcePath = '/rooms/locations';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($parent_location_id !== null) {\n $queryParams['parent_location_id'] = ObjectSerializer::toQueryValue($parent_location_id);\n }\n // query params\n if ($type !== null) {\n $queryParams['type'] = ObjectSerializer::toQueryValue($type);\n }\n // query params\n if ($page_size !== null) {\n $queryParams['page_size'] = ObjectSerializer::toQueryValue($page_size);\n }\n // query params\n if ($next_page_token !== null) {\n $queryParams['next_page_token'] = ObjectSerializer::toQueryValue($next_page_token);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'application/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'application/xml'],\n ['application/json', 'multipart/form-data']\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": "5578ce500caa05beee53d937e70c483f", "score": "0.4565979", "text": "protected function siteGetLocationsRequest($RequestLimit = null, $RequestOffset = null): \\GuzzleHttp\\Psr7\\Request\n {\n\n $resourcePath = '/public/v6/site/locations';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($RequestLimit !== null) {\n $queryParams['request.limit'] = ObjectSerializer::toQueryValue($RequestLimit);\n }\n // query params\n if ($RequestOffset !== null) {\n $queryParams['request.offset'] = ObjectSerializer::toQueryValue($RequestOffset);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data'],\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 \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 = Utils::jsonEncode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = Utils::jsonEncode(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 = Utils::jsonEncode($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('authorization');\n if ($apiKey !== null) {\n $headers['authorization'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('siteId');\n if ($apiKey !== null) {\n $headers['siteId'] = $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 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "a2871325ec64ec175753d591d0aa8f9c", "score": "0.45620197", "text": "public function store(Request $request)\n {\n $this->DATABASE::beginTransaction();\n if (!$request->number) $request->merge(['number' => $this->getNextRequestOrderNumber()]);\n\n $request_order = RequestOrder::create($request->all());\n\n $item = $request->request_order_items;\n for ($i = 0; $i < count($item); $i++) {\n\n $detail = $request_order->request_order_items()->create($item[$i]);\n }\n\n $request_order->setCommentLog(\"Sales Order [$request_order->fullnumber] has been created!\");\n\n $this->DATABASE::commit();\n return response()->json($request_order);\n }", "title": "" }, { "docid": "9e66f800a2796cae39aad219a4028d2d", "score": "0.4548103", "text": "public function newAction(Request $request) {\n\t\t\t$user = $this->getAuthenticatedUser();\n\n\t\t\t$formFactory = $this->get('form.factory');\n\n\t\t\t$option['addresses'] = $user->getListAddresses();\n\n\t\t\t//$option['addresses'] = [];\n\t\t\t$task = new Task;\n\t\t\t$form = $formFactory->createNamed(\n\t\t\t\t'new_task',\n\t\t\t\t'AppBundle\\Form\\TaskType',\n\t\t\t\t$task,\n\t\t\t\t$option\n\t\t\t);\n\n\t\t\t$form->handleRequest($request);\n\t\t\tif ($form->isSubmitted() && $form->isValid()) {\n\t\t\t\treturn $this->saveTask($form->getData());\n\t\t\t}\n\n\t\t\treturn $this->render('task/new.html.twig', [\n\t\t\t\t'form' => $form->createView(),\n\t\t\t\t'task' => $task,\n\t\t\t]);\n\t\t}", "title": "" }, { "docid": "12009bf55565157b7d69e0e2c03cb086", "score": "0.45334804", "text": "public function createRequest(BaseDateTime $createdAt, int $requestId): self\n {\n if ($this->activity === null) {\n $this->activity = $this->getActivityEntity();\n $this->entityManager->persist($this->activity);\n }\n\n $entity = $this->getRequestEntity(\n $this->activity,\n $createdAt,\n $requestId\n );\n\n $this->entityManager->persist($entity);\n $this->requests[$requestId] = $entity;\n\n return $this;\n }", "title": "" }, { "docid": "f099cfd789b2eac0c67917b031ede9d9", "score": "0.45328236", "text": "public function store(CreaterouteAPIRequest $request)\n {\n $input = $request->all();\n\n $routes = $this->routeRepository->create($input);\n\n return $this->sendResponse($routes->toArray(), 'Route saved successfully');\n }", "title": "" }, { "docid": "9b586fb349c1e5501c442310acfee7f3", "score": "0.4518993", "text": "public function addRequest(Request $request)\n {\n $attributes = $this->createAttributes($request);\n\n $exchange = $this->getExchange($request->server());\n\n $message = json_encode($request->params());\n\n if (json_last_error() !== JSON_ERROR_NONE) {\n throw new Exception\\InvalidArgumentException('Error during json encoding');\n }\n\n $exchange->publish($message, $request->routingKey(), Constants::AMQP_NOPARAM, $attributes);\n\n if (null !== $request->id()) {\n $this->requestIds[] = $request->id();\n }\n\n if (0 !== $request->expiration() && ceil($request->expiration() / 1000) > $this->timeout) {\n $this->timeout = ceil($request->expiration() / 1000);\n }\n\n ++$this->countRequests;\n }", "title": "" }, { "docid": "614807d9704b15ffb18dab17f90c98ed", "score": "0.45060152", "text": "function xmls_clone_addrequest($url, $ip, $patterns) {\n if ($ip) {\n watchdog('Clone', 'xmls_clone_addrequest ' . $ip);\n }\n if (!$url) {\n return xmlrpc_error(1, t('error adding url to the list. Specify an URL in the configuration'));\n }\n if (variable_get('clone_allow_clone', FALSE)) {\n foreach ($patterns as $pattern) {\n $id = db_insert('clone_requests')\n ->fields(array(\n 'url' => $url,\n 'ip' => $ip,\n 'created' => time(),\n 'name' => $pattern['name'],\n 'title' => $pattern['title'],\n 'version' => $pattern['version'],\n 'format' => $pattern['format'],\n 'content' => $pattern['content'],\n ))\n ->execute();\n watchdog('Clone', $pattern['title'] . ' ' . $pattern['version']);\n }\n return t('Successfully made a clone request.');\n }\n else {\n return xmlrpc_error(1, t('Sorry, but this instance does not allow any clone requests.'));\n }\n}", "title": "" }, { "docid": "f8532156dfc7b0bad9eb105efdc06767", "score": "0.44954485", "text": "protected function addNewAddress()\n {\n $this->_rootElement->find($this->addNewAddress)->click();\n }", "title": "" }, { "docid": "83667a0b9f21f6b0aa54cb6f04ebdcf8", "score": "0.4458799", "text": "public function create()\n {\n return view('admin.requests.create');\n }", "title": "" }, { "docid": "595c0610f8dd15e61e6dcfd3cd727445", "score": "0.44523042", "text": "public function create($requests)\n {\n $this->_perform_for_all_langs($requests, 'create');\n }", "title": "" }, { "docid": "45f5b33fd2acb67d334b102065de8123", "score": "0.44448724", "text": "public function add(Request $request)\n {\n\n $clientModel = new ClientModel($request->all());\n $clientRepository = new ClientRepository();\n \n try {\n $clientModel = $clientRepository->add($clientModel);\n } catch (PDOException $e) {\n //@todo logger\n } catch (Exception $e) {\n //@todo logger\n }\n\n unset($clientRepository);\n\n return response()->json(['status' => 0, 'uid' => $clientModel->getUid()], 201);\n }", "title": "" }, { "docid": "9aafa759bf4a4c309b1827bb2785a312", "score": "0.44329813", "text": "public function create()\n\t{\n\t\tif(Request::ajax())\n\t\t{\n\t\t\treturn $this->_ajax_denied();\n\t\t}\n\t\tif(!Location::canCreate())\n\t\t{\n\t\t\treturn $this->_access_denied();\n\t\t}\n\t\treturn View::make('locations.create');\n\t}", "title": "" }, { "docid": "edddb916c18f26ce289e9f1ca53f259f", "score": "0.44274032", "text": "public function createLocation($body) {\n if ($body == null) {\n return null;\n }\n // if (gettype($body) == \"array\") {\n // $body = json_encode($body);\n // }\n $createLocationPost = $this->apiPost($this->endpoints[\"locations\"], $body);\n return $createLocationPost;\n }", "title": "" }, { "docid": "5807571ab91ef58ad6981ba9693d570b", "score": "0.44249517", "text": "public function store(LocationRequest $request)\n {\n $this->authorize('create', [$this->authorizedModel]);\n\n return response($this->obj->create($request->all()));\n }", "title": "" }, { "docid": "51bf1421dec9996c79021c84bc71ad1c", "score": "0.44208738", "text": "public function addPerson($request)\n {\n $parameters = (object) $request->get_params();\n $person = (object) [];\n\n if (isset($parameters->email_address)) {\n $person->email_addresses = [[\n 'address' => $parameters->email_address\n ]];\n } else {\n $this->actionNetwork::error(\n 'An email address is required.'\n );\n }\n\n if (isset($parameters->postal_code)) {\n $person->postal_addresses = [[\n 'postal_code' => $parameters->postal_code,\n ]];\n }\n\n if (isset($parameters->family_name)) {\n $person->family_name = $parameters->family_name;\n }\n\n if (isset($parameters->given_name)) {\n $person->given_name = $parameters->given_name;\n }\n\n return new WP_REST_Response(\n (new Utility())->addPerson($person),\n 200\n );\n }", "title": "" }, { "docid": "f03601ec616b3791d82d6982edaa773d", "score": "0.44163397", "text": "public function savePtLocations(Request $request)\n {\n try {\n DB::beginTransaction();\n $this->userId = loginId();\n $data = $request->input('data');\n $keyIndex = $request->input('key');\n $keyVal = $request->input('keyVal');\n $obj = TrainingProgramPriceSetup::where('user_id', '=', $this->userId)->where('type', '=', 4)->first();\n $obj->$keyIndex = $keyVal;\n $obj->save();\n if (!empty($data)) {\n $record = [];\n foreach ($data as $key => $row) {\n if ($row['name'] !== $keyIndex) {\n $strSplit = explode('_', $row['name']);\n $record[$strSplit[3]][$strSplit[1] . '_' . $strSplit[2]] = ($row['value'] == 'on') ? 1 : $row['value'];\n }\n }\n foreach ($record as $key => $row) {\n TrainingSessionLocation::updateorCreate(['id' => $key], $row);\n }\n }\n $this->success = true;\n $this->isClientShow();\n DB::commit();\n } catch (\\Exception $e) {\n DB::rollback();\n }\n return response()->json(['success' => $this->success]);\n }", "title": "" }, { "docid": "bed2ef3c23488d065eb5949ee966020e", "score": "0.4402009", "text": "public function add(Request $request)\n {\n $m = self::MODEL;\n\n if ($request->user->cannot('create', $m)) {\n abort(403);\n }\n\n $this->validate($request, $m::$rules);\n return $this->respond(Response::HTTP_CREATED, $m::create($request->all()));\n }", "title": "" }, { "docid": "d158bd4e7df565c8096709b0f6df9482", "score": "0.4400169", "text": "protected function makeRequestAddBookingNotes($arguments)\n {\n return\n [\n 'AddBookingNotes' => [\n \"rq\" => $arguments\n ]\n ];\n }", "title": "" }, { "docid": "1bffe777bd8e1faffd6ab8e3ef618178", "score": "0.43947718", "text": "function ajaxAddLocation() {\n\n\t\tif (!$this->allow_editsettings) return $this->permissionDenied();\n\t\t\n\t\t$this->query(\n\t\t\t\"INSERT INTO $this->table_locations (caption) VALUES (\\\"Sted uten navn\\\")\"\n\t\t);\n\t\t$id = $this->insert_id();\n\t\t\n\t\tprint $this->makeLocationList();\n\t\texit();\n\t\t\n\t}", "title": "" }, { "docid": "3cdf4c4e84968258d46e1f4724dbc13c", "score": "0.43932998", "text": "public function store(LocationRequest $request) {\n\t\t// if guest or cannot location.create, redirect -> home\n\t\tif(Entrust::can('location.create') == false) return redirect()->route('home');\n\n if(isset($request->btn_Cancel)) return Redirect::route('location.index');\n\n $this->transaction(function($this) use($request, &$location) {\n /*\n * retrieve all the request form field values\n * and pass them into create to mass update the new Location object\n * Can replace Request::all() in the call to create, because we added validation.\n */\n $location = $this->locationRepository->create($request->all());\n\n // temp code until a second warehouse is created\n $warehouses = $this->warehouseRepository->filterOn(['Warehouse_Code' => 'CALEDON']);\n $this->doLocate($location->objectID, $warehouses[0]->objectID);\n });\n\n // to see our $location, we could Dump and Die here\n\t\t//dd(__METHOD__.'('.__LINE__.')',compact('request','location','warehouses'));\n\n\t\treturn redirect()->route('location.show', ['id' => $location->objectID])\n ->with(['status' => Lang::get('internal.created', ['class' => Location::TABLE_NAME])]);\n\t}", "title": "" }, { "docid": "3177bcd0a1b55b1a45a1ee798c55415e", "score": "0.43897656", "text": "private function updateLocations()\n {\n\n $this->options['headers'] = [\n 'Content-type' => 'application/json',\n 'Authorization' => $this->http->headers->get('JWT_TOKEN')\n ];\n\n $this->options = array_merge($this->options, [\n 'body' => $this->http->headers->get('data')\n ]);\n\n $request = $this->client->request($this->http->headers->get('request_method'), $this->http->headers->get('request_url'), $this->options);\n\n if ($request->getStatusCode() === 200) {\n $request = \\GuzzleHttp\\json_decode($request->getBody());\n $this->output($request);\n }\n }", "title": "" }, { "docid": "1e48f22d02820340ea6e50e1dde717e6", "score": "0.43753535", "text": "function processCreateLocation()\n{\n $connect = sqlConnect();\n\n // Determine whether (and what) map has been assigned to the new location\n if (empty($_GET['maps']) || $_GET['maps'] == 'None') {\n $is_map = 0;\n $mapid = 'NULL';\n } else {\n $result = mysqli_query($connect, sprintf(\n 'select mapid from mapimgs where name = \"%s\"',\n mysqli_real_escape_string($connect, $_GET['maps'])\n )) or die('Invalid query: ' . mysqli_error($connect));\n\n $d = mysqli_fetch_array($result);\n\n $is_map = 1;\n $mapid = $d['mapid'];\n }\n\n $locname = '';\n\n if (isset($_GET['locname'])) {\n $locname = $_GET['locname'];\n }\n\n $link = '';\n\n if (isset($_GET['link'])) {\n $link = $_GET['link'];\n }\n\n // Update db\n $result = mysqli_query($connect, sprintf(\n 'INSERT INTO `maps` (`location`, `text_link`, `is_mapfile`, `mapid`)' .\n ' VALUES (\"%s\", \"%s\", %s, %s)',\n mysqli_real_escape_string($connect, $locname),\n mysqli_real_escape_string($connect, $link),\n mysqli_real_escape_string($connect, $is_map),\n mysqli_real_escape_string($connect, $mapid)\n )) or die('Invalid query: ' . mysqli_error($connect));\n\n // create a new table `stacks_locid`\n $result = mysqli_query($connect, sprintf(\n 'SELECT location_id from maps WHERE location = \"%s\"',\n mysqli_real_escape_string($connect, $locname)\n ));\n\n $loc_id = mysqli_fetch_array($result)[0];\n\n $result = mysqli_query($connect, sprintf(\n 'CREATE TABLE `stacks_%s` (`beginning_call_number` varchar(50),' .\n ' `ending_call_number` varchar(50), `range_number` int(50),' .\n ' `std_beg` varchar(75), `std_end` varchar(75),' .\n ' `x_coord` smallint(4), `y_coord` smallint(4),' .\n ' PRIMARY KEY(`range_number`))',\n mysqli_real_escape_string($connect, $loc_id)\n )) or die('Invalid query: ' . mysqli_error($connect));\n\n $dynamic = '<p>Location has been successfully created.</p>';\n\n return $dynamic;\n}", "title": "" }, { "docid": "55f5e50e38758e3accf30513b52dbf73", "score": "0.43545577", "text": "public function executeOfferNew(sfWebRequest $request)\n {\n $this->forward404Unless($request->isMethod(sfRequest::GET));\n \n // Get the ride id\n $this->rideId = $request->getParameter('ride_id');\n \n // Get the passenger information based on the ride id\n $this->ride = Doctrine_Core::getTable('Passengers')->find(array($this->rideId));\n \n $this->form = new SeatsOfferForm();\n }", "title": "" }, { "docid": "a7f5305a8f8388f43acc2a737d73e795", "score": "0.43520936", "text": "public function addSpotRequestId($spot_instance_request_id)\n {\n $this->m_spot_instance_request_ids[] = $spot_instance_request_id;\n }", "title": "" }, { "docid": "3030bff2ea78e0fd5101b049ce496d91", "score": "0.4344842", "text": "public function addShipments($requestId, $shipmentIds, array $additional = [])\n\t{\n\t\t$result = new Result();\n\t\t$result->addError(new Main\\Error(Loc::getMessage('SALE_DLVR_REQ_BASE_SHIPMENT_ADD_NOT_SUPPORT')));\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "b4312083526e98ebc1b3a596fab9599e", "score": "0.4342231", "text": "public function store(Request $request)\n {\n if(!Gate::forUser($request->user())->allows('manage-locations'))\n {\n abort(403, 'Unauthorized action.');\n }\n\n $duplicate = Location::where('name', $request->name)->first();\n\n $this->validate($request, [\n 'name' => 'required',\n ]);\n\n DB::transaction(function() use($request){\n $location = new Location;\n\n $location->name = $request->name;\n\n $location->save();\n });\n }", "title": "" }, { "docid": "c075dc987ce3bf671a7a0a8a0f3032ac", "score": "0.4336914", "text": "public function create()\n {\n return view('admin.service-requests.create');\n }", "title": "" }, { "docid": "fce4d08a06730b08a81553d9789a5e6d", "score": "0.43365934", "text": "public function addRequest($requesterID, $assetID, $type, $reqDetails) {\n\t\t$eid = $this->db->real_escape_string($requesterID);\n\t\t$aid = $this->db->real_escape_string($assetID);\n\t\t$reqtype = $this->db->real_escape_string($type);\n\t\t$details = $this->db->real_escape_string($reqDetails);\n\t\tif ($reqtype == \"Use\" || $reqtype == \"Retirement\") { //these require an AID\n\t\t\t$query = \"INSERT INTO requests (eid, aid, reqtype, status, opened, closed, details) VALUES ('$eid', $aid, '$reqtype', 'Open', NOW(), NULL, '$details');\";\n\t\t} else if ($reqtype == \"Purchase\") { //these don't need an AID\n\t\t\t$query = \"INSERT INTO requests (eid, aid, reqtype, status, opened, closed, details) VALUES ('$eid', NULL, '$reqtype', 'Open', NOW(), NULL, '$details');\";\n\t\t}\n\t\tif(!$queryResponse = $this->db->query($query)) {\n\t\t\treturn \"Error adding request to database!\";\n } else {\n\t\t\treturn \"Successfully added request!\";\n }\n\t}", "title": "" }, { "docid": "6c626bc3cb1b61dc015210d99224e283", "score": "0.43356943", "text": "public function create($request);", "title": "" }, { "docid": "f8d2ae52de452a73b8ea202d8f2d2a76", "score": "0.43343636", "text": "public function associateAddress($request);", "title": "" }, { "docid": "764ea7e70b17b284b2f14f979b823cb5", "score": "0.43250996", "text": "public function save_new(Request $request)\n {\n return $this->save($request, 0, true);\n }", "title": "" }, { "docid": "536ba626738c6e660280f3da4281ceaa", "score": "0.43099883", "text": "public function actionJsonCreate() {\n\t\t$params = CJSON::decode($GLOBALS['HTTP_RAW_POST_DATA']);\n\t\t$ok = true;\n\t\tforeach($params['details'] as $p){\n\t\t\t$model = new RequestDetail;\n\t\t\t$model->attributes = $p;\n\t\t\t$model->item_id = $p['item']['id'];\n\t\t\t$model->request_id = $params['request_id'];\n\t\t\tif(!$model->save())\n\t\t\t\t$ok = false;\n\t\t}\n\t\tif($ok){\n\t\t\techo \"{success: true}\";\t\n\t\t}else{\n\t\t\techo \"{success: false}\";\n\t\t}\n\t}", "title": "" }, { "docid": "402c99d5e4f7492f1af6db2d55ffb6d2", "score": "0.43099108", "text": "public function create()\n {\n return view('posts.requests.create');\n }", "title": "" }, { "docid": "52535073961da17d8f6f2dbace39ba33", "score": "0.43097967", "text": "public function store(Request $request)\n {\n //\n $validator = Validator::make($request->all(), [\n 'start_location' => 'required | unique:locations',\n 'end_location' => 'required | unique:locations',\n 'duration_in_hours' => 'required'\n ]);\n\n if($validator->fails()) {\n return $this->formatInputErrorResponse($validator->errors());\n }\n\n $tripData = [\n 'start_location' => $request->start_location,\n 'end_location' => $request->end_location,\n 'duration_in_hours' => $request->duration_in_hours\n ];\n try{\n $tripDestination = TripDestination::create($tripData);\n return $this->formatCreatedResponse('Trip created', $tripDestination);\n } catch(Exception $exception){\n return $this->formatInputErrorResponse('Record already exist');\n }\n \n }", "title": "" }, { "docid": "820227555355c2efbfd327ee5f62b748", "score": "0.43081722", "text": "function AddRequestItem($reqId, $pageNumber, $stepNumber, $currentStep, $requestUpdate, $bugId = -1, $refId = -1, $comments = \"\")\r\n\t{\r\n\t\tif($bugId < 0)\r\n\t\t{\r\n\t\t\tif(!$this->ValidateItem($pageNumber, $stepNumber, $currentStep, $requestUpdate))\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t/*\r\n\t\t\tThe record does not exist, add it\r\n\t\t*/\r\n\t\t$arInsert = array();\r\n\r\n\t\t$arInsert['dcrItem_PageNumber'] = $pageNumber;\r\n\r\n\t\t$arInsert['dcrItem_StepNumber'] = array();\r\n\t\t$arInsert['dcrItem_StepNumber']['value'] = $stepNumber;\r\n\t\t$arInsert['dcrItem_StepNumber']['type'] = \"string\";\r\n\r\n\t\t$arInsert['dcrItem_CurrentStep'] = $currentStep;\r\n\t\t$arInsert['dcrItem_RequestUpdate'] = $requestUpdate;\r\n\t\t$arInsert['request_ID'] = $reqId;\r\n\t\t\t\t\r\n\t\tif($bugId > 0)\r\n\t\t{\t\r\n\t\t\t$arInsert['dcrItem_BugID'] = $bugId;\r\n\t\t\t$arInsert['dcrItem_Comments'] = $comments;\r\n\t\t\t$arInsert['user_ID'] = $refId;\r\n\t\t}\r\n\t\t\r\n\t\tif(!$this->db->insert(\"tblDCRItem\", $arInsert))\r\n\t\t{\r\n\t\t\treturn $this->OutputChangeRequestResults('false', \"Database Error: \" . $this->db->results-GetMessage());\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "a50ff4e76368c31c30e8b733e24613e1", "score": "0.4301726", "text": "public function fillLocations(Request $request){\n\n $d = json_decode($request->data, true);\n $city_id = City::firstOrCreate(['name' => $d['city']])->id;\n $location =array();\n foreach ($d['location'] as $k => $v) {\n $location['name'] = $v;\n $location['city_id'] = $city_id;\n Location::firstOrCreate($location);\n }\n }", "title": "" }, { "docid": "99c330125e2e838bfe0419cec4bdd8ca", "score": "0.4296773", "text": "public function store(Request $request)\n {\n //\n $validator = Validator::make($request->all(), [\n 'start_location_id' => 'required',\n 'end_location_id' => 'required',\n 'amount' => 'required',\n 'start_time' => 'required'\n ]);\n \n if($validator->fails()) {\n return $this->formatInputErrorResponse($validator->errors());\n }\n\n $tripData = [\n 'start_location_id' => $request->start_location_id,\n 'end_location_id' => $request->end_location_id,\n 'amount' => $request->amount,\n 'start_time' => $request->start_time\n ];\n\n $trip = Trip::create($tripData);\n return $this->formatCreatedResponse('Trip created', $trip); \n\n }", "title": "" }, { "docid": "c2b8384eefe51dfbbe0a2404b8361e32", "score": "0.42938018", "text": "public function create()\n\t{\n\t\treturn View::make('discount.locations.create');\n\t}", "title": "" }, { "docid": "2f9aa61457e63873380f72ee510270b0", "score": "0.42876673", "text": "function add()\n {\n if($this->isWebAdmin()){\n $this->global['pageTitle'] = \"Add New ATM Location - \".APP_NAME;\n $this->global['pageMenu'] = 'Add New ATM Location';\n $this->global['contentHeader'] = 'Add New ATM Location';\n $this->global['contentTitle'] = 'Add New ATM Location';\n $this->global ['role'] = $this->role;\n $this->global ['name'] = $this->name;\n $this->global ['repo'] = $this->repo;\n\n $data['classname'] = $this->cname;\n $this->loadViews($this->view_dir.'create', $this->global, $data);\n }else{\n redirect($this->cname.'/view');\n }\n }", "title": "" }, { "docid": "34a2c03a9c018d10b0ffaa2fba7e1e81", "score": "0.42863354", "text": "public function createAllocation(Requirement $request)\n {\n $alloc = $this->instantiateAllocation($request);\n $this->allocations[] = $alloc;\n\n return $alloc;\n }", "title": "" }, { "docid": "97f7115c326744f024a67a26fb16d1dd", "score": "0.42842034", "text": "public function store(Request $request)\n {\n \n\t\t$loc = new location;\n\t\t$loc->name = strtoupper($request->locName);\n\t\t$loc->save();\t\n\t\treturn redirect('loc')->with('status', 'Location '.$loc->name.' created succesfully');\n }", "title": "" }, { "docid": "a6ff2a08984f97929cecf7717e052101", "score": "0.42793977", "text": "public function storePi(Request $request)\n {\n $input = $request->all();\n $pi_id = $input[\"pi_id\"];\n $description = $input[\"description\"];\n $polys = json_decode($input[\"polysJSON\"]);\n\n Location::where('pi_id', $pi_id)->delete();\n $arr = array();\n foreach ($polys as $poly) {\n $arr[\"pi_id\"] = $pi_id;\n $arr[\"no\"] = $poly->no;\n $arr[\"lat\"] = $poly->lat;\n $arr[\"lng\"] = $poly->lng;\n $arr[\"color\"] = $poly->color;\n\n Location::create($arr);\n }\n Pi::where('pi_id', $pi_id)->update([\"description\" => $description]);\n return response()->json(['success'=>'Pi locations saved successfully.']);\n }", "title": "" }, { "docid": "66897320841f95e540081468ecb724f4", "score": "0.42789555", "text": "public function postAddRelationshipByEmail() {\n //return Response::json(['message' => json_decode(Input::get('request'))], self::STATUS_OK);\n if (!Input::has('request')) {\n return Response::json(['errorMessage' => 'Query missing required value'], \n self::STATUS_BAD_REQUEST);\n }\n $requests = json_decode(Input::get('request'), true);\n //return Response::json($requests, self::STATUS_OK);\n $participantId = UserModel::getPersonOrGuestForUser(Auth::user()->id);\n $response = array();\n foreach($requests as $request) {\n if (!$request['confirm']) {\n continue;\n }\n if ($request['member_status'] == ParticipantTypes::NONE) {\n //create guest\n //create guest relationship\n $code = str_random(60);\n $response[] = $request['request']['email'];\n $response[] = GuestModel::createGuest($request['request']['email'], \n $request['request']['first_name'], \n $request['request']['last_name'], \n $code, \n $participantId\n );\n $response[] = \"create guest and guest relationship\";\n } elseif ($request['member_status'] == ParticipantTypes::GUEST) {\n if ($request['relationship_status'] == 'none') {\n //create guest relationship\n GuestModel::createGuestRelationship($participantId, $request['participant_info']['participant_id']);\n $response[] = \"create guest relationship\";\n }\n } elseif ($request['member_status'] == ParticipantTypes::MEMBER) {\n if ($request['relationship_status'] == 'request received' || \n $request['relationship_status'] == 'none') {\n //create friendship\n createFriendship($participantId, $request['participant_info']['participant_id']);\n $response[] = \"create friendship\";\n }\n }\n }\n return Response::json(['message' => $response], self::STATUS_OK);\n }", "title": "" }, { "docid": "999b27026fe22ba9fac2bd6741b01b5c", "score": "0.4272102", "text": "public function store(Request $request)\n {\n $this->validate($request, [\n 'location' => 'required',\n 'description' => 'required',\n 'address' => 'required'\n ]);\n\n $location = Location::create([\n 'location' => $request->location,\n 'description' => $request->description,\n 'address' => $request->address,\n 'posted_by' => $request->posted_by,\n ]);\n \n $locationCategory = LocationCategory::findOrFail($request->category);\n $location->categories()->attach($locationCategory);\n\n $locationGallery = Image::find($request->photos);\n $location->photos()->attach($locationGallery);\n\n return new LocationResource($location);\n }", "title": "" }, { "docid": "770559b1915441f1458f304088097c12", "score": "0.42703885", "text": "public function add(Request $request)\n {\n\n\n if (Auth::check()) {\n $user_id = Auth::user()->id;\n $task = new Task();\n $task->task_name = $request->task_name;\n $task->user_id = $user_id;\n $task->save();\n\n return $task->id;\n }\n\n\n }", "title": "" }, { "docid": "4993b51ab5e61c2139051e19215a472e", "score": "0.42682", "text": "public function addTask(Request $request)\n {\n $user = Auth::user();\n $validator = Validator::make(\n $request->all(),\n [\n \"task\" => \"required\",\n \"status\" => \"in:Pending,Done\"\n ]\n );\n\n if ($validator->fails()) {\n return response()->json([\n \"validation_errors\" => $validator->errors()->add(\n \"status\",\n \"Status can only accept Pending or Done as input\"\n )\n ]);\n }\n\n $task_array = array(\n \"task\" => $request->task,\n \"status\" => $request->status,\n \"user_id\" => $user->id\n );\n\n $task = Task::create($task_array);\n $task_data = Task::where(\"id\", $task->id)->get();\n\n if (!is_null($task)) {\n return response()->json([\"status\" => 1, \"success\" => true, \"message\" => \"Task added successfully\", \"task\" => $task_data]);\n } else {\n return response()->json([\"status\" => 0, \"success\" => false, \"message\" => \"Error! Task could not be added.\"]);\n }\n }", "title": "" } ]
5d0a933582380eda55f347f6af15cc10
User or store or driver Resister
[ { "docid": "f9884596c8ddc401f4cf9cdb850174dc", "score": "0.0", "text": "public function register(Request $request) {\n\t\t$language = isset($request->language) ? $request->language : \"en\";\n App::setLocale($language);\n\t\tif(isset($request->language)) {\n Session::put('language', $language);\n }\t\n \n\t\t$rules = array(\n\t\t\t'auth_type' \t=> 'required|in:facebook,google,apple,mobile_number',\n\t\t\t'mobile_number' => 'required_if:auth_type,==,mobile_number|regex:/^[0-9]+$/|min:6',\n\t\t\t'type' => 'required|in:0,1,2',\n\t\t\t'password' => 'required_if:auth_type,==,mobile_number|min:6',\n\t\t\t'first_name' => 'required',\n\t\t\t'last_name' => 'required',\n\t\t\t'country_code' => 'required_if:auth_type,==,mobile_number',\n\t\t);\n\n\t\tif(in_array($request->auth_type,['facebook','google','apple'])) {\n\t\t\t$social_signup = true;\n\t\t\t$rules['auth_id'] = 'required';\n\t\t}\n\t\t$messages = array(\n 'required' => ':attribute '.trans('user_api_language.register.field_is_required').'', \n 'password.required_if' => ':attribute '.trans('user_api_language.register.field_is_required').''\n );\n\t\t\n\t\t\n\t\t$attributes = array(\n\t\t\t'mobile_number' => trans('user_api_language.register.mobile_number'),\n\t\t\t'type'=>trans('user_api_language.register.type'),\n\t\t\t'password'=>trans('user_api_language.register.password'),\n\t\t\t'first_name' => trans('user_api_language.register.first_name'),\n\t\t\t'last_name' => trans('user_api_language.register.last_name'),\n\t\t\t'country_code' => trans('user_api_language.register.country_code'),\n\t\t\t//'dob' => trans('api_messages.register.dob'),\n\t\t);\n\n\t\t$validator = Validator::make($request->all(), $rules, $messages, $attributes);\n\t\t\n\t\tif ($validator->fails()) {\n\t\t\treturn response()->json([\n\t\t\t 'status_code' => '0',\n\t\t\t 'status_message' => $validator->messages()->first(),\n\t\t\t]);\n\t\t}\n\t\t$mobile_number = $request->mobile_number;\n\n\t\tif( $request->auth_type == 'mobile_number')\n\t\t{\n\t\t\t\n\t\t\t$check_user = User::validateUser($request->type,$request->country_code,$request->mobile_number,$request->email)->count();\n\t\t\t// $auth_column = trans('api_messages.register.email_mobile');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$auth_column = $request->auth_type.'_id';\n\t\t\t$check_user = User::where('auth_type',$request->auth_type)->where($auth_column,$request->auth_id)->count();\n\t\t}\n\t\t\n\t\tif ($check_user > 0) {\n\t\t\treturn response()->json([\n\t\t\t\t'status_code' => '0',\n\t\t\t\t'status_for_already' =>'Already you have an account,please login...',\n\t\t\t\t'status_message' => trans('user_api_language.register.already_account'),\n\t\t\t]);\n\t\t}\n\n\t\t$name = html_entity_decode($request->first_name) .'~'. html_entity_decode($request->last_name);\n\n\t\t$user = new User;\n\t\t$user->mobile_number = $request->mobile_number;\n\t\t$user->name = $name;\n\t\t$user->user_first_name = html_entity_decode($request->first_name);\n\t\t$user->user_last_name = html_entity_decode($request->last_name);\n\t\t$user->type = $request->type;\n\t\tif( $request->auth_type == 'mobile_number')\n\t\t{\n\t\t\t$user->password = bcrypt($request->password);\n\t\t}\n\t\t$user->country_code = Country::whereCode($request->country_code)->value('phone_code');\n\t\t$user->country_id \t= Country::whereCode($request->country_code)->value('id');\n\t\t$user->currency_code = DEFAULT_CURRENCY;\n\t\t$user->email = $request->email;\n\t\t$user->auth_type = $request->auth_type;\n\t\tif($request->auth_type == 'facebook') {\n $user->facebook_id\t = $request->auth_id;\n }\n else if($request->auth_type == 'google') {\n $user->google_id\t = $request->auth_id;\n }\n else if($request->auth_type == 'instagram') {\n \t$user->instagram_id\t = $request->auth_id;\n }\n else if($request->auth_type == 'apple') {\n // $auth_column = 'apple_id';\n $user->apple_id\t = $request->auth_id;\n }\n\t\t\n\t\t\n\t\t$user->status = $request->type == 2 ? $user->statusArray['vehicle_details'] : $user->statusArray['active'];\n\t\t$user->language = $language;\n\n\t\tif(isset($request->dob)){\n\t\t\tif($request->dob !=''){\n\t\t\t\t$user->date_of_birth = date('Y-m-d',strtotime($request->dob));\n\t\t\t}\n\t\t}\n\n\t\t$user->save();\n\t\tLog::info(\"Curl_ Result\".json_encode($request->all()));\n\t\t$user_image = urldecode($request->user_image);\n\t\tif($request->user_image)\n\t\t{\n\t\t\t$this->fileSave('social_login', $user->id, $request->user_image, '1');\n\t\t}\n\t\t\n\n\t\tif($request->type == 2) {\n\t\t\t$driver = new Driver;\n\t\t\t$driver->user_id = $user->id;\n\t\t\t$driver->save();\n\t\t}\n\n\t\tif( $request->auth_type == 'mobile_number'){\n\t\t\t$credentials = $request->only('mobile_number', 'password', 'type');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$credentials = $request->only('auth_type', 'auth_id', 'type');\n\t\t\t// $token = JWTAuth::fromUser($user);\n\t\t}\n\t\t// dd($token);\n\n\n\t\ttry {\n\t\t\t$token = JWTAuth::fromUser($user);\n\t\t\t// if (!$token = JWTAuth::attempt($credentials)) {\n\t\t\t// \treturn response()->json(['error' => 'invalid_credentials']);\n\t\t\t// }\n\t\t} catch (JWTException $e) {\n\t\t\treturn response()->json(['error' => 'could_not_create_token']);\n\t\t}\n\n\t\t// if no errors are encountered we can return a JWT\n\t\t$vehicle_type = VehicleType::status()->get()->map(function ($type) {\n\t\t\treturn [\n\t\t\t\t'id' => $type->id,\n\t\t\t\t'name' => $type->name,\n\t\t\t];\n\t\t});\n\n\t\tif($request->order) {\n\t\t\t$request['token'] = $token;\n\t\t\t$data = $this->add_cart_item($request,0);\n\t\t\tif($data['status_code'] != 1) {\n\t\t\t\treturn response()->json([\n\t\t\t\t\t'status_code' => $data['status_code'],\n\t\t\t\t\t'status_message' => $data['status_message'],\n\t\t\t\t]);\n\t \t}\n\t\t}\n\n\t\t// get firebase token\n $firbase = resolve(\"App\\Services\\FirebaseService\");\n $firbase_token = $firbase->createCustomToken($user->email);\n $return_data['firbase_token'] = $firbase_token;\n \t\n\t\t$register = array(\n\t\t\t'status_code' \t => '1',\n\t\t\t'status_message' => trans('user_api_language.register.register_success'),\n\t\t\t'access_token' \t=> $token,\n\t\t\t'user_details' \t=> $user,\n\t\t\t'user_data' \t=> $user,\n\t\t\t'vehicle_type' \t=> $vehicle_type,\n\t\t\t'firbase_token' => $firbase_token,\n\t\t);\n\n\t\treturn response()->json($register);\n\t}", "title": "" } ]
[ { "docid": "b7edfb5e4a8f356d92938ff494e71001", "score": "0.6119413", "text": "private function restoreUser() {\n\t\t\t//will automatically be logged in. \n\t\t\tif ($loginID = $_SESSION['loginid']) {\n\t\t\t\t$this->user = new User();\n\t\t\t\tif (!$this->user->load($loginID, $this->mysqli)) {\n\t\t\t\t\t$this->user = null;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "d0e27fb7a49f73e51c0283df06da6caf", "score": "0.5936152", "text": "abstract protected function setUserFromDb();", "title": "" }, { "docid": "a05b001e7db9f63840ccedf1d9fac015", "score": "0.5934534", "text": "protected abstract function _updateUserDb();", "title": "" }, { "docid": "ebbc555c59a9c7efabb820ea0fe3477a", "score": "0.5923302", "text": "function save(){\n\t\t$this->log('Saving user...');\n\t\t\n\t\tif($this->isAdmin() === true){\n\t\t\t$this->setRight(\"ajxp.admin\", \"1\");\n\t\t}else{\n\t\t\t$this->setRight(\"ajxp.admin\", \"0\");\n\t\t}\n\t\tif($this->hasParent()){\n\t\t\t$this->setRight(\"ajxp.parent_user\", $this->parentUser);\n\t\t}\n\t\t// update roles\n\t\tdibi::query(\"DELETE FROM [ajxp_user_rights] WHERE [login]='\".$this->getId().\"' AND [repo_uuid]='ajxp.roles'\");\n\t\tif($this->rights[\"ajxp.roles\"] && is_array($this->rights[\"ajxp.roles\"]) && count($this->rights[\"ajxp.roles\"])){\n\t\t\tdibi::query(\"INSERT INTO [ajxp_user_rights]\", array(\n\t\t\t\t'login' => $this->getId(), \n\t\t\t\t'repo_uuid' => 'ajxp.roles', \n\t\t\t\t'rights'\t=> serialize($this->rights['ajxp.roles'])));\n\t\t}\n\t}", "title": "" }, { "docid": "07ad17f04d04df2ba32f570c072953d6", "score": "0.5652971", "text": "public function Save()\n {\n $db = new Database();\n $db->Connect();\n\n $db->Run(\"UPDATE \". UWA_Config::$USER_ROLES_TABLE .\" SET role_id = :r_id WHERE id = :id\",\n [\":r_id\" => $this->Role->Id, \":id\" => $this->Id]);\n }", "title": "" }, { "docid": "cbbb4ce0b0485c64113d260d21702c46", "score": "0.5624963", "text": "public function store()\n\t{\n\t\t// save user\n\t\treturn User::saveUser();\n\n\t}", "title": "" }, { "docid": "21eafdc134a6f77f603107b87bacb0d3", "score": "0.5549241", "text": "abstract protected function register($user);", "title": "" }, { "docid": "dc7b2bcfa00753395502186a94df85c8", "score": "0.55182177", "text": "protected function user() {\n\t\t}", "title": "" }, { "docid": "1de95bfcbf7454bf49cf5c02e91ceb23", "score": "0.5453565", "text": "public function registerUser() {\n $db = $this->registry->getObject(\"mysqldb\");\n //var_dump($this->sanitizedValues);\n $db->insertRecords(\"users\",$this->sanitizedValues);\n }", "title": "" }, { "docid": "70c26903940e9f0917736707db277a3c", "score": "0.54528517", "text": "function upgrade_user(){\n\t\t$uid = $this->input->post('id');\n\t\t$userTypeID = $this->input->post('userTypeID');\n\t\t//exicute function from user model\n\t\t$this->User_model->change_usertype($uid,$userTypeID);\n\t\t$this->mainf();\n\t}", "title": "" }, { "docid": "182b105959167d85763d8455b3334761", "score": "0.5441872", "text": "public function auth()\n {\n $this->persistent->name = \"Laura\";\n }", "title": "" }, { "docid": "8d6aa31f6fd2a61fbb636ccae4860632", "score": "0.5428633", "text": "function unify(){\r\n\r\n //checks if user is logged in\r\n $user = session('user');\r\n\r\n if ($user !== NULL){\r\n\r\n //get new user data\r\n $user = DB::table('users')->where('email', $user->email)->first();\r\n\r\n //save user data to session for use\r\n session(['user' => $user]);\r\n }\r\n }", "title": "" }, { "docid": "67e6fb9a2065266a49bad1527a1fbdf6", "score": "0.53616756", "text": "function initUser( $user, $autocreate=false ) {\r\n # Override this to do something.\r\n }", "title": "" }, { "docid": "eb164afe620efb8cf42b162cc8e2a38a", "score": "0.5324445", "text": "public function restore(User $user, Student $student)\n {\n //\n }", "title": "" }, { "docid": "6389b26af87f27303463a4a1082031a0", "score": "0.5322034", "text": "public function store(){\n Log::logit(\"user controller store\");\n }", "title": "" }, { "docid": "0a4777d7e59d48d00d097eba7479aba0", "score": "0.53158456", "text": "public function set_user()\r\n\t{\r\n\t\t$user = \\Auth::check() ? (\\Config::get('auth.driver', 'Simpleauth') == 'Ormauth' ? \\Model\\Auth_User::find_by_username(\\Auth::get_screen_name()) : \\Model_User::find_by_username(\\Auth::get_screen_name())) : null;\r\n\t\t\r\n\t\t$this->user_id = $user->id;\t\t\r\n\t}", "title": "" }, { "docid": "89fcba5d731a354bfaf844d407708a97", "score": "0.52896714", "text": "public function synchroUsers(){}", "title": "" }, { "docid": "ed2aa8ba6606376428f8ce97e8e277bd", "score": "0.5278712", "text": "public function user(){\n\n /* ADD CATEGORY */\n $UsersTable = TableRegistry::get('Users');\n $users = $UsersTable->newEntity();\n $users->username = 'admin';\n $users->password = 'admin';\n $UsersTable->save($users);\n\n $file = new File(TMP.'installed.txt', true, 0644);\n $file->create();\n $file->write('Don\\'t remove this file !');\n\n }", "title": "" }, { "docid": "d9654a6dff89819a065f1e349449e0d2", "score": "0.52775186", "text": "private function promote_user() {\n\t\t\n\t}", "title": "" }, { "docid": "8005c345309f133c2e22dab9d2661d46", "score": "0.5274773", "text": "public function restore(User $user, Aeronave $aeronave)\n {\n //\n }", "title": "" }, { "docid": "cbd28146de59f26995dc69163515922b", "score": "0.52656907", "text": "public function relogin()\n\t\t{\n\t\t\t$cookie = \\System\\User::COOKIE_USER;\n\n\t\t\tif ($this->user) {\n\t\t\t\treturn $this->user;\n\t\t\t}\n\n\t\t\tif ($this->sess($cookie)) {\n\t\t\t\t$this->user = \\System\\User::find($this->sess($cookie));\n\t\t\t}\n\n\t\t\tif (!($this->user)) {\n\t\t\t\t$this->user = \\System\\User::guest();\n\t\t\t}\n\n\t\t\t$this->user->get_rights();\n\t\t}", "title": "" }, { "docid": "376db8538a9c1d0fe22b87d5f6d93688", "score": "0.52645886", "text": "public function run()\n {\n $role_admin = [\n\t\t\t\"slug\" => \"admin\",\n\t\t\t\"name\" => \"Admin\",\n\t\t\t\"permissions\" => [\n\t\t\t\t\"admin\" => true\n\t\t\t]\n\t\t];\n\n\t\tSentinel::getRoleRepository()->createModel()->fill($role_admin)->save();\n\n\t\t$adminrole = Sentinel::findRoleByName('Admin');\n\n\t\t$user_admin = [\"first_name\"=>\"Admin\", \"last_name\"=>\"Real\", \"email\"=>\"[email protected]\", \"password\"=>\"realadmin\"];\n\n\t\t$adminuser = Sentinel::registerAndActivate($user_admin);\n\n\t\t$adminuser->roles()->attach($adminrole);\n\n\t\t$role_user = [\n\t\t\t\"slug\" => \"user\",\n\t\t\t\"name\" => \"User\",\n\t\t\t\"permissions\" => [\n\t\t\t\t\"user.index\" => true,\n\t\t\t\t\"user.create\" => true,\n\t\t\t\t\"user.store\" => true,\n\t\t\t\t\"user.show\" => true,\n\t\t\t\t\"user.edit\" => true,\n\t\t\t\t\"user.update\" => true,\n\t\t\t]\n\t\t];\n\n\t\tSentinel::getRoleRepository()->createModel()->fill($role_user)->save();\n\n\t\t$userrole = Sentinel::findRoleByName('User');\n\n\t\t$user_data = [\"first_name\"=>\"namasatu\", \"last_name\"=>\"tes\", \"email\"=>\"[email protected]\", \"password\"=>\"namasatu\"];\n\n\t\t$storeuser = Sentinel::registerAndActivate($user_data);\n\n\t\t$storeuser->roles()->attach($userrole);\n\n }", "title": "" }, { "docid": "d00d233872c06192012eecc4f0b4c203", "score": "0.52638024", "text": "public function registrarUsuario()\n {\n require_once 'entities/Usuario.php';\n\n $user = new Usuario();\n $user->setCorreoUsuario($_POST['correoRegistro']);\n $user->setContrasenaUsuario($_POST['contrasenaRegistro']);\n $user->setRol(2);//1-admin, 2-usuario, 3-invitado\n\n require_once \"database/DatabaseMysql.php\";\n require_once \"models/UsuarioModel.php\";\n $usuario = new UsuarioModel();\n $usuario->regiserUser($user);\n }", "title": "" }, { "docid": "fbfdad4e77332009b6d75f29a8030980", "score": "0.52559763", "text": "public function register()\r\n\t{\r\n\t\t// data map\r\n\t\t\r\n\t\t$datamap_users = new Users();\r\n\t\t$datamap_records = new SavedRecords();\r\n\t\t\r\n\t\t// if the user was previously active under a local username \r\n\t\t// then reassign any saved records to the new username\r\n\t\t\r\n\t\t$old_username = $this->request->getSessionData(\"username\");\r\n\t\t$old_role = $this->request->getSessionData(\"role\");\r\n\t\t\r\n\t\tif ( $old_role == \"local\" )\r\n\t\t{\r\n\t\t\t$datamap_records->reassignRecords( $old_username, $this->user->username );\r\n\t\t}\r\n\t\t\r\n\t\t// add or update user in the database\r\n\t\t// get any values in the db not specified here and populates user\r\n\t\t \r\n\t\t$this->user = $datamap_users->touchUser( $this->user );\r\n\t\t\r\n\t\t\r\n\t\t// @todo: should we just save user object in session?\r\n\t\t\r\n\t\t// set main properties in session\r\n\t\t\r\n\t\t$this->request->setSessionData(\"username\", $this->user->username);\r\n\t\t$this->request->setSessionData(\"role\", $this->role);\r\n\t\t\r\n\t\t// store user's additional properties in session, so they can be used by\r\n\t\t// controller, and included in xml for views. \r\n\t\t\r\n\t\t$this->request->setSessionData(\"user_properties\", $this->user->properties());\r\n\t\t\r\n\t\t// groups too empty array not null please. \r\n\t\r\n\t\t$this->request->setSessionData(\"user_groups\", $this->user->usergroups);\r\n\t\t\r\n\t\t// set this object's id in session\r\n\t\t\r\n\t\t$this->request->setSessionData(\"auth\", $this->id);\r\n\t\t\r\n\t\t// now forward them to the return url\r\n\t\t\r\n\t\t$this->setRedirect($this->return_url);\r\n\t\t\r\n\t\treturn self::SUCCESS;\r\n\t}", "title": "" }, { "docid": "629b627dbebdb05ec76b6ecd26be8f21", "score": "0.5247454", "text": "public function store($user) {\n\t\tUser::getInstance($user);\n\t}", "title": "" }, { "docid": "a9e744371d65da6b76036a8bb136efb5", "score": "0.5244073", "text": "public function restore(User $user, Servidor $servidor)\n {\n //\n }", "title": "" }, { "docid": "281f747b7d0d9809dfc66082ac5bb81e", "score": "0.523528", "text": "public static function frontendRegister()\n {\n Event::on(User::className(), User::USER_REGISTER_DONE, function($event) {\n /** @var \\yii\\base\\ModelEvent $event */\n $user = $event->sender;\n $auth = new DbManager();\n $auth->init();\n $role = $auth->getRole('Customer');\n if(!$role){\n $role = $auth->createRole('Customer');\n $auth->add($role);\n }\n\n $auth->assign($role, $user->id);\n });\n }", "title": "" }, { "docid": "eb97d3e2bec461eda831e7c13d7df52d", "score": "0.5230881", "text": "public function save(){\n $params = [\n 'username' => $this->username(),\n 'passwd' => $this->passwd(),\n 'email' => $this->email(),\n ];\n\n if ($this->id()) {\n return Database::updateUser($params, $this->id());\n } else {\n return Database::insertUser($params);\n }\n }", "title": "" }, { "docid": "b75fb8342e244ba437837c692cab72ad", "score": "0.5230043", "text": "protected function saveData()\n {\n parent::saveData();\n\n $this->user->setPasswordResetRequired(false);\n $this->loginStatusTracker->setPasswordResetActive(false);\n }", "title": "" }, { "docid": "0e2e6da1f14634f3e03e98cbfdeaf345", "score": "0.52298415", "text": "public function run()\n {\n $role_webadmin = Role::where('name', 'webadmin')->first();\n\t $role_superadmin = Role::where('name', 'superadmin')->first();\n\t $webadmin = new User();\n\t $webadmin->name = 'Melchizedek Pedron';\n\t $webadmin->email = '[email protected]';\n\t $webadmin->contact = '09051332613';\n\t $webadmin->password = bcrypt('secret1');\n\t $webadmin->save();\n\t $webadmin->roles()->attach($role_webadmin);\n\t $superadmin = new User();\n\t $superadmin->name = 'JP Bantigue';\n\t $superadmin->email = '[email protected]';\n\t $superadmin->contact = '';\n\t $superadmin->password = bcrypt('secret2');\n\t $superadmin->save();\n\t $superadmin->roles()->attach($role_superadmin);\n }", "title": "" }, { "docid": "9b80926e3ab6982c4d2c362e4e6b634f", "score": "0.5223922", "text": "public function save(){\n\t return isset($this->user_id) ? $this->update() : $this->create();\n}", "title": "" }, { "docid": "ec68f3842f961de4238f936cd4de22a0", "score": "0.52208686", "text": "public function run()\n {\n $admin=new Role();\n $admin->name='administrator';\n $admin->save();\n\n $product_author=new Role();\n $product_author->name='product_author';\n $product_author->save();\n\n\n }", "title": "" }, { "docid": "9bb56c8a489aa2910690aef765033c7c", "score": "0.5216548", "text": "public function saveUser($user);", "title": "" }, { "docid": "a1e9e4184ec5db3399f956e3749f9436", "score": "0.5196781", "text": "public function run()\n {\n $credentials = [\n 'nisn' => '1111111111',\n 'name' => 'admin',\n 'gender' => '-',\n 'born' => '0000/00/00',\n 'address' => '-',\n 'type_id' => '1',\n 'status' => 0,\n 'password' => '1111111111',\n ];\n $user = Sentinel::registerAndActivate($credentials);\n $use = Users::where('nisn', '=', '1111111111')->get();\n $role = Sentinel::findRoleByName('admin');\n $role->users()->attach($use);\n }", "title": "" }, { "docid": "5203a26f0032d9b03681cfbd5c2a628a", "score": "0.51883036", "text": "public function run()\n {\n\t $administrator_role = Role::where('slug','administrator')->first();\n\t $owner_role = Role::where('slug', 'owner')->first();\n\t $administrator_perm = Permission::whereIn('slug',['create-user','create-role'])->get();\n\t $owner_perm = Permission::where('slug','create-user')->first();\n\n\t $developer = new User();\n\t $developer->name = 'Admini Strator';\n\t $developer->email = '[email protected]';\n\t $developer->password = bcrypt('secret');\n\t $developer->save();\n\t $developer->roles()->attach($administrator_role);\n\t $developer->permissions()->attach($administrator_perm);\n\n\n\t $manager = new User();\n\t $manager->name = 'Owner User';\n\t $manager->email = '[email protected]';\n\t $manager->password = bcrypt('secret');\n\t $manager->save();\n\t $manager->roles()->attach($owner_role);\n\t $manager->permissions()->attach($owner_perm);\n }", "title": "" }, { "docid": "b78ae942882306de7adcf1ebd5e9a855", "score": "0.51837873", "text": "public function run()\n {\n $user = new User();\n $user->name = 'sk shakil';\n $user->email = '[email protected]';\n $user->password = '$2y$10$6la78fVMmRm5TN4n5OopouEKSVFyRKyf4gRWA2VLDqEiOBUgb5u4q'; //skshakil\n $user->user_type = 'SuperAdmin';\n $user->save();\n \n $user = new User();\n $user->name = 'frey';\n $user->email = '[email protected]';\n $user->password = '$2y$10$6la78fVMmRm5TN4n5OopouEKSVFyRKyf4gRWA2VLDqEiOBUgb5u4q'; //skshakil\n $user->user_type = 'Admin';\n $user->save();\n }", "title": "" }, { "docid": "149db4e7867b1e386b37edc55ed8922b", "score": "0.5166797", "text": "function modeloUserUpdate ($user){ \n $db = AccesoDatos::getModelo();\n $db->modUsuario($user); \n \n}", "title": "" }, { "docid": "f4fcecb68af9cb8f33ae962e154d45b7", "score": "0.5154355", "text": "public function save() {\n $function_name = \"save\";\n\n // if this user does not exist in the database\n if ($this->_id == -1 || self::get_user_by_id($this->_id) == null)\n {\n try {\n $hdb = Functions::db_connect();\n $query = \"INSERT INTO \" . self::$table . \" (email, password, first_name, last_name, photo) VALUES ($1, $2, $3, $4, $5)\";\n $statement = pg_prepare($hdb, $function_name, $query);\n $statement = pg_execute($hdb, $function_name, $this->to_sql_array());\n pg_query(\"deallocate \" . $function_name);\n\n } catch(Exception $e) {\n die(\"Internal Erreur\");\n }\n }\n\n // if the user already exist we update it\n else {\n try {\n $hdb = Functions::db_connect();\n $query = \"UPDATE \" . self::$table . \" SET (email, password, first_name, last_name, photo) = ($1, $2, $3, $4, $5)\" . \" WHERE _id = \" . $this->_id;\n $statement = pg_prepare($hdb, $function_name, $query);\n $statement = pg_execute($hdb, $function_name, $this->to_sql_array());\n pg_query(\"deallocate \" . $function_name);\n\n } catch(Exception $e) {\n die(\"Internal Erreur\");\n }\n }\n }", "title": "" }, { "docid": "77f94ee2b6f63ab097c998f5ff09c840", "score": "0.5154191", "text": "protected function user() {\n\t\tthrow new Exception( 'User resolver has not been set.' );\n\t}", "title": "" }, { "docid": "2ec8f9376a112a91c371ccec07d4e3f7", "score": "0.5144622", "text": "private function _loadUser() {\n\n // pega o header\n $uid = $this->header( 'AUTH_UID' );\n $email = $this->header( 'AUTH_EMAIL' );\n\n // carrega o finder\n $this->ci->load->finder( 'FuncionariosFinder' );\n\n // carrega o usuario\n $this->userData = $this->ci->FuncionariosFinder->clean()->uid( $uid )->get( true );\n\n // verifica se carregou o usuario\n if ( $this->userData ) {\n\n // seta o email\n $this->userData->email = $email;\n $this->userData->save();\n }\n }", "title": "" }, { "docid": "dd6f46b4c91b291b2f6b26c67dbc7185", "score": "0.51444143", "text": "protected function afterSave(){\n\t\tif ($this->isNewRecord){\n\t\t\t$auth = Yii::app()->authManager;\t\t\t\n\t\t\t$auth->assign($this->u_role,$this->u_id);\t\t\t\t\t\t\n\t\t}\t\t\n\t\tparent::afterSave();\n\t}", "title": "" }, { "docid": "eb3bc901394fa00427a23494936ca7c0", "score": "0.5142808", "text": "public function restore(User $user)\n {\n //\n }", "title": "" }, { "docid": "eb3bc901394fa00427a23494936ca7c0", "score": "0.5142808", "text": "public function restore(User $user)\n {\n //\n }", "title": "" }, { "docid": "43ba5dae263dc7b72162f56c58f908d3", "score": "0.51416355", "text": "static public function reset() {\n require_once('../app/models/user.php');\n require_once('../app/models/page.php');\n\n self::drop_model_tables();\n self::create_model_tables();\n AppUser::create_on_install();\n AppPage::create_on_install();\n }", "title": "" }, { "docid": "59c9d849de07ee595162ff11d43e2503", "score": "0.5138956", "text": "function write_user($record = array()) {\n $primary_key = $this->primary_key();\n $isinsert = (ArrayCheck::arr_get($record, $primary_key, -1) < 1);\n if ($isinsert) {\n $record['created'] = time();\n if (isset($record['password'])) {\n // hash the password on the way out... if it's set.\n $record['password'] = User::hash_password($record['password']);\n }\n unset($record['id']);\n } else {\n // SORRY, YOU CAN'T CHANGE YOUR PASSWORD. WOOPS.\n unset($record['password']);\n }\n // add modified time, created time if we're doing an insert.\n $record['modified'] = time();\n $this->convert_unix_to_datetime_for_key($record, 'modified');\n $this->convert_unix_to_datetime_for_key($record, 'created');\n // add user type\n ArrayCheck::set_if_not_set($record, 'role', 'user');\n return parent::write_record($record);\n }", "title": "" }, { "docid": "670837f6e2f53df9586dcad788ef9361", "score": "0.5138539", "text": "public function run()\n\t{\n\t\tEloquent::unguard();\n\n\t\t\\Swapshop\\User::create([\n\t\t\t'username' => 'admin',\n\t\t\t'password' => 'admin',\n\t\t\t'firstname' => 'admin',\n\t\t\t'surname' => 'admin',\n\t\t\t'role' => 'admin',\n\t\t]);\n\n\t\t\\Swapshop\\User::create([\n\t\t\t'username' => 'dragoon',\n\t\t\t'password' => 'dragoon',\n\t\t\t'firstname' => 'dragoon',\n\t\t\t'surname' => 'dragoon',\n\t\t\t'role' => 'dragoon',\n\t\t]);\n\t}", "title": "" }, { "docid": "b6d3cdbb035d1e62a89df4d1b175f5d4", "score": "0.5138476", "text": "public function _applyMetadata() {\n $dbConfig = ConnectionManager::getDataSource('default')->config;\n $userMetadata = Configure::read('General.metadata');\n\n if (!empty($userMetadata) && $dbConfig['database'] !== $userMetadata) {\n $dbConfig['database'] = $userMetadata;\n ConnectionManager::drop('default');\n ConnectionManager::create('default', $dbConfig);\n }\n }", "title": "" }, { "docid": "49df0f27343cd1f5dad09fbc786d2f72", "score": "0.5131847", "text": "public function run()\r\n {\r\n\r\n \t$user = User::create([\r\n\r\n 'name' => \"admin\",\r\n 'ci' => \"123456\",\r\n 'email' => \"[email protected]\",\r\n 'password' => bcrypt(\"admin\"),\r\n ]);\r\n \r\n $userType= UserType::where(\"description\",\"Administrador\")->first()->id;\r\n $user->type_user()->associate($userType);\r\n $user->save();\r\n\r\n\r\n }", "title": "" }, { "docid": "33b99bbc14f8601b5ce1a3bc3c28190e", "score": "0.51315284", "text": "public function migrate()\n {\n $this->storage->regenerate();\n }", "title": "" }, { "docid": "024e9a01a7607620d0f6a189c6409ebc", "score": "0.51291686", "text": "function user_identification () {\n user_auth();\n user_login_check();\n user_update_database();\n user_check_url_rewrite();\n}", "title": "" }, { "docid": "932caa520f9bdee596a5a39be90e7c21", "score": "0.51187646", "text": "public function register(){}", "title": "" }, { "docid": "6cc56c1f3b135dda271d40c691f75ee3", "score": "0.511747", "text": "public function run()\n { $role_user=Rol::where('nombre','Usuario')->first();\n $role_admin=Rol::where('nombre','Administrador')->first();\n $user=new User();\n $user->name= \"root\";\n $user->email=\"[email protected]\";\n $user->email_verified_at=\"2000-01-01 00:00:00\";\n $user->password= bcrypt(\"123456\");\n // $user->remember_token=\"null\";\n $user->created_at=\"2000-01-01 00:00:00\";\n $user->updated_at=\"2000-01-01 00:00:00\";\n $user->save();\n $user->roles()->attach($role_user);\n $user->roles()->attach($role_admin);\n \n }", "title": "" }, { "docid": "cf1b00838259fd52dd2b0fdb8271f5f9", "score": "0.5112403", "text": "public function run()\n {\n $admin = new User([\n 'first_name' => 'Admin',\n 'last_name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin123'),\n 'type' => User::TYPE_SUPERADMIN\n ]);\n\n $admin->save();\n $admin->assignRole(Role::whereName('SuperAdmin')->first());\n\n $staff = new User([\n 'first_name' => 'Staff',\n 'last_name' => 'Staff',\n 'email' => '[email protected]',\n 'password' => bcrypt('staff123'),\n 'type' => User::TYPE_ADMIN\n ]);\n\n $staff->save();\n $staff->assignRole(Role::whereName('Admin')->first());\n\n $candidate = new User([\n 'first_name' => 'Candidate',\n 'last_name' => 'Candidate',\n 'email' => '[email protected]',\n 'password' => bcrypt('candidate123'),\n 'type' => User::TYPE_CANDIDATE\n ]);\n\n $candidate->save();\n $candidate->assignRole(Role::whereName('Candidate')->first());\n\n $client = new User([\n 'first_name' => 'Client',\n 'last_name' => 'Client',\n 'email' => '[email protected]',\n 'password' => bcrypt('client123'),\n 'type' => User::TYPE_CLIENT\n ]);\n\n $client->save();\n $client->assignRole(Role::whereName('Client')->first());\n }", "title": "" }, { "docid": "0b5ec848187831fd40c985e32e9d88a8", "score": "0.51120657", "text": "public function register()\n {\n Relation::morphMap([\n \\Zareismail\\NovaContracts\\Models\\User::class => Models\\User::class, \n ]);\n\n \\Event::listen(\\NovaButton\\Events\\ButtonClick::class, function($event) {\n if($event->key === 'request-identity-verification') {\n $event->resource->notify(new Notifications\\IdentityVerification($event->resource));\n \n\n \\Storage::disk('public')->delete(data_get($event->resource, 'profile.passport'));\n \\Storage::disk('public')->delete(data_get($event->resource, 'profile.payslip'));\n\n $event->resource->forceFill([\n 'profile->passport' => null,\n 'profile->payslip' => null,\n ])->save();\n } \n });\n }", "title": "" }, { "docid": "342bba8145dab7e6015dc5089d6899fb", "score": "0.5103786", "text": "public function restore(User $user, Exam $exam)\n {\n //\n }", "title": "" }, { "docid": "50826d203291a2138c03eb57167dda5e", "score": "0.51034224", "text": "public function store() {\n\t\t//\n\t}", "title": "" }, { "docid": "7d74b09d30e00dfb15bdd86c407ab6f4", "score": "0.5102401", "text": "public function restore(User $user, Book $book)\n {\n //\n }", "title": "" }, { "docid": "2910b41f64e3fdaff7f1ce29608bcb87", "score": "0.5102119", "text": "public function run()\n {\n \t$roleAdmin = \\App\\Role::where('name','admin')->first();\n \t$roleModerator = \\App\\Role::where('name','moderator')->first();\n \t$roleUser = \\App\\Role::where('name','user')->first();\n\n $admin = new \\App\\User();\n $admin->name = 'admin';\n $admin->email = '[email protected]';\n $admin->password = bcrypt('admin11');\n\n $loc = \\App\\Location::whereNull('parent_id')->where('main','1')->first();\n\n $admin->location()->associate($loc);\n\n $admin->save();\n $admin->roles()->attach($roleAdmin);\n\n $user = new \\App\\User();\n $user->name = 'user';\n $user->email = '[email protected]';\n $user->password = bcrypt('user11');\n\n $user->location_id = $loc->id;\n\n $user->referrer_id = $admin->id;\n\n $user->save();\n $user->roles()->attach($roleUser);\n\n $moderator = new \\App\\User();\n $moderator->name = 'moderator';\n $moderator->email = '[email protected]';\n $moderator->password = bcrypt('moderator11');\n\n $moderator->location_id = $loc->id;\n\n $moderator->referrer()->associate($admin);\n\n $moderator->save();\n $moderator->roles()->attach($roleModerator);\n }", "title": "" }, { "docid": "32c2e9dbb645019b8c9e08ba9a55a5c4", "score": "0.51012284", "text": "public function run()\n {\n $user = new Admin();\n $user->first_name = \"Carl Anthony\";\n $user->last_name = \"Magumpara\";\n $user->email = \"[email protected]\";\n $user->password = crypt(\"09071995\",\"\");\n $user->save();\n\n $user = new Admin();\n $user->first_name = \"Marlon\";\n $user->last_name = \"Valderama\";\n $user->email = \"[email protected]\";\n $user->password = crypt(\"1234567890\",\"\");\n $user->save();\n\n }", "title": "" }, { "docid": "0b6095ef8f08b5d298f9aa01428b6c62", "score": "0.5101044", "text": "public function restore(User $user, TypeRisk $typeRisk)\n {\n //\n }", "title": "" }, { "docid": "2f239e8a4a56bcba7e8093930059f437", "score": "0.5098739", "text": "public function restore(User $user, Store $store)\n {\n //\n }", "title": "" }, { "docid": "1eccc5e1aafd2aaa2d5407fdb141f476", "score": "0.5096258", "text": "public function run()\n {\n\n $userRole = new Role([\n 'name' => 'user'\n ]);\n\n $userRole->save();\n\n\n $admin = new User([\n 'name' => 'Administrator',\n 'email' => '[email protected]',\n 'password' => Hash::make(env('ADMIN_PASSWORD')),\n ]);\n\n $admin->save();\n\n $adminRole = new Role([\n 'name' => 'administrator'\n ]);\n $adminRole->save();\n\n $admin->assignRole($adminRole);\n\n $user = new User([\n 'name' => 'User',\n 'email' => '[email protected]',\n 'password' => Hash::make(env('USER_PASSWORD')),\n ]);\n\n $user->save();\n\n }", "title": "" }, { "docid": "a7c74614b2abd71a766136a508868c8d", "score": "0.50951755", "text": "public static function reloadCurrentUser(): void\n {\n $user = self::$currentUser;\n if ($user) {\n $reloadedUser = _em()->getRepository(self::class)->getOneById($user->getId());\n self::$currentUser = $reloadedUser;\n }\n }", "title": "" }, { "docid": "2c774da2f6bd030afe42db6d8f880dc3", "score": "0.5092249", "text": "public function save()\n {\n $this->setVerificationLinkData();\n $this->setUserData();\n $this->updateUser();\n $this->deleteVerificationLinkData();\n }", "title": "" }, { "docid": "fd0e9572c472ee54ce80223f6d7ff14c", "score": "0.50898886", "text": "private function add_existing_user() {\n\t\t\n\t}", "title": "" }, { "docid": "88387f25329f0ed0ad12981573336367", "score": "0.5085896", "text": "public function store();", "title": "" }, { "docid": "88387f25329f0ed0ad12981573336367", "score": "0.5085896", "text": "public function store();", "title": "" }, { "docid": "69fec99e798ff455db33acc309214cbf", "score": "0.5085456", "text": "public function setUser() {\n\t\t}", "title": "" }, { "docid": "d051325e0667e78d7f235ae2175afd1d", "score": "0.5080952", "text": "public function restoreFromDatabase()\n {\n if ($this->getUser()) {\n $preferences = $this->userPreferenceRepository->getByUser($this->getUser());\n if ($preferences->getLocale()) {\n $this->changeLocale($preferences->getLocale());\n } else {\n $this->userPreferenceRepository->changeLocale($this->getUser(), $this->requestStack->getMasterRequest()->getLocale());\n }\n }\n }", "title": "" }, { "docid": "87399dd215f9222f0710bf10a64d7d21", "score": "0.5080881", "text": "public function run()\n {\n\n\t\tRole::truncate();\n\t \tDB::table('role_user')->truncate();\n\n $role_user = new Role();\n\t\t$role_user->name = 'User';\n\t\t$role_user->desc = 'En vanlig användare';\n\t\t$role_user->save();\n\n\t\t$role_admin = new Role();\n\t\t$role_admin->name = 'Admin';\n\t\t$role_admin->desc = 'En administratör';\n\t\t$role_admin->save();\n\t}", "title": "" }, { "docid": "59fc4a08b072b047c292e49621be2b59", "score": "0.50790864", "text": "public function restore(Admin $user, Salary $salary)\n {\n //\n }", "title": "" }, { "docid": "1a401a9ff2e9185a0a2cc2ade89bc173", "score": "0.50781184", "text": "public function run()\n {\n factory(App\\User::class)->create()->attachRole(Role::where('name','user')->first());\n }", "title": "" }, { "docid": "ec5250010894b06a4b245c943dcee523", "score": "0.50777805", "text": "public function register() {\n\t\t\t$whatever = array(\"phone_number\" => $_POST['phone'],\n\t\t\t\"password\" => $_POST['password'],\n\t\t\t\"user_name\" => $_POST['username']);\n\t\t\t// $result = $this->UserInfo->query($queryStr);\n\t\t\t$result = $this->UserInfo->save($whatever);\n\t\t\t$newID = $this->UserInfo->getLastInsertId();\n\t\t\t$queryStr = 'SELECT * from onlineshop.user_infos as User where User.id = ' .$newID . ';';\n\t\t\t$userModel = $this->UserInfo->query($queryStr);// array(\"userId\" => $newID,\"user_name\" => $_POST['username'], \"phone\" => $_POST['phone']);\n\t\t\t$returnArr = array(\"User\" => $userModel);\n\t\t\t$this->returnJson(0, \"success\", $userModel[0]);\n\t\t\tdie;\n\t\t}", "title": "" }, { "docid": "d3dc1d513eac6e6e9e4930c7776ea2ac", "score": "0.50740683", "text": "public static function Restaurer()\n\t{\n\t\tif(self::ouverte())\n\t\t{\n\t\t\t$data=$_SESSION[\"SESSDATA\"];\n\t\t\tself::$Client=$data[\"client\"];\n\t\t\tself::$Admin=$data[\"admin\"];\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "7f754d15357bebe202053bdb63920a85", "score": "0.5073745", "text": "function save_user_id() {\n\t\tif(!isset($this->user_id) or empty($this->user_id)) {\n\t\t\t$this->user_id = @$_SESSION[\"user\"][\"user_id\"];\n\t\t}\n\t}", "title": "" }, { "docid": "0ab3f8589e5df10ede56b51c8bf89c9d", "score": "0.50729877", "text": "private function Seeder()\n {\n $this->adminObj = factory(App\\User::class, 'admin')->create();\n factory(App\\User::class, 10)->create();\n }", "title": "" }, { "docid": "43edb78ac6ac5f26a82cd67d49c27c1b", "score": "0.50707453", "text": "public function saveUser($input) {\nreturn $this->user->create($input);\n }", "title": "" }, { "docid": "e5506dfd7de89e1564398bfd65da9aad", "score": "0.506907", "text": "public function run()\n {\n $adminRole = Role::where('name', 'admin')->first();\n $affRole = Role::where('name', 'affiliator')->first();\n\n $adminUser = new User();\n $adminUser->name = 'Super Admin';\n $adminUser->email = '[email protected]';\n $adminUser->password = bcrypt('password123456');\n $adminUser->save();\n $adminUser->roles()->attach($adminRole);\n\n $aff = new User();\n $aff->name = 'Super Affiliator';\n $aff->email = '[email protected]';\n $aff->password = bcrypt('password123456');\n $aff->save();\n $aff->roles()->attach($affRole);\n }", "title": "" }, { "docid": "1d242fb03e342981f849ab2ddb004fb5", "score": "0.5068676", "text": "public function run()\n {\n $admin= new \\App\\User();\n\t\t$admin->fill([\n\t\t\t'first_name'=>'admin',\n\t\t\t'last_name'=>'admin',\n\t\t\t'phone'=>'1234567890',\n\t\t\t'country_id'=>\\App\\Models\\Geo\\Country::where('iso_code','CAN')->first()->id,\n\t\t\t'settings'=>'{}',\n\t\t\t'email'=>'[email protected]',\n\t\t\t'password'=>'1234'\n\t\t]);\n\t\t$admin->save();\n\t\t$admin->rols()->save(\\App\\Models\\Role::where('name','superadmin')->first()); //2 is the id for admin\n\n }", "title": "" }, { "docid": "2732a5f895609e9c5e686bbe02d60a0c", "score": "0.50676316", "text": "public function run()\n {\n $user = new User;\n $user -> name = 'Brandon Hum';\n $user -> email = '[email protected]';\n $user -> password = '$2y$10$fnv3KDZWkJv3odlydNCALuRRmnTlxtUXjiywGkAdVuIoK1Kaf5C0y';\n $user -> save();\n\n $admin = new Right;\n $admin -> name = 'admin';\n $right -> save();\n\n $basic = new Right;\n $basic -> name = 'basic';\n $right -> save();\n\n $user -> attach($right);\n }", "title": "" }, { "docid": "b840388bc8ac8286ed50d9ee0aecca96", "score": "0.5061308", "text": "public function run()\n {\n $role_admin = [\n \t'slug' => \"admin\",\n \t'name' => \"Administrator\",\n \t'permissions' => [\n \t\t\"admin\" => true\n \t]\n ];\n\n Sentinel::getRoleRepository()->createModel()->fill($role_admin)->save();\n\n $adminrole = Sentinel::findRoleByName(\"Administrator\");\n\n $role_writer = [\n \t'slug' => \"user\",\n \t'name' => \"User\",\n \t'permissions' => []\n ];\n\n Sentinel::getRoleRepository()->createModel()->fill($role_writer)->save();\n $writerrole = Sentinel::findRoleByName('User');\n }", "title": "" }, { "docid": "dce9e0654b3db4085406f8c3c83c4189", "score": "0.5059878", "text": "public function save($data, $where = ''){\n if(!empty($data['password'])){\n $hash = new Jien_Auth_Hash(8, false);\n $data['password'] = $hash->hashPassword($data['password']);\n }\n\n \t\t// if username is empty, use email as the username\n if(empty($data['email']) && !empty($data['username'])){\n $data['email'] = $data['username'];\n }\n\n $id = parent::save($data, $where);\n\n // 2 factor auth\n if(!empty($data['authenticator'])){\n $authenticator_check = Jien::model('Authenticator')->Where('authenticator_user_id = ' . $id)->get()->row();\n if(empty($authenticator_check)){\n $auth_data = array(\n \"authenticator_user_id\" => $id,\n \"authenticator_secret\" => $data['auth_secret'],\n \"authenticator_sms\" => $data['auth_sms']\n );\n\n }else{\n $auth_data = array(\n \"authenticator_user_id\" => $id,\n \"authenticator_sms\" => $data['auth_sms']\n );\n }\n \n try {\n Jien::model('Authenticator')->save($auth_data);\n }catch(Exception $e){\n error_log(var_export($auth_data,true)); \n error_log($e->getMessage()); \n }\n }else{\n $authenticator_check = Jien::model('Authenticator')->Where('authenticator_user_id = ' . $id)->get()->row();\n if(!empty($authenticator_check)){\n Jien::model('Authenticator')->delete($authenticator_check['authenticator_id']);\n }\n }\n return $id;\n}", "title": "" }, { "docid": "cc784214efa6cbac4b78a0eb24318e92", "score": "0.50557023", "text": "public function save()\r\n { \r\n if($this->userId){ \r\n $where = $this->getAdapter()->quoteInto('id = ?', $this->userId);\r\n $this->update($this->userData, $where);\r\n }\r\n else {\r\n /*\r\n * Adding password as 'password' so that debugging will be easy\r\n * Has to be changed when mailing module is done\r\n */ \r\n $this->userData['conf_chair'] = 0;\r\n $this->userId = $this->insert($this->userData);\r\n }\r\n \r\n }", "title": "" }, { "docid": "e5bbb615ce66fb1af7418159c7d4c79b", "score": "0.5055226", "text": "public function run()\n {\n\n Role::truncate();\n User::truncate();\n\n $adminRole = Role::create(['name' => 'Admin']);\n $comiteRole = Role::create(['name' => 'comite']);\n\n $admin =new User ;\n\n $admin -> name = 'julio';\n $admin -> email= '[email protected]';\n $admin -> password = Hash::make('123123');\n $admin -> save();\n\n\n $admin->assignRole($adminRole);\n \n $comite =new User ;\n\n $comite -> name = 'cesar';\n $comite -> email= '[email protected]';\n $comite -> password = Hash::make('123123');\n $comite -> save();\n\n\n $comite->assignRole($comiteRole);\n }", "title": "" }, { "docid": "a343c2c7a682bbc51366344a009f30ee", "score": "0.50530493", "text": "function register()\n\t{\n\t\t//let php handle the session storage\n\t}", "title": "" }, { "docid": "b34a1cb1a46c71f682006e9f0d321f79", "score": "0.5050546", "text": "private function registration() {\n $stmt = DB::run(\"INSERT INTO users VALUES(NULL,?,?,?,?,?,NULL)\", [\n $this->userData['first_name'],\n $this->userData['last_name'],\n $this->userData['email'],\n $this->userData['photo_100'],\n $this->userData['user_id']]);\n $this->id = DB::lastInsertId();\n }", "title": "" }, { "docid": "e9970f65ec7cabbdd73f71a52b28d06f", "score": "0.5047354", "text": "public function run()\n {\n $role_user=Role::where('name', 'Клиент')->first();\n $role_master=Role::where('name', 'Мастер')->first();\n $role_admin=Role::where('name', 'Администратор')->first();\n\n $user=new User();\n $user->surname='Петрова';\n $user->name='Мария';\n $user->email='[email protected]';\n $user->phone='8988888888';\n $user->password=bcrypt('user');\n $user->save();\n $user->roles()->attach($role_user);\n\n $admin=new User();\n $admin->surname='Лукина';\n $admin->name='Лиза';\n $admin->email='[email protected]';\n $admin->phone='8988988888';\n $admin->password=bcrypt('admin');\n $admin->save();\n $admin->roles()->attach($role_admin);\n\n $master=new User();\n $master->surname='Тимофеева';\n $master->name='Настя';\n $master->email='[email protected]';\n $master->phone='898888888878';\n $master->password=bcrypt('master');\n $master->save();\n $master->roles()->attach($role_master);\n }", "title": "" }, { "docid": "490d80af4bc05e4a555ef80b44f76b4c", "score": "0.50455517", "text": "public function register() {\n $this->editUser();\n $this->showError();\n }", "title": "" }, { "docid": "d2d3d3910f038cdcaea7e143264fb915", "score": "0.5039283", "text": "public function put_user($data)\n {\n // insert user to the database\n }", "title": "" }, { "docid": "6f932b2af19baae641178d12e5f2534e", "score": "0.5036427", "text": "public static function onSave($param)\n {\n try\n {\n $ini = AdiantiApplicationConfig::get();\n if ($ini['permission']['user_register'] !== '1')\n {\n throw new Exception( _t('The user registration is disabled') );\n }\n \n // open a transaction with database 'permission'\n TTransaction::open('permission');\n \n if( empty($param['login']) )\n {\n throw new Exception(TAdiantiCoreTranslator::translate('The field ^1 is required', _t('Login')));\n }\n \n if( empty($param['name']) )\n {\n throw new Exception(TAdiantiCoreTranslator::translate('The field ^1 is required', _t('Name')));\n }\n \n if( empty($param['email']) )\n {\n throw new Exception(TAdiantiCoreTranslator::translate('The field ^1 is required', _t('Email')));\n }\n \n if( empty($param['password']) )\n {\n throw new Exception(TAdiantiCoreTranslator::translate('The field ^1 is required', _t('Password')));\n }\n \n if( empty($param['repassword']) )\n {\n throw new Exception(TAdiantiCoreTranslator::translate('The field ^1 is required', _t('Password confirmation')));\n }\n \n if (SystemUser::newFromLogin($param['login']) instanceof SystemUser)\n {\n throw new Exception(_t('An user with this login is already registered'));\n }\n \n if (SystemUser::newFromEmail($param['email']) instanceof SystemUser)\n {\n throw new Exception(_t('An user with this e-mail is already registered'));\n }\n \n if( $param['password'] !== $param['repassword'] )\n {\n throw new Exception(_t('The passwords do not match'));\n }\n \n $object = new SystemUser;\n $object->active = 'Y';\n $object->fromArray( $param );\n $object->password = md5($object->password);\n $object->frontpage_id = $ini['permission']['default_screen'];\n $object->clearParts();\n $object->store();\n \n $default_groups = explode(',', $ini['permission']['default_groups']);\n \n if( count($default_groups) > 0 )\n {\n foreach( $default_groups as $group_id )\n {\n $object->addSystemUserGroup( new SystemGroup($group_id) );\n }\n }\n \n TTransaction::close(); // close the transaction\n $pos_action = new TAction(['LoginForm', 'onLoad']);\n new TMessage('info', _t('Account created'), $pos_action); // shows the success message\n }\n catch (Exception $e)\n {\n new TMessage('error', $e->getMessage());\n TTransaction::rollback();\n }\n }", "title": "" }, { "docid": "013cd181f006e93063249e82ab1644d5", "score": "0.503529", "text": "public function store(User $user)\n {\n }", "title": "" }, { "docid": "6622a424c2cfba938657d316f9c5f6af", "score": "0.50352174", "text": "public function run()\n {\n if (!UserRepository::findById(1)) {\n UserRepository::insert('Administrator', '[email protected]', 'changethis', true);\n }\n }", "title": "" }, { "docid": "cd358c59993ddc105774f3756128745b", "score": "0.5031967", "text": "public function run()\n {\n // $role_user = Role::where('name', 'User')->first();\n $role_admin = Role::where('name', 'Admin')->first();\n\n $admin = new User();\n $admin->first_name = 'Among';\n $admin->last_name = 'Sonny';\n $admin->email = '[email protected]';\n $admin->password = bcrypt('admin');\n $admin->save();\n $admin->roles()->sync( [ 1 ]);\n\n $user = new User();\n $user->first_name = 'Manuel';\n $user->last_name = 'Manansala';\n $user->email = '[email protected]';\n $user->password = bcrypt('manuel');\n $user->save();\n $user->roles()->sync( [ 1 ]);\t\n }", "title": "" }, { "docid": "a2a84db6709b0b36491c0801e9f66e89", "score": "0.5029598", "text": "public function registerbest () {\r\n\t\t$db = new Db_connection();\r\n\t\t$query = \"update benutzer set email_bestaetigt=1 where benutzername='\".$this->benutzername.\"';\";\r\n\t\t$result = $db->execute($query);\r\n\t}", "title": "" }, { "docid": "780efd9f48a199e451b198a120114fb3", "score": "0.50291485", "text": "public function run() {\n $ro = new \\App\\Models\\Rol;\n $ro->description = 'Administrador';\n $ro->save();\n $ro = new \\App\\Models\\Rol;\n $ro->description = 'Usuario';\n $ro->save();\n $ro = new \\App\\Models\\Rol;\n $ro->description = 'Invitado';\n $ro->save();\n }", "title": "" }, { "docid": "7e2fcf72ec9bcb3b9589b2a8e620c536", "score": "0.5025391", "text": "private function _setup_user()\n {\n $this->_ID = $this->CI->session->{$this->prefix . '_ID'};\n $this->_username = $this->CI->session->{$this->prefix . '_username'};\n $this->_firstName = $this->CI->session->{$this->prefix . '_firstName'};\n $this->_lastName = $this->CI->session->{$this->prefix . '_lastName'};\n $this->_email = $this->CI->session->{$this->prefix . '_email'};\n }", "title": "" }, { "docid": "d85b24953e25520f282671832d57b05d", "score": "0.5025331", "text": "public function store(){\n\t\t//\n\t}", "title": "" }, { "docid": "5bec2f0fa714022adab8c149270447e0", "score": "0.50234616", "text": "public function __before() {\r\n\t\t$this->authenticateUser();\r\n\r\n\t\t$this->user = UserModel::getOrCreate(array(\r\n\t\t\t\"name\" => $this->session->user->name,\r\n\t\t\t\"sphinx_id\" => $this->session->user->db_id\r\n\t\t), true);\r\n\t}", "title": "" }, { "docid": "fbab0a47acfde24947e5299bc0cf392d", "score": "0.50198597", "text": "public function user();", "title": "" }, { "docid": "fbab0a47acfde24947e5299bc0cf392d", "score": "0.50198597", "text": "public function user();", "title": "" }, { "docid": "fbab0a47acfde24947e5299bc0cf392d", "score": "0.50198597", "text": "public function user();", "title": "" } ]
46b8674d2066ef6c0a1e056e0d765044
Returns 'update' template data.
[ { "docid": "5c9be6bb9743302eaafa36d119d1028f", "score": "0.0", "text": "protected function renderUpdate()\n {\n if (!file_exists($this->projectDir .'/.svn')) {\n return false;\n }\n\n return array(\n 'revison' => 'HEAD',\n );\n }", "title": "" } ]
[ { "docid": "e323d900f7180481f42aaf750f583cfe", "score": "0.7028681", "text": "public function testUpdateTemplate()\n {\n }", "title": "" }, { "docid": "cb0692533ed498ae7ad667ab21174c35", "score": "0.6803975", "text": "public function updateTemplate()\n {\n $this->page->setTemplate('generic/json');\n $this->page->layout_template = 'contentonly.phtml';\n\n if (empty($this->vars['id'])) {\n $this->page->setStatus(400, 'Lacking id of template to update');\n return;\n }\n\n if (!$this->page->request->isPost() || !$this->page->request->post->data) {\n $this->page->setStatus(400, 'Lacking update data');\n return;\n }\n\n $data = json_decode($this->page->request->post->data, true);\n\n if (!is_array($data)) {\n $this->page->setStatus(400, 'Update data not JSON-compliant');\n return;\n }\n\n if (!$this->model->updateTemplate(intval($this->vars['id']), $data)) {\n $this->page->setStatus(500, 'Failed to update template');\n return;\n }\n }", "title": "" }, { "docid": "78bd2871594975d32b2ad77a88e8499f", "score": "0.6706278", "text": "public function get_update() {\n\t \n\t\treturn $this->data;\n\t \n\t}", "title": "" }, { "docid": "face66654a3cc720c051860a70f894d3", "score": "0.623415", "text": "public function updateData() {\n\t\treturn $this->GetLatestUpdates();\n\t}", "title": "" }, { "docid": "2117b56ba14ffe9002ed8b3073b0da4f", "score": "0.6132797", "text": "abstract public function getUpdate();", "title": "" }, { "docid": "213da82b2256fd799cff91135bf9e8e3", "score": "0.60409397", "text": "private function _update() {\n\n $this->db->replace(XCMS_Tables::TABLE_TEMPLATES, array(\n \"id\" => $this->get(\"id\"),\n \"name\" => $this->get(\"name\"),\n \"folder\" => $this->get(\"folder\"),\n \"published\" => $this->get(\"published\")\n ));\n\n // Update related positions\n $this->db->delete(XCMS_Tables::TABLE_TEMPLATES_POSITIONS, array(\"template_id\" => $this->get(\"id\")));\n foreach ($this->get(\"positions\") as $position) {\n\n $this->db->insert(XCMS_Tables::TABLE_TEMPLATES_POSITIONS, array(\n \"template_id\" => $this->get(\"id\"),\n \"position\" => $position\n ));\n\n }\n\n }", "title": "" }, { "docid": "729c4694bcfa9f9f683993c88a3fd10e", "score": "0.60047215", "text": "function update(){\n $eStatuses = field_enums('emailtemplate', 'eStatus');\n $iEmailTemplateId= $this->uri->segment(3);\n $this->data['function']='update/'.$iEmailTemplateId;\n $this->data['emailtemplate'] = $this->emailtemplate_model->get_emailtemplate_details($iEmailTemplateId);\n if($this->input->post()){\n $emailtemplate = $this->input->post('data');\n $emailtemplate['tEmailMessage']=$emailtemplate['tEmailMessage']; \n $iEmailTemplateId= $this->emailtemplate_model->edit_emailtemplate($emailtemplate);\n $this->session->set_flashdata('message',\"Emailtemplate updated successfully\");\n redirect($this->data['base_url'] . 'emailtemplate');\n exit;\n }\n\t $this->breadcrumb->add('Dashboard', $this->data['base_url'].'home');\n $this->breadcrumb->add('View Emailtemplate',$this->data['base_url'].\"emailtemplate\");\n $this->breadcrumb->add('Edit Emailtemplate', '');\n $this->data['breadcrumb'] = $this->breadcrumb->output();\n $this->data['tpl_name']= \"emailtemplate/edit-emailtemplate.tpl\"; \n $this->smarty->assign('data', $this->data);\n $this->smarty->assign('eStatuses', $eStatuses);\n $this->smarty->view('template.tpl');\n }", "title": "" }, { "docid": "1d392445bb0553676a9a32061aea89be", "score": "0.60034984", "text": "public function getDataUpdate()\n {\n return $this->data_update;\n }", "title": "" }, { "docid": "1d392445bb0553676a9a32061aea89be", "score": "0.60034984", "text": "public function getDataUpdate()\n {\n return $this->data_update;\n }", "title": "" }, { "docid": "df7d676ac7009e74b0522f5222dc6035", "score": "0.60003465", "text": "private function _prepareUpdatePOST()\n\t{\n\t\t$this->_prepareCreatePOST();\n\t\t$_POST['id'] = 1;\n\t\t$_POST['type'] = 'update';\n\t\t$newValue = time();\n\t\t$_POST['api_version'] = $newValue;\n\t\treturn $newValue;\n\t}", "title": "" }, { "docid": "fbf989458a2945f0c2a7737ce4493af9", "score": "0.59985876", "text": "protected function createHTMLUpdate() {\n\t\t$this->setTemplateId('servers_update', 'servers.tpl.html');\n\n\t\t$server_id = $_GET['edit'];\n\n\t\t$tpl_data = array();\n\n\t\tswitch(intval($server_id)) {\n\t\t\tcase 0:\n\t\t\t\t// insert mode\n\t\t\t\t$tpl_data['titlemode'] = sm_get_lang('system', 'insert');\n\t\t\t\t$tpl_data['edit_server_id'] = '0';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t// edit mode\n\n\t\t\t\t// get server entry\n\t\t\t\t$edit_server = $this->db->selectRow(\n\t\t\t\t\tSM_DB_PREFIX.'servers',\n\t\t\t\t\tarray('server_id' => $server_id)\n\t\t\t\t);\n\t\t\t\tif (empty($edit_server)) {\n\t\t\t\t\t$this->message = 'Invalid server id';\n\t\t\t\t\treturn $this->createHTMLList();\n\t\t\t\t}\n\n\t\t\t\t$tpl_data = array_merge($tpl_data, array(\n\t\t\t\t\t'titlemode' => sm_get_lang('system', 'edit') . ' ' . $edit_server['label'],\n\t\t\t\t\t'edit_server_id' => $edit_server['server_id'],\n\t\t\t\t\t'edit_value_label' => $edit_server['label'],\n\t\t\t\t\t'edit_value_ip' => $edit_server['ip'],\n\t\t\t\t\t'edit_value_port' => $edit_server['port'],\n\t\t\t\t\t'edit_type_selected_' . $edit_server['type'] => 'selected=\"selected\"',\n\t\t\t\t\t'edit_active_selected_' . $edit_server['active'] => 'selected=\"selected\"',\n\t\t\t\t\t'edit_email_selected_' . $edit_server['email'] => 'selected=\"selected\"',\n\t\t\t\t\t'edit_sms_selected_' . $edit_server['sms'] => 'selected=\"selected\"',\n\t\t\t\t));\n\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$this->tpl->addTemplateData(\n\t\t\t$this->getTemplateId(),\n\t\t\t$tpl_data\n\t\t);\n\t}", "title": "" }, { "docid": "56ea88a266b944031b2f721d87996dec", "score": "0.59814966", "text": "public function getTemplateFile() {\n return 'element/template/update.tpl';\n }", "title": "" }, { "docid": "b7dc9e19b98897dae3c9a59aec80075d", "score": "0.59639376", "text": "private function prepareDataForTemplate()\n {\n $data = $this->prepareDataForSave();\n // pokud je dodaci stejna jako fakturacni, tak adresu prekopirujeme\n if ($this->getAddressIsSame()) {\n $data['addressDelivery'] = $data['addressBilling'];\n }\n $data['orderCode'] = $this->getCode();\n $data['orderPriceTotal'] = formatPrice($this->getPrice());\n $data['orderDate'] = date('j.n.Y', $this->getDateOrigin());\n $data['emailAddress'] = SHOP_MAIL_ADDRESS;\n $data['shippingUrl'] = $this->getShippingUrl();\n\n return $data;\n }", "title": "" }, { "docid": "c7c0a52911a74e480d151b8d1213d520", "score": "0.5926446", "text": "public function get_template_data() {\n\t\tinclude( 'template-data.php' );\n\t\tdie(); // you must die from an ajax call\n\t}", "title": "" }, { "docid": "33748eac95789d6828d2cde68465fc7c", "score": "0.59105885", "text": "protected abstract function getDataTemplate();", "title": "" }, { "docid": "a51f289380cf99ca06aca9ce1d7a5df9", "score": "0.588537", "text": "protected function updateEmailTemplate($template_data)\n {\n $tem_name = $template_data['name'];\n $qry = 'UPDATE ' . _DB_PREFIX_ . 'velsof_review_incentive_emails set subject = \"' . pSQL(Tools::htmlentitiesUTF8($template_data['subject'])) . '\",\n\t\t\t\tbody=\"' . pSQL(Tools::htmlentitiesUTF8($template_data['body'])) . '\", text_content = \"' . pSQL($template_data['text_content']) . '\", date_updated=now() WHERE\n\t\t\t\ttemplate_name = \"' . pSQL($tem_name) . '\" and id_lang=' . (int) $template_data['template_lang'].' and id_shop = '. (int)$template_data['id_shop'];\n $res = Db::getInstance(_PS_USE_SQL_SLAVE_)->execute($qry);\n return $res;\n }", "title": "" }, { "docid": "7a84206410d0c69ee2c33b22c0e65140", "score": "0.586284", "text": "function renderUpdate(){\n if($this->f3->get('SESSION.student_id') != null) $this->f3->reroute('/');\n\n $id = $this->f3->get('PARAMS.id');\n\n $course = new Course($this->db);\n $course->getById($id);\n $course->copyTo('POST');\n\n\t\t$this->f3->set('view','course_update.htm');\n\t\t$template=new Template;\n echo $template->render('layout_admin.htm');\n }", "title": "" }, { "docid": "bf56fea8854b0ddd73f05280369825dc", "score": "0.5851063", "text": "function _feed_template($data)\n\t{\n\t\tforeach($data as $key => $value)\n\t\t{\n\t\t\t$this->template[$key] = $value;\n\t\t}\n\t}", "title": "" }, { "docid": "b55593954d8e678ed0a91e1865c20416", "score": "0.58383375", "text": "public function premium_get_template_data() {\n\n\t\t\t$template = $this->get_template_data_array( $_REQUEST );\n\n\t\t\tif ( ! $template ) {\n\t\t\t\twp_send_json_error();\n\t\t\t}\n \n\t\t\twp_send_json_success( $template );\n\n\t\t}", "title": "" }, { "docid": "8765c30e8316efa49ad3ca19cd8d0096", "score": "0.5828867", "text": "public function getUpdate() {\n\n }", "title": "" }, { "docid": "8c8704a3d46cbdd0611c728145325d95", "score": "0.58200914", "text": "public function getUpdateActionStruct() {\n return $this->getStruct();\n }", "title": "" }, { "docid": "ccc960e9f0844f9b78da18537dad151a", "score": "0.5814979", "text": "protected function prepareUpdateData(){\n return $this->prepareInsertData();\n }", "title": "" }, { "docid": "6ea3f7c2b723d3f24fda15a8fadf21eb", "score": "0.57126945", "text": "protected function getTemplateData()\n {\n return [\n 'PATH' => $this->getFileGenerationPath()\n ];\n }", "title": "" }, { "docid": "d35b305411e4583fd93b6da06dace245", "score": "0.5704409", "text": "public function getUpdate(): string;", "title": "" }, { "docid": "a128054bad130dc79098523df9940c3f", "score": "0.5699495", "text": "public function index()\n {\n $templates = FormTemplate::select(FormTemplate::MINIMAL_COLUMNS)\n ->where('form_template_category_id', '!=', FormTemplateCategory::EVENT)\n ->orderBy('name')\n ->get();\n\n\n return view('pages.formupdates.formupdates', [\n 'templates' => $templates,\n ]);\n }", "title": "" }, { "docid": "e5834a0d376560a7272183d67cae4e31", "score": "0.56983525", "text": "protected function getTemplateData() {\n\t\t return array();\n\t}", "title": "" }, { "docid": "3aa48be2bc895cf63e0bae73b11b1efd", "score": "0.5691172", "text": "public static function getFormData() {\n $result = lC_Templates_Admin::getData($_GET['template']); \n $result['rpcStatus'] = RPC_STATUS_SUCCESS;\n\n echo json_encode($result);\n }", "title": "" }, { "docid": "cecd8781dfcef125c4e3307a9346f8f3", "score": "0.5687746", "text": "public function update()\n {\n return new StandardDialect\\UpdateSqlTemplate();\n }", "title": "" }, { "docid": "6878098a7b53829f5987d2ee5d11c1d4", "score": "0.5667189", "text": "public function templateData()\n {\n $result = EmailTemplates::get();\n return Datatables::of($result)\n ->addColumn('action', function ($result) {\n return '<a href =\"' . env('APP_URL') . 'admin/email-management/' . Crypt::encrypt($result->id) . '/edit\" class=\"btn btn-xs btn-primary edit\"><i class=\"fa fa-pencil-square-o\" aria-hidden=\"true\"></i> Edit </a>\n | <a href =\"' . env('APP_URL') . 'admin/email-management/' . Crypt::encrypt($result->id) . '/view\" class=\"btn btn-xs btn-warning view\"><i class=\"fa fa-eye\" aria-hidden=\"true\"></i> View</a>\n | <a data-id =' . Crypt::encrypt($result->id) . ' class=\"btn btn-xs btn-danger delete\" style=\"color:#fff\"><i class=\"fa fa-trash\" aria-hidden=\"true\"></i> Delete</a>';\n })->make(true);\n }", "title": "" }, { "docid": "83cef50ce471b9f79ebc27f3f39ce0e2", "score": "0.56671745", "text": "public function editTemplate()\n {\n\t\t$id = $this->uri->segment(3);\n\t\t$data['id'] = $id;\n\t\t$id = safe_b64decode($id);\n\t\t$data['title'] = 'Edit Email Template';\n\t\t$post = $this->input->post();\n\t\tif($post && !empty($post))\n\t\t{\n\t\t \t$data = array('name' => $post['name'],\n\t\t \t\t\t 'subject' => $post['subject'],\n\t\t\t\t\t 'message' => $post['message'],\n\t\t\t\t\t 'status'=>$post['status'],\n\t\t\t\t\t 'update_dt' => time()\n\t\t\t\t\t );\n\n\t\t \t$where = array('id'=>$post['setting_id']);\n\t\t\tif($this->Common->update('manage_email_templates', $data, $where))\n\t\t\t{\n\t\t\t\t$this->session->set_flashdata('success', UPDATE_SUCCESS_MSG);\n\t\t \t}\n\t\t \telse\n\t\t \t{\n\t\t\t\t$this->session->set_flashdata('error', UPDATE_FAIL);\n\t\t \t}\n\t\t}\n\t\t$where = \" where id='\".$id.\"'\";\n\t\t$data['result'] = $this->Common->select('manage_email_templates', $where);\n\t\t$this->load->view('mail_template/template_edit', $data);\n }", "title": "" }, { "docid": "dce73d0c9f74032ffa359acfd3eb32b0", "score": "0.5645285", "text": "function updatetemplate(Request $request){\n $input = $request->only('client_id','name','form_id','header_column');\n $input['fields'] = (isset($input['header_column'])) ? serialize($input['header_column']) : serialize( array(\n 'header' => array(),\n 'values' => array(),\n ));\n try{\n $this->complianceTemplates->updatetemplate($request->id,$input);\n return redirect()->back()\n ->with('success','Template successfully updated.');\n }\n catch(Exception $e){\n return redirect()->back()\n ->withErrors('error','Something went wrong!. Please try again.');\n }\n }", "title": "" }, { "docid": "50feafe4858f7ba3d5d8c48647ed3836", "score": "0.5632936", "text": "function update_template($input_array,$conditions_array)\n\t{\n\t\t$this->db->update('red_email_templates',$input_array,$conditions_array);\n\t\treturn $this->db->affected_rows();\n\t}", "title": "" }, { "docid": "1075fe9dd12fc39a8bb9103fdb852753", "score": "0.5628724", "text": "public static function getUpdateData() {\r\n $result = lC_Updater_Admin::getUpdateData($_GET['type']);\r\n $result['rpcStatus'] = RPC_STATUS_SUCCESS;\r\n\r\n echo json_encode($result);\r\n }", "title": "" }, { "docid": "86d49c4680d80453c56670f7d5fca1bc", "score": "0.56243825", "text": "public function getData($template = null);", "title": "" }, { "docid": "76cd1a5ade63487c8a601cd55fff4454", "score": "0.5605486", "text": "public function admin_updates()\r\n {\r\n $this->load->model('admin_global');\r\n $this->admin_global->check_status();\r\n\r\n // enable profiler\r\n //$this->output->enable_profiler(TRUE);\r\n\r\n // get site id\r\n $site = $this->config->item('template'); // config\r\n $site = (!empty($_SESSION['admin']['site'])) ? $_SESSION['admin']['site'] : $site; // session\r\n\r\n // load template\r\n $data = \"\";\r\n $this->load->view('admin/header');\r\n $this->load->view('admin/reports/admin_updates',$data);\r\n $this->load->view('admin/footer');\r\n\r\n }", "title": "" }, { "docid": "750b9d8b87c31a4be27f9bc6bdde3e58", "score": "0.5585207", "text": "function _wp_xprt_update_templates_list() {\n\tglobal $wp_xprt_options;\n\n\tif ( ! wp_verify_nonce( $_POST['_ajax_nonce'], 'wp_xprt_nonce' ) ) {\n\t\tdie(0);\n\t}\n\n\techo json_encode( array(\n\t\t'templates' => array_keys( $wp_xprt_options->templates ),\n\t) );\n\n\tdie(1);\n}", "title": "" }, { "docid": "d3230f7cb8075c0a36ea5ec9236514be", "score": "0.5579001", "text": "protected function getTemplateData($data)\n {\n return $data;\n }", "title": "" }, { "docid": "e624c3c9b4cf9c5fd245ca2e4e725399", "score": "0.55733216", "text": "public static function updateTemplate($template_info, $L)\n {\n $db = Core::$db;\n\n try {\n $db->query(\"\n UPDATE {PREFIX}module_form_builder_templates\n SET template_name = :template_name,\n content = :content\n WHERE template_id = :template_id\n LIMIT 1\n \");\n $db->bindAll(array(\n \"template_name\" => $template_info[\"template_name\"],\n \"content\" => $template_info[\"template_content\"],\n \"template_id\" => $template_info[\"template_id\"]\n ));\n $db->execute();\n } catch (PDOException $e) {\n return array(false, $L[\"notify_template_not_updated\"] . $e->getMessage());\n }\n\n return array(true, $L[\"notify_template_updated\"]);\n }", "title": "" }, { "docid": "752351ac6d1ab6cc912bb5668b2a4b2b", "score": "0.5573188", "text": "public function formupdateAction()\n {\n\n //layout is being changed because of ajax request\n $this->layout('layout/empty');\n $form_id = $this->params()->fromPost('form_id');\n $form_template = $this->params()->fromPost('form_template');\n $form_html = $this->params()->fromPost('form_html');\n $form_title = $this->params()->fromPost('form_title');\n $form_public = $this->params()->fromPost('public');\n $filter = new Filter\\StripTags();\n $form_title = $filter->filter($form_title);\n $form_public = $filter->filter($form_public);\n\n $this->table->updateForm($form_id, $form_title, $form_html, $form_template, $form_public);\n $filter = new Filter\\StripTags();\n $dom = new Query($form_template);\n try {\n $results = $dom->execute('form-template fields field');\n $order = 1;\n\n foreach ($results as $result) {\n if ($result->getAttribute('subtype')) {\n $field_type = $filter->filter($result->getAttribute('subtype'));\n } else {\n $field_type = $filter->filter($result->getAttribute('type'));\n }\n $field_name = $filter->filter($result->getAttribute('name'));\n $field_title = iconv(\"UTF-8\", \"ISO-8859-9\", $filter->filter($result->getAttribute('label')));\n $kayitkontrol = $this->table->getFormElement($field_name, $form_id);\n\n //checking if new elements are added at update process\n if (count($kayitkontrol) <> 0) {\n $this->table->updateFormElement($field_name, $form_id, $field_title, $order, $field_type);\n } else {\n $this->table->addFormElements($form_id, $field_title, $order, $field_name, $field_type);\n }\n $order++;\n }\n } catch (\\Exception $ex) {\n echo $ex;\n }\n }", "title": "" }, { "docid": "f7b4e2780a9b16aca33d29c2ed7554d7", "score": "0.5572115", "text": "public function updateEmailTemplate($data = array()) {\n if (isset($data) && !empty($data)) {\n //Check if row exists\n $sql = \"SELECT count(*) as total FROM \" . DB_PREFIX . \"kb_mp_email_templates WHERE template_id = '\" . (int)$data['template_id'] . \"' and language_id = '\" . (int)$data['language_id'] . \"'\";\n $query = $this->db->query($sql);\n\n if (isset($query->row['total']) && !empty($query->row['total'])) {\n //Update row\n $sql = \"UPDATE \" . DB_PREFIX . \"kb_mp_email_templates SET email_subject = '\" . $data['subject'] . \"', email_content = '\" . $data['content'] . \"' WHERE template_id = '\" . (int)$data['template_id'] . \"' and language_id = '\" . (int)$data['language_id'] . \"'\";\n } else {\n //Insert row\n if (isset($data['subject']) && !empty($data['subject'])) {\n $sql = \"INSERT INTO \" . DB_PREFIX . \"kb_mp_email_templates SET id = '', template_id = '\" . (int)$data['template_id'] . \"', language_id = '\" . $data['language_id'] . \"', email_subject = '\" . $data['subject'] . \"', email_content = '\" . $data['content'] . \"', date_added = '\" . date(\"Y-m-d H:i:s\") . \"'\";\n }\n }\n \n if ($this->db->query($sql)) {\n return true;\n } else {\n return false;\n }\n }\n }", "title": "" }, { "docid": "64b628ed3fb188df6e6c87f3326c68d6", "score": "0.55149955", "text": "public function generateEditTemplatePage($info = NULL)\r\n {\r\n $this->checkPermissions();\r\n if (!empty($info))\r\n {\r\n $errors = $info[\"errors\"];\r\n $header_data = $info[\"header\"];\r\n $footer_data = $info[\"footer\"];\r\n $main_data = $info[\"main\"];\r\n $template_name = $info[\"templateName\"];\r\n $curr_template_name = $info[\"currTemplateName\"];\r\n $action = $info[\"action\"];\r\n }\r\n else\r\n {\r\n $template_name = $curr_template_name = $_POST[\"template\"];\r\n $template = file_get_contents($this->templates_dir . $template_name);\r\n\r\n $doc = new DOMDocument();\r\n $doc->loadHTML($template);\r\n\r\n $header = $doc->getElementsByTagName(\"header\")->item(0);\r\n $footer = $doc->getElementsByTagName(\"footer\")->item(0);\r\n $main = $doc->getElementsByTagName(\"main\")->item(0);\r\n\r\n $main_data = $doc->saveHTML($main);\r\n $header_data = empty($header) ? \"\" : $doc->saveHTML($header);\r\n $footer_data = empty($footer)? \"\" : $doc->saveHTML($footer);\r\n\r\n $action = \"edit\";\r\n }\r\n ?>\r\n <link rel=\"stylesheet\" href=\"<?php print $this->getUrl(\"app.css\"); ?>\" type=\"text/css\">\r\n <div class=\"container\">\r\n <div class=\"jumbotron\">\r\n <div class=\"row\">\r\n <div class=\"col-md-10\">\r\n <h3><?php print ucfirst($action);?> Template</h3>\r\n </div>\r\n <div class=\"col-md-2\">\r\n <a class=\"btn btn-primary\" style=\"color:white\" href=\"<?php print $this->getUrl(\"index.php\")?>\">Back to Front</a>\r\n </div>\r\n </div>\r\n <hr/>\r\n <?php if (!empty($info)) :?>\r\n <div class=\"red container\">\r\n <h4>Template Validation Failed!</h4>\r\n <p>Template was saved with the following errors. To discover where the error occured, match the line numbers in the error message to the ones in the Source view...</p>\r\n <p><a id=\"readmore-link\" href=\"#\">Click to view errors</a></p>\r\n <div id=\"readmore\" style=\"display:none\">\r\n <?php if (sizeof($errors['otherErrors']) > 0): ?>\r\n <p><strong>General Errors...</strong></p>\r\n <div>\r\n <?php\r\n foreach($errors['otherErrors'] as $error)\r\n {\r\n print \"<p>$error</p>\";\r\n }\r\n ?>\r\n </div>\r\n <?php endif; ?>\r\n <?php if (sizeof($errors['headerErrors']) > 0): ?>\r\n <p><strong>Header Errors...</strong></p>\r\n <div>\r\n <?php\r\n foreach($errors['headerErrors'] as $error)\r\n {\r\n print \"<p>$error</p>\";\r\n }\r\n ?>\r\n </div>\r\n <?php endif; ?>\r\n <?php if (sizeof($errors['footerErrors']) > 0): ?>\r\n <p><strong>Footer Errors...</strong></p>\r\n <div>\r\n <?php\r\n foreach($errors['footerErrors'] as $error)\r\n {\r\n print \"<p>$error</p>\";\r\n }\r\n ?>\r\n </div>\r\n <?php endif; ?>\r\n <?php if (sizeof($errors['templateErrors']) > 0): ?>\r\n <p><strong>Body Errors...</strong></p>\r\n <div>\r\n <?php\r\n foreach($errors['templateErrors'] as $error)\r\n {\r\n print \"<p>$error</p>\";\r\n }\r\n ?>\r\n </div>\r\n <?php endif; ?>\r\n </div>\r\n </div>\r\n <hr/>\r\n <?php endif;?>\r\n <?php $this->generateInstructions() ?>\r\n <br/><br/>\r\n <form action=\"<?php print $this->getUrl(\"SaveTemplate.php\"); ?>\" method=\"post\">\r\n <table class=\"table\" style=\"width:100%;\">\r\n <tbody>\r\n <tr>\r\n <td style=\"width:25%;\">Template Name <strong style=\"color:red\">*Required</strong></td>\r\n <td class=\"data\">\r\n <div class=\"col-md-5\">\r\n <input name=\"templateName\" type=\"text\" class=\"form-control\" value=\"<?php print str_replace(array(\"_$this->pid\", \" - INVALID\", \".html\"), \"\", $template_name); ?>\" required>\r\n <input type=\"hidden\" name=\"action\" value=\"<?php print $action; ?>\">\r\n <input name=\"currTemplateName\" type=\"hidden\" value=\"<?php print $curr_template_name; ?>\">\r\n </div>\r\n </td>\r\n </tr>\r\n <tr>\r\n <td style=\"width:25%;\"><button type=\"submit\" class=\"btn btn-primary\">Save Template</button></td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n <div class=\"collapsible-container\">\r\n <button type=\"button\" class=\"collapsible\">Add Header **Optional** <span class=\"fas fa-caret-down\"></span><span class=\"fas fa-caret-up\"></span></button>\r\n <div class=\"collapsible-content\">\r\n <p>Anything in the header will appear at the top of every page in the template. All syntax rules apply. <strong>If the header content is too big, it will overlap template data in the PDF.</strong></p>\r\n <textarea cols=\"80\" id=\"header-editor\" name=\"header-editor\" rows=\"10\">\r\n <?php print $header_data; ?>\r\n </textarea>\r\n </div>\r\n </div>\r\n <div class=\"collapsible-container\">\r\n <button type=\"button\" class=\"collapsible\">Add Footer **Optional** <span class=\"fas fa-caret-down\"></span><span class=\"fas fa-caret-up\"></span></button>\r\n <div class=\"collapsible-content\">\r\n <p>Anything in the footer will appear at the bottom of every page in the template. All syntax rules apply. <strong>If the footer content is too big, it will cutoff in the PDF.</strong></p>\r\n <textarea cols=\"80\" id=\"footer-editor\" name=\"footer-editor\" rows=\"10\">\r\n <?php print $footer_data; ?>\r\n </textarea>\r\n </div>\r\n </div>\r\n <div style=\"margin-top:20px\">\r\n <textarea cols=\"80\" id=\"editor\" name=\"editor\" rows=\"10\">\r\n <?php print $main_data; ?>\r\n </textarea>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n <script src=\"<?php print $this->getUrl(\"vendor/ckeditor/ckeditor/ckeditor.js\"); ?>\"></script>\r\n <script src=\"<?php print $this->getUrl(\"scripts.js\"); ?>\"></script>\r\n <?php\r\n $this->initializeEditor(\"header-editor\", 200);\r\n $this->initializeEditor(\"footer-editor\", 200);\r\n $this->initializeEditor(\"editor\", 1000);\r\n }", "title": "" }, { "docid": "452e7273a31c0065a633bc40f18e4505", "score": "0.5507438", "text": "public function templateUpdate($templateId, $update)\n {\n // CTL02 Condition(TemplateID) Update(...) : CTL-0072 Condition(TemplateID) Update(...)\n return $this->action('CTL02', array(\n 'Condition' => array('TemplateID' => $templateId),\n 'Update' => $update,\n ), 'CTL-0072', 'ReturnCode');\n }", "title": "" }, { "docid": "e6104045a77e49478e21e74532dc0335", "score": "0.5502393", "text": "public function getModificationFormTemplate();", "title": "" }, { "docid": "927373d279afb85f79099995de6288d9", "score": "0.5476978", "text": "public function getTemplateData() {\n return array(\n 'type' => $this->getType(),\n 'entityType' => $this->getEntityType(),\n 'module' => $this->get('clastic.module_manager')->getModule($this->getType()),\n 'submodules' => array(),\n 'links' => array(),\n 'displayTitle' => $this->getDisplayTitle(),\n );\n }", "title": "" }, { "docid": "c0963763d8c86e15007ad31b129c8d86", "score": "0.54405385", "text": "public function actionUpdate() { }", "title": "" }, { "docid": "3aa99063a9021ae7b8eebc782370e65f", "score": "0.5435157", "text": "function inspiry_update_page_templates() {\n\n\t\tif ( ! is_page_template() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$page_id = get_queried_object_id();\n\t\tif ( ! empty( $page_id ) ) {\n\t\t\t$page_template = get_post_meta( $page_id, '_wp_page_template', true );\n\t\t}\n\n\t\tif ( empty( $page_template ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$latest_templates = array(\n\t\t\t/*\n\t\t\t * Updated properties list template\n\t\t\t */\n\t\t\t'template-property-listing.php' => 'templates/list-layout.php',\n\t\t\t'templates/template-property-listing.php' => 'templates/list-layout.php',\n\t\t\t/*\n\t\t\t * Updated properties grid template\n\t\t\t */\n\t\t\t'template-property-grid-listing.php' => 'templates/list-layout.php',\n\t\t\t'templates/template-property-grid-listing.php' => 'templates/grid-layout.php',\n\t\t\t/*\n\t\t\t * Updated properties with half map template\n\t\t\t */\n\t\t\t'template-map-based-listing.php' => 'templates/half-map-layout.php',\n\t\t\t'templates/template-map-based-listing.php' => 'templates/half-map-layout.php',\n\t\t\t/*\n\t\t\t * Updated favorites template\n\t\t\t */\n\t\t\t'template-favorites.php' => 'templates/favorites.php',\n\t\t\t'templates/template-favorites.php' => 'templates/favorites.php',\n\t\t\t/*\n\t\t\t * Updated my properties template\n\t\t\t */\n\t\t\t'template-my-properties.php' => 'templates/my-properties.php',\n\t\t\t'templates/template-my-properties.php' => 'templates/my-properties.php',\n\t\t\t/*\n\t\t\t * Updated agents list template\n\t\t\t */\n\t\t\t'template-agent-listing.php' => 'templates/agents-list.php',\n\t\t\t'templates/template-agent-listing.php' => 'templates/agents-list.php',\n\t\t\t/*\n\t\t\t * Updated compare properties template\n\t\t\t */\n\t\t\t'template-compare.php' => 'templates/compare-properties.php',\n\t\t\t'templates/template-compare.php' => 'templates/compare-properties.php',\n\t\t\t/*\n\t\t\t * Updated contact template\n\t\t\t */\n\t\t\t'template-contact.php' => 'templates/contact.php',\n\t\t\t'templates/template-contact.php' => 'templates/contact.php',\n\t\t\t/*\n\t\t\t * Updated dsIDXpress template\n\t\t\t */\n\t\t\t'template-dsIDX.php' => 'templates/dsIDXpress.php',\n\t\t\t'templates/template-dsIDX.php' => 'templates/dsIDXpress.php',\n\t\t\t/*\n\t\t\t * Updated edit profile template\n\t\t\t */\n\t\t\t'template-edit-profile.php' => 'templates/edit-profile.php',\n\t\t\t'templates/template-edit-profile.php' => 'templates/edit-profile.php',\n\t\t\t/*\n\t\t\t * Updated full width template\n\t\t\t */\n\t\t\t'template-fullwidth.php' => 'templates/full-width.php',\n\t\t\t'templates/template-fullwidth.php' => 'templates/full-width.php',\n\t\t\t/*\n\t\t\t * Updated 2 Columns Gallery template\n\t\t\t */\n\t\t\t'template-gallery-2-columns.php' => 'templates/2-columns-gallery.php',\n\t\t\t'templates/template-gallery-2-columns.php' => 'templates/2-columns-gallery.php',\n\t\t\t/*\n\t\t\t * Updated 3 Columns Gallery template\n\t\t\t */\n\t\t\t'template-gallery-3-columns.php' => 'templates/3-columns-gallery.php',\n\t\t\t'templates/template-gallery-3-columns.php' => 'templates/3-columns-gallery.php',\n\t\t\t/*\n\t\t\t * Updated 4 Columns Gallery template\n\t\t\t */\n\t\t\t'template-gallery-4-columns.php' => 'templates/4-columns-gallery.php',\n\t\t\t'templates/template-gallery-4-columns.php' => 'templates/4-columns-gallery.php',\n\t\t\t/*\n\t\t\t * Updated home template\n\t\t\t */\n\t\t\t'template-home.php' => 'templates/home.php',\n\t\t\t'templates/template-home.php' => 'templates/home.php',\n\t\t\t/*\n\t\t\t * Updated login template\n\t\t\t */\n\t\t\t'template-login.php' => 'templates/login-register.php',\n\t\t\t'templates/template-login.php' => 'templates/login-register.php',\n\t\t\t/*\n\t\t\t * Updated membership plans template\n\t\t\t */\n\t\t\t'template-memberships.php' => 'templates/membership-plans.php',\n\t\t\t'templates/template-memberships.php' => 'templates/membership-plans.php',\n\t\t\t/*\n\t\t\t * Updated optima express template\n\t\t\t */\n\t\t\t'template-optima-express.php' => 'templates/optima-express.php',\n\t\t\t'templates/template-optima-express.php' => 'templates/optima-express.php',\n\t\t\t/*\n\t\t\t * Updated search template\n\t\t\t */\n\t\t\t'template-search.php' => 'templates/properties-search.php',\n\t\t\t'templates/template-search.php' => 'templates/properties-search.php',\n\t\t\t/*\n\t\t\t * Updated search template with right sidebar\n\t\t\t */\n\t\t\t'template-search-right-sidebar.php' => 'templates/properties-search-right-sidebar.php',\n\t\t\t'templates/template-search-right-sidebar.php' => 'templates/properties-search-right-sidebar.php',\n\t\t\t/*\n\t\t\t * Updated search template with left sidebar\n\t\t\t */\n\t\t\t'template-search-sidebar.php' => 'templates/properties-search-left-sidebar.php',\n\t\t\t'templates/template-search-sidebar.php' => 'templates/properties-search-left-sidebar.php',\n\t\t\t/*\n\t\t\t * Updated submit property template\n\t\t\t */\n\t\t\t'template-submit-property.php' => 'templates/submit-property.php',\n\t\t\t'templates/template-submit-property.php' => 'templates/submit-property.php',\n\t\t\t/*\n\t\t\t * Updated users list template\n\t\t\t */\n\t\t\t'template-users-listing.php' => 'templates/users-lists.php',\n\t\t\t'templates/template-users-listing.php' => 'templates/users-lists.php',\n\t\t);\n\n\t\tif ( ! empty( $page_template ) && array_key_exists( $page_template, $latest_templates ) && ! defined( 'DSIDXPRESS_PLUGIN_VERSION' ) ) {\n\n\t\t\t$updated_template = $latest_templates[ $page_template ];\n\t\t\tupdate_post_meta( $page_id, '_wp_page_template', $updated_template );\n\t\t\techo '<meta HTTP-EQUIV=\"Refresh\" CONTENT=\"1\">';\n\n\t\t} elseif ( ! empty( $page_template ) &&\n\t\t false !== strpos( $page_template, 'template-' ) &&\n\t\t false === strpos( $page_template, 'templates/' ) &&\n\t\t ! defined( 'DSIDXPRESS_PLUGIN_VERSION' ) ) {\n\n\t\t\tupdate_post_meta( $page_id, '_wp_page_template', 'templates/' . $page_template );\n\t\t\techo '<meta HTTP-EQUIV=\"Refresh\" CONTENT=\"1\">';\n\t\t}\n\n\t}", "title": "" }, { "docid": "cb967fa784bf7e1f934e0910aeed1687", "score": "0.54331857", "text": "public static function saveTemplate() { \n $result = array();\n $saved = lC_Templates_Admin::save($_GET['template'], $_GET);\n if ($saved) {\n $result['rpcStatus'] = RPC_STATUS_SUCCESS;\n }\n\n echo json_encode($result);\n }", "title": "" }, { "docid": "8628702a6e29958bad594c8504f6f9d3", "score": "0.5431527", "text": "function cns_edit_post_template($id, $title, $text, $forum_multi_code, $use_default_forums)\n{\n $GLOBALS['FORUM_DB']->query_update('f_post_templates', array(\n 't_title' => $title,\n 't_text' => $text,\n 't_forum_multi_code' => $forum_multi_code,\n 't_use_default_forums' => $use_default_forums\n ), array('id' => $id), '', 1);\n\n log_it('EDIT_POST_TEMPLATE', strval($id), $title);\n\n if ((addon_installed('commandr')) && (!running_script('install')) && (!get_mass_import_mode())) {\n require_code('resource_fs');\n generate_resource_fs_moniker('post_template', strval($id));\n }\n}", "title": "" }, { "docid": "267fbf5cf97ba587ffef8f7684092a01", "score": "0.54312474", "text": "function update() {\n\t\t$method = \"/posts/update\";\n\t\t\t\n\t\t$this->retour = $this->connect($method);\n\t\treturn $this->retour;\n\t}", "title": "" }, { "docid": "da16eb9868332922a3d2ff4cbf37d217", "score": "0.5426606", "text": "public function updateCategoryTemplate()\n {\n $this->page->setTemplate('generic/json');\n $this->page->layout_template = 'contentonly.phtml';\n\n if (empty($this->vars['id'])) {\n $this->page->setStatus(400, 'Lacking id of category to update');\n return;\n }\n\n if (!$this->page->request->isPost()) {\n $this->page->setStatus(400, 'Lacking update data');\n return;\n }\n\n if (!$this->model->updateCategoryTemplate(intval($this->vars['id']), intval($this->page->request->post->template_id))) {\n $this->page->setStatus(500, 'Failed to update category');\n return;\n }\n }", "title": "" }, { "docid": "29d91fbc001ad092cf3c539fcbfe8a4c", "score": "0.54162997", "text": "function ocf_edit_post_template($id,$title,$text,$forum_multi_code,$use_default_forums)\n{\n\t$GLOBALS['FORUM_DB']->query_update('f_post_templates',array(\n\t\t't_title'=>$title,\n\t\t't_text'=>$text,\n\t\t't_forum_multi_code'=>$forum_multi_code,\n\t\t't_use_default_forums'=>$use_default_forums\n\t),array('id'=>$id),'',1);\n\n\tlog_it('EDIT_POST_TEMPLATE',strval($id),$title);\n}", "title": "" }, { "docid": "a14c21a1e47accd78940b466fa4bc9fe", "score": "0.5401801", "text": "public function template()\n {\n $relations = $this->relations();\n $data = [\n 'namespace' => $this->namespace,\n 'modelName' => $this->modelName,\n 'propertyDefiner' => config('laracrud.model.propertyDefiner') ? implode(\"\\n\", array_reverse($this->modelBuilder->propertyDefiners)) : '',\n 'methodDefiner' => config('laracrud.model.methodDefiner') ? implode(\"\\n\", array_reverse($this->modelBuilder->methodDefiners)) : '',\n\n 'tableName' => $this->table->name(),\n 'constants' => $this->constants(),\n 'guarded' => config('laracrud.model.guarded') ? $this->guarded() : '',\n 'fillable' => config('laracrud.model.fillable') ? $this->fillable() : '',\n\n 'dateColumns' => $this->dates(),\n 'casts' => config('laracrud.model.casts') ? $this->casts() : '',\n 'relationShips' => $relations,\n\n 'mutators' => config('laracrud.model.mutators') ? $this->mutators() : '',\n 'accessors' => config('laracrud.model.accessors') ? $this->accessors() : '',\n 'scopes' => config('laracrud.model.scopes') ? $this->scopes() : '',\n 'traits' => !empty($this->traits) ? 'use ' . implode(', ', $this->traits) . ';' : '',\n 'importNamespaces' => !empty($this->importNamespaces) ? implode(\"\\n\", $this->importNamespaces) : '',\n 'searchable' => $this->searchableColumns,\n ];\n $tempMan = new TemplateManager('model/template.txt', $data);\n\n return $tempMan->get();\n }", "title": "" }, { "docid": "edcbd878f5d23920d3fcaf4f7daf17a9", "score": "0.53771466", "text": "public function getEdit($data)\n {\n $fields = array(\n 'Template.id',\n 'Template.subject',\n 'Template.content' => array(\n 'class' => 'span12 ckeditor',\n )\n );\n return $fields;\n }", "title": "" }, { "docid": "65d19e979f737d3ebd3711e5d2faca9b", "score": "0.53681636", "text": "function populateTemplate($data) {\n if($this->template_data) {\n\t\t\t$this->template_data = $this->template_data->customise($data);\t\n\t\t} else {\n\t\t\tif(is_array($data)) $data = new ArrayData($data);\n\t\t\t$this->template_data = $this->customise($data);\n\t\t}\n\t\t$this->parseVariables_done = false;\n\t}", "title": "" }, { "docid": "0fbc9da27b5b403b13256524606a3c00", "score": "0.53377587", "text": "public function getUpdated() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"updated\");\n\t}", "title": "" }, { "docid": "0fbc9da27b5b403b13256524606a3c00", "score": "0.53377587", "text": "public function getUpdated() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"updated\");\n\t}", "title": "" }, { "docid": "18044d7d69b722b4eab746dd49842b77", "score": "0.5321933", "text": "public static function update($data){\n\n }", "title": "" }, { "docid": "a6199668a5dcb25ed6630130b8bbdb64", "score": "0.5319029", "text": "private function updateTemplateList()\n {\n $wpdb = rev_db_class::revDbInstance();\n\n $new = $wpdb->getRow(\"SELECT * FROM `\" . $wpdb->prefix . RevSliderGlobals::TABLE_REVSLIDER_OPTIONS_NAME . \"` WHERE `name`='revslider_templates_premium_new'\");\n $cur = $wpdb->getRow(\"SELECT * FROM `\" . $wpdb->prefix . RevSliderGlobals::TABLE_REVSLIDER_OPTIONS_NAME . \"` WHERE `name`='revslider_templates_premium'\");\n\n $new = ($new) ? $new['value'] : serialize(array());\n $cur = ($cur) ? $cur['value'] : serialize(array());\n \n \n $new = unserialize($new);\n $cur = unserialize($cur);\n\n if ($new !== false && !empty($new) && is_array($new)) {\n if (empty($cur)) {\n $cur = $new;\n } else {\n if (@RevsliderPrestashop::getIsset($new['slider']) && is_array($new['slider'])) {\n foreach ($new['slider'] as $n) {\n $found = false;\n if (@RevsliderPrestashop::getIsset($cur['slider']) && is_array($cur['slider'])) {\n foreach ($cur['slider'] as $ck => $c) {\n if ($c['uid'] == $n['uid']) {\n if (version_compare($c['version'], $n['version'], '<')) {\n $n['is_new'] = true;\n $n['push_image'] = true; //push to get new image and replace\n }\n if (@RevsliderPrestashop::getIsset($c['is_new'])) {\n $n['is_new'] = true;\n } //is_new will stay until update is done\n\n $n['exists'] = true; //if this flag is not set here, the template will be removed from the list\n\n $cur['slider'][$ck] = $n;\n $found = true;\n break;\n }\n }\n }\n\n if (!$found) {\n $n['exists'] = true;\n $cur['slider'][] = $n;\n }\n }\n\n foreach ($cur['slider'] as $ck => $c) { //remove no longer available Slider\n if (!@RevsliderPrestashop::getIsset($c['exists'])) {\n unset($cur['slider'][$ck]);\n } else {\n unset($cur['slider'][$ck]['exists']);\n }\n }\n\n $cur['slides'] = $new['slides']; // push always all slides\n }\n }\n\n\n $is_exist = $wpdb->getRow(\"SELECT * FROM `\" . $wpdb->prefix . RevSliderGlobals::TABLE_REVSLIDER_OPTIONS_NAME . \"` WHERE `name`='revslider_templates_premium'\");\n\n $serialized_data = serialize($cur);\n\n if ($is_exist) {\n $wpdb->query(\"UPDATE `\" . $wpdb->prefix . RevSliderGlobals::TABLE_REVSLIDER_OPTIONS_NAME . \"` SET `value`='\" . $serialized_data . \"' WHERE `name`='revslider_templates_premium';\");\n } else {\n $wpdb->query(\"INSERT INTO `\" . $wpdb->prefix . RevSliderGlobals::TABLE_REVSLIDER_OPTIONS_NAME . \"` (`id`, `name`, `value`) VALUES (NULL, 'revslider_templates_premium', '\" . $serialized_data . \"');\");\n }\n\n\n $is_exist_new = $wpdb->getRow(\"SELECT * FROM `\" . $wpdb->prefix . RevSliderGlobals::TABLE_REVSLIDER_OPTIONS_NAME . \"` WHERE `name`='revslider_templates_premium'\");\n\n\n if ($is_exist_new) {\n $wpdb->query(\"UPDATE `\" . $wpdb->prefix . RevSliderGlobals::TABLE_REVSLIDER_OPTIONS_NAME . \"` SET `value`='false' WHERE `name`='revslider_templates_premium_new';\");\n } else {\n $wpdb->query(\"INSERT INTO `\" . $wpdb->prefix . RevSliderGlobals::TABLE_REVSLIDER_OPTIONS_NAME . \"` (`id`, `name`, `value`) VALUES (NULL, 'revslider_templates_premium_new', 'false');\");\n }\n\n $this->updateImages();\n }\n }", "title": "" }, { "docid": "47d731f2226f6448552b1de7f54634e4", "score": "0.53110915", "text": "public function action_update()\n\t{\n\t\tif (\\Input::method() === 'POST')\n\t\t{\n\t\t\t$content = <<<HTML\n<style type=\"text/css\" media=\"screen\">\n\tli.green{\n\t\tcolor: green;\n\t}\n\tli.yellow{\n\t\tcolor:orange;\n\t}\n\tli.red{\n\t\tcolor:red;\n\t}\n</style>\nHTML;\n\t\t\t$content .= '<ul>';\n\t\t\tforeach (Formloader_Migration::migrate_app() as $item)\n\t\t\t{\n\t\t\t\t$content .= '<li class=\"'. \\Arr::get($item, '1', '') .'\">' . $item[0] . '</li>';\n\t\t\t}\n\t\t\t$content .= '</ul>';\n\n\t\t\t$this->template->set('content', $content, false);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->template->content = \\View::forge('update');\n\t\t}\n\t}", "title": "" }, { "docid": "45ef927682998f74fe7fc62448dc8897", "score": "0.5307047", "text": "public function update(Request $request)\r\n {\r\n $tpl = EmailTemplate::find($request->id);\r\n $tpl->update($request->all());\r\n\r\n $this->helpers->saveAudit([\r\n 'page'=>'Email Template',\r\n 'action'=>'Edit - '.$request->template_name,\r\n ]);\r\n\r\n return redirect($this->home)->with(['success' => 'Template ' . $tpl->name . ' updated successfully.']);\r\n }", "title": "" }, { "docid": "5e626a27952d82fbb06ffb9615ad02fb", "score": "0.53026646", "text": "static function update($updated_data){ \n $query = \"UPDATE data SET name = $1, info = $2 WHERE id = $3\";\n $query_params = array($updated_data->name, $updated_data->info, $updated_data->id);\n $result = pg_query_params($query, $query_params);\n\n return self::all();\n }", "title": "" }, { "docid": "eb7980c9ec21e5c2493c2e521e609d7b", "score": "0.5300063", "text": "public function actionUpdate($id) {\n $model = $this->findModel($id);\n\n if (Yii::$app->request->isPost && $model->load(Yii::$app->request->post())) {\n $template_file = UploadedFile::getInstances($model, 'template_file');\n\n if (!empty($template_file)) {\n foreach ($template_file as $file) {\n //文件名\n $fileName = date(\"YmdHiiHsHis\") . mt_rand(100, 999) . \".\" . $file->extension;\n\n if ($file->saveAs($this->file_path.'/' . $fileName)) {\n\n $model->template_file = \"uploads/\" . $fileName;\n }\n }\n } else {\n unset($model->template_file);\n }\n $model->params= json_encode($model->params);\n if ($model->validate()) {\n\n $model->update();\n }\n\n return $this->redirect(['view', 'id' => $model->id]);\n exit;\n }\n\n $data = User::find()->All();\n if (!empty($model->params)) {\n $dataDict = json_decode($model->params, true);\n } else {\n $dataDict = array();\n }\n \n $allParams = DataDict::find()->select(['dict_name', 'id', 'dict_value'])->indexBy('id')->all();\n\n\n \n return $this->render('update', [\n 'model' => $model,\n 'allParams'=>$allParams,\n 'dataDict'=>$dataDict,\n 'data' => $data,\n ]);\n }", "title": "" }, { "docid": "93071ab4070eaf24fa4768af2ada2f5e", "score": "0.5299196", "text": "public function testModifyViewTemplate()\n {\n $template = $this->objFromFixture('ViewTemplate', 'template1');\n\n // Login as admin\n $this->logInWithPermission('ADMIN');\n\n // Assert: Update the template\n $this->assertNotEmpty($template->Title);\n $template->Title = 'tempalate1_update';\n $template->write();\n\n $this->assertEquals($template->Title, 'tempalate1_update');\n }", "title": "" }, { "docid": "dad33236f8fe756ac7dee50c067bcd4d", "score": "0.5293692", "text": "public function buildEditPage($update = false) {\r\n\r\n if (is_array($update)) {\r\n if ($update['success']) {\r\n $message = '\r\n <div class=\"message\">\r\n <h3>Content updated</h3>\r\n <p><a href=\"./\">Back to site</a></p>\r\n </div>\r\n ';\r\n } else {\r\n $message = $update['error'];\r\n }\r\n } else {\r\n $message = \"\";\r\n }\r\n\r\n $latest = $this->db->getLatest();\r\n \r\n // create content\r\n $title = \"Edit\";\r\n $content = '\r\n <aside>\r\n <h1>'.$this->conf['details']['title'].'</h1>\r\n <p><a href=\"./\">Back to site</a></p>\r\n <p><a href=\"./history\">View or restore an older version of this page</a></p>\r\n </aside>\r\n <article>\r\n <h2>Edit</h2>\r\n '.$message.'\r\n <form method=\"post\" action=\"\">\r\n <fieldset>\r\n <legend>Edit page</legend>\r\n <div class=\"input-container clearfix\">\r\n <label for=\"author\">Your name</label>\r\n <input type=\"text\" class=\"text\" id=\"author\" name=\"author\" value=\"\" />\r\n </div>\r\n <div class=\"input-container clearfix\">\r\n <label for=\"comment\">Update description <em>(optional)</em></label>\r\n <textarea name=\"comment\" id=\"comment\" rows=\"3\" cols=\"30\"></textarea>\r\n </div>\r\n <label>Make your changes below</label>\r\n <div class=\"input-container clearfix\">\r\n <!-- <label for=\"content\">Content</label> -->\r\n <textarea name=\"content\" id=\"content\" rows=\"30\" cols=\"40\">'.stripslashes($latest->content).'</textarea>\r\n </div>\r\n <div class=\"input-container clearfix\">\r\n <input class=\"button\" type=\"submit\" name=\"login\" id=\"button\" value=\"Save\" />\r\n <p><a class=\"button\" href=\"./\">Cancel</a></p>\r\n </div>\r\n </fieldset>\r\n </form>\r\n </article>\r\n ';\r\n\r\n // build page\r\n return $this->buildPage($title, $content);\r\n }", "title": "" }, { "docid": "df9f7156dad41c6d46206fc3470cce4b", "score": "0.5290615", "text": "public function edit()\n {\n return response()->view( 'pages.mailingtemplate.mailingtemplate-edit');\n }", "title": "" }, { "docid": "6f0544103f165625956839260127568d", "score": "0.52897066", "text": "function single_date_update()\n {\n if (admin_id() == '') {\n $this->is_login();\n } else {\n $this->is_admin();\n }\n extract($this->input->post());\n $data['get_data'] = 'get_data';\n $single_data = get_data(TBL_UPDATE, array(\n 'room_id' => $room_id,\n 'separate_date' => $up_date\n ))->row_array();\n $data = array_merge($data, $single_data);\n $this->load->view('channel/single_date_update', $data);\n }", "title": "" }, { "docid": "eb2c233959fdf0287b275d457fd65cb6", "score": "0.5284442", "text": "public function serveUpdate($update)\n {\n $this->data = $this->updates['result'][$update];\n }", "title": "" }, { "docid": "635520137c239721d7b4bcf5aea263ec", "score": "0.52762234", "text": "function update(){\n\t\t$data['content_view'] = \"v_upload_bukti_pembayaran.php\";\n\t\t$this->load->view('v_template_frontend',$data);\n\t}", "title": "" }, { "docid": "ad3d0a5bdade84cd64983294224f8a14", "score": "0.5270045", "text": "protected function _gatherData()\n {\n $this->setData('template', $this->getPostValue('template'));\n $this->setData('email', $this->getPostValue('email'));\n $this->setData('storeId', (int)$this->getPostValue('store'));\n $this->setData('customerId', (int)$this->getPostValue('customer_id'));\n $this->setData('productId', (int)$this->getPostValue('product_id'));\n $this->setData('orderId', (int)$this->getPostValue('order_id'));\n\n if (Mage::app()->isSingleStoreMode()) {\n $this->storeId = Mage::app()->getStore(true)->getId();\n }\n }", "title": "" }, { "docid": "42952e23284b404f76085d6580523e6f", "score": "0.52672", "text": "public function editvalidationtemplateAction()\n {\n $prevurl = getenv(\"HTTP_REFERER\");\n $template_obj = new Ep_Message_Template();\n $valTempParams=$this->_request->getParams(); // print_r($valTempParams); exit;\n $template_id = $valTempParams['valtempId'];\n if($valTempParams['valtempId'] != '')\n {\n ////udate teplate table for changes///////\n $template_obj->type=$valTempParams[\"valtemp_type\"] ;\n $template_obj->maintype=$valTempParams[\"valtemp_maintype\"] ;\n $template_obj->title=$valTempParams[\"valtemp_title\"] ;\n $template_obj->content=$valTempParams[\"valtemp_content\"] ;\n $template_obj->active=$valTempParams[\"valtemp_active\"] ;\n\n\n $data = array(\"type\"=>$template_obj->type, \"title\"=>$template_obj->title,\n \"content\"=>$template_obj->content, \"active\"=>$template_obj->active);\n $query = \"identifier= '\".$template_id.\"'\";\n\n $template_obj->updateTemplate($data,$query);\n $this->_redirect($prevurl);\n }\n else if($valTempParams['valtempId'] == '')\n {\n ////Add new teplate to the template tablechanges///////\n $template_obj->type=$valTempParams[\"valtemp_type\"] ;\n $template_obj->maintype='validation' ;\n $template_obj->title=$valTempParams[\"valtemp_title\"] ;\n $template_obj->content=$valTempParams[\"valtemp_content\"];\n $template_obj->active=$valTempParams[\"valtemp_active\"] ;\n $template_obj->insert();\n $this->_redirect($prevurl);\n }\n }", "title": "" }, { "docid": "c42184a591a87152ff3bc574c7b8d434", "score": "0.5265095", "text": "function varUpdateData($queryStr){\n\t\treturn $this->varGenerateDataResult($queryStr);\n\t}", "title": "" }, { "docid": "5c4bbd8fe4493ba6c38df839b6ca6179", "score": "0.5245022", "text": "private function loadTemplateEditArray()\n\t{\n\t\t$tags = $this->loadUsedTemplateTags();\n\t\t$table = $this->buildTranslationTable('template-tags', array_keys($tags), true);\n\t\t$global = Dictionary::getArray($this->module->getIdentifier(), 'global-tags', $this->destLang);\n\t\tforeach ($table as &$entry) {\n\t\t\tif (empty($entry['translation']) && isset($global[$entry['tag']])) {\n\t\t\t\t$entry['placeholder'] = $global[$entry['tag']];\n\t\t\t}\n\t\t\tif (!isset($tags[$entry['tag']]))\n\t\t\t\tcontinue;\n\t\t\t$entry['notes'] = implode('<br>', $tags[$entry['tag']]);\n\t\t}\n\t\treturn $table;\n\t}", "title": "" }, { "docid": "c6386b7a546ae8a7e00cf80e3c4824a5", "score": "0.52403355", "text": "public function run()\n { if (!version_compare($this->from_version, '7.10', '<')) {\n return;\n }\n\n $this->log('Updating Email Templates has_variables field');\n\n $sql = \"SELECT id, subject, body, body_html FROM email_templates\" .\n \" WHERE subject LIKE '%$%' OR body LIKE '%$%' OR body_html LIKE '%$%'\";\n\n $conn = $GLOBALS['db']->getConnection();\n $stmt = $conn->executeQuery($sql);\n $idsToUpdate = [];\n\n while ($row = $stmt->fetch()) {\n $templateData = $row['subject'] . ' ' . $row['body'] . ' ' . $row['body_html'];\n\n if (EmailTemplate::checkStringHasVariables($templateData)) {\n $idsToUpdate[] = $row['id'];\n }\n }\n\n if (count($idsToUpdate) > 0) {\n $sql = 'UPDATE email_templates SET has_variables=1 WHERE id IN (?)';\n $this->executeUpdate($sql, [$idsToUpdate], [\\Sugarcrm\\Sugarcrm\\Dbal\\Connection::PARAM_STR_ARRAY]);\n }\n\n $this->log('Done updating Email Templates has_variables field');\n }", "title": "" }, { "docid": "77699ea047182b3183b9c32393ef0b8f", "score": "0.5233909", "text": "function upgrade_info() {\n global $xtpl;\n \n $xtpl->assign('token', get_form_token('upgrade_info'));\n $xtpl->parse('main.upgrade_info');\n \n $xtpl->assign('title', 'Upgrade');\n $xtpl->parse('main');\n \n $xtpl->out('main');\n}", "title": "" }, { "docid": "5dc1ca6caacaed20049c64dfb535fd55", "score": "0.52329254", "text": "protected function _prepareUpdate(){ }", "title": "" }, { "docid": "cab1cd71e7e1a3566bbb140c94b2f4f7", "score": "0.5223968", "text": "protected function GetTemplate()\n\t{\n\t\treturn 'snapshot.tpl';\n\t}", "title": "" }, { "docid": "d65f5c7461c5375b25e9d7b594efd5b6", "score": "0.5219961", "text": "public function dataTableTemplate()\n {\n $templates = $this->model->select('*');\n\n return \\Datatables::of($templates)\n ->addColumn('checkbox', function($template) {\n return '<input type=\"checkbox\" value=\"'.$template->id.'\"/>';\n })\n ->editColumn('price', function($template) {\n return custom_format_money($template->price);\n })\n ->addColumn('action', function ($template) {\n return '<div class=\"btn-group\" role=\"group\" aria-label=\"...\">\n <a class=\"btn btn-default\" href=\"' .route('admin.template.get.view', $template->id) . '\"><i class=\"glyphicon glyphicon-eye-open\"></i></a>\n <a class=\"btn btn-primary edit\" href=\"' .route('admin.template.get.edit', $template->id) . '\"><i class=\"glyphicon glyphicon-edit\"></i></a>\n <a class=\"delete-data btn btn-danger\" data-src=\"' .route('admin.template.delete', $template->id) . '\"><i class=\"glyphicon glyphicon-remove\"></i></a>\n </div>';\n })\n ->addColumn('status', function($template) {\n return ($template->status == 2)\n ? '<a class=\"status-data btn btn-success\" data-src=\"' .route('admin.template.status', $template->id) . '\">Publish</a>'\n : '<a class=\"status-data btn btn-warning\" data-src=\"' .route('admin.template.status', $template->id) . '\">Pending</a>';\n })\n ->make(true);\n }", "title": "" }, { "docid": "69b8382ea54b30eef3e19f3f7213428c", "score": "0.52132815", "text": "public static function wcap_display_email_template_fields( ) {\n global $wpdb, $woocommerce;\n\n $mode = Wcap_Common::wcap_get_mode();\n\n if( 'edittemplate' == $mode ) {\n $edit_id = $_GET['id'];\n $query = \"SELECT wpet . * FROM `\" . WCAP_EMAIL_TEMPLATE_TABLE . \"` AS wpet WHERE id= %d\";\n $results = $wpdb->get_results( $wpdb->prepare( $query, $edit_id ) );\n }\n if( 'copytemplate' == $mode ) {\n $copy_id = $_GET['id'];\n $query_copy = \"SELECT wpet . * FROM `\" . WCAP_EMAIL_TEMPLATE_TABLE . \"` AS wpet WHERE id= %d\";\n $results_copy = $wpdb->get_results( $wpdb->prepare( $query_copy,$copy_id ) );\n }\n $active_post = ( empty( $_POST['is_active'] ) ) ? '0' : '1';\n ?>\n <?php if ( isset( $_POST['ac_settings_frm'] ) && $_POST['ac_settings_frm'] == 'save' ) { ?>\n <div id=\"message\" class=\"updated fade\">\n <p>\n <strong>\n <?php _e( 'Your settings have been saved.', 'woocommerce-ac' ); ?>\n </strong>\n </p>\n </div>\n <?php } ?>\n <div id=\"content\">\n <form method=\"post\" action=\"admin.php?page=woocommerce_ac_page&action=cart_recovery&section=emailtemplates\" id=\"ac_settings\">\n <input type=\"hidden\" name=\"mode\" value=\"<?php echo $mode; ?>\" />\n <input type=\"hidden\" name=\"id\" value=\"<?php if( isset( $_GET['id'] ) ) echo $_GET['id']; ?>\" />\n <?php\n $button_mode = \"save\";\n $display_message = \"Add Email Template\";\n if ( 'edittemplate' == $mode ) {\n $button_mode = \"update\";\n $display_message = \"Edit Email Template\";\n }\n print'<input type=\"hidden\" name=\"ac_settings_frm\" value=\"'.$button_mode.'\">'; ?>\n <div id=\"poststuff\">\n <div> <!-- <div class=\"postbox\" > -->\n <h3 class=\"hndle\">\n <?php _e( $display_message, 'woocommerce-ac' ); ?>\n </h3>\n <div>\n <table class=\"form-table\" id=\"addedit_template\">\n <tr>\n <th>\n <label for=\"woocommerce_ac_email_send_email_filter\">\n <?php _e( 'Send to selected Segment(s):', 'woocommerce-ac' ); ?>\n </label>\n </th>\n <td >\n <?php\n $frequency_edit = array();\n $wcap_template_filter_types = array( 'All', 'Carts abandoned with one product', 'Carts abandoned with more than one product', 'Registered Users', 'Guest Users' );\n if ( 'edittemplate' == $mode ) {\n $frequency_edit = $results[0]->wc_template_filter ;\n $frequency_edit = explode ( \",\", $frequency_edit );\n }\n if( 'copytemplate' == $mode ) {\n $frequency_edit = $results_copy[0]->wc_template_filter ;\n $frequency_edit = explode ( \",\", $frequency_edit );\n }\n if ( isset( $frequency_edit [0] ) && \"\" == $frequency_edit [0] ) {\n \n $frequency_edit = array( 'All' );\n }\n\n ?>\n <select class = \"wcap_email_filter\" id=\"wcap_email_filter\" name=\"wcap_email_filter[]\"\n multiple=\"multiple\" placeholder=\"Select segment\">\n <?php\n foreach ( $wcap_template_filter_types as $wcap_template_filter_types_key => $wcap_template_filter_types_value ) {\n if ( in_array ( $wcap_template_filter_types_value, $frequency_edit ) ) {\n echo '<option value=\"' . $wcap_template_filter_types_value . '\" selected>' . __( $wcap_template_filter_types_value, 'woocommerce-ac') . '</option>';\n }else{\n echo '<option value=\"' . $wcap_template_filter_types_value . '\">' . __( $wcap_template_filter_types_value, 'woocommerce-ac') . '</option>';\n }\n }\n ?>\n </select>\n <?php\n \n $help_tip_text = '';\n if( version_compare( $woocommerce->version, '3.0.0', \">=\" ) ) {\n $help_tip_text = \"help_tip_filter_3.0\";\n }else{\n $help_tip_text = \"help_tip_filter\";\n }\n ?>\n <img id = <?php echo $help_tip_text; ?> class=\"help_tip\" width=\"16\" height=\"16\" data-tip='<?php _e( 'Send this email template to selected segment(s). For example, you can send different email templates to registered users & different templates to guest users.', 'woocommerce-ac' ) ?>' src=\"<?php echo plugins_url(); ?>/woocommerce/assets/images/help.png\" /></p>\n </td>\n </tr>\n <tr>\n <th>\n <label for=\"wcap_email_product_filter\">\n <?php _e( 'Cart Products:', 'woocommerce-ac' ); ?>\n </label>\n </th>\n <td>\n <?php\n $cart_products = isset( $results[0]->cart_rules ) ? $results[0]->cart_rules : '';\n $include_select = '';\n $exclude_select = '';\n if( $cart_products == 'includes' ) {\n $include_select = 'selected';\n } else if( $cart_products == 'excludes' ) {\n $exclude_select = 'selected';\n }\n ?>\n <select id=\"wcap_email_product_filter\" name=\"wcap_email_product_filter\">\n <option value=\"includes\" <?php echo $include_select; ?>><?php _e( 'Includes any of', 'woocommerce-ac' );?></option>\n <option value=\"excludes\" <?php echo $exclude_select; ?>><?php _e( 'Excludes any of', 'woocommerce-ac' );?></option>\n </select>\n <div id=\"product_options\" class=\"panel\">\n <div class=\"options_group\">\n <p class=\"form-field\" style=\"padding-left:0px !important;\">\n\n <?php\n\n $json_ids = array();\n $product_ids = array();\n $product_id = '';\n if ( 'edittemplate' == $mode ) {\n $product_id = isset( $results[0]->product_ids ) ? $results[0]->product_ids : '';\n }\n if ( 'copytemplate' == $mode ) {\n $product_id = isset( $results_copy[0]->product_ids ) ? $results_copy[0]->product_ids : '';\n }\n \n if ( strlen( $product_id ) > 0 ) {\n if ( 'edittemplate' == $mode ) {\n $product_ids = explode ( \",\", $results[0]->product_ids );\n }\n if ( 'copytemplate' == $mode ) {\n $product_ids = explode ( \",\", $results_copy[0]->product_ids );\n }\n foreach ( $product_ids as $product_id ) {\n if ( $product_id > 0 ) {\n $product = get_the_title( $product_id );\n $json_ids[ $product_id ] = $product ;\n }\n }\n\n } \n if( version_compare( $woocommerce->version, '3.0.0', \">=\" ) ) {\n ?>\n <select id=\"product_ids\" name=\"product_ids[]\" class=\"wc-product-search\" multiple=\"multiple\" style=\"width: 50%;\" data-placeholder=\"<?php esc_attr_e( 'Search for a Product&hellip;', 'woocommerce' ); ?>\" data-action=\"wcap_json_find_products\">\n <?php\n foreach ( $product_ids as $product_id ) {\n if ( $product_id > 0 ) {\n $product = get_the_title( $product_id );\n echo '<option value=\"' . esc_attr( $product_id ) . '\"' . selected( true, true, false ) . '>' . wp_kses_post( $product ) . '</option>';\n }\n }\n ?>\n </select>\n <?php\n } else {\n ?>\n <input type=\"hidden\" id=\"product_ids\" name=\"product_ids[]\" class=\"wc-product-search\" style=\"width: 30%;\" data-placeholder=\"<?php esc_attr_e( 'Search for a Product&hellip;', 'woocommerce' ); ?>\" data-multiple=\"true\" data-action=\"wcap_json_find_products\"\n data-selected=\" <?php echo esc_attr( json_encode( $json_ids ) ); ?> \" value=\"<?php echo implode( ',', array_keys( $json_ids ) ); ?>\"\n />\n <?php\n }\n ?>\n </p>\n\n <img class=\"help_tip\" width=\"16\" height=\"16\" data-tip='<?php _e( 'Rules that should be applied to the email template with regards to the products that might or might not be present in the abandoned cart.', 'woocommerce-ac' ) ?>' src=\"<?php echo plugins_url(); ?>/woocommerce/assets/images/help.png\" />\n </div>\n </div>\n \n </td>\n </tr>\n <tr>\n <th>\n <label for=\"woocommerce_ac_email_send_email_filter\">\n <?php _e( 'Send the Abandoned cart emails to:', 'woocommerce-ac' ); ?>\n </label>\n </th>\n <td>\n <?php\n $frequency_edit = array();\n\n $wcap_email_action = '';\n \n $wcap_email_other_action = '';\n\n $wcap_other_emails_style = 'display:none';\n $wcap_other_emails_list = '';\n \n $wcap_email_to_segment = array(\n 'wcap_email_customer' => 'Customers',\n 'wcap_email_admin' => 'Admin',\n 'wcap_email_customer_admin' => 'Customers & Admin',\n 'wcap_email_others' => 'Others'\n );\n\n if ( 'addnewtemplate' == $mode ){\n $wcap_email_action = 'wcap_email_customer';\n }\n if ( 'edittemplate' == $mode ) {\n $send_emails_to = isset( $results[0]->send_emails_to ) && '' != $results[0]->send_emails_to ? json_decode( str_replace( array( \"\\n\", \"\\r\\n\", \"\\r\" ), '', $results[0]->send_emails_to ), true ) : '';\n $wcap_email_action = isset( $send_emails_to[ 'action' ] ) ? $send_emails_to[ 'action' ] : '';\n\n if ( 'wcap_email_others' == $wcap_email_action ) {\n $wcap_other_emails_style = 'display:block';\n\n $wcap_email_other_action = isset( $send_emails_to[ 'others' ] ) && '' != $send_emails_to[ 'others' ] ? $send_emails_to[ 'others' ] : '';\n \n if ( '' != $wcap_email_other_action ) {\n $wcap_other_emails_list = str_replace( array( \"\\n\", \"\\r\\n\", \"\\r\" ), '', $wcap_email_other_action );\n }\n }\n }\n if ( 'copytemplate' == $mode ) {\n $wcap_template_id = $results_copy[0]->id ;\n $send_emails_to = isset( $results_copy[0]->send_emails_to ) && is_array( $results_copy[0]->send_emails_to ) ? json_decode( $results_copy[0]->send_emails_to, true ) : '';\n \n $wcap_email_action = isset( $send_emails_to[ 'action' ] ) ? $send_emails_to[ 'action' ] : '';\n\n if ( 'wcap_email_others' == $wcap_email_action ) {\n $wcap_other_emails_style = 'display:block';\n\n $wcap_email_other_action = isset( $send_emails_to[ 'others' ] ) && '' != $send_emails_to[ 'others' ] ? $send_emails_to[ 'others' ] : '';\n\n if ( '' != $wcap_email_other_action ) {\n $wcap_other_emails_list = $wcap_email_other_action;\n }\n\n }\n }\n ?>\n <select class = \"wcap_email_action\" id=\"wcap_email_action\" name=\"wcap_email_action[]\" >\n <?php\n foreach ( $wcap_email_to_segment as $wcap_email_to_segment_key => $wcap_email_to_segment_value ) {\n if ( $wcap_email_to_segment_key == $wcap_email_action ) {\n echo '<option value=\"' . $wcap_email_to_segment_key . '\" selected>' . __( $wcap_email_to_segment_value, 'woocommerce-ac') . '</option>';\n }else{\n echo '<option value=\"' . $wcap_email_to_segment_key . '\">' . __( $wcap_email_to_segment_value, 'woocommerce-ac') . '</option>';\n }\n }\n ?>\n </select>\n\n <?php\n \n $help_tip_text = '';\n if( version_compare( $woocommerce->version, '3.0.0', \">=\" ) ) {\n $help_tip_text = \"help_tip_filter_3.0\";\n }else{\n $help_tip_text = \"help_tip_filter\";\n }\n ?>\n <img id = <?php echo $help_tip_text; ?> class=\"help_tip\" width=\"16\" height=\"16\" data-tip='<?php _e( 'Send this email template to selected email address(s).', 'woocommerce-ac' ) ?>' src=\"<?php echo plugins_url(); ?>/woocommerce/assets/images/help.png\" /></p>\n <br>\n <textarea type = 'text' id='wcap_other_emails' cols='70' rows='5' class = 'wcap_other_emails' name = 'wcap_other_emails' style = <?php echo $wcap_other_emails_style; ?> ><?php echo $wcap_other_emails_list; ?></textarea>\n <p class='wcap_other_emails' style=<?php echo $wcap_other_emails_style; ?>><?php esc_html_e( 'Please enter email addresses separated by comma(,)', 'woocommerce-ac' ); ?></p>\n\n </td>\n </tr>\n <tr>\n <th>\n <label for=\"woocommerce_ac_template_name\">\n <?php _e( 'Template Name:', 'woocommerce-ac' );?>\n </label>\n </th>\n <td>\n <?php\n $template_name = \"\";\n if( 'edittemplate' == $mode ) {\n $template_name = $results[0]->template_name;\n }\n if( 'copytemplate' == $mode ) {\n $template_name = \"Copy of \".$results_copy[0]->template_name;\n }\n print'<input type=\"text\" name=\"woocommerce_ac_template_name\" id=\"woocommerce_ac_template_name\" class=\"regular-text\" value=\"' . $template_name . '\">'; ?>\n <img class=\"help_tip\" width=\"16\" height=\"16\" data-tip='<?php _e( 'Enter a template name for reference' , 'woocommerce' ) ?>' src=\"<?php echo plugins_url(); ?>/woocommerce/assets/images/help.png\" />\n </td>\n </tr>\n <tr>\n <th>\n <label for=\"woocommerce_ac_email_frequency\">\n <?php _e( 'Send this email:', 'woocommerce-ac' ); ?>\n </label>\n </th>\n <td>\n <select name=\"email_frequency\" id=\"email_frequency\">\n <?php\n $frequency_edit=\"\";\n if ( 'edittemplate' == $mode ) {\n $frequency_edit=$results[0]->frequency;\n }\n if ( 'copytemplate' == $mode ) {\n $frequency_edit=$results_copy[0]->frequency;\n }\n for ( $i=1;$i<60;$i++ ) {\n printf( \"<option %s value='%s'>%s</option>\\n\",\n selected( $i, $frequency_edit, false ),\n esc_attr( $i ),\n $i\n );\n }\n ?>\n </select>\n <select name=\"day_or_hour\" id=\"day_or_hour\">\n <?php\n $days_or_hours_edit = \"\";\n if ( 'edittemplate' == $mode ) {\n $days_or_hours_edit=$results[0]->day_or_hour;\n }\n if ( 'copytemplate' == $mode ) {\n\n $days_or_hours_edit=$results_copy[0]->day_or_hour;\n }\n $days_or_hours = array(\n 'Minutes' => 'Minute(s)',\n 'Days' => 'Day(s)',\n 'Hours' => 'Hour(s)'\n );\n foreach( $days_or_hours as $k => $v ) {\n printf( \"<option %s value='%s'>%s</option>\\n\",\n selected( $k, $days_or_hours_edit, false ),\n esc_attr( $k ),\n $v\n );\n }\n ?>\n </select>\n <span class=\"description\"><?php\n echo __( 'after cart is abandoned.', 'woocommerce-ac' );\n ?>\n </span>\n </td>\n </tr>\n\n <tr>\n <th>\n <label for=\"woocommerce_ac_email_subject\">\n <?php _e( 'Subject:', 'woocommerce-ac' ); ?>\n </label>\n </th>\n <td>\n\n <?php\n $subject_edit=\"\";\n\n if ( 'edittemplate' == $mode ) {\n $subject_edit=$results[0]->subject;\n }\n\n if ( 'copytemplate' == $mode ) {\n $subject_edit=$results_copy[0]->subject;\n }\n print'<input type=\"text\" name=\"woocommerce_ac_email_subject\" id=\"woocommerce_ac_email_subject\" class=\"regular-text\" value=\"' . $subject_edit . '\">'; ?>\n <img class=\"help_tip\" width=\"16\" height=\"16\" data-tip='<?php _e( 'Enter the subject that should appear in the email sent', 'woocommerce' ) ?>' src=\"<?php echo plugins_url(); ?>/woocommerce/assets/images/help.png\" /></p>\n Add the shortcode {{customer.firstname}} or {{product.name}} to include the Customer First Name and Product name (first in the cart) to the Subject Line.\n For e.g. Hi John!! You left some Protein Bread in your cart.\n </td>\n </tr>\n <tr>\n <th>\n <label for=\"woocommerce_ac_email_body\">\n <?php _e( 'Email Body:', 'woocommerce-ac' ); ?>\n </label>\n </th>\n <td>\n <?php\n $initial_data = \"\";\n if ( 'edittemplate' == $mode ) {\n $initial_data = $results[0]->body;\n }\n if ( 'copytemplate' == $mode ) {\n $initial_data = $results_copy[0]->body;\n }\n $initial_data = str_replace ( \"My document title\", \"\", $initial_data );\n\n wp_editor(\n $initial_data,\n 'woocommerce_ac_email_body',\n array(\n 'media_buttons' => true,\n 'textarea_rows' => 15,\n 'tabindex' => 4,\n 'tinymce' => array(\n 'theme_advanced_buttons1' => 'bold,italic,underline,|,bullist,numlist,blockquote,|,link,unlink,|,spellchecker,fullscreen,|,formatselect,styleselect',\n ),\n )\n );\n ?>\n <span class=\"description\">\n <?php\n echo __( 'Message to be sent in the reminder email.', 'woocommerce-ac' );\n ?>\n <img width=\"16\" height=\"16\" src=\"<?php echo plugins_url(); ?>/woocommerce-abandon-cart-pro/assets/images/information.png\" onClick=\"bkap_show_help_tips()\"/>\n </span>\n <span id=\"help_message\" style=\"display:none\">\n 1. You can add customer & cart information in the template using this icon <img width=\"20\" height=\"20\" src=\"<?php echo plugins_url(); ?>/woocommerce-abandon-cart-pro/assets/images/ac_editor_icon.png\" /> in top left of the editor.<br>\n 2. You can now customize the product information/cart contents table that is added when using the {{products.cart}} merge field.<br>\n 3. Add/Remove columns from the default table by selecting the column and clicking on the Remove Column Icon in the editor.<br>\n 4. Insert/Remove any of the new shortcodes that have been included for the product table.<br>\n 5. Change the look and feel of the table by modifying the table style properties using the Edit Table Icon in the editor. <br>\n 6. Change the background color of the table rows by using the Edit Table Row Icon in the editor. <br>\n\n </span>\n </td>\n </tr>\n <script type=\"text/javascript\">\n function bkap_show_help_tips() {\n if( jQuery( '#help_message' ) . css( 'display' ) == 'none') {\n document.getElementById( \"help_message\" ).style.display = \"block\";\n }\n else {\n document.getElementById( \"help_message\" ) . style.display = \"none\";\n }\n }\n </script>\n <tr>\n <th>\n <label for=\"is_wc_template\">\n <?php _e( 'Use WooCommerce Template Style:', 'woocommerce-ac' ); ?>\n </label>\n </th>\n <td>\n\n <?php\n $is_wc_template=\"\";\n if ( 'edittemplate' == $mode ) {\n $use_wc_template = $results[0]->is_wc_template;\n $is_wc_template = \"\";\n if ( $use_wc_template == '1' ) {\n $is_wc_template = \"checked\";\n }\n }\n\n if ( $mode == 'copytemplate' ) {\n $use_wc_template = $results_copy[0]->generate_unique_coupon_code;\n $is_wc_template = \"\";\n if( '1' == $use_wc_template ) {\n $is_wc_template = \"checked\";\n }\n }\n print'<input type=\"checkbox\" name=\"is_wc_template\" id=\"is_wc_template\" ' . $is_wc_template . '> </input>'; ?>\n <img class=\"help_tip\" width=\"16\" height=\"16\" data-tip='<?php _e( 'Use WooCommerce default style template for abandoned cart reminder emails.', 'woocommerce' ) ?>' src=\"<?php echo plugins_url(); ?>/woocommerce/assets/images/help.png\" /> \n <a href= '#' id ='wcap_wc_preview' class= 'wcap_wc_preview button-primary' data-modal-type='wcap_preview_ajax' data-email-type = 'wcap_wc_preview' > Preview WooCommerce Email </a> &nbsp; &nbsp; \n <a href='#' id='wcap_preview' class = 'wcap_preview button-primary' data-modal-type='wcap_preview_ajax' data-email-type = 'wcap_preview' >Preview Custom Email</a> \n \n </td>\n </tr>\n\n <tr>\n <th>\n <label for=\"wcap_wc_email_header\">\n <?php _e( 'Email Template Header Text: ', 'woocommerce-ac' ); ?>\n </label>\n </th>\n <td>\n <?php\n\n $wcap_wc_email_header = \"\";\n if ( 'edittemplate' == $mode ) {\n $wcap_wc_email_header = $results[0]->wc_email_header;\n }\n if ( 'copytemplate' == $mode ) {\n $wcap_wc_email_header = $results_copy[0]->wc_email_header;\n }\n if ( \"\" == $wcap_wc_email_header ) {\n $wcap_wc_email_header = \"Abandoned cart reminder\";\n }\n print'<input type=\"text\" name=\"wcap_wc_email_header\" id=\"wcap_wc_email_header\" class=\"regular-text\" value=\"' . $wcap_wc_email_header . '\">'; ?>\n <img class=\"help_tip\" width=\"16\" height=\"16\" data-tip='<?php _e( 'Enter the header which will appear in the abandoned WooCommerce email sent. This is only applicable when only used when \"Use WooCommerce Template Style:\" is checked.', 'woocommerce-ac' ) ?>' src=\"<?php echo plugins_url(); ?>/woocommerce/assets/images/help.png\" /></p>\n </td>\n </tr>\n\n <tr>\n <th>\n <label for=\"unique_coupon\"> \n <?php _e( 'Generate unique coupon codes:', 'woocommerce-ac' ); ?>\n </label>\n </th>\n <td>\n <?php\n $is_unique_coupon = \"\";\n if ( 'edittemplate' == $mode ) {\n $unique_coupon = $results[0]->generate_unique_coupon_code;\n $is_unique_coupon = \"\";\n if ( '1' == $unique_coupon ) {\n $is_unique_coupon = \"checked\";\n }\n }\n if ( 'copytemplate' == $mode ) {\n $unique_coupon = $results_copy[0]->generate_unique_coupon_code;\n $is_unique_coupon = \"\";\n if( '1' == $unique_coupon ) {\n $is_unique_coupon = \"checked\";\n }\n }\n print'<input type=\"checkbox\" name=\"unique_coupon\" id=\"unique_coupon\" ' . $is_unique_coupon . '> </input>'; ?>\n <img class=\"help_tip\" width=\"16\" height=\"16\" data-tip='<?php _e( 'Replace this coupon with unique coupon codes for each customer', 'woocommerce' ) ?>' src=\"<?php echo plugins_url(); ?>/woocommerce/assets/images/help.png\" /></p>\n </td>\n </tr>\n\n <!-- Below is the Coupon Code Options chnages -->\n\n <?php \n $show_row = \"display:none;\";\n if ( \"\" !== $is_unique_coupon ) {\n $show_row = \"\";\n }\n ?>\n\n <tr class=\"wcap_discount_options_rows\" style=\"<?php echo $show_row; ?>\">\n <th>\n <label class=\"wcap_discount_options\" for=\"wcap_discount_type\">\n <?php _e( 'Discount Type:', 'woocommerce-ac' ); ?>\n </label>\n </th>\n <td>\n <?php\n\n $discount_type = isset( $results[0]->discount_type ) ? $results[0]->discount_type : '';\n $precent = '';\n $fixed = '';\n\n if ( 'copytemplate' == $mode ) {\n $discount_type = $results_copy[0]->discount_type;\n }\n\n if ( $discount_type == 'percent' ) {\n $precent = 'selected';\n } else if ( $discount_type == 'fixed' ) {\n $fixed = 'selected';\n }\n ?>\n <select id=\"wcap_discount_type\" name=\"wcap_discount_type\">\n <option value=\"percent\" <?php echo $precent; ?>><?php _e( 'Percentage discount', 'woocommerce-ac' );?></option>\n <option value=\"fixed\" <?php echo $fixed; ?>><?php _e( 'Fixed cart discount', 'woocommerce-ac' );?></option>\n </select> \n </td>\n </tr>\n\n <tr class=\"wcap_discount_options_rows\" style=\"<?php echo $show_row; ?>\">\n <th>\n <label class=\"wcap_discount_options\" for=\"wcap_coupon_amount\">\n <?php _e( 'Coupon amount:', 'woocommerce-ac' );?>\n </label>\n </th>\n <td>\n <?php\n $discount = 0;\n if ( 'edittemplate' == $mode ) {\n $discount = $results[0]->discount;\n }\n\n if ( 'copytemplate' == $mode ) {\n $discount = $results_copy[0]->discount;\n }\n\n print'<input type=\"text\" style=\"width:8%;\" name=\"wcap_coupon_amount\" id=\"wcap_coupon_amount\" class=\"short\" value=\"' . $discount . '\">'; ?>\n <img class=\"help_tip\" width=\"16\" height=\"16\" data-tip='<?php _e( 'Value of the coupon.' , 'woocommerce' ) ?>' src=\"<?php echo plugins_url(); ?>/woocommerce/assets/images/help.png\" />\n </td>\n </tr>\n\n <tr class=\"wcap_discount_options_rows\" style=\"<?php echo $show_row; ?>\">\n <th>\n <label class=\"wcap_discount_options\" for=\"wcap_allow_free_shipping\">\n <?php _e( 'Allow free shipping:', 'woocommerce-ac' ); ?>\n </label>\n </th>\n <td>\n\n <?php\n $discount_shipping_check = \"\";\n $discount_shipping = '';\n if ( 'edittemplate' == $mode ) {\n $discount_shipping = $results[0]->discount_shipping;\n }\n\n if ( 'copytemplate' == $mode ) {\n $discount_shipping = $results_copy[0]->discount_shipping;\n }\n\n if ( \"yes\" === $discount_shipping ) {\n $discount_shipping_check = \"checked\";\n }\n \n print'<input type=\"checkbox\" name=\"wcap_allow_free_shipping\" id=\"wcap_allow_free_shipping\" ' . $discount_shipping_check . '> </input>'; ?>\n <img class=\"help_tip\" width=\"16\" height=\"16\" data-tip='<?php _e( 'Check this box if the coupon grants free shipping. A free shipping method must be enabled in your shipping zone and be set to require \"a valid free shipping coupon\" (see the \"Free Shipping Requires\" setting).', 'woocommerce-ac' ) ?>' src=\"<?php echo plugins_url(); ?>/woocommerce/assets/images/help.png\" />\n \n </td>\n </tr>\n\n <tr class=\"wcap_discount_options_rows\" style=\"<?php echo $show_row; ?>\">\n <th>\n <label class=\"wcap_discount_options\" for=\"wcac_coupon_expiry\">\n <?php _e( 'Coupon validity:', 'woocommerce-ac' ); ?>\n </label>\n </th>\n <td>\n <?php\n $wcac_coupon_expiry = \"7-days\";\n $expiry_days_or_hours = array( 'hours' => 'Hour(s)', 'days' => 'Day(s)' );\n if ( 'edittemplate' == $mode ) {\n $wcac_coupon_expiry = $results[0]->discount_expiry;\n }\n if ( 'copytemplate' == $mode ) {\n $wcac_coupon_expiry = $results_copy[0]->discount_expiry;\n }\n\n $wcac_coupon_expiry_explode = explode( \"-\", $wcac_coupon_expiry );\n $expiry_number = isset( $wcac_coupon_expiry_explode[0] ) ? $wcac_coupon_expiry_explode[0] : 0;\n $expiry_freq = isset( $wcac_coupon_expiry_explode[1] ) ? $wcac_coupon_expiry_explode[1] : 'hours';\n\n print'<input type=\"text\" style=\"width:8%;\" name=\"wcac_coupon_expiry\" id=\"wcac_coupon_expiry\" value=\"' . $expiry_number . '\"> </input>'; ?>\n\n <select name=\"expiry_day_or_hour\" id=\"expiry_day_or_hour\">\n <?php\n foreach( $expiry_days_or_hours as $k => $v ) {\n printf( \"<option %s value='%s'>%s</option>\\n\",\n selected( $k, $expiry_freq, false ),\n esc_attr( $k ),\n $v\n );\n }\n ?>\n </select>\n\n <img class=\"help_tip\" width=\"16\" height=\"16\" data-tip='<?php _e( 'The coupon code which will be sent in the reminder emails will be expired based the validity set here. E.g if the coupon code sent in the reminder email should be expired after 7 days then set 7 Day(s) for this option.', 'woocommerce-ac' ) ?>' src=\"<?php echo plugins_url(); ?>/woocommerce/assets/images/help.png\" />\n </td>\n </tr>\n\n <!-- The Coupon Code Options chnages ends here -->\n <tr><th></th><td><b>OR</b></td></tr>\n <tr>\n <th>\n <label for=\"woocommerce_ac_coupon_auto_complete\">\n <?php _e( 'Enter a coupon code to add into email:', 'woocommerce-ac' ); ?>\n </label>\n </th>\n <td>\n <!-- code started for woocommerce auto-complete coupons field emoved from class : woocommerce_options_panelfor WC 2.5 -->\n <div id=\"coupon_options\" class=\"panel\">\n <div class=\"options_group\">\n <p class=\"form-field\" style=\"padding-left:0px !important;\">\n\n <?php\n\n $json_ids = array();\n $coupon_ids = array();\n $coupon_code_id = '';\n if ( 'edittemplate' == $mode ) {\n $coupon_code_id = $results[0]->coupon_code;\n }\n if ( 'copytemplate' == $mode ) {\n $coupon_code_id = $results_copy[0]->coupon_code;\n }\n if ( $coupon_code_id > 0 ) {\n if ( 'edittemplate' == $mode ) {\n $coupon_ids = explode ( \",\", $results[0]->coupon_code );\n }\n if ( 'copytemplate' == $mode ) {\n $coupon_ids = explode ( \",\", $results_copy[0]->coupon_code );\n }\n foreach ( $coupon_ids as $product_id ) {\n if ( $product_id > 0 ) {\n $product = get_the_title( $product_id );\n $json_ids[ $product_id ] = $product ;\n }\n }\n\n }\n if( version_compare( $woocommerce->version, '3.0.0', \">=\" ) ) {\n ?>\n <select id=\"coupon_ids\" name=\"coupon_ids[]\" class=\"wc-product-search\" multiple=\"multiple\" style=\"width: 50%;\" data-placeholder=\"<?php esc_attr_e( 'Search for a Coupon&hellip;', 'woocommerce' ); ?>\" data-action=\"wcap_json_find_coupons\">\n <?php\n foreach ( $coupon_ids as $product_id ) {\n if ( $product_id > 0 ) {\n $product = get_the_title( $product_id );\n echo '<option value=\"' . esc_attr( $product_id ) . '\"' . selected( true, true, false ) . '>' . wp_kses_post( $product ) . '</option>';\n }\n }\n ?>\n </select>\n <?php\n } else {\n ?>\n <input type=\"hidden\" id=\"coupon_ids\" name=\"coupon_ids[]\" class=\"wc-product-search\" style=\"width: 30%;\" data-placeholder=\"<?php esc_attr_e( 'Search for a Coupon&hellip;', 'woocommerce' ); ?>\" data-multiple=\"true\" data-action=\"wcap_json_find_coupons\"\n data-selected=\" <?php echo esc_attr( json_encode( $json_ids ) ); ?> \" value=\"<?php echo implode( ',', array_keys( $json_ids ) ); ?>\"\n />\n <?php\n }\n ?>\n <img class=\"help_tip\" width=\"16\" height=\"16\" data-tip='<?php _e( 'Search & select one coupon code that customers should use to get a discount. Generated coupon code which will be sent in email reminder will have the settings of coupon selected in this option.', 'woocommerce-ac' ) ?>' src=\"<?php echo plugins_url(); ?>/woocommerce/assets/images/help.png\" />\n </p>\n </div>\n </div>\n <!-- code ended for woocommerce auto-complete coupons field -->\n </td>\n </tr> <!-- add new check box -->\n\n <tr>\n <th>\n <label for=\"woocommerce_ac_email_preview\">\n <?php _e( 'Send a test email to:', 'woocommerce-ac' ); ?>\n </label>\n </th>\n <td>\n <input type=\"text\" id=\"send_test_email\" name=\"send_test_email\" class=\"regular-text\" >\n <input type=\"button\" value=\"Send a test email\" id=\"preview_email\" class=\"button\" onclick=\"javascript:void(0);\">\n <img class=\"help_tip\" width=\"16\" height=\"16\" data-tip='<?php _e( 'Enter the email id to which the test email needs to be sent.', 'woocommerce' ) ?>' src=\"<?php echo plugins_url(); ?>/woocommerce/assets/images/help.png\" />\n <br>\n <img class=\"ajax_img\" src=\"<?php echo WCAP_PLUGIN_URL . '/assets/images/ajax-loader.gif';?>\" style=\"display:none;\" />\n <div id=\"preview_email_sent_msg\" style=\"display:none;\"></div>\n </td>\n </tr>\n </table>\n </div>\n </div>\n </div>\n <p class=\"submit\">\n <?php\n $button_value = \"Save Changes\";\n if ( 'edittemplate' == $mode ) {\n $button_value = \"Update Changes\";\n }\n ?>\n <input type=\"submit\" name=\"Submit\" class=\"button-primary\" value=\"<?php esc_attr_e( $button_value, 'woocommerce-ac' ); ?>\" />\n </p>\n </form>\n </div>\n <?php\n\n wc_get_template( \n 'preview_modal.php', \n '', \n 'woocommerce-abandon-cart-pro/',\n WCAP_PLUGIN_PATH . '/includes/template/preview_modal/' );\n }", "title": "" }, { "docid": "18321b5d4f5629cd43fb15251bd31006", "score": "0.5212886", "text": "private function generateUpdatePage(Page $page)\n {\n global $lang;\n\n $columns = $page->fields;\n $page->sortFields();\n\n //If updates info at DB then generates input page\n $code = \"\\t\\$index = isset(\\$_POST[\\\"crudgen_index\\\"]) ? \\$_POST[\\\"crudgen_index\\\"] : 0;\"\n . \"\\n\\t\\t\\$operation = isset(\\$_REQUEST[\\\"crudgen_operation\\\"]) ? \"\n . \"\\$_REQUEST[\\\"crudgen_operation\\\"] : 'edit';\"\n . \"\\n\\n\\t\\tif(isset(\\$_REQUEST[\\\"selected\\\"]))\"\n . \"\\n\\t\\t\\tif(empty(\\$_REQUEST[\\\"selected\\\"][\\$index])){\"\n . \"\\n\\t\\t\\t\\t\\$operation = 'none';\"\n . \"\\n\\n\\t\\t\\t} else {\"\n . \"\\n\\t\\t\\t\\t\\$_SESSION[\\\"selected\\\"] = \\$_REQUEST[\\\"selected\\\"];\"\n . \"\\n\\t\\t\\t}\\n\"\n . \"\\n\\n\\t\\tif(empty(\\$_SESSION[\\\"selected\\\"])){\"\n . \"\\n\\t\\t\\t\\$_SESSION['error'] = \\\"{$this->app->lang['strnoselecteditem']}\\\";\"\n . \"\\n\\t\\t\\t\\$operation = 'none';\"\n . \"\\n\\t\\t}\"\n . \"\\n\\n\\t\\tif(\\$operation == \\\"update\\\"){\"\n . \"\\n\\t\\t\\t\\$success= updateRow(\\$_SESSION[\\\"selected\\\"][\\$index]);\\n\"\n . \"\\n\\t\\t\\tif(\\$success) {\"\n . \"\\n\\t\\t\\t\\t\\$_SESSION['msg'] = \\\"{$this->app->lang['strupdatesuccess']}\\\";\"\n . \"\\n\\t\\t\\t\\t\\$index++;\";\n\n foreach ($columns as $column)\n if ($column->isOnPage())\n $code .=\"\\n\\t\\t\\t\\tunset(\\$_POST[\\\"{$column->getName()}\\\"]);\";\n\n $code .= \"\\n\\t\\t\\t} else {\"\n . \"\\n\\t\\t\\t\\t\\$operation = \\\"edit\\\";\"\n . \"\\n\\t\\t\\t\\t\\$_SESSION['error'] = \\\"{$this->app->lang['strpageerredit']}\\\";\"\n . \"\\n\\t\\t\\t}\"\n . \"\\n\\t\\t\\tif(\\$index == count(\\$_SESSION[\\\"selected\\\"])){\"\n . \"\\n\\t\\t\\t\\t\\$operation = 'none';\"\n . \"\\n\\t\\t\\t\\tunset(\\$_SESSION[\\\"selected\\\"]);\"\n . \"\\n\\t\\t\\t} else {\"\n . \"\\n\\t\\t\\t\\t\\$operation = \\\"edit\\\";\"\n . \"\\n\\t\\t\\t}\"\n . \"\\n\\n\\t\\t}\"\n . \"\\n\\n\\t\\tif(\\$operation == \\\"edit\\\"){\";\n \n $tables = 0;\n $joins = array();\n $selects = array();\n $update_columns = array();\n\n foreach ($columns as $column) {\n if ($column->isOnPage()) {\n\n $selects[] = \"a.\" . $column->getName();\n $update_columns[] = \"'{$column->getName()}'\";\n\n if ($column->isFK()) {\n $selects[] = \"a{$tables}.\" . $column->getRemoteField();\n $fk_pk = CodeGenerator::getPK($this->app->getDBName(), $column->getRemoteTable());\n $joins[] = \"\\n\\t\\t\\t\\tINNER JOIN {$column->getRemoteTable()} a{$tables} \"\n . \" ON a.{$column->getName()}=a{$tables}.{$fk_pk} \";\n $tables++;\n }\n }\n }\n $sql = \"SELECT \" . implode(\", \", array_values($selects) ) . \"\\n\\t\\t\\t\\t\\t\"\n . \"FROM {$this->app->getSchema()}.{$page->getTable()} a \" . implode(\" \", $joins)\n . \" WHERE a.\" . self::getPK($this->app->getDBName(), $page->getTable());\n \n $code .= $this->codeGen->getLoadRecord($sql);\n\n $code .= \"\\n\\t\\t\\tif(!\\$row ) {\"\n . \"\\n\\t\\t\\t\\t\\$_SESSION['error'] = \\\"{$this->app->lang['strrecordnoexist']}\\\";\"\n . \"\\n\\t\\t\\t\\t\\$operation = 'none';\"\n . \"\\n\\t\\t\\t} else {\";\n\n foreach ($columns as $column) {\n if ($column->isOnPage()) {\n $code .=\"\\n\\t\\t\\t\\t\\$_POST[\\\"{$column->getName()}\\\"] = \"\n . \"isset( \\$_POST[\\\"{$column->getName()}\\\"] ) ? \"\n . \"\\$_POST[\\\"{$column->getName()}\\\"] : \\$row[\\\"{$column->getName()}\\\"] ;\";\n }\n }\n $code .= \"\\n\\t\\t\\t\\techo \\\"\". GenHtml::hidden('crudgen_operation', 'update') . \"\\\";\"\n . \"\\n\\t\\t\\t\\techo \\\"\". GenHtml::hidden('crudgen_index', \"\\\". \\$index . \\\"\")\n . \"\\n\\t\\t\\t\\t\\t<div class=\\\\\\\"form-wrapper\\\\\\\">\";\n\n //Prints the input box for each field\n $clear_vars = \"\";\n $values = array();\n $fields = $page->fields;\n $i = 0;\n\n foreach ($columns as $column) {\n if ($column->isOnPage()) {\n $input_id = \"column-{$i}\";\n $clear_vars .=\"\\n\\t\\tif(!isset(\\$_POST[\\\"{$column->getName()}\\\"]))\"\n . \"\\n\\t\\t\\t\\$_POST[\\\"{$column->getName()}\\\"] = '';\\n\";\n\n $code .= \"\\n\\t\\t\\t\\t\\t\\t<div class=\\\\\\\"row\\\\\\\">\"\n . \"\\n\\t\\t\\t\\t\\t\\t\\t<div class=\\\\\\\"label-wrapper\\\\\\\">\"\n . \"\\n\\t\\t\\t\\t\\t\\t\\t\\t<label for=\\\\\\\"{$input_id}\\\\\\\">{$column->getDisplayName()}</label>\"\n . \"\\n\\t\\t\\t\\t\\t\\t\\t</div>\"\n . \"\\n\\t\\t\\t\\t\\t\\t\\t<div class=\\\\\\\"value-wrapper\\\\\\\">\";\n\n if ($column->isFK()) {\n $code .= \"\\n\\t\\t\\t\\t\\t\\t\\t<select name=\\\\\\\"{$column->getName()}\\\\\\\" \"\n . \"class=\\\\\\\"\"\n . $this->getValidationClasses($page->getTable(), $column->getName())\n . \"\\\\\\\">\"\n . \"\\n\\t\\t\\t\\t\\t\\t\\t\"\n . \"<option value=\\\\\\\"\\\\\\\">{$this->app->lang['strselectval']}</option>\\\";\"\n . \"printFKOptions('{$this->app->getSchema()}','{$column->getRemoteTable()}','\"\n . self::getPK($this->app->getDBName(), $column->getRemoteTable())\n . \"','{$column->getRemoteField()}', \\$_POST['{$column->getName()}']); \"\n . \"echo \\\"\\n\\t\\t\\t\\t\\t\\t\\t</select>\";\n } else {\n $classes = $this->getValidationClasses($page->getTable(), $column->getName());\n $code .= \"\\n\\t\\t\\t\\t\\t\\t\\t\"\n . \"<input type=\\\\\\\"text\\\\\\\" name=\\\\\\\"{$column->getName()}\\\\\\\" \"\n . \" id=\\\\\\\"{$input_id}\\\\\\\" class=\\\\\\\"{$classes}\\\\\\\" \"\n . \"value=\\\\\\\"{\\$_POST[\\\"{$column->getName()}\\\"]}\\\\\\\"/>\";\n }\n\n $code .= \"\\n\\t\\t\\t\\t\\t\\t\\t</div>\"\n . \"\\n\\t\\t\\t\\t\\t\\t</div>\";\n $values[] = \"clearVars(\\$_POST[\\\"{$column->getName()}\\\"])\";\n $i++;\n }\n }\n $code .= \"\\n\\t\\t\\t\\t\\t</div>\\\";\"\n . \"\\n\\t\\t\\t}\"\n . \"\\n\\t\\t}\"\n . \"\\n\\n\\t\\tif(\\$operation == \\\"none\\\"){\"\n . \"\\n\\t\\t\\techo \\\"<div class=\\\\\\\"form-wrapper\\\\\\\">\"\n . \"\\n\\t\\t\\t\\t<p>{$this->app->lang['strwriteprimarykey']}</p>\"\n . \"\\n\\t\\t\\t\\t<div class=\\\\\\\"label-wrapper\\\\\\\">\"\n . \"\\n\\t\\t\\t\\t\\t<label for=\\\\\\\"selected\\\\\\\">{$lang['strprimarykey']}</label>\"\n . \"\\n\\t\\t\\t\\t</div>\"\n . \"\\n\\t\\t\\t\\t<div class=\\\\\\\"value-wrapper\\\\\\\">\"\n . \"\\n\\t\\t\\t\\t\\t<input type=\\\\\\\"text\\\\\\\" id=\\\\\\\"selected\\\\\\\" \"\n . \"name=\\\\\\\"selected[]\\\\\\\" value=\\\\\\\"\\\\\\\"/>\"\n . \"\\n\\t\\t\\t\\t</div>\"\n . \"\\n\\t\\t\\t</div>\\\";\"\n . \"\\n\\t\\t}\";\n\n //Generates code for functions\n $sql = \"sprintf(\\\"UPDATE {$this->app->getSchema()}.{$page->getTable()} \"\n . \"SET \\\" . \" . \"implode(',',\\$sql_set) . \\\" \"\n . \"WHERE \" . self::getPK($this->app->getDBName(), $page->getTable())\n . \" = '%s'\\\",\\$id)\";\n\n $update_code = $this->codeGen->getUpdateCode($sql, $update_columns);\n\n $form_action_code = \"\\t\\techo \\\"{$page->getFilename()}\\\";\";\n $buttons_code = \"\\t\\techo \\\"\" . self::getCreateUpdateBtns($page) . \"\\\";\";\n $clear_code = \"\\t\\treturn (\\$val == '' || \\$val == NULL) ? \\\"NULL\\\" : \\\"'{\\$val}'\\\";\";\n\n //Creates the code function\n $function_code = $this->getFunction(\"printFormAction\", \"\", $form_action_code)\n . $this->getFunction(\"clearVars\", '$val', $clear_code)\n . $this->getFunction(\"updateRow\", \"\\$id\", $update_code)\n . $this->getFunction(\"printActionButtons\", \"\", $buttons_code);\n\n $args = array(\"\\$schema,\\$table\", \"\\$pk\", \"\\$field\", \"\\$selected_pk\");\n\n $function_code .= $this->getFunction(\"printFKOptions\", $args, $this->codeGen->printFkOptions())\n . $this->getOperationCode(null, $code);\n\n return $this->generatePageFile($page, $function_code);\n }", "title": "" }, { "docid": "87663902cd44cc149c50958f67444317", "score": "0.52048033", "text": "public function getInputForUpdate() {\n\n $input = json_decode( file_get_contents('php://input'), true );\n\n if ( \n empty( $input ) \n || ! isset( $input[ 'name' ], $input[ 'property' ], $input[ 'value' ] ) \n || $input[ 'property' ] == 'name'\n ) {\n wp_send_json_error( __( 'Request parameters missing', 'as-custom-forms' ) );\n }\n\n switch( $input[ 'property' ] ) {\n\n\n case 'field_type':\n\n $input[ 'value' ] = str_replace( 'date', 'date-field', sanitize_text_field( $input[ 'value' ] ) );\n\n break;\n \n\n case 'required':\n\n $input[ 'value' ] = ( !!$input[ 'value' ] ) ? 1 : 0;\n\n break;\n\n case 'options':\n\n $options = [];\n \n if ( is_array( $input[ 'value' ] ) ) {\n\n foreach( $input[ 'value' ] as $i => $option ) {\n\n if ( isset( $option[ 'label' ], $option[ 'value' ] ) ) {\n\n if ( array_key_exists( $option[ 'label' ], $options ) ) {\n $option[ 'label' ] = $option[ 'label' ] . ' ' . $i;\n }\n\n $options[ $option[ 'label' ] ] = $option[ 'value' ]; \n\n }\n \n }\n\n }\n\n $input[ 'value' ] = $options;\n \n break;\n\n default:\n\n $input[ 'value' ] = sanitize_text_field( $input[ 'value' ] );\n\n }\n\n\n return $input;\n\n }", "title": "" }, { "docid": "9ea382487a48d25ac4610ebe020bc8d5", "score": "0.5200905", "text": "public function updatetemplatesAction()\r\n {\r\n $form = new EmailTemplateForm();\r\n \r\n // gets the form method request (usually post)\r\n $request = $this->getRequest();\r\n \r\n // check to see if the request was a POST form request\r\n if ($request->isPost()) {\r\n // good to go\r\n // filter the form values now\r\n $email = new EmailTemplates();\r\n \r\n $form->setInputFilter($email->getInputFilter());\r\n \r\n // set the form data to hold all the values supplied by the form\r\n // via $request->getPost()\r\n $form->setData($request->getPost());\r\n \r\n // now we will see if the form is valid\r\n // we check if it is valid by the email form class we created\r\n if ($form->isValid()) {\r\n // it is valid\r\n // pass the form to data to the filter class via exchangeArray()\r\n $email->exchangeArray($form->getData());\r\n \r\n $tpl_id = !empty($this->params('id'))\r\n ? $this->params('id') : null;\r\n \r\n if ($this->getEmailTemplatesService()->modifyEmailTemplate($email, $tpl_id) === true) {\r\n // the updated email template was inserted into the database successfully\r\n // redirect to email template view\r\n return $this->redirect()->toUrl('/admin/email-templates');\r\n } else {\r\n // error occured..\r\n // the error is logged automatically\r\n // redirect to email template view\r\n return $this->redirect()->toUrl('/admin/email-templates/' . $tpl_id);\r\n }\r\n } \r\n } \r\n }", "title": "" }, { "docid": "1c602c1fc688d257c533390af50884c9", "score": "0.5196117", "text": "public function render( $data = null )\r\n\t{\r\n\t\t$data\t=\tarray();\r\n\t\t\r\n\t\tswitch ( $this->task ) {\r\n\t\t\t// --------------------------------\r\n\t\t\t// Fix a certain template file\r\n\t\t\tcase 'fixfile' :\r\n\t\t\t\t\r\n\t\t\t\t$install\t=\tdunmodule( 'jwhmcs.install' );\r\n\t\t\t\t$input\t\t=\tdunloader( 'input', true );\r\n\t\t\t\t\r\n\t\t\t\t$file\t=\t$input->getVar( 'file' );\r\n\t\t\t\t$result\t=\t$install->fixFile( $file );\r\n\t\t\t\t\r\n\t\t\t\t$data\t=\tarray(\r\n\t\t\t\t\t\t'state'\t=> ( $result ? 1 : 0 ),\r\n\t\t\t\t\t\t'span'\t=> t( 'jwhmcs.syscheck.general.yesno.' . ( $result ? 'yes' : 'no' ) ),\r\n\t\t\t\t);\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t// --------------------------------\r\n\t\t\t// Download update\r\n\t\t\tcase 'updateinstall' :\r\n\t\t\t\t$updates\t=\tdunloader( 'updates', 'jwhmcs' );\r\n\t\t\t\t$result\t\t=\t$updates->extract();\r\n\t\t\t\t$version\t=\t$updates->getVersion();\r\n\t\t\t\t\r\n\t\t\t\t$install = dunmodule( 'jwhmcs.install' );\r\n\t\t\t\t$install->upgrade();\r\n\t\t\t\t\r\n\t\t\t\t$data\t=\tarray(\r\n\t\t\t\t\t\t'state'\t\t=> 1,\r\n\t\t\t\t\t\t'title' \t=> t( 'jwhmcs.updates.complete.title' ),\r\n\t\t\t\t\t\t'subtitle'\t=> sprintf( t( 'jwhmcs.updates.complete.subtitle' ), $version ),\r\n\t\t\t\t);\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\t// --------------------------------\r\n\t\t\t// Download update\r\n\t\t\tcase 'updatedownload' :\r\n\t\t\t\t$updates\t=\tdunloader( 'updates', 'jwhmcs' );\r\n\t\t\t\t$result\t\t=\t$updates->download();\r\n\t\t\t\t$state\t\t=\t( $result ? 'download' : 'error' );\r\n\t\t\t\t$error\t\t=\t( $result ? $updates->getError() : null );\r\n\t\t\t\t\r\n\t\t\t\t$data\t=\tarray(\r\n\t\t\t\t\t\t'state'\t\t=> ( $result ? 1 : 0 ),\r\n\t\t\t\t\t\t'title' \t=> t( 'jwhmcs.updates.' . $state . '.title' ),\r\n\t\t\t\t\t\t'subtitle'\t=> sprintf( t( 'jwhmcs.updates.' . $state . '.subtitle' ), $error ),\r\n\t\t\t\t);\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\t// --------------------------------\r\n\t\t\t// Initialize update\r\n\t\t\tcase 'updateinit' :\r\n\t\t\t\t$updates\t=\tdunloader( 'updates', 'jwhmcs' );\r\n\t\t\t\t\r\n\t\t\t\t$data\t=\tarray(\r\n\t\t\t\t\t\t'title' \t=> t( 'jwhmcs.updates.init.title' ),\r\n\t\t\t\t\t\t'subtitle'\t=> sprintf( t( 'jwhmcs.updates.init.subtitle' ), $updates->getVersion() ),\r\n\t\t\t\t);\r\n\t\t\t\tbreak;\r\n\t\t\t// --------------------------------\r\n\t\t\t// Update checker\r\n\t\t\tcase 'checkforupdates' :\r\n\t\t\t\t$updates\t=\tdunloader( 'updates', 'jwhmcs', array( 'force' => true ) );\r\n\t\t\t\t$insert\t\t=\tnull;\r\n\t\t\t\t\r\n\t\t\t\tswitch( $updates->exist() ) {\r\n\t\t\t\t\tcase true:\r\n\t\t\t\t\t\t$var\t=\t'exist';\r\n\t\t\t\t\t\t$state\t=\t1;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase false:\r\n\t\t\t\t\t\t$var\t=\t'none';\r\n\t\t\t\t\t\t$state\t=\t0;\r\n\t\t\t\t\t\t$insert\t=\t$updates->getVersion();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'error' :\r\n\t\t\t\t\t\t$var\t=\t'error';\r\n\t\t\t\t\t\t$state\t=\t-1;\r\n\t\t\t\t\t\t$insert\t=\t$updates->getError();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$data\t=\tarray(\r\n\t\t\t\t\t\t'state'\t\t=> $state, \r\n\t\t\t\t\t\t'title' \t=> t( 'jwhmcs.updates.' . $var . '.title' ),\r\n\t\t\t\t\t\t'subtitle'\t=> sprintf( t( 'jwhmcs.updates.' . $var . '.subtitle' ), $insert ),\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\t// --------------------------------\r\n\t\t\t// Product addons handler\r\n\t\t\tcase 'getproductaddons' :\r\n\t\t\t\t$db\t\t=\tdunloader( 'database', true );\r\n\t\t\t\t$relid\t=\tdunloader( 'input', true )->getVar( 'relid' );\r\n\t\t\t\t\r\n\t\t\t\t// Start with no addon response\r\n\t\t\t\t$data[]\t=\tarray( 'id' => 0, 'name' => t( 'jwhmcs.admin.form.prodaddon.option.none' ) );\r\n\t\t\t\t\r\n\t\t\t\t// First go through all addons and find addons that are selected for the requested relid\r\n\t\t\t\t$db->setQuery( \"SELECT * FROM `tbladdons`\" );\r\n\t\t\t\t$result\t=\t$db->loadObjectList();\r\n\t\t\t\t\r\n\t\t\t\tforeach ( $result as $row ) {\r\n\t\t\t\t\t$pids\t=\texplode( ',', $row->packages );\r\n\t\t\t\t\tif (! in_array( $relid, $pids ) ) continue;\r\n\t\t\t\t\t$data[]\t=\tarray( 'id' => $row->id, 'name' => $row->name );\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Now find the support addon for licensing products\r\n\t\t\t\t$db->setQuery( \"SELECT p.configoption7 FROM `tblproducts` p WHERE p.id = \" . $db->Quote( $relid ) . \" AND p.servertype = 'licensing'\" );\r\n\t\t\t\t\r\n\t\t\t\tif ( ( $result = $db->loadObjectList() ) != null ) {\r\n\t\t\t\t\t$parts\t\t\t=\texplode( \"|\", $result );\r\n\t\t\t\t\t$id\t\t\t\t=\tarray_shift( $parts );\r\n\t\t\t\t\t$add_to_array\t=\ttrue;\r\n\t\t\t\t\t\r\n\t\t\t\t\tforeach ( $data as $line ) {\r\n\t\t\t\t\t\tif ( $line['id'] == $id ) {\r\n\t\t\t\t\t\t\t$add_to_array\t=\tfalse;\r\n\t\t\t\t\t\t\tbreak;\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\tif ( $add_to_array ) {\r\n\t\t\t\t\t\t$data[]\t=\tarray( 'id' => $id, 'name' => implode( \"|\", $parts ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'ping' :\r\n\t\t\t\t$data\t= array( 'data' => 'pong' );\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\treturn json_encode( $data );\r\n\t}", "title": "" }, { "docid": "e34d7ba0d3de6c6e3299d1f8da7f1dd6", "score": "0.51957566", "text": "protected function update() {\n\t\t$this->ts_modified = time();\n\t\treturn parent::update();\n\t}", "title": "" }, { "docid": "3450ad320c53a17a9dbdb06534ae0623", "score": "0.51931727", "text": "public function update() {\n $response = $this->originalUpdate();\n\n $this->saveFields();\n\n // do something after save\n return $response;\n }", "title": "" }, { "docid": "4c3eba036c2a653bc4271bcac24085db", "score": "0.51920193", "text": "public function getModifiedData()\n\t{\n\t\treturn $this->result->getModifiedData($this->id);\n\t}", "title": "" }, { "docid": "e8b991f2eeb59647e36d6b248ff894d2", "score": "0.5189114", "text": "public function updateAction()\n {\n // use the template from the Flexform if there is one\n if (!empty($this->templateFile)) {\n $this->view->setTemplatePathAndFilename($this->templateFile);\n }\n\n // retrieve the {keyField : linkValue} from Fluid\n $parameter = 'linkValue';\n if (!$this->request->hasArgument($parameter)) {\n DebugUtility::debug(\n 'updateAction: Parameter ' .\n $parameter .\n ' ontbreekt in Fluid aanroep.'\n );\n exit(1);\n }\n $linkValue = $this->request->getArgument($parameter);\n\n // retrieve the new values for this row\n $argList = $this->request->getArguments();\n\n // retrieve the row to see what columns have changed\n $statement =\n \"select \" .\n $this->fieldlist .\n \" from \" .\n $this->targetTable .\n \" whEre \" .\n $this->keyField .\n \"='\" .\n $linkValue .\n \"'\";\n $sqlService = new SqlService($statement);\n\n $rows = $sqlService->getRows();\n if (sizeof($rows) != 1) {\n DebugUtility::debug(\n $parameter . ' value ' . $linkValue . ' is NIET uniek.'\n );\n exit(1);\n }\n\n $flexformInfoService = new FlexformInfoService();\n $columnNames = $flexformInfoService->mergeFieldTypes();\n\n foreach ($rows[0] as $key => $value) {\n $oldValues[$key] = $value;\n }\n\n // build an update statement where only changed column values are updated\n $newValues = $this->request->getArguments();\n $updateList = array();\n\n foreach ($columnNames as $columnName) {\n $columnName = $columnName['name'];\n\n // skip column if it is the keyField since we need it unchanged in the where clause\n if (!strcmp($columnName, $this->keyField)) {\n continue;\n }\n\n // add to update statement if value has changed.\n switch ($columnNames[$columnName]['type']) {\n default:\n if (\n strcmp($oldValues[$columnName], $newValues[$columnName])\n ) {\n $updateList[$columnName] = $sqlService->convert(\n $columnName,\n $columnNames[$columnName]['type'],\n $newValues[$columnName]\n );\n }\n break;\n\n // file is different because it is an array ($_FILES)\n case 'file':\n // first case: newValues shows error 4: no file was uploaded. so nothing has changed\n if ($newValues[$columnName]['error'] == 4) {\n continue;\n }\n\n // second case: there was a problem uploading a file\n if ($newValues[$columnName]['error']) {\n DebugUtility::debug(\n $oldValues[$columnName],\n 'oldValue type file in updateAction'\n );\n DebugUtility::debug(\n $newValues[$columnName],\n 'newValue type file in updateAction'\n );\n exit(1);\n }\n\n // third case: a file was uploaded so we overwrite the previous content including a new filename\n $updateList[$columnName] = $sqlService->convert(\n $columnName,\n $columnNames[$columnName]['type'],\n $newValues[$columnName]\n );\n break;\n }\n }\n\n // update changed column values\n if (!empty($updateList)) {\n $statement = \"update \" . $this->targetTable . \" set\";\n foreach ($updateList as $key => $value) {\n $statement .= \" \" . $key . \"='\" . $value . \"',\";\n }\n\n // default values\n $TSparserObject = GeneralUtility::makeInstance(\n \\TYPO3\\CMS\\Core\\TypoScript\\Parser\\TypoScriptParser::class\n );\n $TSparserObject->parse($this->ffdata['defaultvalues']);\n $defaultvalues = $TSparserObject->setup;\n\n if (!empty($defaultvalues)) {\n foreach ($defaultvalues as $key => $value) {\n if (!strncmp($value, 'php', 3)) {\n $output = $this->evalPHP(\n substr($value, 3, strlen($value) - 3)\n );\n $statement .= \" \" . $key . \"='\" . $output . \"',\";\n }\n }\n }\n\n // remove last comma\n $statement = rtrim($statement, ',');\n $statement .= \" wHeRe \" . $this->keyField . \"='\" . $linkValue . \"'\";\n // DebugUtility::debug($statement,'statement for updateAction');exit(1);\n\n // execute the query\n $sqlService = new SqlService($statement);\n $rowsAffected = $sqlService->updateRow();\n }\n\n // perhaps a file was uploaded\n $this->uploadFile($_FILES);\n\n // redirect to redirectPage\n $pageUid = $this->ffdata['redirectPage'];\n\n $uriBuilder = $this->uriBuilder;\n $uri = $uriBuilder->setTargetPageUid($pageUid)->build();\n $this->redirectToURI($uri);\n }", "title": "" }, { "docid": "c54cc75e40b7943430ea2436aa87b8b7", "score": "0.5186886", "text": "public function sbmt_upd_format_edit()\n\t{\n\t\t// passwords need special treatment\n\t\t//if (isset($_POST['option']['password'])) { $_POST['option']['password'] = sha1($_POST['option']['password']); }\n\n\t\t// maybe have requireds?\n\t\t$clean['pl_options'] = serialize($_POST['option']);\n\t\t\n\t\t// update things\n\t\t$this->db->updateArray(PX.'plugins', $clean, \"pl_id = '\" . $this->go['id'] . \"'\");\n\t\t\n\t\t// need to leave an update notification\n\t\t$this->template->action_update = 'updated';\n\t}", "title": "" }, { "docid": "eb3311bdb6dfc5bd1374534f6fcadc08", "score": "0.5186451", "text": "public function get_updateResults() {\n\t\treturn $this->updateResults;\n\t}", "title": "" }, { "docid": "59bc5cc22163571fe3e2a9af56c36d50", "score": "0.51770085", "text": "public function getupdatePublication()\n {\n return view('publication.updatePublicationInput')\n ->with(array('title'=>'Update Publication','message'=>'Update Publication'));\n }", "title": "" }, { "docid": "6492779ad4059a7e47cabbdc57256727", "score": "0.51736003", "text": "protected function getTemplateVariables()\n\t\t{\n\t\t\t$variables = parent::getTemplateVariables();\n\n\t\t\t$variables[\"contactForm\"] = Form::load(Form::CONTACT_ID);\n\n\t\t\treturn $variables;\n\t\t}", "title": "" }, { "docid": "1f37aaee36616419544b58088e20492b", "score": "0.51597536", "text": "public function update()\n {\n // update cart\n $this->cart->update();\n return $this->renderView('/apotek/obat/form_cart', $data);\n }", "title": "" }, { "docid": "f705780e5c37c4b37d033661015cd2ec", "score": "0.5156136", "text": "public function update(Request $request, $id)\r\r\n {\r\r\n $this->validate($request,[\r\r\n 'template_title' => 'required'\r\r\n ]);\r\r\n\r\r\n EmailTemplates::find($id)->update(\r\r\n array(\r\r\n 'template_title'=>$request->input('template_title'),\r\r\n 'template_content'=>$request->input('template_content'),\r\r\n 'updated_at'=>date(\"Y-m-d h:i:s\")\r\r\n )\r\r\n );\r\r\n\r\r\n return redirect()->route('admin.email_templates.index')\r\r\n ->with('success','Template updated successfully');\r\r\n }", "title": "" }, { "docid": "1c512c14788f45cb49391971f13c6141", "score": "0.5142205", "text": "public function getTemplateVars();", "title": "" }, { "docid": "85bf3cf26adda55301c6be49e548f386", "score": "0.51364547", "text": "public function update() { }", "title": "" }, { "docid": "4e7e3a72d1d1955c69bf187c31edef2d", "score": "0.5134575", "text": "public function testUpdate()\n {\n $article = factory(Article::class)->create();\n\n $template = factory(Article::class)->make();\n $this->service->update($article, $template->attributesToArray());\n $this->assertDatabaseHas($template->getTable(), $template->attributesToArray());\n }", "title": "" }, { "docid": "2c1bbe27ab0a74b109f1add465ee98c2", "score": "0.513051", "text": "public function getPreparedTemplateText()\n {\n return $this->getTemplateText();\n }", "title": "" }, { "docid": "e5adeff31203aed54decae2762f9f0ab", "score": "0.51286", "text": "public function getTemplate();", "title": "" }, { "docid": "e5adeff31203aed54decae2762f9f0ab", "score": "0.51286", "text": "public function getTemplate();", "title": "" }, { "docid": "2df78742750964e24f1fe2f323fec0c6", "score": "0.51259035", "text": "public function getUpdate($key) {\n $schema = $this->getSchema($key);\n\n $view = $schema->hasView() ? $schema->getView() : 'oxygen/mod-preferences::update';\n\n return view($view, [\n 'schema' => $schema,\n 'title' => __('oxygen/mod-preferences::ui.update.title', ['name' => $schema->getTitle()]) . ' ' . __('oxygen/mod-preferences::ui.home.title')\n ]);\n }", "title": "" }, { "docid": "d38c2f707d6a5886e4e33195ba1fdcef", "score": "0.51250154", "text": "public function update( EntityInterface $entity = null, Array $data = array() )\n\t{\n\t\t$this->receiver->setData( $data );\n\t\t$this->template->attach( $this->receiver );\n\n\t\techo $this->template->display();\n\t}", "title": "" }, { "docid": "4f3d0ec08145b80037324a7a9a4895ac", "score": "0.5121399", "text": "public function UpdateID()\n {\n return $this->data['update_id'];\n }", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "0ecb033e2f68f9b6080e689518232adb", "score": "0.0", "text": "public function run()\n {\n for ($i=1; $i<=20; $i++) { \n \n $faker = Faker\\Factory::create();\n\n //array das classifications ID\n $classificationsID = DB::table('classifications')\n ->select('id')\n ->get();\n\n //array das providers ID\n $providersID = DB::table('providers')\n ->select('id')\n ->get();\n \n DB::table ('products')->insert([\n 'descricao' => $faker->text(30),\n 'qtd' => $faker->randomNumber(),\n 'prc_venda' => $faker->randomFloat(2, 100, 200),\n 'prc_compra' => $faker->randomFloat(2, 100, 200),\n \n 'providers_id' => $faker->randomElement($providersID)->id, // randomização dos ids\n 'classifications_id' => $faker->randomElement($classificationsID)->id, // randomização dos ids\n\n 'created_at' => \\Carbon\\Carbon::now()\n ]); \n }\n }", "title": "" } ]
[ { "docid": "5a2cd3aba17d761d018ca18fe576b099", "score": "0.8065376", "text": "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding book category\n */\n DB::table('book_category')->insert([\n ['name' => 'Novel'],\n ['name' => 'Non-Fiction'],\n ['name' => 'Fiction'],\n ['name' => 'Comic'],\n ['name' => 'Biography'],\n ['name' => 'Kids'],\n ]);\n /**\n * Make Admin Account\n */\n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('admin')\n ]);\n }", "title": "" }, { "docid": "11f457d79f8912cc87ec2d4e53032d61", "score": "0.7992732", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // user type\n $names = ['Admin', 'Member', 'Seller'];\n foreach($names as $n){\n DB::table('user_types')->insert([\n 'id' => Str::random(5),\n 'name' => $n\n ]);\n }\n\n // Category\n $categories = ['Electronic', 'Furniture', 'Cosmetics','Clothes','Sport'];\n // 1 2 3 4 5\n $i = 1;\n foreach($categories as $cat){\n DB::table('categories')->insert([\n 'id' => $i,\n 'name' => $cat\n ]); \n $i++;\n }\n\n\n // city\n $cities = ['Phnom Penh', 'Siem Reap', 'Kampong Thom','Kampong Cham','Kampot'];\n foreach($cities as $city){\n DB::table('cities')->insert([\n 'id' => Str::random(5),\n 'name' => $city\n ]); \n }\n }", "title": "" }, { "docid": "543a8d6019d0da6404b53619bcfcf539", "score": "0.79456615", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n //App\\Category::truncate();\n //App\\Todo::truncate();\n App\\User::query()->delete();\n\n $faker = \\Faker\\Factory::create();\n\n $password = Hash::make('toptal');\n $user = App\\User::create([\n 'name' => 'Administrator',\n 'email' => '[email protected]',\n 'password' => $password,\n ]); \n\n \n for ($i = 1; $i <= 3; $i++) {\n $cat = App\\Category::create([\n 'category' => 'Cat_'.$i,\n 'user_id' => $user->id\n ]);\n // And now, let's create a few todos in our database:\n for ($a = 1; $a <= 3; $a++) {\n $due = ($a * 10) - $i;\n $duestring = ($due < 10) ? '2018-08-0'.$due : '2018-08-'.$due;\n App\\Todo::create([\n 'todo' => $faker->sentence,\n 'category_id' => $cat->id,\n 'user_id' => $user->id,\n 'due' => $duestring\n ]);\n }\n }\n }", "title": "" }, { "docid": "e0c3d828ba1bff35183042b29039c593", "score": "0.79318094", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n $movies = [\n ['title' => 'Zielona mila', 'alt' => 'Zielona mila poster', 'director_id' => 1],\n ['title' => 'Skazani na Shawshank', 'alt' => 'Skazani na Shawshank poster', 'director_id' => 1],\n ['title' => 'Forrest Gump', 'alt' => 'Forrest Gump poster', 'director_id' => 2],\n ['title' => 'Leon Zawodowiec', 'alt' => 'Leon Zawodowiec poster', 'director_id' => 3],\n ['title' => 'Matrix', 'alt' => 'Matrix poster', 'director_id' => 4]\n ];\n\n $directors = [\n ['name' => 'Frank Darabont'],\n ['name' => 'Robert Zemeckis'],\n ['name' => 'Luc Besson'],\n ['name' => 'Lilly Wachowski']\n ];\n\n DB::table('directors')->insert($directors);\n\n DB::table('movies')->insert($movies);\n }", "title": "" }, { "docid": "15d92bee78a2cd733cb39a2ac034c784", "score": "0.79141736", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $user = new User();\n\t\t$user->name = 'Admin';\n\t\t$user->email = '[email protected]';\n\t\t$user->password = Hash::make( '1234' );\n\t\t$user->is_admin = true;\n $user->save();\n\n for ( $i = 1; $i <= 7; $i ++ ) {\n\n $users = new User();\n $users->name = 'user'.$i;\n $users->email = '$user'.$i.'@local.com';\n $users->password = Hash::make( '1234' );\n $users->is_admin = false;\n $users->save();\n \n }\n \n $faker = Faker\\Factory::create();\n\n for ( $i = 1; $i <= 7; $i ++ ) {\n\n $prod = new Product();\n $prod->prodname = 'Product'.$i;\n $prod->description = str_random(20);\n $prod->price = $faker->randomDigit;\n $prod->cateid = rand(1, 3);\n $prod->picture = $faker->imageUrl($width = 200, $height = 200);\n $prod->save();\n \n }\n\n for ( $i = 1; $i <= 3; $i ++ ) {\n \n $cate = new Category();\n $cate->catename = 'Cate'.$i;\n $cate->save();\n \n }\n\n }", "title": "" }, { "docid": "b600ed0e4e2d7dc9e74a5a10fb23bc64", "score": "0.79065317", "text": "public function run()\n {\n \\DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n \\App\\Models\\Article::truncate();\n \\App\\Models\\Article::unguard();\n \\DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n\n $faker = \\Faker\\Factory::create();\n\n \\App\\Models\\User::all()->each(function ($user) use ($faker) {\n foreach (range(1, 5) as $i) {\n \\App\\Models\\Article::create([\n 'user_id' => $user->id,\n 'title' => $faker->sentence,\n 'content' => $faker->paragraphs(3, true),\n ]);\n }\n });\n }", "title": "" }, { "docid": "7aedb5fc5c60c181268cae1cf284de8f", "score": "0.79059935", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n \t'id' => '1',\n 'name' => 'Administrator',\n 'password' => Hash::make('admin'),\n 'email' => '[email protected]',\n 'admin' => '1',\n 'aktif' => 'y'\n \t]);\n\n DB::table('menu')->insert([\n \t'id' => '1',\n \t'name' => 'Sayur'\n \t]);\n\n DB::table('menu')->insert([\n \t'id' => '2',\n \t'name' => 'Plastik'\n \t]);\n\n DB::table('menu')->insert([\n \t'id' => '3',\n \t'name' => 'Buah'\n \t]);\n\n DB::table('kategori')->insert([\n \t'id' => '1',\n \t'nama' => 'Kubis',\n \t'satuan' => 'Kg',\n \t'kat' => 'Sayur',\n \t'qty' => '1',\n \t'tipe_a' => '15.000',\n 'tipe_b' => '16.000',\n 'tipe_c' => '17.000'\n \t]);\n }", "title": "" }, { "docid": "a662dc08480b90008afb88c03521a6d6", "score": "0.79023117", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('roles')->insert([\n 'name' => 'Administrador',\n ],\n [\n 'name' => 'Profesor' ,\n ]);\n\n DB::table('categories')->insert([\n 'name' => 'Nombrado',\n 'hours' => 35,\n ],\n [\n 'name' => 'No nombrado',\n 'hours' => 20,\n ]);\n\n DB::table('faculties')->insert([\n 'name' => 'Sistemas e informática',\n ]);\n\n DB::table('users')->insert([\n 'name' => 'Administrador',\n 'email' => '[email protected]',\n 'role_id' => 1,\n 'password' => bcrypt('12345678')\n ]);\n\n DB::table('schools')->insert([\n 'name' => 'Ingenieria de sistemas',\n 'faculty_id' => 1,\n ],\n [\n 'name' => 'Ingenieria de software',\n 'faculty_id' => 1\n ]);\n }", "title": "" }, { "docid": "e6499609f9cf3766274c709b6c8f42a6", "score": "0.78937787", "text": "public function run()\n {\n factory(\\App\\Models\\Tag::class, 50)->create();\n factory(\\App\\Models\\Category::class, 10)->create();\n factory(\\App\\Models\\User::class)->create(['role_id' => 1, 'email' => '[email protected]']);\n factory(\\App\\Models\\User::class, 10)->create();\n// $this->call([\n// UsersTableSeeder::class,\n// TagsCategoriesSeeder::class,\n// ]);\n }", "title": "" }, { "docid": "8e4192e71767c2fd3d0d320b2ee1d9da", "score": "0.78887534", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n $items = [];\n for ($i = 0; $i < config('seed.thematicsCount'); $i++) {\n $items[] = [\n 'name' => 'thematic ' . $faker->word,\n 'status' => rand(0, 1),\n 'user_id' => rand(1, config('seed.usersCount')),\n 'created_at' => \\Illuminate\\Support\\Carbon::now()->toDateTimeString(),\n 'updated_at' => \\Illuminate\\Support\\Carbon::now()->toDateTimeString(),\n ];\n }\n DB::table('thematics')->insert($items);\n }", "title": "" }, { "docid": "6806e0ae39a39e44f8d5c7a7bc531473", "score": "0.78880966", "text": "public function run()\n {\n // Volver migraciones atras y rellenar tablas\n // php artisan migrate:refresh --seed\n \n // Rellenar poco a poco\n // php artisan db:seed\n \n //$this->call(UsersTableSeeder::class);\n $this->call([\n UsersTableSeeder::class,\n WorksTableSeeder::class,\n SkillsTableSeeder::class,\n MiniSkillsTableSeeder::class,\n ArticlesTableSeeder::class,\n ContactsTableSeeder::class,\n ]);\n \n \n factory(User::class, 1000)->create();\n factory(Skill::class, 30)->create();\n factory(MiniSkill::class, 30)->create();\n factory(Work::class, 15)->create();\n factory(Article::class, 30)->create();\n }", "title": "" }, { "docid": "80d98ce7df32bc368406cbd8149fe780", "score": "0.78794247", "text": "public function run()\n {\n $faker = Faker::create();\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n AudioFile::truncate();\n Project::truncate();\n Track::truncate();\n User::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n factory(Project::class, 10)->create();\n\n $projects = Project::all()->pluck('id')->toArray();\n foreach(range(1,50) as $index){\n $track = Track::create([\n 'name' => $faker->catchPhrase,\n 'slug' => $faker->slug,\n 'user_id' => factory(App\\User::class)->create()->id,\n 'project_id' => $faker->randomElement($projects),\n ]);\n\n $hash = $faker->md5;\n\n $file = AudioFile::create([\n 'filename' => $faker->randomDigit . '_' . $hash . '.mp3',\n 'hash' => $hash,\n 'track_id' => $track->id,\n ]);\n }\n // $this->call(UserTableSeeder::class);\n\n }", "title": "" }, { "docid": "d54ffbd639a44d52588ca943525e66b9", "score": "0.7878056", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n \n foreach (range(1, 10) as $index) {\n DB::table('products')->insert([\n 'sku' => $faker->unique()->md5,\n 'Name' => $faker->word,\n 'price' => $faker->numberBetween($min = 1, $max = 1000),\n 'description' => $faker->text,\n 'Category' => $faker->word,\n 'UnitsInStock' => $faker->numberBetween($min = 1, $max = 50),\n ]);\n }\n }", "title": "" }, { "docid": "a83416f4b4e97e515ca58d755fe3dacf", "score": "0.78747964", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n DB::table('category_product')->truncate();\n factory(User::class,200)->create();\n factory(Category::class,50)->create();\n factory(Product::class,200)->create()->each(function ($producto){\n // obtiene las categorias y selecciona el id de 5,\n $categories=Category::all()->random(mt_rand(1,5))->pluck('id');\n // categories del modelo\n $producto->categories()->attach($categories);\n });\n factory(Transaction::class,100)->create();\n }", "title": "" }, { "docid": "8f92cdb4a527f7ab60d4f39736095d4e", "score": "0.7874296", "text": "public function run()\n {\n // Disable foreign key checks!\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n /*\n * Category Seed\n * ------------------\n */\n // DB::table('categories')->truncate();\n factory(Category::class, 5)->create();\n\n /*\n * Tags Seed\n * ------------------\n */\n // DB::table('post_tag')->truncate();\n // DB::table('tags')->truncate();\n factory(Tag::class, 10)->create();\n $tags = Tag::all();\n\n /*\n * Posts Seed\n * ------------------\n */\n // DB::table('posts')->truncate();\n\n // Populate the pivot table\n factory(Post::class, 25)->create()->each(function ($post) use ($tags) {\n $post->tags()->attach(\n $tags->random(rand(1, 3))->pluck('id')->toArray()\n );\n });\n\n // Artisan::call('auth:permission', [\n // 'name' => 'posts',\n // ]);\n // Artisan::call('auth:permission', [\n // 'name' => 'categories',\n // ]);\n // Artisan::call('auth:permission', [\n // 'name' => 'tags',\n // ]);\n\n // Enable foreign key checks!\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "1055ad608b2a3d954d872c571d31b65e", "score": "0.786034", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n DB::table('users')-> insert([\n 'name' => 'Mulkis',\n 'email' => '[email protected]',\n 'password' => Hash::make('uoj'),\n ]);\n\n $faker = Faker::create();\n $authors = 10;\n $publishers = 10;\n $books = 100;\n \n foreach (range(1, $authors) as $_) {\n DB::table('authors')-> insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n 'portrait' => $faker->imageUrl(180, 340),\n ]);\n }\n foreach (range(1, $publishers) as $_) {\n DB::table('publishers')-> insert([\n 'title' => $faker->company(),\n ]);\n }\n foreach (range(1, $books) as $_) {\n DB::table('books')-> insert([\n 'title' => str_replace(['.', \"'\", '\"', '`', '(', ')'], '',$faker->realText(rand(10, 64))),\n 'isbn' => $faker->isbn10(),\n 'pages' => rand(12, 1499),\n 'about' => $faker->realText(300, 4),\n 'author_id' => rand(1, $authors),\n 'publisher_id' => rand(1, $publishers),\n ]);\n }\n }", "title": "" }, { "docid": "caac1c1fa998259212e976ca6479e7e9", "score": "0.7859339", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('statuses')->insert([\n \t['name' => 'Новый'],\n \t['name' => 'Ожидает оплаты'],\n \t['name' => 'Оплачен']\n ]);\n DB::table('products')->insert([\n \t['name' => 'Книга', 'price' => 100],\n \t['name' => 'Стол', 'price' => 150],\n \t['name' => 'Ручка', 'price' => 10],\n \t['name' => 'Карандаш', 'price' => 15],\n \t['name' => 'Линейка', 'price' => 25],\n \t['name' => 'Тетрадь', 'price' => 30]\n ]);\n }", "title": "" }, { "docid": "187405472e72053a0e5f31b6c0f357bf", "score": "0.7858601", "text": "public function run()\n {\n $this->call([\n //CountriesSeeder::class,\n //StatesSeeder::class,\n //CitiesSeeder::class,\n ActivitiesSeeder::class,\n ApisSeeder::class,\n RolesSeeder::class,\n UsersSeeder::class,\n CategoriesSeeder::class,\n ProductsSeeder::class, \n ]);\n \n \n // Product::factory()->count(20)->create();\n // Category::factory()->count(5)->create();\n \n // $categories = Category::all();\n \n // Product::all()->each(function($product) use ($categories) {\n // $product->categories()->attach(\n // $categories->random(2)->pluck('id')->toArray()\n // );\n // });\n \n }", "title": "" }, { "docid": "a73c57e191e7317e44fec250f1761bfd", "score": "0.78535104", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(Category::class,10)->create();\n factory(Product::class,200)->create();\n factory(Review::class,500)->create();\n }", "title": "" }, { "docid": "9219ade5602125c3663c190c51c52a34", "score": "0.78439575", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n Role::create(['name' => 'Admin']);\n Role::create(['name' => 'Manager']);\n Role::create(['name' => 'Editor']);\n\n $user = User::create([\n 'role_id' => 1,\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('password')\n ]);\n $user = User::create([\n 'role_id' => 2,\n 'name' => 'Manager',\n 'email' => '[email protected]',\n 'password' => bcrypt('password')\n ]);\n $user = User::create([\n 'role_id' => 3,\n 'name' => 'Editor',\n 'email' => '[email protected]',\n 'password' => bcrypt('password')\n ]);\n\n for($i=1; $i<=10; $i++){\n Post::create([\n 'user_id' => rand(1,3),\n 'title'=> str_random(10),\n 'post_text' => str_random(200)\n ]);\n }\n\n // $user->roles()->attach(1, ['approved' => 1]);\n // $user->roles()->attach(2);\n\n // foreach($user->approvedRoles as $role){\n // //info($role->name . '(time: ' . $role->pivot->created_at . ', approved: '. $role->pivot->approved . ')');\n // info($role->name);\n // }\n\n factory(Author::class, 50)->create();\n factory(Book::class, 100)->create();\n }", "title": "" }, { "docid": "b3ff8caf8eab3866fb6b144f366dbcb0", "score": "0.7841588", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n \n // for($i=0;$i<100;$i++){\n // DB::table('news')->insert([\n // 'name' => Str::random(10),\n // 'title' => Str::random(10),\n // 'photo' => Str::random(10),\n // 'content'=>'This is paragraph' \n // ]);\n // }\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('Admin123'),\n 'isAdmin' => '1',\n 'isPremium' => '1'\n ]);\n }", "title": "" }, { "docid": "ff1b418e1d7040c23abe580ce94a5a3d", "score": "0.78405744", "text": "public function run()\n {\n $this->call(SettingsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n\n Product::factory(50)->create();\n Cart::factory(15)->create();\n CartItem::factory(13)->create();\n Order::factory(15)->create();\n OrderItem::factory(15)->create();\n\n }", "title": "" }, { "docid": "29eca3fbda4bb9727a856b9f84828e78", "score": "0.7839851", "text": "public function run()\n {\n //seed api_user table\n factory(App\\ApiUser::class, 1)->create();\n\n //seed tag table\n factory(App\\Tag::class, 10)->create();\n\n //seed user table\n factory(App\\User::class, 10)->create()->each(function ($user) {\n //seed question table\n $questionCount = rand(10, 50);\n factory(App\\Question::class, $questionCount)->create(['user_id'=>$user->id])->each(function ($question) use ($user){\n //seed answer table\n $answerCount = rand(0, 10);\n factory(App\\Answer::class, $answerCount)->create(['question_id' => $question->id, 'user_id' => $user->id]);\n });\n });\n\n //seed question_tag pivot table\n $tags = App\\Tag::all();\n App\\Question::all()->each(function ($question) use ($tags) {\n $question->tags()->attach(\n $tags->random(rand(1, 5))->pluck('id')->toArray()\n );\n });\n }", "title": "" }, { "docid": "b2efef38eb3df86e0d3d9f1cd22c5c87", "score": "0.7836786", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 3)->create();\n Topic::create(['name'=>'References','slug'=>'references']);\n Topic::create(['name'=>'Tutorial','slug'=>'tutorial']);\n Topic::create(['name'=>'Usefull Links','slug'=>'links']);\n\n factory(Post::class, 20)->create();\n }", "title": "" }, { "docid": "2f81096f97f8a259aea26be9d695e84e", "score": "0.78322875", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(RolesTableSeeder::class);\n factory(App\\Tag::class, 30)->create();\n factory(App\\Category::class, 10)->create();\n factory(App\\Post::class, 50)->create();\n factory(App\\subscriber::class, 50)->create();\n factory(App\\PostTag::class, 200)->create();\n factory(App\\PostCategory::class, 50)->create();\n factory(App\\ParentCategory::class, 10)->create();\n factory(App\\ChildCategory::class, 10)->create();\n \n }", "title": "" }, { "docid": "353a1d9192ac2ee05dd43ba589fef572", "score": "0.7830354", "text": "public function run()\n {\n $this->call([RolesTableSeeder::class,DishTypesTableSeeder::class,IngredientSampleTableSeeder::class]);\n \n factory(App\\User::class, 5)->create()\n ->each(function($item){\n $item->mealBook()->saveMany(factory(App\\MealBook::class,rand(1,10))->make());\n $item->cookingRecipe()->saveMany(factory(App\\CookingRecipe::class,rand(1,10))->make());\n $item->post()->saveMany(factory(App\\Post::Class,rand(1,10))->make());\n $item->comment()->saveMany(factory(App\\Comment::class,rand(1,20))->make());\n $item->point()->saveMany(factory(App\\Point::class,rand(1,20))->make());\n });\n }", "title": "" }, { "docid": "6cf1729d133b80f0ba4205112d73b5b7", "score": "0.78286344", "text": "public function run()\n\t{\n\t\tModel::unguard();\n\n\t\t/*Survey::create([\n\t\t\t'title'=>'Encuesta de salida',\n\t\t\t'description'=>'Esta encuesta será aplicada a todos los pacientes'\n\t\t]);*/\n\n\t\t$faker = \\Faker\\Factory::create();\n\t\tforeach(range(1,5) as $index) {\n\t\t\tSurvey::create([\n\t\t\t\t'title'=>$faker->sentence(10),\n\t\t\t\t'description'=>$faker->sentence(40)\n\t\t\t]);\n\t\t}\n\n\t}", "title": "" }, { "docid": "58deeaabeebb62de3e978537814ab4e3", "score": "0.7827373", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Restaurant::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 50; $i++) {\n Restaurant::create([\n 'google_places_id' => $faker->sha256,\n 'yelp_id' => $faker->sha256,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "322840873bcbb30c449f9f96a377723e", "score": "0.7821602", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Role::truncate();\n User::truncate();\n Profile::truncate();\n\n $this->call(RoleSeeder::class);\n\n $roles = ['admin', 'author', 'editor', 'employee'];\n //for Admin\n $admin = factory(User::class)->create([\n 'first_name' => 'Admin',\n 'last_name' => '',\n 'email' => '[email protected]',\n ]);\n $admin->assignRoles($roles);\n\n $admin->profile()->create([\n 'dob' => '1994-09-25',\n 'gender' => 1,\n 'address' => 'Mirpur 1, Dhaka Bangladesh',\n ]);\n\n $users = factory(User::class, 50)->create();\n\n $users->each(function ($user) use ($roles) {\n factory(Profile::class)->create(['user_id'=> $user->id]);\n $user->roles()->sync(mt_rand(2,4));\n });\n }", "title": "" }, { "docid": "02e74cf1e122f3a2c37d634a29cdfc31", "score": "0.78150123", "text": "public function run()\n {\n Category::factory(10)->create();\n $tags = Tag::factory(20)->create();\n $posts = Post::factory(100)->create();\n\n foreach ($posts as $post)\n {\n $tagsIds = $tags->random(5)->pluck('id');\n $post->tags()->attach($tagsIds);\n }\n\n Role::insert([\n ['name' => 'user'],\n ['name' => 'manager'],\n ['name' => 'admin'],\n ]);\n\n User::create([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'role' => '3',\n 'password' => Hash::make('11223344'),\n ]);\n }", "title": "" }, { "docid": "6960da9ec4442edcbfd113533d6ef120", "score": "0.781237", "text": "public function run()\n {\n $this->call([CategorySeeder::class]);\n \\App\\Models\\User::factory([\n 'email' => '[email protected]',\n ])->create();\n \\App\\Models\\User::factory(2)->create();\n \\App\\Models\\Topic::factory(40)->create();\n \\App\\Models\\Answer::factory(150)->create();\n }", "title": "" }, { "docid": "f864816e80b0e7603a1e8ae5700c57a6", "score": "0.7807138", "text": "public function run()\n {\n// $this->call(UsersTableSeeder::class);\n factory(App\\Country::class, 5)->create();\n factory(App\\Member::class, 10)->create();\n\n foreach ($this->items() as $item) {\n Category::create($item);\n }\n\n factory(App\\Category_movie::class, 10)->create();\n// factory(App\\Movie::class, 10)->create();\n factory(App\\Rank::class, 10)->create();\n\n }", "title": "" }, { "docid": "5157c9e6f7445f30d17910d0f9167d7e", "score": "0.7806952", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // $faker = Faker;\n // factory(App\\User::class, 50)->create()->each(function ($user) {\n // factory(App\\Tema::class, 150)->create()->each(function($tema, Faker $faker){\n // $tema->user_id = $user->id;\n // $tema->nombre = $faker->title();\n // $tema->descripcion = $faker->paragraph(100);\n\n // $tema->save();\n\n // });\n // });\n\n\n factory(App\\User::class, 50)->create();\n factory(App\\Tema::class, 6)->create();\n factory(App\\Pregunta::class, 200)->create();\n factory(App\\Respuesta::class, 500)->create();\n\n }", "title": "" }, { "docid": "c888a724a89893fc16eaf9b1e5cf4dee", "score": "0.7804738", "text": "public function run()\n {\n User::truncate();\n Project::truncate();\n\n // $this->call(UsersTableSeeder::class);\n factory(User::class, 50)->create();\n factory(Project::class, 50)->create();\n }", "title": "" }, { "docid": "74e6046c336e626f913a122d01772dbf", "score": "0.7803743", "text": "public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Harry Selkirk',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n ]);\n \n factory(App\\User::class, 15)->create()->each(function($u) {\n $u->posts()\n ->saveMany(factory(App\\Post::class, rand(1,10))->make())\n ->each(function($post){\n $post->tags()->saveMany(factory(App\\PostTag::class, rand(0, 5))->make());\n $post->comments()->saveMany(factory(App\\Comment::class, rand(3, 15))->make());\n });\n });\n // $this->call(UsersTableSeeder::class);\n // $this->call(PostsTableSeeder::class);\n }", "title": "" }, { "docid": "3773026723bc4e3d2f6d992aad9feeb4", "score": "0.77933013", "text": "public function run()\n {\n Book::create([\n 'id' => 1,\n 'name' => 'Rat i mir',\n 'author_id' => 1\n ]);\n\n Book::create([\n 'id' => 2,\n 'name' => 'Na Drini cuprija',\n 'author_id' => 1\n ]);\n\n Book::create([\n 'id' => 3,\n 'name' => 'Poezija',\n 'author_id' => 2\n ]);\n Book::create([\n 'id' => 4,\n 'name' => 'Bleja na brdu',\n 'author_id' => 2\n ]);\n\n Book::create([\n 'id' => 5,\n 'name' => 'Put do kuce',\n 'author_id' => 2\n ]);\n }", "title": "" }, { "docid": "8645d58ad69c417ec234c3b092223da5", "score": "0.7784692", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'Nokib',\n 'email' => '[email protected]',\n 'password' => Hash::make('admin@123'),\n ]);\n\n DB::table('settings')->insert([\n 'company_name' => 'Test Company',\n 'company_address' => 'ABC, House #5, Road #10',\n 'company_city' => 'Uttara, Dhaka',\n 'phone' => '000000000',\n 'email' => '[email protected]',\n 'invoice_prefix' => '#INV',\n ]);\n\n DB::table('customers')->insert([\n 'name' => 'Walk-in Customer',\n 'mobile' => '0000000000',\n ]);\n }", "title": "" }, { "docid": "18a4acc45dd7538fb4ee59fb3e9a3fa1", "score": "0.7784293", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // factory(User::class, 10)->create();\n // factory(Titulo::class, 25)->create();\n factory(Interes::class, 20)->create();\n }", "title": "" }, { "docid": "87a95114b3ac984335a7c632d8f42616", "score": "0.7778835", "text": "public function run()\n {\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // First, clear tables\n DB::table('users')->truncate();\n DB::table('roles')->truncate();\n DB::table('divisions')->truncate();\n DB::table('sports')->truncate();\n// DB::table('stadia')->truncate();\n// DB::table('athletes')->truncate();\n// DB::table('teams')->truncate();\n// DB::table('seasons')->truncate();\n// DB::table('championships')->truncate();\n// DB::table('matchdays')->truncate();\n\n $this->call(RolesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(DivisionsTableSeeder::class);\n $this->call(SportsTableSeeder::class);\n\n// factory(App\\Athlete::class, 50)->create();\n// factory(App\\Stadium::class, 50)->create();\n// factory(App\\Team::class, 50)->create();\n// factory(App\\Matchday::class, 20)->create();\n }", "title": "" }, { "docid": "b2cbffda63d1ab3314805039a3f745c2", "score": "0.77745605", "text": "public function run()\n {\n // add the faker for creating the seeder\n // Truncate the table \n Article::truncate();\n \n $faker = \\Faker\\Factory::create();\n\n // loop through the \n for($i=0;$i<=100;$i++){\n // create the instance\n Article::create([\n \"title\" => $faker->sentence,\n \"body\" => $faker->paragraph\n ]);\n }\n }", "title": "" }, { "docid": "76470a80c7aaebd7837c5c0687a0a745", "score": "0.7771726", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n Product::truncate();\n Category::truncate();\n Transaction::truncate();\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Product::flushEventListeners();\n Category::flushEventListeners();\n Transaction::flushEventListeners();\n\n $this->call(RoleSeeder::class);\n\n User::factory(100)->create();\n\n $productos = Product::factory(300)->create();\n Transaction::factory(200)->create();\n Category::factory(30)->create();\n\n foreach($productos as $producto){\n $producto->categories()->attach(\n rand(1,5)\n );\n } \n \n \n }", "title": "" }, { "docid": "3c4ecec7d95903372a3612473f7d28ae", "score": "0.7769814", "text": "public function run()\n {\n $this->call(RolesTableSeeder::class);\n $this->call(VideoCategorySeeder::class);\n\n $users = factory(App\\Models\\User::class, 10)->create();\n\n foreach ($users as $user) {\n $user->assign('user');\n }\n $trainingContent = factory(App\\Models\\TrainingContent::class, 100)->create();\n }", "title": "" }, { "docid": "0c36bf7d012f016fd62ff407dca131fc", "score": "0.7768416", "text": "public function run()\n {\n// $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n User::truncate();\n Category::truncate();\n Post::truncate();\n Tag::truncate();\n Forum::truncate();\n\n factory(User::class)->create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n ]);\n\n factory(User::class)->create([\n 'name' => 'User',\n 'email' => '[email protected]',\n ]);\n\n factory(Category::class, 5)->create();\n factory(Post::class, 15)->create();\n factory(Tag::class, 50)->create();\n factory(Forum::class, 15)->create();\n }", "title": "" }, { "docid": "8f5b2b13145d60ef4c64e80ad859c8c0", "score": "0.77621996", "text": "public function run()\n {\n\n $this->call([\n RoleSeeder::class,\n CategoriesSeeder::class\n ]);\n\n factory(App\\User::class, 150)->create();\n factory(App\\Portfolio::class, 150)->create();\n factory(App\\Project::class, 150)->create();\n factory(App\\Transaction::class, 1000)->create();\n // factory(App\\Message::class, 100)->create();\n factory(App\\Rate::class, 1000)->create();\n\n $this->call([\n SkillsSeeder::class,\n portfolio_tagSeeder::class,\n tag_userSeeder::class,\n PortfolioImageSeeder::class,\n ProjectAttachmentSeeder::class,\n ProjectOfferSeeder::class,\n project_tagSeeder::class,\n adminUserSeeder::class\n ]);\n\n\n }", "title": "" }, { "docid": "ced000ec376a75849db5549df35c6236", "score": "0.77621984", "text": "public function run()\n {\n // Uncomment the below to wipe the table clean before populating\n DB::table('users')->delete();\n \n $users = array(\n ['id' => 1, 'name' => 'navi', 'email' => '[email protected]', 'password' => bcrypt('1234'), 'created_at' => new DateTime, 'updated_at' => new DateTime],\n ['id' => 2, 'name' => 'john', 'email' => '[email protected]', 'password' => bcrypt('1234'), 'created_at' => new DateTime, 'updated_at' => new DateTime],\n ['id' => 3, 'name' => 'tom', 'email' => '[email protected]', 'password' => bcrypt('1234'), 'created_at' => new DateTime, 'updated_at' => new DateTime],\n );\n \n // Uncomment the below to run the seeder\n DB::table('users')->insert($users);\n }", "title": "" }, { "docid": "5f854a27580e06e10dc4b25277a11e57", "score": "0.77609193", "text": "public function run()\n {\n $genres=['action','horror','drama','triler','comedy','romance'];\n foreach ($genres as $genre) {\n Genre::create(['name'=>$genre]);\n }\n $this->call(UsersTableSeeder::class);\n $this->call(MovieTableSeeder::class);\n \n\n\n }", "title": "" }, { "docid": "f5247262479a26f9216251d08dd24cf7", "score": "0.7758224", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n usuaris::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n usuaris::create([\n 'idusuari' => $faker->shuffle(array(1,2,3,4,5,6,7,8,9,10)),\n 'nom' => $faker->name,\n 'descripcio' => $faker->text($maxNbChars = 200),\n 'DataNaixement' => $faker->date,\n 'correu_electronic' => $faker->freeEmail,\n 'telefon' => $faker->phoneNumber,\n 'data_alta' => $faker->date,\n 'data_baixa' => $faker->date,\n 'rol' => $faker->word,\n 'password' => $faker->name,\n ]);\n }\n }", "title": "" }, { "docid": "a31eec437c3c359c0350e5dd29d66e98", "score": "0.7757912", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // Item::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($j=1; $j < 4; $j++) { \n for ($i = 0; $i < 10; $i++) {\n Item::create([\n 'title' => 'Item-'.$j.'.'.($i+1),\n 'description' => $faker->text,\n 'index' => $i,\n 'expire_date' => date( \"Y-m-d\", strtotime( date('Y-m-d').\" +1 day\" ) ),\n 'list_id' => $j,\n ]);\n }\n }\n }", "title": "" }, { "docid": "95d848af3bfe57106748ced287b6a3a6", "score": "0.7757277", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class, 10)->create();\n factory(Category::class, 10)->create();\n factory(Subcategory::class, 20)->create();\n factory(Country::class, 4)->create();\n factory(City::class, 20)->create();\n factory(Annonce::class, 50)->create();\n factory(Image::class, 150)->create();\n factory(Profil::class, 10)->create();\n factory(Like::class, 15)->create();\n factory(Message::class, 130)->create();\n }", "title": "" }, { "docid": "0fadad943f810e9f816dff85d7fcc82f", "score": "0.7754066", "text": "public function run()\n {\n // Truncate existing records to start from scratch.\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Room::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $faker = \\Faker\\Factory::create();\n\n // Create Rooms in our database:\n for ($i = 1; $i < 11; $i++) {\n Room::create([\n 'hotel_id' => Hotel::all()->random()->id,\n 'room_name' => $faker->text,\n 'room_type' => RoomType::all()->random()->id,\n 'image' => $faker->Image,\n ]);\n }\n }", "title": "" }, { "docid": "a52e2d935fe1a6f1552b319437199638", "score": "0.7753583", "text": "public function run()\n\t{\n\t\t//\n\t\t// Let's truncate our existing records to start from scratch.\n\t\tUserRole::truncate();\n\t\t\n\t\t$faker = \\Faker\\Factory::create();\n\t\t\n\t\t// And now, let's create a few articles in our database:\n\t\t\n\t\t$userRoles = [\n\t\t\t[\n\t\t\t\t'role' => 'admin',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'role' => 'employee',\n\t\t\t]\n\t\t\n\t\t];\n\t\t\n\t\t\n\t\tforeach($userRoles as $userRole) {\n\t\t\tUserRole::create([\n\t\t\t\t'role' => $userRole['role'],\n\t\t\t]);\n\t\t}\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "32ceb87c0b0901a9ca7b03eff203eb22", "score": "0.77495295", "text": "public function run()\n {\n $this->call(CategoriaSeed::class);\n $this->call(UbicacionesSeed::class);\n $this->call(EstadoSeed::class);\n $this->call(RolesSeed::class);\n $this->call(UsuarioSeed::class);\n factory(App\\Models\\Usuario::class, 80)->create();\n factory(App\\Models\\Producto::class, 50)->create();\n $this->call(VentaSeed::class);\n $this->call(CompraSeed::class);\n }", "title": "" }, { "docid": "5987a41e6798b6576c0d4bfd213b111b", "score": "0.7746713", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n App\\User::create([\n 'name' => 'Christian Tambo C',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456')\n ]);\n\n factory(App\\Post::class, 24)->create();\n\n App\\Camara::create([\n 'user_id' => 1,\n 'title' => 'Camara Laptop',\n 'height' => '2 metros',\n 'angle' => '100 grados',\n 'url' => '0',\n 'location' => 'Poste #1, Av.Costanera, La Paz', \n ]);\n App\\Camara::create([\n 'user_id' => 1,\n 'title' => 'Camara IP Celular',\n 'height' => 'Indefinido',\n 'angle' => 'Indefinido',\n 'url' => 'http://192.168.0.8:8080/video',\n 'location' => 'Celular de Christian Tambo', \n ]);\n \n \n\n //factory(App\\Camara::class, 10)->create();\n }", "title": "" }, { "docid": "19da69e4087929e658a5c983a8ae429a", "score": "0.7745691", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n// factory(App\\Models\\User::class)->create();\n// factory(App\\Models\\User::class)->create(['email' => '[email protected]']);\n// factory(App\\Models\\Wedding::class, 20)->create();\n// factory(App\\Models\\Vendor::class, 20)->create();\n// factory(App\\Models\\Event::class, 20)->create();\n// factory(App\\Models\\Guest::class, 20)->create();\n// factory(App\\Models\\Profession::class, 5)->create();\n factory(App\\Models\\Product::class, 50)->create();\n }", "title": "" }, { "docid": "47a9ab206264a007fe390308b63644dd", "score": "0.77454555", "text": "public function run()\n {\n App\\User::create(\n [\n 'name' => 'Sid',\n 'email' => '[email protected]',\n 'role' => 'admin',\n 'password' => bcrypt(env('TESTPASS')),\n ]\n );\n\n // vogliamo 10 utenti\n factory(App\\User::class, 9)->create();\n\n\n $users = App\\User::all();\n\n\n $categories = factory(App\\Category::class, 20)->create();\n\n $tags = factory(App\\Tag::class, 40)->create();\n\n foreach ($users as $user) {\n // per ciascun utente vogliamo 15 post\n // ciascun post vogliamo assegnarlo a una categoria random (ESISTENTE)\n $posts = factory(App\\Post::class, 15)->create(\n [\n 'user_id' => $user->id,\n 'category_id' => collect($categories)->random()->id,\n ]\n );\n\n foreach ($posts as $post) {\n // ciascun post vogliamo assegnarlo 3 tags random (ESISTENTI)\n $randomTags = collect($tags)->random(3)->pluck('id')->toArray();\n $post->tags()->sync($randomTags);\n }\n }\n }", "title": "" }, { "docid": "feb2b76432de65887f9c368e7596f7f4", "score": "0.7744374", "text": "public function run()\n {\n //DB::table('products')->truncate();\n\n $discountables = array(\n array('discount_id' => 1, 'discountable_id' => 1, 'discountable_type' => 'Product'),\n array('discount_id' => 2, 'discountable_id' => 2, 'discountable_type' => 'Product'),\n );\n\n // Uncomment the below to run the seeder\n DB::table('discountables')->insert($discountables);\n }", "title": "" }, { "docid": "53418ed70c952b849d800cfb91d5085d", "score": "0.77430356", "text": "public function run()\n {\n // Article::factory(50)->create();\n // User::factory(50)->create();\n $this->call([\n ModelcategoriesTableSeeder::class,\n ArticlesTableSeeder::class,\n ]);\n }", "title": "" }, { "docid": "a109b92af084d0529a07b66f6fd4e7aa", "score": "0.77386874", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('games')->insert([['name'=>'God of war','genero'=>'Ação', 'idade_indicativa'=>12,'preco'=> 10.0]]);\n DB::table('animes')->insert([['name'=>'Dragon Ball','genero'=>'Ação', 'idade_indicativa'=>1,'episodios' => 220]]);\n }", "title": "" }, { "docid": "ccbabc0a54dd57b26acab36bce44bc6c", "score": "0.77383316", "text": "public function run()\n {\n DB::table('schedules')->delete();\n $faker = Faker::create();\n echo \"[Seed] Table 'schedules'\\n\";\n foreach(range(1, 65) as $i) { \n Schedule::create([\n 'purpose' => $faker->word,\n 'details' => $faker->text,\n 'doctor' => Doctor::inRandomOrder()->first()->id,\n 'patient' => Patient::inRandomOrder()->first()->id,\n 'created_by' => factory(App\\Models\\User::class)->create()->id,\n 'date' => $faker->dateTimeBetween($startDate = '-6 months', $max = '+2 months'),\n 'time' => $faker->time($format = 'H:00', $max = 'now')\n ]);\n }\n }", "title": "" }, { "docid": "3380c225be4966fa530271b9caadaa76", "score": "0.77340096", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1, 100) as $index) {\n DB::table('books')->insert([\n 'title' => $faker->sentence,\n 'pages' => rand(100, 200),\n 'price' => rand(100, 200),\n 'id_user' => rand(1, 100)\n ]);\n }\n\n }", "title": "" }, { "docid": "2e2baa34c720ee452aa6d82693a693a0", "score": "0.7733996", "text": "public function run()\n {\n $seeds = [\n [ 'id' => 1, 'name' => \"Meja\", 'price'=> 20],\n [ 'id' => 2, 'name' => \"Almari\", 'price'=> 30],\n [ 'id' => 3, 'name' => \"Kerusi\", 'price'=> 40],\n [ 'id' => 4, 'name' => \"Katil\", 'price'=> 50],\n [ 'id' => 5, 'name' => \"Rak Kasut\", 'price'=> 60], \n ];\n\n foreach($seeds as $seed) {\n DB::table('products')->insert($seed);\n }\n }", "title": "" }, { "docid": "c10d49c6dcff444dde2db0bb9b0596fb", "score": "0.7730497", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n /* seed user admin */\n User::create([\n 'username' => 'admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('12345678'),\n ]);\n\n /* seed category */\n foreach (dummy::categories() as $category) {\n Category::create([\n 'name' => $category\n ]);\n }\n\n /* seed brand */\n foreach (dummy::brands() as $brand) {\n Brand::create([\n 'name' => $brand\n ]);\n }\n\n /* seed color */\n foreach (dummy::colorNames() as $color) {\n Color::create([\n 'color' => $color\n ]);\n }\n\n /* seed size */\n for ($i = 15; $i <= 50; $i++) {\n Size::create([\n 'size' => $i,\n ]);\n }\n\n factory(Customer::class, 100)->create()->each(function ($customer) {\n /* seed address */\n $address = factory(Address::class, 4)->make();\n $customer->addresses()->saveMany($address);\n /* seed order */\n $order = factory(Order::class, 5)->make();\n $customer->orders()->saveMany($order);\n /* seed review */\n $review = factory(Review::class, 10)->make();\n $customer->reviews()->saveMany($review);\n });\n\n factory(Item::class, 200)->create()->each(function ($item) {\n /* seed photo */\n $photo = factory(Photo::class, 3)->make();\n $item->photos()->saveMany($photo);\n });\n /* get all order attaching */\n $order = Order::all();\n\n /* populate the pivot table order detail */\n Item::all()->each(function ($item) use ($order) {\n $item->orders()->attach(\n $order->random(rand(1, $order->count()))->pluck('id')->toArray()\n );\n });\n /* get all color attaching */\n $color = Color::all();\n\n /* populate the pivot table order detail */\n Item::all()->each(function ($item) use ($color) {\n $item->colors()->attach(\n $color->random(rand(1, $color->count()))->pluck('id')->toArray()\n );\n });\n /* get all size attaching */\n $size = Size::all();\n\n /* populate the pivot table order detail */\n Item::all()->each(function ($item) use ($size) {\n $item->sizes()->attach(\n $size->random(rand(1, $size->count()))->pluck('id')->toArray()\n );\n });\n /* get all review attaching */\n $review = Review::all();\n\n /* populate the pivot table order detail */\n Item::all()->each(function ($item) use ($review) {\n $item->reviews()->attach(\n $review->random(rand(1, $review->count()))->pluck('id')->toArray()\n );\n });\n }", "title": "" }, { "docid": "18840cf61a94ff67d82e77efc8e99af2", "score": "0.7729479", "text": "public function run()\n {\n \t\t// $this->call(UsersTableSeeder::class);\n \t\tfactory(App\\User::class)->times(15)->create();\n\n \t\t$products = factory(App\\Product::class)->times(150)->create();\n \t\t$brands = factory(App\\Brand::class)->times(8)->create();\n \t\t$categories = factory(App\\Category::class)->times(9)->create();\n \t\t$status = factory(App\\Status::class)->times(4)->create();\n\n \t\tforeach ($products as $oneProduct) {\n \t\t\t$oneProduct->brand()->associate($brands->random(1)->first()->id);\n \t\t\t$oneProduct->category()->associate($categories->random(1)->first()->id);\n $oneProduct->status()->associate($status->random(1)->first()->id);\n \t\t\t$oneProduct->save();\n \t\t}\n }", "title": "" }, { "docid": "8617a1987579f9b1ee27802bb9a1f2c9", "score": "0.7724194", "text": "public function run()\n {\n //initialisation de faker\n $faker = \\Faker\\Factory::create();\n\n //tableau vite des categories\n $categories = [];\n\n //boucle creant 10 categories\n for ($i= 0; $i < 10; $i++) {\n $categories[] = [\n 'name' => $faker->sentence(4),\n 'slug' => $faker->slug\n ];\n }\n\n //un tableau initial de post vide\n $posts = [];\n\n //creons 100 posts en bouclant\n for ($i=0; $i < 100; $i++) {\n $timestamp = $faker->unixTime('now');\n $posts[] = [\n 'name' => $faker->sentence(3),\n 'slug' => $faker->slug,\n 'description' => $faker->text(300),\n 'created_at' => date('Y-m-d H:i:s', $timestamp),\n 'updated_at' => date('Y-m-d H:i:s', $timestamp),\n 'category_id' => rand(1, 10)\n ];\n }\n\n //on insert les categories en db\n $this->insert('categories', $categories);\n\n //on insert les posts en db\n $this->insert('posts', $posts);\n }", "title": "" }, { "docid": "5d65069c373876a3bf83601f496d2940", "score": "0.7723117", "text": "public function run()\n {\n $faker = Faker\\Factory::create('fr_FR');\n\n $seeds = [];\n for ($i = 0; $i < 10; $i++) {\n $seeds[] = [\n 'name' => $faker->sentence(rand(1, 4)),\n 'slug' => $faker->slug(4, true),\n 'content' => $faker->paragraph(5, true)\n ];\n }\n\n $this->table('test')->insert($seeds)->saveData();\n }", "title": "" }, { "docid": "1160cd1a533510c8072d65b166365884", "score": "0.77230316", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1, 20) as $index) {\n DB::table('students')->insert([\n 'name' => $faker->name,\n 'gender' => $faker->randomElement(['m', 'f']),\n 'dept_id' => $faker->randomElement([1, 2, 3, 4])\n ]);\n }\n }", "title": "" }, { "docid": "e2165f654f90d8ca7583b6d1a431e752", "score": "0.7720623", "text": "public function run()\n {\n DB::table('ex_alunos')->delete();\n\n $faker = Faker::create();\n foreach (range(1,10) as $index) {\n ExAluno::create([\n 'nome' => strtoupper($faker->name),\n 'matricula' => str_random(20),\n 'cpf' => str_random(11),\n 'email' => $faker->unique()->safeEmail,\n 'password' => bcrypt('123456'),\n 'status' => 1,\n 'sexo' => 'M',\n 'curso_id' => 1\n ]);\n }\n\n $roleAluno = Role::whereName('EX-ALUNO')->first();\n $users = ExAluno::all();\n foreach ($users as $key => $user) {\n $user->setRole($roleAluno);\n }\n }", "title": "" }, { "docid": "bf514d7274a50aace9bdc4eb0f7a37cb", "score": "0.7719297", "text": "public function run()\n {\n $faker = Factory::create('id_ID');\n\n DB::table('users')->insert([\n 'role_id' => 1,\n 'name' => 'Admin',\n 'username' => 'admin',\n 'password' => bcrypt('654321'),\n 'email' => '[email protected]',\n 'about' => 'Hello, this is admin bio',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n\n DB::table('users')->insert([\n 'role_id' => 2,\n 'name' => 'Staff',\n 'username' => 'staff',\n 'password' => bcrypt('123456'),\n 'email' => '[email protected]',\n 'about' => 'Hi, this is staff bio',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n }", "title": "" }, { "docid": "5256d8621255fdb25e62eaaeef3015e9", "score": "0.77190244", "text": "public function run()\n {\n User::truncate();\n Category::truncate();\n Post::truncate();\n\n User::factory()->create([\n 'name' => 'Gattsu Berserk',\n 'username' => 'gattsu',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n ]);\n\n User::factory(9)->create();\n\n Category::factory(10)->create();\n\n Post::factory(100)->create();\n }", "title": "" }, { "docid": "39303b9168b93ca252d041cc23081eba", "score": "0.77173394", "text": "public function run()\n {\n $faker = Faker::create('ru_RU');\n foreach (range(1,10) as $i) {\n DB::table('authors')->insert([\n 'name' => $faker->firstNameMale,\n 'surname' => $faker->lastName\n ]);\n }\n\n\n $genres = ['драма','боевик','детектив','фантастика','ужасы','история'];\n foreach (range(1,5) as $k => $i) {\n DB::table('genres')->insert([\n 'name' => $genres[$k]\n ]);\n }\n\n $faker = Faker::create('ru_RU');\n foreach (range(1,20) as $i) {\n DB::table('books')->insert([\n 'name' => $faker->jobTitle,\n 'author_id' => $faker->numberBetween($min = 1, $max = 10),\n 'genre_id' => $faker->numberBetween($min = 1, $max = 5),\n 'rating' => $faker->numberBetween($min = 1, $max = 10)\n ]);\n }\n }", "title": "" }, { "docid": "f9fe6e1bc501818e8c5b14df3d2d9e09", "score": "0.77165025", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n $divisions = factory(\\App\\Division::class, 5)->create();\n $divisions->each(function ($division) {\n $division\n ->employees()\n ->saveMany(\n factory(App\\Employee::class, rand(1,10))->make()\n );\n });\n\n // Role comes before User seeder here.\n $this->call(RoleTableSeeder::class);\n // User seeder will use the roles above created.\n $this->call(UserTableSeeder::class);\n }", "title": "" }, { "docid": "354da75ca11e7acc09740fdcff92d8f1", "score": "0.77156013", "text": "public function run()\n {\n //Seed some initial users with roles\n $role_student = Role::where('name', 'student')->first();\n $role_teacher = Role::where('name', 'teacher')->first();\n $role_admin = Role::where('name', 'admin')->first();\n //Seed students\n $student = new User();\n $student->name = 'student Name';\n $student->email = '[email protected]';\n $student->password = bcrypt('secret');\n $student->save();\n $student->roles()->attach($role_student);\n //Seed teachers\n $teacher = new User();\n $teacher->name = 'teacher Name';\n $teacher->email = '[email protected]';\n $teacher->password = bcrypt('secret');\n $teacher->save();\n $teacher->roles()->attach($role_teacher);\n //Seed Admin\n $admin = new User();\n $admin->name = 'admin Name';\n $admin->email = '[email protected]';\n $admin->password = bcrypt('secret');\n $admin->save();\n $admin->roles()->attach($role_admin);\n }", "title": "" }, { "docid": "210e8e2e64c261d3e918c70b52d05cc6", "score": "0.7713595", "text": "public function run()\n {\n $this->call(GenreSeeder::class);\n $this->call(ContinentSeeder::class);\n $this->call(EquipeSeeder::class);\n Equipe::factory(20)->create();\n\n $joueurs = 100;\n\n $this->call(RoleSeeder::class);\n Joueur::factory($joueurs)->create(); \n\n Photo::factory($joueurs)->create();\n }", "title": "" }, { "docid": "0f6c53011f6ab5bb11b6068e6d28c755", "score": "0.77127576", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $usuarios= factory(Usuario::class, 25)->create();\n \n foreach ($usuarios as $user){\n $publicaciones= factory(Publicacion::class, rand(0,10))->create(\n ['usuario_id'=>$user->id]);\n \n }\n \n $publicaciones = Publicacion::all();\n \n \n \n foreach ($usuarios as $user){\n $hasta= rand(5,42);\n for($i=0;$i<$hasta;$i++){\n factory(Seguidor::class)->create(\n ['usuario_id'=>$user->id,\n 'publicacion_id'=>rand(1,$publicaciones->count())]); \n }\n \n }\n }", "title": "" }, { "docid": "5d8c781d991c39cee21560f8e0d34f32", "score": "0.7711816", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n User::create([\n 'name' => 'Demo of GM',\n 'email' => '[email protected]',\n 'password' => bcrypt('12345678'),\n ]);\n\n Quote::create([\n 'body' => 'In delay there lies no plenty.',\n 'quotee' => 'William Shakespeare'\n ]);\n\n Quote::create([\n 'body' => 'Do anything but let it produce joy.',\n 'quotee' => 'Walt Whitman'\n ]);\n\n Quote::create([\n 'body' => 'Wheresoever you go, go with all your heart.',\n 'quotee' => 'Confucius'\n ]);\n\n Quote::create([\n 'body' => 'In the faces of men and women, I see God',\n 'quotee' => 'Walt Whitman'\n ]);\n\n\n }", "title": "" }, { "docid": "b989d2d24dc84c94605c874d9fc41662", "score": "0.7708211", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //factory(App\\Model\\Adress::class,3)->create();\n //factory(App\\Model\\Contact::class,9)->create();\n //factory(App\\Model\\Category::class,3)->create();\n\n //factory(App\\Model\\Product::class,30)->create();\n //factory(App\\Model\\ProductImage::class,30)->create();\n //factory(App\\Model\\store::class,1)->create();\n\n factory(App\\Model\\Review::class,100)->create();\n\n\n\n\n\n\n }", "title": "" }, { "docid": "e9c0d0e393079070634613c861afae38", "score": "0.7707709", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(RolesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(CampusesTableSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n\n factory(\\App\\User::class, 5)->create();\n factory(\\App\\Feedback::class, 30)->create();\n factory(\\App\\Comment::class, 60)->create();\n for($i = 2; $i <= 6; $i++) {\n DB::table('user_has_roles')->insert([\n 'role_id' => 2,\n 'user_id' => $i\n ]);\n }\n }", "title": "" }, { "docid": "ad8095e515b037c12537e0e26cd96bda", "score": "0.77054197", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n Role::create([\n 'role' => 'Administrator'\n ])->users()->create([\n 'name' => 'Administrator',\n 'surname' => 'Tracking',\n 'phone' => '',\n 'address' => '',\n 'email' => '[email protected]',\n 'password' => '123456'\n ]);\n Role::create([\n 'role' => 'Client'\n ])->users()->create([\n 'name' => 'Cliente',\n 'surname' => 'Tracking',\n 'phone' => '123456789',\n 'address' => 'Calle 1, col Abc, Ciudad, Estado',\n 'email' => '[email protected]',\n 'password' => '123456'\n ]);\n Role::create([\n 'role' => 'Worker'\n ]);\n\n Status::create([\n 'status' => 'Esperando'\n ]);\n Status::create([\n 'status' => 'Reparando'\n ]);\n Status::create([\n 'status' => 'Almacenado'\n ]);\n Status::create([\n 'status' => 'Entregado'\n ]);\n Status::create([\n 'status' => 'Finalizado'\n ]);\n }", "title": "" }, { "docid": "c7fccacf518f86f03865d2d9cfdffffc", "score": "0.77052426", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n for($a=0;$a<10;$a++){\n DB::table('professionals')->insert([\n 'name' => 'TuNombre'.($a+1),\n 'lastname' => 'TuApellido'.($a+1),\n 'type' => 'Ingeniero'.($a+1),\n 'qualification' => 1\n ]);\n DB::table('services')->insert([\n 'id_professionals' => ($a+1),\n 'qualification' => 3,\n 'commentary' => 'Soy un Comentario',\n 'month' => ($a+1)\n ]);\n }\n }", "title": "" }, { "docid": "f432bb8e1f614aa638193bf7c40d8b0d", "score": "0.77018327", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $faker = Faker::create();\n $gender = $faker->randomElement(['male', 'female']);\n foreach (range(1, 15) as $index) {\n DB::table('employees')->insert([\n 'name' => $faker->name($gender),\n 'email' => $faker->email\n ]);\n }\n }", "title": "" }, { "docid": "166f652bb040d1504069bc8e0510ba95", "score": "0.7700588", "text": "public function run()\n {\n if (App::environment() === 'production') {\n exit('Do not seed in production environment');\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // disable foreign key constraints\n DB::table('event_assignments')->truncate();\n\n Assignment::create([\n 'eventId' => 2,\n 'volunteerId' => 2,\n 'startingDate'\t\t => Carbon::now(),\n 'endingDate' => Carbon::now()->addWeeks(2)\n ]);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 1'); // enable foreign key constraints\n }", "title": "" }, { "docid": "ba7c8e49633eb68c7a2b6c8ba05aa3da", "score": "0.76986605", "text": "public function run()\n {\n // $this->call(UserTableSeeder::class);\n DB::table('users')->delete();\n\n $users = array(\n ['name' => 'Saad Hassan', 'email' => '[email protected]', 'mobile' => '9560401880', 'password' => Hash::make('secret')],\n ['name' => 'Chris Sevilleja', 'email' => '[email protected]','mobile' => '9560401880', 'password' => Hash::make('secret')],\n ['name' => 'Holly Lloyd', 'email' => '[email protected]','mobile' => '9560401880', 'password' => Hash::make('secret')],\n ['name' => 'Adnan Kukic', 'email' => '[email protected]','mobile' => '9560401880', 'password' => Hash::make('secret')],\n );\n\n // Loop through each user above and create the record for them in the database\n $user = new User();\n $user->name = \"admin\";\n $user->email = \"[email protected]\";\n $user->mobile = \"9560401880\";\n $user->password = Hash::make('password');\n $user->save();\n $user->roles()->attach(1);\n\n foreach ($users as $user)\n {\n User::create($user);\n }\n }", "title": "" }, { "docid": "087fed479872a104a0fe90228724ec30", "score": "0.7697585", "text": "public function run()\n {\n \t//factory(App\\User::class, 20)->create();\n // $this->call(UsersTableSeeder::class);\n //DB::table('badgets')\n // ->insert(['libelle' => 'php']);\n\n DB::table('niveaus')->insert(['niveau' => 'facile']);\n DB::table('niveaus')->insert(['niveau' => 'difficile']);\n DB::table('niveaus')->insert(['niveau' => 'moyenne']);\n }", "title": "" }, { "docid": "b88c095e7f9f5b6ea1684fdb90bc98e7", "score": "0.7696775", "text": "public function run()\n {\n $this->call([\n //SIN LLAVES FORÁNEAS\n EscolaridadeSeeder::class,\n UserSeeder::class,\n //USA LLAVES FORÁNEAS\n ]);\n // \\App\\Models\\User::factory(10)->create();\n Beneficiario::factory(15)->create();\n Jornada::factory(15)->create();\n Notas::factory(30)->create();\n\n \n }", "title": "" }, { "docid": "36e2b8b4e2455f59a63c583df1a391a9", "score": "0.76936", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'lastname' => \"admin\",\n 'firstname' => \"admin\",\n 'group_id' => \"1\",\n 'email' => '[email protected]',\n 'password' => Hash::make('12345'),\n ]);\n DB::table('user_groups')->insert([\n 'name' => \"admin\",\n 'status' => \"1\",\n\n ]);\n DB::table('user_groups')->insert([\n 'name' => \"customer\",\n 'status' => \"0\",\n\n ]);\n DB::table('introduces')->insert([\n 'title' => 'This is introduce about my team',\n 'summary' => 'This is summary about my team',\n 'image' => 'upload/debug_team.jpg',\n 'content' => 'This is content about my team',\n 'slug' => Str::slug('This is introduce about my team', '-')\n ]);\n\n //price ticker\n DB::table('price_tickets')->insert([\n 'name' => \"Người lớn\",\n 'price' => \"60000\",\n\n ]);\n DB::table('price_tickets')->insert([\n 'name' => \"Trẻ em\",\n 'price' => \"30000\",\n\n ]);\n DB::table('price_tickets')->insert([\n 'name' => \"HS-SV\",\n 'price' => \"45000\",\n\n ]);\n }", "title": "" }, { "docid": "cc128e93e33511b2ef1ba05964e7ab76", "score": "0.7693494", "text": "public function run()\n {\n DB::table('user_tags')->delete();\n\n\t$faker = Faker\\Factory::create('fr_FR');\n\t$faker->addProvider(new Faker\\Provider\\fr_FR\\Address($faker));\n\n\t//if we want to create the SAME seed generated data every time we run, instead of \n\t//making file, just use the Faker->seed() call:\n\t$faker->seed(1234);\n\n\t$records = DB::table('users')->select('id')->get();\n\t\n\t$tag_list = array(\n\t 'anglais','allemand','espagnol'\n\t);\n\t\n\t//now, make our data array:\n\tfor ($i=0; $i < ($size = sizeof($records))*3; $i++) {\n\t $key = array_rand($tag_list);\n\t $tag = array(\n\t\t'id' => $records[$i%$size]->id,\n\t\t'info_tags' => $tag_list[$key]\n\t );\n\t $tags[] = $tag;\n\t}\n\t\n //// Uncomment the below to run the seeder\n DB::table('user_tags')->insert($tags);\n }", "title": "" }, { "docid": "adfb7b36c0f4cf9f8966236fe3c4601d", "score": "0.76932347", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('items')->insert([\n \t[\n 'name' => 'Espresso',\n 'price' => '2000',\n 'is_itemset' => '0',\n ],\n [\n 'name' => 'Blueberry Muffin',\n 'price' => '2000',\n 'is_itemset' => '0',\n ],\n [\n 'name' => 'Cafe Latte',\n 'price' => '3000',\n 'is_itemset' => '0',\n ],\n [\n 'name' => 'Extra Hot',\n 'price' => '10000',\n 'is_itemset' => '0',\n ],\n [\n 'name' => 'Upsize',\n 'price' => '5000',\n 'is_itemset' => '0',\n ],\n ]);\n }", "title": "" }, { "docid": "8581d5932c10ae369822f385e0546d32", "score": "0.76930207", "text": "public function run()\n {\n //\n $faker=Faker::create();\n for($i=0;$i<3;$i++){\n \tvendedor::create(\n \t\t[\n \t\t\t'nombre'=>$faker->name(),\n \t\t\t'apellidos'=>$faker->firstName()\n \t\t]\n \t);\n }\n }", "title": "" }, { "docid": "1289e2b6ab8584618582d08fb4dd0eef", "score": "0.76908034", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n /* ----------------------------------------------\n * Create 10 users and for each user it will create\n * 5 to 30 questions and for each question there will be\n * 3 to 15 answers\n ------------------------------------------------*/\n factory(App\\User::class, 10)->create()->each(function($u) {\n $u->questions()->saveMany(\n factory(App\\Question::class, rand(5, 30))->make()\n )\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(3, 15))->make());\n });\n });\n\n }", "title": "" }, { "docid": "931bc5da856255fe423779a30df97f7c", "score": "0.768858", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n // $this->call(ModelosTableSeeder::class);\n factory(App\\Model\\Marca::class,30)->create();\n factory(App\\Model\\Modelo::class,90)->create();\n }", "title": "" }, { "docid": "dcf670c829f2356856972e0a09d9a42f", "score": "0.7686464", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n //sedder\n //$this->call(UserSeeder::class);\n //$this->call(DirectionSeeder::class);\n //$this->call(CategorySeeder::class);\n //$this->call(BrandSeeder::class);\n\n //factory // usar el nombre de modelo\n /*Direction::factory(20)->create();\n User::factory(20)->create();\n Category::factory(6)->create();\n Brand::factory(20)->create();\n Product::factory(20)->create();\n Order::factory(20)->create();\n\n //seeder\n $this->call(Category_ProductSeeeder::class);\n $this->call(Order_ProductSeeeder::class);*/\n Brand::factory(20)->create();\n Product::factory(20)->create();\n //Category::factory(6)->create();\n $this->call(CategorySeeder::class);\n $this->call(CategoryProductSeeder::class);\n\n\n $this->call(CartSeeder::class);\n $this->call(UserSeeder::class);\n $this->call(RoleSeeder::class);\n $this->call(CartProductSeeder::class);\n\n\n }", "title": "" }, { "docid": "fd40d38e5dadc7d486cef808875889ba", "score": "0.7685538", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n //Tipo de aeronave\n $tipo = new Tipo([\n \"tipo\" => \"C440\"\n ]);\n\n $tipo->save();\n\n //Aeronave\n $aeronave = new Aeronave([\n \"matricula\" => \"PT-4888\",\n \"tipo_id\" => $tipo->id\n ]);\n\n $aeronave->save();\n \n //Aeroporto de origem\n $origem = new Aeroporto([\n \"nome\" => \"SPMG\"\n ]);\n\n $origem->save();\n\n //Aeroporto de destino\n $destino = new Aeroporto([\n \"nome\" => \"SPMS\"\n ]);\n\n $destino->save();\n\n //Voo\n $voo = new Voo([\n \"numero\" => \"TAM4855\",\n \"data\" => date('Y-m-d'),\n \"hora\" => date('H:i:s'),\n \"aeronave_id\" => $aeronave->id,\n \"origem_id\" => $origem->id,\n \"destino_id\" => $destino->id\n ]);\n\n $voo->save();\n }", "title": "" }, { "docid": "0ec7b9a91ca47201ce6aca6cac3a028b", "score": "0.76842654", "text": "public function run()\n {\n $faker = Faker::create();\n\n DB::table('demos')->delete();\n\n foreach (range(1,20) as $index)\n {\n $language = ($index % 3) == 0 ? \"Deutsch\" : (($index % 5) == 0 ? \"UK\" : \"North America\");\n // $enterpriseVersion = ($index % 3) == 0 ? \"10.4\" : \"11\";\n $enterpriseVersion = ($index % 2) == 0 ? \"11\" : \"10.4\";\n Demo::create(array(\n \"title\" => $faker->catchPhrase(),\n \"description\" => $faker->paragraph(), //$faker->realText($faker->numberBetween(10,20))\n \"enterprise_version\" => $enterpriseVersion,\n \"language\" => $language,\n \"demo_code\" => $faker->sentence(),\n \"related_content_code\" => $faker->sentence()\n ));\n }\n }", "title": "" }, { "docid": "f7bfac8aba6b6a622f4e0eec11a4d9fc", "score": "0.76830846", "text": "public function run()\n {\n //create example of content\n // factory(App\\Model\\Author::class, 5)->create()->each(function ($author) {\n // $author->posts()->save(factory(App\\Model\\Post::class)->make());\n // });\n // $this->call(UsersTableSeeder::class);\n $this->call([\n AuthorsTableSeeder::class,\n PostsTableSeeder::class,\n TagsTableSeeder::class,\n PostsTagsTableSeeder::class\n ]);\n }", "title": "" }, { "docid": "14e4182f11fd59a58db6d09e1c48f83e", "score": "0.7681982", "text": "public function run()\n {\n $seed = [\n [\n 'slug' => 'eljazera',\n 'production' => '2014',\n 'poster_id' => 1,\n 'image_id' => 1,\n 'age' => '17+',\n 'publish_date' => \\Carbon\\Carbon::now(),\n ],\n [\n 'slug' => 'alf-mabrook',\n 'production' => '2015',\n 'poster_id' => 1,\n 'image_id' => 1,\n 'age' => '13',\n 'publish_date' => \\Carbon\\Carbon::now(),\n ],\n [\n 'slug' => 'bdl-faqed',\n 'production' => '2013',\n 'poster_id' => 1,\n 'image_id' => 1,\n 'age' => '14',\n 'publish_date' => \\Carbon\\Carbon::now(),\n ]\n ];\n DB::table('movies')->insert($seed);\n }", "title": "" }, { "docid": "52c06df07ab060cd1e8468e059bdf62a", "score": "0.76781607", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('categories')->truncate();\n $categories = [\n ['id' => '1', 'category' => 'RPG'],\n ['id' => '2', 'category' => 'アクション'],\n ['id' => '3', 'category' => 'シミュレーション'],\n ['id' => '4', 'category' => 'シューティング'],\n ['id' => '5', 'category' => 'レーシング'],\n ['id' => '6', 'category' => '格闘ゲーム'],\n ['id' => '7', 'category' => 'スポーツゲーム'],\n ['id' => '8', 'category' => 'ホラー']\n ];\n\n DB::table('categories')->insert($categories);\n }", "title": "" }, { "docid": "e80c8ecd2cca8e1ca5da687fe8a40bdf", "score": "0.76775956", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n // Не смог сделать нормальный Seeder :)\n\n for($i=1;$i<200;$i++){\n DB::table('news')->insert(\n [\n 'userid' => 1,\n 'title' => Str::random(10),\n 'description' => Str::random(40),\n 'likes' => 0,\n ]\n );\n }\n }", "title": "" }, { "docid": "16b48d13aaecf8a9050093212752a42b", "score": "0.7676737", "text": "public function run()\n {\n \t//seeder de usuarios\n // $this->call(UsersTableSeeder::class);\n \t//seeder de titulares\n \t$this->call(PeopleTableSeeder::class);\n //seeder de beneficiarios\n $this->call(BeneficiariesTableSeeder::class);\n \n }", "title": "" }, { "docid": "0399fbc56b35925511720a5b0b0fa04d", "score": "0.7675503", "text": "public function run()\n {\n //\n # リセット\n DB::table('students')->delete();\n\n # 日本語設定\n // $faker = Faker\\Factory::create('ja_JP');\n $faker = Faker::create('ja_JP'); //修正版\n\n # サンプルデータの挿入\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Student::create([\n 'name' => $faker->name(),\n 'email' => $faker->email(),\n 'tel' => $faker->phoneNumber(),\n 'message' => $faker->text()\n ]);\n }\n }", "title": "" }, { "docid": "bf9877bcc45a8fe8774b6792575d99b2", "score": "0.7671322", "text": "public function run()\n {\n //Truncate entries if exist to start from scratch\n ExpensesModel::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // Create random entries for our expenses table:\n for ($i = 0; $i < 50; $i++) {\n ExpensesModel::create([\n 'description' => $faker->realText(),\n 'cost' => $faker->numberBetween(1, 10000),\n 'currency' => 'RON',\n 'date' => $faker->dateTimeBetween('-30days','now')->format('y-m-d')\n\n ]);\n }\n }", "title": "" }, { "docid": "20321412da56f09f3af5a63398db1b8c", "score": "0.76710236", "text": "public function run()\n {\n $faker = Faker::create();\n $contents = [\n 'customer',\n 'supplier',\n 'admin'\n ];\n\n foreach($contents as $content) {\n DB::table('roles')->insert([\n 'id' => $faker->uuid,\n 'name' => $content,\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\")\n ]);\n }\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "ec142b18ec2c1642b4e02b4a49d8852f", "score": "0.0", "text": "public function index()\n {\n $filter=Filter::paginate(20);\n return view('admin.filter.index',compact('filter'));\n }", "title": "" } ]
[ { "docid": "d4a0ecd8566af1bfd9231147ca1e458f", "score": "0.7474345", "text": "public function list()\n {\n try {\n $result = $this->get_all();\n $this->response($result);\n } catch (Exception $e) {\n $this->response(array(\n \"message\" => $e->getMessage()\n ), ERROR_CODE);\n }\n }", "title": "" }, { "docid": "6126929dc3b0a4f22ee22cc3ad8d6a7b", "score": "0.742424", "text": "public function index() \n\t{ \n\t\t$this->listing();\t\n\t}", "title": "" }, { "docid": "4c31098007bd884125e38a924a90b409", "score": "0.7370675", "text": "public function index()\n {\n $resources = Resource::paginate(10);\n return view('admin.resource.index', [\n 'resources' => $resources\n ]);\n }", "title": "" }, { "docid": "8fa6c385e83466b77bd15a6b86ea32e2", "score": "0.7304379", "text": "public function index()\n {\n $this->_create_list();\n $this->_display();\n\n }", "title": "" }, { "docid": "dd0281461ff38e01dc7daaf263a98684", "score": "0.72688746", "text": "function index() {\n $this->getList();\n }", "title": "" }, { "docid": "0e6388aacce7838ee1c78178d8108829", "score": "0.7267135", "text": "public function index(){\n\t\t\t$this->list();\n\t\t}", "title": "" }, { "docid": "223999e9a02d01dc0cad36705dec31b1", "score": "0.72478926", "text": "public function actionList() {\n $this->_getList();\n }", "title": "" }, { "docid": "9af36ef65a801a9d1ba3b391202f1180", "score": "0.7119231", "text": "public function index()\n {\n $resources = Resource::orderBy('id', 'desc')->paginate(20);\n return view('resource.index')->withResources($resources);\n }", "title": "" }, { "docid": "43a0ac0c5c36c0a0b193022ebde4ce89", "score": "0.7083264", "text": "public function index()\n {\n $config['tableName'] = trans('app.Resources list');\n $config['ignore'] = ['id', 'count', 'created_at', 'updated_at', 'deleted_at'];\n $config['list'] = MBResources::get()->toArray();\n $config['delete'] = 'app.resources.destroy';\n return view('admin.adminList',$config);\n }", "title": "" }, { "docid": "1855faa3b08cf438cac0964b9903bf8a", "score": "0.7014775", "text": "public function index()\n {\n $this->getListingService()\n ->setOrder($this->getOrder())\n ->setPagination($this->getPagination())\n ->getFilters()->add($this->getSearchFilter());\n $this->set(\n [\n $this->getEntityNamePlural() => $this->getListingService()\n ->getList(),\n 'pagination' => $this->getListingService()->getPagination()\n ]\n );\n }", "title": "" }, { "docid": "2e0ed72eb13150f2559131309e8f93b1", "score": "0.7001344", "text": "public function listing ()\n {\n // Fetch all questions\n $cacheID = 'listing';\n if (!$this->data['questions'] = $this->zf_cache->load($cacheID)) {\n $this->data['questions'] = $this->question_model->get_with_users();\n $this->zf_cache->save($this->data['questions'], $cacheID, array('all_questions'));\n }\n \n // Load view\n $this->load_view('questions/listing');\n }", "title": "" }, { "docid": "5412f0b9b053fcd0929c40d71994403a", "score": "0.69773793", "text": "public function index()\n {\n try {\n $resources = Resource::all();\n return $this->showAll($resources);\n } catch (Exception $ex) {\n return $this->errorResponse(\"Danh sách trống!\", Response::HTTP_INTERNAL_SERVER_ERROR);\n }\n }", "title": "" }, { "docid": "e31e9a0c7b3d2a9b4bc1a2880b844a81", "score": "0.6921471", "text": "public function indexAction()\n {\n $resource = $this->repo->all();\n if (!$resource) {\n return $this->errorNotFound('Resource not found');\n }\n return $this->apiOk($resource);\n }", "title": "" }, { "docid": "cbc2f6f0039706d1ede6b809aad8c23e", "score": "0.6894162", "text": "public function index()\n\t{\n\t\t//\n\t\t$this->getlist();\n\t\n\t}", "title": "" }, { "docid": "eed18db8f9e2d6b6fa328a727bce13ea", "score": "0.6884484", "text": "public function listingAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('SettingContentBundle:Page')->findBy(array(),array('name' => 'asc'));\n\n return $this->render('SettingContentBundle:Page:index.html.twig', array(\n 'pagination' => $entities,\n ));\n }", "title": "" }, { "docid": "a753301d8fa92e6902db5a211f69a62a", "score": "0.6880599", "text": "public function indexAction()\n {\n if($categoryId = $this->request->getQuery('categoryId')){\n $resource = $this->repo->all($categoryId);\n }else {\n $resource = $this->repo->all();\n }\n if (!$resource) {\n return $this->errorNotFound('Resource not found');\n }\n return $this->apiOk($resource);\n }", "title": "" }, { "docid": "060b373609f7e0db718e407076c66e1d", "score": "0.68629915", "text": "public function indexAction()\n {\n $this->tag->setTitle(__('Firewalls'));\n // Available sort to choose\n $this->filter->add('in_array', function($value) {\n return in_array($value, ['name', 'name DESC', 'status', 'status DESC']) ? $value : null;\n });\n\n // Get networks and prepare pagination\n $paginator = new Paginator([\n \"data\" => Firewalls::find(['order' => $this->request->getQuery('order', 'in_array', 'id', true)]),\n \"limit\" => $this->request->getQuery('limit', 'int', 20, true),\n \"page\" => $this->request->getQuery('page', 'int', 1, true)\n ]);\n\n $this->view->setVars([\n 'pagination' => $paginator->getPaginate(),\n ]);\n }", "title": "" }, { "docid": "0473d264241dfecb205046df754f7ad1", "score": "0.6856284", "text": "public function index() {\n $resources = static::$resource::orderBy(static::$orderBy)->paginate(static::$pageSize);\n return view($this->getView('index'), [static::$varName[1] ?? $this->getResourcePluralName() => $resources]);\n }", "title": "" }, { "docid": "efde97fbf9254ea0e2b2b7023e05101a", "score": "0.68546814", "text": "public function indexAction()\n {\n\t\tif(!Engine_Api::_()->core()->hasSubject('list_listing')) {\n\t\t\treturn $this->setNoRender();\n\t\t}\n\n\t\t//GET LISTING SUBJECT\n\t\t$subject = Engine_Api::_()->core()->getSubject();\n\n\t\t//GET VARIOUS WIDGET SETTINGS\n\t\t$this->view->statisticsRating = (int) Engine_Api::_()->getApi('settings', 'core')->getSetting('list.rating', 1);\n\t\t$this->view->truncation = $this->_getParam('truncation', 23);\n\t\t$related = $this->_getParam('related', 'categories');\n\n\t\t$params = array();\n\n\t\tIf($related == 'tags') {\n\n\t\t\t//GET TAGS\n\t\t\t$listingTags = $subject->tags()->getTagMaps();\n\n\t\t\t$params['tags'] = array();\n\t\t\tforeach ($listingTags as $tag) {\n\t\t\t\t$params['tags'][] = $tag->getTag()->tag_id;\n\t\t\t}\n\n\t\t\tif(empty($params['tags'])) {\n\t\t\t\treturn $this->setNoRender();\n\t\t\t}\n\n\t\t}\n\t\telseif($related == 'categories') {\n\t\t\t$params['category_id'] = $subject->category_id;\n\t\t}\n\t\telse {\n\t\t\treturn $this->setNoRender();\n\t\t}\n\n //FETCH LISTINGS\n\t\t$params['listing_id'] = $subject->listing_id;\n $params['orderby'] ='RAND()';\n $params['limit'] = $this->_getParam('itemCount', 3);\n $this->view->paginator = Engine_Api::_()->getDbtable('listings', 'list')->widgetListingsData($params);\n\n if (Count($this->view->paginator) <= 0) {\n return $this->setNoRender();\n }\n }", "title": "" }, { "docid": "248744b37e08a9b9e31438a427fee7ee", "score": "0.68331116", "text": "public function index()\n {\n $module = Module::get('Resources');\n \n if(Module::hasAccess($module->id)) {\n return View('la.resources.index', [\n 'show_actions' => $this->show_action,\n 'listing_cols' => Module::getListingColumns('Resources'),\n 'module' => $module\n ]);\n } else {\n return redirect(config('laraadmin.adminRoute') . \"/\");\n }\n }", "title": "" }, { "docid": "954a21a94c60b4569f28c882641e7298", "score": "0.68295634", "text": "public function index()\n {\n return view('admin.resources.index', [\n 'resources' => Resource::published()->get()\n ]);\n }", "title": "" }, { "docid": "ac3d7b3949ed4508eaeabfca96b1ae5e", "score": "0.6819477", "text": "protected function listAction()\n {\n $this->dispatch(EasyAdminEvents::PRE_LIST);\n\n $extFilters = $this->request->query->get('ext_filters');\n if(isset($extFilters['entity.gallery'])) {\n $dql = 'entity.gallery = ' . $extFilters['entity.gallery'];\n $this->entity['list']['dql_filter'] = $dql;\n }\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": "e4a0d12ede1642140b2b2864bea7bde8", "score": "0.6817071", "text": "public function show_list();", "title": "" }, { "docid": "a63fe3d362e9ed8bdeb8c498c0f70dc8", "score": "0.68072224", "text": "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n //dump($todos);\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "title": "" }, { "docid": "b27b06ba87e23efaf02018ba6a48d4b4", "score": "0.68071634", "text": "public function index()\n {\n /// Get cars\n $cars = Car::paginate();\n\n // Return collection of articles as a resource\n return CarResource::collection($cars);\n }", "title": "" }, { "docid": "8e473fb8d57781fcbb301d794e4638b7", "score": "0.68054026", "text": "public function listResources();", "title": "" }, { "docid": "ae6ac1129584c76c474a8718bca91c33", "score": "0.6780087", "text": "public function ListView() {\n $this->Render();\n }", "title": "" }, { "docid": "ecd287988f4b7da6fd1ee3a4ce0dbbb4", "score": "0.6772568", "text": "public function index()\n {\n $tickets = TicketsModel::paginate(10);\n\n //passing data to resource\n return TicketsResource::collection($tickets);\n }", "title": "" }, { "docid": "e33620f9e0602f70ef6cab4f1bdb2610", "score": "0.67710763", "text": "public function index()\n\t{\n\t\t$this->listar();\n\t}", "title": "" }, { "docid": "1791d7d351176ff2ce62051654642a7d", "score": "0.6743463", "text": "public function indexAction()\n {\n $this->render('lists/index', array(\n 'title' => 'Todo Lists',\n 'lists' => TodoList::all()\n ));\n }", "title": "" }, { "docid": "a62c8fb3c6a39b17143e4f99a44215eb", "score": "0.674278", "text": "public function index()\n {\n // Get Products\n $products = Product::paginate(15);\n\n // Return collection of products as a resource\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "3cb20d494ffa4e3923d82dc428173efe", "score": "0.67425853", "text": "public function listAction()\n {\n $date = array();\n $date['year'] = $this->_getParam('year', null);\n $date['month'] = $this->_getParam('month', null);\n $date['day'] = $this->_getParam('day', null);\n\n $model = $this->_getPhotoModel();\n\n $by = $this->_getParam('by', null);\n if ($by == 'taken_at') {\n $entries = $model->fetchEntriesByTakenAt($date, $this->_getParam('page', 1));\n } else {\n $entries = $model->fetchEntriesByCreated($date, $this->_getParam('page', 1));\n }\n $this->view->paginator = $entries;\n }", "title": "" }, { "docid": "04105211a75ba7457c72346a442bef90", "score": "0.6742193", "text": "function Index()\n\t\t{\n\t\t\t$this->DefaultParameters();\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": "f1af362b177db60f1aa234951fb3dd26", "score": "0.67406327", "text": "public function listAction()\r\n {\r\n\r\n return array(\r\n 'items' => $this->getMapper()->findAll()\r\n );\r\n }", "title": "" }, { "docid": "1ad218b37000705f13503d05f42e31f8", "score": "0.6729927", "text": "public function listing(){\n //appelle constructeur produit\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67255723", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67255723", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "8bc383be0c0551987008cc1e903dfb3e", "score": "0.6717295", "text": "function listing(){ \n $data['title'] = 'Senarai Selenggaraan';\n $this->_render_page($data);\n }", "title": "" }, { "docid": "465ee43697fce30b312a8f52108bb059", "score": "0.6708992", "text": "public function listAction ( )\n {\n $model = $this->getModel('Scale');\n $request = $this->getRequest();\n\n $this->view->items = $model->paginate($request->getParams());\n\n }", "title": "" }, { "docid": "5370c2b221a0c31116fb4369ab9f4812", "score": "0.66993403", "text": "public function actionIndex()\n {\n // init Active Record\n $query = new ProfileRecords();\n\n // set current page and offset\n $page = (int)$this->request->query->get('page');\n $offset = $page * self::ITEM_PER_PAGE;\n\n // build pagination\n $pagination = new SimplePagination([\n 'url' => ['profile/index'],\n 'page' => $page,\n 'step' => self::ITEM_PER_PAGE,\n 'total' => $query->count()\n ]);\n\n // build listing objects\n $records = $query->orderBy('id', 'desc')->skip($offset)->take(self::ITEM_PER_PAGE)->get();\n\n // display viewer\n return $this->view->render('index', [\n 'records' => $records,\n 'pagination' => $pagination\n ]);\n }", "title": "" }, { "docid": "ec97d24c4e19a5128b0e53c5846b9bf5", "score": "0.669244", "text": "public function index()\n {\n return $this->getList();\n\n }", "title": "" }, { "docid": "ff020d8354464758e72e91a912f20d8e", "score": "0.66923076", "text": "public function actionList()\n {\n $list = $this->viewList('car');\n $imgs = ImageModel::load('img/car/logo/');\n return $this->render('list',compact('list','imgs'));\n }", "title": "" }, { "docid": "cd9c5c4bfebd4034e9aab606b543d95a", "score": "0.66892284", "text": "public function index()\n {\n $todos = Todo::paginate(50);\n return TodosResource::collection($todos);\n }", "title": "" }, { "docid": "5509d28122c561e86197cbcc735e8008", "score": "0.6688171", "text": "public function index()\n {\n $products = Product::filter()->paginate();\n\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "712af5c8b3ebcbb93ccacf71c37b0d64", "score": "0.66876715", "text": "public function index()\n {\n return ResourceResource::collection(auth()->user()->resources);\n }", "title": "" }, { "docid": "7ee6025c5609ac52b9b1dbb4db5ac2f3", "score": "0.6686426", "text": "public function index()\n\t{\n\t\tlist_details();\n\t}", "title": "" }, { "docid": "ffb17c08a85c1385b784beb46e5b3ade", "score": "0.66860104", "text": "public function index()\n {\n $artists = Artist::orderBy('sort', 'asc')->get();\n\n return ArtistResource::collection($artists);\n }", "title": "" }, { "docid": "10a81357fb2912f13e91cd4d9b24c4d0", "score": "0.66837037", "text": "public function listAction()\n {\n $contentObject = $this->configurationManager->getContentObject();\n $header = $contentObject->data['header'];\n\n $this->view->assign('header', $header);\n $this->view->assign('plays', $this->playRepository->findAll());\n }", "title": "" }, { "docid": "4749d27d60b7528b95f66725757fb6f5", "score": "0.66763073", "text": "public function listAction()\n {\n $tags = $this->getTags();\n $this->view->assign('tags', $tags);\n }", "title": "" }, { "docid": "148383f68d3328f7ff820d3aa26f22ff", "score": "0.6669373", "text": "public function indexAction()\n\t{\n\t\t$this->_view->_title \t\t\t\t= ucfirst($this->_arrParam['controller']) . \" Controller :: List\";\n\n\t\t//Total Items\n\t\t$this->_view->itemsStatusCount \t\t= $this->_model->countItems($this->_arrParam, ['task' => 'count-items-status']);\n\t\t$itemCount \t\t\t\t\t\t\t= $this->_model->countItems($this->_arrParam, ['task' => 'count-items-status']);\n\t\t$configPagination \t\t\t\t\t= ['totalItemsPerPage' => 5, 'pageRange' => 3];\n\t\t$this->setPagination($configPagination);\n\t\t$status \t\t\t\t\t\t\t= $this->_arrParam['status'] ?? 'all';\n\t\t$this->_view->pagination \t\t\t= new Pagination($itemCount[$status], $this->_pagination);\n\n\t\t//List Items\n\t\t$this->_view->items \t\t\t\t= $this->_model->listItems($this->_arrParam);\n\t\t$this->_view->slbCategory \t\t\t\t= [0 => ' - Select Category - '] + $this->_model->itemInSelectbox($this->_arrParam, null);\n\t\t$this->_view->render($this->_arrParam['controller'] . '/index');\n\t}", "title": "" }, { "docid": "b4ab065b5e289a80de47b28c29b12ba7", "score": "0.6668575", "text": "public function index()\n {\n /* authorization */\n $this->authorize('viewAny', Family::class);\n\n $families = Family::all();\n /* return resource collection */\n return FamilyResource::collection($families);\n }", "title": "" }, { "docid": "91774d2a4f88a022706d4cc72b2fb4b9", "score": "0.66636354", "text": "public function _index() {\n\t\t$datas = DAO::getAll ( $this->model );\n\t\techo $this->_getResponseFormatter ()->get ( $datas );\n\t}", "title": "" }, { "docid": "473597c1b0826e1810587ecd7042a12d", "score": "0.6660131", "text": "public function actionIndex()\n {\n $searchModel = new ResourcemanagementSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "68a18d7d7744ddf6d10c85166d9a9672", "score": "0.6658018", "text": "public function listing($arguments);", "title": "" }, { "docid": "0e3a54a39646333a6d375a7c945db124", "score": "0.6655571", "text": "public function listAction()\n {\n $user = $this->getUser();\n $em = $this->getDoctrine()->getManager();\n $films = $em->getRepository(Film::class)\n ->findAll();\n return $this->render('admin/listFilm.html.twig', [\n 'films' => $films,\n 'user' => $user\n ]);\n }", "title": "" }, { "docid": "f186543d4e229fe60c320d197652a0ac", "score": "0.6648046", "text": "public function index()\n {\n return BookResource::collection(Book::paginate());\n }", "title": "" }, { "docid": "6e0e97799dea5e1f1424a0ed54835cae", "score": "0.6646619", "text": "public function index()\n {\n $products = Product::paginate();\n\t\treturn new ListCollection($products);\n }", "title": "" }, { "docid": "12d65a6c55f0fff8b933565f6365be6c", "score": "0.6637915", "text": "public function index() {\n return $this->showAll();\n }", "title": "" }, { "docid": "862f0847ab763608409837b536150716", "score": "0.66368043", "text": "public function indexAction()\r\n\t{\r\n\t\t$this->view->mainTitle = \"Listado de Plantillas\";\r\n\t\t$this->view->errors = $this->_helper->flashMessenger->getMessages();\r\n\t\t\r\n\t\t$nombre = $this->getParam(\"nombre\");\r\n\t\t$plantillas = $this->getRepository()->find($nombre);\r\n\t\t\r\n\t\t$this->view->plantillas = $plantillas;\r\n\t}", "title": "" }, { "docid": "39fb2eb38215d01e980796dd191b4bc2", "score": "0.6624286", "text": "public function index()\n {\n // needs to return multiple articles\n // so we use the collection method\n return ArticleListResource::collection(Article::all());\n }", "title": "" }, { "docid": "77b2fcb12774bae3c68bc3f546be203d", "score": "0.6624218", "text": "public function list ()\n {\n $products = Product::all();\n\n View::load('home', [\n 'products' => $products\n ]);\n\n }", "title": "" }, { "docid": "2564823d78cf46605ebc641dd521408d", "score": "0.6619503", "text": "public function listAction() {\n $this->_datatable();\n return $this->render('BackendBundle:FeastStage:list.html.twig');\n }", "title": "" }, { "docid": "7eb3e9d73404c31d887de34e0e543165", "score": "0.66194737", "text": "public function index()\n {\n $streams = Streams::paginate(15);\n\n return StreamsResource::collection($streams);\n }", "title": "" }, { "docid": "c5562ea22267c67b7e362d148ab229b0", "score": "0.6613858", "text": "public function index ()\n {\n $data = Category::paginate(15);\n\n return $this->display( [ 'data' => $data ] );\n }", "title": "" }, { "docid": "a10012db405ad2f58017047d7c5955a3", "score": "0.66135347", "text": "public function index()\n {\n // get articles\n $articles = Article::paginate(15);\n\n // return collection of articles as a ressource\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "4e546e7736c944aa032aaf9b866565c0", "score": "0.66128606", "text": "public function indexAction() {\n\t\t$this->view->assign('staticLists', $this->staticListService->listAll());\n\t}", "title": "" }, { "docid": "2d2195ebc523704e7f178bd9b4556f73", "score": "0.66104424", "text": "public function index()\n\t{\n\t\t//\n\t\t$resources = \\App\\Resource::with('category')->get();\n\t\treturn view('viewResource',['resources' => $resources ]);\n\t}", "title": "" }, { "docid": "8654188b350eeb0d720961a0f868517e", "score": "0.6602947", "text": "public function indexAction() {\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n\n\t\t//GET SUBJECT AND OTHER SETTINGS\n $this->view->list = Engine_Api::_()->core()->getSubject('list_listing');\n\t\t$settings_api = Engine_Api::_()->getApi('settings', 'core');\n\t\t$this->view->show_featured = $settings_api->getSetting('list.feature.image', 1);\n\t\t$this->view->featured_color = $settings_api->getSetting('list.featured.color', '#0cf523');\n\t\t$this->view->show_sponsered = $settings_api->getSetting('list.sponsored.image', 1);\n\t\t$this->view->sponsored_color = $settings_api->getSetting('list.sponsored.color', '#fc0505');\n\t\t\n //GET VIEWER AND CHECK VIEWER CAN EDIT PHOTO OR NOT\n $viewer = Engine_Api::_()->user()->getViewer();\n\t\t$this->view->can_edit = $this->view->list->authorization()->isAllowed($viewer, \"edit\");\n }", "title": "" }, { "docid": "c6630fa3ab4d194924045c2530a6eaf3", "score": "0.6595211", "text": "public function listAction()\n {\n $model = $this->_owApp->selectedModel;\n $translate = $this->_owApp->translate;\n $store = $this->_erfurt->getStore();\n $resource = $this->_owApp->selectedResource;\n $ac = $this->_erfurt->getAc();\n $params = $this->_request->getParams();\n $limit = 20;\n\n $rUriEncoded = urlencode((string)$resource);\n $mUriEncoded = urlencode((string)$model);\n $feedUrl = $this->_config->urlBase . \"history/feed?r=$rUriEncoded&mUriEncoded\";\n\n $this->view->headLink()->setAlternate($feedUrl, 'application/atom+xml', 'History Feed');\n\n // redirecting to home if no model/resource is selected\n if (\n empty($model) ||\n (\n empty($this->_owApp->selectedResource) &&\n empty($params['r']) &&\n $this->_owApp->lastRoute !== 'instances'\n )\n ) {\n $this->_abort('No model/resource selected.', OntoWiki_Message::ERROR);\n }\n\n // getting page (from and for paging)\n if (!empty($params['page']) && (int) $params['page'] > 0) {\n $page = (int) $params['page'];\n } else {\n $page = 1;\n }\n\n // enabling versioning\n $versioning = $this->_erfurt->getVersioning();\n $versioning->setLimit($limit);\n\n if (!$versioning->isVersioningEnabled()) {\n $this->_abort('Versioning/History is currently disabled', null, false);\n }\n\n $singleResource = true;\n // setting if class or instances\n if ($this->_owApp->lastRoute === 'instances') {\n // setting default title\n $title = $resource->getTitle() ?\n $resource->getTitle() :\n OntoWiki_Utils::contractNamespace($resource->getIri());\n $windowTitle = $translate->_('Versions for elements of the list');\n\n $listHelper = Zend_Controller_Action_HelperBroker::getStaticHelper('List');\n $listName = \"instances\";\n if ($listHelper->listExists($listName)) {\n $list = $listHelper->getList($listName);\n $list->setStore($store);\n } else {\n $this->_owApp->appendMessage(\n new OntoWiki_Message('something went wrong with the list of instances', OntoWiki_Message::ERROR)\n );\n }\n\n $query = clone $list->getResourceQuery();\n $query->setLimit(0);\n $query->setOffset(0);\n //echo htmlentities($query);\n\n $results = $model->sparqlQuery($query);\n $resourceVar = $list->getResourceVar()->getName();\n\n $resources = array();\n foreach ($results as $result) {\n $resources[] = $result[$resourceVar];\n }\n //var_dump($resources);\n\n $historyArray = $versioning->getHistoryForResourceList(\n $resources,\n (string) $this->_owApp->selectedModel,\n $page\n );\n //var_dump($historyArray);\n\n $singleResource = false;\n } else {\n // setting default title\n $title = $resource->getTitle() ?\n $resource->getTitle() :\n OntoWiki_Utils::contractNamespace($resource->getIri());\n $windowTitle = sprintf($translate->_('Versions for %1$s'), $title);\n\n $historyArray = $versioning->getHistoryForResource(\n (string)$resource,\n (string)$this->_owApp->selectedModel,\n $page\n );\n }\n\n if (sizeof($historyArray) == ( $limit + 1 )) {\n $count = $page * $limit + 1;\n unset($historyArray[$limit]);\n } else {\n $count = ($page - 1) * $limit + sizeof($historyArray);\n }\n\n $idArray = array();\n $userArray = $this->_erfurt->getUsers();\n $titleHelper = new OntoWiki_Model_TitleHelper();\n // Load IDs for rollback and Username Labels for view\n foreach ($historyArray as $key => $entry) {\n $idArray[] = (int) $entry['id'];\n if (!$singleResource) {\n $historyArray[$key]['url'] = $this->_config->urlBase . \"view?r=\" . urlencode($entry['resource']);\n $titleHelper->addResource($entry['resource']);\n }\n\n if ($entry['useruri'] == $this->_erfurt->getConfig()->ac->user->anonymousUser) {\n $userArray[$entry['useruri']] = 'Anonymous';\n } else if ($entry['useruri'] == $this->_erfurt->getConfig()->ac->user->superAdmin) {\n $userArray[$entry['useruri']] = 'SuperAdmin';\n } else if (is_array($userArray[$entry['useruri']])) {\n if (isset($userArray[$entry['useruri']]['userName'])) {\n $userArray[$entry['useruri']] = $userArray[$entry['useruri']]['userName'];\n } else {\n $titleHelper->addResource($entry['useruri']);\n $userArray[$entry['useruri']] = $titleHelper->getTitle($entry['useruri']);\n }\n }\n }\n $this->view->userArray = $userArray;\n $this->view->idArray = $idArray;\n $this->view->historyArray = $historyArray;\n $this->view->singleResource = $singleResource;\n $this->view->titleHelper = $titleHelper;\n\n if (empty($historyArray)) {\n $this->_owApp->appendMessage(\n new OntoWiki_Message(\n 'No history for the selected resource(s).',\n OntoWiki_Message::INFO\n )\n );\n }\n\n if ($this->_erfurt->getAc()->isActionAllowed('Rollback')) {\n $this->view->rollbackAllowed = true;\n // adding submit button for rollback-action\n $toolbar = $this->_owApp->toolbar;\n $toolbar->appendButton(\n OntoWiki_Toolbar::SUBMIT,\n array('name' => $translate->_('Rollback changes'), 'id' => 'history-rollback')\n );\n $this->view->placeholder('main.window.toolbar')->set($toolbar);\n } else {\n $this->view->rollbackAllowed = false;\n }\n\n // paging\n $statusBar = $this->view->placeholder('main.window.statusbar');\n // the normal page_param p collides with the generic-list param p\n OntoWiki_Pager::setOptions(array('page_param'=>'page'));\n $statusBar->append(OntoWiki_Pager::get($count, $limit));\n\n // setting view variables\n $url = new OntoWiki_Url(array('controller' => 'history', 'action' => 'rollback'));\n\n $this->view->placeholder('main.window.title')->set($windowTitle);\n\n $this->view->formActionUrl = (string) $url;\n $this->view->formMethod = 'post';\n // $this->view->formName = 'instancelist';\n $this->view->formName = 'history-rollback';\n $this->view->formEncoding = 'multipart/form-data';\n }", "title": "" }, { "docid": "ffa4ab9d8165639a117e4bc3980fc30d", "score": "0.6590207", "text": "public function index()\n {\n //\n // $authors= Author::all();\n $authors = QueryBuilder::for(Author::class)->allowedSorts([\n 'name',\n 'created_at'\n ])->jsonPaginate();\n return AuthorsResource::collection($authors);\n }", "title": "" }, { "docid": "e16b7bcfc7e0c35a6d0ecf74b30d6a20", "score": "0.6588596", "text": "public function index()\n {\n $title = $this->title($this->modelName);\n $modelName = $this->modelName;\n $model = $this->model;\n $listStatus = $this->listStatus;\n $models = Bank::paginate(10);\n return view('bank.lists.index', compact('title', 'models', 'modelName', 'model', 'listStatus'));\n }", "title": "" }, { "docid": "74d4617df84723cff26f33e255390482", "score": "0.65881836", "text": "public function actionIndex()\n {\n $items = ModelGeneral::showItems();\n\n $this->view->render('index', [\n 'items' => $items\n ]);\n }", "title": "" }, { "docid": "0221833762d40c420a048045edcecf8f", "score": "0.6586874", "text": "public function actionList()\n {\n $searchModel = new RecipeRepository();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render([\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "fb55b34f40f8931a10a91283716c2912", "score": "0.6586714", "text": "public function index()\n {\n return ListItem::all();\n }", "title": "" }, { "docid": "d387ade88ed7ada9aa0979d5a0c09bee", "score": "0.6585575", "text": "public function index()\n {\n return ProductResource::collection(Product::paginate());\n }", "title": "" }, { "docid": "c192cad1748d0fe11000b8d2063a908e", "score": "0.65643096", "text": "public function index()\n {\n return $this->view('lists');\n }", "title": "" }, { "docid": "b9b300aec37bbe88214d2c466b083d07", "score": "0.6560596", "text": "public function index()\n {\n // Obtengo los resultados\n $results = Result::all();\n\n // Lo devuelvo como un recurso\n return ResultResource::collection($results);\n }", "title": "" }, { "docid": "e840f12f97ea99ca01a90a9ec9cad7ca", "score": "0.65599096", "text": "public function index()\n {\n return BookResource::collection(Book::with('authors')->paginate(25));\n }", "title": "" }, { "docid": "7056dcfc0479ee6a004c692cbdce673b", "score": "0.65567315", "text": "public function index()\n {\n $operations = $this->Operations->getAllOperations();\n $this->set(compact('operations'));\n }", "title": "" }, { "docid": "19e51010afc5a8251ed229fa24e89b84", "score": "0.6555101", "text": "public function index()\n {\n $items = Item::search()->paginate(10);\n return view('item.list', compact('items'));\n }", "title": "" }, { "docid": "451b54ad54f4267a96a3c9a18faae916", "score": "0.6552225", "text": "function index()\n {\n $this->listArticles();\n }", "title": "" }, { "docid": "8ffe23111661c679bede8757d6ebad59", "score": "0.65496445", "text": "public function index()\n\t{\n\t\t$data['lists'] = $this->role_model->get_all();\n\t\t$this->template->set('title', 'Role List');\n\t\t$this->template->admin('template', 'list', $data);\n\t}", "title": "" }, { "docid": "ea133c7a5d450c0580ac1c613df4b59d", "score": "0.65474623", "text": "public function index()\n {\n //Get Movies\n $movies = Movie::paginate(15);\n\n //return collection of movies as a resource\n return MovieResource::collection($movies);\n }", "title": "" }, { "docid": "46a4b83443e6a7cb9ed2604a7ba376d3", "score": "0.6541433", "text": "public function viewList(): void\n {\n $model = self::fetchModel($this->request->get(self::PARAM_MODEL_NAME));\n $this->response->set(Mvc::TEMPLATE, 'manager');\n $this->response->set(Mvc::CONTEXT, $this->request->get(Mvc::CONTEXT));\n $this->response->set(Mvc::VIEW, $this->request->get(Mvc::VIEW));\n $this->response->set('config', $this->getCrudConfig($model));\n $content = FrontendHelper::parseFile('/var/www/_dev/vendor/noxkiwi/crud/frontend/view/crudfrontend/list.php');\n $this->response->set('content', $content);\n $this->response->set(self::PARAM_MODEL_NAME, $this->modelName);\n }", "title": "" }, { "docid": "f0e979747234803271be38ea6cd3396e", "score": "0.65383667", "text": "public function index()\n\t{\n\t\t$categories = Category::paginate(5);\n\t\treturn CategoryResource::collection($categories);\n\t}", "title": "" }, { "docid": "e08fd6cadf8c20cad7196e73194fba35", "score": "0.65371203", "text": "public function index()\n {\n return $this->service->showAll();\n }", "title": "" }, { "docid": "f852b02ada9624be17ccc6c0b233bca4", "score": "0.65288365", "text": "public function list()\n {\n }", "title": "" }, { "docid": "de74480294a1123dacaf091a018a43f7", "score": "0.6526695", "text": "public function _index(){\n\t $this->_list();\n\t}", "title": "" }, { "docid": "3a2bf5049606c1975209783c9d992936", "score": "0.652094", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $recipes = $em->getRepository('AppBundle:Recipe')->findAll();\n\n return $this->render('@frontend/recipe/list.html.twig', array(\n 'recipes' => $recipes\n ));\n }", "title": "" }, { "docid": "976cbb5be4594e239e987a2fbcbe8b3a", "score": "0.6513086", "text": "public function index()\n {\n return FieldResource::collection(Field::paginate());\n }", "title": "" }, { "docid": "901678e4ca1d10119628a2768429725f", "score": "0.65128183", "text": "public function index()\n {\n return AlbumResource::collection(\\App\\Album::orderBy('created_at', 'desc')->get());\n }", "title": "" }, { "docid": "f2cedab0962de588e01c1716c1790aad", "score": "0.65068287", "text": "public function index()\n {\n // return Response::json(request()->route(), 200);\n $action = \"SHOW \" . $this->page;\n try {\n $search = request()->get(\"search\");\n $isPaging = request()->exists(\"page\");\n\n $model = $this->model::query();\n\n // If admin searches for any name\n if (!empty($search)) {\n $model = $model->whereName($search);\n }\n\n if (isset($this->loadParam['read'])) {\n if(isset($this->loadParam['read']['with'])) {\n $withs = explode(',', $this->loadParam['read']['with']);\n foreach ($withs as $with) {\n $model = $model->with($with);\n }\n }\n }\n\n // Provide based on paging or not\n if ($isPaging) {\n $model = $model\n ->orderBy('id', 'desc')->paginate();\n } else {\n $model = $model\n ->orderBy('id', 'desc')->get();\n }\n\n // If permission has data\n if ($model) {\n $this->lg($this->page . ' list shown', 'info', $action, 200);\n return response()->json($model);\n } else {\n $this->lg($this->page . ' list not found', 'warning', $action, 404);\n return response()->json(\"Not found\", 404);\n }\n } catch (\\Exception $e) {\n $this->lg($e, 'error', $action, 500);\n return response()->json($this->experDifficulties, 500);\n }\n }", "title": "" }, { "docid": "ef707fce78cb544fb65c0a4e38796dff", "score": "0.65030056", "text": "private function showList(): void\n {\n $msg = \"Welcome customer, to view the product list type: list\\n\";\n echo $msg;\n while ($command = $this->getInput() !== 'list') {\n echo $msg;\n };\n $products = Route::goTo('list');\n $this->products = $products;\n foreach ($this->products as $product) {\n echo $product->toString() . \"\\n\";\n }\n }", "title": "" }, { "docid": "a281ecc70e3d52bd2ee1e4bfba8e1724", "score": "0.6497771", "text": "public function index()\n {\n return SongResource::collection(Song::all()->sortByDesc('created_at'));\n }", "title": "" }, { "docid": "7f844292b4038bfed459f1130c7632dd", "score": "0.64967513", "text": "public function listAction()\n {\n $this->view->assign('articles', $this->repository->findForListPlugin($this->settings, $this->getData()));\n }", "title": "" }, { "docid": "ff30a4ae8d49f1706d1dbd328394a294", "score": "0.6493153", "text": "public function index()\n {\n $brands = Brand::query()->paginate();\n return BrandResource::collection($brands);\n }", "title": "" }, { "docid": "629569270186c168f2f698db8154b51a", "score": "0.6487244", "text": "public function index()\n {\n $articles = Article::query()->latest()->paginate(10);\n\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "228d685d5f1d86518c57ce853ccd52ef", "score": "0.64868814", "text": "public function listAction() {\n\t\t$literatures = $this->literatureRepository->findAll();\n\t\t$this->view->assign('literatures', $literatures);\n\t}", "title": "" }, { "docid": "25aaedcb3f8fbe36cdc02986a86cf453", "score": "0.64846873", "text": "public function index()\n {\n // Get Specifications\n $specifications = Specification::orderBy('created_at', 'desc')->paginate(100);\n\n // Return collection of Specifications as a resource\n return SpecificationResource::collection($specifications);\n }", "title": "" }, { "docid": "e4ed0c12368721c8003fa5e2056a624b", "score": "0.6479523", "text": "public function indexAction()\n {\n $user = $this->get('security.context')->getToken()->getUser();\n \n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('BricksSiteBundle:ExternalResource')->findBy(\n array(),\n array('title' => 'ASC')\n );\n\n return array(\n 'entities' => $entities,\n );\n }", "title": "" }, { "docid": "d4e011bbb309b20dccd6a637cae8b802", "score": "0.64744496", "text": "public function index()\n {\n return response(TodoResource::collection(Todo::all()), 200);\n }", "title": "" } ]
1af32ae4d50d935a5ac11bb7e06c372f
must be overridden in your subclass
[ { "docid": "b67943b535805377d8b84f06af4f7b77", "score": "0.0", "text": "public function query() {}", "title": "" } ]
[ { "docid": "b4e425e88b336f2040e816b9d78c807f", "score": "0.71509904", "text": "protected function __init__() { }", "title": "" }, { "docid": "879f8fcf2f0e8ee3fd4ee61e782629e8", "score": "0.7104779", "text": "protected function __construct()\t{}", "title": "" }, { "docid": "bf576553ec72294462117443a185f534", "score": "0.7054109", "text": "protected function __construct(){}", "title": "" }, { "docid": "bf576553ec72294462117443a185f534", "score": "0.7054109", "text": "protected function __construct(){}", "title": "" }, { "docid": "bf576553ec72294462117443a185f534", "score": "0.7054109", "text": "protected function __construct(){}", "title": "" }, { "docid": "bf576553ec72294462117443a185f534", "score": "0.7054109", "text": "protected function __construct(){}", "title": "" }, { "docid": "c597bf71f08d7d71c2c7e075fc8868fd", "score": "0.7007786", "text": "function __construct(){\n\t\t parent::__construct();\n\t\t \n }", "title": "" }, { "docid": "40f5283130841cfdee95a16c6c4e88f9", "score": "0.6998385", "text": "function __construct(){\n parent::__construct();\n\t\t \n\t\t\t\n\t\t}", "title": "" }, { "docid": "ac6bd9bfa01888f68acf491fb84d716e", "score": "0.6981951", "text": "final protected function __construct(){}", "title": "" }, { "docid": "792dbaf4da88e152434bef62725d80f0", "score": "0.69601685", "text": "function __construct()\r\r\r\n {\r\r\r\n parent::__construct();\r\r\r\n }", "title": "" }, { "docid": "47c16d0ed748e96520e063f54a820397", "score": "0.694934", "text": "function __construct()\n\t\t {\n\t\t\t parent::__construct();\n\t\t }", "title": "" }, { "docid": "ea0db09f4336a2572e994ff745c2ff4a", "score": "0.69420564", "text": "private function __construct(){\n\t\t\n\t}", "title": "" }, { "docid": "8abc7ed0fcac70cce3edae671b93ffd4", "score": "0.6922538", "text": "protected function __construct () {}", "title": "" }, { "docid": "6b8b1bb15e694ec71ec64f1f2cc7b986", "score": "0.6916061", "text": "protected function __construct() {\n\t\t\n\t}", "title": "" }, { "docid": "8b5cd06d16587a8887c31d65ac3a997e", "score": "0.69152147", "text": "private function __construct()\r\n\t\t{\r\n\r\n\t\t}", "title": "" }, { "docid": "dbc2772fe08b02787d680e357fae801e", "score": "0.6909256", "text": "public function __construct(){\n \t// Nothing i can think of. Yet.\t\n }", "title": "" }, { "docid": "f865c8a775f1b96c34e54fbddf8f9596", "score": "0.69073737", "text": "function __construct() {\n\t\tparent::__construct();\t\n\t}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.6889758", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.6889758", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.6889758", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.6889758", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.6889758", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.6889758", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.6889758", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.6889758", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.6889758", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.6889758", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.6889758", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.6889758", "text": "protected function __construct() {}", "title": "" }, { "docid": "b549aa5bf231170bdb4d519c92afc267", "score": "0.687759", "text": "function __construct()\r\r\n {\r\r\n parent::__construct();\r\r\n\t\t\r\r\n }", "title": "" }, { "docid": "b549aa5bf231170bdb4d519c92afc267", "score": "0.687759", "text": "function __construct()\r\r\n {\r\r\n parent::__construct();\r\r\n\t\t\r\r\n }", "title": "" }, { "docid": "f1f57cbbf3b17026ed6e18877ebcea1b", "score": "0.68752116", "text": "function __construct() {\n parent::__construct();\t\n }", "title": "" }, { "docid": "f9fa1a1e15c608107ecf1adfa5838de0", "score": "0.6873435", "text": "protected function __construct ()\n\t{}", "title": "" }, { "docid": "c8f13677738c8bbad182238b4dce3a3c", "score": "0.68552506", "text": "private function __construct() {\r\n \r\n }", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6847106", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6847106", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6847106", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6847106", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6847106", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6847106", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6847106", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6847106", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6847106", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6847106", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6847106", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6847106", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6847106", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6847106", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6847106", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6847106", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6847106", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6847106", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6847106", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6847106", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6847106", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.6847106", "text": "private function __construct(){}", "title": "" }, { "docid": "726bec29b5c2471291512b525ad27ab8", "score": "0.68425196", "text": "private function __construct(){\r\n\r\n\t\t}", "title": "" }, { "docid": "370c1737d7d16c787b52c34ce20b424c", "score": "0.6833166", "text": "function __construct() \n \t{\n parent::__construct(); \n \t }", "title": "" }, { "docid": "e30211fe04721d414e61a5a961fe2b22", "score": "0.6829343", "text": "public function __construct() {\n\t\tparent::__construct();\n\t\t\t\n\t}", "title": "" }, { "docid": "0c354192dafab74123e84016ef5fd4d0", "score": "0.6826343", "text": "function __construct() {\n\t\tparent::__construct();\n\t\t\n\t}", "title": "" }, { "docid": "c61dfc5b48a31e719088ec6046f21a5a", "score": "0.6822258", "text": "function __construct()\n\t\t{\n\t\t\tparent::__construct();\n\t\t}", "title": "" }, { "docid": "c61dfc5b48a31e719088ec6046f21a5a", "score": "0.6822258", "text": "function __construct()\n\t\t{\n\t\t\tparent::__construct();\n\t\t}", "title": "" }, { "docid": "c61dfc5b48a31e719088ec6046f21a5a", "score": "0.6822258", "text": "function __construct()\n\t\t{\n\t\t\tparent::__construct();\n\t\t}", "title": "" }, { "docid": "7ba74cf80319857b879252eb0e239339", "score": "0.68217206", "text": "private function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "7ba74cf80319857b879252eb0e239339", "score": "0.68217206", "text": "private function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "7ba74cf80319857b879252eb0e239339", "score": "0.68217206", "text": "private function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "d9a4b9459b72dac207f4aa549cae522b", "score": "0.68195534", "text": "function _construct() {\n parent::_construct();\n }", "title": "" }, { "docid": "d9a4b9459b72dac207f4aa549cae522b", "score": "0.68195534", "text": "function _construct() {\n parent::_construct();\n }", "title": "" }, { "docid": "9338eba41b8a6bec12c79bfab57e35ef", "score": "0.681694", "text": "function __construct()\r\n {\r\n parent::__construct();\r\n\t\t \r\n }", "title": "" }, { "docid": "82b2fec70d74bb46c033845355f283e5", "score": "0.68056893", "text": "private function __() {\n }", "title": "" }, { "docid": "82b2fec70d74bb46c033845355f283e5", "score": "0.68056893", "text": "private function __() {\n }", "title": "" }, { "docid": "82b2fec70d74bb46c033845355f283e5", "score": "0.68056893", "text": "private function __() {\n }", "title": "" }, { "docid": "cb1570226440cc272f12c988b67fb9cc", "score": "0.67992306", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t\n\t}", "title": "" }, { "docid": "fdf85b762f98fee71c3884999d2623a4", "score": "0.6798135", "text": "private function __construct() \n\t{ \n\t}", "title": "" }, { "docid": "1336b82c219e6cd8b456607939bc90c0", "score": "0.67957574", "text": "function __construct()\n\t {\n\t parent::__construct();\n\t \n\t }", "title": "" }, { "docid": "8cf0f1e2117d3299a2d7409aff2a3e32", "score": "0.6786934", "text": "private function __construct()\n\t{}", "title": "" }, { "docid": "9764d39d5b562ccd8461566e36441d59", "score": "0.67847085", "text": "public function __construct(){\n\t\t/* calling parent construct */\n\t\tparent::__construct();\n\t}", "title": "" }, { "docid": "9764d39d5b562ccd8461566e36441d59", "score": "0.67847085", "text": "public function __construct(){\n\t\t/* calling parent construct */\n\t\tparent::__construct();\n\t}", "title": "" }, { "docid": "8b241767955adcd4ca96669e2a73a76d", "score": "0.6783565", "text": "public function __construct(){\r\n\t\tparent::__construct();\r\n\t\t\r\n\t}", "title": "" }, { "docid": "42d48a64aec06772020f837c1da0b7d6", "score": "0.678174", "text": "private function __construct()\r\n\t{\r\n\t}", "title": "" }, { "docid": "b4e430b0901fa78518fcd3c926da6c42", "score": "0.6779516", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\n\t}", "title": "" }, { "docid": "2a23b7f0b5a7d3ba70add303c76c2dc5", "score": "0.6776543", "text": "public function __construct()\r\n\t\t{\r\n\t\t\tparent::__construct();\r\n\t\t}", "title": "" }, { "docid": "0fe83ac894d5dfebda4d5d8de53fe075", "score": "0.6776077", "text": "function __construct()\n\t{\n\t\t\tparent::__construct();\n\t}", "title": "" }, { "docid": "68a4ee9eb387cc45b50e1a89af59c21c", "score": "0.67749524", "text": "final private function __construct() {\r\n \r\n }", "title": "" }, { "docid": "d3a202309cdd9693e60e44c3521451ba", "score": "0.67721266", "text": "public function __construct ( )\n\t{\n\t \t\n\t}", "title": "" }, { "docid": "86d9e9cd6586936032311c7b690c546c", "score": "0.6771209", "text": "private function __construct(){\r\n\r\n\t}", "title": "" }, { "docid": "86d9e9cd6586936032311c7b690c546c", "score": "0.6771209", "text": "private function __construct(){\r\n\r\n\t}", "title": "" }, { "docid": "c65301f3663433a35de375a929f7240c", "score": "0.6770266", "text": "function __construct()\n\t {\n\t parent::__construct();\n\t }", "title": "" }, { "docid": "c65301f3663433a35de375a929f7240c", "score": "0.6770266", "text": "function __construct()\n\t {\n\t parent::__construct();\n\t }", "title": "" }, { "docid": "3ffdf066fb8ea5e28eb2b62f3e58fc36", "score": "0.67699355", "text": "function __construct () {\n\t\tparent::__construct();\n\t\t\n\t}", "title": "" }, { "docid": "b4dea6e3a535f4339e8d2598390bbace", "score": "0.676744", "text": "function __construct() \n\t{\n\t\tparent::__construct(); \n\t}", "title": "" }, { "docid": "b4dea6e3a535f4339e8d2598390bbace", "score": "0.676744", "text": "function __construct() \n\t{\n\t\tparent::__construct(); \n\t}", "title": "" }, { "docid": "b4dea6e3a535f4339e8d2598390bbace", "score": "0.676744", "text": "function __construct() \n\t{\n\t\tparent::__construct(); \n\t}", "title": "" }, { "docid": "1f25fb4304ccc7dbec68a9d42d6f422c", "score": "0.6767424", "text": "private function __construct() { \n \n }", "title": "" }, { "docid": "c37b5d0a497e1b78bc142bee7659009e", "score": "0.6765915", "text": "private function __construct(){\n\t\treturn;\n\t}", "title": "" }, { "docid": "abefd0df11dfb91965298a0a58368cd2", "score": "0.6763697", "text": "public function __construct()\n \t{\n \t\tparent::__construct();\n \t}", "title": "" }, { "docid": "e5e0927b7c617cdf7a78051308987e9f", "score": "0.6761331", "text": "function __construct()\r\r\n {\r\r\n parent::__construct();\r\r\n }", "title": "" }, { "docid": "ec2aeaf4312836debca5b5af31089a67", "score": "0.6757105", "text": "public function __construct(){\n\t\t# make sure parent class's __construct funciton is called\n\t\tparent::__construct();\n\t}", "title": "" }, { "docid": "987421464409ba2854db618c793d6f8c", "score": "0.6757036", "text": "function __construct() {\r\n\t\tparent::__construct ();\r\n\t}", "title": "" }, { "docid": "e25527327366f8e688fd5d0417803172", "score": "0.67554015", "text": "function __construct()\r\n\t{\r\n\t\tparent::__construct();\r\n\t}", "title": "" }, { "docid": "e25527327366f8e688fd5d0417803172", "score": "0.67554015", "text": "function __construct()\r\n\t{\r\n\t\tparent::__construct();\r\n\t}", "title": "" } ]
5dc47526586c4abdf3ce74a7f84b1773
retourne la liste des environnement de DSIT, remplissage dynamique de select
[ { "docid": "2931ffabddd37da2fde9f3c31ea3a882", "score": "0.0", "text": "public function json_get_select_for_application($application_id){\r\n $this->autoRender = false;\r\n $conditions = array();\r\n $conditions[] = 'Dsitenv.application_id = '.$application_id;\r\n $conditions[] = 'Dsitenv.ACTIF = 1';\r\n $list = $this->Dsitenv->find('list',array('fields'=>array('Dsitenv.NOM','Dsitenv.id'),'conditions'=>$conditions,'order'=>array('Dsitenv.NOM'=>'asc'),'recursive'=>0));\r\n return json_encode($list);\r\n }", "title": "" } ]
[ { "docid": "9245657492d5da22ffe5c16ec2b38bc4", "score": "0.62183094", "text": "function listEnvironments($con, $def_envID)\n\t{\n\t\t# Default value for the environment dropdown\n\t\t$sql_env = \"SELECT envID, envName FROM environments\";\n\t\t$result_env = $con->query($sql_env) or die(mysqli_error($con));\n\t\n\t\t$list_env = \"\";\n\t\twhile($rowv = mysqli_fetch_array($result_env))\n\t\t{\n\t\t\t$envID = htmlspecialchars($rowv['envID']);\n\t\t\t$envName = htmlspecialchars($rowv['envName']);\n\t\n\t\t\tif($envID == $def_envID) { $selected = \"selected='true'\"; } else { $selected = \"\"; }\n\t\n\t\t\t$list_env .= \"<option value='$envID' $selected>$envName</option>\";\n\t\t}\n\n\t\treturn $list_env;\n\t}", "title": "" }, { "docid": "5a71c1b554067f922ed2b930d3518fee", "score": "0.6068015", "text": "public function getEnvironments();", "title": "" }, { "docid": "90e51f146ed966840999df77c6baed40", "score": "0.56412345", "text": "function donne_liste_server ($db,$id_equipement_recu)\n{\n $txt='';\n $message='';\n $query=\"SELECT id_equipement,e.id_equipement_constructeur,nom_equipement,model_equipement,ref_equipement,nom_equipement_constructeur from equipement e ,equipement_constructeur c where id_type_equipement='4' and e.id_equipement_constructeur=c.id_equipement_constructeur order by id_equipement_constructeur\";\n\n $result = $db->query($query);\n $constructeur=\"\";\n global $select_equipement;\n // <optgroup label=\"Europe\">\n if (!$result) {\n //$message = 'Requête invalide : ' . mysql_error() . \"\\n\";\n $message .= 'Requête complète : ' . $query;\n die($message);\n }\n else {\n $txt.= '<option value=0>'.$select_equipement.'</option>';\n while ($donnees_portable = $result->fetch())\n {\n if ( $constructeur != $donnees_portable['nom_equipement_constructeur']){\n $txt.=\"<optgroup label=\".$donnees_portable['nom_equipement_constructeur'].\">\";\n }\n $constructeur=$donnees_portable['nom_equipement_constructeur'];\n $model_equipement=$donnees_portable['model_equipement'];\n $id_equipement=$donnees_portable['id_equipement'];\n $nom_equipement=$donnees_portable['nom_equipement'];\n $ref_equipement=$donnees_portable['ref_equipement'];\n $constructeur_equipement=$donnees_portable['constructeur_equipement'];\n if ( $id_equipement_recu == $id_equipement)\n $txt.= '<option value='.$id_equipement.' selected>'.$constructeur_equipement.' '.$nom_equipement.' '.$model_equipement.' '.$ref_equipement.'</option>';\n else\n $txt.= '<option value='.$id_equipement.'>'.$constructeur_equipement.' '.$nom_equipement.' '.$model_equipement.' '.$ref_equipement.'</option>';\n }\n return $txt;\n }\n}", "title": "" }, { "docid": "65c51fc794927ededd91d00bf691f344", "score": "0.56271386", "text": "public function Lista_Ciudades()//FUNCION PARA LLAMAR LA LISTA DE DEPARTAMENTOS\n {\n \n include('conexion.php');\n \n\n $Consulta_Ciudad = \"SELECT * FROM p_ciudad ORDER BY ciud_nombre\";\n\t\t\t $Resultado_Consulta_Ciudad = $conexion->prepare($Consulta_Ciudad);\n $Resultado_Consulta_Ciudad->execute();\n\t\t\t\t\t while ($f = $Resultado_Consulta_Ciudad->fetch())\t\n {\n\t\t\t\t\t\t echo '<option value=\"'.$f[ciud_codigo].'\">'.$f[ciud_nombre].'</option>';\n }\n \n }", "title": "" }, { "docid": "e492a9e3000291b7cafd54d3a9d2d5f0", "score": "0.5615927", "text": "function consultarenviodetalles (){\n\t\t$x = $this->pdo->prepare('SELECT * FROM enviodetalles');\n\t\t$x->execute();\n\t\treturn $x->fetchALL(PDO::FETCH_OBJ);\n\t}", "title": "" }, { "docid": "d1e281e231ea621e26b31a66ced198db", "score": "0.5552844", "text": "public function temaList() {\r\n\r\n header(\"Content-Type: text/plain; charset=utf-8\"); //Para evitar problemas de acentos\r\n\r\n $asignatura = $this->input->post('asignatura');\r\n\r\n\r\n\r\n //tema list\r\n\r\n $arrParam = array(\"idAsignatura\" => $asignatura);\r\n\r\n $lista = $this->general_model->get_temas($arrParam); //lista de temas\r\n\r\n\r\n\r\n echo \"<option value=''>Select...</option>\";\r\n\r\n if ($lista) {\r\n\r\n foreach ($lista as $fila) {\r\n\r\n echo \"<option value='\" . $fila[\"id_param_temas\"] . \"' >\" . $fila[\"temas\"] . \"</option>\";\r\n\r\n }\r\n\r\n }\r\n\r\n }", "title": "" }, { "docid": "1b5bf534deac5e19ea45d5397a115b23", "score": "0.5522781", "text": "public function testEnvironmentsExist()\n {\n $model = Mage::getModel('full/env');\n $environments = $model->toOptionArray();\n\n $this->assertEquals(\n count($environments),\n 3\n );\n }", "title": "" }, { "docid": "f89e18eb178b4f94b4311a5aab88f93f", "score": "0.548638", "text": "function donne_liste_desktop ($db,$id_equipement_recu)\n{\n $txt='';\n $message='';\n $query=\"SELECT id_equipement,e.id_equipement_constructeur,nom_equipement,model_equipement,ref_equipement,nom_equipement_constructeur from equipement e ,equipement_constructeur c where id_type_equipement='2' and e.id_equipement_constructeur=c.id_equipement_constructeur order by e.nom_equipement,e.model_equipement,e.ref_equipement,id_equipement_constructeur\";\n\n $result = $db->query($query);\n $constructeur=\"\";\n global $select_equipement_desktop;\n // <optgroup label=\"Europe\">\n if (!$result) {\n //$message = 'Requête invalide : ' . mysql_error() . \"\\n\";\n $message .= 'Requête complète : ' . $query;\n die($message);\n }\n else {\n $txt.= '<option value=0>'.$select_equipement_desktop.'</option>';\n while ($donnees_portable = $result->fetch())\n {\n if ( $constructeur != $donnees_portable['nom_equipement_constructeur']){\n $txt.=\"<optgroup label=\".$donnees_portable['nom_equipement_constructeur'].\">\";\n }\n $constructeur=$donnees_portable['nom_equipement_constructeur'];\n $model_equipement=$donnees_portable['model_equipement'];\n $id_equipement=$donnees_portable['id_equipement'];\n $nom_equipement=$donnees_portable['nom_equipement'];\n $ref_equipement=$donnees_portable['ref_equipement'];\n $constructeur_equipement=$donnees_portable['constructeur_equipement'];\n if ( $id_equipement_recu == $id_equipement)\n $txt.= '<option value='.$id_equipement.' selected>'.$constructeur_equipement.' '.$nom_equipement.' '.$model_equipement.' '.$ref_equipement.'</option>';\n else\n $txt.= '<option value='.$id_equipement.'>'.$constructeur_equipement.' '.$nom_equipement.' '.$model_equipement.' '.$ref_equipement.'</option>';\n }\n return $txt;\n }\n}", "title": "" }, { "docid": "2f647957555ac3ea812ce572474d8ab4", "score": "0.54751945", "text": "function _select_option_configuration($chiave,$selection=null){\n \n $ci=&get_instance();\n \n $ci->load->database();\n \n $query = $ci->db->query('SELECT * FROM lm_configuration WHERE nome LIKE ?',array($chiave));\n\n $righe=$query->row_array(0);\n $rows=json_decode($righe[\"codice\"]);\n $html=array();\n \n foreach($rows as $c){\n $selected=($selection==$c->value)?\"selected\":\"\";\n $html[]=\"<option value='\".$c->value.\"' $selected >\".$c->name.\"</option>\";\n }\n \n return join(\"\",$html);\n}", "title": "" }, { "docid": "bacf28cffd2da9e9be7bb81346c76511", "score": "0.5465393", "text": "public function selecUnitdSelectds()\n {\n \n // $itemTypeIds = !empty($_GET['itemTypeIds']) ? $_GET['itemTypeIds'] : '';\n \n\n // if (!empty($itemTypeIds)) {\n\n $getUnitsIdData = DB::select('SELECT * FROM unit_master WHERE is_deleted_status = \"N\"');\n\n if (!empty($getUnitsIdData)) {\n\n foreach ($getUnitsIdData as $units) {\n\n $unitsListHtml = '<option value=\"'.$units->id.'\"';\n $unitsListHtml .= '>'.$units->unit.'</option>';\n\n echo $unitsListHtml; \n\n }\n\n }\n // }\n }", "title": "" }, { "docid": "9a821cebcb32e6bfc7ef89807071d870", "score": "0.5451063", "text": "public function findByConfiguracionesSistemas()\n {\n \n $dql =\n \"SELECT \"\n .\"e \"\n .\"FROM \"\n .RIUtiles::DB_BUNDLE.\":Efectores e \"\n .\"INNER JOIN \"\n .RIUtiles::DB_BUNDLE.\":ConfiguracionesSistemas cs \"\n .\"WHERE \"\n .\"cs.activa = 1 \"\n .\"AND e.idEfector = cs.idEfector \";\n \n try{\n \n $query = $this->getEntityManager()->createQuery($dql);\n \n $efectores = $query->getResult();\n \n } catch (\\Exception $e) {\n\n throw $e;\n }\n \n return $efectores;\n }", "title": "" }, { "docid": "7a3c6436b07cdd20aa884254eccf427c", "score": "0.5440992", "text": "function getLangsOptions($sel = \"\", $arrLangsShow = array() )\n{\n $CI = & get_instance();\n $out = \"\";\n\tforeach($CI->config->item('languages') as $k => $v)\n\t{\n\t if( count($arrLangsShow) > 0 && ! in_array($k,$arrLangsShow)){\n\t continue;\n }\n\t $out .= \"<option \" . ( $k==$sel ? ' selected ' : \"\" ) . \" value='$k'>$v</option>\";\n }\n return $out;\n}", "title": "" }, { "docid": "0dc898e1846739b83c7dc5acefc35008", "score": "0.54367894", "text": "public function getEnvironments(): array\n {\n return $this->environments;\n }", "title": "" }, { "docid": "73dc319d909dd69d1ab7993652951c74", "score": "0.5418276", "text": "function lang_options_for_select($blank = true) {\n\t\t$list = array();\n\t\tforeach (glob(APP . 'Locale/*') as $dir) {\n\t\t\t$path = explode('/', $dir);\n\t\t\t$lang = end($path);\n\t\t\tif ($lang == 'default.pot') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$list[$lang] = $this->get_lang_label($lang);\n\t\t}\n\t\treturn $list;\n\t}", "title": "" }, { "docid": "eeed43fd26f96c541de24c5bf209076b", "score": "0.5403206", "text": "public function fetchOptionsSelect()\n {\n $especies = $this->fetchAll();\n $optionsSelect = [];\n foreach ($especies as $especie) {\n $optionsSelect[$especie->id] = $especie->nome;\n }\n return $optionsSelect;\n }", "title": "" }, { "docid": "db5de5c38e9fab7e3a593917f4b59157", "score": "0.5395925", "text": "public static function dropdownlistsite() {\n $list['0'] = '-- Chọn site --';\n $rs = Yii::app()->cache->get('ext_dropdownlistsite');\n if ($rs === false) {\n $sql = 'SELECT `id`, `name` FROM `tbl_site` WHERE `isHidden`=0 AND `totalLink` > 0 ORDER BY `order`';\n $command = Yii::app()->db->createCommand($sql);\n $rs = $command->queryAll();\n Yii::app()->cache->set('ext_dropdownlistsite', $rs, 600);\n }\n if (is_array($rs)) {\n foreach ($rs as $key => $value) {\n $list[$value['id']] = $value['name'];\n }\n }\n return $list;\n }", "title": "" }, { "docid": "f0948d7bae99457256971f3414719b4a", "score": "0.53454", "text": "public function projects()\n {\n $projectOptions = \"\";\n $projects = Sr_Project_Translation::where('locale', 'en')->get(['sr_project_id', 'name']);\n foreach ($projects as $project) {\n $projectOptions .= \"<option value='$project->sr_project_id'>$project->name</option>\";\n }\n return $projectOptions;\n }", "title": "" }, { "docid": "9a8ea0f1828aa9fd6d694336a05b568a", "score": "0.53411585", "text": "function select_equipement_etat($selected='',$htmlname='fk_etatequipement',$showempty=0,$hidetext=0)\n{\n global $db,$langs,$user,$conf;\n\n\tif (empty($hidetext)) print $langs->trans(\"EquipementState\").': ';\n\t\n\t// boucle sur les entrepots\n\t$sql = \"SELECT rowid, libelle\";\n\t$sql.= \" FROM \".MAIN_DB_PREFIX.\"c_equipement_etat\";\n\t$sql.= \" WHERE active = 1\";\n\t\n\tdol_syslog(\"Equipement.Lib::select_equipement_etat sql=\".$sql);\n\n\t$resql=$db->query($sql);\n\tif ($resql)\n\t{\n\t\t$num = $db->num_rows($resql);\n\t\t$i = 0;\n\t\tif ($num)\n\t\t{\n\t\t\tprint '<select class=\"flat\" name=\"'.$htmlname.'\">';\n\t\t\tif ($showempty)\n\t\t\t{\n\t\t\t\tprint '<option value=\"-1\"';\n\t\t\t\tif ($selected == -1) print ' selected=\"selected\"';\n\t\t\t\tprint '>&nbsp;</option>';\n\t\t\t}\n\t\t\twhile ($i < $num)\n\t\t\t{\n\t\t\t\t$obj = $db->fetch_object($resql);\n\t\t\t\tprint '<option value=\"'.$obj->rowid.'\"';\n\t\t\t\tif ($obj->rowid == $selected) print ' selected=\"selected\"';\n\t\t\t\tprint \">\".$langs->trans($obj->libelle).\"</option>\";\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\tprint '</select>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// si pas de liste, on positionne un hidden à vide\n\t\t\tprint '<input type=\"hidden\" name=\"'.$htmlname.'\" value=-1>';\n\t\t}\n\t}\n}", "title": "" }, { "docid": "4aaab3908d4618f92394f88b09057699", "score": "0.5338606", "text": "function select_projects() {\n $exclude_ids = $this->request->get('exclude_ids');\n \n $selected_project_ids = $this->request->get('selected_ids');\n if(is_foreachable($exclude_ids) && is_foreachable($selected_ids)) {\n foreach($selected_project_ids as $k => $v) {\n if(in_array($v, $exclude_ids)) {\n unset($selected_project_ids[$k]);\n } // if\n } // foreach\n } // if\n \n $statuses = $this->request->get('active_only') ? array(PROJECT_STATUS_ACTIVE) : null;\n \n $this->smarty->assign(array(\n 'widget_id' => $this->request->get('widget_id'),\n 'projects' => Projects::findNamesByUser($this->logged_user, $statuses, $exclude_ids, (boolean) $this->request->get('show_all')),\n 'selected_project_ids' => $selected_project_ids,\n ));\n }", "title": "" }, { "docid": "42d5c3e038d0251d4883c0f2933939d2", "score": "0.5326754", "text": "protected static function listIndustryMenuOptions()\n {\n $result = [];\n\n foreach(Industry::isActive()->get() as $industry){\n $result[$industry->id] = $industry->name;\n }\n\n return $result;\n }", "title": "" }, { "docid": "09bd1d92d6a0b9f491d0436d859ad130", "score": "0.5324733", "text": "static public function mdlListarLocalesEtl()\n\t{\n\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT\n\t\t\t* \n\t\tFROM\n\t\t\tetl_local;\n\t\t\");\n\n\n\t\t$stmt -> execute();\n\n\t\treturn $stmt ->fetchAll(PDO::FETCH_ASSOC);\n\n\t}", "title": "" }, { "docid": "ce808238ab61f560795fe7efa7692c86", "score": "0.5305295", "text": "public static function GetAllNames () {\n\t\treturn [\n\t\t\t\\MvcCore\\IEnvironment::DEVELOPMENT,\n\t\t\t\\MvcCore\\IEnvironment::ALPHA,\n\t\t\t\\MvcCore\\IEnvironment::BETA,\n\t\t\t\\MvcCore\\IEnvironment::PRODUCTION\n\t\t];\n\t}", "title": "" }, { "docid": "9a4360a94e625bd9aa6c8e3caee60be2", "score": "0.5293704", "text": "public function Lista_CiudadesUpdate()//FUNCION PARA LLAMAR LA LISTA DE DEPARTAMENTOS\n {\n \n include('conexion.php');\n \n\n $Consulta_Ciudad = \"SELECT * FROM p_ciudad ORDER BY ciud_nombre\";\n\t\t\t $Resultado_Consulta_Ciudad = $conexion->prepare($Consulta_Ciudad);\n $Resultado_Consulta_Ciudad->execute();\n\t\t\t\t\t while ($f = $Resultado_Consulta_Ciudad->fetch())\t\n {\n\t\t\t\t\t\t echo '<option value=\"'.$f[ciud_codigo].'\">'.$f[ciud_nombre].'</option>';\n }\n \n }", "title": "" }, { "docid": "fe59ad40d749269b9e15b767d2b30c8f", "score": "0.526333", "text": "private function defineEnvParameters() {\n\t\t$route = \\Route::currentRouteName();\n\n\t\tswitch($route) {\n\t\t\tcase 'index':\n\t\t\t\t$this->env = 'index';\n\t\t\t\tbreak;\n\t\t\tcase 'articles':\n\t\t\t\t$this->env = 'articles';\n\t\t\t\tbreak;\n\t\t\tcase 'article':\n\t\t\t\t$this->env = 'articles';\n\t\t\t\tbreak;\n\t\t\tcase 'opportunity':\n\t\t\t\t$this->env = 'opportunity';\n\t\t\t\tbreak;\n\t\t\tcase 'opportunity_group':\n\t\t\t\t$this->env = 'opportunity';\n\t\t\t\tbreak;\n\t\t\tcase 'field':\n\t\t\t\t$this->env = 'project';\n\t\t\t\tbreak;\n\t\t\tcase 'project':\n\t\t\t\t$this->env = 'project';\n\t\t\t\tbreak;\n\t\t\tcase 'project_text':\n\t\t\t\t$this->env = 'project';\n\t\t\t\tbreak;\n\t\t\tcase 'about':\n\t\t\t\t$this->env = 'about';\n\t\t\t\tbreak;\n\t\t\tcase 'our_story':\n\t\t\t\t$this->env = 'about';\n\t\t\t\tbreak;\n\t\t\tcase 'all_reports':\n\t\t\t\t$this->env = 'about';\n\t\t\t\tbreak;\n\t\t\tcase 'docs':\n\t\t\t\t$this->env = 'about';\n\t\t\t\tbreak;\n\t\t\tcase 'reports':\n\t\t\t\t$this->env = 'about';\n\t\t\t\tbreak;\n\t\t\tcase 'report':\n\t\t\t\t$this->env = 'about';\n\t\t\t\tbreak;\n\t\t\tcase 'team':\n\t\t\t\t$this->env = 'about';\n\t\t\t\tbreak;\n\t\t\tcase 'contacts':\n\t\t\t\t$this->env = 'contacts';\n\t\t\t\tbreak;\n\t\t\tcase 'donate':\n\t\t\t\t$this->env = 'donate';\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "55eedd2fb63dea9cbb5b605dace39ec1", "score": "0.52589935", "text": "public function get_for_dsitenv($dsitenv_id,$application_id){\r\n //retrait de la condition sur l'application ,'Bien.application_id'=>$application_id\r\n $list = $this->Assobienlogiciel->find('all',array('conditions'=>array('OR'=>array('Assobienlogiciel.dsitenv_id'=>$dsitenv_id,'Assobienlogiciel.dsitenv_id LIKE \"%'.$dsitenv_id.',%\"','Assobienlogiciel.dsitenv_id LIKE \"%,'.$dsitenv_id.'%\"'),'Bien.application_id'=>$application_id),'order'=>array('Bien.NOM'=>'asc'),'group'=>'Bien.NOM','recursive'=>1));\r\n return $list;\r\n }", "title": "" }, { "docid": "6d33604a191a18c7b5d92ff2119d5571", "score": "0.524681", "text": "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM learnable_language_options';\r\n\t\t$sqlQuery = new SqlQuery2($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "title": "" }, { "docid": "54416324bd98a04401a677d6d93b3d4a", "score": "0.52390033", "text": "function getEmployeesListCtrl() {\n $accounts = getEmployeesList();\n echo \"<select class='form-control' required name='id_comptes'>\";\n foreach ($accounts as $a) {\n if ($id === $a['id_compte']) {\n echo \"<option value='\".$a[\"id_compte\"].\"' selected>\".$a[\"nom\"].\" \".$a[\"prenom\"].\"</option>\";\n } else {\n echo \"<option value='\".$a[\"id_compte\"].\"'>\".$a[\"nom\"].\" \".$a[\"prenom\"].\"</option>\";\n }\n }\n echo \"</select>\";\n}", "title": "" }, { "docid": "a669b224f0697adb71143dd353ee1cc8", "score": "0.5235167", "text": "public function Lista_DepartamentoUpdate()//FUNCION PARA LLAMAR LA LISTA DE DEPARTAMENTOS\n {\n include('conexion.php');\n $Consulta_Departamento = \"SELECT * FROM p_departamento ORDER BY dep_nombre\";\n\t\t\t $Resultado_Consulta_Departamento = $conexion->prepare($Consulta_Departamento);\n $Resultado_Consulta_Departamento->execute();\n\t\t\t\t\t while ($f = $Resultado_Consulta_Departamento->fetch())\t\n {\n\t\t\t\t\t\t echo '<option value=\"'.$f[dep_codigo].'\">'.$f[dep_nombre].'</option>';\n }\n }", "title": "" }, { "docid": "5e1c930576a8c69e98546d27594b9090", "score": "0.52155304", "text": "function getSystemSettings($sort = \"name ASC\") {\n\t\t\t$items = array();\n\t\t\t$q = sqlquery(\"SELECT * FROM bigtree_settings WHERE id NOT LIKE 'bigtree-internal-%' AND system != '' ORDER BY $sort\");\n\t\t\twhile ($f = sqlfetch($q)) {\n\t\t\t\t$items[] = $f;\n\t\t\t}\n\t\t\treturn $items;\n\t\t}", "title": "" }, { "docid": "f812720b12b0bb20b29d6efd225f7ed1", "score": "0.5195026", "text": "function scm_select_options()\n{\n $options = array();\n foreach (scm_types() as $scm => $name) {\n $options[] = array('label' => $name, 'value' => $scm);\n }\n return $options;\n}", "title": "" }, { "docid": "53bca7be1b2a2b911c80f6c3b637eedf", "score": "0.51902", "text": "function storms_environment_options() {\n\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\treturn;\n\t}\n\n\tif ( 'local' === wp_get_environment_type() || 'development' === wp_get_environment_type() ) {\n\n\t\t// '1' if site visible by search engine, and '0' if site not visible by search engine\n\t\tupdate_option( 'blog_public', '0' );\n\n\t\t// Website admin email\n\t\tif ( '[email protected]' !== get_option( 'admin_email' ) ) {\n\t\t\tupdate_option( 'admin_email', '[email protected]' );\n\t\t}\n\n\t} elseif ( 'staging' === wp_get_environment_type() || 'testing' === wp_get_environment_type() ) {\n\n\t\t// '1' if site visible by search engine, and '0' if site not visible by search engine\n\t\tupdate_option( 'blog_public', '0' );\n\n\t\t// Website admin email\n\t\tif ( '[email protected]' !== get_option( 'admin_email' ) ) {\n\t\t\tupdate_option( 'admin_email', '[email protected]' );\n\t\t}\n\n\t} else {\n\n\t\t// '1' if site visible by search engine, and '0' if site not visible by search engine\n\t\tupdate_option( 'blog_public', '1' );\n\n\t}\n}", "title": "" }, { "docid": "43b8c6f256946d5d71b07d2c41c5c008", "score": "0.51824975", "text": "function listVariables()\n {\n global $_ARRAYLANG, $objDatabase;\n\n //init variables\n $q_lang = \"\";\n $q_module = \"\";\n $q_status = \"\";\n $q_zone = \"\";\n $i=0;\n $zoneMenu =\"\";\n $selected1=\"\";\n $selected2=\"\";\n $selected3=\"\";\n\n\n $this->template->loadTemplateFile('language_list.html');\n $this->pageTitle = $_ARRAYLANG['TXT_VARIABLE_LIST'];\n \n if (!isset($_SESSION['lang'])) {\n $_SESSION['lang'] = array();\n }\n\n if (!isset($_SESSION['lang']['term'])) $_SESSION['lang']['term']=\"\";\n if (!isset($_SESSION['lang']['langId'])) $_SESSION['lang']['langId']=\"\";\n if (!isset($_SESSION['lang']['status'])) $_SESSION['lang']['status']=\"\";\n if (!isset($_SESSION['lang']['zone'])) $_SESSION['lang']['zone']=\"both\";\n if (!isset($_SESSION['lang']['moduleId'])) $_SESSION['lang']['moduleId'] = \"\";\n\n if (isset($_POST['term'])) {\n $_SESSION['lang']['term']= contrexx_addslashes($_POST['term']);\n }\n if (isset($_POST['lang'])) {\n $_SESSION['lang']['langId']=intval($_POST['lang']);\n }\n if (isset($_POST['status'])) {\n $_SESSION['lang']['status']=intval($_POST['status']);\n }\n if (isset($_POST['zone'])) {\n $_SESSION['lang']['zone']= contrexx_addslashes($_POST['zone']);\n }\n if (isset($_POST['module'])) {\n $_SESSION['lang']['moduleId'] = intval($_POST['module']);\n }\n\n $term = $_SESSION['lang']['term'];\n $lang = $_SESSION['lang']['langId'];\n $status = $_SESSION['lang']['status'];\n $zone = $_SESSION['lang']['zone'];\n $module = $_SESSION['lang']['moduleId'];\n\n if ($zone==\"frontend\") {\n $selected1=\"selected\";\n } elseif ($zone == \"backend\") {\n $selected2=\"selected\";\n } elseif ($zone == \"both\" || $zone == \"\") {\n $zone = \"both\";\n $selected3=\"selected\";\n }\n\n $zoneMenu .=\"<option value='both' \".$selected3.\">\".$_ARRAYLANG['TXT_SECTION'].\"</option>\\n\";\n $zoneMenu .=\"<option value='frontend' \".$selected1.\">\".$_ARRAYLANG['TXT_WEB_PAGES'].\"</option>\\n\";\n $zoneMenu .=\"<option value='backend' \".$selected2.\">\".$_ARRAYLANG['TXT_ADMINISTRATION_PAGES'].\"</option>\\n\";\n $this->template->setVariable(\"LANGUAGE_ZONE_MENU\", $zoneMenu);\n\n //Begin language varibales\n $this->template->setVariable(array(\n 'TXT_CONFIRM_DELETE_DATA' => $_ARRAYLANG['TXT_CONFIRM_DELETE_DATA'],\n 'TXT_ACTION_IS_IRREVERSIBLE' => $_ARRAYLANG['TXT_ACTION_IS_IRREVERSIBLE'],\n 'TXT_ATTENTION_SYSTEM_FUNCTIONALITY_AT_RISK' => $_ARRAYLANG['TXT_ATTENTION_SYSTEM_FUNCTIONALITY_AT_RISK'],\n 'TXT_MODULE' => $_ARRAYLANG['TXT_MODULE'],\n 'TXT_LANGUAGE' => $_ARRAYLANG['TXT_LANGUAGE'],\n 'TXT_STATUS' => $_ARRAYLANG['TXT_STATUS'],\n 'TXT_CONTROLLED' => $_ARRAYLANG['TXT_CONTROLLED'],\n 'TXT_OPEN_ISSUE' => $_ARRAYLANG['TXT_OPEN_ISSUE'],\n 'TXT_LANGUAGE_DEPENDANT_SYSTEM_VARIABLES' => $_ARRAYLANG['TXT_LANGUAGE_DEPENDANT_SYSTEM_VARIABLES'],\n 'TXT_FOUND' => $_ARRAYLANG['TXT_FOUND'],\n 'TXT_NAME' => $_ARRAYLANG['TXT_NAME'],\n 'TXT_VALUE' => $_ARRAYLANG['TXT_VALUE'],\n 'TXT_DISPLAY' => $_ARRAYLANG['TXT_DISPLAY'],\n 'TXT_ADMIN' => $_ARRAYLANG['TXT_ADMINISTRATION_PAGES'],\n 'TXT_PUBLIC' => $_ARRAYLANG['TXT_WEB_PAGES']\n ));\n //End language variables\n\n if (isset($_POST['Submit'])) {\n if (empty($lang)) {\n $objResult = $objDatabase->Execute(\"SELECT id FROM \".DBPREFIX.\"languages WHERE is_default='true'\");\n if ($objResult !== false) {\n while (!$objResult->EOF) {\n $q_lang = \"AND con.lang_id=\".intval($objResult->fields['id']).\" \";\n $objResult->MoveNext();\n }\n }\n } else {\n $q_lang = \"AND con.lang_id=\".intval($lang).\" \";\n }\n\n if ($zone <> \"both\") {\n $q_zone = \"AND nam.$zone=1 \";\n }\n\n if ($module != 0) {\n $q_module = \"AND nam.module_id = \".$module.\" \";\n }\n\n if ($status==\"0\" || $status==\"1\") {\n $q_status = \"AND con.status=\".intval($status).\" \";\n }\n\n $q = \"SELECT con.content AS content,\n con.status AS status,\n con.lang_id AS lang,\n nam.name AS name,\n nam.id AS varid,\n modu.name AS module,\n nam.backend AS backend,\n nam.frontend AS frontend\n FROM \".DBPREFIX.\"language_variable_content AS con,\n \".DBPREFIX.\"language_variable_names AS nam,\n \".DBPREFIX.\"modules AS modu\n WHERE modu.id=nam.module_id\n AND con.varid=nam.id\n AND (nam.name LIKE '%\".$term.\"%' OR con.content LIKE '%\".$term.\"%') \".$q_zone.$q_lang.$q_module.$q_status.\"\n ORDER BY nam.id\";\n\n $objResult = $objDatabase->Execute($q);\n if ($objResult !== false && $objResult->RecordCount() > 0) {\n $numRows = $objResult->RecordCount();\n while (!$objResult->EOF) {\n if (($i % 2) == 0) {$class=\"row1\";} else {$class=\"row2\";}\n\n if (intval($objResult->fields['backend'])==1) {\n $this->template->setVariable(\"LANGUAGE_ADMIN\",\"<img alt='' src='../core/Core/View/Media/icons/check.gif' />\");\n }\n if (intval($objResult->fields['frontend'])==1) {\n $this->template->setVariable(\"LANGUAGE_WEBSITE\",\"<img alt='' src='../core/Core/View/Media/icons/check.gif' />\");\n }\n $this->template->setVariable(array(\n 'LANGUAGE_ROWCLASS' => $class,\n 'LANGUAGE_ID' => $objResult->fields['varid'],\n 'LANGUAGE_VARIABLENAME' => $objResult->fields['name'],\n 'LANGUAGE_CONTENT' => htmlspecialchars($objResult->fields['content'], ENT_QUOTES, CONTREXX_CHARSET),\n 'LANGUAGE_MODULE' => $objResult->fields['module'],\n 'LANGUAGE_LANG' => $this->arrLang[$objResult->fields['lang']]\n ));\n // not carefully checked variable\n if (intval($objResult->fields['status']==1)) {\n $langStatus =\"<img alt='' src=\\\"../core/Core/View/Media/icons/led_green.gif\\\" />\";\n } else {\n $langStatus =\"<img alt='' src=\\\"../core/Core/View/Media/icons/led_red.gif\\\" />\";\n }\n $this->template->setVariable(\"LANGUAGE_STATUS\",$langStatus);\n $this->template->parse('languageRow');\n $i++;\n $objResult->MoveNext();\n }\n } else {\n $this->template->hideBlock('languageSearchTable');\n }\n } else {\n $this->template->hideBlock('languageSearchTable');\n }\n $this->template->setVariable(array(\n 'LANGUAGE_STATS' => $numRows,\n 'LANGUAGE_MODULES_MENU' => $this->getSearchOptionMenu(\"modules\",$module),\n 'LANGUAGE_LANG_MENU' => $this->getSearchOptionMenu(\"languages\",$lang),\n 'LANGUAGE_SEARCHTERM' => $term\n ));\n }", "title": "" }, { "docid": "bfde587078754ab309cde9b700049642", "score": "0.51447856", "text": "function donne_liste_pc ($db,$id_equipement_recu)\n{\n $txt='';\n $message='';\n $query=\"SELECT id_equipement,e.id_equipement_constructeur,nom_equipement,model_equipement,ref_equipement,nom_equipement_constructeur from equipement e ,equipement_constructeur c where id_type_equipement='1' and e.id_equipement_constructeur=c.id_equipement_constructeur order by nom_equipement_constructeur,e.nom_equipement,e.model_equipement,e.ref_equipement,id_equipement_constructeur\";\n\n $result = $db->query($query);\n $constructeur=\"\";\n global $select_equipement_pc;\n // <optgroup label=\"Europe\">\n if (!$result) {\n //$message = 'Requête invalide : ' . mysql_error() . \"\\n\";\n $message .= 'Requête complète : ' . $query;\n die($message);\n }\n else {\n $txt.= '<option>'.$select_equipement_pc.'</option>';\n while ($donnees_portable = $result->fetch())\n {\n if ( $constructeur != $donnees_portable['nom_equipement_constructeur']){\n $txt.=\"<optgroup label=\".$donnees_portable['nom_equipement_constructeur'].\">\";\n }\n $constructeur=$donnees_portable['nom_equipement_constructeur'];\n $model_equipement=stripslashes($donnees_portable['model_equipement']);\n $id_equipement=$donnees_portable['id_equipement'];\n $nom_equipement=$donnees_portable['nom_equipement'];\n $ref_equipement=stripslashes($donnees_portable['ref_equipement']);\n $constructeur_equipement=$donnees_portable['constructeur_equipement'];\n if ( $id_equipement_recu == $id_equipement)\n $txt.= '<option value='.$id_equipement.' selected>'.$constructeur_equipement.' '.$nom_equipement.' '.$model_equipement.' '.$ref_equipement.'</option>';\n else\n $txt.= '<option value='.$id_equipement.'>'.$constructeur_equipement.' '.$nom_equipement.' '.$model_equipement.' '.$ref_equipement.'</option>';\n }\n return $txt;\n }\n}", "title": "" }, { "docid": "e23741847a864336ccc1f6709a1bbe62", "score": "0.5144223", "text": "public function menuApartados()\n {\n $this->conectar(1);\n $sql = \"SELECT id, seccion FROM Apartado WHERE 1\";\n $result = $this->conn->query($sql);\n\n if ($result->num_rows > 0) {\n while($row = $result->fetch_assoc()) {\n echo '<option value=\"'.$row['id'].'\">'.$row['seccion'].'</option>';\n }\n }\n \n $this->conn->close();\n }", "title": "" }, { "docid": "84afb36fb4494741b6b01fc343bfae59", "score": "0.51341647", "text": "private function setSelectedProjectsList($llista=\"\") {\n $ret = [];\n $ret['formId'] = $formId = \"dw__{$this->params[AjaxKeys::KEY_ID]}\";\n $ret['html'] = '<h1 class=\"sectionedit1\" id=dw__\"'.$this->params[AjaxKeys::KEY_ID].'\">Llista de projectes seleccionats</h1>'\n .'<div class=\"level1\"><p>Llista de projectes seleccionats amb condicions específiques</p></div>'\n .'<div style=\"padding:10px; width:50%;\">';\n\n $form = new Doku_Form(array('id' => $formId, 'name' => $formId, 'method' => 'GET'));\n $form->addHidden('id', $this->params[AjaxKeys::KEY_ID]);\n\n foreach ($llista as $elem) {\n $id = $elem['id'];\n $workflow = ($elem['workflow']) ? \"workflow&action=view\" : \"view\";\n $form->addElement(self::OBRE_LI);\n $this->_creaCheckBox($form, $id, $checked);\n $form->addElement(\"<a href='\".DOKU_URL.\"doku.php?call=project&do=$workflow&id=$id' data-call='project'>$id</a>\");\n $form->addElement(\"</li>\");\n }\n $form->addElement(\"<div><p>&nbsp;</p>\");\n $form->addElement(\"</div>\");\n\n $ret['html'] .= $form->getForm();\n $ret['html'] .= \"</div> \";\n return $ret;\n }", "title": "" }, { "docid": "711e5b255404a76ab99c11a520a883d8", "score": "0.51290154", "text": "public function choisirApprentiAction()\r\n {\r\n // On affiche tous les apprentis\r\n $odm = $this->get(\"doctrine_mongodb\")->getManager();\r\n\r\n $app = $odm->getRepository(\"UtilisateurBundle:Utilisateur\")->findAll();\r\n //@TODO : filter les apprentis dans la requetes\r\n $apprentis = array();\r\n foreach ($app as $apprenti) {\r\n if ($apprenti->getRoles()[0] == \"ROLE_APPRENTI\") {\r\n $apprentis[] = $apprenti;\r\n }\r\n }\r\n\r\n\r\n return $this->render('LivretBundle:Default:choixApprentis.html.twig', array(\"apprentis\" => $apprentis));\r\n }", "title": "" }, { "docid": "c7169a1edaa52de1c46e44967e7e7e05", "score": "0.51150095", "text": "function getTransportList($db, $varname, $default = \"\", $extra = \"\", $criteria = \"\", $action = \"\", $listonly = false)\n{\n $strResult = \"\";\n if (!$listonly) {\n $strResult .= \"<select name=\\\"$varname\\\" $action>\\n\";\n }\n $strResult .= $extra;\n $strSQL = \"SELECT * FROM hrd_transportation $criteria ORDER BY code \";\n $resDb = $db->execute($strSQL);\n while ($rowDb = $db->fetchrow($resDb)) {\n ($rowDb['code'] == $default) ? $strSelect = \"selected\" : $strSelect = \"\";\n $strResult .= \"<option value=\\\"\" . $rowDb['code'] . \"\\\" $strSelect>\" . $rowDb['code'] . \"</option>\\n\";\n }\n if (!$listonly) {\n $strResult .= \"</select>\\n\";\n }\n return $strResult;\n}", "title": "" }, { "docid": "b604edf2494a177c94c90b3f4466d22f", "score": "0.51133394", "text": "public function get_list(){\r\n $conditions = array();\r\n $conditions[] = 'Dsitenv.ACTIF = 1';\r\n $list = $this->Dsitenv->find('all',array('conditions'=>$conditions,'order'=>array('Dsitenv.NOM'=>'asc'),'recursive'=>0));\r\n return $list;\r\n }", "title": "" }, { "docid": "bf4381fe25efa62618703acb01b008b4", "score": "0.51104", "text": "protected function CatalogOptionsList() {\n\treturn $this->GetFieldValue('ItOptions');\n }", "title": "" }, { "docid": "4de6bc04e889e0ba3cf4822c7d60cff4", "score": "0.51101553", "text": "function getTrainingInstitutionList(\n $db,\n $varname,\n $default = \"\",\n $extra = \"\",\n $criteria = \"\",\n $action = \"\",\n $listonly = false\n) {\n $strResult = \"\";\n $strHidden = \"\";\n if (!$listonly) {\n $strResult .= \"<select name=\\\"$varname\\\" id=\\\"$varname\\\" $action>\\n\";\n }\n $strResult .= $extra;\n // flag = nomor urut\n $strSQL = \"SELECT * FROM hrd_training_vendor $criteria ORDER BY name_vendor \";\n $resDb = $db->execute($strSQL);\n while ($rowDb = $db->fetchrow($resDb)) {\n ($rowDb['id'] == $default) ? $strSelect = \"selected\" : $strSelect = \"\";\n $strResult .= \"<option value=\\\"\" . $rowDb['id'] . \"\\\" $strSelect>\" . $rowDb['name_vendor'] . \"</option>\\n\";\n }\n if (!$listonly) {\n $strResult .= \"</select>\\n\";\n }\n return $strResult;\n}", "title": "" }, { "docid": "bd53f912c02cccdcc5853d79d88bb1e8", "score": "0.5098378", "text": "protected static function getUnisAsOptionList()\r\n\t{\r\n\t\t$options = \"\";\r\n\t\tforeach(self::$unis as $uni)\r\n\t\t{\r\n\t\t\tif($uni->isSelected())\r\n\t\t\t{\r\n\t\t\t\t$selected = \" selected=\\\"selected\\\"\";\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$selected = \"\";\r\n\t\t\t}\r\n\t\t\t$options .= \"<option value=\\\"\".$uni->getDomain().\"\\\"\".$selected.\">\".$uni->getName().\"</option>\";\r\n\t\t}\r\n\t\treturn $options;\r\n\t}", "title": "" }, { "docid": "f76b439126f4f6acc721239101278c7f", "score": "0.50928944", "text": "public static function getPortalLanguages() {\n global $languages;\n foreach($languages as $name => $label) {\n if(strcmp(DEFAULT_LANG,$name) == 0){\n $list .= '<option value='.$name.' selected>'.$label.'</option>';\n } else {\n $list .= '<option value='.$name.'>'.$label.'</option>';\n }\n }\n return $list;\n }", "title": "" }, { "docid": "dd5ec2152794d198d15c95601e9671de", "score": "0.5092403", "text": "public function getEstadosIdeas() {\n $sql = \"select df_codigo_Estado as codigo,rtrim(df_nombre) as\n estado from EstadosPropuesta where estado=1 order by df_codigo_Estado\";\n $data = $this->database->query(utf8_decode($sql));\n $htmlObject = \"<option value='-1'>Seleccione...</option>\";\n for ($i = 0; $i < count($data); $i++) {\n $htmlObject .= \"<option value='\" . $data[$i]['codigo'] . \"'>\" . utf8_encode($data[$i]['estado']) . \"</option>\";\n }\n return $htmlObject;\n }", "title": "" }, { "docid": "2336109044c72ad99f49e14d80829b5e", "score": "0.5091712", "text": "public function prepaireModeSelector()\n {\n\n $arr_return = array();\n $arr_return['error']['status'] = false;\n\n\n\n ///////////////////////////////////////////////\n //\n // RETURN with an error, if there are no views\n\n if( ! is_array( $this->conf['views.'] ) )\n {\n $str_header = '<h1 style=\"color:red\">'.$this->pObj->pi_getLL('error_typoscript_h1').'</h1>';\n $str_prompt = '<p style=\"color:red; font-weight:bold;\">'.$this->pObj->pi_getLL('error_views_noview').'</p>';\n $arr_return['error']['status'] = true;\n $arr_return['error']['header'] = $str_header;\n $arr_return['error']['prompt'] = $str_prompt;\n return $arr_return;\n }\n // RETURN with an error, if there are no views\n\n\n\n ///////////////////////////////////////////////\n //\n // DRS - Development Reporting System\n\n $langKey = $GLOBALS['TSFE']->lang;\n if( $langKey == 'en' )\n {\n $langKey = 'default';\n }\n\n foreach( (array) $this->conf['views.'][$this->view . '.'] as $keyView => $arrView )\n {\n // We don't need the typoscript array dot\n $mode = substr( $keyView, 0, strlen( $keyView ) - 1 );\n $llMode = $this->pObj->pi_getLL( $this->view.'_mode_' . $mode, $mode );\n $arr_return['data'][$mode] = $this->pObj->pi_getLL( $this->view.'_mode_' . $mode, $llMode );\n if ( $this->pObj->b_drs_localisation && $mode == $llMode )\n {\n t3lib_div::devlog( '[WARN/LOCALLANG] ' . $this->conf_path . ' hasn\\'t any value in _LOCAL_LANG', $this->pObj->extKey, 2);\n $prompt = 'Please configure _LOCAL_LANG.'.$langKey.'.'.$this->view.'_mode_'.$mode.'.';\n t3lib_div::devlog('[HELP/LOCALLANG] '.$prompt, $this->pObj->extKey, 1);\n }\n }\n // DRS - Development Reporting System\n\n return $arr_return;\n }", "title": "" }, { "docid": "6acbeedb97c695f57873e04c4447f4cf", "score": "0.50861686", "text": "public function getOptions()\n {\n $options = array();\n \n //get list language\n $repLanguage = $this->getEntityManager()->getRepository(\"SMAdminBundle:Language\");\n //Get list language\n $langList = $repLanguage->getList();\n $defaultLanguage = null;\n if (is_array($langList)) {\n foreach ($langList as $language) {\n if ($language->getIsDefault()) {\n $defaultLanguage = $language;\n }\n }\n }\n $entities = $this->getList(null, null, array('status' => 1));\n foreach ($entities as $obj) {\n $obj->setLanguage($defaultLanguage);\n $std = new \\stdClass();\n $std->name = $obj->getCurrentLanguage()->getName();\n $std->id = $obj->getId();\n $options[] = $std;\n }\n \n return $options;\n }", "title": "" }, { "docid": "07ddd163f5c5be8d2132b6c08c0c6e30", "score": "0.5082862", "text": "function getSettori() {\n\t\treturn ModelFactory::lista('Settore', $this->soc->getIDSettori());\n\t}", "title": "" }, { "docid": "bb28e32e44452cae10a1bfd4d0add8bc", "score": "0.5079204", "text": "public static function obtenerTodos() {\n $sql = 'select * from configuracion';\n $query = self::nuevaDb()->ejecutar($sql);\n return $query->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "a5b4c5b253cd4717ab1a16412c2ef767", "score": "0.5077895", "text": "public function Departamentos(Request $request){\n $departamentos=Departamento::where('pais_id',$request->id)->get();//buscamos el listado de departamentos perteneciente al pais\n $select='<option value=\"\" selected>Selecciona una opción</option>';//se crea las primera opcion del select\n foreach($departamentos as $depar){\n $select.='<option value=\"'.$depar->id.'\">'.$depar->nombre.'</option>';//se completa las opciones del select\n }\n return $select;\n }", "title": "" }, { "docid": "a1f31e44c624c54ea6eb30fbe04c9ef5", "score": "0.50767714", "text": "public function selectItemTypeSelectds()\n {\n \n // $itemTypeIds = !empty($_GET['itemTypeIds']) ? $_GET['itemTypeIds'] : '';\n \n\n // if (!empty($itemTypeIds)) {\n\n $getItemTypeIdDatas = DB::select('SELECT * FROM item_type_master WHERE is_deleted_status = \"N\"');\n\n if (!empty($getItemTypeIdDatas)) {\n\n foreach ($getItemTypeIdDatas as $itemTypes) {\n\n $itemTpyesListHtml = '<option value=\"'.$itemTypes->id.'\"';\n \n \n\n $itemTpyesListHtml .= '>'.$itemTypes->name.'</option>';\n\n echo $itemTpyesListHtml; \n\n }\n\n }\n // }\n }", "title": "" }, { "docid": "82f222a2f904993ced6b0422b9b28d0b", "score": "0.5075311", "text": "function GetProjektSelectMitarbeiter($adresse)\n {\n // gibt man kein parameter an soll alles zurueck\n // entsprechen weitere parameter filtern die ausgabe\n $arr = $this->app->DB->SelectArr(\"SELECT adresse FROM bla bla where rolle=mitarbeiter von projekt xxx\");\n foreach($arr as $value)\n {\n if($selected==$value) $tmp = \"selected\"; else $tmp=\"\";\n $ret .= \"<option value=\\\"$value\\\" $tmp>$value</option>\";\n }\n return $ret;\n\n\n }", "title": "" }, { "docid": "a4597ca0a7e8567056936fad54f2a2a6", "score": "0.5068185", "text": "function listarDefProyectoSeguimientoActividad(){\n\t\t$this->procedimiento='sp.ft_def_proyecto_seguimiento_actividad_sel';\n\t\t$this->transaccion='SP_PRSEAC_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_def_proyecto_seguimiento_actividad','int4');\n\t\t$this->captura('id_def_proyecto_seguimiento','int4');\n\t\t$this->captura('id_def_proyecto_actividad','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('porcentaje_avance','numeric');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "3dba880eb4346f5feae88fd318e4ee0f", "score": "0.5062716", "text": "public function Estado_Civil()\n {\n include('conexion.php');\n $Consulta_Estado_Civil = \"SELECT * FROM p_estado_civil ORDER BY civ_nombre\";\n $Resultado_Consulta_Estado_Civil = $conexion->prepare($Consulta_Estado_Civil);\n $Resultado_Consulta_Estado_Civil->execute();\n while ($a = $Resultado_Consulta_Estado_Civil->fetch())\n {\n echo '<option value=\"'.$a[civ_codigo].'\">'.$a[civ_nombre].'</option>';\n }\n\n }", "title": "" }, { "docid": "4c6f87d292a27f8441b1dae4dfae9d39", "score": "0.50590086", "text": "function build_machine_options( $mode )\n{\n // build a drop down list of special interests\n // mode can be 'ADD' or 'DISPLAY'\n\n // get access to a global stack of objects\n\n \n global $machines ;\n\n // reset the variable spave where we are going \n // to build the menu choice structure\n \n $pull_down = '<option value = \"\">MACHINES</option>' ;\n\n // dope how namy objects in the array\n \n $size = count( $machines ) ;\n // and process each one\n \n for ( $counter = 0 ;\n $counter < $size ;\n $counter++ )\n {\n if ( $machines[ $counter ]->active )\n // no sense offering de-activated options\n {\n $pull_down = $pull_down . '<option value = \"'\n . $machines[ $counter ]->short_name \n . '\">'\n . $machines[ $counter ]->name \n . '</option>' ;\n\n\n } // if\n } // for\n\n $pull_down = $pull_down . '<option value = \"Mark Addinall\">Mark Addinall</option>' ;\n\n return $pull_down ;\n\n}", "title": "" }, { "docid": "e931f897acb80983733cbc61a84aec18", "score": "0.50433314", "text": "function getDepartmentList($db, $varname, $default = \"\", $extra = \"\", $criteria = \"\", $action = \"\", $listonly = false)\n{\n global $strDataCompany;\n $strResult = \"\";\n $criteria .= ($strDataCompany == \"\") ? \"\" : \"AND management_code LIKE '%\" . printCompanyCode(\n $strDataCompany\n ) . \"%'\";\n if (!$listonly) {\n $strResult .= \"<select name=\\\"$varname\\\" $action>\\n\";\n }\n $strResult .= $extra;\n $strSQL = \"SELECT * FROM hrd_department WHERE 1=1 $criteria ORDER BY department_code \";\n $resDb = $db->execute($strSQL);\n while ($rowDb = $db->fetchrow($resDb)) {\n $strCode = $rowDb['department_code'];\n $strName = $rowDb['department_name'];\n ($strCode == $default) ? $strSelect = \"selected\" : $strSelect = \"\";\n $strResult .= \"<option value=\\\"$strCode\\\" $strSelect>$strCode - $strName</option>\\n\";\n }\n if (!$listonly) {\n $strResult .= \"</select>\\n\";\n }\n return $strResult;\n}", "title": "" }, { "docid": "c44556eadf4e888646b66511d4e9a79c", "score": "0.50289524", "text": "public function list_gestiones(){\n $listar_gestion= $this->model_configuracion->lista_gestion();\n $tabla='';\n\n $tabla.='\n <input type=\"hidden\" name=\"gest\" id=\"gest\" value=\"'.$this->gestion.'\">\n <select name=\"gestion_usu\" id=\"gestion_usu\" class=\"form-control\" required>\n <option value=\"0\">seleccionar gestión</option>'; \n foreach ($listar_gestion as $row) {\n if($row['ide']==$this->gestion){\n $tabla.='<option value=\"'.$row['ide'].'\" select >'.$row['ide'].'</option>';\n }\n else{\n $tabla.='<option value=\"'.$row['ide'].'\" >'.$row['ide'].'</option>';\n }\n };\n $tabla.='</select>';\n return $tabla;\n }", "title": "" }, { "docid": "5fa17c7e33bf9cbdd58c0cd56d33185a", "score": "0.5018438", "text": "private function get_select_NC_N_T() {//Select basico tutorizado no contestadas con normativo\n $array = [\n //tutorizado\n 'mdl_course_config\".\"tutorizado',\n//curso\n 'mdl_course\".\"id\" AS \"cur_id', 'mdl_course\".\"shortname\" AS \"curso_clave', 'mdl_course\".\"fullname\" AS \"curso_nombre',\n '\"public\".\"mdl_groups\".\"id\" as ids_grupos', '\"public\".\"mdl_groups\".\"name\" as names_grupos', '\"cbg\".bloque',\n//Encuesta\n 'encuestas\".\"sse_encuestas\".\"encuesta_cve', 'encuestas\".\"sse_encuestas\".\"cve_corta_encuesta', 'encuestas\".\"sse_encuestas\".\"descripcion_encuestas'\n//evaluado\n , '\"mdl_user_evaluado\".\"username\" as matricula_evaluado', '\"mdl_rol_evaluado\".\"id\" as rol_evaluado_id', '\"mdl_rol_evaluado\".\"name\" as rol_evaluando'\n , 'concat(\"mdl_user_evaluado\".firstname, \\' \\', \"mdl_user_evaluado\".\"lastname\") as nombre_evaluado'\n , '\"cattutdo\".des_clave clave_categoria_evaluado', '\"cattutdo\".nom_nombre nombre_categoria_evaluado',\n 'depdo.cve_depto_adscripcion clave_adscripcion_evaluado', '\"depdo\".des_unidad_atencion nombre_adscripcion_evaluado',\n 'depdo\".\"nom_delegacion\" \"delegacion_evaluado', 'depdo\".\"name_region\" \"region_evaluado'\n//evaluador \n , '\"mdl_user\".\"id\" id_user_evaluador', '\"mdl_user\".\"username\" matricula_evaluador', '\"mdl_role\".\"id\" rol_evaluador_id', '\"mdl_role\".\"name\" as rol_evaluador',\n 'concat(\"mdl_user\".\"firstname\", \\' \\', \"mdl_user\".\"lastname\") as nombre_evaluador'\n , '\\'\\' clave_categoria_evaluador_preg', '\\'\\' nombre_categoria_evaluado_preg',\n '\\'\\' clave_adscripcion_preg_evaluador', '\\'\\' nombre_adscripcion_preg_evaluador'\n , '\\'\\' delegacion_preg_evaluador', '\\'\\' region_preg_evaluador', \"'' email_preg_evaluador\",\n '\"cattutdor\".des_clave clave_categoria_evaluador_tutor', '\"cattutdor\".nom_nombre nombre_categoria_evaluado_tutor',\n 'depdor.cve_depto_adscripcion clave_adscripcion_tutor_evaluador', 'depdor.des_unidad_atencion nombre_adscripcion_tutor_evaluador',\n 'depdor\".\"nom_delegacion\" \"delegacion_tutor_evaluador', 'depdor\".\"name_region\" \"region_tutor_evaluador_dor',\n '\"mdl_user\".\"email\" email_tutor_evaluador'\n//contestadas\n , \"2 contestada\"\n , \"'' calificacion\"\n , \"'' calificacion_bono\"\n , \"'' fecha_evaluacion\"\n ];\n if ($this->obtener_encuestas_validas) {\n $array[] = $this->get_select_encuesta_valida();\n }\n return $array;\n }", "title": "" }, { "docid": "2b79a24cebc69c484f3dff9a61aca24f", "score": "0.50174814", "text": "function listadoregiones() {\n $query8 = \"SELECT * FROM intranet_roadmap_regiones\";\n $result8 = (array) json_decode(miBusquedaSQL($query8), true) ;\n foreach ($result8 as $pr8) {\n $proyectos .= '<option value=\"'.$pr8['id_region'].'\">'.$pr8['nombre_region'].'</option> \n';\n }\n return $proyectos;\n\n}", "title": "" }, { "docid": "d230410b0f7e63adec05c5a47d6b8f64", "score": "0.50124395", "text": "public function getActiveTestSuites();", "title": "" }, { "docid": "c65c0b834082c1cfaa5a19caf1a8f75a", "score": "0.50109744", "text": "function locale_select_options()\n{\n $options = array();\n\n foreach (scandir(APPPATH . '/locale') as $file) {\n if (substr($file, -4) == '.php') {\n // Clean the name and set the class\n $name = substr($file, 0, -4);\n $class = \"\\\\traq\\locale\\\\{$name}\";\n\n // Make sure the locale class\n // isn't already loaded\n if ($name != settings('locale') and $name != Avalon::app()->user->locale) {\n require APPPATH . '/locale/' . $file;\n }\n\n // Get the info\n $info = $class::info();\n\n // Add it to the options\n $options[] = array(\n 'label' => \"{$info['name']} ({$info['language_short']}{$info['locale']})\",\n 'value' => substr($file, 0, -4)\n );\n }\n }\n\n return $options;\n}", "title": "" }, { "docid": "009cee1041f7f77e35aef242aa5c5bf7", "score": "0.5009825", "text": "private function get_select_CNC_SN_NT() {//Select basico no tutorizado sin normativo\n $array = array(\n //tutorizado\n 'mdl_course_config\".\"tutorizado',\n //curso\n 'mdl_course\".\"id\" AS \"cur_id', 'mdl_course\".\"shortname\" AS \"curso_clave', 'mdl_course\".\"fullname\" AS \"curso_nombre', '\"public\".\"mdl_course_config\".horascur',\n '\"public\".\"mdl_groups\".\"id\" as ids_grupos', '\"public\".\"mdl_groups\".\"name\" as names_grupos',\n //Encuesta\n 'encuestas\".\"sse_encuestas\".\"encuesta_cve', 'encuestas\".\"sse_encuestas\".\"cve_corta_encuesta', 'encuestas\".\"sse_encuestas\".\"descripcion_encuestas'\n //evaluado\n , '\"mdl_user_evaluado\".\"username\" as matricula_evaluado', '\"mdl_rol_evaluado\".\"id\" as rol_evaluado_id', '\"mdl_rol_evaluado\".\"name\" as rol_evaluando'\n , 'concat(\"mdl_user_evaluado\".firstname, \\' \\', \"mdl_user_evaluado\".\"lastname\") as nombre_evaluado'\n , '\"cattutdo\".des_clave clave_categoria_evaluado', '\"cattutdo\".nom_nombre nombre_categoria_evaluado',\n 'depdo.cve_depto_adscripcion clave_adscripcion_evaluado', '\"depdo\".des_unidad_atencion nombre_adscripcion_evaluado',\n 'depdo\".\"nom_delegacion\" \"delegacion_evaluado', 'depdo\".\"name_region\" \"region_evaluado'\n //evaluador \n , '\"mdl_user\".\"id\" id_user_evaluador', '\"mdl_user\".\"username\" matricula_evaluador', '\"mdl_role\".\"id\" rol_evaluador_id', '\"mdl_role\".\"name\" as rol_evaluador',\n 'concat(\"mdl_user\".\"firstname\", \\' \\', \"mdl_user\".\"lastname\") as nombre_evaluador'\n , '\"catdor\".des_clave clave_categoria_evaluador_preg', '\"catdor\".nom_nombre nombre_categoria_evaluado_preg',\n 'deppredor.cve_depto_adscripcion clave_adscripcion_preg_evaluador', 'deppredor.des_unidad_atencion nombre_adscripcion_preg_evaluador'\n , 'deppredor\".\"nom_delegacion\" \"delegacion_preg_evaluador', 'deppredor\".\"name_region\" \"region_preg_evaluador', '\"gpregdor\".des_email_pers \"email_preg_evaluador\"'\n , '\"cattutdor\".des_clave clave_categoria_evaluador_tutor', '\"cattutdor\".nom_nombre nombre_categoria_evaluado_tutor'\n , 'depdor.cve_depto_adscripcion clave_adscripcion_tutor_evaluador', 'depdor.des_unidad_atencion nombre_adscripcion_tutor_evaluador'\n , 'depdor\".\"nom_delegacion\" \"delegacion_tutor_evaluador', 'depdor\".\"name_region\" \"region_tutor_evaluador_dor',\n 'case \"tutdor\".emailpart when \\'\\' then \"tutdor\".emaillab else \"tutdor\".emailpart end \"email_tutor_evaluador\"'\n //contestadas\n , '2 contestada'\n , '(select concat(reecp.calif_emitida_napb::text,\\',\\',reecp.calif_emitida::text, \\',\\',reecp.fecha_add::text) calif\n from encuestas.sse_encuestas encp\n join encuestas.sse_reglas_evaluacion regep on regep.reglas_evaluacion_cve = encp.reglas_evaluacion_cve and regep.rol_evaluador_cve = \"mdl_role\".\"id\" and regep.rol_evaluado_cve = \"mdl_rol_evaluado\".\"id\"\n join encuestas.sse_result_evaluacion_encuesta_curso reecp on reecp.encuesta_cve = encp.encuesta_cve and (reecp.group_id = \"gm\".\"groupid\" ) AND encp.encuesta_cve = \"sse_encuesta_curso\".\"encuesta_cve\" AND reecp.course_cve =\"encuestas\".\"sse_encuesta_curso\".\"course_cve\" \n where reecp.evaluado_user_cve = \"tutorias\".\"mdl_userexp\".\"userid\" and reecp.evaluador_user_cve = \"mdl_user\".\"id\" limit 1 \n ) as calificacion'\n /* , '(select reecp.calif_emitida\n from encuestas.sse_encuestas encp\n join encuestas.sse_reglas_evaluacion regep on regep.reglas_evaluacion_cve = encp.reglas_evaluacion_cve and regep.rol_evaluador_cve = \"mdl_role\".\"id\" and regep.rol_evaluado_cve = \"mdl_rol_evaluado\".\"id\"\n join encuestas.sse_result_evaluacion_encuesta_curso reecp on reecp.encuesta_cve = encp.encuesta_cve and (reecp.group_id = \"gm\".\"groupid\" ) AND encp.encuesta_cve = \"sse_encuesta_curso\".\"encuesta_cve\" AND reecp.course_cve =\"encuestas\".\"sse_encuesta_curso\".\"course_cve\"\n where reecp.evaluado_user_cve = \"tutorias\".\"mdl_userexp\".\"userid\" and reecp.evaluador_user_cve = \"mdl_user\".\"id\"\n ) as calificacion_bono' */\n , \"'' calificacion_bono\"\n , \"'No aplica' as bloque\"\n , \"'' fecha_evaluacion\"\n );\n if ($this->obtener_encuestas_validas) {\n $array[] = $this->get_select_encuesta_valida();\n }\n return $array;\n }", "title": "" }, { "docid": "3eb7b1f3dd8a18bd013c043c94f8f3a3", "score": "0.50049615", "text": "public function obtenerSelectTransporteConductores()\n\t{\n\t\t// Obtenemos todos los transporte conductores\n\t\t$transporte_conductores = $this->obtenerTodosTransporteConductores();\n\t\t\n\t\t// Creamos un array con los transporte conductores para el select del formulario\n\t\t$ar_transporte_conductores[0] = \"\";\n\t\t\n\t\tforeach($transporte_conductores as $transporte_conductor)\n\t\t{\n\t\t\t$transporte_conductor_nombre = $transporte_conductor->getNombre();\n\t\t\t$i = $transporte_conductor->getIdTransporteConductor();\n\t\t\t$ar_transporte_conductores[$i] = $transporte_conductor_nombre;\n\t\t}\n\t\t\n\t\t// Array con el nombre de los transporte conductores y llave el id\n\t\treturn $ar_transporte_conductores;\n\t}", "title": "" }, { "docid": "44ef93519b3ace934085d5da628a5920", "score": "0.5004927", "text": "public function getAllNames()\r\n {\r\n $query = \"EXEC [dbo].[srv_GetAllEnvironmentName]\";\r\n $stmt = $this->db->getParams($query);\r\n if (!empty($stmt)) {\r\n return $stmt;\r\n }\r\n return;\r\n }", "title": "" }, { "docid": "208098be9e66cdc4151cf883de34ac59", "score": "0.49966612", "text": "public static function getListOfSatellites(){\n $list = sfConfig::get('env_satellites', array());\n return $list;\n }", "title": "" }, { "docid": "551339aca007f444f98cf5283caf4489", "score": "0.49917737", "text": "private function get_select_CNC_N_NT() {//Select basico no tutorizado con normativo\n $array = array(\n //tutorizado\n 'mdl_course_config\".\"tutorizado',\n //curso\n 'mdl_course\".\"id\" AS \"cur_id', 'mdl_course\".\"shortname\" AS \"curso_clave', 'mdl_course\".\"fullname\" AS curso_nombre', '\"public\".\"mdl_course_config\".horascur',\n '\"public\".\"mdl_groups\".\"id\" as ids_grupos', '\"public\".\"mdl_groups\".\"name\" as names_grupos',\n //Encuesta\n 'encuestas\".\"sse_encuestas\".\"encuesta_cve', 'encuestas\".\"sse_encuestas\".\"cve_corta_encuesta', 'encuestas\".\"sse_encuestas\".\"descripcion_encuestas'\n //evaluado\n , '\"mdl_user_evaluado\".\"username\" as matricula_evaluado', '\"mdl_rol_evaluado\".\"id\" as rol_evaluado_id', '\"mdl_rol_evaluado\".\"name\" as rol_evaluando'\n , 'concat(\"mdl_user_evaluado\".firstname, \\' \\', \"mdl_user_evaluado\".\"lastname\") as nombre_evaluado'\n , '\"cattutdo\".des_clave clave_categoria_evaluado', '\"cattutdo\".nom_nombre nombre_categoria_evaluado',\n 'depdo.cve_depto_adscripcion clave_adscripcion_evaluado', '\"depdo\".des_unidad_atencion nombre_adscripcion_evaluado',\n 'depdo\".\"nom_delegacion\" \"delegacion_evaluado', 'depdo\".\"name_region\" \"region_evaluado'\n //evaluador \n , '\"mdl_user\".\"id\" id_user_evaluador', '\"mdl_user\".\"username\" matricula_evaluador', '\"mdl_role\".\"id\" rol_evaluador_id', '\"mdl_role\".\"name\" as rol_evaluador',\n 'concat(\"mdl_user\".\"firstname\", \\' \\', \"mdl_user\".\"lastname\") as nombre_evaluador'\n , '\\'\\' clave_categoria_evaluador_preg', '\\'\\' nombre_categoria_evaluado_preg',\n '\\'\\' clave_adscripcion_preg_evaluador', '\\'\\' nombre_adscripcion_preg_evaluador'\n , '\\'\\' delegacion_preg_evaluador', '\\'\\' region_preg_evaluador', \"'' email_preg_evaluador\"\n , '\"cattutdor\".des_clave clave_categoria_evaluador_tutor', '\"cattutdor\".nom_nombre nombre_categoria_evaluado_tutor'\n , 'depdor.cve_depto_adscripcion clave_adscripcion_tutor_evaluador', 'depdor.des_unidad_atencion nombre_adscripcion_tutor_evaluador'\n , 'depdor\".\"nom_delegacion\" \"delegacion_tutor_evaluador', 'depdor\".\"name_region\" \"region_tutor_evaluador_dor'\n , '\"mdl_user\".\"email\" email_tutor_evaluador'\n //contestadas\n , \"2 contestada\"\n , '(select concat(reecp.calif_emitida_napb::text,\\',\\',reecp.calif_emitida::text, \\',\\',reecp.fecha_add::text)\n from encuestas.sse_encuestas encp\n join encuestas.sse_reglas_evaluacion regep on regep.reglas_evaluacion_cve = encp.reglas_evaluacion_cve and regep.rol_evaluador_cve = \"mdl_role\".\"id\" and regep.rol_evaluado_cve = \"mdl_rol_evaluado\".\"id\"\n join encuestas.sse_result_evaluacion_encuesta_curso reecp on reecp.encuesta_cve = encp.encuesta_cve and (reecp.group_id =0) AND encp.encuesta_cve = \"sse_encuesta_curso\".\"encuesta_cve\" AND reecp.course_cve =\"encuestas\".\"sse_encuesta_curso\".\"course_cve\" \n where reecp.evaluado_user_cve = \"tutorias\".\"mdl_userexp\".\"userid\" and reecp.evaluador_user_cve = \"mdl_user\".\"id\" limit 1\n ) as calificacion'\n /* , '(select reecp.calif_emitida\n from encuestas.sse_encuestas encp\n join encuestas.sse_reglas_evaluacion regep on regep.reglas_evaluacion_cve = encp.reglas_evaluacion_cve and regep.rol_evaluador_cve = \"mdl_role\".\"id\" and regep.rol_evaluado_cve = \"mdl_rol_evaluado\".\"id\"\n join encuestas.sse_result_evaluacion_encuesta_curso reecp on reecp.encuesta_cve = encp.encuesta_cve and (reecp.group_id = 0 ) AND encp.encuesta_cve = \"sse_encuesta_curso\".\"encuesta_cve\" AND reecp.course_cve =\"encuestas\".\"sse_encuesta_curso\".\"course_cve\"\n where reecp.evaluado_user_cve = \"tutorias\".\"mdl_userexp\".\"userid\" and reecp.evaluador_user_cve = \"mdl_user\".\"id\"\n ) as calificacion_bono' */\n , \"'' calificacion_bono\"\n , \"'No aplica' as bloque\"\n , \"'' fecha_evaluacion\"\n );\n if ($this->obtener_encuestas_validas) {\n $array[] = $this->get_select_encuesta_valida();\n }\n return $array;\n }", "title": "" }, { "docid": "0d69b65ab5baced429a10f8a7555a317", "score": "0.4984664", "text": "public function listadoSelect(){\n\t\t$hoteles = $this->repo->listado();\n\t\t$customerSelect = array();\n\n\t\tforeach ( $hoteles as $registro ) {\n\t\t\t$customerSelect[$registro->getId()] = $registro->getName();\n\t\t}\n\n\t\treturn $customerSelect;\n\t}", "title": "" }, { "docid": "1cdb6066ada1375628af876706bcd1d4", "score": "0.49845564", "text": "public function getDatosEnvio(string $servicio) {\r\n $data = array();\r\n $consulta = $this->consulta('select * from t_traficos_envios where IdServicio = ' . $servicio);\r\n if (!empty($consulta)) {\r\n foreach ($consulta as $value) {\r\n $data['TipoEnvio'] = $value['IdTipoEnvio'];\r\n $data['Paqueteria'] = $value['IdPaqueteria'];\r\n $data['FechaEnvio'] = $value['FechaEnvio'];\r\n $data['Guia'] = $value['Guia'];\r\n $data['ComentariosEnvio'] = $value['ComentariosEnvio'];\r\n $data['EvidenciasEnvio'] = explode(',', $value['UrlEnvio']);\r\n $data['FechaEntrega'] = $value['FechaEntrega'];\r\n $data['NombreRecibe'] = $value['NombreRecibe'];\r\n $data['ComentariosEntrega'] = $value['ComentariosEntrega'];\r\n $data['EvidenciasEntrega'] = explode(',', $value['UrlEntrega']);\r\n }\r\n }\r\n return $data;\r\n }", "title": "" }, { "docid": "9b351578d3117165f34150c14b30be8a", "score": "0.4977908", "text": "private function getSystemVars()\n {\n return $this->get('zikula_extensions_module.api.variable')->getAll(VariableApi::CONFIG);\n }", "title": "" }, { "docid": "47114ca6c81e1bc4a0b8dea9fe17e6bb", "score": "0.49775708", "text": "function get_data_request_options()\r\n{\r\n\t//kijk wat het abstractie niveau is van de huidige opties\r\n\t$current_abstraction_level_query = 'select option_type from Requestable_data where option_name == \":current_selected_option\"';\r\n\t$current_abstraction_level = execute_sql_extract_data($current_abstraction_level_query);\r\n\t\r\n\t//haal de opties maar op uit de DB\r\n\t$requestable_data_descriptions = 'select option_name from Requestable_data where option_type = ' . $current_abstraction_level;\r\n\texecute_sql_extract_data($requestable_data_descriptions);\r\n}", "title": "" }, { "docid": "98246fd2060b3fee1deb353089718c75", "score": "0.49770778", "text": "function getAllApps(){\n\t$dir1 = scandir('.');\n\n foreach($dir1 as $element) {\n\t if (is_dir($element) && $element != '.' && $element != '..' && $element != 'scripts' && $element != 'batch') {\n\t echo '<option value=\"'.$element .'\">'.$element .'</option>';\n\t }\n }\n}", "title": "" }, { "docid": "e9f426f32e2994646820d11a75bef6c7", "score": "0.4975153", "text": "public function deptlist(){\n\t\t\t$prgid = $this->input->post('stu_prgname');\n\t\t\t//print_r($prgid);die;\n\t\t\t$sarray='prg_deptid';\n\t\t\t$wharray = array('prg_id' => $prgid);\n\t\t\t$department = $this->commodel->get_listarry('program',$sarray,$wharray);\n\t\tforeach($department as $datas):\n\t\t\t\t$deptid = $datas->prg_deptid; \n\t\t\t\t$deptname=$this->commodel->get_listspfic1('Department','dept_name','dept_id',$deptid)->dept_name;\n\t\t\t\techo \"<option id='stu_departname' value='$deptid'>\".\"$deptname\".\"</option>\";\n \t\tendforeach;\n\t }", "title": "" }, { "docid": "9b0c4d492f52c32ec54876c7eebc0eb7", "score": "0.49680573", "text": "private function get_select_C_T() {//Select basico tutorizado\n $array = array(\n //TUTORIZADO\n \"ccfg.tutorizado\",\n //CURSO\n \"ec.course_cve cur_id\", \"mcs.shortname curso_clave\", \"mcs.fullname as curso_nombre\",\n \"array_agg(distinct mg.id) as ids_grupos, string_agg(distinct mg.name, ', ') as names_grupos,cbg.bloque\",\n //ENCUESTA\n \"reec.encuesta_cve\", \"enc.cve_corta_encuesta\", \"enc.descripcion_encuestas\",\n //EVALUADO\n \"uedo.username as matricula_evaluado\", \"mrdo.id rol_evaluado_id\", \"mrdo.name rol_evaluando\",\n \"concat(uedo.firstname, ' ', uedo.lastname) nombre_evaluado\",\n \"cattutdo.des_clave clave_categoria_evaluado\", \"cattutdo.nom_nombre nombre_categoria_evaluado\",\n \"depdo.cve_depto_adscripcion clave_adscripcion_evaluado\", \"depdo.des_unidad_atencion nombre_adscripcion_evaluado\",\n \"depdo.nom_delegacion delegacion_evaluado\",\n \"depdo.name_region region_evaluado\",\n //EVALUADOR\n 'uedor.id id_user_evaluador', \"uedor.username as matricula_evaluador\", \"mrdor.id rol_evaluador_id\", \"mrdor.name rol_evaluador\",\n \"concat(uedor.firstname, ' ', uedor.lastname) nombre_evaluador\",\n \"catpredor.des_clave clave_categoria_evaluador_preg\", \"catpredor.nom_nombre nombre_categoria_evaluado_preg\",\n \"deppredor.cve_depto_adscripcion clave_adscripcion_preg_evaluador\", \"deppredor.des_unidad_atencion nombre_adscripcion_preg_evaluador\",\n \"deppredor.nom_delegacion delegacion_preg_evaluador\", \"deppredor.name_region region_preg_evaluador\",\n 'string_agg(DISTINCT (\"gpregdor\".\"des_email_pers\"), \\', \\') email_preg_evaluador',\n \"cattutdor.des_clave clave_categoria_evaluador_tutor\", \"cattutdor.nom_nombre nombre_categoria_evaluado_tutor\",\n \"depdor.cve_depto_adscripcion clave_adscripcion_tutor_evaluador\", \"depdor.des_unidad_atencion nombre_adscripcion_tutor_evaluador\"\n , \"depdor.nom_delegacion delegacion_tutor_evaluador\", 'depdor.name_region region_tutor_evaluador_dor',\n 'string_agg(DISTINCT (case \"tutdor\".\"emailpart\" when \\'\\' then \"tutdor\".emaillab else \"tutdor\".emailpart end), \\', \\') email_tutor_evaluador',\n //CALIFICACION\n \"1 contestada\",\n \"reec.calif_emitida_napb calificacion\",\n \"reec.calif_emitida calificacion_bono\",\n \"reec.fecha_add fecha_evaluacion\"\n );\n if ($this->obtener_encuestas_validas) {\n $array[] = $this->get_select_encuesta_valida(true);\n }\n return $array;\n }", "title": "" }, { "docid": "6acb511c9d0c6f62823945ccd98865bb", "score": "0.49584264", "text": "public function get_select_for_application($application_id){\r\n $conditions = array();\r\n $conditions[] = 'Dsitenv.application_id = '.$application_id;\r\n $conditions[] = 'Dsitenv.ACTIF = 1';\r\n $list = $this->Dsitenv->find('list',array('fields'=>array('Dsitenv.id','Dsitenv.NOM'),'conditions'=>$conditions,'order'=>array('Dsitenv.NOM'=>'asc'),'recursive'=>0));\r\n return $list;\r\n }", "title": "" }, { "docid": "1dfcc82126fceb1436afb97967b3ecdf", "score": "0.49507213", "text": "function getAllDatas() {\n if (isset($_GET['application'])) {\n $application=htmlentities($_GET['application']);\n $path = \"../data/\".$application;\n }\n //liste les fichiers dans les dossiers de donnees\n $nb_fichier = 0;\n if($dossier = opendir($path)) {\n while(false !== ($fichier = readdir($dossier))){\n if($fichier != '.' && $fichier != '..' && $fichier != 'index.php' && $fichier != '.DS_Store' && $fichier != 'template.csv'){ \n $nb_fichier++;\n $nomFichier = substr($fichier, 0, -4);\n echo '<option value=\"'. $nomFichier .'\">'. $nomFichier .'</option>';\n } \n } \n closedir($dossier);\n } else {\n \t\techo'<option value=\"erreur\">erreur</option>';\n\t}\n}", "title": "" }, { "docid": "39e58acde2d6340aa9bf257358fe80b0", "score": "0.4944243", "text": "public function getEnvironmentTags() {\n\t\treturn array_merge($this->environments[0]);\n\t}", "title": "" }, { "docid": "2df9ce7b758e0c7a5fc4dda6b1a89afe", "score": "0.49423614", "text": "public function optionList(){\n\t\t$this->layout = null;\n\t\t//$this->autoRender = false;\n\n\t\t//$this->Demanda->recursive = -1;\n\t\tif(($this->params['url']['tipo'] == 'Contrato') || ($this->params['url']['id'] == '0')){\n\t\t\t$this->set('items',\n\t\t\t\t\t\t\t\t\t$this->Item->find('list', array(\n\t\t\t\t\t\t\t\t\t\t'fields' => array('Item.id', 'Item.nome'),\n\t\t\t\t\t\t\t\t\t\t'conditions' => array('Item.contrato_id' => $this->params['url']['id']))));\n\t\t}\n\t\telse{\n\t\t\t$this->set('items',\n\t\t\t\t\t\t\t\t\t$this->Item->find('list', array(\n\t\t\t\t\t\t\t\t\t\t'fields' => array('Item.id', 'Item.nome'),\n\t\t\t\t\t\t\t\t\t\t'conditions' => array('Item.aditivo_id' => $this->params['url']['id']))));\n\t\t}\n\t}", "title": "" }, { "docid": "d2fd201228ee6995e8d23264a76bc02d", "score": "0.4928814", "text": "protected function getEnvParameters()\n {\n $parameters = array();\n\n foreach ($_SERVER as $key => $value) {\n if (0 === strpos($key, 'SYMFONY__')) {\n $parameters[strtolower(str_replace('__', '.', substr($key, 9)))] = $value === '~'?null:$value;\n }\n }\n\n return $parameters;\n }", "title": "" }, { "docid": "a8e5ef76e43de48b90e9b2b406aa6114", "score": "0.49269384", "text": "public function getListSettings()\n\t{\n\t\tinclude(\"Connection.php\");\n\t\t$listDetailsSql = \"SELECT LijstNaam, Wachtwoord, AantalDeelnemers, KostBrandstof, VerbruikAuto\n\t\t\t\tFROM Uitgavenlijst WHERE LijstID = '\".$link->real_escape_string($this->ListID).\"';\";\n\t\tif($result = $link->query($listDetailsSql))\n\t\t{\n\t\t\treturn($result);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new Exception('Whoops, jouw uitgavenlijsten konden niet opgehaald worden');\n\t\t}\n\t\tmysqli_close($link);\n\t}", "title": "" }, { "docid": "5d06c83dc152145707e179be4a33177f", "score": "0.492334", "text": "function getSettingsList(){\n\t\treturn array(\n\t\t'institute_name',\n\t\t'institute_phone',\n\t\t'institute_address',\n\t\t'email',\n\t\t'notifications',\n\t\t'facebook_url',\n\t\t'linkedin_url',\n\t\t'twitter_url',\n\t\t'youtube_url',\n\t\t'copyright',\n\t\t'metatags'\n\t\t);\n\t}", "title": "" }, { "docid": "d3c112a6e424aab8df39fab109acb922", "score": "0.4920813", "text": "function lista_talles(&$lista_c,&$talle_desc) {\t\n\t\tglobal $db, $talle;\n\t\t\n\t\t\t$lista_c = \" <select class='form-control' id='talle' name='talle' style='width:50%;' >\". \n\t\t\t\t\t\t\"\t<option value=0 selected>&laquo;Todos&raquo;</option>\";\n\t\t\t\t\n\t\t\t$sql = \" SELECT * FROM talles\";\n\t\t\t$rs = $db->query($sql);\n\t\t\t\t\n\t\t\tif (!$rs) {\n\t\t\t\t// mensaje error \n\t\t\t} else {\t\n\t\t\t\t$talle_desc = \"\";\n\t\t\t\tforeach ($rs as $row) {\t\n\t\t\t\t\t$seleccionado = \"\";\n\t\t\t\t\tif ($talle == $row['talle_codigo']) {\n\t\t\t\t\t\t$talle_desc = $row['talle_sigla'];\n\t\t\t\t\t\t$seleccionado = \"selected\";\n\t\t\t\t\t}\n\t\t\t\t\t$lista_c .= \"<option value='{$row['talle_codigo']}' $seleccionado>\". utf8_encode($row['talle_sigla']).\"</option>\"; \n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\t$lista_c .= \"</select>\";\n\t\t\t$rs=null;\n }", "title": "" }, { "docid": "1039720f1c7b9db6ffa119fa271ed0c4", "score": "0.4918647", "text": "public function consultar_configuracion(){\n $listado = [];\n #Recorro la jornada....\n $resultados = $this->mongo_db->order_by(array('_id' => 'DESC'))->where(array('eliminado'=>false))->get(\"configuracion_reservaciones\");\n foreach ($resultados as $clave => $valor) {\n $valores = $valor;\n $listado[]= $valores;\n }\n return $valores;\n }", "title": "" }, { "docid": "88f88ce5ed34e8f3bab2ac57005f427d", "score": "0.49094883", "text": "public function select_ville(){\n $spathSQL= $this->GLOBALS_INI[\"PATH_HOME\"] . $this->GLOBALS_INI[\"PATH_MODEL\"] . \"select_ville.sql\";\n $this->resultat[\"devis_select_ville\"]= $this->oBdd->getSelectDatas($spathSQL);\n }", "title": "" }, { "docid": "3f7a3be3db13caf3d4a886b34b70382a", "score": "0.49054307", "text": "public function poblar_espacios_deportivos_actividad()\n { \n $codigo = $_COOKIE[$this->services->get_fuzzy_name(\"Codigo\")];\n $this->services->set_cookie(\"Codigo\",$codigo, time() + (1800), \"/\");\n\n ee()->db->select('*');\n ee()->db->where('codigo',$codigo);\n $query_modelo_result = ee()->db->get('exp_user_upc_data');\n\n foreach($query_modelo_result->result() as $row){\n $token = $row->token;\n }\n\n $url = 'PoblarED/?CodAlumno='.$codigo.'&Token='.$token;\n\n $result=$this->services->curl_url($url);\n $json = json_decode($result, true);\n \n $result = '';\n \n $tamano = count($json['Sedes']);\n \n for ($i=0; $i<$tamano; $i++) {\n\n $tamano_int = count($json['Sedes'][$i]['espacios']);\n\n for ($a=0; $a<$tamano_int; $a++) {\n\n $tamano_fin = count($json['Sedes'][$i]['espacios'][$a]['actividades']);\n $result .= '<select class=\"reservas-select selectpicker relative arrow form-control\" name=\"CodActiv\" id=\"actividad-'.$json['Sedes'][$i]['espacios'][$a]['codigo'].'\">';\n //$result .= '<option>Selecciona una actividad</option>'; \n for ($b=0; $b<$tamano_fin; $b++) {\n $result .= '<option value=\"'.$json['Sedes'][$i]['espacios'][$a]['actividades'][$b]['codigo'].'\">';\n $result .= $json['Sedes'][$i]['espacios'][$a]['actividades'][$b]['nombre'];\n $result .= '</option>';\n }\n $result .= '</select>';\n \n }\n\n }\n $error_result = $this->error_eval($error);\n return 'error_result'.$error_result; \n if($error_result != '0')\n {\n $site_url = ee()->config->item('site_url');\n $this->EE->functions->redirect($site_url.\"general/session-expired\"); \n }\n return $result; \n }", "title": "" }, { "docid": "402e8bd0404a6fbf7a89c6c9f0bf60e4", "score": "0.49025086", "text": "function donne_liste_type_equipement ($db,$id_type_equipement_recu)\n{\n $txt='';\n $query=\"SELECT id_type_equipement,nom_type_equipement from type_equipement order by nom_type_equipement\";\n\n $result = $db->query($query);\n if (!$result) {\n //$message = 'Requête invalide : ' . mysql_error() . \"\\n\";\n $message .= 'Requête complète : ' . $query;\n die($message);\n }\n else {\n $txt.= '<option>Selectionner un type d\\'équipement</option>';\n while ($donnees_portable = $result->fetch())\n {\n $id_type_equipement=$donnees_portable['id_type_equipement'];\n $nom_type_equipement=$donnees_portable['nom_type_equipement'];\n\n if ( $id_type_equipement_recu == $id_type_equipement)\n $txt.= '<option value='.$id_type_equipement.' selected>'.$nom_type_equipement.'</option>';\n else\n $txt.= '<option value='.$id_type_equipement.'>'.$nom_type_equipement.'</option>';\n }\n return $txt;\n }\n}", "title": "" }, { "docid": "d5b0164bfcfb11bbe53f2177c85da143", "score": "0.4901669", "text": "private function getDeptIds(): array\n\t{\n\t\treturn config('curl-connection.' . $this->service . '.dept_ids');\n\t}", "title": "" }, { "docid": "e1cd0f8957594a443e636f9f727c153a", "score": "0.48965287", "text": "function obtenerenviodetalles ($codPedido){\n\t\t$x = $this->pdo->prepare('SELECT * FROM enviodetalles where codPedido = ?');\n\t\t$x->execute(array($codPedido));\n\t\treturn $x->fetchALL(PDO::FETCH_OBJ);\n\t}", "title": "" }, { "docid": "a348278435d3912e227aaa7a6faa3eac", "score": "0.48912707", "text": "public function term_edit_form_langs () {\n\n\n $langs = array();\n\n $site_lang = get_locale();\n\n $available_lang = get_option ( 'alwpr_langs', array() );\n\n foreach ( $available_lang as $key=>$value ) {\n\n // site base language\n if ( $value['language'] == $site_lang ) {\n \n continue;\n \n }\n\n $langs[$key] = $value['english_name'] . '/' . $value['native_name'];\n }\n\n return $langs;\n\n\n }", "title": "" }, { "docid": "4618489ba639cc0113de098e2fe0ec84", "score": "0.48851573", "text": "private function get_dept()\r\n {\r\n\t /** \r\n\t * variable streek staat in selectbox streek\r\n * twee varianten bijv. d2 en s2: resp dept_id = 2, streek_id = 2\r\n\t */\t\r\n if (isset($this->streek_id))\r\n { \r\n $sql = \"SELECT dept_id FROM tblDept_streek_dev WHERE streek_id = '$this->streek_id'\";\r\n $stmt = $this->db->query($sql);\r\n while($row = $stmt->fetch(PDO::FETCH_ASSOC)){\r\n extract($row);\r\n $this->deptID[] = $dept_id;\r\n } \r\n $stmt->closeCursor(); \r\n }\t\r\n else\r\n {\r\n $this->deptID[] = $this->dept_id;\r\n }\r\n \r\n /** huisID opslaan in array */\r\n $sql = \"SELECT hz.huis_id FROM tblHuizen_dev hz \";\r\n \r\n /** checkboxen sidebar */\r\n if ($this->count_checkbox != 0)\r\n {\r\n $sql .= \" INNER JOIN sidebar_huis sb ON hz.huis_id = sb.huis_id \";\r\n } \r\n \r\n $sql .= \"WHERE hz.dept_id IN (\";\r\n $z = count($this->deptID);\r\n for ($x = 0; $x < $z; $x++)\r\n {\r\n $sql .= $this->deptID[$x]. ',';\r\n }\r\n $sql = substr($sql, 0, strlen($sql) - 1);\r\n $sql .= \") AND hz.archief = '0' AND hz.zichtbaar = '0' \";\r\n \r\n /** checkboxen sidebar */\r\n if ($this->count_checkbox != 0)\r\n {\r\n for ($x = 0; $x < $this->count_checkbox; $x++)\r\n {\r\n $fieldname = $this->arrcheckbox[$x];\r\n $sql .= \" AND sb.$fieldname = '1'\";\r\n }\r\n }\r\n\t \r\n /** selectboxen m.u.v. prijs en beschikbaarheid */\r\n if ($this->sql_select_box != '')\r\n {\r\n $sql .= $this->sql_select_box. ' ';\r\n }\r\n \r\n $stmt = $this->db->query($sql);\r\n \r\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC))\r\n {\r\n extract($row);\r\n array_push($this->huisID, $huis_id);\r\n }\t\r\n $stmt->closeCursor(); \r\n }", "title": "" }, { "docid": "4159966b3f83d12e0bf7b738b133dcb6", "score": "0.48845896", "text": "public function llenarCombo()\n {\n\n \n \t$area_destino = $_POST[\"dir\"];\n\n \t$options=\"\";\n \t\n \t$deptos = $this ->Modelo_direccion->obtenerCorreoDepto($area_destino);\n\n \tforeach ($deptos as $row){\n \t\t$options= '\n \t\t<option value='.$row->email.'>'.$row->email.'</option>\n \t\t'; \n \t\techo $options; \n \t}\n \t\n\n }", "title": "" }, { "docid": "444cfa9878303ac80aad2def108f07c8", "score": "0.4879535", "text": "protected function set_consoles_for_select() {\n $this->consoles_for_select = $this->all_consoles_for_select();\n }", "title": "" }, { "docid": "7b1b6481d78e53ee81bba25420838e89", "score": "0.48767382", "text": "function getSectionList($db, $varname, $default = \"\", $extra = \"\", $criteria = \"\", $action = \"\", $listonly = false)\n{\n global $strDataCompany;\n $strResult = \"\";\n $criteria .= ($strDataCompany == \"\") ? \"\" : \"AND management_code LIKE '%\" . printCompanyCode(\n $strDataCompany\n ) . \"%'\";\n if (!$listonly) {\n $strResult .= \"<select name=\\\"$varname\\\" $action>\\n\";\n }\n $strResult .= $extra;\n $strSQL = \"SELECT * FROM hrd_section WHERE 1=1 $criteria ORDER BY department_code, section_code \";\n $resDb = $db->execute($strSQL);\n while ($rowDb = $db->fetchrow($resDb)) {\n $strCode = $rowDb['section_code'];\n $strName = $rowDb['section_name'];\n ($strCode == $default) ? $strSelect = \"selected\" : $strSelect = \"\";\n $strResult .= \"<option value=\\\"$strCode\\\" $strSelect>$strCode - $strName</option>\\n\";\n }\n if (!$listonly) {\n $strResult .= \"</select>\\n\";\n }\n return $strResult;\n}", "title": "" }, { "docid": "109490ad76062a56506265c620221d45", "score": "0.48753402", "text": "function GetAllExperienceOptions()\n {\n try\n {\n $options = array();\n $db = GetDBConnection();\n \n $query = 'SELECT * FROM ' . GetExperinceOptionsIdentifier()\n . ' ORDER BY ' . GetExperienceOptionIdIdentifier() . ';';\n \n $statement = $db->prepare($query);\n \n $statement->execute();\n \n $rows = $statement->fetchAll();\n \n $statement->closeCursor();\n \n foreach($rows as $row)\n {\n $option = new ExperienceOption();\n $option->Initialize($row);\n \n $options[] = $option;\n }\n \n return $options;\n }\n catch (PDOException $ex)\n {\n LogError($ex);\n }\n }", "title": "" }, { "docid": "425786d4cb037facacbb0168edefc08f", "score": "0.48748827", "text": "public function getAll()\r\n {\r\n $query = \"EXEC\t [dbo].[srv_GetAllEnvironments_returnhtml]\";\r\n $table = $this->db->getParams($query);\r\n if (!empty($table)) {\r\n return $table;\r\n }\r\n return;\r\n }", "title": "" }, { "docid": "6669ba04835b27c1e6c3aac8f738b94c", "score": "0.48744538", "text": "public function GetOptions() {\n\n try {\n \n $sqlQuery = \"Select * from `\".self::table_location.\"` where `is_available`='1'\";\n\n $result = $this->connect->query($sqlQuery);\n\n if($result->num_rows>0) {\n\n $i=0;\n\n while($row = $result->fetch_assoc()) {\n \n $this->arr[$i]=$row;\n ++$i;\n\n }\n\n }\n\n return $this->arr;\n\n } catch(Exception $e) {\n\n return $e;\n\n }\n\n }", "title": "" }, { "docid": "c776b35a24ff20fdd92a25be23a5e11c", "score": "0.48739132", "text": "public function getEnv();", "title": "" }, { "docid": "117c3a88c3a56623e229c5f1f1fd9a94", "score": "0.4873088", "text": "public function getFabricanteOptions()\r\n {\r\n $criteria = new CDbCriteria();\r\n $criteria->order='fabricante';\r\n $criteria->condition='activo=0';\r\n return Fabricante::model()->findAll($criteria);\r\n }", "title": "" }, { "docid": "8bb109a44815688f7c904d87cff8c156", "score": "0.48705903", "text": "public function listar(){\n\t\t$this->sql = \"SELECT * from vsites_pacotes as p where status='Ativo' order by pacote\";\n\t\t$this->values = array();\n\t\treturn $this->fetch();\n\t}", "title": "" }, { "docid": "94f96b93d6c26e39f2055f06b068d4dc", "score": "0.48669744", "text": "public function getSystemUserPrograms()\n {\n $system_user_programs = array();\n return $system_user_programs;\n }", "title": "" }, { "docid": "d1d9d2152c8655dd4a4117981cc20be3", "score": "0.48668334", "text": "public function getCaracteristicaOptions()\r\n {\r\n $criteria=new CDbCriteria();\r\n $criteria->order='caracteristica';\r\n $criteria->condition='activo=0';\r\n return Caracteristica::model()->findAll($criteria);\r\n }", "title": "" }, { "docid": "31f485a24e73466f62890b8bd3133fea", "score": "0.48665482", "text": "public function alertaList()\n\t{\n\t\t\theader(\"Content-Type: text/plain; charset=utf-8\"); //Para evitar problemas de acentos\n\n\t\t\t$arrParam['idSesion'] = $this->input->post('identificador');\n\t\t\t$this->load->model(\"general_model\");\n\t\t\t$lista = $this->general_model->get_alertas_by($arrParam);\n\t\t\n\t\t\techo \"<option value=''>Select...</option>\";\n\t\t\tif ($lista) {\n\t\t\t\tforeach ($lista as $fila) {\n\t\t\t\t\techo \"<option value='\" . $fila[\"idAlerta\"] . \"' >\" . $fila[\"descripcion\"] . \"</option>\";\n\t\t\t\t}\n\t\t\t}\n }", "title": "" }, { "docid": "93f7d2806a9d08a2c16e60845e814f45", "score": "0.4864856", "text": "function getAppraisalValueList($varname, $default = \"\", $extra = \"\", $action = \"\")\n{\n $strResult = \"\";\n $intStart = 0;\n $intFinish = 5;\n $strResult .= \"<select name=$varname $action> \\n\";\n $strResult .= $extra;\n for ($i = $intStart; $i <= $intFinish; $i++) {\n ($default == $i && $default != \"\") ? $strSelected = \"selected\" : $strSelected = \"\";\n $strResult .= \"<option value=$i $strSelected>$i</option>\\n\";\n }\n $strResult .= \"</select>\\n\";\n return $strResult;\n}", "title": "" }, { "docid": "41f0316f9172e95127d482c7761e027e", "score": "0.48645282", "text": "function select_lugar_trabajo($connect_db,$varSession,$tabla_){\n\n\t$query = \"SELECT id_\".$tabla_.\",\".$tabla_.\" FROM \".$tabla_.\" WHERE activo=1\";\n\t$result = mysqli_query($connect_db,$query);\n\n\t$selec_array=array();\n\tarray_push($selec_array,\"<select name=\".$tabla_.\" id=\".$tabla_.\">\",\"<option value='0'> Seleccione una opcion: </option>\");\n\t\n\twhile($var = mysqli_fetch_array($result)){\n\t$select=\"\";\n\t$id = \"id_$tabla_\";\n\n\tif($var[$id]==$varSession){\t\t\n\t\t$select=\"selected\";\n\t\t}\t\t\t\t\t\t\t\t\n\t\tarray_push($selec_array,\"<option value=\".$var[$id].\" $select>\".$var[$tabla_].\"</option>\");\t\n\t}\n\tarray_push($selec_array,\"</select>\");\n\treturn $selec_array;\n}", "title": "" } ]
4d6ea5912eef96f9c6f2565f57a720a6
Clears the meta attributes array.
[ { "docid": "6d0faf15b0f939721fee3aa389864a1f", "score": "0.64024323", "text": "public function clear()\n {\n $this->attributes = array();\n\n return $this->attributes;\n }", "title": "" } ]
[ { "docid": "9c61706d20b1132a1b34bb362d4ee1b0", "score": "0.79069144", "text": "private function clearAttributes()\n\t{\n\t\t$this->attributes = array();\n\t}", "title": "" }, { "docid": "9d9c670410db758c2ef025c819bad863", "score": "0.7845432", "text": "public function clearAttributes();", "title": "" }, { "docid": "6b9efb99fe83c42563b0439f92d30b8e", "score": "0.7579509", "text": "public function clear(): void\n {\n $this->attributes = [];\n }", "title": "" }, { "docid": "230af199c78b479e52da797db05d1abf", "score": "0.7573299", "text": "public static function clear() \n\t{ \n\t\tself::$metas = array(); \n\t}", "title": "" }, { "docid": "35771463a25222230c6fd63e1442861f", "score": "0.70134014", "text": "private function resetAttributes()\n {\n $this->title = '';\n $this->organizer = '';\n $this->description = '';\n $this->url = '';\n $this->image_url = '';\n $this->date = '';\n $this->time = '';\n }", "title": "" }, { "docid": "7c5d0ed2f2b23023a06cafaba44fe650", "score": "0.6872487", "text": "public function clear() {\n // TODO: update $this->_previous_attributes with removed items\n foreach ( func_get_args() as $arg ) {\n $this->_previous_attributes[$arg] = $this->attributes[$arg];\n unset( $this->attributes[$arg] );\n }\n }", "title": "" }, { "docid": "ce48c18445a86517dd29b6c559744139", "score": "0.6814061", "text": "public function reset() {\n $this->_attributes = array();\n $this->_content = array();\n }", "title": "" }, { "docid": "b695fd0ced10f6e9d4803b666a30a641", "score": "0.66447514", "text": "public function clear_attributes() {\n $this->attributes = array();\n return $this;\n }", "title": "" }, { "docid": "08c410e658dfee2c471f368483d404e0", "score": "0.6638384", "text": "function removeAllMeta() {\n $this->meta = array();\n return $this;\n }", "title": "" }, { "docid": "ec11353229757f907df8f5f8c4d12091", "score": "0.6595909", "text": "public function emptyAttributes ()\n\t\t{\n\t\t\t$this->main_node->emptyAttributes();\n\t\t}", "title": "" }, { "docid": "d0712b4cbde62628b39f0556fa374abc", "score": "0.654521", "text": "public function clear()\r\n {\r\n foreach ($this->_data as $key => $value) {\r\n $this->$key = null;\r\n }\r\n }", "title": "" }, { "docid": "fee6a9e49d56650f650a5ae0c6872477", "score": "0.6456149", "text": "public function resetMetadata()\n {\n $this->metadata = null;\n }", "title": "" }, { "docid": "bf6048d09afd43f0526d411c1af6f88d", "score": "0.6411483", "text": "public function clear(): void\n {\n foreach ($this as $name => $_) {\n unset($this->$name);\n }\n }", "title": "" }, { "docid": "3ebc66840492d833772f9c6beee65426", "score": "0.63866466", "text": "public function clear_attributes() {\n\t\t$this->attributes = [ ];\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "f66d82a690057efc50b40058bc4687f8", "score": "0.63768667", "text": "private function clear_changed_attributes() {\n $this->changed_attributes = array();\n }", "title": "" }, { "docid": "3f043687980853f2af06a207ab800e50", "score": "0.6357055", "text": "protected function set_attributes() {\n\t\t$this->attributes = array();\n\t}", "title": "" }, { "docid": "e572d331ea721432093634d3e37ba058", "score": "0.6285728", "text": "function clean_metas($name = null)\n {\n if ($name !== null)\n {\n unset($this->metas[$name]);\n }\n else\n {\n $this->metas = array();\n }\n }", "title": "" }, { "docid": "0dbd3bd7ae54c1b50e3655e085b647dc", "score": "0.6253497", "text": "public function remove_attributes( $attributes ) {\n\t\t$attributes['itemprop'] = '';\n\t\t$attributes['itemscope'] = '';\n\t\t$attributes['itemtype'] = '';\n\t\treturn $attributes;\n\t}", "title": "" }, { "docid": "6ed4db9392565dc3c5210bdcfce67780", "score": "0.6250058", "text": "private function rebuildAttr() {\n $metaDataCache = Shopware()->Models()->getConfiguration()->getMetadataCacheImpl();\n $metaDataCache->deleteAll();\n Shopware()->Models()->generateAttributeModels(['s_articles_attributes']);\n }", "title": "" }, { "docid": "cedb43e5210c886a9da35abcf97b557b", "score": "0.6220827", "text": "public function clear () {\r\n foreach (array_keys( $this->_d ) as $key)\r\n $this->remove( $key );\r\n }", "title": "" }, { "docid": "76ea218e66662eee7a7887ba37ee9f1b", "score": "0.6184974", "text": "public function clear()\n {\n $this->metaTags = [];\n $this->linkTags = [];\n $this->css = [];\n $this->cssFiles = [];\n $this->js = [];\n $this->jsFiles = [];\n static::$constants = [];\n $this->placeholders = [];\n }", "title": "" }, { "docid": "6ed609b56f758989eeb5b4bb9c40e499", "score": "0.61814886", "text": "public function clearWidgetProperties() {\n $this->properties = array();\n }", "title": "" }, { "docid": "1be240a7c404f78eee63c481b8a43036", "score": "0.617068", "text": "public function deleteAllMeta()\r\n {\r\n return $this->meta()->delete();\r\n }", "title": "" }, { "docid": "7b726c02ce649e515117bbb75491a8c3", "score": "0.61459863", "text": "public function reset()\n {\n $this->values[self::FEATURE] = array();\n }", "title": "" }, { "docid": "2729fa497ad605de22ceff94e650b977", "score": "0.6117682", "text": "public function clear() : void\n {\n $this->m_properties = array();\n $this->m_isFromDB = false;\n }", "title": "" }, { "docid": "844659f8f2e1f2da2a8d0abe35c84ce5", "score": "0.6104438", "text": "protected function _emptyUnsavedAttributes()\n {\n $this->_unsavedAttributes = array();\n $this->_validatedUnsavedAttributes = array();\n }", "title": "" }, { "docid": "feb3006a8b1e6f3317eba2b12603e861", "score": "0.6081376", "text": "public function clear() {\n foreach ($this->_values as $name => $value) {\n $this->_values[$name] = NULL;\n }\n }", "title": "" }, { "docid": "fbdda2f3b05b5065f0a6ee618d8acd82", "score": "0.60795975", "text": "public function clear()\n {\n $this->keys = array();\n parent::clear();\n }", "title": "" }, { "docid": "79c52e4189ebc8d3161874e811ec5bc7", "score": "0.6065603", "text": "function offsetUnset($key){ \n if(isset($this->data[$key]))\n $this->data[$key] = new opc_attrs($this->str[$key]['tag']);\n }", "title": "" }, { "docid": "ffb413c49afd60dc0ea0d5dd96133892", "score": "0.60517275", "text": "private function reset() {\n $this->attributes = array(\n 'name' => null,\n 'size' => 0,\n 'path' => null,\n 'extension' => null,\n 'mime_type' => null,\n 'remote' => 0,\n 'valid' => false,\n 'content' => null,\n );\n $this->options = array(\n 'content_type' => null,\n 'write_file' => false,\n 'destination' => null,\n 'name' => null,\n );\n }", "title": "" }, { "docid": "ce9c388c064134f1353204119e67cf32", "score": "0.603837", "text": "public function __unset($key) {\n unset($this->attributes[$key]);\n }", "title": "" }, { "docid": "ce9c388c064134f1353204119e67cf32", "score": "0.603837", "text": "public function __unset($key) {\n unset($this->attributes[$key]);\n }", "title": "" }, { "docid": "f048909ec9fd4f06706d822e9be31d03", "score": "0.60380054", "text": "public function reset() {\n\t\t$this->setTemplateName( null );\n\t\tunset( $this->mAttributes );\n\t\t$this->mAttributes = [];\n\t\t$this->mRenderBuffer = null;\n\t}", "title": "" }, { "docid": "6a842325866c5af45c85edc48b5c80c1", "score": "0.60277545", "text": "protected function getResetValidationCustomAttributes()\r\r\n {\r\r\n return [];\r\r\n }", "title": "" }, { "docid": "4e23db548f495457b001a9a7d8f1bed4", "score": "0.6027544", "text": "function clearRecords() {\n\t\t\t$meta = isset($this->domainInfo[' META ']) ? $this->domainInfo[' META '] : array();\n\t\t\t$soa = isset($this->domainInfo['SOA']) ? $this->domainInfo['SOA'] : array();\n\t\t\t$this->domainInfo = array();\n\t\t\t$this->domainInfo['SOA'] = $soa;\n\t\t\t$this->domainInfo[' META '] = $meta;\n\t\t}", "title": "" }, { "docid": "6c5ec1b2dcf1ad3d441166693e32e88a", "score": "0.60223645", "text": "public function reset()\n\t{\n\t\tforeach([\n\t\t\t'_field_data',\n\t\t\t'_error_array',\n\t\t\t'_error_messages'\n\t\t] as $var) {\n\t\t\t$this->$var = array();\n\t\t}\n\t}", "title": "" }, { "docid": "a66f73fa5c8a43a087dc961ddcff4609", "score": "0.601627", "text": "public static function cleanAttributes( array $attributes ) {\n\t\tforeach ( static::$specialAttributes as $specialAttribute ) {\n\t\t\tunset( $attributes[ $specialAttribute ] );\n\t\t}\n\t\tif ( array_key_exists( 'slug', $attributes ) && $attributes[ 'slug' ] === null ) {\n\t\t\tunset( $attributes[ 'slug' ] );\n\t\t}\n\n\t\treturn $attributes;\n\t}", "title": "" }, { "docid": "6a84514b6a7eea3b0b2905c1f4ce6f46", "score": "0.59739804", "text": "public static function clearMap()\n {\n self::$identityMap = [];\n self::$uniqueAttributeToId = [];\n }", "title": "" }, { "docid": "5737efed94f055a981594c7a4a572380", "score": "0.596267", "text": "public function clear_item_array()\n {\n $this->_single_vars = [];\n }", "title": "" }, { "docid": "cdf49f9e6a2198c1a5ca250e6ccadd16", "score": "0.5949988", "text": "public function offsetUnset($key)\n {\n unset($this->meta[$key]);\n }", "title": "" }, { "docid": "9c69f55d839945b0125918379a4661c0", "score": "0.5946862", "text": "public function reset() {\n $this->values[self::CAR_INFO_ARRAY] = array();\n $this->values[self::CAR_CITY_CODE] = -1;\n $this->values[self::LOCAL_ENABLE_TIPS] = null;\n }", "title": "" }, { "docid": "f0e37216477323d11257596f223df589", "score": "0.5944061", "text": "private function purgeRedundant()\n\t{\n\t\t$clean = array();\n\n\t\tforeach ($this->attributes as $key => $value) {\n\t\t\tif ( ! Str::endsWith($key, '_confirmation')) $clean[$key] = $value;\n\t\t}\n\t \n\t \t$this->attributes = $clean;\n\t}", "title": "" }, { "docid": "64e262e09d1fc58fa397152814019b06", "score": "0.5941463", "text": "public function unsetAll()\n {\n foreach (get_object_vars($this) as $key=>$value) {\n if ('readOnly' != $key) {\n unset($this->$key);\n }\n }\n }", "title": "" }, { "docid": "c10ba05e43c937f439aeb8385a7b7dc5", "score": "0.59277093", "text": "public function offsetUnset($key)\n\t{\n\t\tunset($this->attributes[$key]);\n\t}", "title": "" }, { "docid": "499c893c17001b63573ff701d68362ad", "score": "0.5925449", "text": "public function reset()\n {\n $this->values[self::TYPE] = null;\n $this->values[self::DISPLAY_NAME] = null;\n $this->values[self::FIRST_NAME] = null;\n $this->values[self::PHOTO_URL] = null;\n $this->values[self::EMAIL] = array();\n $this->values[self::PHONE] = array();\n $this->values[self::IN_USERS_DOMAIN] = null;\n $this->values[self::GENDER] = null;\n $this->values[self::PHOTO_URL_STATUS] = null;\n $this->values[self::CANONICAL_EMAIL] = null;\n }", "title": "" }, { "docid": "e4d5b846ff06adad3246d5805c9bb31f", "score": "0.5914022", "text": "public function removeAttributes(array $keys);", "title": "" }, { "docid": "b2442ef6815e049fd14640de5f9e879c", "score": "0.590705", "text": "function clean_http_metas($name = null)\n {\n if ($name !== null)\n {\n unset($this->http_metas[$name]);\n }\n else\n {\n $this->http_metas = array();\n }\n }", "title": "" }, { "docid": "afdf9bd4001514a68d65bf504a7a97ce", "score": "0.59058684", "text": "private function cleanAttributes()\n {\n if (isset($this->attributes['spacestation'])) {\n $this->attributes['space_station'] = $this->attributes['spacestation'];\n\n unset($this->attributes['spacestation']);\n }\n\n if (isset($this->attributes['spacestations'])) {\n $this->attributes['space_stations'] = $this->attributes['spacestations'];\n\n unset($this->attributes['spacestations']);\n }\n }", "title": "" }, { "docid": "61bb5e382d3c4691b8fe05bfdf5fcff3", "score": "0.5898369", "text": "function cClear_All() {\r\n\t\tforeach ( $this->TAGDEFAULTS as $tag )\r\n\t\t\t$tag = \"\";\r\n\t\tforeach ( $this->TAGVALUES as $tag )\r\n\t\t\t$tag = \"\";\r\n\t\tforeach ( $this->AREAINDEX as $area )\r\n\t\t\t$area [0] = \"\";\r\n\t\t$this->MAIN [0] = \"\";\r\n\t}", "title": "" }, { "docid": "62daa8096b8cf6d741f3480fa4326b07", "score": "0.5895759", "text": "public static function meta_reset()\n {\n global $pagenow;\n\n /**\n * piklist_reset_meta_admin_pages\n *\n * @since 1.0\n */\n self::$reset_meta = apply_filters('piklist_reset_meta_admin_pages', self::$reset_meta);\n\n if (in_array($pagenow, self::$reset_meta))\n {\n foreach (self::$reset_meta as $page => $data)\n {\n if (isset($_REQUEST[$data['id']]))\n {\n wp_cache_replace($_REQUEST[$data['id']], false, $data['group']);\n\n break;\n }\n }\n }\n }", "title": "" }, { "docid": "7c52f8dccbbefc6e1e04226d2e22bf9d", "score": "0.58951396", "text": "function clear_item_array()\n{\n\t$this->_single_vars = array();\n}", "title": "" }, { "docid": "55a6e5a3180282dfe8d345b06beb8de4", "score": "0.58927006", "text": "public function clear()\n {\n $this->aliases = [];\n $this->aliasToClass = [];\n $this->pluralAliasToClass = [];\n }", "title": "" }, { "docid": "b4ba56458ef13c7769ef27dd997854ad", "score": "0.5891861", "text": "protected function clear() {\n\t\t$this->_xmlData = false;\n\n\t\tif(isset($this->_translations)) {\n\t\t\tunset($this->_translations['tags']);\n\t\t\tunset($this->_translations['attrs']);\n\t\t\tunset($this->_translations);\n\t\t}\n\n\t\t$this->data = '';\n\t\t$this->_class = '';\n\t\t$this->_filename = '';\n\t\t$this->_filepath = '';\n\t\t$this->_showAttrs = false;\n\t\t$this->_translations = array(\n\t\t\t\t\t\t'tags' => array(),\n\t\t\t\t\t\t'attrs' => array()\n\t\t);\n\t\t$this->_translator = '';\n\n\t\t$this->_isEditable = false;\n\t\t$this->_isEditableChecked = false;\n\t}", "title": "" }, { "docid": "2d10f60cb02630756ba447111979a3c6", "score": "0.58895856", "text": "public function clear()\n {\n $this->data = array();\n }", "title": "" }, { "docid": "e0a86c645528e539d2d305dae2536d43", "score": "0.58841133", "text": "public function __unset($key)\n {\n unset($this->attributes[$key]);\n }", "title": "" }, { "docid": "e0a86c645528e539d2d305dae2536d43", "score": "0.58841133", "text": "public function __unset($key)\n {\n unset($this->attributes[$key]);\n }", "title": "" }, { "docid": "e0a86c645528e539d2d305dae2536d43", "score": "0.58841133", "text": "public function __unset($key)\n {\n unset($this->attributes[$key]);\n }", "title": "" }, { "docid": "dcd19607d4f23f125ab035dd343dc829", "score": "0.58813673", "text": "public function reset() {\n $this->values[self::TIPS] = null;\n $this->values[self::PATH] = null;\n }", "title": "" }, { "docid": "ce845cb8956fec54166594134cad1110", "score": "0.5878913", "text": "function reset($array = null){\n\t\t$this->clearAttributes();\n \t$this->resetFlashCounter();\n \tif(is_array($array)){\n\t \tforeach($array as $key => $value){\n\t \t\t$this->setAttribute($key,$value);\n\t \t}\n \t}\n\t}", "title": "" }, { "docid": "5126a7ee66485e46b4343595b9e884fe", "score": "0.58740944", "text": "public function reset() {\n $this->values[self::TYPE] = null;\n $this->values[self::LENGTH] = null;\n }", "title": "" }, { "docid": "a9492b8e3afe33c10e5699aedd1c3373", "score": "0.5848379", "text": "public function reset()\n {\n foreach ($this as $key => $value) {\n $this->$key = null;\n }\n\n // need to set contacts to stdClass otherwise it will not working to\n // add items again\n $this->contacts = new \\stdClass();\n $this->lastId = - 1;\n }", "title": "" }, { "docid": "286712e6fba1e3aaf60eb0c043d5b981", "score": "0.58435005", "text": "public static function clear()\n {\n self::$correlationData = array();\n }", "title": "" }, { "docid": "7174e239d55e4534131be39ff28045d5", "score": "0.58373183", "text": "public function reset()\n {\n $this->values[self::THUMBNAIL] = null;\n $this->values[self::OWNER_OBFUSCATED_ID] = null;\n $this->values[self::ALBUM_ID] = null;\n $this->values[self::PHOTO_ID] = null;\n $this->values[self::URL] = null;\n $this->values[self::ORIGINAL_CONTENT_URL] = null;\n $this->values[self::MEDIA_TYPE] = null;\n $this->values[self::STREAM_ID] = array();\n }", "title": "" }, { "docid": "bec93d4514eab27e65c43a548151a203", "score": "0.58344793", "text": "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_cargo('');\n $this->setCargo('');\n $this->setOrden_cargo('');\n $this->setSf('');\n $this->setSv('');\n $this->setTipo_cargo('');\n $this->setPrimary_key($aPK);\n }", "title": "" }, { "docid": "fdbca6420f65eb2c57901d382241864f", "score": "0.58281976", "text": "public function reset() {\n\t\t$this->_data = array();\n\t}", "title": "" }, { "docid": "efeb640fa63137f3c6b1271fc3aea5d6", "score": "0.5820466", "text": "private static function _resetTags() {\n self::$tags = array();\n }", "title": "" }, { "docid": "18b88de0e2a2d0366209d9bc85e2ff1e", "score": "0.5812866", "text": "function clean_html5_metas($name = null)\n {\n if ($name !== null)\n {\n unset($this->html5_metas[$name]);\n }\n else\n {\n $this->html5_metas = array();\n }\n }", "title": "" }, { "docid": "e39516014d0141730f988d8f6148653b", "score": "0.58086246", "text": "protected function remove_unneeded_attachment_meta() {\n\t\tdelete_post_meta_by_key( Media::POSTER_POST_META_KEY );\n\t}", "title": "" }, { "docid": "23d8265b348e402e7c0c527de435e268", "score": "0.5805594", "text": "protected function initAttributes()\n {\n if ( !(self::$class === get_class($this)) || !(isset(self::$attribute_names)) ) {\n self::$attribute_names = DB::getObject()->getColumns($this->table);\n self::$class = get_class($this);\n }\n\n foreach (self::$attribute_names as $col_name){\n $this->attributes[$col_name] = null;\n }\n }", "title": "" }, { "docid": "48a77d13b5ca599a715ad7cfac4f6d5c", "score": "0.5801038", "text": "protected function clear() {\n\t\t$this->args = array();\n\t\t$this->settings = array();\n\t}", "title": "" }, { "docid": "95aa88d18e1b788c843d6ab51eb86552", "score": "0.5793965", "text": "public function reset() {\n $this->values[self::INFOS] = array();\n $this->values[self::INTERVAL] = null;\n $this->values[self::TIMESTAMP] = null;\n }", "title": "" }, { "docid": "95aa88d18e1b788c843d6ab51eb86552", "score": "0.5793965", "text": "public function reset() {\n $this->values[self::INFOS] = array();\n $this->values[self::INTERVAL] = null;\n $this->values[self::TIMESTAMP] = null;\n }", "title": "" }, { "docid": "5a75ddfa9b3a4afcc27ba6f81d3cd314", "score": "0.5793013", "text": "public function reset()\n {\n $this->values[self::activity] = null;\n $this->values[self::product_picture] = array();\n $this->values[self::product_name] = null;\n $this->values[self::specification] = null;\n $this->values[self::product_price] = null;\n $this->values[self::product_detail] = array();\n $this->values[self::pintuan] = array();\n $this->values[self::else_pintuan] = array();\n $this->values[self::pintuan_status] = null;\n $this->values[self::pintuan_info] = null;\n $this->values[self::time_status] = null;\n $this->values[self::specifications] = array();\n $this->values[self::specification_item] = array();\n $this->values[self::pintuan_end_time] = null;\n }", "title": "" }, { "docid": "856e73841cb9e853e4aa4b9d508c63b4", "score": "0.5787149", "text": "function __unset($key) {\n //echo \"Unsetting '$key'\\n\";\n if(array_key_exists($key, $this->attributes)) {\n unset($this->attributes[$key]);\n } else {\n unset($this->$key);\n }\n }", "title": "" }, { "docid": "8d2dee038526095735bc4963bcbcadad", "score": "0.5782979", "text": "protected function getMetaAttributes()\n {\n return array();\n }", "title": "" }, { "docid": "8e6cad8e80b6552e82ab81a8a3095ed7", "score": "0.5778088", "text": "public function reset()\n {\n $this->values[self::PHOTO_ID] = null;\n $this->values[self::DELETE_ALBUMLESS_SOURCE_PHOTO] = null;\n $this->values[self::USER_ID] = null;\n $this->values[self::IS_CUSTOM_USER_ID] = null;\n }", "title": "" }, { "docid": "db6b9692af70af761a21eeb6f0212dc5", "score": "0.57742614", "text": "public function clearData()\n {\n $this->html_element_data = [];\n }", "title": "" }, { "docid": "6f4d527d7712a3e38e76a0ae196f7c4c", "score": "0.576552", "text": "public function resetDefaults($attribute=null)\n {\n if ($attribute===null)\n $this->savePersistentDefaults(null);\n else\n {\n $defaults=$this->loadPersistentDefaults();\n if (!is_array($attribute))\n $attribute=array($attribute);\n foreach($attribute as $attr)\n unset($defaults[$attr]);\n $this->savePersistentDefaults($defaults);\n }\n }", "title": "" }, { "docid": "320192f095f2407c17b0828f4f0c2c58", "score": "0.576071", "text": "public function reset() {\n $this->values[self::DIGEST] = null;\n $this->values[self::LEGS] = array();\n }", "title": "" }, { "docid": "989320b41fb29ffa0ca24ee61c539d2e", "score": "0.5746897", "text": "public function clear()\n {\n $this->pragmas = [];\n }", "title": "" }, { "docid": "540dfd41bf641bebd896ea0d428e56d9", "score": "0.5741348", "text": "public function reset()\n {\n $this->values[self::ID] = null;\n $this->values[self::NAME] = null;\n $this->values[self::REGION] = null;\n $this->values[self::ADD_MODE] = null;\n $this->values[self::LOCATE_TYPE] = null;\n $this->values[self::DESC] = null;\n $this->values[self::FLAG] = null;\n }", "title": "" }, { "docid": "d94aaebc106390a36572452e120317b5", "score": "0.574002", "text": "public function clearAll() \n {\n\t\tunset($this->identity_id);\n\t\tunset($this->module);\n\t\tunset($this->site_id);\n }", "title": "" }, { "docid": "5c007d78942b593cc80bc629bdce910f", "score": "0.5739499", "text": "public function reset()\n {\n $this->tagName = '';\n $this->content = '';\n $this->attributes = array();\n $this->forceClosingTag = false;\n }", "title": "" }, { "docid": "877511cd57888a94828839ad2438a97a", "score": "0.5738312", "text": "public static function _reset()\n {\n self::$widgets = array();\n self::$hookCalled = false;\n self::getCacheForCompleteList()->delete(self::getCacheId());\n }", "title": "" }, { "docid": "59269ab069429d79d991a660ad4c8671", "score": "0.5728849", "text": "public function clear(): void\n {\n $this->propertyExtractors = [];\n DtoServiceProviderSingleton::getInstance()->setBooted(false);\n }", "title": "" }, { "docid": "472376147b590660358ac1cd40b425fa", "score": "0.57215464", "text": "function clear_plural_item_array()\n{\n\t$this->_plural_vars = array();\n}", "title": "" }, { "docid": "5d65efeac3559617b9ca2e05fac21ac3", "score": "0.57138306", "text": "function clean(){\n\t\t$this->chache = [];\n\t}", "title": "" }, { "docid": "9154035c3eaa1abedf177f965c20b480", "score": "0.56973255", "text": "public static function resetCachedTags(): void\n {\n self::$tags = [];\n }", "title": "" }, { "docid": "3bf4660cbd2fd1b3d65f28eddd6a3807", "score": "0.5693617", "text": "public function reset() {\n $this->values[self::DISTANCE] = null;\n $this->values[self::DURATION] = null;\n $this->values[self::STEPIS] = array();\n $this->values[self::MRSL] = null;\n $this->values[self::DURATION_INFO] = null;\n $this->values[self::DURATION_WHOLEDAY] = null;\n }", "title": "" }, { "docid": "6d5bb231d38175b05088c782465fdff4", "score": "0.56877303", "text": "public function unregisterMetaboxes(){\n\n }", "title": "" }, { "docid": "097932218d05469d4d4fbec2120326c8", "score": "0.5687401", "text": "public function unset_all()\n {\n unset(\n $this->ID,\n $this->user_name,\n $this->password,\n $this->email,\n $this->registration_time,\n $this->rights,\n $this->confirm_code,\n $this->tmp_email\n );\n }", "title": "" }, { "docid": "5f6854b5a7c07c65460225d53498505e", "score": "0.56857693", "text": "public function clearValues(): void\n\t{\n\t\tforeach($this->fields as $name => $field)\n\t\t\t$field->clearValue();\n\t}", "title": "" }, { "docid": "73dc3a4f7de21f33e67996aa5587bbeb", "score": "0.56811374", "text": "public function clear() {\n $this->items = array();\n }", "title": "" }, { "docid": "73dc3a4f7de21f33e67996aa5587bbeb", "score": "0.56811374", "text": "public function clear() {\n $this->items = array();\n }", "title": "" }, { "docid": "0ec3201af846821b0e97df8138f986ee", "score": "0.5679927", "text": "public static function clearTableMetadata() {\n self::$_table_descriptions = array();\n }", "title": "" }, { "docid": "67517abf85feee6e88422a47e89dbc7d", "score": "0.56794375", "text": "function ClearFieldsValues()\n\t{\n\t if (Utils::IsArray($this->fields)) foreach ($this->fields as $obj) $obj->value = null;\n\t}", "title": "" }, { "docid": "8c95cd4121edff050fef9202038578fc", "score": "0.5677131", "text": "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_item('');\n $this->setId_nom('');\n $this->setTitulo('');\n $this->setCentro_dnt('');\n $this->setEclesiastico('');\n $this->setYear('');\n $this->setPrimary_key($aPK);\n }", "title": "" }, { "docid": "5b99bc6bee360dc5754a2883688667d1", "score": "0.5672208", "text": "function setNullAllAtributes()\n {\n $aPK = $this->getPrimary_key();\n $this->setId_schema('');\n $this->setId_direccion('');\n $this->setDireccion('');\n $this->setC_p('');\n $this->setPoblacion('');\n $this->setProvincia('');\n $this->setA_p('');\n $this->setPais('');\n $this->setF_direccion('');\n $this->setObserv('');\n $this->setCp_dcha('');\n $this->setLatitud('');\n $this->setLongitud('');\n $this->setPlano_doc('');\n $this->setPlano_extension('');\n $this->setPlano_nom('');\n $this->setNom_sede('');\n $this->setPrimary_key($aPK);\n }", "title": "" }, { "docid": "fb787e6943a7a9cf8756416b25b90dfd", "score": "0.5668808", "text": "public function removeAll() {\n\t\t$keys = $this->getKeys();\n\n\t\tforeach ($keys as $key) {\n\t\t\tunset($this[$key]);\n\t\t}\n\t}", "title": "" }, { "docid": "40a50cfff0cd650b30abdadd94357cb1", "score": "0.5662219", "text": "public function reset() {\n $this->values[self::LENGTH] = array();\n $this->values[self::STATUS] = array();\n }", "title": "" } ]
07f875ad1b929dfddc18a23918bb944e
TODO: Implement setOperation() method.
[ { "docid": "fcaaadfef3d98f8bbc4547464cb3df75", "score": "0.7936523", "text": "public function setOperation($value)\n {\n }", "title": "" } ]
[ { "docid": "175e765f467441a535f96f0da0f603c4", "score": "0.7386324", "text": "public function getOperation()\n {\n }", "title": "" }, { "docid": "4043bcb54a5cae711700caaf7bdbff36", "score": "0.724882", "text": "public function createOperation();", "title": "" }, { "docid": "ff3ae373c1c797a411fab194e17eb13f", "score": "0.6979336", "text": "public function operation()\n {\n $this->_component->operation();\n }", "title": "" }, { "docid": "e00e49d15978f104be1c594f2e920fb2", "score": "0.69492215", "text": "public function getOperation()\n {\n return $this->operation;\n }", "title": "" }, { "docid": "e00e49d15978f104be1c594f2e920fb2", "score": "0.69492215", "text": "public function getOperation()\n {\n return $this->operation;\n }", "title": "" }, { "docid": "e00e49d15978f104be1c594f2e920fb2", "score": "0.69492215", "text": "public function getOperation()\n {\n return $this->operation;\n }", "title": "" }, { "docid": "25e2335a132b359fc170c93398829839", "score": "0.69182104", "text": "public function setOperation($operation)\n {\n $this->operation = trim($operation);\n }", "title": "" }, { "docid": "186ba2af2d0c1fc65d2cbc9e6575b2a1", "score": "0.6888712", "text": "public function SetOperation($operation)\n\t{\n\t\t$this->operation = $operation;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "c4972c69fd5cba369c6dbd385c316d9d", "score": "0.68709373", "text": "public function operation()\n {\n }", "title": "" }, { "docid": "6924f97eed105976265e6d3fb9e96a08", "score": "0.68444645", "text": "public function operation()\n {\n $this->component->operation();\n }", "title": "" }, { "docid": "8381886375efb44266418a41236dbac4", "score": "0.6818023", "text": "public function setOperation($operation)\n {\n $this->operation = $operation;\n return $this;\n }", "title": "" }, { "docid": "8381886375efb44266418a41236dbac4", "score": "0.6818023", "text": "public function setOperation($operation)\n {\n $this->operation = $operation;\n return $this;\n }", "title": "" }, { "docid": "8381886375efb44266418a41236dbac4", "score": "0.6818023", "text": "public function setOperation($operation)\n {\n $this->operation = $operation;\n return $this;\n }", "title": "" }, { "docid": "289759a2b91a697e1908385be6c4d72f", "score": "0.6816139", "text": "public function GetOperation()\n\t{\n\t\treturn $this->operation;\n\t}", "title": "" }, { "docid": "dd32a4fb9753d334969d044f4bd43bf9", "score": "0.673994", "text": "public function setOperation($var)\n {\n GPBUtil::checkInt32($var);\n $this->operation = $var;\n\n return $this;\n }", "title": "" }, { "docid": "7b07d4486df99b1c500ebd3d4463f6f2", "score": "0.6733022", "text": "public function setOperation(OperationInterface $operation): self;", "title": "" }, { "docid": "27fd8199fcd9711f1a6c668a207376d9", "score": "0.6715355", "text": "abstract public function operation();", "title": "" }, { "docid": "1d5f48e1fd6fcde0e99f534a6a7c0604", "score": "0.6664685", "text": "public function setOperation(\\Operations $oOperation)\r\n {\r\n $this->operation = $oOperation;\r\n return $this;\r\n }", "title": "" }, { "docid": "49612dd090a2e1c7218ee2617430549a", "score": "0.6659557", "text": "public function setOperation(iOperator $operation)\n {\n $this->operation = $operation;\n }", "title": "" }, { "docid": "49612dd090a2e1c7218ee2617430549a", "score": "0.6659557", "text": "public function setOperation(iOperator $operation)\n {\n $this->operation = $operation;\n }", "title": "" }, { "docid": "926843b34633476f1450e1103dd85eaf", "score": "0.65708554", "text": "public function set_op($op){\n $this->op = $op;\n }", "title": "" }, { "docid": "c04ae42c83422d33530b6b7007fec1fe", "score": "0.6567095", "text": "public function setOperation($operation)\n {\n $this->operation = $operation;\n\n return $this;\n }", "title": "" }, { "docid": "c7bad89c43622ed3522d64a5cbcad92c", "score": "0.65507525", "text": "public function setOperation(string $operation)\n {\n OptionsHelper::validateGroupOperation($operation);\n $this->operation = $operation;\n }", "title": "" }, { "docid": "bc17960c26e757d1cc15b44959232f61", "score": "0.6441221", "text": "public function setOp($op)\n {\n $this->op = $op;\n }", "title": "" }, { "docid": "616207f052b574f88bedf015e8ba56fc", "score": "0.64381945", "text": "public function getOperation()\r\n {\r\n if ($this->operation instanceof \\Operations) {\r\n return $this->operation;\r\n }\r\n throw new \\LogicException('Property \"operation\" expects an instance of \"\\Operations\"' . (is_object($this->operation) ? get_class($this->operation) : gettype($this->operation)) . '\" defined');\r\n }", "title": "" }, { "docid": "50b577eb733dbf8b81b1b56fdb8a2296", "score": "0.64133745", "text": "public function getOperation(): string\n {\n return $this->operation;\n }", "title": "" }, { "docid": "649535b8dc319fbf3c24f12ddaac2cb6", "score": "0.6373423", "text": "public function createOperation()\n {\n return new Operation();\n }", "title": "" }, { "docid": "feff1cc98277ff95229c65a9c1626efc", "score": "0.63548964", "text": "public function __construct(Operation $operation)\n {\n $this->operation = $operation;\n }", "title": "" }, { "docid": "fc98f1939d9e9d39efe87fcc6b3df3db", "score": "0.6342411", "text": "public function setOperationType($type);", "title": "" }, { "docid": "a5c36b45ffec7ed25561cfff65670110", "score": "0.61422366", "text": "public function getOperations()\n {\n return $this->operations;\n }", "title": "" }, { "docid": "99d6724e9f6a82a7e07a3debf99d5ad1", "score": "0.61319774", "text": "function setOperationText()\r\n\t{\r\n\t\t$this->operation = MOBYT_OPERATION_TEXT;\r\n\t}", "title": "" }, { "docid": "1a27dcd817c1f12af6ef7c29f9b62f84", "score": "0.61027604", "text": "public function getOperations();", "title": "" }, { "docid": "31a61b3e5f9f44eefab08a146f86a36d", "score": "0.60733324", "text": "public function onOper()\n {\n }", "title": "" }, { "docid": "caebcc77e479195aa6f4f7981390bd6d", "score": "0.6069406", "text": "public function save($operation);", "title": "" }, { "docid": "471c894c630ded554257603d05282392", "score": "0.60608345", "text": "public function setOperationList($array)\n {\n $this->operationList = $array;\n }", "title": "" }, { "docid": "b2c3e28cf832546f1d4e5ac3636e644c", "score": "0.6025584", "text": "public function getOperations()\n {\n return $this->operations;\n }", "title": "" }, { "docid": "dc6258c8ba354c7557c4024fbfabd4ec", "score": "0.5966949", "text": "abstract protected function updateOperationsEnabled(): bool;", "title": "" }, { "docid": "3cf967f4a2607a7845beee74018c2967", "score": "0.59664077", "text": "protected function AfterInitControl($item_id, $operation) {}", "title": "" }, { "docid": "e0006d87a8943a700395ece360183c38", "score": "0.5960889", "text": "public function setOperationAllowed($operation)\n {\n $this->operationAllowed = $operation;\n return $this;\n }", "title": "" }, { "docid": "648de0a0db2a2d09cd550fdaffbb7cf0", "score": "0.59490436", "text": "public function operation($op = 0)\n\t{\n\t\tif($op == self::ENCRYPT || $op == self::DECRYPT)\n\t\t\t$this->operation = $op;\n\n\t\treturn $this->operation;\n\t}", "title": "" }, { "docid": "3641d2e1713b5ba4c5743ca0ba8eda00", "score": "0.59194916", "text": "public function getOperationType()\n {\n return $this->operation_type;\n }", "title": "" }, { "docid": "3641d2e1713b5ba4c5743ca0ba8eda00", "score": "0.59194916", "text": "public function getOperationType()\n {\n return $this->operation_type;\n }", "title": "" }, { "docid": "ce6df3f6812f9479c4087e925ea9606d", "score": "0.59045786", "text": "public function setOperation($operation)\n {\n if (!InstantAccessOperationValue::isValid($operation)) {\n throw new \\InvalidArgumentException(sprintf('Invalid operation value: %s', $reason));\n }\n\n $this->operation = $operation;\n return $this;\n }", "title": "" }, { "docid": "9d7980a1ec7b72cb6d934b4a9b1cdd60", "score": "0.5901329", "text": "public function getOperationList()\n {\n return $this->operationList;\n }", "title": "" }, { "docid": "633b324ac4cdc3c1491bf809ab5f258c", "score": "0.5898873", "text": "public function setOperations($operations)\n {\n $this->operations = $operations;\n\n return $this;\n }", "title": "" }, { "docid": "ae6001eb361a13e98c33cf570535cc2a", "score": "0.58693063", "text": "public function defaultOp() { }", "title": "" }, { "docid": "37e048930b7824a3ee725f5875e113ef", "score": "0.58611655", "text": "public function getSetUpOperation() {\n\t\t$cascadeTruncates = false; // True if you want cascading truncates, false otherwise. If unsure choose false.\n\t\treturn new \\PHPUnit_Extensions_Database_Operation_Composite(array(\n\t\t\tnew TruncateOperation($cascadeTruncates),\n\t\t\t\\PHPUnit_Extensions_Database_Operation_Factory::INSERT()\n\t\t));\n\t}", "title": "" }, { "docid": "add52f1c204dd37ba55038a1241b15c0", "score": "0.5842446", "text": "public function __construct($operationData)\n {\n $this->operationData = $operationData;\n }", "title": "" }, { "docid": "0424df4e3eaeb6449b827cae4c5aa917", "score": "0.5820876", "text": "protected function getSetUpOperation()\n {//{{{\n $this->createTable();\n return parent::getSetUpOperation();\n }", "title": "" }, { "docid": "cb27ad08265eb31c58536d7680850239", "score": "0.5771477", "text": "public function getOperation($operationName) : OperationInterface;", "title": "" }, { "docid": "a526e0273891b385ca7458df22867d41", "score": "0.5765926", "text": "public function getOperation(): ?OperationInterface\n {\n return $this->operation;\n }", "title": "" }, { "docid": "f59eaf4795baf514a2a58d549641fd51", "score": "0.57418734", "text": "public function getOp()\n {\n return $this->op;\n }", "title": "" }, { "docid": "f59eaf4795baf514a2a58d549641fd51", "score": "0.57418734", "text": "public function getOp()\n {\n return $this->op;\n }", "title": "" }, { "docid": "0e1e1e3174b1d843287a0d72b1d1a417", "score": "0.57413435", "text": "public function getOperation(): ?OperationInterface;", "title": "" }, { "docid": "f230a71a28390fab4e9133b1bc75b153", "score": "0.57389724", "text": "public function setOperations(array $operations)\n\t{\n\t\t$this->operations = array_filter($operations, function($operation){\n\t\t\treturn $operation instanceOf OperationInterface;\n\t\t\t\n\t\t});\n\t}", "title": "" }, { "docid": "d82d2f1c164da62cc316777fa8ee109a", "score": "0.5738371", "text": "public function operationSet($operation, $lastOperationResult, &$context, $testName)\n {\n $key = key($operation);\n $value = $this->resolveValue($lastOperationResult, $key, $context);\n $variable = current($operation);\n\n $context['$' . $variable] = $value;\n\n return $lastOperationResult;\n }", "title": "" }, { "docid": "7cf1a1007d6550a2bb0edc79718abf47", "score": "0.57269657", "text": "public function getOperation(): ExecOperation\n {\n return new ExecOperation($this->name, $this->body);\n }", "title": "" }, { "docid": "7fb612afd4495677434e77b01c103018", "score": "0.5725285", "text": "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n }", "title": "" }, { "docid": "7fb612afd4495677434e77b01c103018", "score": "0.5725285", "text": "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n }", "title": "" }, { "docid": "7fb612afd4495677434e77b01c103018", "score": "0.5725285", "text": "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n }", "title": "" }, { "docid": "7fb612afd4495677434e77b01c103018", "score": "0.5725285", "text": "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n }", "title": "" }, { "docid": "7fb612afd4495677434e77b01c103018", "score": "0.5725285", "text": "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n }", "title": "" }, { "docid": "7fb612afd4495677434e77b01c103018", "score": "0.5725285", "text": "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n }", "title": "" }, { "docid": "7fb612afd4495677434e77b01c103018", "score": "0.5725285", "text": "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n }", "title": "" }, { "docid": "7fb612afd4495677434e77b01c103018", "score": "0.5725285", "text": "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n }", "title": "" }, { "docid": "7fb612afd4495677434e77b01c103018", "score": "0.5725285", "text": "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n }", "title": "" }, { "docid": "7fb612afd4495677434e77b01c103018", "score": "0.5725285", "text": "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n }", "title": "" }, { "docid": "7fb612afd4495677434e77b01c103018", "score": "0.5725285", "text": "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n }", "title": "" }, { "docid": "7fb612afd4495677434e77b01c103018", "score": "0.5725285", "text": "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n }", "title": "" }, { "docid": "7fb612afd4495677434e77b01c103018", "score": "0.5725285", "text": "protected function setupUpdateOperation()\n {\n $this->setupCreateOperation();\n }", "title": "" }, { "docid": "e3ebfc89626a1403e5f8b0e7bf00ae89", "score": "0.5696399", "text": "public function setOperationMade(int $operation): JobInterface;", "title": "" }, { "docid": "86a6292d40fd8e39361e90b115a730ec", "score": "0.5679544", "text": "public function getOperationInfo()\n {\n return $this->operation_info;\n }", "title": "" }, { "docid": "07fc247ad0cf35ca147e385c88c54044", "score": "0.56768084", "text": "public function lastOperation()\r\n {\r\n return $this->__last_operation;\r\n }", "title": "" }, { "docid": "fdf5df634dbecf12a8038a460573a327", "score": "0.5632228", "text": "public function getOperation()\n {\n $order = \"\";\n $operation = new StdClass();\n \n $operation->name = $this->name;\n $operation->inputMessage = null;\n $operation->outputMessage = null;\n $operation->documentation = null;\n\n $delim = \"\";\n foreach ($this->params as &$param) {\n $order .= $delim . $param->name;\n $delim = \" \";\n }\n\n // Input Message\n $request = $this->getMessageRequest();\n if ($request) {\n $operation->inputMessage = $request;\n }\n \n // Output Message\n $response = $this->getMessageResponse();\n if ($response) {\n $operation->outputMessage = $response;\n }\n \n \t// UED: Documentation Message\n if ($documentation = $this->desc) {\n $operation->documentation = $documentation;\n }\n \n // Set the Parameter Order\n $operation->parameterOrder = $order;\n \n return $operation;\n }", "title": "" }, { "docid": "6fc1f0a87fbe985fe8f31bd64fa47bce", "score": "0.56219673", "text": "public function setOpType($opType);", "title": "" }, { "docid": "e706cde2b9f3f508af7026a7a6d99a62", "score": "0.56193775", "text": "function setOperationRing()\r\n\t{\r\n\t\t$this->operation = MOBYT_OPERATION_RING;\r\n\t\t\r\n\t\tif ($this->quality != MOBYT_QUALITY_AUTO_NY)\r\n\t\t\t$this->setQualityHigh();\r\n\t}", "title": "" }, { "docid": "d8e5117c08e0f648e4dc356b85bd4b67", "score": "0.5604247", "text": "public function operation(): string\n {\n return $this->component->operation();\n }", "title": "" }, { "docid": "bdcfe06b0f1080983f6fc6835b1dc4ec", "score": "0.55639005", "text": "abstract protected function selectOperationsEnabled(): bool;", "title": "" }, { "docid": "5c1dbb42d82973bad069ebc9e3f29b0b", "score": "0.55576986", "text": "public function hasOperation(): bool;", "title": "" }, { "docid": "a3e2d10f841720ad5e6e3a96a088a7e7", "score": "0.55526674", "text": "public function getOperations()\n {\n return [];\n }", "title": "" }, { "docid": "389fafcf5b3a16a1b5230f84fce7aed4", "score": "0.55273354", "text": "public function getOperationId()\n {\n return $this->get('operationId');\n }", "title": "" }, { "docid": "cf312e0f75f4f69e7364c8a7737493fc", "score": "0.54806936", "text": "public function save(OperationModel $operation);", "title": "" }, { "docid": "ebf01fae51c8c9874d218577b631f7b8", "score": "0.5475039", "text": "public function setOperator($operator)\r\n {\r\n $this->checkParams($this->operation,$operator);\r\n $this->operator=$operator;\r\n }", "title": "" }, { "docid": "9c761332abe7cdd6a7a5d813de7bfff4", "score": "0.5456883", "text": "public function addOperation(Operation $operation): void\n {\n if (!$this->operations->contains($operation)) {\n $this->operations[] = $operation;\n $operation->addTag($this);\n }\n }", "title": "" }, { "docid": "801bfe0daaaf19dad18bcee4ecd35acc", "score": "0.5454781", "text": "function setOperationOlgo()\r\n\t{\r\n\t\t$this->operation = MOBYT_OPERATION_OLGO;\r\n\t\t\r\n\t\tif ($this->quality != MOBYT_QUALITY_AUTO_NY)\r\n\t\t\t$this->setQualityHigh();\r\n\t}", "title": "" }, { "docid": "677e2ac8f92e1f952774253ed850ad65", "score": "0.5433952", "text": "public static function getOperationName()\n {\n return \"number\";\n }", "title": "" }, { "docid": "7325d2ac9a3f3de95c714cc722fccaac", "score": "0.5402584", "text": "public function setOperationContent($value)\n {\n return $this->set(self::OPERATIONCONTENT, $value);\n }", "title": "" }, { "docid": "d8f22a4a273685ef856e3b812a931d66", "score": "0.5396157", "text": "public function addOperation($operation, $property = null, $value = null)\n\t{\n\t\tif (!array_key_exists($operation, $this->_operations)) {\n\t\t\t$this->_operations[$operation] = array();\n\t\t}\n\n\t\t// Save the operation\n\t\t$this->_operations[$operation][$this->getPathToProperty($property)] = $value;\n\t}", "title": "" }, { "docid": "ed4b33737a34089638eaf5842039738b", "score": "0.53908676", "text": "public function testSetGetTag()\n {\n $tag = new Tag();\n $operation = (new Operation())->setTag($tag);\n $this->assertEquals($tag, $operation->getTag());\n }", "title": "" }, { "docid": "c538ac8eb12e024d6cb431582647d397", "score": "0.5382845", "text": "public function __construct($key, $operation) {\n parent::__construct(\"$operation on an unknown key: $key\");\n }", "title": "" }, { "docid": "195471232881c1ddf6ea370e33b68d3b", "score": "0.53712815", "text": "public function getOperationsClient()\n {\n return $this->operationsClient;\n }", "title": "" }, { "docid": "195471232881c1ddf6ea370e33b68d3b", "score": "0.53712815", "text": "public function getOperationsClient()\n {\n return $this->operationsClient;\n }", "title": "" }, { "docid": "195471232881c1ddf6ea370e33b68d3b", "score": "0.53712815", "text": "public function getOperationsClient()\n {\n return $this->operationsClient;\n }", "title": "" }, { "docid": "195471232881c1ddf6ea370e33b68d3b", "score": "0.53712815", "text": "public function getOperationsClient()\n {\n return $this->operationsClient;\n }", "title": "" }, { "docid": "195471232881c1ddf6ea370e33b68d3b", "score": "0.53712815", "text": "public function getOperationsClient()\n {\n return $this->operationsClient;\n }", "title": "" }, { "docid": "195471232881c1ddf6ea370e33b68d3b", "score": "0.53712815", "text": "public function getOperationsClient()\n {\n return $this->operationsClient;\n }", "title": "" }, { "docid": "195471232881c1ddf6ea370e33b68d3b", "score": "0.53712815", "text": "public function getOperationsClient()\n {\n return $this->operationsClient;\n }", "title": "" }, { "docid": "195471232881c1ddf6ea370e33b68d3b", "score": "0.53712815", "text": "public function getOperationsClient()\n {\n return $this->operationsClient;\n }", "title": "" }, { "docid": "dcf64c5de7ec27bbc23c33ab65ab48ee", "score": "0.53693676", "text": "public function setOperation(LdapOperationInterface $operation = null)\n {\n $this->operation = $operation;\n }", "title": "" }, { "docid": "53c86dcdc39e40c2994df0ad73cf697c", "score": "0.5353389", "text": "public function getOperationWithPathParameters(): Operation\n {\n $this->assignPathParametersFromRoute();\n $this->updatePathParametersUsingAnnotations();\n\n return $this->operation;\n }", "title": "" } ]
991e30499d5acf3fe3cb77317c8cc8c2
/ Function getXMLFileIdentifier Returns file identifier stored in the tag of a given XML document
[ { "docid": "77cb50327a8b0822ae5c32036ff63e2e", "score": "0.84083337", "text": "function getXMLFileIdentifier($xml){\n\t$id = null;\n\tif(empty($xml)){\n\t\treturn $id;\n\t}\n\t$xpath = new DOMXpath($xml);\n\t$nodes = $xpath->query(fileIdentifierXPath);\n\tif ($nodes->length > 0){\t\t\n\t\tif(preg_replace('/\\s+/', '', $nodes->item(0)->nodeValue) != \"\"){\n\t\t\t$id = $nodes->item(0)->nodeValue;\n\t\t}\n\t}\n\treturn trim($id);\n}", "title": "" } ]
[ { "docid": "57ef86d4014d4afeeccd00686670b884", "score": "0.6779173", "text": "public function getFileId()\n {\n $value = $this->get(self::FILEID);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "3f9e8301d854907b1c0eeb70136fc21c", "score": "0.6717538", "text": "function getFileId() {\n\t\treturn $this->getData('fileId');\n\t}", "title": "" }, { "docid": "a1799581f1772772d79d2a22b4b59b1a", "score": "0.64742136", "text": "public function getFileId()\n {\n return $this->fileId;\n }", "title": "" }, { "docid": "a1799581f1772772d79d2a22b4b59b1a", "score": "0.64742136", "text": "public function getFileId()\n {\n return $this->fileId;\n }", "title": "" }, { "docid": "b91cde1093ae0975a2ce5c2f35d7f8fc", "score": "0.6214385", "text": "public function getID($file){\n $id = basename($file);\n return $id;\n }", "title": "" }, { "docid": "521e923845fd63fb20a01e1b722a30f9", "score": "0.6157522", "text": "public function getDocumentId() {\n\t\treturn $this->_attributes[$this->getDocumentIdAttributeName()];\n\t}", "title": "" }, { "docid": "4550a5bcf80fba98936e9cc4c8279a45", "score": "0.6150529", "text": "protected function getFileSetID()\n {\n $db = Database::connection();\n $fsID = $db->GetOne('SELECT fsID FROM atMultiFile WHERE avID = ?', [$this->getAttributeValueID()]);\n return $fsID;\n }", "title": "" }, { "docid": "fadd0741b819f2b453e185d229d813e9", "score": "0.6089494", "text": "public function getId()\n {\n return $this->file->get('id');\n }", "title": "" }, { "docid": "70fccd39911de18717b8b07ba2e7181a", "score": "0.607511", "text": "function files_id_get($resource=\".files_meta\", $uuid) { // read one\n return resource_id_get($resource, $uuid);\n}", "title": "" }, { "docid": "460f39201811a323dd2a4867d24a9954", "score": "0.5870155", "text": "function getBbLomFileInfo($fileName) {\n\tif ($lomXml = loadFileAsSimpleXmlWithLowercaseNodesAndAttributes(\"$fileName.xml\")) {\n\t\t$identifier = (string) $lomXml->relation->resource->identifier;\n\t\tif ($identifier) {\n\t\t\t$fileInfo['xid'] = preg_replace('%^([_0-9]+)#.*%', '$1', $identifier);\n\t\t\t$fileInfo['path'] = preg_replace(\"%^{$fileInfo['xid']}#(.*)%\", '\\\\1', $identifier);\n\t\t\t$fileInfo['name'] = basename($fileInfo['path']);\n\t\t\t$fileInfo['path'] = dirname($fileInfo['path']);\n\t\t\treturn $fileInfo;\n\t\t}\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "eecc114ef7027607f7bf2b7326f30dcf", "score": "0.58612525", "text": "public function getDocumentId()\n {\n return $this->get(self::DOCUMENTID);\n }", "title": "" }, { "docid": "eecc114ef7027607f7bf2b7326f30dcf", "score": "0.58612525", "text": "public function getDocumentId()\n {\n return $this->get(self::DOCUMENTID);\n }", "title": "" }, { "docid": "d3148b7e192471a77434c4e6b5c496bb", "score": "0.5844203", "text": "public function getDataWithTypeFileReturnsUidOfFileObject() {}", "title": "" }, { "docid": "7294a4cb54cfa15fa255a873c92696eb", "score": "0.58367044", "text": "public function getDocumentId($document);", "title": "" }, { "docid": "7304ed881df1b1e3f10b02634acbe3ff", "score": "0.5829823", "text": "static public function fileID($surround = true)\n\t{\n\t\treturn QuickBooks_QWC::_guid($surround);\n\t}", "title": "" }, { "docid": "1e6462cd02e347b21c7d698ed11aa102", "score": "0.57915515", "text": "public function getIdentifier()\n {\n $node = $this->getFirst('//epp:epp/epp:response/epp:resData/contact:infData/contact:id');\n\n return $node->nodeValue;\n }", "title": "" }, { "docid": "c4dcd401fd64f3dc52603c7706f792c1", "score": "0.577728", "text": "private function getXmlFile() {\n if (!$this->xmlFileCreated) {\n $this->createXmlDataFile();\n }\n return DOKU_INC . $this->command->getConf(\"processingXmlFile\");\n }", "title": "" }, { "docid": "e8f7c127298b7d9723fde49938694aa6", "score": "0.57564825", "text": "static public function filenameToId($filename)\n\t{\n\t\t$s = '';\n\t\t$l = 0;\n\t\t$name = pathinfo($filename, PATHINFO_BASENAME);\n\t\twhile (is_numeric(substr($name, $l, 1)) && $l < strlen($name)) {\n\t\t\t$s .= substr($name, $l, 1);\n\t\t\t$l++;\n\t\t}\t\n\t\tif ($s > 0) \n\t\t\treturn $s;\n\t\treturn false;\t\n\t}", "title": "" }, { "docid": "32f2950e0a4b24ca237bd43bc334a81b", "score": "0.5728046", "text": "private function idForFile($path)\n {\n return $this->idForPath($path, 'file');\n }", "title": "" }, { "docid": "ebe9c0662b382dfc58ed8c24f7683972", "score": "0.57270616", "text": "function xml_get($name,$num,$filename){\n $dom=new DOMDocument('1.0');\n $dom->load($filename);\n $records = $dom->getElementsByTagName($name);\n return $records->item($num)->nodeValue;\n}", "title": "" }, { "docid": "f9aa659c496ef627019b50499d103520", "score": "0.5680244", "text": "function getInsertArtworkFileId() {\n\t\treturn $this->getInsertId('monograph_artwork_files', 'artwork_id');\n\t}", "title": "" }, { "docid": "a8a1bc61e8a8f9cd35e58a0c96a2026b", "score": "0.5663447", "text": "function tdc_find_filenode($database, $file_name){\n $file = $database->xpath('//file[@name=\"'.$file_name.'\"]');\n if($file != False){\n return $file[0];\n }\n}", "title": "" }, { "docid": "66520d843dcd0e059ea2cd26170cad66", "score": "0.5631082", "text": "protected function getTrackerIdentifier($filename)\n {\n $trackerPart = substr(\n file_get_contents($filename),\n intval($this->getOffsets($filename)[0]) + 3,\n intval($this->getOffsets($filename)[1]) + 3\n );\n\n $parts = preg_split('/\\//', $trackerPart);\n\n return $parts[count($parts) - 2];\n }", "title": "" }, { "docid": "5a313eb668846229dcff17dc2dee8042", "score": "0.5601473", "text": "protected function getFileName() {\n return $this->_dateTime->format('YmdHis') . '.xml';\n }", "title": "" }, { "docid": "970013e4396f1a52aba1c590547656d6", "score": "0.5588489", "text": "public function getEcrXmlFileName()\n {\n return $this->getFileName().'.xml';\n }", "title": "" }, { "docid": "dbd57dd76ac5e9e8b14f369d66747e68", "score": "0.557982", "text": "function getID()\n{\n $file_name = 'ids';\n if(!file_exists($file_name)){\n touch($file_name);\n $handle = fopen($file_name, 'r+');\n $id=0;\n }\n else{\n $handle = fopen($file_name, 'r+');\n $id = fread($handle,filesize($file_name));\n settype($id,\"integer\");\n }\n rewind($handle);\n fwrite($handle,++$id);\n fclose($handle);\n return $id;\n}", "title": "" }, { "docid": "647d7ee90e2628c648ad2419aaf44425", "score": "0.5563918", "text": "public function attachmentId();", "title": "" }, { "docid": "5dea8ce6f78f5a4c818a96bc3484a7f1", "score": "0.55609435", "text": "function getDocId($url){\r\n $str = explode('/', $url);\r\n $str = end($str);\r\n $str = iconv(\"UTF-8\", \"UTF-8//IGNORE\", $str);\r\n $str = addslashes($str);\r\n return $str;\r\n }", "title": "" }, { "docid": "4523de7e5dc54867ca5dbc270419580f", "score": "0.5536923", "text": "protected function _getMigrationIdFromFilename($filename) {\n \n $parts = explode('_', $filename);\n return $parts[0];\n }", "title": "" }, { "docid": "e3c18a7e0ebe3e4e7b93f7544f59c886", "score": "0.55349094", "text": "function getImageIdentifier($path);", "title": "" }, { "docid": "e6eb48afb231f26b50ba3aec74d528be", "score": "0.5491813", "text": "public function getCurrentId() {\r\n\t\t\r\n\t\t$query = \"SELECT attachment_id FROM $this->att ORDER BY attachment_id DESC LIMIT 0,1\";\r\n\t\t\r\n\t\t$Resultset = $this->executeQuery($query);\r\n\t\t\t\t\r\n\t\t$data = $Resultset->fetchRow();\r\n\t\t\r\n\t\treturn $data[0];\r\n\t\t\r\n\t}", "title": "" }, { "docid": "c7176b54641cd404c2a0ac95062562bb", "score": "0.5480897", "text": "protected function _getRemittanceFileId()\n {\n return $this->coreRegistry->registry(RegistryConstants::CURRENT_REMITTANCE_FILE_ID);\n }", "title": "" }, { "docid": "b0de5adbb4bc35b29a199c54724ace75", "score": "0.54598606", "text": "function get_cache_id( $file ) {\n\t\treturn $file;\n\t}", "title": "" }, { "docid": "87b1c34204e9ed61585f3d142fcafb73", "score": "0.54432184", "text": "public function getId()\n\t{\n\t\treturn $this->googleDriveFile->getId();\n\t}", "title": "" }, { "docid": "bbc3b9a332593435e6f1c54bbe48c5b0", "score": "0.5438001", "text": "public function preserveFileidentifier(DOMDocument &$import, $fileIdentifier = '', DOMDocument &$original = null) {\n $fileidentifierImportNode = $import->getElementsByTagNameNS('http://www.isotc211.org/2005/gmd', 'fileIdentifier')->item(0);\n\n if (!empty($fileIdentifier)) {\n $fileidentifierImportedNode = $import->createElementNS('http://www.isotc211.org/2005/gmd', 'gmd:fileIdentifier');\n $gco_character = $import->createElementNS('http://www.isotc211.org/2005/gco', 'gco:CharacterString', $fileIdentifier);\n $fileidentifierImportedNode->appendChild($gco_character);\n\n if (!empty($fileidentifierImportNode)) {\n $fileidentifierImportNode->parentNode->replaceChild($fileidentifierImportedNode, $fileidentifierImportNode);\n } else {\n $mdMetadata = $import->getElementsByTagNameNS('http://www.isotc211.org/2005/gmd', 'MD_Metadata')->item(0);\n $mdMetadata->appendChild($fileidentifierImportedNode);\n }\n } elseif (!empty($original)) {\n $fileidentifierOriginalNode = $original->getElementsByTagNameNS('http://www.isotc211.org/2005/gmd', 'fileIdentifier')->item(0);\n\n if (empty($fileidentifierOriginalNode)) {\n throw new Exception(JText::_('COM_EASYSDI_CATALOG_IMPORT_METADATA_FILEIDENTIFIER_EMPTY'));\n }\n\n $fileidentifierImportNode = $import->getElementsByTagNameNS('http://www.isotc211.org/2005/gmd', 'fileIdentifier')->item(0);\n\n $fileidentifierImportedNode = $import->importNode($fileidentifierOriginalNode, true);\n\n if (empty($fileidentifierImportNode)) {\n $import->firstChild->appendChild($fileidentifierImportedNode);\n } else {\n $import->firstChild->replaceChild($fileidentifierImportedNode, $fileidentifierImportNode);\n }\n }\n }", "title": "" }, { "docid": "9a1915aa9a3c3b7bc3291744b632030e", "score": "0.5437932", "text": "public function getFileInfoByXmlID()\n {\n $am = AccountManager::getInstance();\n\n if (!$am->isLogged()) {\n return JsonResponseBuilder::failure();\n }\n $lang = $am->vcsLang;\n\n $xmlID = $this->getRequestVariable('xmlID');\n\n $r = RepositoryFetcher::getInstance()->getFileByXmlID($lang, $xmlID);\n\n if (false == is_null($r)) {\n return JsonResponseBuilder::success(\n array(\n 'lang' => $lang,\n 'path' => $r->path,\n 'name' => $r->name\n )\n );\n } else {\n return JsonResponseBuilder::failure();\n }\n\n }", "title": "" }, { "docid": "f7a0a0087ba17da8301047cd777fd204", "score": "0.5420311", "text": "private function getEntityId()\n\t{\n\t\t$id = $this->GetDocumentId();\n\t\t$pairs = explode('_', $id[2]);\n\n\t\treturn count($pairs) > 1 ? $pairs[1] : $pairs[0];\n\t}", "title": "" }, { "docid": "ed26884eecf617928030585874a86504", "score": "0.53940165", "text": "protected function _getIdentifier() {\n\t\t$this->_mhtmlLocationIndex++;\n\t\treturn $this->_indexToChars($this->_mhtmlLocationIndex);\n\t}", "title": "" }, { "docid": "dc1eae471012c825b40271edcaf7a10a", "score": "0.5390883", "text": "public static function getFileIdForPath(\n\t\t?string $baseUrl,\n\t\t?string $user,\n\t\t?string $password,\n\t\t?string $path,\n\t\t?string $xRequestId = '',\n\t\t?int $davPathVersionToUse = self::DAV_VERSION_NEW\n\t): string {\n\t\t$body\n\t\t\t= '<?xml version=\"1.0\"?>\n\t\t\t\t<d:propfind xmlns:d=\"DAV:\" xmlns:oc=\"http://owncloud.org/ns\">\n \t\t\t\t\t<d:prop>\n \t\t\t\t\t<oc:fileid />\n \t\t\t\t\t</d:prop>\n\t\t\t\t</d:propfind>';\n\t\t$response = self::makeDavRequest(\n\t\t\t$baseUrl,\n\t\t\t$user,\n\t\t\t$password,\n\t\t\t\"PROPFIND\",\n\t\t\t$path,\n\t\t\tnull,\n\t\t\t$xRequestId,\n\t\t\t$body,\n\t\t\t$davPathVersionToUse\n\t\t);\n\t\t\\preg_match(\n\t\t\t'/\\<oc:fileid\\>([^\\<]*)\\<\\/oc:fileid\\>/',\n\t\t\t$response->getBody()->getContents(),\n\t\t\t$matches\n\t\t);\n\n\t\tif (!isset($matches[1])) {\n\t\t\tthrow new Exception(\"could not find fileId of $path\");\n\t\t}\n\n\t\treturn $matches[1];\n\t}", "title": "" }, { "docid": "8e67c1c82dda68e3cd28553cf1e98f08", "score": "0.5381703", "text": "public function getDocId()\n {\n return $this->doc_id;\n }", "title": "" }, { "docid": "4269f33565cad14dca4350b11b6a9f92", "score": "0.5379969", "text": "public function getDocumentID() {\n\t\treturn $this->documentID;\n\t}", "title": "" }, { "docid": "52b6bc5e1fbc6999a679f6f8c2cb2da5", "score": "0.53766954", "text": "public function getFile() {\r\n return $this->node->getAttribute(\"file\");\r\n }", "title": "" }, { "docid": "fc7780eae1a11d84f40123ca3f99f237", "score": "0.5339539", "text": "function getXMLPath() {\n\t\t\n\t\t$files = scandir($this->xml_path); //sets $files to an array of the filenames and folders located at gallery_path\n\t\t$files = array_diff($files, array('.','..')); //subtracts unwanted files and folders\n\t\t$file_list = array();\n\t\t\n\t\tforeach ($files as $file){\n\t\t\t$file_list [] = array (\n\t\t\t\t\t\t\t\t'path' => $this->xml_path . '/' . $file,\n\t\t\t\t\t\t\t);\n\t\t}\n\t\t\n\t\t$index = $this->session->userdata('file_index');\n\t\t$path = $file_list[$index];\n\t\treturn $path;\n\t}", "title": "" }, { "docid": "52034c1d0e3dd14e70c9b51b6ac21937", "score": "0.5316347", "text": "public function getFileName() {\n\t\t$spec = self::$specs[$this->id];\n\t\treturn array_value($spec, \"filename\", FALSE);\n\t}", "title": "" }, { "docid": "4f55aa10d68af36bc252ddaaf6c35b20", "score": "0.53131956", "text": "protected function getFilePath()\n {\n $xmlFolder = $this->translationService->getReceiveFolder();\n $filename = 'item_'.$this->getId();\n return $xmlFolder.'/'.$filename.'.xml';\n }", "title": "" }, { "docid": "44f0db5e8fa3edbf955922adef0c3671", "score": "0.5307867", "text": "function getRefId()\n\t{\n\t\treturn \"\";\n\t\t//$this->ilias->raiseError(\"Operation ilObjStyleSheet::getRefId() not allowed.\",$this->ilias->error_obj->FATAL);\n\t}", "title": "" }, { "docid": "bb6f8315aafdbf89208a92a7a9f7f5c7", "score": "0.5306708", "text": "public function getRefId();", "title": "" }, { "docid": "bb6f8315aafdbf89208a92a7a9f7f5c7", "score": "0.5306708", "text": "public function getRefId();", "title": "" }, { "docid": "b765e58efe03a3d84a4683cf3447db87", "score": "0.53010213", "text": "public function file_name();", "title": "" }, { "docid": "2c1564d69bebb4f73678ceb531502010", "score": "0.52918303", "text": "public static function getIdentifier();", "title": "" }, { "docid": "c4ac87304ccc1fd098dc97a48d042157", "score": "0.52863103", "text": "public function getImageId() \n {\n return $this->_fields['ImageId']['FieldValue'];\n }", "title": "" }, { "docid": "c4ac87304ccc1fd098dc97a48d042157", "score": "0.52863103", "text": "public function getImageId() \n {\n return $this->_fields['ImageId']['FieldValue'];\n }", "title": "" }, { "docid": "bf819c1edba5556596ddbd75ee88b13b", "score": "0.52667195", "text": "function ultimo_id(){ \nif (file_exists('results.xml')) {\n$xml = simplexml_load_file('results.xml');\n//foreach($xml->xpath(\"//resultset/record[last()]/field[0]\") as $name){\t\t\t// NON FUNZIONA\nforeach($xml->xpath(\"//resultset/record[last()]/field[last()-2]\") as $name){\t\necho $name + 1;\n//return $name;\n}// chiude foreach\n} // if (file_exists('result.xml')) { \n}", "title": "" }, { "docid": "b6e58abfc05d6f07eb56046d65a6ec41", "score": "0.5264025", "text": "public function getOggFileID(): int\n {\n return $this->oggfID ?? 0;\n }", "title": "" }, { "docid": "f503bf8f76d1a2adf0eba16ac385a498", "score": "0.52604294", "text": "static private function get_new_id(){\n $files = scandir(ROOT.self::$survey_path);\n $iterator = 1;\n while(in_array($iterator.'.json',$files))\n $iterator++;\n return $iterator;\n }", "title": "" }, { "docid": "6f8783989297af1be89f136b2e611edd", "score": "0.5256198", "text": "public function getMp4FileID(): int\n {\n return $this->mp4fID ?? 0;\n }", "title": "" }, { "docid": "5481580a316195408e9e47a0aac976a8", "score": "0.5252281", "text": "public function getDocumentId()\n {\n return $this->_documentId;\n }", "title": "" }, { "docid": "2d0b1567744189aa114c6591da38774c", "score": "0.52495", "text": "public function setIdentifier(){\n\n \t$this->fileIdentifier = $this->getIdentifier();\n }", "title": "" }, { "docid": "20f068e27200f684b9e13e8a187570cd", "score": "0.5244266", "text": "public function getCustomDocumentId()\n {\n $value = $this->get(self::CUSTOMDOCUMENTID);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "429da2b6d12be1aa0f319cbb834d5ea7", "score": "0.5232685", "text": "function getGSFileId_fromPath($fnPath,$asRoot=0) {\n\t$col = $GLOBALS['filesCol'];\n\tif ($asRoot){\n\t\t$file = $col->findOne(array('path' => $fnPath));\n\t}else{\n\t\t$file = $col->findOne(array('path' => $fnPath,\n\t\t\t\t 'owner' => $_SESSION['User']['id']\n\t\t));\n\t}\n\tif (empty($file)){\n\t\treturn 0;\n\t}else{\n\t\treturn $file['_id'];\n\t}\n}", "title": "" }, { "docid": "ffe6c4e2a5ad03a8d8d3a0749c04257e", "score": "0.5230834", "text": "function get_fid_by_fileid($sid,$file_id)\r\n\t{\r\n\t\t$file=$this->get_file_by_id($sid,$file_id);\r\n\t\t\r\n\t\tif($file){\r\n\t\t\treturn $file['id'];\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "fbdbf4c28b204a18b8d7c1820d43e608", "score": "0.522063", "text": "public function getIdentifier()\n {\n return $this->getAttribute('metadata.name', null);\n }", "title": "" }, { "docid": "a8787d03b0190c03afe0693bb2901c99", "score": "0.52027476", "text": "public function getElementId() {}", "title": "" }, { "docid": "939bd1fef71d7c6b990e7dee0779bfe8", "score": "0.51891094", "text": "public function getItemId()\n {\n return $this->document->ID;\n }", "title": "" }, { "docid": "8f3358471233716520e61e76d36638d7", "score": "0.5167993", "text": "public function filename(){\n\t\treturn $this->info(PATHINFO_FILENAME);\n\t}", "title": "" }, { "docid": "01fd21c868557d12fe780c442a786175", "score": "0.5164132", "text": "public function getCreatorId()\n {\n $node = $this->getFirst('//epp:epp/epp:response/epp:resData/contact:infData/contact:crID');\n\n return $node->nodeValue;\n }", "title": "" }, { "docid": "418038687b3d566f1219becb96e4efec", "score": "0.5161317", "text": "public function getImageID() {\n return ! empty( $this->image_id ) ? absint( $this->image_id ) : null;\n }", "title": "" }, { "docid": "fef90317471bc21689e7f04b7db7a45c", "score": "0.51582825", "text": "function getImageIdentifierFromString($image);", "title": "" }, { "docid": "12eaffa8cdc4b7935aeb3793441cd6e9", "score": "0.5149455", "text": "public function getDeviceFileById();", "title": "" }, { "docid": "8c2c8c1ac3cd8ef586a4bf2671283152", "score": "0.51484054", "text": "public function getExtensionIdentifier();", "title": "" }, { "docid": "3f743c2bfc790eb5fd567f59cd1f33b1", "score": "0.51464325", "text": "public function getDBId() {\n $pageToken = null;\n $results = $this->service->files->listFiles(array(\n 'q' => \"mimeType='application/sql'\",\n 'spaces' => 'drive',\n 'pageToken' => $pageToken,\n 'fields' => 'nextPageToken, files(id, name)',\n ));\n\n if (count($results->getFiles()) == 0) {\n print \"No files found.\\n\";\n } else {\n print \"File:\\n\";\n foreach ($results->getFiles() as $file) {\n printf(\"%s (%s)\\n\", $file->getName(), $file->getId());\n return $file->getId();\n }\n }\n // No sql file found\n return null;\n }", "title": "" }, { "docid": "1ade3b777eea8205ca6dc32f5fde63be", "score": "0.51398206", "text": "function get_taxon_file($meta_xml)\n{\n $xml = file_get_contents($meta_xml);\n /* e.g. meta.xml contents:\n <table encoding=\"UTF-8\" fieldsTerminatedBy=\"\\t\" linesTerminatedBy=\"\\n\" ignoreHeaderLines=\"1\" rowType=\"http://rs.tdwg.org/dwc/terms/Taxon\">\n <files>\n <location>taxon.tab</location>\n </files> \n */\n // $left = 'rowType=\"http://eol.org/schema/media/Document\"'; //just testing, should get e.g. \"media_resource.tab\"\n $left = 'rowType=\"http://rs.tdwg.org/dwc/terms/Taxon\"';\n if(preg_match(\"/\".preg_quote($left, '/').\"(.*?)<\\/files>/ims\", $xml, $arr)) {\n if(preg_match(\"/<location>(.*?)<\\/location>/ims\", $arr[1], $arr2)) return $arr2[1]; //e.g. \"taxon.tab\"\n }\n}", "title": "" }, { "docid": "1c2f69644aa89d3fb6a94ce409a751a8", "score": "0.51357734", "text": "private function getReportDocumentNodeIdAndFileName($type)\n {\n if ((self::REPORT_TYPE_FINAL != $type) && (self::REPORT_TYPE_INTERIM != $type)) {\n throw new \\Zend_Exception(sprintf('Report type \"%s\" is invalid', $type));\n }\n\n $applicationUuId = $this->getSymfonyRequest()->query->get('uuid');\n $filename = '';\n\n // Discover the document node id using the application uuid\n $application = $this\n ->getIrisAgentContext()\n ->getReferencingApplicationClient()\n ->getReferencingApplication(array(\n 'referencingApplicationUuId' => $applicationUuId,\n ));\n\n $finalReportNodeId = $this->_getReportFinder()->getFinalReportDocumentNodeId($application->getReferencingApplicationUuId());\n $interimReportNodeId = $this->_getReportFinder()->getInterimReportDocumentNodeId($application->getReferencingApplicationUuId());\n\n $reportDocumentNodeId = null;\n\n if (self::REPORT_TYPE_FINAL == $type) {\n $reportDocumentNodeId = $finalReportNodeId;\n $filename = $this->_getReportFilenameBuilder()->build('Final', $application->getReferenceNumber(), 'pdf');\n }\n elseif (self::REPORT_TYPE_INTERIM == $type) {\n $reportDocumentNodeId = $interimReportNodeId;\n $filename = $this->_getReportFilenameBuilder()->build('Interim', $application->getReferenceNumber(), 'pdf');\n }\n\n return array(\n $reportDocumentNodeId,\n $filename,\n );\n }", "title": "" }, { "docid": "a9161c3bfafeca06628262ed2a6d9f6a", "score": "0.51302344", "text": "private function getFileName() {\n\n if (!$this->template->title_file) {\n return $this->list_id . \"_\" . $this->item_id;\n }\n\n $title = $this->replaceWithFieldsVals($this->template->title_file); \n $title = $this->replaceLatvian($title);\n\n return preg_replace(\"/[^a-zA-Z0-9.]/\", \"_\", $title);\n }", "title": "" }, { "docid": "7d85411bcd233003b1d389eef47bdf86", "score": "0.5128064", "text": "public function generateFileName() {\n $this->filename = ($this->getName(TRUE, TRUE, TRUE, \".\").\".xml\");\n\n return $this->filename;\n }", "title": "" }, { "docid": "59f211b4356e1d15b5a3626b257a7b19", "score": "0.51248163", "text": "public function getFileExtension()\n {\n return 'xml';\n }", "title": "" }, { "docid": "59f211b4356e1d15b5a3626b257a7b19", "score": "0.51248163", "text": "public function getFileExtension()\n {\n return 'xml';\n }", "title": "" }, { "docid": "86cdfc8c17a63402ef6d607dfa0d2065", "score": "0.5117414", "text": "public function getDataFileName() {\r\n\t\t\t\t\treturn $this->selectedDataFileName . '.xml';\r\n\t\t\t\t}", "title": "" }, { "docid": "42b1807025167726fbe57439218e5b76", "score": "0.51089203", "text": "public function getIdentifier()\n {\n $this->__load();\n return parent::getIdentifier();\n }", "title": "" }, { "docid": "cb8475cf14fe427254b6de34d60ee76b", "score": "0.5102641", "text": "public function get_attachment_id() {\n if ('attachment' == $this->slide->post_type) {\n return $this->slide->ID;\n } else {\n return get_post_thumbnail_id($this->slide->ID);\n }\n }", "title": "" }, { "docid": "7d0d067afd1ac4fe8f1e3576a4e2eee0", "score": "0.51016533", "text": "abstract public function getIdentifier();", "title": "" }, { "docid": "e489fb8a03d8e4cdbd7f77d32c095042", "score": "0.50997573", "text": "public function create_attachment_id(){\n\t\tglobal $con;\n\t\t$result=array();\n\t\t$id=0;\n\t\t$query=\"SELECT attach_id FROM referral_attachments ORDER BY attach_id DESC limit 1\";\n\t\t$result=$this->select($con,$query);\n\t\tforeach ($result as $key => $value) {\n\t\t\t$id=$value['attach_id'];\n\t\t}\n\t\t$id=$id+1;\n\t\treturn $id;\n\t}", "title": "" }, { "docid": "72a61f46c1a7d98dcb66a0e896a3383c", "score": "0.5093611", "text": "public function getFeatureElementId()\n {\n \t$value = false;\n \t$urlPart = strrchr($this->getId(), '/');\n \tif( $urlPart ) {\n \t\t$value = trim( $urlPart, '/');\n \t} \t\n \treturn $value;\n }", "title": "" }, { "docid": "250c1039e9bd767512ed468a711e0c83", "score": "0.50916654", "text": "public function getTaskFileId($in_task_name) {\n $this->__checkTaskConfigured($in_task_name);\n return $this->__configuration[self::KEY_TASKS][$in_task_name][self::KEY_FILE_ID];\n }", "title": "" }, { "docid": "17dd2e262b7d711e512753f6b09a3ac2", "score": "0.5088864", "text": "public function getImageId(){\r\t\treturn ($this->imageId);\r\t}", "title": "" }, { "docid": "764719c2491d86f068a7e29ce3e7daac", "score": "0.5085603", "text": "function get_image_id( $url ) {\n\n\t// Split the $url into two parts with the wp-content directory as the separator\n\t$parsed_url = explode( parse_url( WP_CONTENT_URL, PHP_URL_PATH ), $url );\n\t// Get the host of the current site and the host of the $url, ignoring www\n\t$this_host = str_ireplace( 'www.', '', parse_url( home_url(), PHP_URL_HOST ) );\n\t$file_host = str_ireplace( 'www.', '', parse_url( $url, PHP_URL_HOST ) );\n\n\t// Return nothing if there aren't any $url parts or if the current host and $url host do not match\n\tif ( ! isset( $parsed_url[1] ) || empty( $parsed_url[1] ) || ( $this_host != $file_host ) ) {\n\t\treturn;\n\t}\n\n\tglobal $wpdb;\n\t$attachment = $wpdb->get_col( $wpdb->prepare( \"SELECT ID FROM {$wpdb->prefix}posts WHERE guid RLIKE %s;\", $parsed_url[1] ) );\n\t// Returns null if no attachment is found\n\treturn $attachment[0];\n\n}", "title": "" }, { "docid": "ff8e3ca855d044e2dfd1a824c2884355", "score": "0.50815225", "text": "private function getExtensionId() {\n $db = JFactory::getDbo();\n\n $query = $db->getQuery(true);\n $query->select('extension_id')\n ->from('#__extensions')\n ->where($db->qn('element').' = '.$db->q('com_eventgallery'). ' AND type='. $db->q('component'));\n $db->setQuery($query);\n $eid = $db->loadResult();\n\n return $eid;\n }", "title": "" }, { "docid": "201239660bea63a0503c63b26c384f24", "score": "0.5046407", "text": "public abstract function getIdentifier();", "title": "" }, { "docid": "201239660bea63a0503c63b26c384f24", "score": "0.5046407", "text": "public abstract function getIdentifier();", "title": "" }, { "docid": "1072394006df10f61f214a9bc690790f", "score": "0.50424355", "text": "public function getFile_att()\n {\n return $this->file_att;\n }", "title": "" }, { "docid": "070df9c01cec5a1f62c091c831d3065b", "score": "0.5037057", "text": "public function getWebmFileID(): int\n {\n return $this->webmfID ?? 0;\n }", "title": "" }, { "docid": "7187e6e7a37b59876ef6f0dbbba412c5", "score": "0.50280106", "text": "public function getNextInitAppDocNumber(){\n $lastDoc = File::orderBy('id', 'desc')->first();\n\n /*\n In a case where no record is found get 1 as a\n virtual record to generate document number.\n */\n if(is_null($lastDoc)){\n /*\n create an object counter (number) to store document ID and\n initialiaze it to 1.\n */\n $id = File::find(1);\n $number = $id;\n\n //assign and add the number with Doc ID\n $number += File::find(1);\n\n /*\n concatenate BRS-DFT- with the last inserted Doc ID\n that will end with 3 numbers.\n */\n\n return 'BRS-DFT-' . sprintf('%03d', intval($number) + 1);\n\n }else{\n /*\n The document exists then\n create variable number to store document ID\n initialiaze it to 0.\n */\n $number = 0;\n\n //assign and add the number with Doc ID\n $number += $lastDoc->id;\n\n /*\n concatenate BRS-DFT- with the last inserted Doc ID\n that will end with 3 numbers.\n */\n return 'BRS-DFT-' . sprintf('%03d', intval($number) + 1);\n }\n\n }", "title": "" }, { "docid": "0808c7163463157f4be5fea352a9c847", "score": "0.50269055", "text": "function getIdentifier();", "title": "" }, { "docid": "33b96ebaad3b68b639cb25746f16dd6c", "score": "0.50186574", "text": "function getIdDoc() {\r\n return $this->IdDoc;\r\n }", "title": "" }, { "docid": "50caf2250bf0223d65307acbb9384c4a", "score": "0.50125587", "text": "protected function _fileNameToId($fileName)\n {\n $prefix = $this->_options['file_name_prefix'];\n return preg_replace('~^' . $prefix . '---(.*)$~', '$1', $fileName);\n }", "title": "" }, { "docid": "2f6ff4bc29ab7fc279078242294c5ad7", "score": "0.49984378", "text": "public function getImageId()\n {\n return $this->_imageId;\n }", "title": "" }, { "docid": "690bb1c370f3cdf6b8b18383ea7115d8", "score": "0.49943548", "text": "public function getEventUid($identifier)\n {\n return 'open-library-' . $this->shortKey . '-' . $identifier;\n }", "title": "" }, { "docid": "0f0a4c537cd0fcffefce4e9ad939ef2e", "score": "0.49934998", "text": "public function getIdentifier();", "title": "" }, { "docid": "0f0a4c537cd0fcffefce4e9ad939ef2e", "score": "0.49934998", "text": "public function getIdentifier();", "title": "" }, { "docid": "0f0a4c537cd0fcffefce4e9ad939ef2e", "score": "0.49934998", "text": "public function getIdentifier();", "title": "" } ]
06c68d2d147026302f07c5993cf9337c
The currency (in 3letter ISO 4217 format) of the price or a price component, when attached to [[PriceSpecification]] and its subtypes.
[ { "docid": "0cf6e3abfa86a81b42d772aa35f01514", "score": "0.6750569", "text": "public function priceCurrency($priceCurrency)\n {\n return $this->setProperty('priceCurrency', $priceCurrency);\n }", "title": "" } ]
[ { "docid": "4bc3b07424f767cb52aa3024c71e8867", "score": "0.7262874", "text": "public function currency(): string\n {\n return $this->data['currency'];\n }", "title": "" }, { "docid": "71cd7c1d9f6f6d33766bfdfb41f0cafc", "score": "0.72241646", "text": "public function getCurrency(): string\n {\n return $this->currency;\n }", "title": "" }, { "docid": "06dd35c20659e64450f426aff4c6e66a", "score": "0.71937156", "text": "public function getCurrency()\n {\n $value = $this->get(self::CURRENCY);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "06dd35c20659e64450f426aff4c6e66a", "score": "0.71937156", "text": "public function getCurrency()\n {\n $value = $this->get(self::CURRENCY);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "35ffe6e091406a1f78e74b5d51272be2", "score": "0.71539795", "text": "public function getCurrency( ) {\n return $this->currency;\n }", "title": "" }, { "docid": "60aef893b4ac3d9cc2cf89f61ec52f31", "score": "0.7143017", "text": "public function getCurrency()\n {\n return $this->currency;\n }", "title": "" }, { "docid": "60aef893b4ac3d9cc2cf89f61ec52f31", "score": "0.7143017", "text": "public function getCurrency()\n {\n return $this->currency;\n }", "title": "" }, { "docid": "60aef893b4ac3d9cc2cf89f61ec52f31", "score": "0.7143017", "text": "public function getCurrency()\n {\n return $this->currency;\n }", "title": "" }, { "docid": "60aef893b4ac3d9cc2cf89f61ec52f31", "score": "0.7143017", "text": "public function getCurrency()\n {\n return $this->currency;\n }", "title": "" }, { "docid": "60aef893b4ac3d9cc2cf89f61ec52f31", "score": "0.7143017", "text": "public function getCurrency()\n {\n return $this->currency;\n }", "title": "" }, { "docid": "9aa033b4aab79b64eb43073c80e7edd7", "score": "0.7121593", "text": "public function currency()\n {\n return $this->_currency;\n }", "title": "" }, { "docid": "31ef2c56df6614dea5a50f95db9f6a75", "score": "0.7117829", "text": "public function getCurrency() {\n return $this->collection->getValue('CURRENCYCODE');\n }", "title": "" }, { "docid": "418635d640b19c4f59b8081161494ada", "score": "0.70905846", "text": "public function currency(): Currency\n {\n return new Currency($this->product['currency']);\n }", "title": "" }, { "docid": "3d394a8236c6b5f9892117c931ac095f", "score": "0.70374066", "text": "public function getCurrency() {\n\t\treturn $this->currency;\n\t}", "title": "" }, { "docid": "50e6555d1e34a0e5b4d55520f41f4af9", "score": "0.7003738", "text": "public function getCurrency(): string\n {\n return $this->builder->getDefaultCurrency();\n }", "title": "" }, { "docid": "eddde8ffa7b772667710d0b6acd4dd1b", "score": "0.6926774", "text": "public function getCurrency(): Currency\n {\n return $this->currency ?: Currency::getDefault();\n }", "title": "" }, { "docid": "2f97416791b3aaf6bdd47fc68e13a6cf", "score": "0.6886826", "text": "function currency() {\n\t\treturn $this->currency;\n\t}", "title": "" }, { "docid": "7cf1481b6eef6fc8795f4ea8fdcf75f9", "score": "0.6885343", "text": "public function getCurrency(): Currency\n {\n return $this->currency;\n }", "title": "" }, { "docid": "21bbcac2a6c571eb537f11639a576f7e", "score": "0.6881662", "text": "public function getPriceCurrencyISO(){\n return BoardConfig::instance()->price_units['iso'][ 'unit_'.$this->price_unit ];\n }", "title": "" }, { "docid": "d4f03f842937a6ce81b43ca3838f81ee", "score": "0.68411076", "text": "public function getCurrency();", "title": "" }, { "docid": "d4f03f842937a6ce81b43ca3838f81ee", "score": "0.68411076", "text": "public function getCurrency();", "title": "" }, { "docid": "b1d87d1304b7a1023de88beecfaddccb", "score": "0.6815538", "text": "public function getCurrency()\n {\n return 'VND';\n }", "title": "" }, { "docid": "5ac0cd1d80c0a4c3960184d6460a38c4", "score": "0.67743015", "text": "public function getCurrency(): Currency;", "title": "" }, { "docid": "231e4bef759f178aae348a2b0f6e0592", "score": "0.67672276", "text": "public function getCurrency(): ?string\n {\n return $this->currency;\n }", "title": "" }, { "docid": "5c8e202c0be27705049eece60c9841c9", "score": "0.6701646", "text": "function getCurrency() {\n $currency_id = $this->getCurrencyId();\n \n if($currency_id && DataObjectPool::get('Currency', $currency_id) instanceof Currency) {\n return DataObjectPool::get('Currency', $currency_id);\n } else {\n return Currencies::getDefault();;\n } // if\n }", "title": "" }, { "docid": "b1733cea30cfbd679e8e0a7ca2225ab8", "score": "0.6701624", "text": "public function getCurrency()\n {\n return $this->response->transactions[0]->amount->currency;\n }", "title": "" }, { "docid": "4de26369f720ce236e54c6227db28bae", "score": "0.66893864", "text": "public function getCurrency(): ?string\n {\n return $this->_currency;\n }", "title": "" }, { "docid": "479b64d03f6e0fae4d1094c84eb5cedc", "score": "0.668486", "text": "public function getCurrency()\n {\n return $this->_storeManager->getStore()->getCurrentCurrency()->getCode();\n }", "title": "" }, { "docid": "9642d57080d706d16d8c66a2261fa761", "score": "0.6652981", "text": "public function get_currency() {\n\t\treturn new WPSC_Currency( $this->_currency_name );\n\t}", "title": "" }, { "docid": "1304d02e4eb6442e9402f335ce4705c8", "score": "0.66460305", "text": "public function getPrice($currency = '$')\n {\n return $this->getTypePrice('price', $currency);\n }", "title": "" }, { "docid": "4a7da7450056d4d137734ad9166999a5", "score": "0.6645408", "text": "public function currency($value = NULL, $currency = NULL);", "title": "" }, { "docid": "7d3bf51529eb56d59c8868fcb8cec9be", "score": "0.663697", "text": "public function getMainCurrencyCode()\n\t{\n\t\treturn 'EUR';\n\t}", "title": "" }, { "docid": "9c13ce886b742286e01626dd85414d76", "score": "0.66233754", "text": "public function getCurrencyCode()\r\n {\r\n return $this->currencyCode;\r\n }", "title": "" }, { "docid": "9319378609508c1ae0949fd0eb6e617e", "score": "0.66222376", "text": "public function getCurrencyCode() {\r\n\t\treturn $this->_extractValue('currency_code');\r\n\t}", "title": "" }, { "docid": "7a193a412e838ad220160a3e313bcabe", "score": "0.6618586", "text": "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "title": "" }, { "docid": "30a10c3789301a9b9e6768f76e0e8ca7", "score": "0.66077006", "text": "public function getCurrency(): string;", "title": "" }, { "docid": "fb37f586b55cf6ac87dadeedabcacbff", "score": "0.65790814", "text": "public function getCurrencyCode()\n {\n return $this->currency_code;\n }", "title": "" }, { "docid": "fb37f586b55cf6ac87dadeedabcacbff", "score": "0.65790814", "text": "public function getCurrencyCode()\n {\n return $this->currency_code;\n }", "title": "" }, { "docid": "e4ac7d14273fd34698dc94908398dc34", "score": "0.657217", "text": "public function getCurrencySymbol();", "title": "" }, { "docid": "50bbd44b52e863f98cd301610023f1fc", "score": "0.656973", "text": "public function getCurrency() {\n \tif ( !isset($this->_Currency) ) {\n \t\t$this->setCurrency();\n \t}\n \treturn $this->_Currency;\n }", "title": "" }, { "docid": "b680ab46594207339353da43a022a8fe", "score": "0.65529835", "text": "public function getCurrencyCode();", "title": "" }, { "docid": "b680ab46594207339353da43a022a8fe", "score": "0.65529835", "text": "public function getCurrencyCode();", "title": "" }, { "docid": "b680ab46594207339353da43a022a8fe", "score": "0.65529835", "text": "public function getCurrencyCode();", "title": "" }, { "docid": "50a9582eb25f295d3928d4013263cc48", "score": "0.6527596", "text": "public function getUnitCurrency()\n {\n return $this->unit_currency;\n }", "title": "" }, { "docid": "793cfcf9be9584e4b3f1e7ea3ffdd6e2", "score": "0.65261275", "text": "private static function get_currency() {\n\t\t$locale = Settings::get( 'locale' );\n\t\treturn Locales::get_currency_symbol( $locale, true );\n\t}", "title": "" }, { "docid": "7ff27520aee854b807e902721fe02f9f", "score": "0.65219", "text": "public function getCurrency(): ?string\n {\n return !is_null($this->Currency)\n ? $this->Currency\n : \"EUR\";\n }", "title": "" }, { "docid": "4a38cdfb98aaab5b9acfa30827766977", "score": "0.65071493", "text": "public function getCurrencyField()\n {\n return $this->fieldCurrency;\n }", "title": "" }, { "docid": "9406bb678f3fcdf1574da9c3c93ae7e9", "score": "0.6490031", "text": "function get_currency() {\n\t\treturn $this->_aDivisa;\n\t}", "title": "" }, { "docid": "9b97c79fb1ec6e19690a59bf7c188b56", "score": "0.6486732", "text": "protected function getCurrency()\n {\n return $this->billable->getCurrency();\n }", "title": "" }, { "docid": "3c7a5bb48cf92a445a4b58237be4056a", "score": "0.6481307", "text": "protected function getCurrency()\n {\n return Mage::app()->getStore()->getBaseCurrencyCode();\n }", "title": "" }, { "docid": "b793e5d97f659227098ea3fb54083357", "score": "0.6471518", "text": "public static function getCurrencyCode()\n {\n return app('Money')->currency;\n }", "title": "" }, { "docid": "79119446969c460a96c0d2e9a675ccd2", "score": "0.6400685", "text": "public function get_currency_code() {\n\t\t$code = parent::get_currency_code();\n\n\t\tif ( ! in_array( $code, $this->gateway->get_supported_currencies() ) ) {\n\t\t\t$code = $this->setting->get( 'currency', 'USD' );\n\t\t}\n\n\t\treturn $code;\n\t}", "title": "" }, { "docid": "da104861b51def004e22c735490c3041", "score": "0.6400171", "text": "public function getSpecialPrice($currency = '$')\n {\n return $this->getTypePrice('special_price', $currency);\n }", "title": "" }, { "docid": "bdf6264c0a03f3dc685dff7e4809d944", "score": "0.6391447", "text": "public function getCurrencyCode() : string\n {\n return $this->currencyCode;\n }", "title": "" }, { "docid": "58b20bcf2d32fc72861d2e2d861f1ff5", "score": "0.6383668", "text": "public function getQuoteCurrencyCode()\n {\n return $this->getData(self::KEY_QUOTE_CURRENCY_CODE);\n }", "title": "" }, { "docid": "b835e31955ac78eb582b267e85d9aa6c", "score": "0.6355698", "text": "public function get_currency_symbol() {\n\t\treturn $this->_currency_symbol;\n\t}", "title": "" }, { "docid": "1a078bf58a972219577cfd850ebf9e06", "score": "0.63119584", "text": "public function currency($currency)\n {\n return $this->setProperty('currency', $currency);\n }", "title": "" }, { "docid": "1a078bf58a972219577cfd850ebf9e06", "score": "0.63119584", "text": "public function currency($currency)\n {\n return $this->setProperty('currency', $currency);\n }", "title": "" }, { "docid": "3559e886869d6dc7ff4a8a412b1efb51", "score": "0.63115156", "text": "public function getCurrencyOperation();", "title": "" }, { "docid": "91909716f76f8638448efd7feb6bbdae", "score": "0.63090897", "text": "public function getCurrency(): ?string;", "title": "" }, { "docid": "47787ed2e343ded349447ffd42b8c192", "score": "0.62923646", "text": "public function getCurrency(): int\n {\n return (int) $this->data['currency'];\n }", "title": "" }, { "docid": "5ef707e1f7f4b568a003c19f2deb5e23", "score": "0.62864375", "text": "public function currency()\n {\n return config('butik.currency_symbol');\n }", "title": "" }, { "docid": "3b20f335dd9b10bb9ca9b417d3af55ff", "score": "0.62737775", "text": "public function getFiledCurrency()\n\t{\n\t\treturn $this->filedCurrency;\n\t}", "title": "" }, { "docid": "b7f29c384aecdda5c49bc53c0bb680c0", "score": "0.62562066", "text": "public function getSourceCurrencyCode();", "title": "" }, { "docid": "f8d65b9041808b962170aa53b1737b9c", "score": "0.6252827", "text": "public function getCurrencyName(): string\n {\n return $this->currency->getName();\n }", "title": "" }, { "docid": "dcbc06f4bfb76ec81f3bc367adf6cbc7", "score": "0.62519723", "text": "public function base_currency() {\n\t\treturn self::settings()->base_currency();\n\t}", "title": "" }, { "docid": "407c435e093d42a8975b730c416f4b15", "score": "0.6244308", "text": "public function getStoreCurrency()\n {\n return $this->getData('store_currency');\n }", "title": "" }, { "docid": "48aaf988b8612f9e17776c6fefbb3e57", "score": "0.62380683", "text": "public function getBaseCurrencyCode()\n {\n return $this->getData(self::KEY_BASE_CURRENCY_CODE);\n }", "title": "" }, { "docid": "ea935ba213b5031856b12d6859e3d89e", "score": "0.6230451", "text": "public function getCurrencyRate()\n {\n $value = $this->get(self::CURRENCYRATE);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "ea6286b4010ee8cc1655f2fdba1732f3", "score": "0.6229562", "text": "public function getSourceCurrency()\n {\n return $this->source_currency;\n }", "title": "" }, { "docid": "2bd28fba8c7938b6b3fc151d1ed97ac9", "score": "0.6217948", "text": "public function get_currency_code() {\n\t\treturn $this->_currency_code;\n\t}", "title": "" }, { "docid": "a3bdbbfdd9b0efa49d2ce836a30e2684", "score": "0.6201381", "text": "public function getCurrencyConverter();", "title": "" }, { "docid": "28bcc3313bf931d294dfb0b1c4776cb4", "score": "0.61912656", "text": "protected function escapeCurrency($price)\n {\n preg_match(\"/^\\\\D*\\\\s*([\\\\d,\\\\.]+)\\\\s*\\\\D*$/\", $price, $matches);\n return (isset($matches[1])) ? $matches[1] : null;\n }", "title": "" }, { "docid": "d0f45766de225097d22e865551d22dd2", "score": "0.61776793", "text": "public function getCurrencyFallback()\n {\n if ($currency = $this->getCurrency()) {\n return $currency;\n }\n\n //if ($money = $this->getMoney()) {\n // return $money->getCurrency()->getCode();\n //}\n\n return;\n }", "title": "" }, { "docid": "c138dcfc7e52d47e57634d45de259a58", "score": "0.6174472", "text": "public function getCurrency(): string\n {\n }", "title": "" }, { "docid": "2cae1ac7aff83405c73767b943c5d19b", "score": "0.61654705", "text": "private function get_currency_name() : string {\n\t\t\treturn 'Blacer Coin';\n\t\t}", "title": "" }, { "docid": "5161ded0b6b1d41786505669c7135da0", "score": "0.61553603", "text": "public function getBaseCurrency()\n {\n if (is_null($this->_baseCurrency)) {\n $this->_baseCurrency = Mage::getModel('directory/currency')->load($this->getBaseCurrencyCode());\n }\n return $this->_baseCurrency;\n }", "title": "" }, { "docid": "3d2d648490310268c2555614195e3d73", "score": "0.6149992", "text": "protected function getTypePrice($type, $currency = '$')\n {\n $typePriceElement = $this->getTypePriceElement($type);\n return $typePriceElement->isVisible() ? $this->escape($typePriceElement->getText(), $currency) : null;\n }", "title": "" }, { "docid": "f7fcf88d00e690e8af5ec5564d4a3f5f", "score": "0.6142898", "text": "public function getCurrencySymbol(){\t\n\t\treturn (empty($this->nation_data['currency_symbol'])) ? $this->nation_data['currency_alphabetic_code'] : $this->nation_data['currency_symbol'];\t\n\t}", "title": "" }, { "docid": "2ab85ac2fb7783c5e893c03a9a8bded0", "score": "0.61413926", "text": "public function getTargetCurrency()\n {\n return $this->target_currency;\n }", "title": "" }, { "docid": "f49367fe656ae5e15f73aef2a6d2080b", "score": "0.6137451", "text": "public function getCurrencySymbol(string $currency): string;", "title": "" }, { "docid": "b12cbcd4fd6ef1c9de135b18575ab4b3", "score": "0.61271197", "text": "public function getOrderCurrency()\n {\n if (is_null($this->_orderCurrency)) {\n $this->_orderCurrency = Mage::getModel('directory/currency')->load($this->getOrderCurrencyCode());\n }\n return $this->_orderCurrency;\n }", "title": "" }, { "docid": "9d70697f1398a946aae641cfe8f0d54a", "score": "0.6124597", "text": "public function get_currency_name() {\n\t\treturn $this->_currency_name;\n\t}", "title": "" }, { "docid": "486d79beb773fc635ba49085644fa8a3", "score": "0.61158013", "text": "public function getDefaultChartCurrency()\n {\n return 978;\n }", "title": "" }, { "docid": "f5a257a800fc97c0b8d7587c821f95bc", "score": "0.6112482", "text": "public function getCurrencyID()\n {\n return $this->currencyID;\n }", "title": "" }, { "docid": "adc4e0ad6cc56067f1c52c968b3f3288", "score": "0.60860217", "text": "protected function getCurrencyCode()\n {\n $currency = CurrencyModel::getPrimary();\n\n return $currency ? $currency->currency_code : 'USD';\n }", "title": "" }, { "docid": "06e156fe24fc15b2cabc7a4be01cfc3c", "score": "0.6084927", "text": "public function getBaseCurrencyCode()\n {\n if ($this->baseCurrencyCode === null) {\n $this->baseCurrencyCode = strtoupper(\n $this->getStore()->getBaseCurrencyCode()\n );\n }\n \n return $this->baseCurrencyCode;\n }", "title": "" }, { "docid": "0f36b523ba183f42def670ec417a9e1a", "score": "0.6052704", "text": "public function getCurrencyId()\n {\n return $this->_CurrencyId;\n }", "title": "" }, { "docid": "a126b829cf4acc0efe042843530e2a19", "score": "0.604202", "text": "public function getCurrency($currency): CurrencyInterface;", "title": "" }, { "docid": "3e89f0184d9ccf66c8015228f3f6ed30", "score": "0.6033898", "text": "public function getAcceptedCurrency()\n {\n return Mage::getStoreConfig('payment/' . $this->getCode() . '/currency');\n }", "title": "" }, { "docid": "3e89f0184d9ccf66c8015228f3f6ed30", "score": "0.6033898", "text": "public function getAcceptedCurrency()\n {\n return Mage::getStoreConfig('payment/' . $this->getCode() . '/currency');\n }", "title": "" }, { "docid": "56b5724828598512f14f33896258e9d8", "score": "0.602949", "text": "public function getDocumentCurrencyCode()\n {\n return $this->documentCurrencyCode;\n }", "title": "" }, { "docid": "3c4a8d5f916bedf611d8953a85f36e03", "score": "0.60190195", "text": "protected function currencyFormatter() {\n return \\Drupal::service('commerce_price.currency_formatter');\n }", "title": "" }, { "docid": "9b6764afe915ef3bbfb5a41a46f71924", "score": "0.5984113", "text": "public function getPrice()\n {\n if($this->price && $this->getCurrency()) {\n return $this->price.' '.$this->getCurrency();\n }\n return null;\n }", "title": "" }, { "docid": "c9fd8da29110207d0443c09ba7d0f219", "score": "0.59711516", "text": "static function GetAsCurrency($value)\r\n\t{\t\t$currency = '$';\r\n\t\t$sign = \"\";\r\n\t\twhile (strlen($value) > 0)\r\n\t\t{\r\n\t\t\t$ch = substr($value, 0, 1);\r\n\t\t\tif (strcmp($ch, '$') == 0)\r\n\t\t\t{\r\n\t\t\t\t$value = substr($value, 1);\r\n\t\t\t}\r\n\t\t\telseif (strcmp($ch, '-') == 0)\r\n\t\t\t{\r\n\t\t\t\t$sign = '-';\r\n\t\t\t\t$value = substr($value, 1);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$dollars;\r\n\t\t$pennies;\r\n\t\t$i = strpos($value, \".\");\r\n\t\tif ($i === false)\r\n\t\t{\r\n\t\t\t$dollars = $value;\r\n\t\t\t$pennies = \".\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$dollars = substr($value, 0, $i);\r\n\t\t\t$pennies = substr($value, $i, 3);\r\n\t\t}\r\n\t\twhile (strlen($dollars) > 0 && strcmp(substr($dollars, 0, 1), \"0\") == 0)\r\n\t\t{\r\n\t\t\t$dollars = substr($dollars, 1);\r\n\t\t}\r\n\t\twhile (strlen($pennies) < 3)\r\n\t\t{ $pennies .= \"0\"; }\r\n\t\t\r\n\t\treturn $currency . $sign . $dollars . $pennies;\r\n\t}", "title": "" }, { "docid": "1c6e156c22773550fab500fc8867fe2a", "score": "0.594244", "text": "public function getDefaultCurrency();", "title": "" }, { "docid": "1bb98df90dd2c66a4828d84d69d9a500", "score": "0.5935437", "text": "function showCurrency($price)\n {\n \n $price = \" &euro;\".number_format($price,2) ;\n \n return $price;\n }", "title": "" }, { "docid": "9e8d1583a68708f24cccdacd5c75ca01", "score": "0.59336984", "text": "protected function _getStoreCurrency() {\n return Mage::app()->getStore()->getCurrentCurrencyCode();\n }", "title": "" }, { "docid": "3eadc85a1aae04cc3a91a2f264f51936", "score": "0.5929939", "text": "public static function currency($value)\n {\n if ($value === null || $value === '') {\n return $value;\n }\n\n if (!is_numeric($value)) {\n return 'NaN';\n }\n\n return number_format($value);\n }", "title": "" }, { "docid": "28eb25af12004beaf232b0d32113461d", "score": "0.5927218", "text": "private function get_currency_code() : string {\n\t\t\treturn 'BLCR';\n\t\t}", "title": "" } ]
af94641153826a7b9c28c3b444c743f0
Notifies all registered listeners of the event (called in the order they were set).
[ { "docid": "42e54608bc2136ae6871d36f8f0c424f", "score": "0.0", "text": "public function trigger(EventObject $event) {\r\r\n\t\t\r\r\n\t\tforeach ($this->getRegistered($event->getName()) as $callback) {\r\r\n\t\t\tif (is_array($callback)) {\r\r\n\t\t\t\t// If object not passed in and this callback class does not exist, skip\r\r\n\t\t\t\tif (!is_object($callback[0]) && !class_exists($callback[0]))\r\r\n\t\t\t\t\tcontinue;\r\r\n\t\t\t}\r\r\n\t\t\tcall_user_func($callback, $event);\r\r\n\t\t}\r\r\n\t\treturn $event;\r\r\n\t}", "title": "" } ]
[ { "docid": "f6e04cdda692bda915975a139b610d4c", "score": "0.7108778", "text": "public function notifyObservers()\n {\n foreach ($this->observers as $observer) {\n $observer->handleEvent($this);\n }\n }", "title": "" }, { "docid": "e82632152950322256e12a8512e0f34f", "score": "0.6620877", "text": "public function registerEventListeners(): void\n {\n foreach ($this->listens() as $event => $listeners) {\n foreach ($listeners as $listener) {\n Event::listen($event, $listener);\n }\n }\n }", "title": "" }, { "docid": "81afdf56776070b78479476d474d9345", "score": "0.65875405", "text": "private function registerApplicationEvents(): void\n {\n foreach ($this->listens() as $event => $listeners) {\n foreach ($listeners as $listener) {\n self::listen($event, $listener);\n }\n }\n\n }", "title": "" }, { "docid": "a2f1139928964258821bef8d2a1e3f53", "score": "0.65790474", "text": "public function notify()\n {\n foreach ($this->_observers as $observer) {\n $observer->watch();\n }\n }", "title": "" }, { "docid": "ade4129b1b25589600e1359c2daec0a4", "score": "0.656186", "text": "public function notify() {\r\n foreach ($this->observers as $value) {\r\n $value->update($this);\r\n }\r\n }", "title": "" }, { "docid": "737fab94f78316bcddc7801ba01c30c5", "score": "0.65542287", "text": "public function notify() {\r\n foreach ($this->_observers as $value) {\r\n $value->update($this);\r\n }\r\n }", "title": "" }, { "docid": "38a2d6ecd1174711b0852014fc3d4783", "score": "0.6485823", "text": "public function notify() {\n foreach ($this->observers as $value) {\n $value->update($this);\n }\n }", "title": "" }, { "docid": "bab481bec532491c2c57f2fa7ef4f76f", "score": "0.64719725", "text": "private function runListeners()\n {\n foreach ($this->listeners as $listener) {\n $listener();\n }\n }", "title": "" }, { "docid": "8a265a786da977b78fdbc403f8ad7542", "score": "0.63923603", "text": "public function notify() {\n // Updates all classes subscribed to this object\n foreach ($this->observers as $obs) {\n $obs->update($this);\n }\n }", "title": "" }, { "docid": "6edcf29c8fc25565296ee3b1c4d5a530", "score": "0.63451385", "text": "public function notifyObservers()\n {\n foreach ($this->_observers as $observer) {\n $observer->update($this); \n }\n }", "title": "" }, { "docid": "1190a65d4d2567e36d09271705016277", "score": "0.6304768", "text": "final public function listensEverything()\n {\n $this->eventTypes = '*';\n }", "title": "" }, { "docid": "86f8a9a7bbf5643b32d427e3c450b134", "score": "0.6260563", "text": "public function notify() {\n\t\tforeach ($this->_observers as $observer) {\n\t\t\t$observer->update($this);\n\t\t}\n\t}", "title": "" }, { "docid": "c7c2edc4f188c286cfad3b8cd166572a", "score": "0.6194055", "text": "public function fireAfterSendingCallbacks()\n {\n foreach ($this->afterSendingCallbacks as $callback) {\n $callback();\n }\n }", "title": "" }, { "docid": "c4e22697c4914fe0a0f416ca16a59253", "score": "0.61794037", "text": "protected function _fire($listeners, $params) {\n\t\tforeach ($listeners as $listener) {\n\t\t\tcall_user_func($listener, $params);\n\t\t}\n\t}", "title": "" }, { "docid": "da31d0c418eee970c3f58d72713fbf97", "score": "0.6086534", "text": "protected function registerListeners()\n\t{\n\t\t$this->ci->config->load('listeners');\n\n\t\t$listeners = $this->ci->config->item('listeners');\n\n\t\tforeach ((array)$listeners as $eventName => $listenerGroup)\n\t\t{\n\t\t\tforeach ($listenerGroup as $listener)\n\t\t\t{\n\t\t\t\tEvents::register($eventName, $listener);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "66e3979be58d9a8bc7b5f53227d72a09", "score": "0.60741067", "text": "public function notify() {\n $observersToNotify = array();\n\n //Check which observers must be update\n foreach ($this->_observers as $observer) {\n if ($this->checkIfObserverMustBeUpdate($observer)) {\n //Add the observers in array to be order for priority\n $observersToNotify[] = $observer;\n }\n }\n\n //Order the list of observers\n usort($observersToNotify, array($this,'orderObserversForPriority'));\n\n //Update the observers\n foreach ($observersToNotify as $observer) {\n try {\n $this->updateObserverState($observer);\n } catch (\\Exception $e) {\n if ((int)$e->getCode()===600) { //Stop propagation\n break 1;\n }\n }\n }\n\n }", "title": "" }, { "docid": "e217d6e37239a2659c2cc24e66ccd32b", "score": "0.6036557", "text": "public static function getSubscribedEvents()\n {\n }", "title": "" }, { "docid": "e217d6e37239a2659c2cc24e66ccd32b", "score": "0.6036557", "text": "public static function getSubscribedEvents()\n {\n }", "title": "" }, { "docid": "b78ef4d7373b37514321b4ee2db38ac9", "score": "0.6035183", "text": "private function dispatchEvents(): void\n {\n foreach ($this->updatedAttributes as $attribute => $value) {\n if (is_array($this->fireableAttributes[$attribute]) && isset($this->fireableAttributes[$attribute][$value])) {\n $eventName = $this->fireableAttributes[$attribute][$value];\n } elseif (is_string($this->fireableAttributes[$attribute]) && class_exists($this->fireableAttributes[$attribute])) {\n $eventName = $this->fireableAttributes[$attribute];\n } else {\n continue;\n }\n\n event(new $eventName($this->model));\n }\n }", "title": "" }, { "docid": "9719c0036da682bc212c59e849449b52", "score": "0.6032856", "text": "public static function all()\r\n\t{\r\n\t\treturn self::$_listeners;\r\n\t}", "title": "" }, { "docid": "cd409a7b7f505ac9ce08b5d271face09", "score": "0.5976415", "text": "public function getSubscribedEvents(): iterable;", "title": "" }, { "docid": "4269a7237da1e0f8ad0e94806afa1164", "score": "0.5970301", "text": "protected function listenForEvents()\n {\n if (static::$hasListenEvents) {\n return;\n }\n\n static::$hasListenEvents = true;\n $this->getEvents()->listen(JobFailed::class, LogFailedJob::class);\n }", "title": "" }, { "docid": "2ac2d208844c1ee7b21b06377abb2311", "score": "0.5960891", "text": "public function getSubscribedEvents();", "title": "" }, { "docid": "1ae29b7855500db4f109931b99604814", "score": "0.5942091", "text": "public function notify()\n {\n $this->observers->rewind();\n while ($this->observers->valid()) {\n $observer = $this->observers->current();\n $observer->update($this); // 参数\n $this->observers->next();\n }\n\n }", "title": "" }, { "docid": "7e407efdad9a45d690cac1e960320bc1", "score": "0.59375185", "text": "public function restoreAllEventListeners()\n {\n $eventManager = $this->getEventManager();\n\n foreach ($this->disabledListeners as $event => $listeners) {\n /* @var EventSubscriber[] $listeners */\n foreach ($listeners as $listener) {\n $eventManager->addEventListener($event, $listener);\n }\n\n $this->disabledListeners[$event] = [];\n }\n }", "title": "" }, { "docid": "cbdcd478b438fe05e736190f2767879c", "score": "0.5908866", "text": "private function bindEventListenersEvents()\n\t{\n\t\tif ($this->_eventListeners && !$this->_listenerInstances) {\n\t\t\tforeach ($this->_eventListeners as $listener) {\n \n\t\t\t\t$listener = static::getListener($listener);\n\t\t\t\t\n\t\t\t\t$events = $listener->events();\n\t\t\t\t\n\t\t\t\tif ($events) foreach ($events as $name => $handler) {\n\t\t\t\t\tstatic::on($name, is_string($handler) ? [$listener, $handler] : $handler);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e3d555ea92902bfb35929589d2a70726", "score": "0.58862007", "text": "public static function flushEventListeners()\n {\n if ( ! isset(static::$dispatcher)) {\n return;\n }\n \n foreach ((new static)->getObservableEvents() as $event) {\n static::$dispatcher->delete(\"erostrine.{$event}: \".static::class);\n }\n \n foreach (array_values((new static)->dispatchEvents) as $event) {\n static::$dispatcher->delete($event);\n }\n }", "title": "" }, { "docid": "ea698f6dfea442958750d2ec676f57d3", "score": "0.58799267", "text": "protected function registerEvents()\n {\n $events = $this->app->make(Dispatcher::class);\n\n foreach ($this->events as $event => $listeners) {\n foreach ($listeners as $listener) {\n $events->listen($event, $listener);\n }\n }\n }", "title": "" }, { "docid": "d835cd9f85b3dc247c87efc39145c653", "score": "0.58484876", "text": "public static function getSubscribedEvents();", "title": "" }, { "docid": "11e8e6c97093ae8e0b2c2bd7a18eb9e2", "score": "0.57945263", "text": "protected function listenForEvents()\n {\n $this->events->listen(MessageProcessing::class, function ($event) {\n $this->writeOutput($event->message, 'starting');\n });\n\n $this->events->listen(MessageProcessed::class, function ($event) {\n $this->writeOutput($event->message, 'success');\n });\n\n $this->events->listen(ImapConnectionFailed::class, function (ImapConnectionFailed $event) {\n $this->error($event->exception->getMessage());\n });\n\n $this->events->listen(MessageFailed::class, function ($event) {\n $this->writeOutput($event->message, 'failed');\n\n $this->logFailedJob($event);\n });\n }", "title": "" }, { "docid": "768f40b76ff773361de8f43f091e1da7", "score": "0.5700667", "text": "public function testNotifications() {\n\t\tTiton::event()->notify('titon.startup');\n\t\t$this->assertEquals(['startup'], Titon::event()->getListeners()[0]['object']->executed);\n\n\t\tTiton::event()->notify('dispatch.postDispatch', new DispatcherFixture());\n\t\t$this->assertEquals(['startup', 'postDispatch'], Titon::event()->getListeners()[0]['object']->executed);\n\n\t\tTiton::event()->notify('controller.preProcess', new ControllerFixture());\n\t\t$this->assertEquals(['startup', 'postDispatch', 'preProcess'], Titon::event()->getListeners()[0]['object']->executed);\n\n\t\tTiton::event()->notify('view.postRender', new EngineFixture());\n\t\t$this->assertEquals(['startup', 'postDispatch', 'preProcess', 'postRender'], Titon::event()->getListeners()[0]['object']->executed);\n\n\t\tTiton::event()->notify('customEvent'); // Not in the listener\n\t\t$this->assertEquals(['startup', 'postDispatch', 'preProcess', 'postRender'], Titon::event()->getListeners()[0]['object']->executed);\n\t}", "title": "" }, { "docid": "bd770c4bec693c4bada03d28576ba469", "score": "0.5698453", "text": "public function registerAllEvents() {\n $this->getServer()->getPluginManager()->registerEvents(new PlayerDeathListener($this), $this);\n }", "title": "" }, { "docid": "6ae23f9ea6ff31ff537ba35fc3642e6d", "score": "0.5689367", "text": "function fireEvent($event)\n\t{\n\t \tif ($this->eventListeners != null)\n\t \t{\n\t \t\t$name = $event->getName();\n\t \t\t\n\t \t\tfor ($i = 0; $i < sizeof($this->eventListeners); $i += 2)\n\t \t\t{\n\t \t\t\tif ($this->eventListeners[$i] == $name)\n\t \t\t\t{\n\t\t \t\t\t$this->eventListeners[$i+1]->$name($event);\n\t \t\t\t}\n\t \t\t}\n\t \t}\n\t}", "title": "" }, { "docid": "1afd19c857dd81dd156ae7c83b148fba", "score": "0.5684571", "text": "public function getSubscribedEvents()\n {\n return array(\n 'postPersist',\n );\n }", "title": "" }, { "docid": "81a982a884ece2d22e5a796a277822a7", "score": "0.5683401", "text": "private function listeners()\r\n {\r\n $this->app['director']->addListener('on_page_view', function($event) {\r\n /** @var PageView $listener */\r\n $listener = $this->app->make(PageView::class);\r\n $listener->handle($event);\r\n });\r\n }", "title": "" }, { "docid": "f2fd07a2328f3be4043e725eeb180424", "score": "0.5680862", "text": "public function listHookObservers($eventName);", "title": "" }, { "docid": "4d0542d3f0ec1d89e893829e3139965d", "score": "0.56757814", "text": "public function notifyObservers();", "title": "" }, { "docid": "0bafd1f31dcebcfb0c69efec5b5a281b", "score": "0.5659175", "text": "public function notify()\n {\n $this->notifyObservers();\n }", "title": "" }, { "docid": "1f8c9ca8ad5391e1db91f972bfca4a36", "score": "0.56527567", "text": "protected function registerListenerInfo()\n {\n $iMax = count($this->aListenerInfo);\n for ($iFor = 0; $iFor < $iMax; $iFor++) {\n\n $bOk = $this->registerListenersInfo($this->aListenerInfo[$iFor]);\n\n if ($bOk === false) {\n\n unset($this->aListenerInfo[$iFor]);\n }\n }\n\n $this->aListenerInfo = array_values($this->aListenerInfo);\n }", "title": "" }, { "docid": "d8bb2f2596b1658f05c78e5ab7df1c3e", "score": "0.5612682", "text": "private function fireCallback($callbackEvent) {\n array_map($callbackEvent, self::$event_listeners);\n }", "title": "" }, { "docid": "475ad457fb517b648ae13697fb4c5635", "score": "0.55927724", "text": "public static function flushEventListeners()\n {\n if (! isset(static::$dispatcher)) {\n return ;\n }\n\n $instance = new static();\n $className = get_called_class();\n\n foreach ($instance->getObservableEvents() as $event) {\n $event = $instance->getObservableKey($event);\n\n static::$dispatcher->forget(\"{$event}: {$className}\");\n }\n }", "title": "" }, { "docid": "41ae220450937b13551a1de825d4cb20", "score": "0.5584957", "text": "public function notify(){\n foreach ($this->_classes as $classes) {\n $classes->update($this);\n }\n }", "title": "" }, { "docid": "81af6a7f128387922677a553811f97bf", "score": "0.5580907", "text": "public function getSubscribedEvents()\n {\n return [\n Events::onFlush,\n ];\n }", "title": "" }, { "docid": "d2763331dde7639abe4068a8d8c18692", "score": "0.5557134", "text": "protected function registerListenerObject()\n {\n $iMax = count($this->aListenerObject);\n for ($iFor = 0; $iFor < $iMax; $iFor++) {\n $oListenerObject = $this->aListenerObject[$iFor];\n\n $bOk = $this->registerListenersObject($oListenerObject);\n\n if ($bOk === false) {\n unset($this->aListenerObject[$iFor]);\n }\n }\n\n $this->aListenerObject = array_values($this->aListenerObject);\n }", "title": "" }, { "docid": "6b31a6d0e805dcaf7223f8e6127e1bd0", "score": "0.55341005", "text": "public function fire() {\n\t\t$params = func_get_args();\n\n\t\tif (sizeof($params) == 0) {\n\t\t\tthrow new Exception(\"You must provide an event name as first parameter\");\n\t\t}\n\n\t\t$event = $params[0];\n\n\t\tif (!is_string($event)) {\n\t\t\tthrow new Exception(\"Only a string is valid for an event\");\n\t\t}\n\n\t\tif (isset($this->_listeners[$event])) {\n\t\t\t$this->_fire($this->_listeners[$event], $params);\n\t\t}\n\n\t\twhile (list($regex, $listeners) = each($this->_listenersRegex)) {\n\t\t\tif (preg_match($regex, $event)) {\n\t\t\t\t$this->_fire($listeners, $params);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b92853399bf9fdbf625074f605aee7ed", "score": "0.5519697", "text": "public function events() {\n $events = parent::events();\n $events += array(\n 'lineItemUpdated',\n );\n return $events;\n }", "title": "" }, { "docid": "8ca080a5fe1cb3783edaf3858b72e7d7", "score": "0.5506518", "text": "public function restoreEventSubscribers()\n {\n $eventManager = $this->getEventManager();\n\n foreach ($this->disabledSubscribers as $subscriber) {\n $eventManager->addEventSubscriber($subscriber);\n }\n\n $this->disabledSubscribers = [];\n }", "title": "" }, { "docid": "0af5c54292e6e40c30bf6f7e75c88fe3", "score": "0.5481796", "text": "public function notify()\n {\n foreach ($this->actionsBeforeGenerateOrder as $action) {\n $action->update($this);\n }\n }", "title": "" }, { "docid": "10eacd6b7eb617c0595e40feabf0aacc", "score": "0.54724866", "text": "public function getListeners();", "title": "" }, { "docid": "1943cf2aac7137a97fcdaa1b55bae421", "score": "0.546886", "text": "public function listenToEvents()\n {\n $this->app['events']->listen('clockwork.controller.start', function () {\n $this->timeline->startEvent('controller', 'Request processing');\n });\n\n $this->app['events']->listen('clockwork.controller.end', function () {\n $this->timeline->endEvent('controller');\n });\n\n $this->app['events']->listen('clockwork.running.end', function () {\n $this->timeline->endEvent('running');\n });\n\n// $this->app['events']->listen('composing:*', function ($view, $data = null) {\n// if (!$this->collectViews) {\n// return;\n// }\n//\n// if (is_string($view) && is_array($data)) { // Laravel 5.4 wildcard event\n// $view = $data[0];\n// }\n//\n// $time = microtime(true);\n// $data = $view->getData();\n// unset($data['__env']);\n//\n// $this->views->addEvent(\n// 'view '.$view->getName(),\n// 'Rendering a view',\n// $time,\n// $time,\n// ['name' => $view->getName(), 'data' => (new Serializer())->normalize($data)]\n// );\n// });\n }", "title": "" }, { "docid": "3d44754ad8e5ff21ab05b4c26ef50bf0", "score": "0.5465717", "text": "public static function getSubscribedEvents()\n {\n return array(\n 'request.before_send' => array('onBeforeSend', 250),\n );\n }", "title": "" }, { "docid": "fb51f59f3ab885821a08c119ee256403", "score": "0.54644424", "text": "public function getSubscribedEvents()\n {\n return [\n Events::preUpdate,\n ];\n }", "title": "" }, { "docid": "8b784f19987819d6abd9356e7d6de9de", "score": "0.5463573", "text": "public static function AllEvents() {return 4;}", "title": "" }, { "docid": "e20afd0b410de3647fd86082f30253e1", "score": "0.54505646", "text": "protected function ensureEventListeners()\n\t{\n\t\tif ($this->_eventListeners === null) {\n\t\t\t$this->_eventListeners = [];\n\t\t\tif (method_exists($this, 'eventListeners')) {\n\t\t\t\t$this->setEventListeners($this->eventListeners());\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "84ab76603a7973f6043eadbfb3d55966", "score": "0.5449984", "text": "public function getRegisteredEventListeners();", "title": "" }, { "docid": "84ab76603a7973f6043eadbfb3d55966", "score": "0.5449984", "text": "public function getRegisteredEventListeners();", "title": "" }, { "docid": "c92df0af80ff79e0ee0c70b0b7d603f8", "score": "0.5442811", "text": "protected function attachDefaultListeners()\r\n {\r\n // No event listeners by default\r\n }", "title": "" }, { "docid": "a3a90a04ac779ed53d4e43ad145a0aff", "score": "0.5437968", "text": "public function events()\n\t{\n\t\treturn array_merge(parent::events(), array(\n\t\t\t'onAfterInstall'=>'afterInstall',\n\t\t));\n\t}", "title": "" }, { "docid": "9635779caba9be13cbc7135878a06d58", "score": "0.5431774", "text": "public static function getSubscribedEvents()\n {\n return array(FormEvents::PRE_SET_DATA => 'preSetData');\n }", "title": "" }, { "docid": "80fa84d4f75b36304677462081fcbb70", "score": "0.54301083", "text": "private function doPublish(array $listeners, $eventName, AbstractEvent $event)\n {\n foreach ($listeners as $listener) {\n call_user_func($listener->getMethod(), $event, $eventName, $this);\n }\n }", "title": "" }, { "docid": "7889dfeb5156fbec5b207a390370d20c", "score": "0.54261047", "text": "public function getSubscribedEvents()\n {\n return array(\n Events::postPersist,\n Events::postFlush\n );\n }", "title": "" }, { "docid": "03ef981e98960d60fbba759de671fb22", "score": "0.5419332", "text": "public function init()\n {\n parent::init();\n foreach($this->getAllEvents() as $event_value)\n {\n $this->on($event_value, [$this, 'handleEvent']);\n }\n }", "title": "" }, { "docid": "69f49140fe0dbc52355cb1aab1383823", "score": "0.5411649", "text": "public static function getSubscribedEvents()\n\t{\n\t\t// event and that the preSetData method should be called.\n\t\treturn array(FormEvents::PRE_SET_DATA => 'preSetData');\n\t}", "title": "" }, { "docid": "e3a28782acdb891aa76e3a2ac452d377", "score": "0.540743", "text": "function getSubscribedEvents()\n {\n return [\n \"Devrun\\Module\\ModuleFacade::onUpdate\" => ['onUpdate', 20]\n ];\n }", "title": "" }, { "docid": "6eefff65147b49d5177b873f40e3ead2", "score": "0.5401254", "text": "public static function flushEventListeners()\n\t{\n\t\tif (! isset(static::$dispatcher)) {\n\t\t\treturn;\n\t\t}\n\n\t\t$instance = new static;\n\n\t\tforeach ($instance->getObservableEvents() as $event) {\n\t\t\tstatic::$dispatcher->forget(\"workflow.{$event}: \".static::class);\n\t\t}\n\t}", "title": "" }, { "docid": "edf48d5bd417171fc67790a84b6fe0ce", "score": "0.54010314", "text": "public function getSubscribedEvents()\n {\n return [\n 'onFlush',\n 'loadClassMetadata',\n 'prePersist',\n ];\n }", "title": "" }, { "docid": "d0e242f8d02058f825163e5348d1d59c", "score": "0.5395514", "text": "public function getSubscribedEvents()\n {\n return [Events::postLoad];\n }", "title": "" }, { "docid": "8f8d6f329d0afdfe732daafcf62f24be", "score": "0.5395226", "text": "public function notifyObserver()\n {\n foreach ($this->arrList as $v)\n {\n $v->update($this->temperature,$this->humidity,$this->pressure);\n }\n }", "title": "" }, { "docid": "f95a586c34afeac2275487716784f78b", "score": "0.5392528", "text": "public static function getSubscribedEvents()\n {\n return array(\n AppEvent::MAIN => array(\n array(\"addEventListener\", 10),\n array(\"onMain\", 8),\n array(\"notify\", 5),\n array(\"end\", 1),\n array(\"ignored\", 0)\n )\n );\n }", "title": "" }, { "docid": "06c8810fc69c286b030b6acb0441db74", "score": "0.53895265", "text": "protected function ensureEvents()\n\t{\n\t\tif ($this->_events === null) {\n\t\t\t$this->_events = [];\n\t\t\tif (method_exists($this, 'events')) {\n\t\t\t if ($events = $this->events()) foreach ($events as $name => $handler) {\n\t\t\t\t\t$this->on($name, $handler);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "ac949bf5e56b4cf7ebf318a5fcc1f058", "score": "0.5383123", "text": "public function HookEvents() {\n // $this->addHooks(\n // array (\n // )\n // );\n }", "title": "" }, { "docid": "b9f60cf6766f9b9846fac50ea4a61b57", "score": "0.53609776", "text": "public function listenToEvents()\n\t{\n\t\t$this->eventDispatcher->listen(\\Illuminate\\Redis\\Events\\CommandExecuted::class, function ($event) {\n\t\t\t$this->registerCommand([\n\t\t\t\t'command' => $event->command,\n\t\t\t\t'parameters' => $event->parameters,\n\t\t\t\t'duration' => $event->time,\n\t\t\t\t'connection' => $event->connectionName,\n\t\t\t\t'time' => microtime(true) - $event->time / 1000\n\t\t\t]);\n\t\t});\n\t}", "title": "" }, { "docid": "d599a13bf59855b298c8992ca107e235", "score": "0.5353076", "text": "public static function getSubscribedEvents()\n {\n return [\n 'post-package-install' => 'onPostPackageInstall',\n 'pre-package-uninstall' => 'onPrePackageUninstall',\n ];\n }", "title": "" }, { "docid": "b4fb15f8b540e467648284997fb90eb4", "score": "0.53515667", "text": "public function getEvents() {\n\t\treturn array_keys($this->listeners);\n\t}", "title": "" }, { "docid": "d7efbbccb8b6d5ec79e5cb1881b1836d", "score": "0.53486764", "text": "public function getSubscribedEvents()\n {\n return [\n Events::postLoad,\n Events::postFlush,\n Events::onFlush,\n ];\n }", "title": "" }, { "docid": "22d1cc7109b9c858c7e2bf93ffef63b2", "score": "0.5340451", "text": "private function listenForEvents(ListenerInterface $listener)\n {\n foreach ($listener->listensForEvents() as $event_key) {\n $this->dispatcher->addListener($event_key, array($listener, 'listen'), $listener->getPriority());\n }\n }", "title": "" }, { "docid": "72b13a25807ff78a6ad0eccabd670365", "score": "0.5339605", "text": "public static function getSubscribedEvents()\n {\n return array(\n RunnerEvents::AFTER_HANDLE => 'onAfterHandle',\n );\n }", "title": "" }, { "docid": "3310e45828e4216ab9762385a3c79fdc", "score": "0.5332548", "text": "public function registerListeners(DispatcherContract $events)\n {\n foreach ($this->listens() as $event => $listeners) {\n foreach ($listeners as $listener) {\n $events->listen($event, $listener);\n }\n }\n\n foreach ($this->subscribe as $subscriber) {\n $events->subscribe($subscriber);\n }\n }", "title": "" }, { "docid": "9b2fde4aaf64d6325cee9b28dda393f9", "score": "0.5330183", "text": "function defineHandlers() {\n\t\tEventsManager::listen ( 'on_daily', 'on_daily' );\n\t\tEventsManager::listen ( 'on_reports_panel', 'on_reports_panel' );\n\t\tEventsManager::listen ( 'on_am_reports_panel', 'on_am_reports_panel' );\n\t\tEventsManager::listen ( 'on_system_permissions', 'on_system_permissions' );\n\t\tEventsManager::listen ( 'on_admin_panel', 'on_admin_panel' );\n\t\tEventsManager::listen ( 'on_main_menu', 'on_main_menu' );\n\t\tEventsManager::listen ( 'on_inline_tabs', 'on_inline_tabs' );\n\t\tEventsManager::listen ( 'on_phone_homescreen', 'on_phone_homescreen' );\n\t\tEventsManager::listen ( 'on_custom_user_permissions', 'on_custom_user_permissions' );\n\t\tEventsManager::listen ( 'on_initial_javascript_assign', 'on_initial_javascript_assign' );\n\t\t// EventsManager::listen ( 'on_wireframe_updates', 'on_wireframe_updates' );\n\t\t// EventsManager::listen ( 'on_shutdown', 'on_shutdown' );\n\t\t\n\t\t//Time Reports Plus\n\t\tEventsManager::listen ( 'on_homescreen_tab_types', 'on_homescreen_tab_types' );\n\t\tEventsManager::listen ( 'on_project_overview_sidebars', 'on_project_overview_sidebars' );\n\t}", "title": "" }, { "docid": "f1678129a07f60d2affca51a0121529a", "score": "0.53264153", "text": "public function getSubscribedEvents()\n\t{\n\t\treturn array(\n\t\t\t'Nette\\Application\\Application::onStartup' => 'setDefaultTarget',\n\t\t);\n\t}", "title": "" }, { "docid": "6fd3c8801b28c1ad23ecf1494213beaf", "score": "0.53134733", "text": "public static function getSubscribedEvents()\n {\n return [UpdateIncomingEvent::NAME => 'onUpdateIncoming'];\n }", "title": "" }, { "docid": "a838b0cc7cea557cdaa1fad08bc8049a", "score": "0.531074", "text": "public static function getSubscribedEvents()\n {\n // event and that the preSetData method should be called.\n return array(FormEvents::PRE_SET_DATA => 'preSetData');\n }", "title": "" }, { "docid": "d59ca35ae2c0d37abada047774be95bc", "score": "0.5306329", "text": "protected function registerEventListeners(): void\n {\n /** @var Dispatcher $events */\n $events = $this->app['events'];\n\n $events->listen(MessageReceived::class, HandleConversation::class);\n }", "title": "" }, { "docid": "cebff90be9e4bc6e4d07d03fa67fa394", "score": "0.530491", "text": "public function getSubscribedEvents() {\n return array(\n Events::postUpdate,\n Events::preUpdate,\n Events::postLoad,\n Events::preFlush,\n Events::postFlush\n );\n }", "title": "" }, { "docid": "821b3e0011c97c02c2fb5cf8f5f79fda", "score": "0.52996385", "text": "public static function getSubscribedEvents()\n {\n return array(\n 'tester.scenario_tested.after' => 'onAfterScenarioTested'\n );\n }", "title": "" }, { "docid": "96d9d9b74e0ab648fee45f68be718499", "score": "0.5299307", "text": "public static function getSubscribedEvents()\n {\n array(\n SkelActionEvents::OBJECT_DELETE_COMPLETED => 'onObjectDeleteComplete'\n );\n }", "title": "" }, { "docid": "4bf451d2c2b8fcc786ab166324405578", "score": "0.5298338", "text": "public function subscribeEvents()\n {\n /**\n * Add fulfillment option for products\n */\n Backend::$events->addEvent('shop:onExtendProductForm', $this, 'extend_product_form');\n Backend::$events->addEvent('shop:onExtendProductModel', $this, 'extend_product_model');\n\n /**\n * Listen for order status changes so we can send the fulfillment reques to Amazon once the order is paid\n */\n Backend::$events->addEvent('shop:onOrderBeforeStatusChanged', $this, 'fulfill_order');\n\n /**\n * Add the extra log file to track errors\n */\n Backend::$events->addEvent('core:onInitialize', $this, 'initialize');\n }", "title": "" }, { "docid": "5d3f2f081e48cbab360c4bf4792127d6", "score": "0.52978784", "text": "public function registerSubscriptionEvents()\n {\n $manager = SubscriptionEngine::instance();\n Event::listen('responsiv.pay.invoicePaid', [$manager, 'invoiceAfterPayment']);\n }", "title": "" }, { "docid": "2c211da97178d743a45911e995c66b45", "score": "0.52956694", "text": "public function getSubscribedEvents()\n {\n return [\n 'prePersist',\n 'preRemove',\n 'preUpdate',\n 'onFlush',\n 'loadClassMetadata',\n 'postPersist',\n 'postUpdate',\n 'postRemove',\n ];\n }", "title": "" }, { "docid": "a510bf150a841456717d7b5ba4d72228", "score": "0.5281868", "text": "protected function registerObservers(): void\n {\n Company::observe(CompanyObserver::class);\n Contact::observe(ContactObserver::class);\n }", "title": "" }, { "docid": "e5de8a04cc74b4e48d1bd532bd3ff1f4", "score": "0.52667874", "text": "public function testEventSubscribed()\n {\n $this->assertArrayHasKey(FormEvents::PRE_SET_DATA, $this->subscriber->getSubscribedEvents());\n $this->assertArrayHasKey(FormEvents::PRE_SUBMIT, $this->subscriber->getSubscribedEvents());\n }", "title": "" }, { "docid": "399e32d290d638e317606ead96ed2d14", "score": "0.5265913", "text": "protected function _subscribeToEngineEvents()\n {\n $controller = $this->getController();\n \n $endOfFaxNotifyFilter = Streamwide_Engine_NotifyFilter_Factory::factory(\n Streamwide_Engine_NotifyFilter_Factory::T_EVT_SIG_PARAM_REMOTE,\n Streamwide_Engine_NotifyFilter_Factory::FILTER_EQUAL_TO,\n $this->_msCallLeg->getName()\n );\n $controller->addEventListener(\n Streamwide_Engine_Events_Event::ENDOFFAX,\n array(\n 'callback' => array( $this, 'onEndOfFax' ),\n 'options' => array(\n 'autoRemove' => 'before',\n 'notifyFilter' => $endOfFaxNotifyFilter\n )\n )\n );\n }", "title": "" }, { "docid": "a10c726391aa1b145737cd3678a71b6f", "score": "0.5261411", "text": "public function notifyObservers(INotification $notification)\r\n {\r\n if (isset($this->observerMap[$notification->getName()])) {\r\n // Copy observers from reference array to working array,\r\n // since the reference array may change during the notification loop\r\n $observers = $this->observerMap[$notification->getName()];\r\n\r\n foreach ($observers as $observer) {\r\n $observer->notifyObserver($notification);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "3136921e1646aae341ea5819e05b91e7", "score": "0.5261188", "text": "public function getSubscribedEvents()\n {\n return [Events::onFlush, Events::loadClassMetadata];\n }", "title": "" }, { "docid": "693c64c559c7b13e4a82007ae48c39e3", "score": "0.5255709", "text": "public function attach(EventManagerInterface $events)\n {\n $this->listeners[] = $events->attach('fetchAll', array($this, 'onFetchAll'));\n }", "title": "" }, { "docid": "5ecdce3fb2e3675f1c03b832a267347e", "score": "0.5237306", "text": "protected function registerEventBindings()\n {\n if (! $this->app['files']->exists(storage_path('framework/events.php'))) {\n return;\n }\n\n $events = $this->app['events'];\n\n $listen = $this->app['files']->getRequire(storage_path('framework/events.php'));\n\n foreach ($listen as $event => $listeners) {\n foreach ($listeners as $listener) {\n $events->listen($event, $listener);\n }\n }\n }", "title": "" }, { "docid": "ebd69654a22c27b627e18c35fd772bba", "score": "0.5234639", "text": "public function getSubscribedEvents()\n {\n return [\n Events::prePersist,\n Events::postLoad\n ];\n }", "title": "" }, { "docid": "7e491546b9618771058e9a424e6f5a87", "score": "0.5232694", "text": "public static function getSubscribedEvents()\n {\n return [\n CKFinderEvent::FILE_UPLOAD => 'addWatermark'\n ];\n }", "title": "" }, { "docid": "769be0d68be43a77211d4557310da68a", "score": "0.52295524", "text": "public function listenToEarlyEvents()\n {\n $this->timeline->startEvent('total', 'Total execution time', 'start');\n $this->timeline->startEvent('booting', 'Application booting', 'start');\n\n $this->app->booted(function () {\n $this->timeline->endEvent('booting');\n $this->timeline->startEvent('running', 'Application running');\n });\n\n $this->count = [];\n\n $this->app['events']->listen('*', function ($event) {\n $str = is_string($event) ? $event : get_class($event);\n $this->count[$str] = array_get($this->count, $str) ?? 0;\n $this->count[$str]++;\n });\n }", "title": "" }, { "docid": "48c82fb257132317f108f8e5966b084d", "score": "0.5222447", "text": "public function notifySubscribers(string $eventId, array $eventData)\n {\n /** @var SubscriberInterface $subscriber */\n foreach ($this->getSubscribers() as $subscriber) {\n $subscriber->handleEvent($eventId, $eventData);\n }\n }", "title": "" }, { "docid": "2f09c8d2a52bc352535024cbf7f7f934", "score": "0.52218336", "text": "public function getSubscribedEvents()\n {\n return [\n Events::postPersist,\n Events::preUpdate,\n Events::postUpdate,\n ];\n }", "title": "" } ]
0805b737cba60980a43a3c882989abb0
Parse shortcode custom css string.
[ { "docid": "b0961bc2f4b7b7bb1bd227030d3a41eb", "score": "0.5985166", "text": "public function EcomeShortcodesCustomCss( $content )\r\n\t\t{\r\n\t\t\t$css = '';\r\n\t\t\tWPBMap::addAllMappedShortcodes();\r\n\t\t\tif ( preg_match_all( '/' . get_shortcode_regex() . '/', $content, $shortcodes ) ) {\r\n\t\t\t\tforeach ( $shortcodes[2] as $index => $tag ) {\r\n\t\t\t\t\t$atts = shortcode_parse_atts( trim( $shortcodes[3][$index] ) );\r\n\t\t\t\t\t$shortcode = explode( '_', $tag );\r\n\t\t\t\t\t$shortcode = end( $shortcode );\r\n\t\t\t\t\tif ( strpos( $tag, 'ecome_' ) !== false ) {\r\n\t\t\t\t\t\t$class = 'Ecome_Shortcode_' . implode( '_', array_map( 'ucfirst', explode( '-', $shortcode ) ) );\r\n\t\t\t\t\t\tif ( class_exists( $class ) ) {\r\n\t\t\t\t\t\t\t$css .= $class::add_css_generate( $atts );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$css .= $this->add_css_editor( $atts, $tag );\r\n\t\t\t\t}\r\n\t\t\t\tforeach ( $shortcodes[5] as $shortcode_content ) {\r\n\t\t\t\t\t$css .= $this->EcomeShortcodesCustomCss( $shortcode_content );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn $css;\r\n\t\t}", "title": "" } ]
[ { "docid": "019fe4635bede1b65a4335e87c57c6b7", "score": "0.6663534", "text": "function get_shortcode_inline_css($args){\n $style = '';\n foreach ($args as $key => $value) {\n $unit = array_key_exists( 'unit', $value ) ? $value['unit'] : null;\n if($value['value']) $style .= $value['attribute'].':'.$value['value'].$unit.';';\n }\n if($style) return 'style=\"'.$style.'\"';\n}", "title": "" }, { "docid": "8e3051a51424eaec5e0a4e7b6498446b", "score": "0.65444696", "text": "function parse_css($css){\n\tforeach($css as $subelement){\n\t\t$css=$subelement->wholeText;\n\t}\n\tpreg_match_all(\"/(.+?{.+?:.+?;.+?})/s\",$css,$matches);\n\tforeach($matches[0] as $css){\n\t\t$key=trim(substr($css,0,strpos($css,\"{\")));\n\t\tpreg_match(\"/{(.+?):(.+?);/s\",$css,$properties);\n\t\t$proparray[trim($properties[1])]=trim($properties[2]);\n\t\t$array[$key]=$proparray;\n\t}\n\treturn $array;\n}", "title": "" }, { "docid": "f4fe295670a74fbf125cddaa78373b46", "score": "0.64755315", "text": "function cactus_savepost_parse_shortcode_custom_css($post_id){\r\n\t\t$post = get_post( $post_id );\r\n\r\n\t\t$content = $post->post_content;\r\n\r\n\t\t$used_shortcodes = array();\r\n\t\t$replacements = array();\r\n\t\t$css = $this->cactus_parse_inlinecss($content, $used_shortcodes, $replacements);\r\n\t\t\r\n\t\t// list of meta fields which \"may\" contain shortcodes\r\n\t\t$metas = apply_filters('ct_shortcodes_parse_shortcode_custom_css_in_metas', array());\r\n\t\t\r\n\t\t$header_used_shortcodes = array();\r\n\t\t$header_replacements = array();\r\n\t\t$header_css = '';\r\n\t\t$header_contents = array();\r\n\t\t\t\r\n\t\tforeach($metas as $meta){\r\n\t\t\t// check if there is any shortcodes used in Post Meta\r\n\t\t\t$header_contents[$meta] = get_post_meta( $post_id, $meta, true);\r\n\r\n\t\t\t$header_used_shortcodes_temp = array();\r\n\t\t\t$header_replacements_temp = array();\r\n\t\t\t\r\n\t\t\t$header_css .= $this->cactus_parse_inlinecss($header_contents[$meta], $header_used_shortcodes_temp, $header_replacements_temp);\r\n\t\t\t\r\n\t\t\t$header_used_shortcodes = array_merge($header_used_shortcodes, $header_used_shortcodes_temp);\r\n\t\t\t$header_replacements[$meta] = $header_replacements_temp;\r\n\t\t}\r\n\t\t\r\n\t\t$css .= $header_css;\r\n\t\t$used_shortcodes = array_merge($used_shortcodes, $header_used_shortcodes);\r\n\r\n\t\tif ( empty( $css ) ) {\r\n\t\t\tdelete_post_meta( $post_id, '_cactus_shortcodes_custom_css' );\r\n\t\t} else {\r\n\t\t\tupdate_post_meta( $post_id, '_cactus_shortcodes_custom_css', $css );\r\n\t\t}\r\n\r\n\t\tif (count($used_shortcodes) > 0){\r\n\t\t\tupdate_post_meta( $post_id, '_cactus_shortcodes', $used_shortcodes );\r\n\t\t} else {\r\n\t\t\tdelete_post_meta( $post_id, '_cactus_shortcodes' );\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tforeach($replacements as $replace){\r\n\t\t\t$str = str_replace(array('/','(',')','$'),array('\\/','\\(','\\)','\\$'), $replace[0]); // in case there are '/' characters, need to put '\\' in front of them\r\n\t\t\t$rep = str_replace(array('/','(',')','$'),array('\\/','\\(','\\)','\\$'), $replace[1]); // in case there are '/' characters, need to put '\\' in front of them\r\n\t\t\t\r\n\t\t\t$content = preg_replace('/' . $str . '/', $rep, $content, 1);\r\n\t\t\t\r\n\t\t\t// then remove '\\'\r\n $content = str_replace('\\/', '/', $content);\r\n\t\t}\r\n\t\t\r\n\r\n\t\t$post->post_content = $content;\r\n\t\t\r\n\t\tforeach($header_replacements as $meta => $replaces){\r\n\t\t\t\r\n\t\t\tforeach($replaces as $replace){\r\n\t\t\t\t$str = str_replace(array('/','(',')','$'),array('\\/','\\(','\\)','\\$'), $replace[0]); // in case there are '/' characters, need to put '\\' in front of them\r\n\t\t\t\t$rep = str_replace(array('/','(',')','$'),array('\\/','\\(','\\)','\\$'), $replace[1]); // in case there are '/' characters, need to put '\\' in front of them\r\n\t\t\t\t\r\n\t\t\t\t$header_contents[$meta] = preg_replace('/' . $str . '/', $rep, $header_contents[$meta], 1);\r\n\t\t\t\t\r\n\t\t\t\t// then remove '\\'\r\n\t\t\t\t$header_contents[$meta] = str_replace('\\/', '/', $header_contents[$meta]);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tupdate_post_meta( $post_id, $meta, $header_contents[$meta] );\r\n\t\t}\r\n\t\t\r\n\t\t// unhook this function so it doesn't loop infinitely\r\n\t\tremove_action('save_post', array($this,'cactus_savepost_parse_shortcode_custom_css'), 9999, 1);\r\n\r\n\t\t// update the post, which calls save_post again\r\n\t\twp_update_post( $post );\r\n\r\n\t\t// re-hook this function\r\n\t\tadd_action('save_post', array($this,'cactus_savepost_parse_shortcode_custom_css'), 9999, 1);\r\n\t}", "title": "" }, { "docid": "5e2d624d6dccd914ff6ad053f85a4db2", "score": "0.6461714", "text": "function cactus_parse_inlinecss($content, &$used_shortcodes, &$replacements){\r\n\t\t$css = '';\r\n\t\t// check is $content has any shortcode contain a parameter, which value is a CSS string, ex \".class{property:value}\"\r\n\r\n\t\tpreg_match_all( '/' . get_shortcode_regex() . '/', $content, $shortcodes );\r\n\r\n\t\tforeach ( $shortcodes[2] as $index => $tag ) {\r\n\t\t\t\r\n\t\t\t$shortcode = cactus_get_shortcode_config( $tag );\r\n\r\n\t\t\tif($shortcode){\r\n\t\t\t\tarray_push($used_shortcodes, $tag);\r\n\t\t\t\t$attr_array = shortcode_parse_atts( trim( $shortcodes[3][ $index ] ) );\r\n\t\t\t\t\r\n\t\t\t\tif(isset($shortcode['class'])){\r\n\t\t\t\t\t$the_class = $shortcode['class'];\r\n\t\t\t\t\t$the_obj = new $the_class($attr_array, $shortcodes[5][ $index ]);\r\n\r\n\t\t\t\t\t$new_css = $the_obj->inlineCSSGenerator();\r\n\t\t\t\t\t\r\n\t\t\t\t\t$css .= $new_css;\r\n\r\n\t\t\t\t\t// replace the shortcode with new one (having generated id)\r\n\t\t\t\t\t$reg = array($tag . $shortcodes[3][$index], $tag . $the_obj->toString(true));\r\n\t\t\t\t\tif($new_css != ''){\r\n\t\t\t\t\t\tarray_push($replacements, $reg);\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// recursively parse inner content\r\n\t\tforeach ( $shortcodes[5] as $shortcode_content ) {\r\n\t\t\t$css .= $this->cactus_parse_inlinecss ( $shortcode_content, $used_shortcodes, $replacements );\r\n\t\t}\r\n\r\n\t\treturn $css;\r\n\t}", "title": "" }, { "docid": "becf1ef0e03da2fee32359ac2546638f", "score": "0.62789565", "text": "private function custom() {\n return Acf::field('Custom CSS')->id($this->id)->default('')->expect('string')->get();\n }", "title": "" }, { "docid": "af1ed1bd9d256552534582da8dde2afa", "score": "0.6263998", "text": "function stag_custom_css($content){\n $stag_values = get_option( 'stag_framework_values' );\n if( array_key_exists( 'style_custom_css', $stag_values ) && $stag_values['style_custom_css'] != '' ){\n $content .= '/* Custom CSS */' . \"\\n\";\n $content .= stripslashes($stag_values['style_custom_css']);\n $content .= \"\\n\\n\";\n }\n return $content;\n}", "title": "" }, { "docid": "860e8b56808ca992c9522bea464bc804", "score": "0.59167004", "text": "private function format_css(): string {\r\n return JKNCSS::tag('\r\n \r\n div.'.self::cl_iss_meta.' span {\r\n display: block;\r\n }\r\n\r\n span.'.self::cl_iss_name.' {\r\n font-size: 14px;\r\n }\r\n\r\n div.'.self::cl_iss_thumb.' {\r\n padding-top: 5px;\r\n }\r\n\r\n div.'.self::cl_iss_panel.' {\r\n text-align: center;\r\n }\r\n\r\n div.'.self::cl_iss_panel.' a {\r\n display: block;\r\n }\r\n\r\n div.'.self::cl_iss_panel.' a:hover {\r\n background-color: rgba(17,65,111,0.15);\r\n }\r\n \r\n ');\r\n }", "title": "" }, { "docid": "33753b0c15c61f37632727b432c6f95e", "score": "0.5910094", "text": "private function getCSS() {\n\n\t\t\t// No notices\n\t\t\t$css = '';\n\n\t\t\t// Must be an array\n\t\t\tif ( is_array( $this->value ) ) {\n\n\t\t\t\t// Enum array to parse values\n\t\t\t\tforeach ( $this->value as $id => $val ) {\n\n\t\t\t\t\t// Default selector data, so we always have current info\n\t\t\t\t\t$def_data = $this->data_from_default( $id );\n\n\t\t\t\t\t// Sanitize alpha\n\t\t\t\t\t$alpha = isset( $val['alpha'] ) ? $val['alpha'] : 1;\n\n\t\t\t\t\t// Sanitize color\n\t\t\t\t\t$color = isset( $val['color'] ) ? $val['color'] : '';\n\n\t\t\t\t\t// Only build rgba output if alpha ia less than 1\n\t\t\t\t\tif ( $alpha < 1 && $alpha <> '' ) {\n\t\t\t\t\t\t$color = Redux_Helpers::hex2rgba( $color, $alpha );\n\t\t\t\t\t}\n\n\t\t\t\t\t$important = isset( $def_data['important'] ) ? $def_data['important'] : false;\n\t\t\t\t\tif ( true == $important ) {\n\t\t\t\t\t\t$important = ' !important';\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$important = '';\n\t\t\t\t\t}\n\n\t\t\t\t\t// Sanitize selector\n\t\t\t\t\t$selector = isset( $def_data['selector'] ) ? $def_data['selector'] : '';\n\n\t\t\t\t\tif ( is_array( $selector ) ) {\n\t\t\t\t\t\tforeach ( $selector as $mode => $element ) {\n\t\t\t\t\t\t\tif ( $element <> '' && $color <> '' ) {\n\t\t\t\t\t\t\t\t$css .= $element . '{' . $mode . ': ' . $color . $important . ';}';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Santize mode, default to 'color'.\n\t\t\t\t\t\t$mode = isset( $def_data['mode'] ) ? $def_data['mode'] : 'color';\n\n\t\t\t\t\t\t// Only build value if selector is indicated\n\t\t\t\t\t\tif ( '' <> $selector && '' <> $color ) {\n\t\t\t\t\t\t\t$css .= $selector . '{' . $mode . ': ' . $color . $important . ';} ';\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\treturn $css;\n\t\t}", "title": "" }, { "docid": "8c6cad2e174e8427643355a6aa2445b4", "score": "0.5848053", "text": "abstract protected function constructCSS ();", "title": "" }, { "docid": "586df1af93943585ee409e18a799f91e", "score": "0.5826974", "text": "function CSS ($css) {\n\tfunction CSS_selector_decoder($select) {\n\t\t$css = htmlentities(trim($select[2]));\n\t\t$comment = '';\n\n\t\t$selector = '';\n\t\twhile (($cstart = strpos($css, '/*')) !== false) {\n\t\t\t$selector .= substr($css, 0, $cstart);\n\t\t\t$css = substr($css, $cstart+2);\n\n\t\t\t$cend = strpos($css, '*/');\n\n\t\t\t$comment .= '<element type=\"comment\">'.htmlentities(substr($css, 0, $cend)).'</element>';\n\t\t\t$css = substr($css, $cend+2);\n\t\t}\n\t\t$selector .= $css;\n\n\t\t$selector = trim($selector);\n\n\t\tif ($selector[0] == '@') {\n\t\t\tpreg_match('/@([^\\s]+)\\s*(.*)/sx',$selector, $match);\n\t\t\treturn $comment.$select[1].\"\\n\".'<element type=\"at\" name=\"'.$match[1].'\" params=\"'.$match[2].'\">';\n\n\t\t} else {\n\t\t\treturn $comment.$select[1].\"\\n\".'<element type=\"selector\" name=\"'.$selector.'\">';\n\t\t}\n\t}\n\n\t$xml = preg_replace_callback('/(\\;|^|{|}|\\s*)\\s*([^{};]*?)\\{/sx', 'CSS_selector_decoder', $css);\n\n\t$xml = preg_replace_callback('/@([^\\s]+)\\s(.*?);/', create_function('$select', 'return \\'<at name=\"\\'.$select[1].\\'\" params=\"\\'.$select[2].\\'\" />\\';'), $xml);\n\n\t$xml = preg_replace('/((\\:|\\+)[^;])*?\\}/', \"$1;}\", $xml);\n\n\t$xml = preg_replace('/\\;?\\s*\\}/', '</element>', $xml);\n\n\t$xml = '<'.'?xml version=\"1.0\" ?'.'>'.\"\\n\".'<css>'.$xml.'</css>';\n\n\t$xml = @simplexml_load_string($xml);\n\n\tif ($xml) $css = html_entity_decode(self::XMLtoCSS($xml->children()));\n\n\treturn $css;\n}", "title": "" }, { "docid": "854e6c9365fe23a1a2d2b4286e04b7ae", "score": "0.578668", "text": "function hypnotherapy_vc_get_css($css, $colors, $fonts, $scheme='') {\n\t\tif (isset($css['fonts']) && $fonts) {\n\t\t\t$css['fonts'] .= <<<CSS\n.vc_tta.vc_tta-accordion .vc_tta-panel-title .vc_tta-title-text {\n\t{$fonts['p_font-family']}\n}\n.vc_progress_bar.vc_progress_bar_narrow .vc_single_bar .vc_label .vc_label_units,\n.vc_progress_bar .vc_single_bar .vc_label .vc_label_units {\n\t{$fonts['h6_font-family']}\n}\n\n\n\nCSS;\n\t\t}\n\n\t\tif (isset($css['colors']) && $colors) {\n\t\t\t$css['colors'] .= <<<CSS\n\n/* Row and columns */\n.scheme_self.wpb_row,\n.scheme_self.wpb_column > .vc_column-inner > .wpb_wrapper,\n.scheme_self.wpb_text_column {\n\tcolor: {$colors['text']};\n\tbackground-color: {$colors['bg_color']};\n}\n.scheme_self.vc_row.vc_parallax[class*=\"scheme_\"] .vc_parallax-inner:before {\n\tbackground-color: {$colors['bg_color_08']};\n}\n\n/* Accordion */\n.wpb-js-composer .vc_tta.vc_tta-accordion .vc_tta-panel-heading .vc_tta-controls-icon {\n\tcolor: {$colors['text_link']};\n}\n\n.wpb-js-composer .vc_tta.vc_tta-accordion .vc_tta-panel-heading .vc_tta-controls-icon:before,\n.wpb-js-composer .vc_tta.vc_tta-accordion .vc_tta-panel-heading .vc_tta-controls-icon:after {\n\tborder-color: {$colors['text_link']};\n}\n\n.wpb-js-composer .vc_tta.vc_tta-accordion .vc_tta-panel-heading a:hover .vc_tta-controls-icon:before,\n.wpb-js-composer .vc_tta.vc_tta-accordion .vc_tta-panel-heading a:hover .vc_tta-controls-icon:after {\n\tborder-color: {$colors['inverse_text']};\n}\n\n.wpb-js-composer .vc_tta-color-grey.vc_tta-style-classic .vc_tta-panel .vc_tta-panel-title > a {\n\tcolor: {$colors['text_link']};\n\tbackground-color: {$colors['alter_bg_color']};\n}\n.wpb-js-composer .vc_tta-color-grey.vc_tta-style-classic .vc_tta-panel.vc_active .vc_tta-panel-title > a,\n.wpb-js-composer .vc_tta-color-grey.vc_tta-style-classic .vc_tta-panel .vc_tta-panel-title > a:hover {\n\tcolor: {$colors['inverse_text']};\n\tbackground-color: {$colors['text_link']};\n}\n.wpb-js-composer .vc_tta-color-grey.vc_tta-style-classic .vc_tta-panel.vc_active .vc_tta-panel-title > a .vc_tta-controls-icon,\n.wpb-js-composer .vc_tta-color-grey.vc_tta-style-classic .vc_tta-panel .vc_tta-panel-title > a:hover .vc_tta-controls-icon {\n\tborder-color: {$colors['inverse_link']};\n}\n.wpb-js-composer .vc_tta-color-grey.vc_tta-style-classic .vc_tta-panel.vc_active .vc_tta-panel-title > a .vc_tta-controls-icon:before,\n.wpb-js-composer .vc_tta-color-grey.vc_tta-style-classic .vc_tta-panel.vc_active .vc_tta-panel-title > a .vc_tta-controls-icon:after {\n\tborder-color: {$colors['inverse_link']};\n}\n\n.wpb-js-composer .vc_tta-color-white.vc_tta-style-classic .vc_tta-panel .vc_tta-panel-title > a {\n\tcolor: {$colors['text_link']};\n\tbackground-color: {$colors['inverse_text']};\n}\n.wpb-js-composer .vc_tta-color-white.vc_tta-style-classic .vc_tta-panel.vc_active .vc_tta-panel-title > a,\n.wpb-js-composer .vc_tta-color-white.vc_tta-style-classic .vc_tta-panel .vc_tta-panel-title > a:hover {\n\tcolor: {$colors['inverse_text']};\n\tbackground-color: {$colors['text_link']};\n}\n.wpb-js-composer .vc_tta-color-white.vc_tta-style-classic .vc_tta-panel.vc_active .vc_tta-panel-title > a .vc_tta-controls-icon,\n.wpb-js-composer .vc_tta-color-white.vc_tta-style-classic .vc_tta-panel .vc_tta-panel-title > a:hover .vc_tta-controls-icon {\n\tborder-color: {$colors['inverse_link']};\n}\n.wpb-js-composer .vc_tta-color-white.vc_tta-style-classic .vc_tta-panel.vc_active .vc_tta-panel-title > a .vc_tta-controls-icon:before,\n.wpb-js-composer .vc_tta-color-white.vc_tta-style-classic .vc_tta-panel.vc_active .vc_tta-panel-title > a .vc_tta-controls-icon:after {\n\tborder-color: {$colors['inverse_link']};\n}\n\n/* Tabs */\n.wpb-js-composer .vc_tta-color-grey.vc_tta-style-classic .vc_tta-tabs-list .vc_tta-tab > a {\n\tcolor: {$colors['text_link']};\n\tbackground-color: transparent;\n}\n.wpb-js-composer .vc_tta-color-grey.vc_tta-style-classic .vc_tta-tabs-list .vc_tta-tab > a:hover,\n.wpb-js-composer .vc_tta-color-grey.vc_tta-style-classic .vc_tta-tabs-list .vc_tta-tab.vc_active > a {\n\tcolor: {$colors['inverse_text']};\n\tbackground-color: {$colors['text_link']};\n}\n\n/* Separator */\n.vc_separator.vc_sep_color_grey .vc_sep_line {\n\tborder-color: {$colors['bd_color']};\n}\n\n/* Progress bar */\n.vc_progress_bar.vc_progress_bar_narrow .vc_single_bar {\n\tbackground-color: {$colors['inverse_text']};\n}\n.vc_progress_bar.vc_progress_bar_narrow.vc_progress-bar-color-bar_red .vc_single_bar .vc_bar {\n\tbackground-color: {$colors['alter_link']};\n}\n.vc_progress_bar.vc_progress_bar_narrow .vc_single_bar .vc_label {\n\tcolor: {$colors['text_dark']};\n}\n.vc_progress_bar.vc_progress_bar_narrow .vc_single_bar .vc_label .vc_label_units {\n\tcolor: {$colors['text_link']};\n}\n\n.vc_tta.vc_tta-shape-rounded .vc_tta-tabs-container{\n\tbackground-color: {$colors['inverse_text']};\n}\n\n\n.wpb-js-composer .vc_tta-color-grey.vc_tta-style-classic.vc_tta-tabs .vc_tta-panels,\n.wpb-js-composer .vc_tta-color-grey.vc_tta-style-classic.vc_tta-tabs .vc_tta-panels::after,\n.wpb-js-composer .vc_tta-color-grey.vc_tta-style-classic.vc_tta-tabs .vc_tta-panels::before{\n\tbackground-color: transparent;\n\tborder: none;\n}\n\n\nCSS;\n\t\t}\n\t\t\n\t\treturn $css;\n\t}", "title": "" }, { "docid": "2a134d50615d4b77380fee206bbda537", "score": "0.5771725", "text": "function laborator_get_custom_css( $ex = '' ) {\n\treturn Kalium_Custom_CSS::get( $ex );\n}", "title": "" }, { "docid": "4d8c3daf9f98075f0d7a6e78abaf2f61", "score": "0.57283896", "text": "private function processCSS()\n {\n // init vars\n $css = (string) $this->css;\n\n // remove newlines\n $css = str_replace(array(\"\\r\", \"\\n\"), '', $css);\n\n // replace double quotes by single quotes\n $css = str_replace('\"', '\\'', $css);\n\n // remove comments\n $css = preg_replace('|/\\*.*?\\*/|', '', $css);\n\n // remove spaces\n $css = preg_replace('/\\s\\s+/', ' ', $css);\n\n if ($this->excludeMediaQueries) {\n $css = preg_replace('/@media [^{]*{([^{}]|{[^{}]*})*}/', '', $css);\n }\n\n // rules are splitted by }\n $rules = (array) explode('}', $css);\n\n // init var\n $i = 1;\n\n // loop rules\n foreach ($rules as $rule) {\n // split into chunks\n $chunks = explode('{', $rule);\n\n // invalid rule?\n if (!isset($chunks[1])) {\n continue;\n }\n\n // set the selectors\n $selectors = trim($chunks[0]);\n\n // get cssProperties\n $cssProperties = trim($chunks[1]);\n\n // split multiple selectors\n $selectors = (array) explode(',', $selectors);\n\n // loop selectors\n foreach ($selectors as $selector) {\n // cleanup\n $selector = trim($selector);\n\n // build an array for each selector\n $ruleSet = array();\n\n // store selector\n $ruleSet['selector'] = $selector;\n\n // process the properties\n $ruleSet['properties'] = $this->processCSSProperties(\n $cssProperties\n );\n\n // calculate specificity\n $ruleSet['specificity'] = Specificity::fromSelector($selector);\n\n // remember the order in which the rules appear\n $ruleSet['order'] = $i;\n\n // add into global rules\n $this->cssRules[] = $ruleSet;\n }\n\n // increment\n $i++;\n }\n\n // sort based on specificity\n if (!empty($this->cssRules)) {\n usort($this->cssRules, array(__CLASS__, 'sortOnSpecificity'));\n }\n }", "title": "" }, { "docid": "2744a3ce590d7c1784ebb584438c52cf", "score": "0.5695183", "text": "public function custom_css( $css ) {\n\n\t\t// Append the user-entered dynamic CSS.\n\t\t$option = get_option( Fusion_Settings::get_option_name(), [] );\n\t\tif ( isset( $option['custom_css'] ) && ! empty( $option['custom_css'] ) ) {\n\t\t\t$css .= wp_strip_all_tags( $option['custom_css'] );\n\t\t}\n\n\t\treturn $css;\n\n\t}", "title": "" }, { "docid": "f4416a37160bf0c6ae23b009e1981edb", "score": "0.5683338", "text": "function mixtape_qodef_vc_custom_style() {\n if(mixtape_qodef_visual_composer_installed()) {\n $id = mixtape_qodef_get_page_id();\n if(is_page() || is_single()) {\n\n $shortcodes_custom_css = get_post_meta( $id, '_wpb_shortcodes_custom_css', true );\n if ( ! empty( $shortcodes_custom_css ) ) {\n echo '<style type=\"text/css\" data-type=\"vc_shortcodes-custom-css-'.esc_attr($id).'\">';\n echo get_post_meta( $id, '_wpb_shortcodes_custom_css', true );\n echo '</style>';\n }\n\n $post_custom_css = get_post_meta( $id, '_wpb_post_custom_css', true );\n if ( ! empty( $post_custom_css ) ) {\n echo '<style type=\"text/css\" data-type=\"vc_custom-css-'.esc_attr($id).'\">';\n echo get_post_meta( $id, '_wpb_post_custom_css', true );\n echo '</style>';\n }\n }\n }\n }", "title": "" }, { "docid": "9a1c6fa2dae8e314bef6f7859862df96", "score": "0.5627318", "text": "public function getCss(){\n\t\treturn $this->trim('\n\t\t\tbody {\n\t\t\t\tfont-size: 12px;\n\t\t\t\tcolor: #222;\n\t\t\t\tbackground: #fff;\n\t\t\t\tfont-family: \"Helvetica Neue\", Arial, Helvetica, sans-serif;\n\t\t\t}\n\t\t\t\n\t\t\ta img { border: 0; }\n\t\t\t\n\t\t\th1 { font-weight: normal; color: #111; }\n\t\t\th1 { font-size: 2em; line-height: 1; margin-bottom: 0.5em; }\n\t\t\t\n\t\t\t.error,\n\t\t\t.notice,\n\t\t\t.success { margin: 1em 0; padding: .8em; border: 2px solid #ddd; }\n\t\t\t \n\t\t\t.fail { color: #8a1f11; font-weight: bold; line-height: 20px; padding-left: 1.2em; }\n\t\t\t\n\t\t\t.error { background: #FBE3E4; color: #8a1f11; border-color: #FBC2C4; }\n\t\t\t.notice { background: #FFF6BF; color: #514721; border-color: #FFD324; }\n\t\t\t.success { background: #E6EFC2; color: #264409; border-color: #C6D880; }\n\t\t\t.error a { color: #8a1f11; }\n\t\t\t.notice a { color: #514721; }\n\t\t\t.success a { color: #264409; }\n\t\t');\n\t}", "title": "" }, { "docid": "4b572b8359a5162c589ed1bd7ce99824", "score": "0.5590983", "text": "function adace_shoppable_amp_load_css() {\n\t$css = '';\n\t$css .= file_get_contents( esc_url( trailingslashit( adace_get_plugin_dir() ) . 'includes/shoppable-images/assets/css/shoppable-images-front.amp.min.css' ) );\n\tif ( is_single() ) {\n\t\tglobal $post;\n\t\tif ( has_shortcode( $post->post_content, 'adace_shoppable_image' ) ) {\n\t\t\tif ( preg_match_all( '/' . get_shortcode_regex() . '/s', $post->post_content, $matches, PREG_SET_ORDER ) ) {\n\t\t\t\tforeach ( $matches as $shortcode ) {\n\t\t\t\t\tif ( 'adace_shoppable_image' === $shortcode[2] ) {\n\t\t\t\t\t\t$shortcode = do_shortcode( $shortcode[0] );\n\t\t\t\t\t\tpreg_match_all( '/<style scoped=\"scoped\">(.*?)<\\/style>/s', $shortcode, $shortcode_style, PREG_SET_ORDER );\n\t\t\t\t\t\tif ( isset( $shortcode_style[0][1] ) ) {\n\t\t\t\t\t\t\t$css .= $shortcode_style[0][1];\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\techo( $css );\n}", "title": "" }, { "docid": "158a1e678b5f7b8e78c33b1573bb94ba", "score": "0.5587374", "text": "public function css($name);", "title": "" }, { "docid": "e7af0dc9ea42d2f1dd1551dd94af9155", "score": "0.55729514", "text": "public function _css_() {\n\n\t\t$args = func_get_args();\n\t\t$args_num = func_num_args();\n\t\t$css = '';\n\n\t\tif ( $args_num === 1 ) {\n\t\t\t$css .= ltrim( rtrim( $args[0], ';' ), ';' );\n\t\t} elseif ( $args_num === 2 ) {\n\t\t\t$css .= \"{$args['0']}:{$args['1']};\";\n\t\t}\n\n\t\tif ( empty( $this->options['attrs']['style'] ) ) {\n\t\t\t$this->options['attrs']['style'] = '';\n\t\t}\n\n\t\t$this->options['attrs']['style'] .= \";{$css};\";\n\t\t$this->options['attrs']['style'] = preg_replace( '/(^;)|(;$)|(;{,1})/', '', $this->options['attrs']['style'] );\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "bf4fa8255df4cb9824e8a3955f1a0500", "score": "0.5550403", "text": "private function rebuildInlineCSSFromArray(array $parsed_style){\n $new_style_arr= [];\n foreach($parsed_style as $key=>$value){\n $new_style_arr[]=\"{$key}:{$value}\";\n }\n return \"style=\\\"\".implode(';',$new_style_arr).\"\\\"\";\n }", "title": "" }, { "docid": "c17db3aafbf0864805f64c403ce78c7e", "score": "0.55474275", "text": "function obtenerCSS () {\n\t\treturn $this->css;\n\t}", "title": "" }, { "docid": "32a5eebffd93398732c0a3fd5b469927", "score": "0.55451304", "text": "public function getCss(){ }", "title": "" }, { "docid": "fc9148c6c6ea7df0329441fb3cfc79e3", "score": "0.5542909", "text": "function trimCSS($stylestr) {\r\n // look for CSS blocks\r\n $reg = '/[\\s]*[a-zA-Z0-9\\.# -_:@\\s,]+\\{[^\\}]+\\}/' ;\r\n preg_match_all($reg, $stylestr, $css) ;\r\n $css = $css[0] ;\r\n $output = '' ;\r\n // loop over the css blocks and find the styles with colors\r\n foreach ($css as $val) {\r\n $trim = $this->trimCSS1($val) ;\r\n if ($trim != '') $output .= trim($trim) . \"\\n\" ;\r\n }\r\n return $output ;\r\n }", "title": "" }, { "docid": "db85eb5832e765d304eaefe0e81d33d0", "score": "0.5540632", "text": "function extract_css() {\n\techo \"\n\t<style type='text/css'>\n\t#extract {\n\t\tposition: absolute;\n\t\ttop: 3.6em;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\tright: 10px;\n\t\tfont-size: 10px;\n\t\tcolor: #d5c5c5;\n\t}\n\t</style>\n\t\";\n}", "title": "" }, { "docid": "5059ea3749768e03640fb9b05948a396", "score": "0.5520637", "text": "private function createStyleFromString($string)\n {\n if (isset($this->styles[$string])) {\n return $this->styles[$string];\n }\n\n if (!preg_match_all('/([^=]+)=([^;]+)(;|$)/', strtolower($string), $matches, PREG_SET_ORDER)) {\n return false;\n }\n\n $style = new OutputFormatterStyle();\n foreach ($matches as $match) {\n array_shift($match);\n\n if ('fg' == $match[0]) {\n $style->setForeground($match[1]);\n } elseif ('bg' == $match[0]) {\n $style->setBackground($match[1]);\n } else {\n try {\n $style->setOption($match[1]);\n } catch (\\InvalidArgumentException $e) {\n return false;\n }\n }\n }\n\n return $style;\n }", "title": "" }, { "docid": "f1876849272ffa021c82fc047a25b4ff", "score": "0.54891866", "text": "function dynamic_maths_shortcodes_styles() {\n \n wp_enqueue_style(\n 'shortcodes-style',\n DYNAMIC_MATHS_URL . 'includes/shortcodes/shortcodes.css',\n [],\n time(),\n \n );\n}", "title": "" }, { "docid": "fd8630fa7b08a513e0d4a2b2012dc180", "score": "0.5472959", "text": "public function css($query);", "title": "" }, { "docid": "ee731442386c07e03640923e4f3e5dec", "score": "0.5465555", "text": "private function tidy_css( $css ) {\n\n $selector = apply_filters( \"metaslider_theme_editor_css_selector\", $this->get_default_css_selector(), $this->slider_id );\n\n // remove all spaces\n $css = str_replace( \" \", \"\", $css );\n\n // remove all line breaks\n $css = str_replace( \"\\n\", \"\", $css );\n\n // remove all tabs\n $css = str_replace( \"\\t\", \"\", $css );\n\n // add a blank line between each selector\n $css = str_replace( \"}\", \"\\n\\t}\\n\", $css );\n\n // break each selector onto a new line\n $css = str_replace( \"[metaslider]\", \"\\n\\t{$selector}\", $css );\n\n // break each rule onto a new line\n $css = str_replace( \";\", \";\\n\\t\\t\", $css );\n\n // break each set of rules onto a new line\n $css = str_replace( \"{\", \"{\\n\\t\\t\", $css );\n\n // clean up blank lines\n $css = str_replace( \"\\t\\t\\n\", \"\", $css );\n\n return \"\\n\" . $css;\n }", "title": "" }, { "docid": "c98b851d886aa9e305b3711d56c258ca", "score": "0.5434458", "text": "private function _getCustomCSS( $data ) {\n if ( is_array($data) === false ) { return ''; }\n $SiteUrl = NoNull($data['protocol'] . '://' . $data['HomeURL'] . '/themes/' . $data['location']);\n $rVal = '';\n\n if ( NoNull($data['font-family'], 'auto') != 'auto' ) {\n $rVal .= tabSpace(2) . '<link rel=\"stylesheet\" type=\"text/css\" href=\"' . $SiteUrl . '/css/font-' . NoNull($data['font-family'], 'auto') . '.css?ver=' . CSS_VER . '\">' . \"\\r\\n\";\n }\n\n // Return the Additional CSS If Any Exists\n return $rVal;\n }", "title": "" }, { "docid": "06c00c6f1d6a0461cedb45cec1440aa7", "score": "0.54321635", "text": "public function parse($file) {\n\t return $this->sass->toCss($file);\n\t}", "title": "" }, { "docid": "06c00c6f1d6a0461cedb45cec1440aa7", "score": "0.54321635", "text": "public function parse($file) {\n\t return $this->sass->toCss($file);\n\t}", "title": "" }, { "docid": "b624adef9ecfe92ea42e5ef22f742390", "score": "0.5428177", "text": "public final function getCustomCSS()\n {\n return $this->css;\n }", "title": "" }, { "docid": "c39e13598dfa318e8847e993a7c2d470", "score": "0.5427543", "text": "public static function post_process()\n\t{\n\t\t# These will break the xml, so we'll transform them for now\n\t\tScaffold::$css->convert_entities('encode');\n\t\t$xml = self::to_xml(Scaffold::$css->string); # Webligo - PHP5.1 compat\n\t\t$css = \"\";\n\n\t\tforeach($xml->children() as $key => $value)\n\t\t{\n\t\t\t$attributes = (array)$value->attributes();\n\t\t\t$attributes = $attributes['@attributes'];\n\t\n\t\t\t/*\n\t\t\t\tComments are given the same <property> node as actual properties\n\t\t\t\tso that they are output next to their respective property in a list\n\t\t\t\trather than being all put together at the end of the list.\n\t\t\t\tSo we need to search for these properties as well as the normal rules.\n\t\t\t*/\n\t\t\tif($key == 'property')\n\t\t\t{\n\t\t\t\tif($attributes['name'] == 'comment')\n\t\t\t\t{\t\t\n\t\t\t\t\t$css .= self::parse_comment($attributes['value']);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t\tImports should be at the root level, so we'll assume they are.\n\t\t\t\tIf they're nested inside a rule, they'll just be ignored.\n\t\t\t*/\n\t\t\telseif($key == 'import')\n\t\t\t{\n\t\t\t\t$imports[] = array\n\t\t\t\t(\n\t\t\t\t\t'url' => $attributes['url'],\n\t\t\t\t\t'media' => $attributes['media']\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t\tOtherwise it's just a rule\n\t\t\t*/\n\t\t\telse\n\t\t\t{\n\t\t\t\t$css .= self::parse_rule($value);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(isset($imports))\n\t\t{\n\t\t\tforeach(array_reverse($imports) as $import)\n\t\t\t{\n\t\t\t\t$css = \"@import '{$import['url']}' \" . $import['media'] . \";\" . $css;\n\t\t\t}\n\t\t}\n\n\t\tScaffold::$css->string = str_replace('#NEWLINE#', \"\\n\", $css);\n\t\tScaffold::$css->convert_entities('decode');\n\t}", "title": "" }, { "docid": "5c1369f544e9a5182a4136d97738658f", "score": "0.5417663", "text": "public function css_to_array($css) {\n\n\t\twhile (strpos($css, '/*') !== false) {\n\n\t\t\tif (strpos($css, '*/') === false) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$start = strpos($css, '/*');\n\t\t\t$end = strpos($css, '*/') + 2;\n\t\t\t$css = str_replace(substr($css, $start, $end - $start), '', $css);\n\t\t}\n\n\t\t//preg_match_all('/(?ims)([a-z0-9\\s\\.\\:#_\\-@]+)\\{([^\\}]*)\\}/', $css, $arr);\n\t\tpreg_match_all('/(?ims)([a-z0-9\\,\\s\\.\\:#_\\-@]+)\\{([^\\}]*)\\}/', $css, $arr);\n\n\t\t$result = [];\n\n\t\tforeach ($arr[0] as $i => $x) {\n\t\t\t$selector = trim($arr[1][$i]);\n\n\t\t\tif (strpos($selector, '{') !== false || strpos($selector, '}') !== false) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$rules = explode(';', trim($arr[2][$i]));\n\t\t\t$result[$selector] = [];\n\n\t\t\tforeach ($rules as $strRule) {\n\n\t\t\t\tif (!empty($strRule)) {\n\t\t\t\t\t$rule = explode(':', $strRule);\n\t\t\t\t\t//does not work if in css is another { or }\n\t\t\t\t\t//if(strpos($rule[0], '{') !== false || strpos($rule[0], '}') !== false || strpos($rule[1], '{') !== false || strpos($rule[1], '}') !== false) return false;\n\n\t\t\t\t\t//put back everything but not $rule[0];\n\t\t\t\t\t$key = trim($rule[0]);\n\t\t\t\t\tunset($rule[0]);\n\t\t\t\t\t$values = implode(':', $rule);\n\n\t\t\t\t\t$result[$selector][trim($key)] = trim(str_replace(\"'\", '\"', $values));\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "8eac634dfec1aa809f5f3434a833c02e", "score": "0.5415702", "text": "public function get_css() {\n\t\tglobal $wp_customize;\n\n\t\t$css = '';\n\n\t\t$this->plugin->customize_register( $wp_customize );\n\n\t\tforeach ( $this->plugin->customize->get_settings() as $group => $elements ) {\n\t\t\tforeach ( $elements as $element ) {\n\t\t\t\tif ( $class = Styles_Helpers::get_element_class( $element ) ) {\n\n\t\t\t\t\t$element = apply_filters( 'styles_pre_get_css', $element );\n\t\t\t\t\t$control = new $class( $group, $element );\n\n\t\t\t\t\t$css .= $control->get_css();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$css = apply_filters( 'styles_css_output', $css );\n\t\n\t\t$css = implode( '', $this->google_fonts ) . $css;\n\n\t\t$css = $this->minify( $css );\n\n\t\tupdate_option( Styles_Helpers::get_option_key( 'css' ), $css );\n\n\t\treturn $css;\n\n\t}", "title": "" }, { "docid": "e23c8327aed83ab9e5de47d27a1c98fd", "score": "0.5415084", "text": "function abs_set_customcss($css, $customcss) {\n $tag = '[[setting:customcss]]';\n $replacement = $customcss;\n if (is_null($replacement)) {\n $replacement = '';\n }\n $css = str_replace($tag, $replacement, $css);\n return $css;\n}", "title": "" }, { "docid": "403010295add3d19c19e6650c1cc0177", "score": "0.5401758", "text": "public function css()\n\t{\n\t\t$this->type = 'css';\n\t\treturn $this->_run();\n\t}", "title": "" }, { "docid": "dc63231d83527d8390941251a29e4780", "score": "0.5398932", "text": "private function getCSS () {\n\t\tif (empty ($this->css_output)) {\n\t\t\t$this->css_output = $this->constructCSS ();\n\t\t}\n\t\t\n\t\treturn ($this->css_output);\n\t}", "title": "" }, { "docid": "52e88caf2d4749fb0afc1577ef385746", "score": "0.53854483", "text": "function theme_glostest_set_customcss($css, $customcss) {\n $tag = '[[setting:customcss]]';\n $replacement = $customcss;\n if (is_null($replacement)) {\n $replacement = '';\n }\n $css = str_replace($tag, $replacement, $css);\n return $css;\n}", "title": "" }, { "docid": "22863090329ff0c787ebb5109172c267", "score": "0.53708816", "text": "public function css($code) {\n\t\t$minifier = new Minify\\CSS($code);\n\t\treturn $minifier->minify();\n\t}", "title": "" }, { "docid": "86f4bf0315e7ffdb7130797d2cb427cb", "score": "0.5368538", "text": "function shortcode_styles( $styles ) {\r\n\t\t\tglobal $mpc_massive_styles;\r\n\t\t\t$css_id = uniqid( 'mpc_connected_icons-' . rand( 1, 100 ) );\r\n\t\t\t$style = '';\r\n\r\n\t\t\t// Add 'px'\r\n\t\t\t$styles[ 'lines_weight' ] = $styles[ 'lines_weight' ] != '' ? $styles[ 'lines_weight' ] . ( is_numeric( $styles[ 'lines_weight' ] ) ? 'px' : '' ) : '';\r\n\t\t\t$styles[ 'lines_gap' ] = $styles[ 'lines_gap' ] != '' ? $styles[ 'lines_gap' ] . ( is_numeric( $styles[ 'lines_gap' ] ) ? 'px' : '' ) : '';\r\n\t\t\t$styles[ 'gap' ] = $styles[ 'gap' ] != '' ? $styles[ 'gap' ] . ( is_numeric( $styles[ 'gap' ] ) ? 'px' : '' ) : '';\r\n\r\n\t\t\tif( $styles[ 'layout' ] == 'horizontal' ) {\r\n\t\t\t\t$side = 'top';\r\n\t\t\t} else {\r\n\t\t\t\t$side = 'left';\r\n\t\t\t}\r\n\r\n\t\t\t$inner_styles = array();\r\n\t\t\tif ( $styles[ 'lines_style' ] ) { $inner_styles[] = 'border-' . $side . '-style:' . $styles[ 'lines_style' ] . ';'; }\r\n\t\t\tif ( $styles[ 'lines_color' ] ) { $inner_styles[] = 'border-' . $side . '-color:' . $styles[ 'lines_color' ] . ';'; }\r\n\t\t\tif ( $styles[ 'lines_weight' ] ) { $inner_styles[] = 'border-' . $side . '-width:' . $styles[ 'lines_weight' ] . ';'; }\r\n\t\t\tif ( $styles[ 'lines_gap' ] ) { $inner_styles[] = 'margin-' . $side . ':' . $styles[ 'lines_gap' ] . ';'; }\r\n\r\n\t\t\tif ( count( $inner_styles ) > 0 ) {\r\n\t\t\t\t$style .= '.mpc-connected-icons[id=\"' . $css_id . '\"] .mpc-connected-icons__line > span {';\r\n\t\t\t\t\t$style .= join( '', $inner_styles );\r\n\t\t\t\t$style .= '}';\r\n\t\t\t}\r\n\r\n\t\t\tif ( $styles[ 'gap' ] ) {\r\n\t\t\t\t$style .= '.mpc-connected-icons[id=\"' . $css_id . '\"] .mpc-connected-icons__item {';\r\n\t\t\t\t\t$style .= 'padding: ' . ( $side == 'left' ? $styles[ 'gap' ] . ' 0' : '0 ' . $styles[ 'gap' ] ) . ';';\r\n\t\t\t\t$style .= '}';\r\n\r\n\t\t\t\tif( $side != 'left' ) {\r\n\t\t\t\t\t$style .= '.mpc-connected-icons[id=\"' . $css_id . '\"] {';\r\n\t\t\t\t\t\t$style .= 'margin: 0 -' . $styles[ 'gap' ] . ';';\r\n\t\t\t\t\t$style .= '}';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$mpc_massive_styles .= $style;\r\n\r\n\t\t\treturn array(\r\n\t\t\t\t'id' => $css_id,\r\n\t\t\t\t'css' => $style,\r\n\t\t\t);\r\n\t\t}", "title": "" }, { "docid": "c6efb36db87005a1af402eebd4c1a0f1", "score": "0.5365846", "text": "public function getCssVariables();", "title": "" }, { "docid": "fa8ab986b571348b3a14a9c09d693d57", "score": "0.53591186", "text": "function fusion_builder_custom_css() {\n\tglobal $post;\n\n\t// Early exit if $post is not defined\n\tif ( is_null( $post ) ) {\n\t\treturn;\n\t}\n\n\t$saved_custom_css = esc_attr( get_post_meta( $post->ID, '_fusion_builder_custom_css', true ) );\n\n\tif ( isset( $saved_custom_css ) && '' != $saved_custom_css ) : ?>\n\t\t<style type=\"text/css\"><?php echo stripslashes_deep( $saved_custom_css ); ?></style>\n\t<?php endif;\n\n}", "title": "" }, { "docid": "17dd7970f0e00b28bf595ac99e3cad60", "score": "0.5341188", "text": "private function customCssStyles($customCss) {\n echo \"\\n\\n <!-- Additional CSS styles -->\";\n foreach ($customCss as $currentCss) {\n echo \"\\n <link href=\\\"\" . $currentCss . \"\\\" rel=\\\"stylesheet\\\">\";\n }\n }", "title": "" }, { "docid": "831407105757cd83772a41f7963db414", "score": "0.53083766", "text": "function ot_type_css( $args = array() ) {\n extract( $args );\n\n /* verify a description */\n $has_desc = $field_desc ? true : false;\n \n /* format setting outer wrapper */\n echo '<div class=\"format-setting type-css simple ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . '\">';\n \n /* description */\n echo $has_desc ? '<div class=\"description\">' . htmlspecialchars_decode( $field_desc ) . '</div>' : '';\n \n /* format setting inner wrapper */\n echo '<div class=\"format-setting-inner\">';\n\n /* build textarea for CSS */\n echo '<textarea class=\"hidden\" id=\"textarea_' . esc_attr( $field_id ) . '\" name=\"' . esc_attr( $field_name ) .'\">' . esc_attr( $field_value ) . '</textarea>';\n\n /* build pre to convert it into ace editor later */\n echo '<pre class=\"ot-css-editor ' . esc_attr( $field_class ) . '\" id=\"' . esc_attr( $field_id ) . '\">' . esc_textarea( $field_value ) . '</pre>';\n\n echo '</div>';\n\n echo '</div>';\n \n }", "title": "" }, { "docid": "c14f506d8010fc82e007b37784511cf3", "score": "0.5298824", "text": "function ct_vc_shortcode_css_class( $class_string, $tag, $atts ) {\n\tif ($tag =='vc_row' || $tag =='vc_row_inner') {\n if ( strpos($class_string, 'inner-container') === false ) {\n\t\t$class_string = str_replace('vc_row-fluid', 'row', $class_string);\n }\n }\n if ( $tag == 'vc_row_inner' ) {\n\t\tif ( !empty( $atts['add_clearfix'] ) ) {\n\t\t\t$class_string .= ' add-clearfix';\n\t\t}\n\t}\n\n\tif ($tag =='vc_column' || $tag =='vc_column_inner') {\n\t\tif ( !(function_exists('vc_is_inline') && vc_is_inline()) ) {\n if( preg_match('/vc_col-(\\w{2})-(\\d{1,2})/', $class_string) ) {\n $class_string = str_replace('vc_column_container', '', $class_string);\n }\n\t\t\t$class_string = preg_replace('/vc_col-(\\w{2})-(\\d{1,2})/', 'col-$1-$2', $class_string);\n\t\t\t$class_string = preg_replace('/vc_hidden-(\\w{2})/', 'hidden-$1', $class_string);\n\t\t}\n\t}\n\n\treturn $class_string;\n}", "title": "" }, { "docid": "f408deab5db8e514ff3a2850e95a9d18", "score": "0.5295175", "text": "function text_color( $atts , $content=null ) {\n\textract( shortcode_atts(\n\t\tarray('color'=>'black',\n\t\t\t), $atts )\n\t);\n\treturn '<div class=\"section '.$color.'\">'.$content.'</div>';\n\n}", "title": "" }, { "docid": "0c3a8d438709f4c8c495a9e2ce01f53f", "score": "0.5293647", "text": "function background_change_head_style($string){\n $css = '<link href=\"'.WWW.'plugins/Background_Change/bg_change.css\" type=\"text/css\" rel=\"stylesheet\" />';\n return $string.$css;\n}", "title": "" }, { "docid": "e4df3db4c5eb3c9c581a1f01d8f22475", "score": "0.5287118", "text": "public function load_editor_css() {\n\n\t\tif ( isset( $_GET['bf-editor-shortcodes'] ) ) {\n\n\t\t\t@header( 'Content-Type: text/css; charset=UTF-8' );\n\n\t\t\tob_start();\n\n\t\t\t// IF post ID was bigger than 0 == valid post\n\t\t\tif ( intval( $_GET['bf-editor-shortcodes'] ) > 0 ) {\n\t\t\t\tif ( ! empty( self::$config['editor-style'] ) ) {\n\t\t\t\t\t@include self::$config['editor-style'];\n\t\t\t\t} else {\n\t\t\t\t\tinclude self::path( '/assets/css/editor-style.php' );\n\t\t\t\t}\n\n\t\t\t\t// Injects dynamics generated CSS codes from PHP files outside of library\n\t\t\t\tif ( ! empty( self::$config['editor-dynamic-style'] ) ) {\n\n\t\t\t\t\tif ( is_array( self::$config['editor-dynamic-style'] ) ) {\n\n\t\t\t\t\t\tforeach ( self::$config['editor-dynamic-style'] as $_file ) {\n\t\t\t\t\t\t\t@include $_file;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\t@include self::$config['editor-dynamic-style'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t$output = ob_get_clean();\n\t\t\t$fonts = '';\n\n\t\t\t// Move all @import to the beginning of generated CSS\n\t\t\t{\n\t\t\t\tpreg_match_all( '/@import .*/', $output, $matched );\n\n\t\t\t\tif ( ! empty( $matched[0] ) ) {\n\t\t\t\t\tforeach ( $matched[0] as $item ) {\n\t\t\t\t\t\t$fonts .= $item . \"\\n\\n\";\n\n\t\t\t\t\t\t$output = str_replace( $item, '', $output );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\techo $fonts;\n\t\t\techo $output;\n\n\t\t\texit;\n\t\t}\n\n\t}", "title": "" }, { "docid": "7450349c1f8c78bacca77bb16a4793bb", "score": "0.52732515", "text": "function style($input) {\n\t\t$input = stringSplit($input); //Need to prep for propernoun DP\n\t\t$modified = str_split($input[0]);\n\t\tif($modified[count($modified) - 1] == \"s\"){ //Updated trimming DP\n\t\t\t$input[0] = rtrim(implode(\"\", $modified), \"s\");\n\t\t}\n\t\t$query = qGetAll('styles');\n\n\t\twhile($row = mysql_fetch_array($query)){\n\t\t\t$style = $row['stylename'];\n\t\t\tif($input[0] == $style) {\n\t\t\t\t$GLOBALS['style'] = $style;\n\t\t\t\treturn pop($input);\n\t\t\t\t}\n\t\t}\n\t\treturn NULL;\n\t}", "title": "" }, { "docid": "baf71795a6fd8ae3fd42847c4cc4095a", "score": "0.5273135", "text": "public static function getCSS() {\n\t\t$css =\n'<style type=\"text/css\">\n\tinput[type=\"radio\"], input[type=\"checkbox\"] {\n\t\twidth: auto;\n\t}\n\t/* Slide fieldsets*/\n\tdiv.panel-body legend {\n\t\tbackground: transparent url(\"' . rex_addon::get('d2u_helper')->getAssetsUrl('arrows.png') . '\") no-repeat 0px 7px;\n\t\tpadding-left: 19px;\n\t}\n\tdiv.panel-body legend.open {\n\t\tbackground-position: 0px -36px;\n\t}\n\t.panel-body-wrapper.slide {\n\t\tdisplay: none;\n\t}\n\tinput:required, select:required, textarea:required {\n\t\tbackground-color: pink;\n\t}\n</style>';\n\t\treturn $css;\n\t}", "title": "" }, { "docid": "d872220bed6097f418f5de2bf9ca6cef", "score": "0.52676964", "text": "function wps_gallery_style( $css ) {\n\treturn preg_replace( \"!<style type='text/css'>(.*?)</style>!s\", '', $css );\n}", "title": "" }, { "docid": "20514bf0e67369557ae1c12bcb13ab07", "score": "0.5265767", "text": "public function createCSS($css) {\n\t\t\n\t}", "title": "" }, { "docid": "6fd746177d1c11e58882c451b157e131", "score": "0.5262586", "text": "function add_raw_css($css){\n\t\t$this->raw_css .= ' '.$css;\n\t}", "title": "" }, { "docid": "587adc4fe5def09d3af9b6977f55ee76", "score": "0.5257505", "text": "function hestia_get_inline_style( $control_name, $function_name, $custom_css ) {\n\t$control_value = get_theme_mod( $control_name );\n\tif ( hestia_is_json( $control_value ) ) {\n\t\t$control_value = json_decode( $control_value, true );\n\t\tif ( ! empty( $control_value ) ) {\n\t\t\tforeach ( $control_value as $key => $value ) {\n\t\t\t\t$custom_css .= call_user_func( $function_name, $value, $key );\n\t\t\t}\n\t\t}\n\t} else {\n\t\t$custom_css .= call_user_func( $function_name, $control_value );\n\t}\n\treturn $custom_css;\n}", "title": "" }, { "docid": "2a4f21c778639310f283d4a7102d190b", "score": "0.5252551", "text": "public function getCssList()\n {\n $config = $this->getConfig();\n return $config['options']['customStyles']['names'];\n }", "title": "" }, { "docid": "6d55fc55a25ea863cc0bd6bcd696c602", "score": "0.52451766", "text": "function register_custom_css( $fields ) {\n\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "d33f90af77ee45152b706b45962f391b", "score": "0.52432644", "text": "public function getCss()\n {\n return $this->getCssCode('/izi-toast/1.1.1/iziToast.min.css');\n }", "title": "" }, { "docid": "b520b961b9231516730a31ecadbb757d", "score": "0.5224451", "text": "function get_css_block(){\n\t\treturn \"\\n.\".$this->get_name().\"{background:url(\".$this->url.\") center center no-repeat;}\";\n\t}", "title": "" }, { "docid": "144168509803033ab1c4d765d4f08201", "score": "0.52191514", "text": "function phorum_mod_spamhurdles_css_register($data)\n{\n if ($data['css'] != 'css') return $data;\n\n $data['register'][] = array(\n \"module\" => \"spamhurdles\",\n \"where\" => \"after\",\n \"source\" => \"file(mods/spamhurdles/spamhurdles.css)\"\n );\n return $data;\n}", "title": "" }, { "docid": "3658a4c9221ebd140b2c56a02cec59b7", "score": "0.5217032", "text": "private function parseStyle($style){\n $cleaned_style_value = $this->cleanStyleValue($style);\n $style_arr = array_filter(explode(';',$cleaned_style_value));\n $keyValArr = [];\n foreach($style_arr as $style){\n try{//try-catch or check if index 1 is exists\n list($key,$value) = explode(':',$style);\n $keyValArr[trim($key)] = trim($value);\n }catch(\\Exception $e){}\n }\n return $keyValArr;\n }", "title": "" }, { "docid": "5cebaa45e35a470fd15388ba9dd012dd", "score": "0.5196664", "text": "public function admin_get_frm_style() {\n\t\t\t$css = array();\n\n\t\t\tif( isset($this->cfg['freamwork-css-files'])\n\t\t\t\t&& is_array($this->cfg['freamwork-css-files'])\n\t\t\t\t&& !empty($this->cfg['freamwork-css-files'])\n\t\t\t) {\n\n\t\t\t\tforeach ($this->cfg['freamwork-css-files'] as $key => $value){\n\t\t\t\t\tif( is_file($this->cfg['paths']['freamwork_dir_path'] . $value) ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$cssId = $this->alias . '-' . $key;\n\t\t\t\t\t\t$css[\"$cssId\"] = $this->cfg['paths']['freamwork_dir_path'] . $value;\n\t\t\t\t\t\t// wp_enqueue_style( $this->alias . '-' . $key, $this->cfg['paths']['freamwork_dir_url'] . $value );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->errors->add( 'warning', __('Invalid CSS path to file: <strong>' . $this->cfg['paths']['freamwork_dir_path'] . $value . '</strong>. Call in:' . __FILE__ . \":\" . __LINE__ , $this->localizationName) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $css;\n\t\t}", "title": "" }, { "docid": "c9f24bbc2881e3871838feb0cc4b1b48", "score": "0.5185908", "text": "private function get_styles_from_input()\n {\n $styles = [];\n $temp = explode( ';', array_key_exists( 'style', $this->input_attrs ) && ! empty( $this->input_attrs['style'] ) ? trim( $this->input_attrs['style'] ) : '' );\n foreach ( $temp as $style ) {\n list( $key, $value ) = explode( ':', $style );\n if ( ! empty( $key ) && ! empty( $value ) ) {\n $styles[$key] = $value;\n }\n }\n return $styles;\n }", "title": "" }, { "docid": "6b0e7da938b59e6e3ad837abde3f2fba", "score": "0.5167987", "text": "public function get_raw_css() {\n\n\t\tglobal $wpdb;\n\n\t\t$result = Db::getInstance()->executeS(\"SELECT * FROM \" . _DB_PREFIX_ . RevSliderFront::TABLE_CSS, true);\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "e1c32ae2c2e7d15daa47fc352df3e6fb", "score": "0.5159126", "text": "public function get_css()\n\t{\n\t\treturn $this->_css;\n\t}", "title": "" }, { "docid": "b272ffafbc7c48f53c99539943113c85", "score": "0.5156888", "text": "public function addStyle()\n {\n # Create an empty variable to hold the link tags.\n $links = '';\n try {\n # Get the passed styles. They will be in an Array.\n $styles = $this->getStyle();\n # Loop through the styles.\n foreach ($styles as $css) {\n # Get the Style sheet.\n preg_match('/^[^{]+/i', $css, $stylesheet);\n $stylesheet = $stylesheet[0];\n # Check if the stylesheet ends with a \".css\".\n $has_extension = preg_match('/\\.css$/i', $stylesheet);\n if ($has_extension === 0) {\n # Append the extension.\n $stylesheet .= '.css';\n }\n # Get the stylesheet properties.\n $number_returned = preg_match_all('/({[^}]*})/i', $css, $value_array, PREG_SET_ORDER);\n\n # Check if there were stylesheet properties.\n if ($number_returned > 0) {\n # Loop through the properties.\n for ($key = 0; $key < $number_returned; $key++) {\n # The properties are in JSON. Decode them to convert them to objects.\n $current_properties = json_decode($value_array[$key][0]);\n # Set the device the CSS should be targeting. The default is \"all\".\n $device = ((empty($current_properties->device)) ? 'all' : $current_properties->device);\n # Set the property to be measuring against.\n $property = ((empty($current_properties->property)) ? '' : $current_properties->property);\n # Set the tag that is appended to the end of the css filename to make it locatable and unique.\n $tag = ((empty($current_properties->tag)) ? '' : $current_properties->tag);\n # Set the value of the property to be measurting against.\n $value = ((empty($current_properties->value)) ? '' : $current_properties->value);\n # Build the value of the media attribute for the link tag.\n $media = $device . ((empty($property)) ? '' : ' and (' . $property . ':' . $value . ')');\n # Build the name of the stylesheet. If there is no tag, use the passed name without appending anything.\n $media_css = str_ireplace('.css', ((empty($tag)) ? '' : '.') . $tag . '.css', $stylesheet);\n # Create the link tag and concatenate it to the links variable.\n $links .= '<link rel=\"stylesheet\" type=\"text/css\" media=\"' . $media . '\" href=\"' . $media_css . '\">';\n }\n } else {\n # Build the link tag with no specific target or properties and concatenate it to the links variable.\n $links .= '<link rel=\"stylesheet\" type=\"text/css\" href=\"' . $stylesheet . '\">';\n }\n }\n\n # Return the built link tag(s).\n return $links;\n } catch (Exception $e) {\n throw $e;\n }\n }", "title": "" }, { "docid": "644cf689610fd07aa0c848098d39d2dc", "score": "0.5156169", "text": "function css() {\n\t\t// Start by importing Google web fonts\n\t\t$return = '<style type=\"text/css\" id=\"customizer-css\">';\n\n\t\t$import = array();\n\t\tforeach ( $this->google_fonts as $font ) {\n\t\t\t$import[ ] = urlencode( $font[ 0 ] ) . ':' . $font[ 1 ];\n\t\t}\n\t\t$import = array_unique( $import );\n\t\tif ( !empty( $import ) ) {\n\t\t\t$return .= '@import url(http' . ( is_ssl() ? 's' : '' ) . '://fonts.googleapis.com/css?family=' . implode( '|', $import ) . '); ';\n\t\t}\n\n\t\tforeach ( $this->css as $selector => $rules ) {\n\t\t\t$return .= $selector . ' { ' . implode( '; ', $rules ) . ' } ';\n\t\t}\n\t\tif( !empty($this->raw_css) ) $return .= $this->raw_css;\n\n\t\t$return .= '</style>';\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "81e9d17374b4c2c041608e72361888d9", "score": "0.5155294", "text": "function PortaMx_loadCustomCss($cssfile, $addheader = false)\n{\n\tglobal $context, $settings, $pmxCacheFunc;\n\n\tif(empty($cssfile))\n\t\treturn array();\n\n\t// get css file timestamp\n\t$cssFileTime = (file_exists($context['pmx_customcssdir'] . $cssfile .'.mpt') ? filemtime($context['pmx_customcssdir'] . $cssfile .'.mpt') : 0);\n\n\t// cacheName\n\t$cachefile = $cssfile.'-mpt'. $settings['theme_id'];\n\n\t// css already loaded, unchanged and in cache?\n\tif(($css = $pmxCacheFunc['get']($cachefile, false)) !== null && $cssFileTime == $css['ftime'] && in_array($cachefile, $context['pmx_blockCSSfiles']))\n\t\treturn $css['def'];\n\n\telseif(!empty($cssFileTime))\n\t{\n\t\t// if cached ?\n\t\tif($css !== null)\n\t\t{\n\t\t\t// unchanged ?\n\t\t\tif($css['ftime'] == $cssFileTime)\n\t\t\t{\n\t\t\t\tif(!empty($addheader) && !in_array($cachefile, $context['pmx_blockCSSfiles']))\n\t\t\t\t{\n\t\t\t\t\t$context['pmx_blockCSSfiles'][] = $cachefile;\n\t\t\t\t\taddInlineCss('\n\t'. $css['data']);\n\t\t\t\t}\n\t\t\t\t// done\n\t\t\t\treturn $css['def'];\n\t\t\t}\n\t\t}\n\n\t\t// not cached or file is changed\n\t\t$cssdata = file_get_contents($context['pmx_customcssdir'] . $cssfile .'.mpt');\n\t\t$result = PortaMx_getCssDefs($cssdata);\n\t\t$hasClass = 0;\n\n\t\tforeach($result['class'] as $k => $v)\n\t\t\t$hasClass += intval(!empty($v));\n\n\t\t$css = array(\n\t\t\t'ftime' => $cssFileTime,\n\t\t\t'file' => $cssfile,\n\t\t\t'def' => $result,\n\t\t\t'data' => (!empty($hasClass) ? $cssdata : '')\n\t\t);\n\n\t\t// convert css image pathes\n\t\t$tpath = pmx_parse_url($context['pmx_customcssurl'], PHP_URL_PATH);\n\t\t$css['data'] = str_replace('@@/', $tpath, $css['data']);\n\n\t\t// store in cache\n\t\t$pmxCacheFunc['put']($cachefile, $css, 86400, false);\n\n\t\t// put css on the header\n\t\tif(!empty($addheader))\n\t\t{\n\t\t\t$context['pmx_blockCSSfiles'][] = $cachefile;\n\t\t\tif(!empty($hasClass))\n\t\t\t\taddInlineCss('\n\t'. $css['data']);\n\t\t}\n\n\t\t// done\n\t\treturn $css['def'];\n\t}\n\telse\n\t\treturn array();\n}", "title": "" }, { "docid": "51dda9dd785bac951bd83182421ff922", "score": "0.5153874", "text": "function luciatheme_gallery_style($css) {\n return preg_replace(\"!<style type='text/css'>(.*?)</style>!s\", '', $css);\n}", "title": "" }, { "docid": "23d904840b105f84eb0b3c1cc0ef948d", "score": "0.5151807", "text": "function get_css( $css = \"\" ) {\n $css = get_transient( 'dynamic_to_top_transient_css' );\n\n if ( ! $css ) {\n $css = $this->minify( $this->generate_custom_css() );\n set_transient( 'dynamic_to_top_transient_css', $css, 60*60*24*90 );\n }\n\n return apply_filters( 'mv_dynamic_to_top_css', $css );\n\n }", "title": "" }, { "docid": "3d065ac60d39bc4c3eb45c0d364ec2ad", "score": "0.51376367", "text": "static function composer_additional_styles() { ?>\n <style id=\"cv-composer-layout-control-style\">\n .cv-composer-layout-option label,\n .cv-composer-layout-option .column {\n -webkit-transition: all 0.15s ease;\n -moz-transition: all 0.15s ease;\n -ms-transition: all 0.15s ease;\n -o-transition: all 0.15s ease;\n transition: all 0.15s ease;\n }\n\n .cv-composer-layout-option .column {\n -webkit-border-radius: 3px !important;\n border-radius: 3px !important;\n background: #eee;\n text-align: center;\n letter-spacing: 2px;\n font-weight: 600;\n color: #888;\n text-shadow: #fff 0px 1px 2px;\n padding: 15px 0;\n }\n .cv-composer-layout-option input {\n display: none\n }\n .cv-composer-layout-option label {\n display: block;\n padding: 10px;\n margin: 5px 0;\n background: #fff;\n border: 1px solid transparent;\n -webkit-border-radius: 3px !important;\n border-radius: 3px !important;\n }\n .cv-composer-layout-option label:hover {\n border: 1px solid #eee;\n background: #f9f9f9;\n }\n .cv-composer-layout-option input:checked + label {\n border: 1px solid #A2D164;\n background: #F0F7E6;\n }\n .cv-composer-layout-option label:hover .column {\n text-shadow: none;\n background: #888;\n color: #fff;\n }\n .cv-composer-layout-option input:checked + label .column {\n text-shadow: #111 0px 1px 2px;\n background: #666;\n color: #fff;\n }\n </style>\n <?php }", "title": "" }, { "docid": "4670f2af865a58b0276ee798ee9dfca9", "score": "0.5130926", "text": "function mg_init_custom_css() {\r\n\tinclude(MG_DIR . '/functions.php');\r\n\t\r\n\t// create custom CSS\r\n\tif(!mg_create_frontend_css()) {\r\n\t\tif(!get_option('mg_inline_css')) { add_option('mg_inline_css', '255', '', 'yes'); }\r\n\t\tupdate_option('mg_inline_css', 1);\t\r\n\t}\r\n\t\r\n\t// hack for non-latin characters (FROM v1.11)\r\n\tif(!get_option('mg_non_latin_char')) {\r\n\t\tif(mg_cust_opt_exists()) {delete_option('mg_non_latin_char');}\t\r\n\t\telse {add_option('mg_non_latin_char', '1', '', 'yes');}\r\n\t}\r\n\t\r\n\t// update sliders (for versions < 1.3)\r\n\tmg_update_img_sliders();\r\n}", "title": "" }, { "docid": "ca97def2d2af097e94d25eafd02435eb", "score": "0.5126452", "text": "function phorum_mod_bbcode_css_register($data)\n{\n // We only want to add data to the standard screen stylesheet.\n if ($data['css'] != 'css') return $data;\n\n // For the \"color\" tool, we need to load the color picker CSS stylesheet.\n $data['register'][] = array(\n \"module\" => \"bbcode\",\n \"where\" => \"after\",\n \"source\" => \"file(mods/bbcode/colorpicker/js_color_picker_v2.css)\"\n );\n return $data;\n}", "title": "" }, { "docid": "afb6f03435c2c0940e3759aaff51a3c3", "score": "0.5124109", "text": "protected function embedCSS()\r\n {\r\n $styles = <<<CSS\r\n<style type=\"text/css\" media=\"screen,projection\">\r\n/*<![CDATA[*/\r\n.dlg-status .ui-dialog-content {\r\n\tpadding: 0.5em 1em !important;\r\n}\r\n.dlg-image-preview .ui-dialog-content {}\r\n.dlg-image-preview .ui-dialog-content img {\r\n\tmax-width: 500px;\r\n\tmax-height: 500px;\r\n\tdisplay: block;\r\n\tmargin: auto;\r\n}\r\nform.locale-selector, form.filters {\r\n\tbox-shadow: 0 1px 2px lightgray;\r\n\tborder-radius: 2px;\r\n\toverflow: hidden;\r\n}\r\nform.locale-selector #locale-element {\r\n\tbox-shadow: 0px 1px 4px lightgray;\r\n}\r\ndiv.flexigrid {\r\n\tbox-shadow: 0 2px 2px lightgray;\r\n}\r\n/*]]>*/\r\n</style>\r\nCSS;\r\n self::appendTemplateHead($styles);\r\n }", "title": "" }, { "docid": "b039ded3ccd159b160b7a5c8a47e7112", "score": "0.51233196", "text": "public function getCss()\n\t{\n\t\treturn $this->css;\n\t}", "title": "" }, { "docid": "5affd10c85bc57f808f9e1ede7daf506", "score": "0.5108228", "text": "function styles_css_edit()\n{\n\tif (file_exists(\"$_SERVER[USER_ROOT]/user_css.txt\"))\n\t\teval(str_replace('$','\\$',file_get_contents(\"$_SERVER[USER_ROOT]/user_css.txt\")));\n\t\t\n\t$content=\"\n\n\t\t<h1>Custom CSS</h1>\n\t\t<form name='css_form' action='$_SERVER[WEB_ROOT]/scripts/form_shim.php' method='post'>\n\t\t<input type='hidden' name='action' value='write_css'/>\n\t\t<textarea name='css_data' id='textbox'>$extra_css</textarea>\n\t\t<input type='submit' id='submit_button' value='Save Changes' accesskey='x' />\n<br /><br /><a target='_blank' href='/help/formatting'>CSS formatting help</a> <br /><br /> <a href='/help/lynneformatting' target='_blank'>Lynne's CSS tips</a><br />\n\t\t</form>\n\n<style>.CodeMirror-wrapping { width: 80% !important; float: left !important; clear: none !important; height: 350px !important; border: thin solid black !important; }</style>\n\n\t <script src='/resources/javascript/codemirror65/js/codemirror.js' type='text/javascript'></script>\n<script type='text/javascript'>\n var editor = CodeMirror.fromTextArea('textbox', {\n border: '1px solid black',\n parserfile: 'parsecss.js',\n stylesheet: '/resources/javascript/codemirror65/css/csscolors.css',\n path: '/resources/javascript/codemirror65/js/'\n });\n</script>\n\t\";\n\nreturn $content;\n}", "title": "" }, { "docid": "7b56f36bbc7fbfc2b9475544c0b5dd8d", "score": "0.5105906", "text": "function zr_clean_style_tag($input) {\n\tpreg_match_all(\"!<link rel='stylesheet'\\s?(id='[^']+')?\\s+href='(.*)' type='text/css' media='(.*)' />!\", $input, $matches);\n\t$media = $matches[3][0] === 'print' ? ' media=\"print\"' : '';\n\treturn '<link rel=\"stylesheet\" href=\"' . esc_url( $matches[2][0] ) . '\"' . $media . '>' . \"\\n\";\n}", "title": "" }, { "docid": "82a731f74c3e68113cbee626e125bc1f", "score": "0.51021606", "text": "function theme_aulasvirtuales_set_customcss($css, $customcss) {\n $tag = '[[setting:customcss]]';\n $replacement = $customcss;\n if (is_null($replacement)) {\n $replacement = '';\n }\n\n $css = str_replace($tag, $replacement, $css);\n\n return $css;\n}", "title": "" }, { "docid": "6546aeca39ebc7151e8f4cc5f0879773", "score": "0.50985044", "text": "function wd_gallery_style($css) {\r\n\t\treturn preg_replace(\"!<style type='text/css'>(.*?)</style>!s\", '', $css);\r\n\t}", "title": "" }, { "docid": "36de1ff3526ff696f856ce857a34b3aa", "score": "0.50971705", "text": "private function parseColor(string $message)\n {\n $str = new Builder($message);\n\n while($str->has('{') && $str->has('{/') && $str->has('}'))\n {\n $pos = $str->pos('{');\n $tag = Str::moveFromStart($str->substr($pos, $str->pos('}') - $pos), '{');\n $close = '{/' . $tag . '}';\n $content = Str::break($str->substr($pos + strlen($tag) + 2, $str->length()), $close)[0];\n $color = \"\\e[\" . $this->colors[$tag] . \"m\";\n\n $string = new Builder($str->substr(0, $pos));\n $string->append($color)\n ->append($content)\n ->append(\"\\e[0m\")\n ->append($str->substr(strpos($message, $close) + strlen($close), $str->length()));\n\n $str->set($string->get());\n }\n\n return $str->get();\n }", "title": "" }, { "docid": "0d195044ede37589c7be898925663439", "score": "0.50913817", "text": "static function td_plugin_frontend_css() {\n }", "title": "" }, { "docid": "5903d60563e92f0e6d0779ed0cf54431", "score": "0.50878936", "text": "function rosewellness_custom_css() {\n global $rosewellness_general;\n echo ( $rosewellness_general['custom_styles'] ) ? '<style>' . $rosewellness_general['custom_styles'] . '</style>' . \"\\r\\n\" : '';\n}", "title": "" }, { "docid": "a77a0ca3e7a799364f60ce6f5c304ddb", "score": "0.50859535", "text": "public function getStylePlugin();", "title": "" }, { "docid": "fd8d7eab8167fba39ef79c0ee5d596dc", "score": "0.5073722", "text": "function css_output() {\r\n\t ?>\r\n\t <style type=\"text/css\">#message.error p a {color:#FFFFFF;}</style>\r\n\t <?php\r\n\r\n\t}", "title": "" }, { "docid": "27b3a1173384b9c318a67a05448e6e63", "score": "0.507069", "text": "function custom_style_query() {\n return get_option(custom_style_key());\n}", "title": "" }, { "docid": "3b156abc37fb8d77f16ac9f9904b0107", "score": "0.50668764", "text": "public static function getScParser()\n\t{\n\t\treturn self::getSingleton('e_parse_shortcode', true);\n\t}", "title": "" }, { "docid": "ee05b65e714dba9011a9e5b9aa8f504e", "score": "0.50517255", "text": "function bhass_gallery_style($css) {\n return preg_replace(\"!<style type='text/css'>(.*?)</style>!s\", '', $css);\n}", "title": "" }, { "docid": "5acbf907b3a798293a63e742208a8046", "score": "0.50431025", "text": "public static function css(...$args): string\n {\n $args[] = 'css';\n return static::handle(...$args);\n }", "title": "" }, { "docid": "08208d069a2491cf18ffa3d0aed55b47", "score": "0.5040947", "text": "function spinal_gallery_style($css) {\r\n\treturn preg_replace( \"!<style type='text/css'>(.*?)</style>!s\", '', $css );\r\n}", "title": "" }, { "docid": "1fef6b83fcde103d1ea3d8d7582a6bf9", "score": "0.5040641", "text": "function mce_css( $mce_css ) {\r\n\t\tif( ! empty( $mce_css ) ) $mce_css .= ',';\r\n\t\t$mce_css .= $this->base_url . 'css/styles.css';\r\n\t\treturn $mce_css;\r\n\t}", "title": "" }, { "docid": "69fdb360f2a05b979ff28964acc4efd2", "score": "0.5038042", "text": "static function inline_style( $css, $prefix = 'inline' ) {\n\t\t\t// Generate random id for style tag\n\t\t\t$random_id = PT_CV_Functions::string_random();\n\n\t\t\tob_start();\n\t\t\t?>\n\t\t\t<style type=\"text/css\" id=\"<?php echo esc_attr( PT_CV_PREFIX . $prefix . '-style-' . $random_id ); ?>\"><?php echo '' . $css; ?></style>\n\t\t\t<?php\n\t\t\treturn ob_get_clean();\n\t\t}", "title": "" }, { "docid": "abfa2efc1b06fe0b25c8034ac3f4acd0", "score": "0.50323987", "text": "function ay_clean_style_tag($input) {\r\n\tpreg_match_all(\"!<link rel='stylesheet'\\s?(id='[^']+')?\\s+href='(.*)' type='text/css' media='(.*)' />!\", $input, $matches);\r\n\t// Only display media if it's print\r\n\t$media = $matches[3][0] === 'print' ? ' media=\"print\"' : '';\r\n\treturn '<link rel=\"stylesheet\" href=\"'.$matches[2][0].'\"'. $media.'>'.\"\\n\";\r\n}", "title": "" }, { "docid": "e7efc00f87796dd73c98fa9a710c164c", "score": "0.5029952", "text": "function mardiio_add_custom_css_field() {\n $option = get_option( 'custom_css' );\n\n $customCSS = ( empty( $option ) ? '/* Mardiio Theme Custom CSS */' : $option );\n\n echo '<div id=\"custom-css-text-editor\">' . $customCSS . '</div>';\n echo '<textarea id=\"custom_css\" name=\"custom_css\" style=\"display: none; visibility: hidden\">' . $customCSS . '</textarea>';\n}", "title": "" }, { "docid": "cbc8500184d4d2ac92b085b8183f5a6d", "score": "0.5023868", "text": "function PortaMx_addInlineCss($cssData)\n{\n\tglobal $context;\n\n\tif(!isset($context['pmx']['customCSS']))\n\t\t$context['pmx']['customCSS'] = '';\n\n\t$context['pmx']['customCSS'] .= $cssData;\n}", "title": "" }, { "docid": "5b962108516f66a3ce438c3a5dce2946", "score": "0.50238276", "text": "public static function css($media, $text){\r\n\t\treturn \"<style type=\\\"text/css\\\" media=\\\"{$media}\\\">\\n/*<![CDATA[*/\\n{$text}\\n/*]]>*/\\n</style>\";\r\n\t}", "title": "" }, { "docid": "98d48e40589f0637a155c660c8bdab33", "score": "0.5023044", "text": "function __construct ( $str ) {\n\t\t$this->string = csscrush_function::parseCustomFunctions(\n\t\t\t\t\t\t\t\t\t\t\t\t$str, self::$argRegex, array( $this, 'store' ) );\n\t}", "title": "" }, { "docid": "57c76922585695927aaaa98229939e70", "score": "0.5020421", "text": "function gallery_style( $css ) {\n return preg_replace( \"!<style type='text/css'>(.*?)</style>!s\", '', $css );\n}", "title": "" }, { "docid": "e34a249f9697c5aa121982c311944e5d", "score": "0.5017255", "text": "private function _setCSSValue() {\n $this->css_value = array(\n 'bootstrap' => COMP_URL . 'bootstrap/dist/css/bootstrap.min.css',\n 'Jdatatables' => COMP_URL . 'jsDatatable/jquery.dataTables.min.css',\n \n 'fancy' => COMP_URL . 'plugins/fancy/lightbox.min.css',\n 'animate' => COMP_URL . 'animate.css/animate.min.css',\n 'font-awesome' => COMP_URL . 'font-awesome/css/font-awesome.min.css',\n \n 'sweetcss' => COMP_URL . 'sweet-alert/css/sweet-alert.min.css', \n 'font' => CSS_URL . 'font.min.css',\n 'app' => CSS_URL . 'app.min.css',\n \n // 'normal_datepickers' => CSS_URL . 'datepicker.min.css',\n 'bt_datepickers' => COMP_URL . 'datepicker/bootstrap-datetimepicker.min.css', \n 'custom' => CSS_URL . 'jquery-ui-1.8.23.custom.min.css',\n 'chosen' => COMP_URL . 'chosen/chosen.css',\n 'stylecss' => CSS_URL . 'style.min.css'\n );\n }", "title": "" }, { "docid": "cefbd3ecc8ea1168aad839a05fb27ed6", "score": "0.5014786", "text": "function shortcode_template( $atts, $content = null ) {\r\n\t\t\tglobal $mpc_ma_options;\r\n\t\t\tif ( ! defined( 'MPC_MASSIVE_FULL' ) || ( defined( 'MPC_MASSIVE_FULL' ) && $mpc_ma_options[ 'single_js_css' ] !== '1' ) ) {\r\n\t\t\t\t$this->enqueue_shortcode_scripts();\r\n\t\t\t}\r\n\r\n\t\t\t$atts = shortcode_atts( array(\r\n\t\t\t\t'class' => '',\r\n\t\t\t\t'preset' => '',\r\n\t\t\t\t'content_preset' => '',\r\n\t\t\t\t'layout' => 'horizontal',\r\n\t\t\t\t'cols' => '4',\r\n\t\t\t\t'gap' => '15',\r\n\r\n\t\t\t\t'lines_target' => 'icon',\r\n\t\t\t\t'lines_number' => '1',\r\n\t\t\t\t'lines_style' => 'solid',\r\n\t\t\t\t'lines_color' => '#333',\r\n\t\t\t\t'lines_gap' => '1',\r\n\t\t\t\t'lines_weight' => '1',\r\n\r\n\t\t\t\t'animation_in_type' => 'none',\r\n\t\t\t\t'animation_in_duration' => '300',\r\n\t\t\t\t'animation_in_delay' => '0',\r\n\t\t\t\t'animation_in_offset' => '100',\r\n\t\t\t), $atts );\r\n\r\n\t\t\t/* Prepare */\r\n\t\t\t$animation = MPC_Parser::animation( $atts );\r\n\r\n\t\t\t$styles = $this->shortcode_styles( $atts );\r\n\t\t\t$css_id = $styles[ 'id' ];\r\n\r\n\t\t\t$lines = ( int ) $atts[ 'lines_number' ] > 0 ? str_repeat( '<span></span>', ( int ) $atts[ 'lines_number' ] ) : '';\r\n\t\t\t$columns = ' data-ci-cols=\"' . ( $atts[ 'cols' ] != '' ? esc_attr( $atts[ 'cols' ] ) : '4' ) . '\"';\r\n\t\t\t$target = ' data-target=\"' . ( $atts[ 'lines_target' ] != '' ? esc_attr( $atts[ 'lines_target' ] ) : 'icon' ) . '\"';\r\n\t\t\t$layout = ' data-layout=\"' . ( $atts[ 'layout' ] != '' ? esc_attr( $atts[ 'layout' ] ) : 'vertical' ) . '\"';\r\n\r\n\t\t\t/* Shortcode classes | Animation | Layout */\r\n\t\t\t$classes = ' mpc-init mpc-transition';\r\n\t\t\t$classes .= $animation != '' ? ' mpc-animation' : '';\r\n\t\t\t$classes .= ' ' . esc_attr( $atts[ 'class' ] );\r\n\r\n\t\t\t/* Shortcode Output */\r\n\t\t\t$return = '<div id=\"' . $css_id . '\" class=\"mpc-connected-icons' . $classes . '\" ' . $animation . $columns . $target . $layout . '>';\r\n\t\t\t\t$return .= '<div class=\"mpc-connected-icons__line\">' . $lines . '</div>';\r\n\t\t\t\t$return .= do_shortcode( $content );\r\n\t\t\t$return .= '</div>';\r\n\r\n\t\t\tglobal $mpc_frontend;\r\n\t\t\tif ( $mpc_frontend ) {\r\n\t\t\t\t$return .= '<style>' . $styles[ 'css' ] . '</style>';\r\n\t\t\t}\r\n\r\n\t\t\treturn $return;\r\n\t\t}", "title": "" }, { "docid": "ece69011334e10d63b35f8f35823e929", "score": "0.5010516", "text": "static function extractParams($param_str, $str_shortcode = '')\n\t{\n\t\t$param_str = stripslashes($param_str);\n\t\t$params = array();\n\t\t// get params of shortcode\n\t\tpreg_match_all('/[A-Za-z0-9_-]+=\\\"[^\"]*\\\"/u', $param_str, $tmp_params, PREG_PATTERN_ORDER);\n\t\t$arr_insert = array();\n\t\tforeach ($tmp_params[0] as $param_value)\n\t\t{\n\t\t\t$output = array();\n\t\t\tpreg_match_all('/([A-Za-z0-9_-]+)=\\\"([^\"]*)\\\"/u', $param_value, $output, PREG_SET_ORDER);\n\t\t\tforeach ($output as $item)\n\t\t\t{\n\t\t\t\tif (!in_array($item[1], array('css_suffix')) || !isset ($params[$item[1]]))\n\t\t\t\t{\n//\t\t\t\t\t$params[$item[1]] = urldecode($item[2]);\n\t\t\t\t\t$params[$item[1]] = $item[2];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$pattern = self::getShortcodeRegex();\n\t\tpreg_match_all(\"/\" . $pattern . \"/s\", $param_str, $tmp_params, PREG_PATTERN_ORDER);\n\t\t$content = isset($tmp_params[5][0]) ? trim($tmp_params[5][0]) : \"\";\n\t\t$content = preg_replace('/rich_content_param-[a-z_]+=/', \"\", $content);\n\t\t$params['sc_inner_content'] = $content;\n\n\t\treturn $params;\n\t}", "title": "" } ]
3d6521a023b6166a1b2081b601561b2e
Is this node a secondary node?
[ { "docid": "5b2a9889015e5ac319aa1c8946ed98fc", "score": "0.67182773", "text": "public function isSecondary() {\n return ($this->type == self::SECONDARY);\n }", "title": "" } ]
[ { "docid": "0a1e03540c82fc218f6eb3e6a6792af1", "score": "0.6965433", "text": "final public function isSecondary(): bool {}", "title": "" }, { "docid": "839d0b1772f0c248ab03da5db4c1bdfd", "score": "0.6377347", "text": "public function HasSecondaryContent() {\n\t\t$hasSecondaryContent = true;\n\n\t\t$this->extend('HasSecondaryContent', $hasSecondaryContent);\n\n\t\treturn $hasSecondaryContent;\n\t}", "title": "" }, { "docid": "ec01566da670e3daa03e4403505536ff", "score": "0.6213782", "text": "public function nstIsChild ($node1, $node2)\r\n\t{\r\n\t\treturn (($node1['l']>$node2['l']) and ($node1['r']<$node2['r']));\r\n\t}", "title": "" }, { "docid": "d3a14e9cfc1b836f7b32416c9b93a48a", "score": "0.6119395", "text": "public function hasSiblings () {}", "title": "" }, { "docid": "7f0b59cbc397bfe5916571ec7a5cabde", "score": "0.6117011", "text": "public function is_valid_node()\n {\n return intval($this->{$this->right_column}) > intval($this->{$this->left_column});\n }", "title": "" }, { "docid": "f02b67c25ffd99f570e3c4d4d8529b45", "score": "0.61012685", "text": "public function is_child()\n {\n return $this->child == 1;\n }", "title": "" }, { "docid": "4334c495a249d252ede6e02a9802ff93", "score": "0.60343957", "text": "public function isChild();", "title": "" }, { "docid": "ed41243da5155edd699d720b734ba6cf", "score": "0.6006625", "text": "public function hasNode() {\n\t\treturn !is_null( $this->node );\n\t}", "title": "" }, { "docid": "e5492485df16095c354bd711aae0f8b0", "score": "0.6001434", "text": "public function visitable ($node) { return $this->nodes_are_links; }", "title": "" }, { "docid": "3afcf33344205b872fbef1fb1d72c3b6", "score": "0.59591997", "text": "public function hasSiblings(){\n return count($this->getSiblings()) > 0;\n }", "title": "" }, { "docid": "b2e951804a98626a552dc45f43fadf42", "score": "0.58301395", "text": "protected function _subclass_isEqualNode(Node $other = NULL): bool\n {\n return true;\n }", "title": "" }, { "docid": "46580449402148a59803496337aebccd", "score": "0.5829559", "text": "public function isSelfOrDescendantOf($other) {\n return $this->getLeft() >= $other->getLeft() && $this->getLeft() < $other->getRight();\n }", "title": "" }, { "docid": "d90d6039fec407bcd71d978a30c2ace0", "score": "0.5828079", "text": "public function is_parent()\n {\n return $this->parent == 1;\n }", "title": "" }, { "docid": "08cf1fc3ee061dd37f77837e7bcc8ca1", "score": "0.5822915", "text": "public function hasNode($item){\n return in_array($this->getItemId($item), $this->_nodeListId);\n }", "title": "" }, { "docid": "4dba87912f0660232d8a38b8e4144b04", "score": "0.58151567", "text": "public function isDescendantOf($other) {\n return $this->getLeft() > $other->getLeft() && $this->getLeft() < $other->getRight();\n }", "title": "" }, { "docid": "9f889f9751b31e382c0e7a28efd4e2a3", "score": "0.58103836", "text": "public function isRightmost()\n {\n if (!$this->parentNode) return TRUE;\n return $this->parentNode->children[count($this->parentNode->children)-1]->id === $this->id;\n }", "title": "" }, { "docid": "76e6f9ae7e6977108ed9e7e4eb75cebb", "score": "0.58073825", "text": "public function otherOrSelf()\n\t{\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "03270a935324837d488e099333d3fe54", "score": "0.57621634", "text": "public function isLeaf()\n\t{\n\t\treturn ( $this->___subs === false );\n\t}", "title": "" }, { "docid": "562a80cb23dee3b886e4bfaf9a3386f4", "score": "0.5745377", "text": "public function isLeaf()\n {\n $this->checkNotNewModel(); \n return is_null($this->firstChild());\n }", "title": "" }, { "docid": "547608c1a15a22229f69a442e23b19f4", "score": "0.5742247", "text": "public function isLeaf() {\n return $this->exists && ($this->getRight() - $this->getLeft() == 1);\n }", "title": "" }, { "docid": "5e7133b3fddb4daab61a9ec19ca95ce6", "score": "0.57248485", "text": "#[TentativeType]\n public function isSameNode(DOMNode $otherNode): bool {}", "title": "" }, { "docid": "cb8644c4d681e906908bce229573d75f", "score": "0.5723388", "text": "public function isChild() {\n return !$this->isRoot();\n }", "title": "" }, { "docid": "f39e3184d3fe318c59298c7d2e0d86c3", "score": "0.5711349", "text": "protected function nestedConnections()\n\t{\n\t\treturn FALSE;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// ==>\n\n\t}", "title": "" }, { "docid": "fd4f8aa57aefb59729f49d03dc61cf30", "score": "0.57023394", "text": "function hasChildren();", "title": "" }, { "docid": "728636546976196ed1642b2beae959c3", "score": "0.56939995", "text": "private function _isLeaf()\r\n {\r\n \t$role = $this->getRoleId();\r\n \t$parent\t\t= $this->_acl->acl->roles->$role;\r\n \t//parent is null if it is Super user.\r\n \tif(empty($parent)) {\r\n \t\treturn true;\r\n \t}else {\r\n\t\t\treturn false;\r\n\t\t}\r\n }", "title": "" }, { "docid": "928379afa2f135b22522cda16e6adee7", "score": "0.5681586", "text": "private function isSingleUsePrivateNode(ServiceReferenceGraphNodeContract $node): bool\n {\n if ($node->getValue()->isPublic()) {\n return false;\n }\n\n $ids = [];\n\n foreach ($node->getInEdges() as $edge) {\n if (null === $value = $edge->getSourceNode()->getValue()) {\n continue;\n }\n\n if ($value instanceof AliasDefinition) {\n return false;\n }\n\n if ($edge->isLazy() || ! $value->isShared()) {\n return false;\n }\n\n $ids[$edge->getSourceNode()->getId()] = true;\n }\n\n return \\count($ids) === 1;\n }", "title": "" }, { "docid": "b7e2fad6bfa79310f52991f374176a28", "score": "0.5679568", "text": "public function has_parent()\n {\n return $this->is_valid_node() && !$this->is_root();\n }", "title": "" }, { "docid": "ecec45e9dd231583f380671c6b94252b", "score": "0.56728435", "text": "public function hasParent();", "title": "" }, { "docid": "ecec45e9dd231583f380671c6b94252b", "score": "0.56728435", "text": "public function hasParent();", "title": "" }, { "docid": "4d091e3397061a7337a4142a25d3e4ca", "score": "0.5642446", "text": "public function isParent();", "title": "" }, { "docid": "57f329849b405970bb9b9eba76e27fba", "score": "0.56237024", "text": "private function isOurNode($node)\n {\n foreach ($this->createdNodes as $createdNode) {\n if ($createdNode == $node) {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "25d1825eceab1cd2c0053eff3e703de1", "score": "0.5622623", "text": "public function isDescendantOf($node)\n {\n $this->checkNotNewModel(); \n if ($this->isRoot()) {\n return false;\n }\n if (is_int($node) && ($node < 0)) {\n $node = $this->service->getModelById(get_class($this->owner), $node);\n }\n if ($node instanceof RootNode) {\n $root = $this->getRoot();\n return $root === $node;\n }\n if ($node instanceof ActiveRecord) {\n $node = (int) $node->{$this->getIdFieldName()};\n } \n if (is_int($node)) {\n $ids = $this->getParentIds();\n return in_array($node, $ids);\n }\n return false;\n }", "title": "" }, { "docid": "1634be7519b21e6e52fc6ccd44d67dd0", "score": "0.56089175", "text": "public function isNodePage(): bool {\n return isset($this->variables['node']) && $this->variables['node'] instanceof NodeInterface;\n }", "title": "" }, { "docid": "fcc6379bdfde30b550f4edc71bb26b58", "score": "0.56071115", "text": "public function isSiblingOf($node)\n {\n $this->checkNotNewModel(); \n $owner = $this->owner;\n if ($this->isRoot() || $node->isRoot()) {\n return $owner === $node;\n }\n return $owner->{$this->getPathFieldName()} == $node->{$this->getPathFieldName()};\n }", "title": "" }, { "docid": "eb2f734aa771d6f477bb44c4dae0079c", "score": "0.5580718", "text": "public static function isNode ($page) {\n\t\t$page = filter('content_isnode', $page);\n\t\tplugin('content_isnode', array($page));\n\t\t\n\t\treturn (array_search($page, self::$urlLookup) === false ? false : true);\n\t}", "title": "" }, { "docid": "8318ca5fdb0ab042c7114b7150cf7cda", "score": "0.5555567", "text": "public function isDirectlyRelated()\n\t{\n\t\t$isDirectlyRelated = $this->get('directly_related_to_role');\n\t\tif ($isDirectlyRelated == 1) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "5da806d99fdc866c87947cbcfd1628a9", "score": "0.55534613", "text": "public function isSameNode (DOMNode $node) {}", "title": "" }, { "docid": "5da806d99fdc866c87947cbcfd1628a9", "score": "0.55534613", "text": "public function isSameNode (DOMNode $node) {}", "title": "" }, { "docid": "5da806d99fdc866c87947cbcfd1628a9", "score": "0.55534613", "text": "public function isSameNode (DOMNode $node) {}", "title": "" }, { "docid": "5da806d99fdc866c87947cbcfd1628a9", "score": "0.55528337", "text": "public function isSameNode (DOMNode $node) {}", "title": "" }, { "docid": "5da806d99fdc866c87947cbcfd1628a9", "score": "0.55528337", "text": "public function isSameNode (DOMNode $node) {}", "title": "" }, { "docid": "5da806d99fdc866c87947cbcfd1628a9", "score": "0.55528337", "text": "public function isSameNode (DOMNode $node) {}", "title": "" }, { "docid": "5da806d99fdc866c87947cbcfd1628a9", "score": "0.55528337", "text": "public function isSameNode (DOMNode $node) {}", "title": "" }, { "docid": "5da806d99fdc866c87947cbcfd1628a9", "score": "0.55528337", "text": "public function isSameNode (DOMNode $node) {}", "title": "" }, { "docid": "5da806d99fdc866c87947cbcfd1628a9", "score": "0.55528337", "text": "public function isSameNode (DOMNode $node) {}", "title": "" }, { "docid": "5da806d99fdc866c87947cbcfd1628a9", "score": "0.55528337", "text": "public function isSameNode (DOMNode $node) {}", "title": "" }, { "docid": "5da806d99fdc866c87947cbcfd1628a9", "score": "0.55528337", "text": "public function isSameNode (DOMNode $node) {}", "title": "" }, { "docid": "5da806d99fdc866c87947cbcfd1628a9", "score": "0.55528337", "text": "public function isSameNode (DOMNode $node) {}", "title": "" }, { "docid": "5da806d99fdc866c87947cbcfd1628a9", "score": "0.55528337", "text": "public function isSameNode (DOMNode $node) {}", "title": "" }, { "docid": "53c3527bd0573cf2df026dbd85a964ef", "score": "0.5543902", "text": "public function isRelationship( $name );", "title": "" }, { "docid": "966bde8620831c50473351ea79a953ca", "score": "0.55354106", "text": "public function is_sibling($target)\n\t{\n\t\tif ($this->{$this->meta()->primary_key()} === $target->{$this->meta()->primary_key()})\n\t\t\treturn FALSE;\n\t\t\n\t\treturn ($this->parent->{$this->meta()->primary_key()} === $target->parent->{$this->meta()->primary_key()});\n\t}", "title": "" }, { "docid": "25e67e5ca8dc115fd43543a5b75f42fd", "score": "0.5528002", "text": "public function hasChildren()\n\t{\n\t\t$this->getProperties($left, $right);\n\t\t$node = $this->getOwner();\n\t\treturn ($node->$right > ($node->$left + 1)) ? true : false;\n\t}", "title": "" }, { "docid": "cbc1b0120397d40f00278e47d26411f5", "score": "0.55241966", "text": "public function isLastNode(){\r\n return empty($this->child);\r\n }", "title": "" }, { "docid": "0ce435f6bbe0b6e79e363ff9520f88ca", "score": "0.55135167", "text": "public function has_next_sibling()\n {\n return $this->is_valid_node($this->get_next_sibling());\n }", "title": "" }, { "docid": "e0446f962295dc7855a6df4d17dd76fe", "score": "0.55012727", "text": "public function hasChildNodes () {}", "title": "" }, { "docid": "e0446f962295dc7855a6df4d17dd76fe", "score": "0.55012727", "text": "public function hasChildNodes () {}", "title": "" }, { "docid": "e0446f962295dc7855a6df4d17dd76fe", "score": "0.5500905", "text": "public function hasChildNodes () {}", "title": "" }, { "docid": "e0446f962295dc7855a6df4d17dd76fe", "score": "0.5500905", "text": "public function hasChildNodes () {}", "title": "" }, { "docid": "e0446f962295dc7855a6df4d17dd76fe", "score": "0.5500905", "text": "public function hasChildNodes () {}", "title": "" }, { "docid": "e0446f962295dc7855a6df4d17dd76fe", "score": "0.5500905", "text": "public function hasChildNodes () {}", "title": "" }, { "docid": "e0446f962295dc7855a6df4d17dd76fe", "score": "0.5500905", "text": "public function hasChildNodes () {}", "title": "" }, { "docid": "e0446f962295dc7855a6df4d17dd76fe", "score": "0.5500905", "text": "public function hasChildNodes () {}", "title": "" }, { "docid": "e0446f962295dc7855a6df4d17dd76fe", "score": "0.5500905", "text": "public function hasChildNodes () {}", "title": "" }, { "docid": "e0446f962295dc7855a6df4d17dd76fe", "score": "0.5500905", "text": "public function hasChildNodes () {}", "title": "" }, { "docid": "e0446f962295dc7855a6df4d17dd76fe", "score": "0.5500905", "text": "public function hasChildNodes () {}", "title": "" }, { "docid": "e0446f962295dc7855a6df4d17dd76fe", "score": "0.5500905", "text": "public function hasChildNodes () {}", "title": "" }, { "docid": "e0446f962295dc7855a6df4d17dd76fe", "score": "0.5500905", "text": "public function hasChildNodes () {}", "title": "" }, { "docid": "b5360e6c5b109246bbd257c3168a3cbf", "score": "0.549893", "text": "public function isInNode($key) {\n return isset($this->__qNode[$key]);\n }", "title": "" }, { "docid": "3cea4ae14c9f9ac61cf1d004fe7b9b50", "score": "0.5493794", "text": "#[TentativeType]\n public function hasChildNodes(): bool {}", "title": "" }, { "docid": "fc4d6db119ca477adba84bf735b3d312", "score": "0.5488825", "text": "public function hasSubresource(): bool\n {\n return null !== $this->subresource;\n }", "title": "" }, { "docid": "cee67605a039690ce970429b9a5508d2", "score": "0.5484808", "text": "public function isChild() {\n\t\treturn !$this->is_parent;\n\t}", "title": "" }, { "docid": "53951242105a72bd7e7c3dd52ca41fb3", "score": "0.5464901", "text": "public function getHasTree(){\n\t\treturn $this->_entity1->getIsTree() || $this->_entity2->getIsTree();\n\t}", "title": "" }, { "docid": "bc74146e10ddea80ca1046fd42420fc2", "score": "0.5462195", "text": "public function has_children()\n {\n return (($this->{$this->right_column} - $this->{$this->left_column}) > 1);\n }", "title": "" }, { "docid": "f5fa2adfe513e8350d5d6dd9a95fc719", "score": "0.5455141", "text": "public function isSelfOrAncestorOf($other) {\n return $this->getLeft() <= $other->getLeft() && $this->getRight() > $other->getLeft();\n }", "title": "" }, { "docid": "db5cf6abff1d5ba95394a70756c76b9a", "score": "0.54541874", "text": "public function hasParent(){\n return !is_null($this->parent);\n }", "title": "" }, { "docid": "3ef9e95e728486291b9001a106fd143b", "score": "0.5454161", "text": "public function has_children()\n\t{\n\t\treturn (($this->right - $this->left) > 1);\n\t}", "title": "" }, { "docid": "7118287705e09faca6cd47a596fcd7be", "score": "0.545282", "text": "public function isRoot();", "title": "" }, { "docid": "60c3ffa6a02394585d50be91ece4e0ae", "score": "0.5446471", "text": "public function has_child(){\n return count($this->childNodes) > 0 ? true : false;\n }", "title": "" }, { "docid": "86ac8d7b0030bea25a2b9419da5ff01f", "score": "0.54394126", "text": "private function findNextNode(): bool\n {\n if ($this->xt->isElementNode()) {\n if ($this->ctx->isComposite() && $this->xt->moveToFirstChildNode()) {\n return TRUE;\n }\n \n $this->finishParsingElement();\n }\n \n if ($this->xt->moveToNextNode()) {\n return TRUE;\n }\n \n // Moves to the first available next node of ancestors.\n while ($this->xt->moveToParentNode()) {\n if ($this->xt->isElementNode()) {\n $this->finishParsingElement();\n }\n \n if ($this->xt->moveToNextNode()) {\n return TRUE;\n }\n }\n \n return FALSE;\n }", "title": "" }, { "docid": "8a2446dd81a2d05fc168bf0700f65aa4", "score": "0.5436209", "text": "public function isSubcategory()\n {\n return $this->container['type'] == T::TERM_CATEGORY;\n }", "title": "" }, { "docid": "02d29a7789317cf6502756e6ed2f494e", "score": "0.5434866", "text": "public function is_leaf()\n {\n return (($this->{$this->right_column} - $this->{$this->left_column}) == 1);\n }", "title": "" }, { "docid": "27dfcbf246b313d3b7b443e1c8b94d9f", "score": "0.5434432", "text": "public function hasEdge($a, $b);", "title": "" }, { "docid": "5fb77172694d60a63d34796ce9903cf1", "score": "0.54318815", "text": "public function otherOrSelf()\n\t{\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "9cc2ae7362dc39730f3943162914111e", "score": "0.54152405", "text": "function destinationHasRelation()\n {\n if ($this->createDestination())\n {\n // If there's a relation back, it's in the destination node under the name of the first refkey element.\n $attrib = $this->m_destInstance->m_attribList[$this->m_refKey[0]];\n if (is_object($attrib) && strpos(get_class($attrib), \"elation\")!==false) return true;\n }\n return false;\n }", "title": "" }, { "docid": "06bba738353052157c0d6271d8fc1b08", "score": "0.5414718", "text": "public function areSameNode(Node $firstNode, Node $secondNode): bool\n {\n if ($firstNode === $secondNode) {\n return true;\n }\n\n $firstClass = $firstNode::class;\n $secondClass = $secondNode::class;\n\n if ($firstClass !== $secondClass) {\n return false;\n }\n\n if ($firstNode->getStartTokenPos() !== $secondNode->getStartTokenPos()) {\n return false;\n }\n\n if ($firstNode->getEndTokenPos() !== $secondNode->getEndTokenPos()) {\n return false;\n }\n\n $printFirstNode = $this->betterStandardPrinter->print($firstNode);\n $printSecondNode = $this->betterStandardPrinter->print($secondNode);\n\n return $printFirstNode === $printSecondNode;\n }", "title": "" }, { "docid": "2e507f1f8ec813cb7500a2727b5c96b1", "score": "0.54016817", "text": "protected function isRelation()\r\n {\r\n return (bool)$this->relation;\r\n }", "title": "" }, { "docid": "b719e8ba06dddbb8a90ae9e69fc62162", "score": "0.539581", "text": "public function hasChildren();", "title": "" }, { "docid": "b719e8ba06dddbb8a90ae9e69fc62162", "score": "0.539581", "text": "public function hasChildren();", "title": "" }, { "docid": "b719e8ba06dddbb8a90ae9e69fc62162", "score": "0.539581", "text": "public function hasChildren();", "title": "" }, { "docid": "b719e8ba06dddbb8a90ae9e69fc62162", "score": "0.539581", "text": "public function hasChildren();", "title": "" }, { "docid": "b719e8ba06dddbb8a90ae9e69fc62162", "score": "0.539581", "text": "public function hasChildren();", "title": "" }, { "docid": "e500868b7d0f08767918a193bd8ceb37", "score": "0.5386691", "text": "public function isSelfType(): bool;", "title": "" }, { "docid": "a94a5e0dfab8c93979edcebaec0c3776", "score": "0.5384675", "text": "function isAncestor($other_cat)\n {\n $category = OOCategory :: _getCategoryObject($other_cat);\n return in_array($this->_id, explode('|', $category->getPath()));\n }", "title": "" }, { "docid": "d3fb313a410a2cd0a622e18f29e20688", "score": "0.53816116", "text": "public function is_leaf()\n\t{\n\t\treturn ! $this->has_children();\n\t}", "title": "" }, { "docid": "bd1e737aa8071e160e2d5b0b1560dba7", "score": "0.5360776", "text": "public function isLeaf()\n\t{\n\t\treturn $this->getChildrenCount() === 0;\n\t}", "title": "" }, { "docid": "df83632b16f3f2e6a6ad57d0a9d640b1", "score": "0.5339601", "text": "public function hasTopic(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "51417df23d990d48fe988d07b6f92070", "score": "0.5330936", "text": "public function isLinked() {\n\t\treturn (bool)$this->userId;\n\t}", "title": "" }, { "docid": "b09558faacf5afe2391459c7c141ace6", "score": "0.5330912", "text": "public function hasChildren () {}", "title": "" }, { "docid": "b09558faacf5afe2391459c7c141ace6", "score": "0.5330912", "text": "public function hasChildren () {}", "title": "" }, { "docid": "b09558faacf5afe2391459c7c141ace6", "score": "0.5330912", "text": "public function hasChildren () {}", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "6af986973e4e79d48335831d02deda49", "score": "0.0", "text": "public function create()\n {\n $categories = Category::whereNull('parent_id')->get();\n\n return view('category.create', compact('categories'));\n }", "title": "" } ]
[ { "docid": "cd749a934c696538b3e099b4d2ba0015", "score": "0.7627033", "text": "public function create()\n {\n $fields = $this->getModelAttributes();\n return view('admin::resource.create', [\n 'fields' => $fields,\n 'model_name' => $this->modelName,\n ]);\n }", "title": "" }, { "docid": "f1aa5d7e46cf00cbf41bf58f5ceda0c2", "score": "0.7585289", "text": "public function create()\n {\n //Show form\n return view(\"crud.create\");\n }", "title": "" }, { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.75727344", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.75727344", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "847f31131a446a7e6b918b68e4c25931", "score": "0.75209117", "text": "public function create()\n {\n $this->authorize('create'.static::property('permissionsKey'), $this->property('model'));\n abort_unless($this->property('creatable'), 404);\n $this->initCrud('create');\n\n return view(\n 'sanjab::crud.form',\n [\n 'widgets' => $this->widgets,\n 'properties' => $this->properties(),\n ]\n );\n }", "title": "" }, { "docid": "c22dae1333d29c28ed855dcb7f069232", "score": "0.7491396", "text": "public function create()\n {\n return view('resources.create');\n }", "title": "" }, { "docid": "22c85d143923c7286b034ce76c3999f2", "score": "0.74470264", "text": "public function create()\n {\n return view('client_resources/create');\n }", "title": "" }, { "docid": "4eaea77a3f9e9b50f3e0414af79bf7a7", "score": "0.7437758", "text": "public function create()\n {\n return view('Management.form');\n }", "title": "" }, { "docid": "e9c275016c949096478e7c1212af850f", "score": "0.74231863", "text": "public function create()\n {\n return view('dashboard.resources.create');\n }", "title": "" }, { "docid": "39eb14c98184bf87cb7b9b926cd342cb", "score": "0.73501885", "text": "public function create()\n {\n return view('admin.' . $this->resource . '.edit')\n ->with('resource', $this->resource);\n }", "title": "" }, { "docid": "88695e4b149d95720c5ac55533797c54", "score": "0.73035413", "text": "public function create()\n {\n return view('libro.form');\n }", "title": "" }, { "docid": "6e94861dae8254ceeb5bf383628ede0a", "score": "0.7296088", "text": "public function create()\n {\n return view('his.form');\n }", "title": "" }, { "docid": "6cf06b4ee844ead00717499172b83025", "score": "0.72864044", "text": "public function create()\n\t{\n\n\t\treturn $this->view('form');\n\t}", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "f10c72d1d374d3db79ac1e8a9b8873a7", "score": "0.72265655", "text": "public function newAction() {\n #BreadCrumbs\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem(\"Dashboard\", $this->get(\"router\")->generate(\"admin_dashboard\"));\n $breadcrumbs->addItem(\"Pessoa\", $this->get(\"router\")->generate(\"admin_pessoa\"));\n $breadcrumbs->addItem(\"Novo\");\n\n $entity = new Pessoa();\n $form = $this->createCreateForm($entity);\n\n return $this->render('NutrirBoxBundle:Pessoa:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "6b9b7e6e4f2dbc9ec96ee045c814e5a9", "score": "0.72259897", "text": "public function create()\n {\n $resource = $this->resource->with('fields')->where('slug', $this->slug)->first();\n\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.create', compact('resource', 'hasWysiwyg', 'options'));\n }", "title": "" }, { "docid": "615e1e405829434ac8a2641e8cda70cd", "score": "0.7208444", "text": "public function create()\n {\n \n return $this->view('form');\n }", "title": "" }, { "docid": "24f9cccb94c863a3597c726aa6fbf63a", "score": "0.72051704", "text": "public function newAction()\n {\n $entity = $this->getEntity();\n $form = $this->createForm($this->getForm(), $entity);\n\n return $this->render('AdminBundle:'. $this->getEntityName() .':new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "f3c9f12e975dc77a01826c005093d6b2", "score": "0.72042", "text": "public function create()\n {\n return view('backend.school.addform');\n }", "title": "" }, { "docid": "7a3ec01c72669a385174d3ad261d470c", "score": "0.7201331", "text": "public function create()\n {\n return view('fishing.form_create');\n }", "title": "" }, { "docid": "0c04a47c6f7506359f9abcc642a0f02d", "score": "0.71757704", "text": "public function create()\n {\n $data['model'] = $this->model;\n $data['routeResource'] = $this->routeResource;\n\n return view('rasrobin\\crud::create', $data);\n }", "title": "" }, { "docid": "cf99d23ef746497f004a96ecca3a9044", "score": "0.71649086", "text": "public function create()\n {\n return view('Admin.Form.add');\n }", "title": "" }, { "docid": "32f51dcef719e9b15d121d0b155470d8", "score": "0.7145399", "text": "public function create()\n {\n return view('admin.target.forms.create');\n }", "title": "" }, { "docid": "3df2368951f0ac654c89e5a1194b65cf", "score": "0.71295273", "text": "public function create()\n {\n return view ('admin.resto.create');\n }", "title": "" }, { "docid": "e979c69b68c637bd06301921bbe0ddee", "score": "0.7129174", "text": "public function create()\n\t{\n\t\treturn view('forms.supplier');\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": "495c845ffaf7a74f790c1a203f1edc12", "score": "0.71016014", "text": "protected function showCreateForm()\n\t{\n\n\t\treturn Response::view('adm/Obs/create');\n\n\t}", "title": "" }, { "docid": "c27004d00e3f9afb85f74623ec456ca9", "score": "0.708025", "text": "public function create()\n {\n //\n return view('form');\n }", "title": "" }, { "docid": "f2ff56c20f7b7b43ea1adc235d66e0b2", "score": "0.7075744", "text": "public function create()\n {\n return view('create_new');\n }", "title": "" }, { "docid": "a55bf151cf36ab4ee4f398e16d69496e", "score": "0.70715034", "text": "public function create()\n {\n return view(\"aktuelno.create\");\n }", "title": "" }, { "docid": "bd4f863612d48ed4663bd0cdfa80052a", "score": "0.706284", "text": "public function create() {\n return view( 'allergen.create' );\n }", "title": "" }, { "docid": "25f912097858426291657ade2c3dec4d", "score": "0.70607466", "text": "public function create()\n {\n return view('clients.createForm');\n }", "title": "" }, { "docid": "6f5d674aa27746b092c1ffe7dd20d184", "score": "0.704823", "text": "public function create()\n {\n return view('form.newkamar');\n }", "title": "" }, { "docid": "6039f43b38d3c6d347e4435587e3a07f", "score": "0.7027638", "text": "public function create()\n {\n return $this->cView(\"form\");\n }", "title": "" }, { "docid": "6039f43b38d3c6d347e4435587e3a07f", "score": "0.7027638", "text": "public function create()\n {\n return $this->cView(\"form\");\n }", "title": "" }, { "docid": "128da9f8aa4b206632b5b3b35bf28ca1", "score": "0.70254", "text": "public function create()\n {\n\t\treturn view('form',array('inserido'=>false, 'insercao'=>false, 'erro'=>null));\n }", "title": "" }, { "docid": "c636af9277b006e5ea5ea872cb0d452e", "score": "0.7024831", "text": "public function create()\n\t{\n\t\treturn view('task._form');\n\t}", "title": "" }, { "docid": "9a454ee3306cfd8e58a75119a371cbdd", "score": "0.7022644", "text": "public function create()\n\t\t{\n\t\t\treturn view('create');\n\t\t}", "title": "" }, { "docid": "85517e569b653de2cbd7e2bb2b997d5f", "score": "0.7020551", "text": "public function create()\n {\n if (isset($_GET['question_id'])) {\n $question_id = $_GET['question_id'];\n $question = Question::find($question_id);\n if( $question != null){\n return view('questions/form', compact('question'));\n }\n }\n return view(\"options/form\", [\"questions\" => Question::all()]);\n }", "title": "" }, { "docid": "cbc1937258b10014f8109c79e1f724d8", "score": "0.70177096", "text": "public function create()\n {\n return view(\"reg_form\");\n }", "title": "" }, { "docid": "5d83eb8632311d18a8232b40d1af5f20", "score": "0.70038116", "text": "public function create()\n {\n //form ya ku create\n return view('create');\n }", "title": "" }, { "docid": "10d593cbbc8de65afac98fa2dd12bd96", "score": "0.69993895", "text": "public function create()\n {\n return view('.product.form');\n }", "title": "" }, { "docid": "81c896c9678449c75c1ed4277a8b80a4", "score": "0.6995233", "text": "public function create()\n\t{\n return view('settingInformation.form');\n\t}", "title": "" }, { "docid": "45d37bd0114d869b9ab659945e9c8cd8", "score": "0.69933426", "text": "public function create()\n {\n //\n return view(\"lampirans.create\");\n }", "title": "" }, { "docid": "bf554a06aa60840a36e31daa0fe31054", "score": "0.6987092", "text": "public function newAction()\n {\n $entity = new Tutor();\n $form = $this->createForm(new TutorType(), $entity);\n\n return $this->render('BdxTutoratBundle:Tutor:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "cab3875b40e1926cadf5d240d5755c33", "score": "0.69831926", "text": "public function create()\n\t{\n\t\treturn view('add');\n\t}", "title": "" }, { "docid": "6a99dd7c2b96f96c80b3b926b607b9b7", "score": "0.69826627", "text": "public function create()\n {\n // Show the page\n return view('admin.credit.create_edit');\n }", "title": "" }, { "docid": "daf28f960dad10d136b88bf0cb698afe", "score": "0.69729453", "text": "public function create()\n\t{\n\t\treturn view('siswa.add');\n\t}", "title": "" }, { "docid": "2b881c0727ec10fe41bf178ec98febc8", "score": "0.6967141", "text": "function createForm(){\n return view('user/createform');\n }", "title": "" }, { "docid": "8f4f925d144fcbd561a74f4eb50da53b", "score": "0.6965259", "text": "public function create()\n {\n $categories = $this->platFormCatRepository->all();\n return view('plat_forms.create')\n ->with('categories', $categories)\n ->with('model_required',\\Zcjy::modelRequiredParam($this->platFormRepository->model()));\n }", "title": "" }, { "docid": "9cb057d0f77e53e0cce5708d50a6481b", "score": "0.6962359", "text": "public function create()\n {\n return view('new');\n }", "title": "" }, { "docid": "a3fe703c4575f7714a79c1834083fd33", "score": "0.6960253", "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 // dd($data);\n\n return view('admin.general.add_form')->with($data);\n }", "title": "" }, { "docid": "568ea885a4e92c3f3dcc0a424d5f6c59", "score": "0.69571805", "text": "public function create()\n {\n $this->authorize('create', [Answer::class]);\n\n return view('resourceRoute.create');\n }", "title": "" }, { "docid": "1307ba3f5634143845f4c2ffe7014fc5", "score": "0.6954906", "text": "public function newAction()\n {\n //Get the form\n $form = $this->getSignupForm();\n\n //Add the form to the view\n $this->view->form = $form;\n\n }", "title": "" }, { "docid": "41eb11154e57dff75498fcf25564c134", "score": "0.6952435", "text": "public function create()\n {\n return view('admin.book.add');\n }", "title": "" }, { "docid": "7b8c9d5cbe582eab2f28c216421a2719", "score": "0.6951232", "text": "public function create()\n {\n return view('proyek.add');\n }", "title": "" }, { "docid": "5ff33c7acc97152a663cdf3160a26831", "score": "0.6947272", "text": "public function create()\n {\n return view('admin.spravochniki.request.form', [\n 'block' => false,\n 'request' => new ModelRequest(),\n ]);\n }", "title": "" }, { "docid": "e0279682128d83f057dec763451b31bc", "score": "0.6944094", "text": "public function create()\n {\n return view('product/form');\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": "7b154d4b3724cc827c62a643103ec2ef", "score": "0.69361335", "text": "public function create()\n {\n return view('fourier.formCreate');\n }", "title": "" }, { "docid": "dee653019202200b40a5bbd41642b9bf", "score": "0.6931119", "text": "public function newAction()\n {\n $this->view->form = new PeliculasForm(null, ['edit' => true]);\n }", "title": "" }, { "docid": "db32a9e40570f5e3b6f29ec12cf7bf6d", "score": "0.692986", "text": "public function create()\n {\n return view('company/form_create');\n }", "title": "" }, { "docid": "027afc753c513ccea0aa26c4efe7e954", "score": "0.69293797", "text": "public function create()\n {\n return view('admin/form');\n }", "title": "" }, { "docid": "f1bdc650376e8cc0232d73fad221368f", "score": "0.6929196", "text": "public function create()\n {\n return view('control.create');\n }", "title": "" }, { "docid": "f9dc8bac23c393a94f519f7b2fdb6be0", "score": "0.6926257", "text": "public function create()\n {\n // form goes here\n }", "title": "" }, { "docid": "c1e9c0bcb40a8fbd086627d56c99360c", "score": "0.69253355", "text": "public function create()\n {\n return view('components.etc.write_form');\n }", "title": "" }, { "docid": "a56ae1a4e831d9137638253cc26e259a", "score": "0.6914903", "text": "public function create()\n {\n return view('supir.create');\n }", "title": "" }, { "docid": "5a0f5a391b52ddb780aabb623298e0f5", "score": "0.6909269", "text": "public function create(){\n return view('restful.add');\n }", "title": "" }, { "docid": "4a1cd8958cd01307d0ecead6ac1bcc80", "score": "0.6902085", "text": "public function create()\n {\n $model = new Employee();\n $status = 0;\n\n return $this->view('employee.form', compact('model', 'status'));\n }", "title": "" }, { "docid": "0970488c3db9a5f8c034af420d11d820", "score": "0.69016725", "text": "public function create()\n\t{\n\t\t//\n\t\treturn View::make('student.create');\n\t}", "title": "" }, { "docid": "b710ac6db291a730b45046211e6cb702", "score": "0.69012576", "text": "public function create()\n\t{\n return View::make('admin/formateurs/create');\n\t}", "title": "" }, { "docid": "9bb74ea3a8eb11d7ad6b3bebfc39fbf1", "score": "0.6898137", "text": "public function create()\n {\n return view('Admin.Article.article-creation-form');\n }", "title": "" }, { "docid": "eb61327aac5a1264dae808299a9ae828", "score": "0.6894682", "text": "public function create()\n\t{\n\t\treturn View::make('registrasi.create' );\n\t}", "title": "" }, { "docid": "2984acd37c1bc542eca26984c45d8465", "score": "0.6892525", "text": "public function create()\n {\n return view('admin.karlcrud.create');\n }", "title": "" }, { "docid": "a43ba09f835dbd27d4a3433e6207db17", "score": "0.6891616", "text": "public function create()\n {\n return view('admin.car.create');\n }", "title": "" }, { "docid": "e9341a1375b53713ef8760a5689b525f", "score": "0.68912005", "text": "public function create()\n {\n return view('bookself.create');\n }", "title": "" }, { "docid": "b58ff924b3a3f9910b1eeae648a9a2fa", "score": "0.6889643", "text": "public function create()\n {\n return view('devoirs.create');\n }", "title": "" }, { "docid": "bdb0161d2f2f44cdaea93bf890a4c02e", "score": "0.68880934", "text": "public function create()\n {\n return view(\"create\");\n }", "title": "" }, { "docid": "7311ea20d7522de0066ea36a19e7cd20", "score": "0.6884048", "text": "public function create()\n {\n //\n return view('atg-form');\n }", "title": "" }, { "docid": "a6e6c7bffb5d673576a15ca1abf51092", "score": "0.6879282", "text": "public function create()\n {\n return view('collections.form');\n }", "title": "" }, { "docid": "ffbbc91eecacd009ec1b4248cab90dff", "score": "0.6879207", "text": "public function create() // atsakinga uz formos atvaizdavima, kuri leidzia sukurti irasus\n {\n return view (\"author.create\");\n }", "title": "" }, { "docid": "0c01c590097437f9d4700db1096060fa", "score": "0.6879102", "text": "public function create()\n {\n return view($this->view_path.'.form',['form_type' => 'create']);\n }", "title": "" }, { "docid": "71d70dee3fbb8a46b70d495d78e89449", "score": "0.68789995", "text": "public function create() {\n\t\treturn view( 'product.create' );\n\t}", "title": "" }, { "docid": "207e541fffe4606f7ae315a88e21fc10", "score": "0.68782616", "text": "public function create()\n\t{\n\t\treturn View::make('backend.referrers.create');\n\t}", "title": "" }, { "docid": "b4525945bdcd19e970b4d9b86a6193ce", "score": "0.68777317", "text": "public function createAction() {\n $post_request = (array) $this->postZingRequest();\n\n /** Handle the request */\n $errors = $this->_handleRequest($post_request);\n\n return $this->renderAdmin('ZingCorePageBundle:Default:form.html.twig', array_merge(\n array(\n 'zing_form_action' => 'Create',\n 'zing_form_errors' => $errors,\n 'post_request' => $post_request\n ),\n $post_request\n ));\n }", "title": "" }, { "docid": "7c346379a95657009b35746ed2305722", "score": "0.6877182", "text": "public function create()\n\t{\n\t\treturn View::make('catalogue.create');\n\t}", "title": "" }, { "docid": "f7304e6dc56cce3d9947b5ce6729aa85", "score": "0.6873777", "text": "public function create()\n\t{\n\t\treturn View::make('licenza.create');\n\t}", "title": "" }, { "docid": "ebdce886eb2fdbea3a87d3f3b92db918", "score": "0.6873244", "text": "public function create()\n {\n return view(\"nomina.create\");\n }", "title": "" }, { "docid": "42c131d9eade9523c90b6cdedaacbe70", "score": "0.6871986", "text": "public function create()\n {\n return view('auditors.form');\n }", "title": "" }, { "docid": "56017529546e8304e804a9b51074a4d9", "score": "0.6871903", "text": "public function create()\n {\n $title = 'Author';\n $custom_cat = 'authors';\n return view('admin.backend.authors.authorForm',compact('title','custom_cat'));\n }", "title": "" }, { "docid": "dbb47aeadc4da817ea8f9487995cf297", "score": "0.6867221", "text": "public function create()\n {\n return view('backend.information.create');\n }", "title": "" }, { "docid": "f3629c028fcfa177b464594dc370290b", "score": "0.6863994", "text": "public function create()\n {\n return view('admin.marcas.form');\n }", "title": "" }, { "docid": "93c1d848ae6ff8f424b0a9a3772d1840", "score": "0.68612427", "text": "public function create()\n {\n return view('Article.form');\n }", "title": "" }, { "docid": "5076aaebcae577af1526cd70d2c2b11a", "score": "0.68612194", "text": "public function create()\n {\n //\n return view('supir.create');\n }", "title": "" }, { "docid": "5ca8f4f60f43f710ad0b3d2ef4278141", "score": "0.68609405", "text": "public function create()\n {\n return view(\"students/add\");\n }", "title": "" }, { "docid": "7b28f26445b6881c693a90b24ca99ad8", "score": "0.6859603", "text": "public function create()\n {\n return view('manage.create');\n }", "title": "" }, { "docid": "45ce62ff3c2da4026a5253e3e69dc4cb", "score": "0.68594766", "text": "public function create()\n {\n Gate::authorize('admin-carreras');\n return view('carrera.carrera-form');\n }", "title": "" }, { "docid": "6a2d5b23c14939fb07f566dfcff1ba71", "score": "0.68588877", "text": "public function create()\n {\n return view('student.student.create');\n }", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "b5d4a5cd5dc542f241d9b9ebd9f5cd07", "score": "0.0", "text": "public function update(CommentRequest $request, Post $post, Comment $comment)\n {\n $comment->title = $request->filled('title') ? $request->title : $comment->title;\n $comment->body = $request->filled('body') ? $request->body : $comment->body;\n $comment->parent_id = $request->filled('parent_id') ? $request->parent_id : $comment->parent_id;\n $comment->update();\n\n $post->comments()->save($comment);\n\n return new CommentResource($comment);\n }", "title": "" } ]
[ { "docid": "f545a797c88e6fde5b59e76b35b0e4dd", "score": "0.74549645", "text": "public function update($id, $resource);", "title": "" }, { "docid": "e3f351fcd5ab99bae755f96203d9604b", "score": "0.7443162", "text": "public function updated(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "3ec7b0acf0381980ced680019309568a", "score": "0.6744378", "text": "public function update() {\n\n // Does the Resource object have an ID?\n if ( is_null( $this->id ) ) trigger_error ( \"Resource::update(): Attempt to update an Resource object that does not have its ID property set.\", E_USER_ERROR );\n \n // Update the Resource\n $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\n $sql = \"UPDATE resource SET url=:url, themeId=:themeId, contact=:contact WHERE id = :id\";\n $st = $conn->prepare ( $sql );\n $st->bindValue( \":url\", $this->url, PDO::PARAM_STR );\n $st->bindValue( \":themeId\", $this->themeId, PDO::PARAM_INT );\n $st->bindValue( \":contact\", $this->contact, PDO::PARAM_STR );\n $st->bindValue( \":id\", $this->id, PDO::PARAM_INT );\n $st->execute();\n $conn = null;\n }", "title": "" }, { "docid": "7eab299ac25f58662eb17a6207bbdeef", "score": "0.67144877", "text": "private function updateResource($resource): void\n\t{\n\t\timagedestroy($this->resource);\n\t\t$this->resource = $resource;\n\n\t\timagealphablending($this->resource, false);\n\t\timagesavealpha($this->resource, true);\n\n\t\t$this->updateSizeInfo();\n\t}", "title": "" }, { "docid": "337a73fafa9c60c109d0e0fb18b16428", "score": "0.6513111", "text": "public function update(Storages $request, $id)\n {\n $entry = Storage::findOrFail($id);\n\n $entry->fill($request->all());\n\n $entry->save();\n\n return redirect('/storages/'.$id.'/edit');\n }", "title": "" }, { "docid": "2a532e323886cdeee4fdc191ad2a127e", "score": "0.64721876", "text": "public function update(ResourceRequest $request, Resource $resource)\n {\n //\n\t\t\t\t$resource->name= $request->name;\n\t\t\t\t$resource->url= $request->url;\n\n\t\t\t\t\treturn response()->json([\n\t\t\t\t\t\t'updated'=>$resource->save()\n\t\t\t\t\t]);\n }", "title": "" }, { "docid": "b4a169f9a3d901a01f32f1071fdf2091", "score": "0.6462599", "text": "public function update(Request $request, Storage $storage)\n {\n \n $storage->name = $request->input('name');\n $storage->codigo = $request->input('codigo');\n $storage->active = $request->input('active');\n $storage->save();\n\n return redirect('/storages')->with('message','update');\n }", "title": "" }, { "docid": "dde275288f11a04dfd12a4da06e0b6b6", "score": "0.6404118", "text": "public function put($resource, $arOptions);", "title": "" }, { "docid": "d14f3b67a32851152c09abd22392f6ca", "score": "0.6295373", "text": "public function update(OurResourceRequest $request,OurResource $ourResource)\n {\n try {\n $file = $request->file('images');\n $inputs = $request->all();\n\n if($file) {\n $inputs['images'] = $this->uploadImages($request->file('images'));\n } else {\n $inputs['images'] = $ourResource->images;\n $inputs['images']['thumb'] = $inputs['imagesThumb'];\n\n }\n\n unset($inputs['imagesThumb']);\n $ourResource->update();\n\n return redirect(route('ourresource.index'));\n } catch (\\Exception $exception) {\n Log::error($exception);\n }\n }", "title": "" }, { "docid": "3f88464873b841b9046a2a5852122431", "score": "0.6265043", "text": "public function update(Request $request, LibResource $resource)\n {\n $this->abort_if_not_permited();\n $data = $this->validate($request, [\n 'res_title' => 'required',\n 'res_subject' => 'required',\n 'res_author' => 'required',\n 'res_department_id' => 'required',\n 'res_type_id' => 'required'\n ]);\n\n if($request->res_type_id != $resource->res_type_id) {\n $oldFolder = LibResourceType::find($resource->res_type_id)->res_type;\n $newFolder = LibResourceType::find($request->res_type_id)->res_type;\n\n Storage::disk('library')->move($oldFolder.'/'.$resource->res_files, \n $newFolder.'/'.$resource->res_files);\n\n Storage::disk('library')->move($oldFolder.'/' .'cover/'.$resource->res_cover, \n $newFolder.'/' .'cover/'.$resource->res_cover);\n }\n \n $resource->update($data);\n return $resource;\n }", "title": "" }, { "docid": "37aa707a5d1cf3d2b73c5d32bea86169", "score": "0.62426656", "text": "public function update($resource, array $data)\n {\n $this->validate($data, $resource);\n return $resource->update($data);\n }", "title": "" }, { "docid": "96f9e6fdcf8c5b9b43c1f9a96134f2bf", "score": "0.6203198", "text": "public function updateStream(string $path, $resource, array $config = []): void;", "title": "" }, { "docid": "0b9df105daf9d4dddca1b265bf150fd3", "score": "0.6093648", "text": "public function updateResource($res, Request $request) {\n $rules = array(\n 'details' => 'required|string|max:1000',\n 'image' => 'image|max:4096',\n 'link' => 'string|nullable'\n );\n\n $error = Validator::make($request->all(), $rules)->validate();\n\n $resource = SiteImage::findOrFail($res);\n\n \n\n if(!$request->hasFile('image')) {\n \n // IMAGE NOT CHANGED\n \n $data = array(\n 'image_details' => $request->details\n );\n\n } else {\n \n // IMAGE CHANGED\n \n // UPLOAD IMAGE\n $image = $request->file('image');\n $new_name = rand() . '.' . $image->getClientOriginalExtension(); // Name of new Image\n $destination_path = \"/images/static\";\n\n\n \n $resize_image = Image::make($image->getRealPath());\n\n //return response()->json(['errors' => [$destination_path . '/' . $new_name]]);\n $resize_image->save(public_path($destination_path . '/' . $new_name));\n\n\n $old_image_path = $resource->image_ref;\n\n /*if(File::exists(public_path() . $old_image_path)) {\n File::delete(public_path() . $old_image_path);\n }*/\n\n $data = array(\n 'image_ref' => '/images/static/' . $new_name,\n 'image_details' => $request->details\n ); \n\n \n }\n\n if($request->link) $data['link'] = $request->link;\n $resource->update($data);\n\n return View('backoffice.pages.edit_resource', ['resource' => $resource]);\n \n }", "title": "" }, { "docid": "0f413897f49a592f566edc4499283b2c", "score": "0.603257", "text": "public function storageUpdateAction(){\n\t\t$this->setDialogAction();\n\t\t$storage_id = $this->getParam('storage_id');\n\t\t$filename = $this->getParam('filename');\n\t\t$ext = $this->getParam('ext');\n\t\t$type = $this->getParam('type');\n\t\t\n\t\t$storage = $this->fileSources->get($storage_id);\n\t\t$sources = $this->fileSources->getList();\n\t\t$this->view->sources = $sources;\n\t\t$this->view->storage = $storage;\n\t\tif(!empty($ext)) $filename = $filename.\".\".$ext;\n\t\t$this->view->filename = $filename;\n\t\t$this->view->type = $type;\n\t}", "title": "" }, { "docid": "3c13e0ec8368dde371325db1b8b227e5", "score": "0.5949601", "text": "public function update(Request $request, $id)\n {\n //\n // si exxiste la array de recursos\n if ( $request->session()->exists('resources')){\n \n // obtenemos los valores del array de recursos\n $resources = $request->session()->get('resources');\n \n if(isset($resources[$id])){\n \n $resource = $resources[$id];\n \n // Elimina la posicion del array, y se reajusta el array\n ;\n $nameInput=$request->input('name');\n $priceInput=$request->input('price');\n \n // si no has editado nada, vuelve de nuevo\n if($nameInput==$resource['name'] && $priceInput==$resource['price']){\n // return redirect('store')->with('message', 'You have not applied any changes to the product!');\n return back()->withInput();\n }\n \n $resource['id']=$id;\n $resource['name']=$nameInput;\n $resource['price']=$priceInput;\n \n $resources[$id]=$resource; \n \n // meter ese array en tu sesion \n $request->session()->put('resources', $resources);\n \n return redirect('store')->with('message', 'The product has been edited successfully!'); // es lo mismo que resource ¿ que hace el redirect)\n }\n }\n return back()->withInput();\n }", "title": "" }, { "docid": "47f5a0f9058e305083b50269e28fc738", "score": "0.59487104", "text": "public function update(Request $request, $resource)\n {\n try { \n $resource->update($request->all());\n watch(__('update card type'), \"fa fa-card\");\n return responseJson(1, __('done'), $resource);\n } catch (\\Exception $e) {\n return responseJson(0, $e->getMessage());\n }\n }", "title": "" }, { "docid": "776da8c96f4aa34eec52175bc485cecd", "score": "0.59405017", "text": "public function update($id, UpdateResourceRequest $request)\n {\n $resource = $this->service->find($id);\n if(empty($resource))\n {\n Flash::error('Resource não encontrado');\n return redirect(route('resources.index'));\n }\n\n $resource = $this->service->update($request->all(), $id);\n Flash::success('Resource atualizado com sucesso.');\n return redirect(route('resources.index'));\n }", "title": "" }, { "docid": "1967dfef2308a54917abee94f5fb2fe9", "score": "0.5922663", "text": "public function updateStream($path, $resource, Config $config) {\n // TODO: Implement updateStream() method.\n }", "title": "" }, { "docid": "d3213bec1042b484f9e7c8a52c4ef16a", "score": "0.58999914", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "b5bcf23d212ba01a7fca11f3cf632111", "score": "0.5896195", "text": "public function update(ResourceRequest $request, $id)\n {\n try {\n $resource = $this->resource->find($id);\n $resource->update($request->all());\n\n flash('Recurso atualizado com sucesso!')->success();\n return redirect()->route('resources.index');\n\n } catch (\\Exception$e) {\n $message = env('APP_DEBUG') ? $e->getMessage() : 'Erro ao processar atualização...';\n\n flash($message)->error();\n return redirect()->back();\n }\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5890722", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "1b6228f28970b633590b97318fca00a2", "score": "0.5875679", "text": "function resource_update($id, $options) {\n $options['id'] = $id;\n return $this->_post_request('resource_update', $options);\n }", "title": "" }, { "docid": "f2c455344d9c8883e1e991918cdb4313", "score": "0.586725", "text": "public function update(Request $request, $id)\n {\n request()->validate([\n 'title' => ['required', 'string'],\n 'description' => ['required', 'string'],\n 'image' => 'required',\n ]);\n\n $imageName = time().'.'.request()->image->getClientOriginalExtension();\n request()->image->move(public_path('images'), $imageName);\n\n resource::find($id)->update([\n 'title' => $request->title,\n 'description' => $request->description,\n 'image' => $imageName\n ]);\n return back()->with('success','You have successfully update the resource.');\n }", "title": "" }, { "docid": "4316a587c5ca6fb49a7ce41a46a24ed8", "score": "0.5850647", "text": "public function update( $resourcePath, Array $body=[]) {\n return $this->callResource( 'put', $resourcePath, ['body'=>$body]);\n }", "title": "" }, { "docid": "59c6239c448624b3108c46073757b01e", "score": "0.58493763", "text": "public function update(StoreProductRequest $request, $id)\n {\n DB::beginTransaction();\n try {\n $product = Product::find($id);\n if ($product) {\n $data = $request->safe()->except(['image']);\n\n $imageUrl = $this->storeFile($request, $product->id);\n if (!empty($imageUrl))\n $data['image_url'] = $imageUrl;\n\n $product->update($data);\n DB::commit();\n\n return new ProductResource($product);\n }\n return response()->json(['data' => 'Product not found.'], 404);\n } catch (Exception $e) {\n DB::rollback();\n\n return response()->json($e->getMessage());\n }\n }", "title": "" }, { "docid": "500de3817809ac92f35634ac93419bfe", "score": "0.58382034", "text": "public static function update($resource, $request)\n {\n static::fillAttributes($resource, $request);\n static::fillBoolean($resource, $request);\n\n static::updateBelongsTo($resource, $request);\n\n $resource->save();\n\n static::updateBelongsToMany($resource, $request);\n\n return $resource;\n }", "title": "" }, { "docid": "e8f642c1357eaca6a51e747722c28e9a", "score": "0.58338976", "text": "protected function save($resource) {\n if (isset($resource['public_id'])) {\n $this->redis->set($resource['public_id'], $resource);\n }\n }", "title": "" }, { "docid": "2cf80d6b1d66cb9fd56bf8c18c026e8f", "score": "0.5824176", "text": "public function update(Request $request, $id)\n {\n $path = Product::find($id)->filename;\n $filename = $request->file('image');\n\n if(!($filename === null)) {\n $path = $request->file('image')->store('id/'.$request->input('user_id').'/products/images', 's3');\n }\n\n Product::find($id)->update([\n 'name' => $request->input('name'),\n 'description' => $request->input('description'),\n 'price' => $request->input('price'),\n 'amount' => $request->input('amount'),\n 'filename' => basename($path),\n 'url' => Storage::disk('s3')->url($path),\n ]);\n return redirect()->route('products.index');\n\n\n\n\n\n\n\n\n\n\n }", "title": "" }, { "docid": "07c7bceecf971da3d703020e3b86857c", "score": "0.57805496", "text": "public function update ($data) {}", "title": "" }, { "docid": "07c7bceecf971da3d703020e3b86857c", "score": "0.57805496", "text": "public function update ($data) {}", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.57525045", "text": "public function update($entity);", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.57525045", "text": "public function update($entity);", "title": "" }, { "docid": "01a05836a30a03daa266194238513ef3", "score": "0.5742325", "text": "public function update(Request $request, $id){\n $slider = Slider::find($id);\n \n if($request->hasFile('image')){\n $slider->image = $request->image->store('sliders',['disk' => 'public']); \n }\n \n $slider->link = $request->link;\n $slider->save();\n\n return new JsonResponse([\n 'status' => 'success',\n 'message' => 'Slider updated successfully'\n ]);\n }", "title": "" }, { "docid": "bb8e19272e0561c14ce70c3a793ec51a", "score": "0.57381696", "text": "public function update(Request $request, $id)\n {\n\n $data = Product::where('id', $id)->first();\n // 判斷是否上傳圖片\n if ($request->hasFile('img')) {\n\n // 刪除照片\n // 用一個變數代替要刪除的圖片名\n $old_image = $data->img;\n //public_path()指從public這個路徑開始\n File::delete(public_path() . '/storage/' . $old_image);\n // 儲存新照片\n $file_name = $request->file('img')->store('', 'public');\n // 將新照片的路徑存起來 回存\n $data->img = $file_name;\n }\n\n $data->kinds = $request->kinds;\n $data->sort = $request->sort;\n $data->save();\n return redirect('home/product');\n\n // 這筆request 含有 method 與token 這兩筆欄位資料\n // except 例外處理 將括號內的欄位去除\n // $tt = $request->except('_token','_method');\n // where(指定) id =$id 這筆 進行 更新內容($tt)\n // Product::where('id',$id)->update($tt);\n // $data = Product::where('id', $id)->first();\n // // 先做賦值得動作 在做儲存\n // $data->img = $request->img;\n // $data->kinds = $request->kinds;\n // $data->save();\n // return redirect('home/product');\n }", "title": "" }, { "docid": "30790b56c47f44ba2fcdcad444e0ebf5", "score": "0.57262063", "text": "public function update(Stock $request, $id)\n {\n $stock_cosmetic = StockCosmetic::find($id);\n\n $stock_cosmetic->product = $request->input('product');\n $stock_cosmetic->color = $request->input('color');\n $stock_cosmetic->brand = $request->input('brand');\n $stock_cosmetic->price = $request->input('price');\n $stock_cosmetic->save();\n // image\n if ($request->hasFile('image') && $request->file('image')->isValid()) {\n $path = $request->image->storePubliclyAs('/stock', $stock_cosmetic->id . '.jpg', ['disk' => 's3']);\n $stock_cosmetic->image = $path;\n $stock_cosmetic->save();\n }\n\n return redirect('stock_cosmetics/list_of_stock/{user_id}/stock_cosmetics');\n }", "title": "" }, { "docid": "68611877d8742448025a8506ebac8d13", "score": "0.5723295", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "title": "" }, { "docid": "7ed06fd4c3033e66778142b41027c241", "score": "0.57009596", "text": "public function editResource($resource, array $data)\r\n\t{\r\n\t\t$resourceType = __NAMESPACE__.'\\\\Driver\\\\'.$this->identify($resource);\r\n\t\t$cr = new $resourceType($resource);\r\n\t\t$cr->save($data);\r\n\t}", "title": "" }, { "docid": "98ed855cdf6798411cf49ba631a664ec", "score": "0.56952107", "text": "public function setResource($resource)\n {\n }", "title": "" }, { "docid": "1d541312c2378377a67b8bc814d61521", "score": "0.5689462", "text": "public function update(Request $request, $id)\n {\n $update = Project::find($id); \n\n Storage::disk('public')->delete('img/'. $update->src);\n $update->nom = $request->nom; \n $update->description = $request->description; \n $update->tag = $request->tags; \n \n $update->save();\n $request->file('src')->storePublicly('img','public');\n \n return redirect()->back(); \n }", "title": "" }, { "docid": "15c077d64c9ceb586f671a09513b8246", "score": "0.5682459", "text": "public function update(Request $request, $id)\n {\n $row = Product::find($id);\n if($row) {\n $oldimage = $row->image;\n $row->title = $request->title;\n $row->slug = str_replace(' ', '-', strtolower($request->title));\n $row->category_id = $request->category_id;\n $row->brand_id = $request->brand_id;\n $row->price = $request->price;\n $row->content = $request->content;\n $row->image = $oldimage;\n\n if($request->image){\n if($_FILES['image']['error'] == 0) {\n $filename = time() . '_' . $_FILES['image']['name'];\n\n $image = 'uploads/' . $filename;\n\n $destination = public_path($image) ;\n\n $is_uploaded = move_uploaded_file($_FILES['image']['tmp_name'], $destination);\n\n if($is_uploaded) {\n if(is_file(public_path($oldimage))) {\n unlink(public_path($oldimage));\n }\n $row->image = '/' . $image;\n }\n }\n }\n\n $row->save();\n }\n return redirect()->back();\n\n }", "title": "" }, { "docid": "359f6b66cab79746b3c9bb9ba71db220", "score": "0.56804216", "text": "public function update(ProductRequest $request, Product $product)\n {\n// $product->productsHistory()->save($product->except('image', 'vendor_id'));\n tap($product)->update([\n 'name' => $request->input('product.name'),\n 'vendor_id' => $request->input('product.vendor_id'),\n 'description' => $request->input('product.description'),\n 'price' => $request->input('product.price'),\n 'cost' => $request->input('product.cost'),\n 'image' => $request->input('product.image'),\n ]);\n dispatch(new CacheData(auth()->user()));\n return new ProductAllDataResource($product);\n }", "title": "" }, { "docid": "e08e873b4ef207afab432dfb5491c0cf", "score": "0.5677409", "text": "public function update(Request $request, $id)\n {\n $producto = Producto::findOrFail($id);\n $dataProducto=json_decode($request->producto,true);\n if($producto->foto != $dataProducto['foto']){\n Storage::delete($producto->foto);\n $file=$request->file('archivo');\n $ruta=$file->storeAs('img',time() . $file->getClientOriginalName(),'public');\n $producto->foto=$ruta;\n }\n $producto->nombre=$dataProducto['nombre'];\n $producto->detalle=$dataProducto['detalle'];\n $producto->precio=$dataProducto['precio'];\n $producto->asociado_id=$dataProducto['asociado_id'];\n if($producto->save()){\n return new ProductoResource($producto);\n }\n }", "title": "" }, { "docid": "77c5abc6b152e12d927f19d28ebfa590", "score": "0.5673537", "text": "public function updateStorageService($name, $options);", "title": "" }, { "docid": "9025ceea51e126c303a0cefd6bb34e4e", "score": "0.56732917", "text": "public function update(Request $request, Product $product)\n {\n $product->update($request->all());\n\n if($request->file('file')){\n $url = Storage::put('products', $request->file('file'));\n if($product->image){\n Storage::delete($product->image->url);\n\n $product->image()->update([\n 'url' => $url\n ]);\n }\n else{\n $product->image()->create([\n 'url' => $url\n ]);\n }\n }\n return redirect()->route('admin.products.index', $product)->with('Exito2','¡Se ha actualizado el producto con exito! ');\n}", "title": "" }, { "docid": "5b824457eb3318778d2a67f1f5dfc4ff", "score": "0.5671616", "text": "public function update(Request $request, $id)\n {\n //actualizar procducts\n\n $product =Product::findOrFail($id,);\n $product-> name=$request->input('name');\n $product-> price=$request->input('price');\n $product-> save();\n return new ProductResource($product);\n\n\n\n }", "title": "" }, { "docid": "09bd4dd53076527911b91beb82f9c3a4", "score": "0.56539524", "text": "public function update(Request $request, $id)\n {\n //\n $product_data=request()->except(['_token','_method']);\n \n if ($request->hasFile('Image_path')) {\n # code...\n $product = Products::findOrFail($id);\n Storage::delete('public/'.$product->Image_path);\n $product_data['Image_path']=$request->file('Image_path')->store('uploads', 'public');\n \n }\n Products::where('id','=',$id)->update($product_data);\n\n //$product = Products::findOrFail($id);\n //return view('products.edit', compact('product'));\n return redirect('productos')->with('Message','Producto modifiado con exito.');\n }", "title": "" }, { "docid": "d1bfc26f51571559d08876ca1ee1e3c3", "score": "0.565382", "text": "public function updateStream($path, $resource, $config = null)\n {\n return $this->uploadStream($path, $resource, WriteMode::force());\n }", "title": "" }, { "docid": "bd335a6afd825ec9c0e9d48a8ae6ad74", "score": "0.56527406", "text": "public function update(Request $request, $id)\n {\n $product = Product::findOrFail($id);\n\n $product->description = $request->description;\n $product->price = $request->price;\n $product->type = $request->type;\n $product->qty = $request->qty;\n\n if($request->hasFile('imglink')){\n $avatar = $request->file('imglink');\n $filename = time(). '.' . $avatar->getClientOriginalExtension();\n Image::make($avatar)->resize(300, 300)->save( public_path('/img/' . $filename ) );\n\n $product->imglink = $filename;\n }\n\n $product->update();\n\n //$product = Product::paginate(10);\n //return view('products.products', compact('products'));\n return redirect('products');\n }", "title": "" }, { "docid": "b12ae77c453a22ab164b3b8004dd9fdf", "score": "0.56446284", "text": "public function update($name, $object);", "title": "" }, { "docid": "792447dfa646026b3e9533c56a80e725", "score": "0.564", "text": "public function updateStream ($path, $resource, Config $config)\n {\n return $this->writeStream ($path, $resource, $config);\n }", "title": "" }, { "docid": "6120bba94c23aff61a9143580e98d499", "score": "0.5634615", "text": "public function update(Request $request, $id)\n {\n $resource = Resource::find($id);\n if ($resource) {\n if ($request->user()->cannot('update-resource', $resource)) {\n abort(403);\n }\n\n $this->sanitizeInput($request);\n $validator = $this->validator($request->all(), $id);\n\n if ($validator->fails()) {\n return redirect(route('resource.edit', ['id' =>$resource->id]))\n ->withInput()\n ->withErrors($validator);\n }\n\n $resource->title = $request->input('title');\n $resource->link = $request->input('url');\n $resource->cat_id = $request->input('category');\n $resource->description = $request->input('description');\n $resource->save();\n\n return redirect(route('index'))->with('status', 'Resource Updated Successfully');\n }\n abort(404);\n }", "title": "" }, { "docid": "e975cdf5e9d326eb5b73dc2a9ed53878", "score": "0.5629534", "text": "public function updateResource(string $link, array $data = null): string\n {\n $payload = ['json' => $data];\n\n $this->connectToFiken($link, 'PUT', $payload);\n\n // Fiken returns an empty body on successful updates, so we just return the link to the updated resource\n return $link;\n }", "title": "" }, { "docid": "6bbc6190ab101a78c810c8657a536fb8", "score": "0.56255704", "text": "public function update( $params = array() ) {\n\t\tif ( !is_array( $params ) ) {\n\t\t\terror_log( __METHOD__ . '() $params provided are not an array' );\n\t\t\tthrow new Exception( 'parameter type error', 1 );\n\t\t}\n\n\t\t$mode = 'a';\n\n\t\tif ( !empty( $params['mode'] ) && is_string( $params['mode'] ) ) {\n\t\t\t$mode = filter_var( $params['mode'], FILTER_SANITIZE_STRING );\n\t\t}\n\n\t\t$fp = @fopen( $params['storage_path'] . '/' . $params['filename'], $mode );\n\n\t\tif ( $fp ) {\n\t\t\t$bytes = fwrite( $fp, $params['content'] );\n\t\t} else {\n\t\t\terror_log( __METHOD__ . '(), could not update [' . $params['filename'] . ']' );\n\t\t\tthrow new Exception( 'could not update a resource', 12 );\n\t\t}\n\n\t\treturn fclose( $fp );\n\t}", "title": "" }, { "docid": "b0976d68e90a64aa5595f98c7a413119", "score": "0.5621308", "text": "public function update(QStore $request, $id)\n {\n //\n }", "title": "" }, { "docid": "1ca4d9d9f232ed11815a13afa8452939", "score": "0.56211114", "text": "public function update(Request $request, $id)\n {\n $request->validate([ \n 'title' => 'required|min:10|max:190',//specify the table name in the database for unique validation \n 'file_path'=>'required', \n 'body' => 'required|min:50' \n ]);\n $res = Ressource::findOrFail($id);\n $res->title = $request['title'];\n $res->image_path = $request['image_path'];\n $res->file_path = $request['file_path'];\n $res->body = $request['body'];\n $res->update();\n\n return redirect('manage_ressources');\n }", "title": "" }, { "docid": "1e16c5691c8e2eef352403af3df19b93", "score": "0.561985", "text": "public static function update($resources){\n\t\t$db=Db::getConnect();\n\t\t$update=$db->prepare('UPDATE resources SET name=:name, description=:description,\n\t\t\tlocation=:location, image=:image WHERE id=:id');\n\t\t$update->bindValue('name', $resources->getName());\n\t\t$update->bindValue('description',$resources->getDescription());\n\t\t$update->bindValue('location',$resources->getLocation());\n\t\t$update->bindValue('image',$resources->obtenerImagen());\n\t\t$update->bindValue('id',$resources->getId());\n\t\t$update->execute();\n\t}", "title": "" }, { "docid": "ad1ca99be415c735a2ef2f4128a1f1c0", "score": "0.56082803", "text": "public function update(StorageProductRule $request, Product $product)\n {\n $this->product->UpdateProduct($request,$product);\n return redirect()->route('product.index')->with('message','Product updated successfully!');\n }", "title": "" }, { "docid": "a2ddcd85128f60ff32a767eb3d311bd4", "score": "0.56082344", "text": "public function update(Request $request, $id)\n {\n $this->validate(request(),[\n 'title' => 'required',\n 'desc' => 'required',\n 'category_id' => 'required|integer',\n 'price' => 'required|regex:/^[0-9]+(\\.[0-9][0-9]?)?$/',\n 'image' => 'image|max:2000',\n ]);\n\n $product = Product::findOrFail($id);\n\n $s3 = Storage::disk('s3');\n $image = request()->image;\n\n $product->title = $request->get('title');\n $product->desc = $request->get('desc');\n $product->category_id = $request->get('category_id');\n $product->price = $request->get('price');\n\n if ($image != null)\n {\n $path = $s3->putFileAs('product_images/'.$product->user_id, $image, $image->getClientOriginalName() , 'public');\n $product->imageLocation = Storage::disk('s3')->url($path);\n }\n $product->save();\n return redirect(\"/userproducts/$product->user_id\");\n }", "title": "" }, { "docid": "1ceaeb30b587b555369c4247fb10e594", "score": "0.5603278", "text": "public function putAction()\n {\n $t = $this->createTable();\n $this->record = $t->load($this->getRequest()->getInt('_id'));\n $vars = $this->getRequest()->getParams();\n if (!empty($vars['nested']))\n {\n $this->_nestedInput = $vars['nested'];\n unset($vars['nested']);\n }\n $this->setForUpdate($this->record, $vars);\n $this->record->update();\n $this->updateNested($this->record, $vars);\n $this->apiOutRecords(array($this->record));\n }", "title": "" }, { "docid": "4a62a78ed2019e37a1f11273a9e45c02", "score": "0.55921906", "text": "public function putAction() {\n $token = $this->_getParam('token', 0);\n $id = $this->_getParam('id', 0);\n if (ZendX_Utilities_SecurityWSCheck::isValid($token)) {\n $id = $this->_getParam('id', 0);\n\n $this->view->id = $id;\n $this->view->params = $this->_request->getParams();\n $this->view->message = sprintf('Resource #%s was Updated', $id);\n $this->_response->ok();\n } else {\n// $this->view->message = sprintf('Forbidden', $id);\n $this->_response->forbidden();\n }\n }", "title": "" }, { "docid": "ab9ec1cab0ba86404b7b85cde684c6b8", "score": "0.558271", "text": "public function update(Request $request, $id)\n {\n $image = Image::findOrfail($id);\n $image->fill($request->all());\n\n if($request->hasFile('path'))\n {\n $path = $request->file('path')->store('public');\n $image->fill(['path' => $path]);\n \n }\n $image->save();\n\n return redirect()->route('images.index')->with('info', 'Imagen editada exitosamente');\n }", "title": "" }, { "docid": "1571f300ade8156825f5ac0eb703bea0", "score": "0.5582257", "text": "public function testResourcesCanBeUpdated(): void\n {\n $admin = User::factory()->admin()->create();\n $resource = Resource::factory()->create();\n\n $response = $this->actingAs($admin)->put('resources/'.$resource->id, [\n 'name' => 'New Resource Name',\n ]);\n\n $response->assertRedirect('/resources');\n $this->assertDatabaseHas('resources', [\n 'name' => 'New Resource Name',\n ]);\n }", "title": "" }, { "docid": "b493f0ac75566bd77b9da4733fecab90", "score": "0.5582209", "text": "public function updateResource(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'resource_id' => 'required|exists:trip_resources,id',\n 'user_id' => 'required|exists:publishers,id',\n 'type' => 'required|in:vedio,image',\n 'desc' => 'nullable',\n 'resource' => 'nullable|max:30000000',\n 'lat' => 'required',\n 'lng' => 'required',\n 'address' => 'required'\n\n ]);\n if ($validator->passes()) {\n $resource = TripResource::find($request['resource_id']);\n\n if ($resource->trip->publisher_id == $request['user_id']) {\n $resource->type = $request['type'];\n $resource->desc = $request['desc'];\n $resource->lat = $request['lat'];\n $resource->lng = $request['lng'];\n $resource->address = $request['address'];\n if ($request['resource']) {\n File::delete('uploads/tripResources/' . $resource->resource);\n if ($request['type'] == \"image\") {\n $photo = $request->resource;\n $name = date('d-m-y') . time() . rand() . '.' . $photo->getClientOriginalExtension();\n Image::make($photo)->save('uploads/tripResources/' . $name);\n } else {\n $vedio = $request->resource;\n $name = date('d-m-y') . time() . rand() . '.' . $vedio->getClientOriginalExtension();\n $vedio->move(public_path('uploads/tripResources'), $name);\n }\n $resource->resource = $name;\n }\n $resource->update();\n $msg = $request['lang'] == 'ar' ? ' تم التعديل.' : ' update sucessful.';\n return response()->json(\n [\n 'status' => true,\n 'data' => \"\",\n 'msg' => $msg\n ]\n );\n } else {\n $msg = $request['lang'] == 'ar' ? ' المستخدم لايملك هذه الرحله.' : ' user not owner the trip.';\n return response()->json(\n [\n 'status' => false,\n 'data' => \"\",\n 'msg' => $msg\n ]\n );\n }\n\n } else {\n foreach ((array)$validator->errors() as $key => $value) {\n foreach ($value as $msg) {\n return response()->json(['status' => false, 'msg' => $msg[0]]);\n }\n }\n }\n }", "title": "" }, { "docid": "4016847dea9b55e59a4acd18600a30f5", "score": "0.55813426", "text": "public function update($request, $id);", "title": "" }, { "docid": "9d8cba34413cd6e6b48618c3db86055c", "score": "0.55810744", "text": "public function update(Request $request, $id)\n {\n $im = Image::find($id);\n $im->product_id = $request->product_id;\n $im->img_path = $request->img_path;\n \n $im->update();\n\n return redirect(route('image.show',$im->id));\n }", "title": "" }, { "docid": "2f36f1d4154ef1a2d8557fd96028dafb", "score": "0.55801266", "text": "public function updateStream($path, $resource, Config $config)\n {\n try {\n $result = $this->client->post('update', [\n 'query' => ['path' => $path],\n 'body' => $resource\n ]);\n\n $response = json_decode($result->getBody()->getContents(), true);\n\n if ($response['response']) {\n return true;\n }\n\n throw new Exception($response['message']);\n\n } catch (RequestException $e) {\n throw new Exception($e->getMessage(), $e->getCode(), $e);\n }\n }", "title": "" }, { "docid": "b34e21aac9031dd439acaadc48395628", "score": "0.5579814", "text": "public function update(Request $request, $id)\n {\n\n $this->validate($request, [\n \"name\" => 'required',\n \"description\" => 'required',\n \"genre_id\" => 'required',\n \"category_id\" => 'required',\n \"price\" => 'required|integer',\n \"size_id\" => \"required\",\n \"stock\" => \"required|integer\",\n \"imageLoc\" => \"image|dimensions:min_width=340,max_width=366,min_height=440,max_height=466\",\n \"imageLoc2\" => \"image|dimensions:min_width=340,max_width=366,min_height=440,max_height=466\",\n ]);\n\n $product = Product::find($id);\n\n $product->name = $request->input(\"name\");\n $product->description = $request->input(\"description\");\n $product->genre_id = $request->input(\"genre_id\");\n $product->category_id = $request->input(\"category_id\");\n $product->price = $request->input(\"price\");\n $product->size_id = $request->input(\"size_id\");\n $product->stock = $request->input(\"stock\");\n\n $path = $request->file('imageLoc');\n $path2 = $request->file('imageLoc2');\n\n $extension = $request->file('imageLoc')->extension();\n $extension2 = $request->file('imageLoc2')->extension();\n\n\n if (!is_null($path)) {\n $path->storeAs('public/products', '1'.$request->user()->id.'.'.$extension);\n $product->imageLoc = 'storage/products/1'.$request->user()->id.'.'.$extension2;\n }\n if (!is_null($path2)) {\n $path2->storeAs('public/products', '2'.$request->user()->id);\n $product->imageLoc2 = 'storage/products/2'.$request->user()->id;\n }\n\n\n $product->save();\n\n\n return redirect()->route('products.show',['id' => $id]);\n }", "title": "" }, { "docid": "60b9f0eec9bbbce5da5e2b8796798a94", "score": "0.5576629", "text": "public function update(SitioUpdateRequest $request)\n { \n\n $sitio = Sitio::find(1);\n $sitio->name = $request->name;\n\n if($request->hasFile('picture')){\n\n $oldFile = $sitio->picture;\n $file = $request->file('picture');\n $destination_path = public_path().'/file/';\n $name = 'sitio_' . time() . '.' . $file->getClientOriginalName();\n \\Storage::disk('local')->put($name, \\File::get($file));\n unlink($destination_path.$oldFile);\n $sitio->picture = $name;\n }\n\n $sitio->save();\n\n \\Session::flash('success', 'Sitio actualizado exitosamente.');\n\n return redirect()->to('/admin/home'); \n }", "title": "" }, { "docid": "d6f71bb85fc7a75982a80e5421b6054e", "score": "0.55763113", "text": "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n\n $product->product_name = $request->product_name;\n $product->product_description = $request->product_description;\n $product->brand_id = $request->brand_id;\n $product->product_price = $request->product_price;\n $product->area_id = $request->area_id;\n $product->subcategory_id = $request->subcategory_id;\n $product->condition = $request->condition;\n\n // if($request->hasFile('product_image'))\n // {\n // $path = $request->product_image->store('images');\n // // $product->product_image = $request->product_image->hashName();\n // }\n // }\n\n $product->save();\n\n flash('Product successfully updated')->success();\n\n return redirect()->route('products.edit',$product->id);\n\n }", "title": "" }, { "docid": "f8cd6649bfa223d8861db5374702fc62", "score": "0.5569909", "text": "public function updateFromResource(\n $resourceResource,\n $exerciseResource\n )\n {\n parent::updateFromSharedResource($resourceResource, $exerciseResource, 'resource_storage');\n $exerciseResource = $this->computeRequirements($exerciseResource, $resourceResource);\n\n if (!is_null($resourceResource->getArchived())) {\n $exerciseResource->setArchived($resourceResource->getArchived());\n }\n\n return $exerciseResource;\n }", "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": "8c6acbc80b9bce2875ae52d0218c6db7", "score": "0.5556945", "text": "public function update(Request $request, ImagesStorage $imagesStorage)\n {\n //\n }", "title": "" }, { "docid": "9c16790d9595ec15edbb9f90b1a893da", "score": "0.55535865", "text": "public function update(Request $request, Product $product)\n {\n // error_log($request);\n \n $product->category_id=$request->category_id;\n $product->user_id=$request->user()->id;\n\n $product->name=$request->name;\n $product->description=$request->description;\n $product->price= $request->price;\n\n //$product->photo= \"/storage/\".$request->file('photo')->store(\"photos\");\n\n $product->stock= $request->stock;\n\n $product->save();\n // error_log($product);\n return response()->json([\n 'status' => '201',\n 'message' => 'Product updated',\n 'product'=>$product\n ]);\n }", "title": "" }, { "docid": "4d9a8860c5c0baa27686ce3d50c1577f", "score": "0.5530968", "text": "public function update(Request $request, Product $product)\n {\n $validation = Validator::make($request->all(), [\n 'name' => 'min:3|max:100',\n 'description' => 'min:5',\n 'price' => 'integer',\n 'quantity' => 'integer',\n 'image_path' => 'image|mimes:jpg,jpeg,svg,png'\n ]);\n\n $newPath = \"\";\n if ($request->hasFile('image_path')) {\n Storage::delete('products/' . $product->image_path);\n $newPath = $request->file('image_path')->store('public/products');\n }\n\n if ($validation->fails()) {\n return response()->json($validation->errors(), 422);\n }\n\n $product->name = $request->get('name', $product->name);\n $product->description = $request->get('description', $product->description);\n $product->price = $request->get('price', $product->price);\n $product->quantity = $request->get('quantity', $product->quantity);\n $product->image_path = $request->get($newPath, $product->image_path);\n\n $product->save();\n return new ProductIndexResource($product);\n }", "title": "" }, { "docid": "416eb5614de4e6fedf65c1c8ec3c5924", "score": "0.5518426", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'name'=>'required',\n 'category_id'=>'required|integer',\n 'status'=> 'required|boolean',\n 'picture'=> 'required',\n 'gender' => 'required',\n ]);\n $pic = null;\n if ($request->hasFile('picture')) {\n\n $image = $request->file('picture');\n $name = uniqid().'.'.$image->getClientOriginalExtension();\n $destinationPath = public_path('/images');\n $image->move($destinationPath, $name);\n $pic = \"images/{$name}\";\n }\n $product = \\App\\Product::find($id);\n $product->name = $request->get('name');\n $product->category_id = $request->get('category_id');\n $product->status = $request->get('status');\n $product->picture = $pic;\n $product->gender = $request->get('gender');\n $product->save();\n\n return redirect('/products')->with('success', 'Stock has been updated');\n\n\n }", "title": "" }, { "docid": "9e68af5ab6e6fd50f6b3af43fa9adffb", "score": "0.5518285", "text": "public function update(Request $request, $id)\n {\n //\n\n $specialOffers = SpecialOffer::find($id);\n $specialOffers->product_title = $request->sliderTitle;\n $specialOffers->product_price = $request->sliderDetails;\n $specialOffers->product_available = $request->productPrice;\n $specialOffers->product_sold = $request->product_sold;\n \n \n if($request->file('image')){\n $image = $request->file('image');\n Storage::putFile('public/img/',$image);\n $specialOffers->image =\"storage/img/\".$image->hashName();\n }\n $specialOffers->save();\n \n return redirect()->route('admin.specialOffers.create')->with('success','specialOffers details updated Successfully');\n }", "title": "" }, { "docid": "7fcc3e1a5efb0809a329cb304b469001", "score": "0.55178463", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, Product::validate());\n\n if ($request->hasFile('image')) {\n\n $file = $request->file('image');\n $path = $file->store('/',\n [\n 'disk' => 'uploads'\n ]);\n $request->merge([\n 'image_path' => $path\n ]);\n }\n $data = request()->except(['_token', '_method', 'image']);\n $product = Product::where('id', $id)->update($data);\n return redirect()->route('products.index')->with([\n 'success' => 'Product Updated Successfully'\n ]);\n }", "title": "" }, { "docid": "055d9a75bb90fd4afdce24cc7ce3d70d", "score": "0.5517729", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $product->sizes()->sync($request->sizes);\n $product->update([\n 'name' => $request->input('name'),\n 'description' => $request->input('description'),\n 'price' => $request->input('price'),\n 'published' => $request->input('published'),\n 'discount' => $request->input('discount'),\n 'category_id' => $request->input('category_id'),\n 'ref' => $request->input('ref')\n ]);\n\n return redirect('/admin/products');\n }", "title": "" }, { "docid": "f5b4408354bfa9c8612fac65129c141b", "score": "0.5516778", "text": "public function update(StoreProductRequest $request, $id)\n {\n //\n $request->validated();\n\n $obj = Product::find($id);\n $obj->name = Input::get('name');\n $obj->categoryId = Input::get('categoryId');\n $obj->price = Input::get('price');\n $obj->discount = Input::get('discount');\n if(Input::hasFile('thumbnail')) {\n $image_id = time();\n Cloudder::upload(Input::file('thumbnail')->getRealPath(), $image_id);\n $obj->thumbnail = Cloudder::secureShow($image_id);\n }\n $obj->description = Input::get('description');\n $obj->save();\n return redirect('admin/product');\n }", "title": "" }, { "docid": "864750e43aa4e758ff3496700f1f1f1e", "score": "0.55164015", "text": "public function update(Request $request, Path $path)\n {\n //\n \n $data = $request->all();\n \n if($request->file('image')){\n $data['image'] = $request->file('image')->store('assets/path', 'public');\n }\n\n $path->update($data);\n \n return redirect()->route('paths.index');\n }", "title": "" }, { "docid": "7fd319ddde01606213623cf2e0b3cd4d", "score": "0.55120105", "text": "public function putAction() \n\t\t{\n\t\t\t$this->logger->log($this->tableName.\" Put (UPDATE) Action Called: \", Zend_Log::DEBUG);\n\t\t\t$id = $this->_getParam('id');\n\t\t\t$idName = $this->idName;\n\t\t\t$where = $this->restTable->getAdapter()->quoteInto(\"$idName=?\",$id);\n\t\t\t$data = Zend_Json::decode($this->getRequest()->getRawBody() );\n\t\t\t$this->boolToString($data);\n\t\t\t$this->logger->log(\"Put Data: \".print_r($data,true), Zend_Log::DEBUG);\n\t\t\t$this->restTable->update($data, $where);\n\n\t\t\t$this->getResponse()->appendBody(Zend_Json::encode($data));\n\t\t\t$this->getResponse()->setHttpResponseCode(200);\n\t\t\treturn;\n\t\t}", "title": "" }, { "docid": "d0000a29e08a3caea99d0d7a508a62b5", "score": "0.55111337", "text": "public function update(Request $request, $id)\n {\n $product = Product::findOrFail($id);\n $product->year = $request->year;\n $product->term = $request->term;\n $product->category = $request->category;\n $product->description = $request->description;\n $product->amount = $request->amount;\n if($product->save())\n {\n return new ProductResource($product); \n }\n }", "title": "" }, { "docid": "b9649f8d6cb9c4ee8bb3abe05e064755", "score": "0.5510288", "text": "public function setResource(string $resource): void;", "title": "" }, { "docid": "e181d2272099f0db207ddf129f5df092", "score": "0.550741", "text": "public function update(StoreBlogPost $request, $id)\n {\n $validated = $request->validated();\n $article = Article::find($id);\n\n if(array_key_exists('image',$validated)){\n $path = $validated['image']->store('public');\n $filename = str_replace(\"public/\",\"\",$path);\n $contents = Storage::get('public/'.$filename);\n Storage::disk('s3')->put($filename, $contents, 'public');\n $article->image = Storage::disk('s3')->url($filename);\n}\n $article->article = $validated['article'];\n $article->title = $validated['title'];\n $article->writer = Auth::user()->name;\n $article->save();\n return redirect('/article/');\n }", "title": "" }, { "docid": "e7cb685cc382abd24083c8b13d97a179", "score": "0.5507017", "text": "public function put() : Resource {\n try{\n \n $this->method = 'PUT';\n return $this;\n\n } catch (\\Throwable $t){\n new ErrorTracer($t);\n }\n }", "title": "" }, { "docid": "0b37c1df43abb728d7b1dd5cd037ea17", "score": "0.55022466", "text": "public function update($id)\n\t{\n $modelname = $this->modelname;\n $resource = $modelname::find($id);\n if($resource)\n {\n $resource->update(Input::json()->all());\n return $resource;\n }\n\t}", "title": "" }, { "docid": "08757cc2c81b23ca63469f255efa2060", "score": "0.5502139", "text": "protected function update() {\n $this->client->sendRequest('POST', $this->name . ($this->key ? : (string) $this->id), $this->prepareRequestData());\n }", "title": "" }, { "docid": "73d0372fbd1136bccf7139013889818a", "score": "0.5499022", "text": "public function update(SliderimageRequest $request, $id)\n {\n if (! Gate::allows('full')) {\n return redirect( url('admin') )->with('failed', 'Sorry, You are not authorized');\n }\n $update = Sliderimage::getItem($id);\n if($update){\n $uploadFile = $this->articleService->uploadFile('image','uploads/sliders/');\n if($uploadFile != ''){\n $this->articleService->delFile($update->image);\n }\n $update->title = $request->title; \n $update->key = $request->key;\n $update->content = $request->content;\n $update->html = $request->html;\n $update->image = ($uploadFile == '') ? $update->image : $uploadFile;\n $update->save();\n return redirect()->route('sliderimages.index')->with('update_succeeded',config('admin.update_succeeded') );\n }\n }", "title": "" }, { "docid": "4d6dd204fb19a2d6fc40011791b9128d", "score": "0.54963744", "text": "public function update(Request $request, $id)\n {\n //\n $promotion = Promotion::findOrFail($id);\n\n if ($request->hasFile('photo')) {\n $photo = $request->photo;\n\n $path = 'images/promotion';\n $filename = $id . '.' . $photo->extension();\n $photo->storeAs($path, $filename);\n\n $promotion->image = 'storage/app/public/' . $path . '/' . $filename;\n }\n\n $input = $request->all();\n\n $validField = $promotion->fillable;\n\n foreach ($input as $key=>$data) {\n if (in_array($key, $validField)) {\n $promotion[$key] = $data;\n }\n }\n\n $promotion->save();\n\n return new PromotionResource($promotion);\n\n }", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "7c08d21dd4b1755fd5741490a1848a10", "score": "0.5493504", "text": "public function update(Request $request, $id)\n {\n $store = Store::find($id);\n $store->name = $request->name;\n $store->phone = $request->phone;\n $store->email = $request->email;\n $store->address = $request->address;\n $store->description = $request->description;\n $store->product_id = $request->product_id;\n if($request->hasFile('image')){\n $imageFile = $request->file('image');\n $filename = microtime().'-'.$imageFile->getClientOriginalName();\n $imageFile->move(public_path('image\\store'), $filename);\n $store->image = \"image\\store\\\\\".$filename;\n }\n $store->save();\n\n return response()->json([\n 'message' => \"Update successfully store\",\n 'data' => $store\n ], 201);\n }", "title": "" }, { "docid": "f7ab1c5db894b7225c3f202ae4974bc5", "score": "0.54868174", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $requestData = $request->all();\n\n if ($request->hasFile('image_url')) {\n $old_image = $product->image_url;\n File::delete(public_path() . $old_image);\n\n $file = $request->file('image_url');\n $path = $this->fileUpload($file, 'product');\n $requestData['image_url'] = $path;\n }\n\n $product->update($requestData);\n //快閃資料\n return redirect('/admin/product')->with('update','更新成功!');\n }", "title": "" }, { "docid": "f6cc867169101865f07b0dad1605b01d", "score": "0.54849625", "text": "protected function update()\n {\n // TODO: unlink existing $image file\n $image_location = File::storeImage('image');\n\n $data = [\n ':title' => request('title'),\n ':slug' => request('slug'),\n ':has_flowers' => request('has_flowers'),\n ':introduction' => request('introduction'),\n ':description' => request('description'),\n ':colour' => request('colour'),\n ':growth_location' => request('growth_location'),\n ':ripe_season' => request('ripe_season'),\n ':average_years' => request('average_years'),\n ':average_height' => request('average_height'),\n ':average_width' => request('average_width'),\n ':user_id' => $_SESSION['user']['id']\n ];\n\n if (file_error_ok('image')) {\n $data[':image'] = $image_location;\n }\n\n try {\n Vegetable::update((int) request('vegetable_id'), $data);\n } catch (Exception $exception) {\n dd('Exception message:' . $exception->getMessage());\n }\n\n redirect('/admin/vegetables');\n }", "title": "" }, { "docid": "fc5db9e752584d0ec2d27578be79f65f", "score": "0.5470857", "text": "public function update($entity)\n {\n\n }", "title": "" }, { "docid": "cb574ee109ef0c4933aff2189613ba88", "score": "0.5467008", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (!$product) return new Response([\n 'result' => 'fail',\n 'message' => 'product not found'\n ]);\n\n $data = Input::all();\n\n foreach ($data as $key => $value) {\n if ($key === 'price') {\n $product->$key = $value*100;\n } else {\n $product->$key = $value;\n }\n }\n $product->save();\n return new Response(new ProductResource($product));\n }", "title": "" }, { "docid": "2f39a69c894818b4cdcdf93157a2f3e2", "score": "0.54660195", "text": "public static function putForResource($resource, $key, $value)\n {\n if (self::notEnoughResourceInfo($resource, $key)) {\n return;\n }\n self::$resource_registry[self::getResourceKey($resource)][$key] = $value;\n }", "title": "" }, { "docid": "e69ca8d6b4021523c67416bb5a8e3871", "score": "0.54627603", "text": "public function update($newpaht){}", "title": "" }, { "docid": "e328097d6411f857ba6a7cc2aad5a70a", "score": "0.54620916", "text": "public function update(ResourceCreator $listener, $resourceId, array $inputs);", "title": "" }, { "docid": "62614676e3e3e48351f4169c6b96fbbe", "score": "0.5461824", "text": "public function update(Request $request, $id)\n {\n //\n $datosproducto=request()->except('_token','_method');\n\n if($request->hasFile('Foto')){\n\n $producto=Productos::findOrFail($id);\n\n Storage::delete('public/'.$producto->Foto);\n\n $datosproducto['Foto']=$request->file('Foto')->store('uploads','public');\n }\n\n productos::where('id','=',$id)->update($datosproducto);\n\n //return response()->json($datosUsuario);\n\n $producto=productos::findOrFail($id);\n //return view('usuarios.edit', compact('usuario'));\n\n return redirect('productos')->with('Mensaje', 'Producto modificado con exito');\n }", "title": "" }, { "docid": "13060cd318eed312852c00ed17885787", "score": "0.5460793", "text": "public function update($object)\n {\n }", "title": "" } ]
86658784a8345eeb3a8a5128a46d790e
Try to create the controller class.
[ { "docid": "908fc910a1c0799dab404cafd5279348", "score": "0.0", "text": "public function testCreateTheClass()\n {\n $controller = new Highscore();\n $controller->getId();\n $controller->getComputerScore();\n $controller->getUserScore();\n $this->assertInstanceOf(\"\\App\\Highscore\\Highscore\", $controller);\n }", "title": "" } ]
[ { "docid": "21f25ba6b5e1b2f9e06f3264d3c16587", "score": "0.8139424", "text": "public function createController(){ if (class_exists($this->controller)){\n $parents = class_parents($this->controller);\n //does the class extend the controller class?\n if (in_array(\"BaseController\", $parents)){\n //does the class contain the requested method?\n if (method_exists($this->controller, $this->action)){\n return new $this->controller($this->action,$this->url_values);\n }else{\n $this->has_error =true;\n return MessageHandler::error('Invalid action');\n }\n }else{\n $this->has_error =true;\n return MessageHandler::error('Invalid controller');\n }\n }else{\n $this->has_error =true;\n return MessageHandler::error('Controller not existing!');\n }\n }", "title": "" }, { "docid": "9b2339223d9d4e08b5a5fdc48a931f54", "score": "0.7845342", "text": "public function createController(){\n\n\t\t\t/**\n\t\t\t * Check if controller class exists\n\t\t\t */\n\n\t\tif(class_exists($this->controller)){\n\t\t\t\n\t\t\t/**\n\t\t\t * Assign an array with the name of the parent classes of the given class.\n\t\t\t */\n\t\t\t\n\t\t\t $parents = class_parents($this->controller);\n\t\t\t \n\t\t\t/**\n\t\t\t * Check if class in question extends controller class\n\t\t\t */\n\n\t\t\tif(in_array(\"Controller\", $parents)){\n\n\t\t\t\t/**\n\t\t\t\t * Check if a controller or action method exists within class \n\t\t\t\t */\n\n\t\t\t\tif(method_exists($this->controller, $this->action)){\n\t\t\t\t\t\n\t\t\t\t\t/**\n\t\t\t\t\t * @return object Return a new controller object \n\t\t\t\t\t * @param string The second parameter in the URL\n\t\t\t\t\t * @param array Stores the controller, action and id based on the URL \n\t\t\t\t\t */\n\n\t\t\t\t\treturn new $this->controller($this->action, $this->request,$this->id);\n\n\t\t\t\t} else {\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Summary\n\t\t\t\t\t * Method does not exist\n\t\t\t\t\t * \n\t\t\t\t\t * Description\n\t\t\t\t\t * Redirects users to the 404 page if there is no corrosponding method to be called \n\t\t\t\t\t */\n\n\t\t\t\t\theader(\"Location: \".ROOT_URL.'pagenotfound');\n\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t/**\n\t\t\t\t * Summary \n\t\t\t\t * Base controller does not exist\n\t\t\t\t * \n\t\t\t\t * Description\n\t\t\t\t * Redirects users to the 404 page if the corrosponding controller does not exist\n\t\t\t\t */\n\n\t\t\t\theader(\"Location: \".ROOT_URL.'pagenotfound');\n\n\t\t\t}\n\t\t} else {\n\t\t\n\t\t\t/**\n\t\t\t * Summary\n\t\t\t * Controller class does not exist\n\t\t\t * \n\t\t\t * Description\n\t\t\t * Redirects users to the 404 page if corresponding class does not exist\n\t\t\t */\n\n\t\t\theader(\"Location: \".ROOT_URL.'pagenotfound');\n\n\t\t}\n\t}", "title": "" }, { "docid": "8de597aaa0579156990513f6c3f4f014", "score": "0.77343404", "text": "protected function createController()\r\n {\r\n $this->geamGenerate('controller');\r\n }", "title": "" }, { "docid": "4e344abafb3daad1c379c51f89ef784d", "score": "0.77181876", "text": "protected function makeController()\n {\n $this->handleMeta();\n\n if ($this->filesystem->exists($path = $this->getPath($this->meta['class']))) {\n $confirm = $this->ask('you want to replace your controller ? [y] /', 'N');\n if($confirm == 'y')\n {\n $this->filesystem->delete($path);\n } else {\n return $this->error($this->meta['name'] . ' ' . $this->type . ' is aborded!');\n }\n }\n\n $this->makeDirectory($path);\n\n $this->filesystem->put($path, $this->compileControllerStub());\n\n $this->phpCsFixer->fix($path);\n\n $this->info('Controller created successfully.');\n }", "title": "" }, { "docid": "173dfa3d2c43c121d2999bbac59bd02a", "score": "0.75424266", "text": "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $this->call('make:controller', array_filter([\n 'module' => $this->getModule()['key'],\n 'name' => \"{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $this->argument('name') : null,\n '--api' => $this->option('api'),\n '--querybuilder' => $this->option('querybuilder')\n ]));\n }", "title": "" }, { "docid": "f8b7b5a53a5586d72cc281608b889e4b", "score": "0.74113613", "text": "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $this->call('module:controller', [\n 'name' => $controller,\n '--force' => $this->option('force')\n ]);\n }", "title": "" }, { "docid": "271ca9b8e926903001f4cddda1e8934b", "score": "0.7406962", "text": "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call('mappweb:make-controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n ]);\n }", "title": "" }, { "docid": "78fb141452c021e73d6621a668ecd153", "score": "0.73293936", "text": "protected function makeController() {\n\t\t$cg = new ControllerGenerator($this->files, $this->command);\n\t\t$cg->generate($this->name, $this->schema);\n\t}", "title": "" }, { "docid": "15d5429e9249d1a3ab48a87d16d5b6a2", "score": "0.7273635", "text": "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call('package:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => $this->option('api'),\n '--namespace' => $this->getNamespaceInput(),\n '--dir' => $this->getDirInput(),\n ]);\n }", "title": "" }, { "docid": "f51695fb6049452a2fef7c0ab718ba95", "score": "0.72639114", "text": "protected function createController(): void\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => $this->option('api'),\n '--requests' => $this->option('requests') || $this->option('all'),\n '--container' => $this->option('container')\n ]));\n }", "title": "" }, { "docid": "fcf4ffc7382d9986feb1910b5bc82392", "score": "0.72218984", "text": "protected function createController()\n {\n $controller = studly_case(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call('gen:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $this->option('resource') ? $modelName : null,\n '--overwrite' => $this->option('overwrite')\n ]);\n }", "title": "" }, { "docid": "5c05f088152db433195daf3c030a54d1", "score": "0.6984104", "text": "public function getController() {\r\n $sController = ucfirst(strtolower((string) $this->_aRequest['controller']));\r\n\r\n try {\r\n # Are extensions for existing controllers available? If yes, use them.\r\n if (EXTENSION_CHECK && file_exists(PATH_STANDARD . '/app/extensions/controllers/' . $sController . '.controller.php')) {\r\n require_once PATH_STANDARD . '/app/extensions/controllers/' . $sController . '.controller.php';\r\n\r\n $sClassName = '\\CandyCMS\\Controllers\\\\' . $sController;\r\n $this->oController = new $sClassName($this->_aRequest, $this->_aSession, $this->_aFile, $this->_aCookie);\r\n }\r\n\r\n # There are no extensions, so we use the default controllers\r\n elseif (file_exists(PATH_STANDARD . '/vendor/candyCMS/core/controllers/' . $sController . '.controller.php')) {\r\n require_once PATH_STANDARD . '/vendor/candyCMS/core/controllers/' . $sController . '.controller.php';\r\n\r\n $sClassName = '\\CandyCMS\\Core\\controllers\\\\' . $sController;\r\n $this->oController = new $sClassName($this->_aRequest, $this->_aSession, $this->_aFile, $this->_aCookie);\r\n }\r\n\r\n else {\r\n # Bugfix: Fix exceptions when upload file is missing\r\n if($sController && substr(strtolower($sController), 0, 6) !== 'upload')\r\n throw new AdvancedException('Controller not found:' . PATH_STANDARD .\r\n '/vendor/candyCMS/core/controllers/' . $sController . '.controller.php');\r\n }\r\n }\r\n catch (AdvancedException $e) {\r\n AdvancedException::reportBoth($e->getMessage());\r\n Helper::redirectTo('/errors/404');\r\n }\r\n\r\n $this->oController->__init();\r\n return $this->oController;\r\n }", "title": "" }, { "docid": "92898f69b4c66915e6304c974764d7ea", "score": "0.69637436", "text": "public function useController()\n {\n // Require the controller\n require_once('../app/controllers/' . $this->currentController . '.php');\n\n // Instantiate controller class\n $this->currentController = new $this->currentController;\n }", "title": "" }, { "docid": "0488e0fc3eb4fd3d3976b169952b3afe", "score": "0.69566756", "text": "public function loadController()\n {\n //create Crontroler name\n $name = $this->request->controller . \"Controller\";\n $file = ROOT . 'Controllers/' . $name . '.php';\n\n if (!file_exists($file)) {\n header(\"HTTP/1.1 404 Not Found\");\n exit();\n }\n\n //require class\n require($file);\n\n //initiate class\n $controller = new $name();\n\n return $controller;\n }", "title": "" }, { "docid": "ba64e44da499c249386142425288e474", "score": "0.6935221", "text": "private function &__getController() {\n\n require_once('app/app_controller.php');\n\n\n $controller = false;\n $ctrlClass = $this->__loadController($this->params);\n if (!$ctrlClass) {\n return $controller;\n }\n $ctrlClass .= 'Controller';\n if (class_exists($ctrlClass)) {\n $controller = new $ctrlClass();\n }\n return $controller;\n }", "title": "" }, { "docid": "04479fb63153ae993154803f188d897b", "score": "0.68914855", "text": "private function setController(){\n $this->controller = new \\PlaceToPay\\Http\\Controllers\\TypePersonController;\n }", "title": "" }, { "docid": "97aa4f9f04258807de5b92717b3203a6", "score": "0.6884576", "text": "public function testCreateController()\n {\n $router = new Route('stdclass', 'stdClass');\n\n $controllerClass = $router->createController();\n\n $this->assertEquals('stdClass', get_class($controllerClass));\n }", "title": "" }, { "docid": "9bdbfd06d3768808b2075f3429c0cc24", "score": "0.6852784", "text": "public function testCreateTheControllerClass()\n {\n $controller = new Game21();\n $this->assertInstanceOf(\"\\Kimchi\\Controller\\Game21\", $controller);\n }", "title": "" }, { "docid": "fae2a9683b0fcd5a252465a31324f2d5", "score": "0.6833732", "text": "public function testCreateTheControllerClass()\n {\n $controller = new Game21();\n $this->assertInstanceOf(\"\\App\\Game21\\Game21\", $controller);\n }", "title": "" }, { "docid": "fae2a9683b0fcd5a252465a31324f2d5", "score": "0.6833732", "text": "public function testCreateTheControllerClass()\n {\n $controller = new Game21();\n $this->assertInstanceOf(\"\\App\\Game21\\Game21\", $controller);\n }", "title": "" }, { "docid": "ea3d1242a35f89fa036c9d15fc71bee1", "score": "0.6812553", "text": "private function generateController()\n {\n // Figure out the naming\n $controller = Str::plural(ucfirst($this->argument('model')));\n $path = 'app/Http/Controllers/Admin/'.$controller.'.php';\n $file = base_path().'/'.$path;\n\n // Copy the stub over\n if (!file_exists(dirname($file))) {\n mkdir(dirname($file), 0744, true);\n }\n if (file_exists($file)) {\n return $this->comment('Controller already exists: '.$path);\n }\n file_put_contents($file, str_replace('{{controller}}', $controller, file_get_contents($this->stubs.'/controller.stub')));\n $this->info('Controller created: '.$path);\n }", "title": "" }, { "docid": "c595c50a9e797db3cb269f60f9e2643d", "score": "0.67740893", "text": "public function initcontroller() {\r\n\t}", "title": "" }, { "docid": "d5ceecf6fad8f2ccff9081ad1d56ae16", "score": "0.6716658", "text": "function loadController(){\n\t\t$name = ucfirst($this->request->controller).'Controller';\n\t\t//inclure le controller\n\t\t$file = ROOT.DS.'controller'.DS.$name.'.php';\n\t\trequire $file;\n\t\treturn new $name($this->request);\n\t}", "title": "" }, { "docid": "d46a35c396e6b6a6b021a81aa51a8db7", "score": "0.67069685", "text": "static private function _getInstanceController()\n {\n if (!isset($_GET['controller'])) {\n $rout[0] = 'default';\n } else {\n $rout = explode('_', $_GET['controller']);\n }\n\n if (count($rout) == 1) {\n $rout[1] = 'index';\n }\n\n $controllerName = self::getConfig('controllers/' . $rout[0]);\n\n $controllerPuth = self::$_baseDir . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR .\n $controllerName . DIRECTORY_SEPARATOR . 'Controller' . DIRECTORY_SEPARATOR . ucfirst($rout[1]) . 'Controller.php';\n\n if (!file_exists($controllerPuth)) {\n throw new Exception(sprintf('Controller %s not found', $controllerPuth));\n }\n\n require_once $controllerPuth;\n\n self::$autoloader->loadClassModule(self::$_baseDir . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . $controllerName);\n\n $classController = $controllerName . '_Controller_' . ucfirst($rout[1]) . 'Controller';\n\n if (!class_exists($classController)) {\n throw new Exception(sprintf('File has been loaded but class %s not found', $classController));\n }\n\n new $classController;\n\n return true;\n }", "title": "" }, { "docid": "f142db9abeddee3cfd3e6581465a3581", "score": "0.6687259", "text": "public function testCreateTheControllerClass()\n {\n $controller = new Yatzy();\n $this->assertInstanceOf(\"\\sigridjonsson\\Controller\\Yatzy\", $controller);\n }", "title": "" }, { "docid": "e32b447ea14c9d53dbcf5806204eb746", "score": "0.66715366", "text": "public function initController()\n {\n $controllerNamespace = $this->buildControllerNamespace();\n $this->setParam('namespace', $controllerNamespace);\n\n // throw exception if no controller class found\n if (!class_exists($controllerNamespace)) {\n throw new \\RuntimeException(sprintf('Controller [%s] not found.', $controllerNamespace), 404);\n }\n\n // check if controller class has parent controller\n if (!isset(class_parents($controllerNamespace)[Controller::class])) {\n throw new \\RuntimeException('Controller must be extending the base controller!', 400);\n }\n\n return new $controllerNamespace($this->app);\n }", "title": "" }, { "docid": "cb84ae4c83e83c46d1d108dcf04a24ce", "score": "0.6661578", "text": "public function __construct(){\n // print_r($this->getUrl());\n\n $url = $this->getUrl();\n\n // Look in controllers for the first value.\n // Checks the controller folder for a php file corresponding to\n // the first parameter.\n // Using ucwords to ensure the file is uppercase, as is standard.\n if(file_exists('../app/controllers/' . ucwords($url[0]) . '.php')){\n\n // If there is such a controller, make it the current one.\n $this->currentController = ucwords($url[0]);\n // After it becomes the new current controller, remove it from the url array.\n unset($url[0]);\n }\n\n // Require the controller.\n // This will be the pages controller or the controller specified through\n // url parameters.\n require_once '../app/controllers/' . $this->currentController . '.php';\n\n // Instantiate controller.\n $this->currentController = new $this->currentController;\n\n // Check for second part of url.\n if(isset($url[1])){\n // Check to see that the second part of the url corresponds to an existing method.\n if(method_exists($this->currentController, $url[1])){\n // If it does exist, make it the current method.\n // If it doesn't, the default is set to index.\n $this->currentMethod = $url[1];\n\n // After it becomes the current method, unset it from url.\n unset($url[1]);\n }\n }\n\n // Grab all url parameters.\n // If url is set / truthy, make params an array consisting of\n // the values of the url array; if it isn't, make it an empty array.\n $this->params = $url ? array_values($url) : [];\n\n // Call a callback with an array of params.\n call_user_func_array([$this->currentController, $this->currentMethod], $this->params);\n }", "title": "" }, { "docid": "519c12b1c73f4a2e417d7f14eb7d9e74", "score": "0.6658617", "text": "public function testCreateTheControllerClass()\n {\n $controller = new DiceGame();\n $this->assertInstanceOf(\"\\Mos\\Controller\\DiceGame\", $controller);\n }", "title": "" }, { "docid": "042b88947ba6fbb7faac82b75f84f463", "score": "0.6634719", "text": "public function getInstance() {\n\n\t\t$class = 'controllers\\\\'.$this->defaultController;\n\n\t\t$this->controllerInstance = Factory::createInstance($class, $this->model);\n\t}", "title": "" }, { "docid": "16c77d99cc459739e4bbd5af7508ae2b", "score": "0.6627885", "text": "public function __construct() {\n $module = routing::getModule();\n $action = routing::getAction();\n\n // Require controller class\n require_once \"controller/${module}.php\";\n\n $controllerName = $module . 'Controller';\n if (empty($action))\n $action = $controllerName::$defaultAction;\n\n $actionName = $action . 'Action';\n\n $controller = new $controllerName();\n $controller->$actionName();\n }", "title": "" }, { "docid": "7d3e131ee182285ce9f79bab972604d0", "score": "0.6610593", "text": "function controllers_setup(){\n // On récupère les noms de tous les fichiers de controllers existants\n $brutControllers = scandir('Controllers');\n // liste des instances des controllers de l'application\n $controllers = []; \n foreach($brutControllers as $controller)\n {\n // On se débarrasse des déchets créés par scandir \n if($controller != '.' && $controller != '..'){\n // nom du fichier, sans extension\n $instanceName = pathinfo($controller)['filename'];\n // nom du controller, sans 'Controller' à la fin\n $keyName = preg_replace('@^([A-Z][a-z]+)(Controller)$@','$1',$instanceName);\n\n $controllers[$keyName] = new $instanceName;\n }\n }\n\n return $controllers;\n}", "title": "" }, { "docid": "eb638069425c512d39710e5206dcf272", "score": "0.65994346", "text": "public static function Factory($requireLogin=true) {\n\t\t$router = RouteParser::Instance();\n\t\tif($router->Dispatch('controller') !== null) {\n\t\t\t$classname=ucfirst(strtolower($router->Dispatch('controller'))).'Controller';\n\t\t\tif(class_exists($classname)) {\n\t\t\t\t$controller=$classname;\n\t\t\t\treturn $controller;\n\t\t\t}\n\t\t}\n\n\t\t$controller = 'IndexController';\n\t\treturn $controller;\n\t}", "title": "" }, { "docid": "35c65899b291d521a7b01d096634c798", "score": "0.6587996", "text": "public function __construct()\n {\n // Get root directory and set paths where controllers and views are located.\n $this->root_dir = App::getInstance()->getRootDir();\n $this->controller_path = $this->root_dir.'/app/classes/controllers';\n $this->view_path = $this->root_dir.'/app/views';\n\n /*\n * Reads the controller directory and files and creates a list of controllers with all their public functions\n * and variables.\n */\n $this->loadControllers();\n\n /*\n * Collect class names, public functions, variables, current view and query string from the current route.\n * For example of current URL is http://localhost/my_projects/tests/questions/1/2/?ref=abc the controller is\n * \"tests\", the function is \"questions\", variables is an array [1,2] and query string is \"?ref=abc\". The view\n * is determined by controller, view and path. In this case the view is full path\n * \"/httpdocs/app/views/Tests/questions.php\".\n */\n [$controller, $function, $variables, $view, $query_string] = $this->getRoute();\n\n // Check if the called controller actually exists in the controller list we created before.\n $this->validateController($controller);\n\n // If controller exists, initialize the controller class.\n $this->controller = new $controller();\n\n // Check if the called controller funcion is in the list of the current controller funtions.\n $this->validateFunction($controller, $function);\n\n // If everything was OK, set the other parameters of the current controller.\n $this->function = $function;\n $this->variables = $variables;\n $this->view = $view;\n $this->query_string = $query_string;\n }", "title": "" }, { "docid": "864cc534f539bba520f623c22f450ba6", "score": "0.6577724", "text": "public function testCreateClassFailure()\n {\n $router = new Route('test', 'test');\n\n $router->createController();\n }", "title": "" }, { "docid": "8bd6f65855b8260d74b25fb1915d5e2b", "score": "0.6573164", "text": "function __loadController() {\n\t\tif (!$this->controllerName) {\n\t\t\t$this->err(__('Controller not found', true));\n\t\t}\n\n\t\t$import = $this->controllerName;\n\t\tif ($this->plugin) {\n\t\t\t$import = $this->plugin . '.' . $this->controllerName;\n\t\t}\n\n\t\tif (!App::import('Controller', $import)) {\n\t\t\t$file = $this->controllerPath . '_controller.php';\n\t\t\t$this->err(sprintf(__(\"The file '%s' could not be found.\\nIn order to bake a view, you'll need to first create the controller.\", true), $file));\n\t\t\t$this->_stop();\n\t\t}\n\t\t$controllerClassName = $this->controllerName . 'Controller';\n\t\t$controllerObj = new $controllerClassName();\n\t\t$controllerObj->constructClasses();\n\t\t$modelClass = $controllerObj->modelClass;\n\t\t$modelObj =& ClassRegistry::getObject($controllerObj->modelKey);\n\n\t\tif ($modelObj) {\n\t\t\t$primaryKey = $modelObj->primaryKey;\n\t\t\t$displayField = $modelObj->displayField;\n\t\t\t$singularVar = Inflector::variable($modelClass);\n\t\t\t$pluralVar = Inflector::variable($this->controllerName);\n\t\t\t$singularHumanName = Inflector::humanize($modelClass);\n\t\t\t$pluralHumanName = Inflector::humanize($this->controllerName);\n\t\t\t$schema = $modelObj->schema();\n\t\t\t$fields = array_keys($schema);\n\t\t\t$associations = $this->__associations($modelObj);\n\t\t} else {\n\t\t\t$primaryKey = null;\n\t\t\t$displayField = null;\n\t\t\t$singularVar = Inflector::variable(Inflector::singularize($this->controllerName));\n\t\t\t$pluralVar = Inflector::variable($this->controllerName);\n\t\t\t$singularHumanName = Inflector::humanize(Inflector::singularize($this->controllerName));\n\t\t\t$pluralHumanName = Inflector::humanize($this->controllerName);\n\t\t\t$fields = array();\n\t\t\t$schema = array();\n\t\t\t$associations = array();\n\t\t}\n\n\t\treturn compact('modelClass', 'schema', 'primaryKey', 'displayField', 'singularVar', 'pluralVar',\n\t\t\t\t'singularHumanName', 'pluralHumanName', 'fields','associations');\n\t}", "title": "" }, { "docid": "e671f00890c8be49fcae1a0780c34135", "score": "0.65644246", "text": "public function __construct() {\n $url = $this->getUrl();\n //Check if file controller exists based on the URL from the controllers directory\n if ( file_exists('../app/controllers/' . ucwords($url[0]) . '.php') ) {\n //If controller exists, update the currentController \n $this->currentController = ucwords($url[0]); \n //unset $url[0] - Controller Name\n unset($url[0]);\n }\n // else {\n // die(\"Invalid Controller!\");\n // }\n\n //Require the controller file\n require_once '../app/controllers/' . $this->currentController . '.php';\n\n //Instantiate a New Controller Class\n $this->currentController = new $this->currentController;\n\n //Check for the second parameter/part of the URL (i.e. the method name)\n if ( isset($url[1]) ) {\n //Check if the method exists in the controller class\n if ( method_exists($this->currentController, $url[1]) ) {\n $this->currentMethod = $url[1];\n //unset the $url[1] - Method Name\n unset($url[1]);\n }\n }\n\n //Retrieve the remaining parameters/parts of the URL\n $this->params = $url ? array_values($url) : []; \n \n //Call a callback method with parameters\n call_user_func_array([$this->currentController, $this->currentMethod], $this->params);\n }", "title": "" }, { "docid": "059426939ad1ae81474d9e1d3537741c", "score": "0.6561704", "text": "function __construct(){\n\t\t$url = $this->url();\n\n\t\t//[0] => 'Controller'\n\t\t//[1] => 'Method'\n\t\t//[2~] => 'Param'\n\t\tif (!empty($url)) {\n\t\t\tif (file_exists(ROOT_CONTROLLER_FOLDER . $url[0] . \".php\")) {\n\t\t\t\t$this->controller = ucwords($url[0]);\n\n\t\t\t\tunset($url[0]);\n\t\t\t} else {\n\t\t\t\tdie(\"Controller \" . $url[0] . \" is not found on \" . ROOT_CONTROLLER_FOLDER);\n\t\t\t}\n\t\t}\n\t\t// @Include controller file\n\t\trequire_once ROOT_CONTROLLER_FOLDER . $this->controller . \".php\";\n\n\t\t$this->controller = new $this->controller;\n\t\t\n\n\t\t/**\n\t\t * Check method availability.\n\t\t */\n\t\tif (isset($url[1]) && !empty($url[1]) ) {\n\t\t\tif (method_exists($this->controller, $url[1])) {\n\t\t\t\t$this->method = $url[1];\n\t\t\t\tunset($url[1]);\n\t\t\t}else {\n\t\t\t\tdie(\"Method is not found\");\n\t\t\t}\n\t\t}\n\n\n\t\t/**\n\t\t * Check Parameters availability.\n\t\t */\n\t\tif (isset($url)) {\n\t\t\t$this->param = $url;\n\t\t} else {\n\t\t\t$this->param = [];\n\t\t}\n\n\t\tcall_user_func_array([\n\t\t\t$this->controller,\n\t\t\t$this->method\n\t\t], $this->param);\n\n\n\t}", "title": "" }, { "docid": "945ceb06482eae8df3598ed3973b7880", "score": "0.65555847", "text": "public function __construct()\n {\n $this->request_path = $this->request_path();\n $this->splitUrl();\n\n // check for controller: no controller given ? then load start-page\n // nếu không có controller sẽ load trang index login\n if (!$this->url_controller) {\n\n $page = new \\App\\Controller\\UsersController();\n $page->login();\n\n } elseif (file_exists(APP . 'Controller/' . ucfirst($this->url_controller) . 'Controller.php')) {\n // kiểm tra xem có tồn tại Controller, nếu có sẽ gọi đến controller đó\n // here we did check for controller: does such a controller existloc ?\n\n // if so, then load this file and create this controller\n // like \\App\\Controller\\CarController\n $controller = \"\\\\App\\\\Controller\\\\\" . ucfirst($this->url_controller) . 'Controller';\n $this->url_controller = new $controller();\n\n // kiểm tra xem có tồn tại action trong controller\n if (method_exists($this->url_controller, $this->url_action)) {\n\n if (!empty($this->url_params)) {\n\n // nếu có params thì sẽ gọi method có params\n call_user_func_array(array($this->url_controller, $this->url_action), $this->url_params);\n } else {\n\n // If no parameters are given, just call the method without parameters, like $this->home->method();\n // nếu không có papams thì sẽ gọi method không có params\n $this->url_controller->{$this->url_action}();\n }\n } else {\n\n if (strlen($this->url_action) == 0) {\n // no action defined: call the default index() method of a selected controller\n // nếu method = null thì sẽ mặc định gọi đến method index()\n $this->url_controller->index();\n } else {\n // nếu method khác null mà không có trong controller thì sẽ gọi đến trang thông báo lỗi\n header('location: ' . URL . 'error');\n }\n }\n }\n }", "title": "" }, { "docid": "9b28ca1cb29f0d07a6e136d63dac6d93", "score": "0.6550156", "text": "public function getControllerClass() : \\string;", "title": "" }, { "docid": "1316384d618ee7fabd2c40454d82a9d3", "score": "0.6543914", "text": "public function __construct()\n {\n $this->controller = $this->controllersPath . $this->controller;\n }", "title": "" }, { "docid": "5ee037c10be1543297e78b6e61dc8d1d", "score": "0.65418917", "text": "protected function _initControllers()\n\t{\n\t\treturn;\n\t}", "title": "" }, { "docid": "3fcfa161f92f28bd234dcec8544a9fec", "score": "0.6538049", "text": "public function controller()\n {\n if (is_string($this->controller)\n && !is_callable($this->controller)\n && !class_exists($this->controller)\n ) {\n throw new Exception\\InvalidControllerException(sprintf(\n 'Invalid controller specified: \"%s\"',\n $this->controller\n ));\n }\n\n if (is_string($this->controller)\n && !is_callable($this->controller)\n && class_exists($this->controller)\n ) {\n $controller = $this->controller;\n $this->controller = new $controller;\n }\n\n if (!is_callable($this->controller)) {\n $controller = $this->controller;\n if (is_array($controller)) {\n $method = array_pop($controller);\n $controller = array_pop($controller);\n\n if (is_object($controller)) {\n $controller = get_class($controller);\n }\n\n $controller .= '::' . $method;\n }\n if (is_object($controller)) {\n $controller = get_class($controller);\n }\n throw new Exception\\InvalidControllerException(sprintf(\n 'Controller \"%s\" is not callable',\n $controller\n ));\n }\n\n return $this->controller;\n }", "title": "" }, { "docid": "e52216e4b015f524478ae0d0925abb91", "score": "0.6526875", "text": "function controller($params) {\n\t\tinclude \"controllers/\". $params[0] .\".php\";\n\t\tif(!class_exists($params[0], false))\n\t\t\texit(\"Class $params[0] not found\");\n\t\t$controller = new $params[0];\n\t\t// Getting and checking a method\n\t\tif(!method_exists($controller, $params[1]))\n\t\t\texit(\"Method $params[1] not found\");\n\t\t$method = (string)$params[1];\n\t\t// Method call\n\t\treturn $controller->$method();\n\t}", "title": "" }, { "docid": "332f6b27c5227004bafb535fcd17d637", "score": "0.6524744", "text": "private function _load_controller() {\n // Routes\n require(BASEDIR.'config/routes.php');\n $router->match_routes();\n\n if($router->route_found) {\n require_once(BASEDIR.'lib/lib_controller.php');\n require BASEDIR.\"app/controllers/{$router->module_path}{$router->controller}_controller.php\";\n\n $class_name = ($router->module ? ucfirst($router->module).'__' : '').ucwords(preg_replace_callback('/_[a-z]{1}/', function ($matches) { return ucfirst(substr($matches[0], 1)); }, $router->controller)).'Controller';\n\n // Ensure class exists\n if(class_exists($class_name)) {\n $this->controller_object = new $class_name($this, $router);\n $this->controller_object->base_url = $_SERVER['REQUEST_SCHEME'].'://'.$_SERVER['HTTP_HOST'].'/'.(substr(dirname($_SERVER['SCRIPT_NAME']), 1) ? substr(dirname($_SERVER['SCRIPT_NAME']), 1).'/' : '');\n\n if(method_exists($this->controller_object, $router->action)) {\n // ... and the action as well! Now, we have to figure out\n // how we need to call this method:\n\n // iterate this method's parameters and compare them with the parameter names\n // we defined in the route. Then, reassemble the values from the URL and put\n // them in the same order as method's argument list.\n $m = new ReflectionMethod($this->controller_object, $router->action);\n $params = $m->getParameters();\n $args = array();\n foreach($params as $i => $p) {\n if(isset($router->params[$p->name])) {\n $args[$i] = urldecode($router->params[$p->name]);\n } else {\n // we couldn't find this parameter in the URL! Set it to 'null' to indicate this.\n $args[$i] = null;\n }\n }\n } else {\n $this->error(404, \"Action \".$class_name.\".\".$router->action.\"() not found\");\n }\n } else {\n $this->error(404, \"No such controller: \".$class_name);\n }\n } else {\n $this->error(404, \"Page not found\");\n }\n }", "title": "" }, { "docid": "ae788f542c25e47565ab4df20b8d09e3", "score": "0.651935", "text": "private function _loadExistingController() {\n\n $file = $this->_controllerPath . $this->_url[0] . '.php';\n\n if( file_exists( $file ) ) {\n\n include $file;\n\n $this->_controller = new $this->_url[0]();\n\n } else {\n\n $this->_error();\n\n return false;\n\n }\n\n return $this;\n\n }", "title": "" }, { "docid": "b81aded60c440070a5eb67bf0591100f", "score": "0.6515654", "text": "private function setController()\n {\n // Create controller object\n $this->controller = new Controller($this->app);\n\n // Sitewide feed\n $this->app->match('/spaceapi/spacestate.json', array($this->controller, 'spaceapifeed'));\n\n $this->app->match('/spaceapi/spacestate', array($this->controller, 'spaceState'));\n \n $this->app->match('/spaceapi/togglestate', array($this->controller, 'toggleState'));\n \n }", "title": "" }, { "docid": "7e5eb92dd3c86131232d7d3ec2291dcf", "score": "0.6506406", "text": "protected function createController()\n {\n $controller = new GuideControllerMock('guide', Yii::$app);\n $controller->interactive = false;\n\n return $controller;\n }", "title": "" }, { "docid": "86d5f5d3a2440aa46ef6ce69c4181378", "score": "0.64962304", "text": "private function _loadExistingController()\n\t\t{\n\t\t\t$file = 'controllers/' . $this->_url[0] . '.php';\n\n\t\t\tif (file_exists($file)) {\n\t\t\t\trequire $file;\n\t\t\t\t$this->_controller = new $this->_url[0];\n\t\t\t\t$this->_controller->loadModel($this->_url[0]);\n\t\t\t}else{\n\t\t\t\t$this->_loadNotFound();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "3b3aaf093f2d48490ac4d219b2f6dc6e", "score": "0.64882183", "text": "public function testMakingAControllerWithoutModulesInitialised () : void\n {\n $controller = \"NewController\";\n $this->artisan(\"make:controller\", [\"name\" => $controller]);\n\n // I should have a controller in my app dir\n $this->assertTrue(class_exists(\"App\\\\Http\\\\Controllers\\\\$controller\"));\n $this->assertTrue(is_file(app_path(\"Http/Controllers/$controller.php\")));\n unlink(app_path(\"Http/Controllers/$controller.php\"));\n }", "title": "" }, { "docid": "be442ec7eecf3c712ebfc68211f1e12d", "score": "0.64875257", "text": "public function comprobarControlador() {\r\n if (file_exists('controllers/' . $this->controller . '.php')) {\r\n //echo '<p>El controlador ' . $this->controller . ' existe.</p>';\r\n\r\n // Cargo el controlador\r\n require_once 'controllers/' . $this->controller . '.php';\r\n\r\n // Creo el Objeto controller\r\n $this->controllerObj = new $this->controller;\r\n \r\n\r\n } else {\r\n echo '<h4 style=\"color: red;\">El controlador ' . $this->controller . ' no se reconoció.</h4>';\r\n die();\r\n }\r\n }", "title": "" }, { "docid": "eba1c2b8915c8c6f07040ae0f138d9f7", "score": "0.64730436", "text": "public function __construct(){\n $this->name = trim(get_class($this),'Controller');\n if (class_exists(singular($this->name))) {\n $this->loadModel(singular($this->name));\n }\n $this->data = array();\n }", "title": "" }, { "docid": "45f768145816fc230db1a31cb6c45e50", "score": "0.6458041", "text": "function loadController()\n {\n /*(FR) On fait passer la première lettre du contrôleur en majuscule\n (EN) We pass the first letter of the controller in capital letters */\n $name = ucfirst($this->request->controller) . 'Controller';\n\n /*(FR) On stocke le PHP de notre contrôleur dans la variable file\n (EN) We store the PHP of our controller in the variable file */\n $file = ROOT . DS . 'controller' . DS . $name . '.php';\n\n /*(FR) On vérifie si le fichier PHP existe et que ce n'est pas un admin prefixe\n (EN) We check if the PHP file exists and that it is not an admin prefix */\n if(!file_exists($file) && $this->request->controller != conf::$admin_prefixe && $this->request->controller !='admin'){\n\n $this->error('Le controller '.$this->request->controller.' n\\'existe pas');\n } \n /*(FR) Si il existe on le charge\n (EN) If it exists we charge it */\n require $file;\n\n /*(FR) On initialise le contrôleur et on lui passe la variable request \n (EN) Initialize the controller and pass it the request variable */\n $controller = new $name($this->request);\n\n /*(FR) Et on retourne notre contrôleur\n (EN) And we return our controller */\n return $controller;\n }", "title": "" }, { "docid": "b20d50fe98b767c97ff421e29d4554ec", "score": "0.64468604", "text": "private function _loadExistingController()\n {\n $dir = null;\n if( $this->_checkIfDir( $this->_url[0] ) ) {\n \n $dir = $this->_url[0];\n \n $this->_controllerPath .= $this->_url[0].\"/\";\n unset($this->_url[0]);\n $this->_url = array_values($this->_url);\n \n if( !empty ( $this->_url[0] )){\n if( $this->_checkIfDir( $this->_url[ 0 ] ) ){\n $this->_controllerPath .= $this->_url[0];\n unset($this->_url[0]);\n $this->_url = array_values($this->_url);\n }\n }\n }\n \n $page = null;\n if( isset ( $this->_url[0] ) )\n $page = $this->_url[0] ;\n else{ \n include(APP_PATH_CONFIG.\"routing.php\");\n if(isset($route[$dir])){\n $page = $route[$dir];\n }else{ \n $this->_error();\n return false;\n }\n }\n \n $file = $this->_controllerPath . $page . '.php';\n //var_dump($this->_url);\n if (file_exists($file)) {\n require $file;\n $this->_controller = new $page($this->_autoloads);\n //$this->_controller->loadModel($this->_url[0], $this->_modelPath);\n } else {\n $this->_error();\n return false;\n }\n }", "title": "" }, { "docid": "eba67978acbfccf23609f4cff716350e", "score": "0.64431244", "text": "public function instantiateController(bool $invokeAction = false){\n $controllerName = $this->catalyst->getController();\n $path = $this->catalyst->getControllerPath();\n if (strpos($path, 'favicon') !== false || is_null($path)) return false;\n if(class_exists($path)){\n try{// pull the trigger\n // Instantiate the class and \n $this->controller = new $path($this, $invokeAction);\n }catch(\\Exception $e){// that's a dud\n echo $e;\n // log path and error and everything\n // 404 response\n $this->printResult(new Result(null, 404));\n }\n }else if(!preg_match(\"/^[A-Z]/\", $this->catalyst->getController())){\n $this->catalyst->setController(ucfirst($this->catalyst->getController()));\n $this->instantiateController(true);\n }\n \n }", "title": "" }, { "docid": "fcf52de01d6330d2148d874e7010d4e3", "score": "0.6435974", "text": "function __construct() {\r\n\r\n $url = rtrim($_GET['url'], '/');\r\n $url = explode('/', $url);\r\n $counter = 0;\r\n $indexer = 0;\r\n $args = null;\r\n foreach ($url as $index) {\r\n if ($counter > 1) {\r\n $args[$indexer] = $index;\r\n $indexer++;\r\n }\r\n $counter++;\r\n }\r\n\r\n /*\r\n * Checking if any controller request has been made through the url[0] or not. if not\r\n * then the default controller will be excuted.\r\n * \r\n */\r\n\r\n if (isset($url[0])) {\r\n \r\n $file = 'controllers/' . $url[0] . '.php';\r\n if (file_exists($file)) {\r\n require $file;\r\n $app = new $url[0]();\r\n if (isset($url[1])) {\r\n if (method_exists($app, $url[1])) {\r\n $app->{$url[1]}($args);\r\n } else {\r\n error::error_handler(\"No such Method found\");\r\n }\r\n } else {\r\n if (method_exists($app, 'index')) {\r\n $app->index();\r\n }\r\n }\r\n } else {\r\n error::error_handler(\"No such controller\");\r\n \r\n }\r\n \r\n } else {\r\n echo \"Default controller\";\r\n }\r\n }", "title": "" }, { "docid": "a4bafcaa0a77c733dfb11f0c75b21aad", "score": "0.6435136", "text": "public function __construct()\n {\n $this->hash = new Hash();\n $this->view = new Views_Base();\n\n $class = get_class($this);\n $class = explode('Controller', $class);\n $file = 'app/models/'.$class[0].'/'.$class[0].'.php';\n\n if (file_exists($file))\n {\n require $file;\n }\n }", "title": "" }, { "docid": "d18497c5c2b5c73004e48808d309cdd3", "score": "0.64240944", "text": "public function getControllerReflector(): ReflectionClass;", "title": "" }, { "docid": "2100d1d61085d0aef23e02de10164076", "score": "0.6413199", "text": "public static function &instance() {\n\t\tif(self::$instance === nil) {\n\t\t\t// Routing has been completed\n\t\t\tEvent::run('system.post_routing');\n\n\t\t\tBenchmark::start(SYSTEM_BENCHMARK.'_controller_setup');\n\n\t\t\t// Log the current routing state for debugging purposes\n\t\t\tEight::log('debug', 'Routing \"'.Router::$current_uri.'\" using the \"'.Router::$current_route.'\" route, '.Router::$controller.'::'.Router::$method);\n\n\t\t\ttry {\n\t\t\t\t// Start validation of the controller\n\t\t\t\t$class = new ReflectionClass('Controller_'.ucfirst(Router::$controller));\n\t\t\t} catch(ReflectionException $e) {\n\t\t\t\t// Controller does not exist\n\t\t\t\tEvent::run('system.404');\n\t\t\t}\n\n\t\t\tif($class->isAbstract() OR (IN_PRODUCTION AND $class->getConstant('ALLOW_PRODUCTION') == FALSE)) {\n\t\t\t\t// Controller is not allowed to run in production\n\t\t\t\tEvent::run('system.404');\n\t\t\t}\n\t\t\t// Run system.pre_controller\n\t\t\tEvent::run('system.pre_controller');\n\n\t\t\t// Create a new controller instance\n\t\t\t$controller = $class->newInstance();\n\n\t\t\t// Controller constructor has been executed\n\t\t\tEvent::run('system.post_controller_constructor');\n\t\t\t\n\t\t\t\n\t\t\ttry {\n\t\t\t\t// Load the controller method\n\t\t\t\t$method = $class->getMethod(Router::$method);\n\n\t\t\t\t// Method exists\n\t\t\t\tif(Router::$method[0] === '_') {\n\t\t\t\t\t// Do not allow access to hidden methods\n\t\t\t\t\tEvent::run('system.404');\n\t\t\t\t}\n\n\t\t\t\tif($method->isProtected() or $method->isPrivate()) {\n\t\t\t\t\t// Do not attempt to invoke protected or private methods\n\t\t\t\t\tthrow new ReflectionException('protected controller method');\n\t\t\t\t}\n\n\t\t\t\t// Default arguments\n\t\t\t\t$arguments = Router::$arguments;\n\t\t\t} catch (ReflectionException $e) {\n\t\t\t\t// Use __call instead\n\t\t\t\t$method = $class->getMethod('__call');\n\n\t\t\t\t// Use arguments in __call format\n\t\t\t\t$arguments = array(Router::$method, Router::$arguments);\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\t// Stop the controller setup benchmark\n\t\t\tBenchmark::stop(SYSTEM_BENCHMARK.'_controller_setup');\n\n\t\t\t// Start the controller execution benchmark\n\t\t\tBenchmark::start(SYSTEM_BENCHMARK.'_controller_execution');\n\t\t\t\n\t\t\t// We MAY want to prevent a method from running sometimes\n\t\t\tif(Eight::$run_method) {\n\t\t\t\t// Execute the controller method\n\t\t\t\t$method->invokeArgs($controller, $arguments);\n\t\t\t}\n\t\t\t\n\t\t\t// Controller method has been executed\n\t\t\tEvent::run('system.post_controller');\n\n\t\t\t// Stop the controller execution benchmark\n\t\t\tBenchmark::stop(SYSTEM_BENCHMARK.'_controller_execution');\n\t\t}\n\n\t\treturn Eight::$instance;\n\t}", "title": "" }, { "docid": "a00918e7d9836fba06d5feef24b39b4d", "score": "0.6408862", "text": "function __construct() {\n $url = $_GET['url'];\n $url = rtrim($url, '/');\n $url = explode('/', $url);\n\n // set files path.\n $files = 'controllers/' . $url[0] . '.php';\n\n // if files is exist.\n if ( file_exists( $files ) ) {\n require $files;\n } else {\n require 'controllers/error.php';\n //throw new Exception(\"The File:\" . $files . \"Does not exist.\");\n $controllers = new Errors();\n return false;\n }\n\n $controllers = new $url[0];\n\n // If isset url is equal to 2.\n if ( isset( $url[2] ) ) {\n $controllers->{ $url[1] }( $url[2] );\n } else {\n if ( isset( $url[1] ) ) {\n $controllers->{$url[1]}();\n }\n }\n }", "title": "" }, { "docid": "29bf17ce6ed00f231334c9b81a9986d6", "score": "0.6402467", "text": "private function _loadDefaultController()\n\t\t{\n\t\t\trequire_once 'controllers/index.php';\n\t\t\t$this->_controller = new Index();\n\t\t\t$this->_controller->index();\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "01bcf1da67391c06e38ed9e4d3362285", "score": "0.6400651", "text": "public function getController() {\n if (class_exists($this->controller)) {\n $parent = class_parents($this->controller);\n\n if (in_array($this->Base_Controller_Name, $parent)) {\n // get method from child controller class \n if (method_exists($this->controller, $this->action)) {\n return new $this->controller($this->action,$this->urlParams);\n } else {\n throw new \\Exception(\"There is no Action!\");\n }\n } else {\n throw new \\Exception(\"Not Extends from Base controller.\");\n }\n } else {\n new $this->controller($this->action,$this->urlParams);\n throw new \\Exception(\"Controller not found!\");\n }\n }", "title": "" }, { "docid": "0d7e26d3f71abe9efa1e9254b7ee6425", "score": "0.63856333", "text": "protected function buildController()\n {\n $controllerClass = \"$this->apiTitle\".\"Controller\";\n $controllerBuildType = !$this->baseControllerExists || $this->paths == null ? \"basicBuild\" : \"build\";\n return $this->controllerBuilder->initialResource($controllerClass, \"controllerReplacer\")\n ->callArtisan()\n ->$controllerBuildType($this->column, array_merge($this->paths ?? [], [\n \"{{ controller_path }}\" => KMFileFacade::getClassNameSpace(\"Controller\", $controllerClass),\n ]));\n }", "title": "" }, { "docid": "69322e6b889bbe8de69630564f0088e8", "score": "0.63762337", "text": "protected function getMainController()\n\t{\n\t\t$route = new Routes( $this->server );\n\t\t$this->params = $route->getParams();\t\t\n\t\t$this->controller_name = $route->getController();\n\n\t}", "title": "" }, { "docid": "903ad0b6f3562fe21066c49b8b78dbdd", "score": "0.63740546", "text": "private function load_controller()\n\t{\n\t\t$b = $this->application_root().'/controllers/';\n\t\t$f = realpath ($b.$this->controller_name.'_controller.php');\n\t\t# Throw exception if $controller_name pointed out of controllers directory:\n\t\tif (strpos ($f, $b) !== 0)\n\t\t\tthrow new MissingControllerException (\"couldn't find controller '{$this->controller_name}'\");\n\t\t# ApplicationController:\n\t\t$this->require_file ($this->application_root().'/controllers/application_controller.php');\n\t\t# Load file if everything seems OK:\n\t\t$this->require_file ($f);\n\t\t# Controller:\n\t\t$class_name = Inflector::to_controller_name ($this->controller_name);\n\t\tif (!class_exists ($class_name))\n\t\t\tthrow new MissingControllerException (\"couldn't find controller '{$class_name}'\");\n\t\treturn new $class_name();\n\t}", "title": "" }, { "docid": "287e73ab51ae5f5ed5433fe3f9e9dcff", "score": "0.6354582", "text": "public function getController() {\n $page = $this->getPage();\n switch ($page) {\n case \"overview\":\n return new OverviewController();\n \n case \"addDummy\":\n default:\n return new OverviewController();\n \n }\n \n \n }", "title": "" }, { "docid": "ade494f0601d688db93885a355ce6ceb", "score": "0.63465494", "text": "public function createController($route, $owner=null, $_box = false) {\n // detected language\n// $_l_code = false;\n// if($_tree_route = explode('/', $route) and is_array($_tree_route) and count($_tree_route) > 0) {\n// \\init::app()->setLanguage( $this->getLangs($_tree_route[0]) );\n// \n// if($_lang = \\init::app()->getLanguage() and is_array($_lang) and count($_lang) > 0) {\n// if($_lang[0]->lang_code == $_tree_route[0]) {\n// array_shift($_tree_route);\n// $route = implode('/', $_tree_route);\n// }\n// \n// }\n// \n// } \n // end\n \n $this -> parseAlies($route);\n \n if($owner===null)\n $owner=$this;\n if( trim($route,'/') !== '' and _detected == 'front') {\n \n // load section\n if($_section = $this->getTreeSection() and is_array($_section) and count($_section) > 0 and $_box == false) {\n if(isset($_section['controller']) and !empty($_section['controller'])) {\n $_sec_action = (isset($_section['action']) and !empty($_section['action'])) ? $_section['action'] : 'index';\n $route = $_section['controller'].'/'.$_sec_action; \n if(isset($_section['homepage']) and $_section['homepage'])\n $this ->setHomePage( $_section['homepage'] );\n }\n // load params\n if($_params = $this->getTreeParams() and isset($route) and !empty($route)) {\n $manager=$this->getUrlManager();\n $manager->parsePathInfo((string)$_params);\n }\n \n \n } \n \n \n } // load DB controller and action\n else if(($route=trim($route,'/'))==='') {\n $route = $owner->defaultController;\n } else if( _detected == 'admin' and trim($route,'/') !== '' ) {\n \n // load section\n if($_section = $this->getTreeSection() and is_array($_section) and count($_section) > 0 and $_box == false) {\n \n if(isset($_section['controller']) and !empty($_section['controller'])) {\n $_sec_action = (isset($_section['action']) and !empty($_section['action'])) ? $_section['action'] : 'index';\n $route = $_section['controller'].'/'.$_sec_action; \n }\n // load params\n if($_params = $this->getTreeParams() and isset($route) and !empty($route)) {\n $manager=$this->getUrlManager();\n $manager->parsePathInfo((string)$_params);\n }\n } \n \n } else {\n $route= false; \n }\n \n// if(($route=trim($route,'/'))==='')\n// $route=$owner->defaultController;\n $caseSensitive=$this->getUrlManager()->caseSensitive;\n $route.='/';\n\n\n\n while(($pos=strpos($route,'/'))!==false) {\n $id=substr($route,0,$pos);\n\n\n if(!preg_match('/^\\w+$/',$id))\n return null;\n if(!$caseSensitive)\n $id=strtolower($id);\n $route=(string)substr($route,$pos+1);\n\n if(isset($id) and !empty($id)) {\n $_path = $this->getMvc().DS._detected.DS.$id.DS.'controllers'.DS;\n $this->setControllerPath( $_path );\n } \n\n\n if(!isset($basePath)) // first segment\n {\n if(isset($owner->controllerMap[$id]))\n {\n return array(\n \\init::createComponent($owner->controllerMap[$id],$id,$owner===$this?null:$owner),\n $this->parseActionParams($route),\n );\n }\n\n if(($module=$owner->getModule($id))!==null)\n return $this->createController($route,$module);\n\n $basePath=$owner->getControllerPath();\n $controllerID='';\n }\n else\n $controllerID.='/';\n $className=ucfirst($id).'Controller';\n $classFile=$basePath.DIRECTORY_SEPARATOR.$className.'.php';\n\n // echo \"route = \".$classFile; die('stop');\n\n if($owner->controllerNamespace!==null)\n $className=$owner->controllerNamespace.'\\\\'.$className;\n\n if(is_file($classFile))\n {\n if(!class_exists($className,false))\n require($classFile);\n if(class_exists($className,false) && is_subclass_of($className,'CController'))\n {\n $id[0]=strtolower($id[0]);\n return array(\n new $className($controllerID.$id,$owner===$this?null:$owner),\n $this->parseActionParams($route),\n );\n }\n return null;\n }\n $controllerID .= $id;\n $basePath.= DS.$id;\n }\n \n\t}", "title": "" }, { "docid": "23422a0a7a4de2549e5b09a4170de8e5", "score": "0.63311666", "text": "public function testCreateTheControllerClass()\n {\n $controller = new HelloWorldController();\n $this->assertInstanceOf(\"App\\Http\\Controllers\\HelloWorldController\", $controller);\n }", "title": "" }, { "docid": "108dd1a993b29c33d7de679603ad3238", "score": "0.6313732", "text": "protected function createController(): self\n {\n $path = app_path(\"Http/Controllers/{$this->moduleClass}/{$this->singularClass}Controller.php\");\n $stub = $this->getStub('model/controller');\n\n $this->files->put($path, $this->replacePlaceholders($stub));\n $this->info('Model controller created');\n\n return $this;\n }", "title": "" }, { "docid": "b972f66ad3dff482650fccb8acf373fb", "score": "0.63132286", "text": "public function init() {\n\n\t\t$path = 'application/controllers/';\n\n\t\t// Get the requested url\n\t\t$request = $_GET['req'];\n\n\t\t// Check wether the requested route is in the routes file or not\n\t\tif ($route = $this->in_routes($request)) {\n\t\t\t$request = $route;\n\t\t}\n\n\t\t// Make an array of the request\n\t\t$url = explode('/', $request);\n\t\t\n\t\t// Check wether the first part of the request is a subfolder in controllers. If this is true, shift the array\n\t\tif (is_dir($path.$url[0])) {\n\t\t\t$path = $path.$url[0].'/';\n\t\t\tarray_shift($url);\n\t\t}\n\n\t\t// Set the requested page and action variables with values from the url variable\n\t\tlist($page, $action) = $url;\n\t\t$parameters = array_slice($url, 2);\n\n\t\t// Set the controller to default, then set the default controller\n\t\tif (empty($page)) {\n\t\t\t$page = DEFAULT_CONTROLLER;\n\t\t}\t\t\n\n\t\t// Set the action to index, if there is no action given\n\t\tif (empty($action)) {\n\t\t\t$action = DEFAULT_ACTION;\n\t\t}\n\n\t\t// Set the class variables, so the values are retrievable later\n\t\tself::$_url['page'] = $page;\n\t\tself::$_url['action'] = $action;\n\t\tself::$_url['url'] = BASE_PATH.$request;\n\n\t\t// Set the correct names of the action and the controllers\n\t\t$action = 'action_'.$action;\n\t\t$controller_path = $path.$page.'_controller.php';\n\t\t$controller_name = ucfirst($page.'_Controller');\n\n\t\t// Check if the file exists\n\t\tif (file_exists($controller_path)) {\n\t\t\tinclude $controller_path;\n\t\t\t\n\t\t\t// Check if the class exists\n\t\t\tif (class_exists($controller_name)) {\n\t\t\t\t$controller = new $controller_name;\n\t\t\t\t\n\t\t\t\t// Check if the action exists\n\t\t\t\tif (method_exists($controller, $action)) {\n\t\t\t\t\n\t\t\t\t\t// Initialize the action\n\t\t\t\t\tcall_user_func(array($controller, 'initialize'));\n\t\t\t\t\t\n\t\t\t\t\t// If there are any parameters given, pass them on to the action\n\t\t\t\t\tif (empty($parameters)) {\n\t\t\t\t\t\tcall_user_func(array($controller, $action));\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tcall_user_func_array(array($controller, $action), $parameters);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$this->render_404();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->render_404();\n\t\t\t}\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "969170f4e10d1a43e42e05286fc3dc5b", "score": "0.6287799", "text": "public function to_controller($r) {\n\n // Check for static routes and after for regexp routes.\n\n if (isset($this->static_routes[$r->http_method][$r->http_path])) {\n $route = $this->static_routes[$r->http_method][$r->http_path];\n\n $classname\t= $route[0];\n $method = $route[1];\n $controller = null;\n \n $this->dispatched_to = $method;\n\n try {\n \n $controller = new $classname($r);\n\n try {\n $controller->$method($r);\n }\n catch (Exception $e) {\n $this->send_error($r, $e);\n }\n\n } \n catch (Exception $e) {\n $controller = new Controller($r);\n $controller->template = 'login';\n if ($e->getMessage() != '') { $controller->exception = $e; }\n }\n\n\t\t\treturn $controller;\n\n }\n else {\n\n foreach ($this->regexp_routes[$r->http_method] as $regexp => $route) {\n\n // The regexp route allows for capture in the path\n\n $regexp = preg_replace('|/|', '\\/', $regexp);\n $regexp = '/'.$regexp.'/';\n \n $controller = null;\n\n if (preg_match($regexp, $r->http_path, $matches)) {\n \n array_shift($matches);\n\n $classname\t= $route[0];\n $method = $route[1];\n\n $this->dispatched_to = $method;\n\n try {\n\n $controller = new $classname($r, $matches);\n\n try {\n $controller->$method($r);\n }\n catch (Exception $e) {\n $this->send_error($r, $e);\n }\n\n } \n catch (Exception $e) {\n $controller = new Controller($r, $matches);\n $controller->template = 'login';\n if ($e->getMessage() != '') { $controller->exception = $e; }\n }\n\n return $controller;\n\n }\n\n }\n\n }\n\n echo(\"No route defined for \".$r->http_method.\" \".$r->http_path.\"\");\n }", "title": "" }, { "docid": "9b33775ef28976a2b27da340b07a1696", "score": "0.6256668", "text": "public static function make()\n {\n return new ControllerRequest();\n }", "title": "" }, { "docid": "94707d8abdcdfd2ec282538b44f008c7", "score": "0.6252576", "text": "private function getControllerInstance()\r\n {\r\n if (!class_exists($this->request->getClass()))\r\n {\r\n throw new NotFoundException('404 Not Found!');\r\n }\r\n $class = $this->request->getClass();\r\n return new $class($this->request, $this->response);\r\n }", "title": "" }, { "docid": "93a865f66eaca585a215af60fdffdad0", "score": "0.62514603", "text": "private static function register_controllers() {\n $base_dir = $GLOBALS['wpatomic_base_dir:'.__DIR__];\n if( !file_exists( $base_dir.'/controllers' ) ) {\n return;\n }\n $controllers = self::get_controller_files();\n foreach( $controllers as $path ) {\n //Extract the short name of the class for each file\n $long_name = self::get_class_from_path( $path );\n try {\n //Construct a reflection class\n $ref = new \\ReflectionClass( $long_name );\n //Register the actions and filters for each controller\n self::register_hooks( $long_name );\n } catch(ReflectionException $e) {\n error_log( $e->getMessage() );\n }\n }\n }", "title": "" }, { "docid": "992c9489a6a543f4fb74fccf0bc1adbe", "score": "0.6249908", "text": "public function start()\n {\n list($server, $dir, $serverDir,$apiDir ,$className, $input) = explode('/', $this->url, 6);\n $className[0] = strtoupper($className[0]); \n\n $controllerName = 'Controller' . $className;\n $controllerClass = 'application\\controllers\\\\Controller' . $className;\n\n $controllerFile = $controllerName . '.php';\n $controllerPath = \"application/controllers/\" . $controllerFile;\n if(!file_exists($controllerPath))\n {\n $this->ErrorPage404();\t\n }\n\n switch($this->method)\n {\n case 'GET':\n $controller = new $controllerClass($className);\n if(method_exists($controller, 'actionGet'))\n {\n $controller->actionGet($input);\n }\n else\n {\n $this->ErrorPage404();\n }\n break;\n case 'POST':\n $controller = new $controllerClass($className);\n if(method_exists($controller, 'actionPost'))\n {\n $controller->actionPost($input);\n }\n else\n {\n $this->ErrorPage404();\n }\n break;\n case 'DELETE':\n $controller = new $controllerClass($className);\n if(method_exists($controller, 'actionDelete'))\n {\n $controller->actionDelete($input);\n }\n else\n {\n $this->ErrorPage404();\n }\n break;\n case 'PUT':\n $controller = new $controllerClass($className);\n if(method_exists($controller, 'actionPut'))\n {\n $controller->actionPut($input);\n }\n else\n {\n $this->ErrorPage404();\n }\n break;\n case 'OPTIONS':\n \n break;\n default:\n $this->ErrorPage404();\n } \n\n }", "title": "" }, { "docid": "f3f6342d897eb51d1ddfacb296060309", "score": "0.6247211", "text": "private function setController()\n {\n $this->controller = self::$config->getDefaultController();\n\n if (!empty(self::$url)) {\n $urlChunks = explode(\"/\", self::$url);\n if (sizeof($urlChunks) > 0) {\n $controller = ucfirst(array_shift($urlChunks)) . 'Controller';\n\n if (class_exists($controller)) {\n $this->controller = $controller;\n $method = isset($urlChunks[0]) ? $urlChunks[0] : null;\n\n // Call specific method directly?\n if ($this->setMethod($method)) {\n // Remove method from arguments\n array_shift($urlChunks);\n }\n\n $this->args = $urlChunks;\n }\n else {\n $this->args = explode(\"/\", self::$url);\n }\n }\n }\n }", "title": "" }, { "docid": "63b58b73ecb01162a398e2a2228a01d6", "score": "0.62382907", "text": "function DefaultController()\n {\n \n }", "title": "" }, { "docid": "5677ae0bc9a4abce52974f59f8374f0a", "score": "0.62289184", "text": "private static function get_controller(string $controller_name): controller {\n // Sanity check on input\n if (!preg_match('#^[a-z_]+$#', $controller_name)) {\n throw new \\Exception('Invalid controller name');\n }\n\n // Work out what the namespace should be\n $namespace = substr(controller::class, 0, strrpos(controller::class, '\\\\'));\n\n // Class name should then be this\n $controller_class = \"{$namespace}\\\\{$controller_name}\";\n\n if (!class_exists($controller_class)) {\n throw new \\Exception('Controller not found');\n }\n\n return new $controller_class();\n }", "title": "" }, { "docid": "d8c829809cbdf130ab92e281f35b25eb", "score": "0.6220655", "text": "public function __construct() {\n\t\t$url = $this->_parseUrl();\n\n\t\n\t\t// load new controller\n\t\tif (isset($url[0])) {\n\t\t\tif (file_exists('app/controllers/' . $url[0]. '.class.php')) {\n\t\t\t\t$this->_controller = $url[0];\n\t\t\t\tunset($url[0]);\n\t\t\t} else {\n\t\t\t\t$this->_loadError();\n\t\t\t}\n\t\t}\n\t\t\n\t\trequire_once('app/controllers/' . $this->_controller. '.class.php');\n\t\t// load new method\n\t\tif (isset($url[1])) {\n\t\t\tif (method_exists($this->_controller, $url[1])) {\n\t\t\t\t$this->_method = $url[1];\n\t\t\t\tunset($url[1]);\n\t\t\t} else {\n\t\t\t\t$this->_loadError();\n\t\t\t}\n\t\t}\n\n\t\t// $this->_params\n\t\tcall_user_func_array([new $this->_controller, $this->_method], $this->_params);\n\t}", "title": "" }, { "docid": "b788b77614b73f6619cc507cc9ca0283", "score": "0.621854", "text": "public function find_controller()\n\t{\n\t\t$requests = Cogs_URI::uri_requested_controllers();\n\t\t\n\t\tif ( ! empty($requests) && is_array($requests))\n\t\t{\n\t\t\t$requests = array_reverse($requests);\n\t\t}\n\n\t\tif (empty($requests))\n\t\t{\n\t\t\treturn Cogs::controller(ROOT_CONTROLLER);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tforeach ($requests as $request)\n\t\t\t{\n\t\t\t\tif (class_exists($request))\n\t\t\t\t{\n\t\t\t\t\treturn Cogs::controller($request);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn Cogs::controller(DEFAULT_CONTROLLER);\n\t}", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.6218364", "text": "public function getController();", "title": "" }, { "docid": "3df14d7b414405efede460ae327fa14e", "score": "0.62172294", "text": "protected function standardController()\n {\n // Initialize the constructor's tag.\n if ($this->guardName != 'guest' and ! $this->option('guest')) {\n $tagConstructor = \"\\$this->middleware(AuthInterface::MIDDLEWARE);\";\n }\n else {\n $tagConstructor = \"//\";\n }\n\n if ($this->option('data')) {\n // Model import.\n if (! $this->model()) return FALSE;\n\n // Request Store import.\n if (! $requestStoreName = $this->requestStore()) return FALSE;\n\n // Request Update import.\n if (! $requestUpdateName = $this->requestUpdate()) return FALSE;\n\n $tagArgumentStore = \"$requestStoreName \\$request\";\n $tagArgumentUpdate = \"$requestUpdateName \\$request, \\$id\";\n }\n else {\n $this->tagUse = \"\";\n $tagArgumentStore = \"Request \\$request\";\n $tagArgumentUpdate = \"Request \\$request, \\$id\";\n }\n\n // Set the template's name and path.\n $this->template();\n\n // Prepare content file.\n $content = AdaFile::get($this->templatePath);\n $content = str_replace(\"TAG_CLASS_NAME\", $this->controllerClassName, $content);\n $content = str_replace(\"/*TAG_CONSTRUCTOR*/\", $tagConstructor, $content);\n\n $content = str_replace(\"/*TAG_ARGUMENTS_STORE*/\", $tagArgumentStore, $content);\n $content = str_replace(\"/*TAG_ARGUMENTS_UPDATE*/\", $tagArgumentUpdate, $content);\n\n if ($this->middlewareGroupName == 'api') {\n $content = str_replace(\"/*TAG_INDEX*/\", \"//\", $content);\n }\n else {\n $content = str_replace(\"/*TAG_INDEX*/\", \"return view('$this->guardName.$this->controllerName.index');\", $content);\n }\n\n return $content;\n }", "title": "" }, { "docid": "98c9023bfaf44016718eadd203b5f0e0", "score": "0.62057865", "text": "public function useController()\n {\n $args = func_get_args();\n \n // First args is always used as Controller\n $controller = $args[0];\n $real_controller = explode('@', $controller);\n \n // Other args\n $other_args = [];\n for($i = 1; $i < count($args); $i++) {\n array_push($other_args, $args[$i]);\n }\n\n $class = '\\App\\Controller\\\\' . $real_controller[0];\n $object = new $class();\n $method = $real_controller[1];\n \n if(is_array($other_args)) {\n if(count($other_args) > 0) {\n $object->$method($other_args[0]);\n } else {\n $object->$method();\n }\n }\n }", "title": "" }, { "docid": "da43cde9358641e0b19a7ba29a51735d", "score": "0.62052375", "text": "private function getController()\n {\n return $this->buildMockedController(ConsoleController::class, [$this->config]);\n }", "title": "" }, { "docid": "0b02ccf0e48ffb267e5e87f286be0016", "score": "0.61994845", "text": "public function __construct() {\n\t\t$url = $this->parseUrl();\n\n\t\tif (file_exists('../app/controllers/'. @$url[0] .'_controller.php')) {\n\t\t\t$this->controller = $url[0];\n\t\t}\n\t\tunset($url[0]);\n\t\trequire_once '../app/controllers/'. $this->controller .'_controller.php';\n\n\t\t$this->controller = new $this->controller;\n//Se verifica si hay una url en la primera pocision del arreglo\n\t\tif (isset($url[1])) {\n\n\t\t\tif (method_exists($this->controller, $url[1])) {\n\t\t\t\t$this->method = $url[1];\n\t\t\t}\n\t\t}\n//Una vez usada, se suelta para poder usarla luego nuevamente\n\t\tunset($url[1]);\n\t\t$this->params = $url ? array_values($url) : [];\n\t\tarray_unshift($this->params);\n\n\t\tcall_user_func_array([$this->controller, $this->method], $this->params);\n\t}", "title": "" }, { "docid": "809438faac773db0ef969d392b6089b7", "score": "0.61971766", "text": "function &__getController($params = null) {\r\n\t\r\n\t\tif (!is_array($params)) {\r\n\t\t\t$original = $params = $this->params;\r\n\t\t}\r\n\t\t$controller = false;\r\n\t\t\t//print_r($params);\r\n\t\t$ctrlClass = $this->__loadController($params);\r\n\t//echo $ctrlClass;\r\n\t\tif (!$ctrlClass) {\r\n\t\t\t//echo \"here\";\r\n\t\t\t//exit;\t\r\n\t\t\tif (!isset($params['plugin'])) {\r\n\t\t\t\t$params = $this->_restructureParams($params);\r\n\t\t\t} else {\r\n\t\t\t\tif (empty($original['pass']) && $original['action'] == 'index') {\r\n\t\t\t\t\t$params['action'] = null;\r\n\t\t\t\t}\r\n\t\t\t\t$params = $this->_restructureParams($params, true);\r\n\t\t\t}\r\n\t\t\t$ctrlClass = $this->__loadController($params);\r\n\t\t\t\r\n\t\t\tif (!$ctrlClass) {\r\n\t\t\t\t$this->params = $original;\r\n\t\t\t\treturn $controller;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$params = $this->params;\r\n\t\t}\r\n\t\t$name = $ctrlClass;\r\n\t\t\r\n\t\t$controller = __autoload($ctrlClass);\r\n\t\t$this->params = $params;\t\r\n\t\t\r\n\t\treturn $controller; \r\n\t}", "title": "" }, { "docid": "dc15096626e56d54e0cb62f9bc7d69f5", "score": "0.61819077", "text": "public static function create($controllerName)\n {\n $fileName = ucfirst($controllerName) . 'Controller.php';\n $className = \"app\\controllers\\\\\" . ucfirst($controllerName) . 'Controller';\n $filePath = './app/controllers/' . $fileName;\n require_once($filePath);\n if (!class_exists($className)) {\n throw new Exception(\"Class $className not founded!\");\n }\n return new $className();\n }", "title": "" }, { "docid": "6740be828ea6c1ce07d878b5aaf063c3", "score": "0.6156522", "text": "public function __construct()\n\t{\n\t\t$url = $this->parseURL();\n\n\t\tif ($url == NULL) {\n\t\t\t$url = [$this->controller];\n\t\t}\n\t\t//mengecek file dalam ada atau tidak dalam folder dengan yang diketikkan pada url controller jika ada maka controller ganti dengan yang sama pada url\n\t\tif (file_exists('../app/controllers/'.$url[0].'.php')) {\n\t\t\t$this->controller = $url[0];\n\t\t\tunset($url[0]);\n\t\t}\n\t\t// memanggil file controller yang diketikkan pada url dengan index 0\n\t\trequire_once '../app/controllers/'.$this->controller.'.php';\n\t\t//menimpa controller default dengan controller baru yang telah diketikkan\n\t\t$this->controller = new $this->controller;\n\n\n\t\t// method\n\t\tif (isset($url[1])) {\n\t\t\tif (method_exists($this->controller, $url[1])) {\n\t\t\t\t$this->method = $url[1];\n\t\t\t\tunset($url[1]);\n\t\t\t}\n\t\t}\n\n\t\t//parameter\n\t\tif (!empty($url)) {\n\t\t\t//mengisi parameter dengan nilai array yang ada pada url\n\t\t\t$this->params=array_values($url);\n\t\t}\n\t\t//jalankan controller dan method, serta kirimkan parameter jika ada\n\t\tcall_user_func_array([$this->controller,$this->method], $this->params);\n\n\t}", "title": "" }, { "docid": "628c659bcc4935d910c129eddf186721", "score": "0.61441106", "text": "public function controller() {\n\t\t// starting session\n\t\tsession_cache_limiter(false);\n\t\tsession_start();\n\n\t\t// load configs\t\t\n\t\trequire_once 'config/envconfig.php';\n\t\t$this->salt = $salt;\n\n\t\t// set timezone\n\t\tdate_default_timezone_set($timezone);\n\t\t\n\t\t// composer autoload\n\t\trequire 'vendor/autoload.php';\n\n\t\t// blade parameter\n\t\trequire 'lib/MyBlade.php';\n\t\t$this->blade = new \\Lib\\MyBlade('view', 'cache');\n\t\t$blade =& $this->blade;\n\n\t\t$this->app = new \\Slim\\Slim(\n\t\t\tarray(\n\t\t\t\t'debug'\t=> $debug\n\t\t\t)\n\t\t);\n\n\t\t$this->load('helper', 'controller');\n\t\t$app =& $this->app;\n\t\t$ctr = $this;\n\t\t\n\t\t// custom 404\n\t\t$this->app->notFound(function() {\n\t\t\tprint $this->load_view('404', array('request' => $_SERVER['REQUEST_URI']));\n\t\t});\n\t\t$this->app->error(function($e) {\n\t\t\tprint $this->load_view('500', array('message' => 'Something went WRONG!'));\n\t\t});\n \n\t\t\n\t\t// auto load library\n\t\tspl_autoload_register(function($class) {\n\t\t\t$file = 'lib/' . str_replace('Lib\\\\', '', $class) . '.php';\n\t\t\tif (is_file($file)) {\n\t\t\t\trequire_once $file;\n\t\t\t\tclearstatcache();\n\t\t\t}\n\t\t});\n\t\t\n\t\t// load semua controller file\n\t\tforeach (scandir('controller') as $file) {\n\t\t\tif (is_file('controller/' . $file)) {\n\t\t\t\trequire('controller/' . $file);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->app->run();\n\t}", "title": "" }, { "docid": "c8b8280d386722b5546abb5d71a512d6", "score": "0.6126199", "text": "function Controller()\n {\n $this->view = new View();\n }", "title": "" }, { "docid": "c830743e81c7f2f59b7175f269a262b1", "score": "0.6126129", "text": "public function bootstrap()\n\t{\n\t\t// application_folder must exist\n\t\tif (!is_dir(realpath($this->getApplicationFolder())))\n\t\t{\n\t\t\tthrow new Exception('Application folder does not exist: '\n\t\t\t\t. $this->getApplicationFolder());\n\t\t}\n\n\t\t$controllerFolder = $this->getApplicationFolder() . '/Controllers';\n\t\tif (realpath($controllerFolder) === false)\n\t\t{\n\t\t\tthrow new Exception('Controller folder failed: ' . $controllerFolder);\n\t\t}\n\n\t\t$controllerName = ucfirst($this->getRouter()->getController()) . 'Controller';\n\t\t$controllerPath = $controllerFolder . '/' . $controllerName . '.php';\n\t\t$actionName = strtolower($_SERVER['REQUEST_METHOD']) . ucfirst($this->getRouter()->getAction());\n\n\t\tif (!is_readable($controllerPath))\n\t\t{\n\t\t\tthrow new Exception('Could not read controller file: ' . $controllerPath);\n\t\t}\n\n\t\tinclude_once $controllerPath;\n\t\t$controller = new $controllerName();\n\n\t\tif (is_callable(array($controller, $actionName)))\n\t\t{\n\t\t\t$controller->$actionName();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new Exception('Action does not exist: ' . $controllerName . '::' . $actionName . '()');\n\t\t}\n\t}", "title": "" }, { "docid": "68b1ad53fdc1447458241cd2c1a22130", "score": "0.61221504", "text": "function __construct() {\n if (array_key_exists('url', $_GET)) {\n $url = $_GET['url'];\n } else {\n $url = 'index/index';\n }\n\n /* Sanitize the URL, and convert it to an array. */\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = rtrim($url, '/');\n $url = explode('/', $url);\n\n // debug\n // print_r($url);\n\n /* Check if the a valid page wsa requested. The requested controller is\n * stored in $url[0]. If there isn't a valid match, load an error page. */\n $file = CONTROLLERS_PATH . DS . $url[0] . '.php';\n if (file_exists($file)) {\n require_onc $file;\n } else {\n require CONTROLLERS_PATH . DS . 'error.php';\n $controller = new Error();\n // Prevents the rest of the page from executing -- fix this!\n return false;\n }\n\n /* Once the controller has been verified, create it. Then, load the\n * corresponding model. */\n $controller = new $url[0];\n\n /* Model being loaded in lib/controller.php now? Unsure. */\n // $controller->loadModel($url[0]);\n // $controller-loadSession(); // Sessions still not working\n\n /* Once the controller has been created, decide what method needs to be\n * called, and if there are any parameters. First, check to see if any\n * parameters have been passed by checking if $url[2] has been set. (Any\n * parameters that have been passed will be stored in index 2.) If there\n * are parameters, call the method stored in index 1. (Any methods will\n * be stored in index 1.) If no parameters are specified, the controller's\n * method is called without parameters. Finally, if no method is specified,\n * the index method is called by default. */\n if (isset($url[2])) {\n $controller->{$url[1]}($url[2]);\n } elseif (isset($url[1])) {\n $controller->{$url[1]}();\n } else {\n $controller->index();\n }\n }", "title": "" }, { "docid": "c88508a31c4f7137cb1f32863e76ff2f", "score": "0.61057234", "text": "public function createController(): void\n {\n $minimum_buffer_min = 3;\n\n if ($this->routerService->ds_token_ok($minimum_buffer_min)) {\n\n $organizationId = $GLOBALS['DS_CONFIG']['organization_id'];\n\n // Call the worker method\n $results = CreateNewUserService::addActiveUser(\n $organizationId,\n $this->args[\"envelope_args\"],\n $this->clientService);\n\n if ($results) {\n $this->clientService->showDoneTemplate(\n \"Create a new user\",\n \"Admin API data response output:\",\n \"Results from Users:createUser:\",\n json_encode(($results->__toString()))\n );\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "title": "" }, { "docid": "89b9bfd44a1358514eefc08a8e2b0f8a", "score": "0.6103691", "text": "function autoloadController($className) {\n $filename = \"system/controllers/\" . $className . \".control.php\";\n\t$filename2 = \"system/controllers/\" . $className . \".php\";\n if(is_readable($filename) && !in_array($className, sysclasses()) ) \n {\n require_once($filename);\n }\n else if (is_readable($filename2) && !in_array($className, sysclasses()) ) \n {\n require_once($filename2);\n\t}\n}", "title": "" }, { "docid": "2c423b42ba5b34af7c5c293b3f5c05b2", "score": "0.6099363", "text": "function getController() {\n if(class_exists(NAMESPACE_CONTROLLER.$this->controller)){\n //retorna a classe controller encontrada\n return NAMESPACE_CONTROLLER.$this->controller;\n }\n //retorna a classe controller padrão HomeController\n return NAMESPACE_CONTROLLER.ucfirst(CONTROLLER_PADRAO).\"Controller\";\n }", "title": "" }, { "docid": "36db3bd717412acbbff17315b642a857", "score": "0.6098847", "text": "function controlador($nombre=null){\r\n switch($nombre){\r\n default: return new AppController;\r\n case \"usuarios\": return new UsuarioController;\r\n }\r\n}", "title": "" }, { "docid": "f58a9d98c5274b7a6dfaae48f583ff30", "score": "0.6091921", "text": "public function inicializar() {\n /* Faz um loop em todas as classes PHP */\n foreach (get_declared_classes() as $nomeClasse) {\n /* Verifica se a classe extende a classe \"Controller\" */\n if (in_array(\"Controller\", class_parents($nomeClasse))) {\n /* Cria uma nova instância da classe */\n $classe = new $nomeClasse($this);\n /* Chama o método init dessa nova classe */\n $classe->init();\n }\n }\n\n /* Caso nenhuma rota tenha sido encontrada, retorna uma mensagem */\n if (!$this->sucesso) {\n $this->enviarResultado(array(\"erro\" => \"Rota não encontrada\"));\n }\n }", "title": "" }, { "docid": "c309741ef45df4e16925f333a1077405", "score": "0.60917586", "text": "protected function loadRequiredControllers()\n\t{\n\t\t$array_of_controllers = $this->defineRequiredControllers();\n\n\t\tif ( !empty( $array_of_controllers ) && !is_array( $array_of_controllers ) )\n\t\t{\n\t\t\tthrow new ControllerException( 'You must define the required controllers\n\t\t\twith an array form.' );\n\n\t\t}\n\t\telseif ( is_array( $array_of_controllers ) )\n\t\t{\n\t\t\tforeach ( $array_of_controllers as $controller_name => $values )\n\t\t\t{\n\t\t\t\tif ( $values['singleton'] )\n\t\t\t\t{\n\t\t\t\t\tFactory::getInstance( $controller_name )->run();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$object = new $controller_name;\n\t\t\t\t\t$object->run();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "e2c9a2660a11d6b69c3dfc174b4f7ca9", "score": "0.60871816", "text": "public function testConstructor()\n {\n $this->assertTrue($this->controller instanceof AdminPanelController);\n }", "title": "" }, { "docid": "9220a2a5913238bac2b192345849192d", "score": "0.6085044", "text": "function __construct() {\n $url = isset($_GET['url']) ? $_GET['url'] : null;\n $url = rtrim($url, '/');\n $url = explode('/' , $url);\n \n //print_r($url);\n \n if (empty ($url[0])) {\n require CONTROLLER_PATH . 'index.php';\n $controller = new Index();\n $controller->index();\n return false;\n }\n \n $file = CONTROLLER_PATH . $url[0] . '.php';\n if (file_exists($file)) {\n require $file;\n } else {\n require CONTROLLER_PATH . 'error.php';\n $controller = new Error();\n return false;\n }\n $controller = new $url[0];\n $controller->loadModel($url[0]);\n \n //calling methods\n if (isset($url[2])) {\n if (method_exists($controller, $url[1])) {\n $controller->{$url[1]}($url[2]);\n } else {\n echo \"Error: Method does not exist\";\n } \n } else {\n if (isset($url[1])){\n if (method_exists($controller, $url[1])) {\n $controller->{$url[1]}(); \n } else {\n echo \"Error: Method does not exist\";\n } \n } else {\n $controller->index();\n }\n } \n }", "title": "" }, { "docid": "28d6b3c04bce0f9c1c82e6f148128713", "score": "0.60837483", "text": "public function __construct()\n {\n try {\n $url = $this->parseUrl();\n\n //since we dont have a default route so if controller is not defined in url than\n // we return route error response\n if(isset($url[0])){\n if (file_exists('../app/Controller/' . ucfirst($url[0]) . 'Controller.php')) {\n $this->controller = ucfirst($url[0]) . 'Controller';\n require_once( \"../app/Controller/{$this->controller}.php\" );\n $class = ('App\\\\Controller\\\\' . $this->controller);\n $this->controller = new $class(new Container);\n unset($url[0]); // remove controller index\n }\n else {\n Helpers::errorResponse500($url[0] . ' not found!');\n }\n }else{\n Helpers::errorResponse500('api not found!');\n }\n\n // Check if url contains method, which is index number 1 if not than error response\n if (isset($url[1])) {\n //Check if method exists in controller\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]); // remove method part\n } else {\n Helpers::errorResponse500($url[1] . ' not found!');\n }\n }\n else{\n Helpers::errorResponse500('api not found!');\n }\n\n //Now remaining index inside url array are parameters\n $this->params = $url ? array_values($url) : [];\n\n //if controller is found with method and parameters, now call function and if no success\n //than error response else call controller api\n if (!call_user_func_array([$this->controller, $this->method], $this->params)) {\n throw new Exception();\n }\n\n } catch (Throwable $e) {\n Helpers::errorResponse500('api not found!');\n }\n\n }", "title": "" }, { "docid": "2442b08fad23aff7f41270d840a240d2", "score": "0.6077472", "text": "public function create()\n {\n \n return view(\"lib.class.create\");\n }", "title": "" } ]
263aa65632ff9936073e859515d0c1ec
"Get a user's details"
[ { "docid": "c6b79acdeec9eba2f127342b2b07b16c", "score": "0.0", "text": "public function getUser()\n {\n $userId = $this->id;\n\n $url = \"Users/$userId\";\n\n $curOptions = $this->options;\n $curOptions['headers'] = [\n 'Authorization' => $this->accessToken\n ];\n\n $client = new Client([\n 'base_uri' => $this->baseUrl\n ]);\n\n try{\n $response = $client->request('GET', $url, $curOptions);\n\n $body = (string)$response->getBody();\n $data = json_decode($body);\n\n return (object) [\n 'code' => $response->getStatusCode(),\n 'message' => $response->getReasonPhrase(),\n 'data' => $data,\n 'status' => 'success'\n ];\n }catch(GuzzleException $e){\n return (object) [\n 'error' => $e->getMessage(),\n 'status' => 'fail'\n ];\n }\n }", "title": "" } ]
[ { "docid": "6a5caf6144048164588e7b8cb098c6d5", "score": "0.802613", "text": "public function getUserInfo();", "title": "" }, { "docid": "6a5caf6144048164588e7b8cb098c6d5", "score": "0.802613", "text": "public function getUserInfo();", "title": "" }, { "docid": "90d8a96b3958da663b6b913d076cccbe", "score": "0.7897274", "text": "function getUserInfo() {\n\t\t// try to fetch and return the results\n\t\treturn $this->request( 'getUserInfo' );\n\t}", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.7797045", "text": "public function getUser();", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.7797045", "text": "public function getUser();", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.7797045", "text": "public function getUser();", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.7797045", "text": "public function getUser();", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.7797045", "text": "public function getUser();", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.7797045", "text": "public function getUser();", "title": "" }, { "docid": "bd95c9a191af38c3af98650b150324b8", "score": "0.7797045", "text": "public function getUser();", "title": "" }, { "docid": "690a8bfc3aa41c4c19e16afa43123000", "score": "0.769455", "text": "abstract protected function getUserInfo();", "title": "" }, { "docid": "9b2b2ed05e8cfc3240fa53f63bfce266", "score": "0.7678267", "text": "public function getUserDetail()\n {\n $obj = new User();\n $result = $obj->getUserDetail(\n $this->appid,\n $this->userid,\n $this->accesstoken,\n ['origin' => $this->origin]\n );\n\n return $result;\n }", "title": "" }, { "docid": "a9c225f49088a7bc10ed97e439bf7ecf", "score": "0.75931823", "text": "public function getUserInfo() {\n\t\t\treturn \"SELECT UserID, FirstName, Level FROM Users WHERE Email = ? LIMIT 1\";\n\t\t}", "title": "" }, { "docid": "8829c3f110cb3d16e9c3889c8d1dafd8", "score": "0.7581652", "text": "public function get_info()\n {\n\n $con['conditions'] = array(\n 'id' => $this->user['id']\n );\n $con['returnType'] = 'single';\n $user = $this->Common_Model->getRows($con, 't_users');\n\n $this->output->set_content_type('application/json')->set_output(json_encode($user)); \n }", "title": "" }, { "docid": "75096631accae6b9e0d08b061ff0cdd9", "score": "0.75414515", "text": "function getUser();", "title": "" }, { "docid": "23bb8b06d9810519b2ebe04d1ebd5c2f", "score": "0.75403", "text": "public static function user() {\r\n if(Auth::check_authentication()) {\r\n // GET USER DETAILS\r\n $user = User::getUser($_SESSION[DOMAIN_NAME . '_uid']);\r\n return $user::$details;\r\n }\r\n }", "title": "" }, { "docid": "37d67e9ecdfa8852cfd59576868fcdd4", "score": "0.75283706", "text": "public function getUserInfo()\n \t{\n \t$id = request('id');\n \t$r = $this->model->where('id',$id)->first();\n \treturn $this->resultReturn($r);\n \t}", "title": "" }, { "docid": "89fe34481865fa61a23a9fd8390d662a", "score": "0.74308705", "text": "abstract public function getUser();", "title": "" }, { "docid": "c408caf5ed78779bc5162a58f1142195", "score": "0.74306583", "text": "public function get_user_by_id ()\r\n\t{\r\n\t\t$request = \"\";\r\n\t\t$url = \"userdata/\".$this->id;\r\n\t\t$return = $this->submit_api_request ($request, $url);\r\n\t\t$response = json_decode ($return, true);\r\n\t\t$this->add_user_details ($response);\r\n\t}", "title": "" }, { "docid": "969912a7ab89cba7399c00e24c549ac1", "score": "0.7415389", "text": "public static function fetch_user()\n {\n return self::make_request(\"user\");\n }", "title": "" }, { "docid": "f59917876ec55e46c806d237bff54b12", "score": "0.73965317", "text": "public function fetchUser();", "title": "" }, { "docid": "d0613e5a5e8487d083a3e4509d1cc48b", "score": "0.7330055", "text": "public function getUserInfo($userid){\n\t\t$query = \"SELECT email, firstname, lastname, username FROM extreme_voting.users WHERE userid = $userid\";\n\t\treturn queryMysql($query);\n\t}", "title": "" }, { "docid": "12bf182a30a543d174beae01e0dcb979", "score": "0.73110616", "text": "public function getUserDetail($userID);", "title": "" }, { "docid": "d40ca2e14c3db98da1ebc57af90d9b54", "score": "0.7286377", "text": "public function userAccountDetails_get(){\n\t\ttry {\n\t\t\t$this->load->model('main/user_model');\n\t\t\t\n\t\t\tif($this->get('email')){\n\t\t\t\t$matches = $this->user_model->read(\n\t\t\t\t\tarray('email' => $this->get('email')),\n\t\t\t\t\tnull,\n\t\t\t\t\t'id,username,email'\n\t\t\t\t);\n\t\t\t}else{\n\t\t\t\t$matches = \"\";\n\t\t\t}\n\t\t\t\n\t\t\t$this->response(array(\n\t\t\t\t'status' => TRUE,\n\t\t\t\t'data' => $matches,\n\t\t\t));\n\t\t}catch(Exception $e){\n\t\t\t$this->response(array(\n\t\t\t\t'status' => FALSE,\n\t\t\t\t'message' => $e->getMessage(),\n\t\t\t));\n\t\t}\n\t}", "title": "" }, { "docid": "0ec4ff2f363414b7a6b8b2b96e53a3c7", "score": "0.72714174", "text": "public function getUserDetails()\n {\n return $this->user_details;\n }", "title": "" }, { "docid": "7868fcf78fe411433a51358e1b71265e", "score": "0.7233522", "text": "public function show($id)\n {\n return GenericMethod::getUserDetailsById($id);\n }", "title": "" }, { "docid": "57ae11a297a4e637adbbad68ba26ded6", "score": "0.7231245", "text": "public function getInfo()\n {\n //$user = $this->_user_ds->fetchUser($userName);\n\n //if($user instanceof AdminData || $user instanceof TeacherData)\n //{}\n //else {\n // return $user;\n //}\n }", "title": "" }, { "docid": "54cfccce40234b2d9656f2a3f419f22f", "score": "0.7226437", "text": "protected function getUserDetail($params) {\n if ($params['userInfo']) {\n $user = $params['userInfo'];\n $url = self::BASE_URL . \"users/\" . $user->id;\n $ch = $this->getConfiguredCURL($url, $user);\n $response = $this->performCURL($ch);\n return $response;\n }\n }", "title": "" }, { "docid": "be69f6f33e9cae46f6f7844875328ff9", "score": "0.7198938", "text": "public function get_user()\n {\n }", "title": "" }, { "docid": "1e425d87b9560114900de40355f26870", "score": "0.7177135", "text": "static function get_user_details() {\n\n /** Test the function for any exceptions. */\n $return = self::_try_for_exceptions( array('PL_Helper_User', 'whoami'));\n\n /** If no exceptions were detected, return the result. */\n if ( $return ) \n return $return;\n\n return false;\n }", "title": "" }, { "docid": "8bd943df9e7b020227590b3dcb4c21b3", "score": "0.71500504", "text": "function user_details($userid){\r\n\t\t\t\tglobal $conn;\r\n\t\t\t\t$user = $conn->query(\"SELECT * FROM members WHERE id = \\\"$userid\\\" LIMIT 1 \") or die(\"Errror getting user's details $conn->error\");\r\n\r\n\t\t\t\t$user = $user->fetch_assoc();\r\n\t\t\t\treturn $user;\r\n\t\t}", "title": "" }, { "docid": "98149a3af6dd70d3ea708eceb27902a1", "score": "0.7140578", "text": "public function getInfoUser($id) {\n \n return DB::table('users')->select('id', 'email','password','username')->where('id', $id)->get();\n }", "title": "" }, { "docid": "4515572afae4064417110e4f23c3c6df", "score": "0.71395665", "text": "public function getUserDetail()\n {\n $data = json_decode(file_get_contents(\"php://input\"));\n $user_id = $data->{'user_id'};\n $result = $this->user_model->getUserDetailById($user_id);\n if(count($result)>0){\n echo json_encode(array('status' => true, 'result' => $result), 200);\n } else {\n echo json_encode(array('status' => false), 200);\n }\n exit;\n }", "title": "" }, { "docid": "a702f3d9842c7329f7642888fa278604", "score": "0.71378064", "text": "public function getInformation(string $userName);", "title": "" }, { "docid": "e28ba6e15fd564d0540775dd1babfa6a", "score": "0.7137382", "text": "function userDetail($uid,$mayor,$badges) {\n\t\t$method = \"/user\".\".\".$this->format.\"?\";\n\t\t\n\t\tif(isset($uid) && $uid != NULL && ($uid > 0))\n\t\t\t$method .= \"&uid=\".$uid;\n\t\t\t\n\t\tif(isset($mayor) && $mayor != NULL && ($mayor ==0 || $mayor == 1))\n\t\t\t$method .= \"&mayor=\".$mayor;\n\t\t\t\n\t\tif(isset($badges) && $badges != NULL && ($badges ==0 || $badges == 1))\n\t\t\t$method .= \"&badges=\".$badges;\n\t\t\n\t\t$this->response = $this->connect($method);\n\t\treturn $this->response;\n\t}", "title": "" }, { "docid": "073b10063d6d63efa997738fb271da3a", "score": "0.7123782", "text": "private function _get_user_info() {\n $email = $this->input->post('email');\n $password = $this->input->post('password');\n $password = md5($password);\n\n $where = array('email' => $email, 'password' => $password);\n $user = $this->user_model->get_info_rule($where);\n return $user;\n }", "title": "" }, { "docid": "137f6b21e1e7cdfcf01d021e05ca4ab5", "score": "0.71199834", "text": "public function getUserInfo() {\n $user = Auth::user();\n if (!empty($user)) {\n return response()->json($user->only(\"email\", \"avatar\", \"name\"));\n }\n\n return response()->json(['message'=>'Request error', 401]);\n }", "title": "" }, { "docid": "d203ce00fc81d0e6a31cb7d47dae6fb2", "score": "0.71085936", "text": "public function show()\n {\n $user = auth()->user();\n \n if (is_null($user)) {\n return $this->sendError('User not found.');\n }\n \n return $this->sendResponse($user, 'User retrieved successfully.');\n }", "title": "" }, { "docid": "33e7c9419d25c3ce5f04490c1e884da1", "score": "0.70942366", "text": "public function UserInfoById(){\n\t\tinclude 'connect.php';\n\t\t$req = $bdd->prepare(\"SELECT * FROM user WHERE UID=:UID\");\n\t\t$req->execute(array(\n\t\t\t\"UID\"=>$this->getUID()\n\t\t));\n\t\tif ($req->rowCount()!=0) {\n\t\t\t$data = $req->fetch();\n\t\t\t$json = array(\n\t\t\t\t\"state\"=>\"true\",\n\t\t\t\t\"UID\"=>$data['UID'],\n\t\t\t\t\"FacebookId\"=>$data['FacebookId'],\n\t\t\t\t\"FullName\"=>$data['FullName'],\n\t\t\t\t\"Avatar\"=>$data['Avatar'],\n\t\t\t\t\"Email\"=>$data['Email'],\n\t\t\t\t\"Notification\"=>$data[\"Notification\"]\n\t\t\t);\n\t\t\techo json_encode($json);\n\t\t}else\n\t\t\techo json_encode(array(\"state\"=>\"No user Found\"));\n\t\t\n\t}", "title": "" }, { "docid": "dffd8009639283fb35d35e6fd5d7e926", "score": "0.7094128", "text": "public function getUserById($id);", "title": "" }, { "docid": "90c1526e816dbf7565082de5aba68196", "score": "0.7080449", "text": "function getUserInfo() {\n // geef user-object als gebruiker aangemeld is\n $CI = & get_instance();\n if (!$this->loggedIn()) {\n return null;\n } else {\n $id = $CI->session->userdata('user_id');\n return $CI->persoon_model->get($id);\n }\n }", "title": "" }, { "docid": "6554a9abf00e451ed088f7811dadf676", "score": "0.7074753", "text": "public function getUser() {\n\t\t$request = $this->createRequest('user');\n\t\t\n\t\t$request->getParams['access_token'] = $this->authHandler->getAccessToken();\n\t\t$request->getParams['expand'] = 'member';\n\t\t\n\t\t$response = $request->execute();\n\t\t\n\t\t$user = new UserResource();\n\t\t$user->username = $response->body['username'];\n\t\t$user->firstname = $response->body['firstname'];\n\t\t$user->lastname = $response->body['lastname'];\n\t\t$user->isMember = $response->body['is_member'];\n\t\t$user->email = $response->body['email'];\n\t\t\n\t\tif ($user->isMember) {\n\t\t\t// Assume expanded data\n\t\t\t$memberData = $response->body['member'];\n\t\t\t$member = new MemberResource();\n\t\t\t$member->id \t\t= $memberData['id'];\n\t\t\t$member->firstname \t= $memberData['firstname'];\n\t\t\t$member->lastname \t= $memberData['lastname'];\n\t\t\t$member->address1 \t= $memberData['address1'];\n\t\t\t$member->address2 \t= $memberData['address2'];\n\t\t\t$member->postalcode = $memberData['postalcode'];\n\t\t\t$member->phone1 \t= $memberData['phone1'];\n\t\t\t$member->phone2 \t= $memberData['phone2'];\n\t\t\t$member->mobile \t= $memberData['mobile'];\n\t\t\t$member->email \t\t= $memberData['email'];\n\t\t\t\n\t\t\t$member->optionalTextfield1 = $memberData['optional_textfield1'];\n\t\t\t$member->optionalTextfield2 = $memberData['optional_textfield2'];\n\t\t\t$member->optionalTextfield3 = $memberData['optional_textfield3'];\n\t\t\t$member->optionalTextfield4 = $memberData['optional_textfield4'];\n\t\t\t$member->optionalTextfield5 = $memberData['optional_textfield5'];\n\t\t\t$member->optionalTextfield6 = $memberData['optional_textfield6'];\n\t\t\t\n\t\t\t$member->optionalSelect1 = $memberData['optional_select1'];\n\t\t\t$member->optionalSelect2 = $memberData['optional_select2'];\n\t\t\t$member->optionalSelect3 = $memberData['optional_select3'];\n\t\t\t$member->optionalSelect4 = $memberData['optional_select4'];\n\t\t\t\n\t\t\t$member->optionalSelect1Label = $memberData['optional_select1_label'];\n\t\t\t$member->optionalSelect2Label = $memberData['optional_select2_label'];\n\t\t\t$member->optionalSelect3Label = $memberData['optional_select3_label'];\n\t\t\t$member->optionalSelect4Label = $memberData['optional_select4_label'];\n\t\t\t\n\t\t\t$member->optionalDate1 = $memberData['optional_date1'];\n\t\t\t$member->optionalDate2 = $memberData['optional_date2'];\n\t\t\t\n\t\t\t$member->optionalCheckbox1 = $memberData['optional_checkbox1'];\n\t\t\t$member->optionalCheckbox2 = $memberData['optional_checkbox2'];\n\t\t\t$member->optionalCheckbox3 = $memberData['optional_checkbox3'];\n\t\t\t$member->optionalCheckbox4 = $memberData['optional_checkbox4'];\n\t\t\t\n\t\t\t$user->member = $member;\n\t\t}\n\t\treturn $user;\n\t}", "title": "" }, { "docid": "d11008fd1eb14692239bb5cf5702f5a9", "score": "0.7067651", "text": "public function info() {\n return $this->user;\n }", "title": "" }, { "docid": "5f17bc5111cc6486c3fe443d9f9b7743", "score": "0.7067512", "text": "public function actionUserinfo()\n {\n Yii::$app->response->format = Response::FORMAT_JSON;\n\n DataFormat::reqRevision('GET');\n\n $model = User::getInfo();\n\n $answer['data'] = $model;\n $answer['status'] = ExeptionJSON::STATUS_OK;\n\n return $answer;\n }", "title": "" }, { "docid": "3f6b218d739ea2955b1b394b3182447e", "score": "0.7055218", "text": "function fetch_user_detail() {\n\t\t$this->layout = '';\n\t\t$this->autoRender = false;\n\t\t$this->loadAllModel(array('User'));\n\t\t$userID = $this->request->data['userID'];\n\t\t$userDetail = array();\n\t\t$userData = $this->User->find('first',array('conditions'=>array('User.id'=>$userID),'fields'=>array('first_name','last_name','email_address'),'recursive'=>-1));\n\t\tforeach($userData as $key=>$value) {\n\t\t\t$userDetail[] = $value;\n\t\t}\n\t\treturn json_encode($userDetail);\t\t\t\n\t}", "title": "" }, { "docid": "60f82087a3444f6b3f084b3290466cb5", "score": "0.7053274", "text": "public function GetInfoUser() {\n if ($this->get_request_method() != \"POST\") {\n $this->response('', 406);\n }\n if (isset($_REQUEST['data'])) {\n $idSociete = $_REQUEST['data'][\"idSociete\"];\n $idUser = $_REQUEST['data'][\"idUser\"];\n // Input validations\n if (!empty($idSociete)) {\n try {\n $sql = $this->db->prepare(\"SELECT * FROM user WHERE idSociete = :idSociete AND idUser = :idUser LIMIT 1\");\n $sql->bindParam('idSociete', $idSociete, PDO::PARAM_INT);\n $sql->bindParam('idUser', $idUser, PDO::PARAM_INT);\n $sql->execute();\n if ($sql->rowCount() > 0) {\n $result = $sql->fetch();\n // If success everythig is good send header as \"OK\" and user details\n $this->response($this->json($result), 200);\n }\n $this->response('', 204); // If no records \"No Content\" status\n } catch (Exception $ex) {\n $this->response('', $ex->getMessage());\n }\n }\n }\n // If invalid inputs \"Bad Request\" status message and reason\n $error = array('status' => \"Failed\", \"msg\" => \"Invalid param\");\n $this->response($this->json($error), 400);\n }", "title": "" }, { "docid": "80238f50c8e2e78ff59710019f2ed6fd", "score": "0.70317507", "text": "public function usersGetInfo()\n {\n $params = array(\n \t\t'uids' => $this->user_id,\n 'fields' => array('uid','name','sex','headurl')\n );\n $data = $this->_callApi('users.getInfo', $params);\n if(isset($data[0])) {\n return $this->_formatUser($data[0]);\n }\n\n return null;\n }", "title": "" }, { "docid": "92d7122e7d1ae8bda43863060f1b22ba", "score": "0.7023826", "text": "public function showUser($email){\n\n $results = $this->getEmail($email); //i refer to a method extended by Users Class \n echo \"Full name: \".$results[0]['id'].\" \".$results[0]['email'].\" \".$results[0]['hashs'].\" \".$results[0]['firstname'].\" \".$results[0]['lastname'];\n \n }", "title": "" }, { "docid": "de2342210315ce01254285a20639abd7", "score": "0.7018069", "text": "public function details(){\n try {\n $user = Auth::user();\n return response()->json(['success' => $user], 200);\n } catch (Exception $e) {\n return response()->json(['error'=> $e->getMessage()], 401);\n }\n\n }", "title": "" }, { "docid": "573d5bf5c5bf3464a0fc85aec3b776e7", "score": "0.7014386", "text": "public function details()\n {\n return response()->json(['user' => auth()->user()], 200);\n }", "title": "" }, { "docid": "573d5bf5c5bf3464a0fc85aec3b776e7", "score": "0.7014386", "text": "public function details()\n {\n return response()->json(['user' => auth()->user()], 200);\n }", "title": "" }, { "docid": "573d5bf5c5bf3464a0fc85aec3b776e7", "score": "0.7014386", "text": "public function details()\n {\n return response()->json(['user' => auth()->user()], 200);\n }", "title": "" }, { "docid": "573d5bf5c5bf3464a0fc85aec3b776e7", "score": "0.7014386", "text": "public function details()\n {\n return response()->json(['user' => auth()->user()], 200);\n }", "title": "" }, { "docid": "681818b89595a1d11c2cdc5ba05e0ad3", "score": "0.6983788", "text": "function getUser(){ \n\t\t$odin = phpCAS::getUser();\n\t\t$uhandler = new UserHandler();\n\t\t$user = $uhandler->get(array(\n\t\t\t'field'=>'Odin',\n\t\t\t'operator'=>'LIKE',\n\t\t\t'value'=>$odin,\n 'assoc'=>'false'));\n\t\treturn $user;\n\t}", "title": "" }, { "docid": "65ffa3438ca32e16e9e7e850201086a3", "score": "0.6980036", "text": "protected function userinfo(){\r\n\t\t$this->restrictview();\r\n\r\n\t\t$viewmodel = new UserModel();\r\n\t\t$this->returnView($viewmodel->userinfo(), true);\r\n\t}", "title": "" }, { "docid": "d24b63ac72ae352e3e4ac37f04f32526", "score": "0.69707733", "text": "public function getUser(): string;", "title": "" }, { "docid": "c07576ee0793ae7b80b097c329f8c921", "score": "0.69682884", "text": "function get_user_profile(){\n\t\t\n\t\treturn $this->api->me->userprofile->query();\n\t\t\n\t}", "title": "" }, { "docid": "5c02ded763a378a46a744858d9cdd9a6", "score": "0.69568217", "text": "public function get_all_user_info(){\n\t\t$sql = \"select * from user\";\n\t\treturn $this->try_query($sql);\n\t}", "title": "" }, { "docid": "dc53520b08f8b6bfd3a11a4c6089ebf8", "score": "0.69558156", "text": "public function fullUserInfo_get(){\n\t\ttry {\n\t\t\n\t\t\t$getUserType = $this->getUserType($this->get('username'));\n\t\t\t\n\t\t\tif($getUserType != null){\n\t\t\t\t$db = &get_instance()->db;\n\t\t\t\t$main_user = db_main.'.user';\n\t\t\t\t$member_profile = db_member.'.profile';\n\t\t\t\t$provider_profile = db_provider.'.profile';\n\t\t\t\t$member_account = db_member.'.account';\n\t\t\t\t$provider_account = db_provider.'.account';\n\t\t\t\t\n\t\t\t\t$fields = '\n\t\t\t\t\tuser.*,\n\t\t\t\t\taccount.activity AS activity,\n\t\t\t\t\tprofile.*\n\t\t\t\t\t';\n\t\t\t\t\n\t\t\t\t$condition = \"(user.username = '\".$this->get('username').\"')\";\n\t\t\t\t$relation_profile = ($getUserType->type==1)?$member_profile:$provider_profile;\n\t\t\t\t$relation_account = ($getUserType->type==1)?$member_account:$provider_account;\n\t\t\t\t\n\t\t\t\t$db->select($fields)\n\t\t\t\t\t->from($main_user)\n\t\t\t\t\t->where($condition)\n\t\t\t\t\t->join($relation_profile, 'user.id = profile.user_id')\n\t\t\t\t\t->join($relation_account, 'user.id = account.id');\n\t\t\t\t\t\n\t\t\t\t$userInfo = $db->get()->row();\n\t\t\t\t\n\t\t\t\t// Expound location\n\t\t\t\t$this->load->model('main/location_model');\n\t\t\t\t$location = $this->location_model->read(intval($userInfo->location), 'country', 'location.id,city,state,zip,country.name as country, country as country_id, coord_lat, coord_lng');\n\t\t\t\t\n\t\t\t\tif(count($location)==1){\n\t\t\t\t\t$userInfo->location = $location[0];\n\t\t\t\t}else{\n\t\t\t\t\t$userInfo->location = array('id'=>0, 'city'=>'', 'state'=>'', 'zip'=>'', 'country'=>'', 'country_id'=>0, 'coord_lat'=>100, 'coord_lng'=>100);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t#Respond with requested user data\n\t\t\t\t$this->response(array(\n\t\t\t\t\t'status' => 'TRUE',\n\t\t\t\t\t'data' => $userInfo,\n\t\t\t\t));\n\t\t\t}else{\n\t\t\t\tthrow new Exception(\"User not found!\");\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception $e){\n\t\t\t$this->response(array(\n\t\t\t\t'status' => 'FALSE',\n\t\t\t\t'message' => $e->getMessage(),\n\t\t\t));\n\t\t}\n\t}", "title": "" }, { "docid": "8838aa80b118ac39fe948bbf9fd54c55", "score": "0.69494903", "text": "function fetchUserDetails($username=NULL,$token=NULL, $id=NULL)\r\n{\r\n\tif($username!=NULL) {\r\n\t\t$query = UcUsersQuery::create()->filterByUserName($username)->find();\r\n\t}\r\n\telseif($token!=NULL) {\r\n\t\t$query = UcUsersQuery::create()->filterByActivationToken($token)->find();\r\n\t}\r\n\telseif($id!=NULL) {\r\n\t\t$query = UcUsersQuery::create()->findById($id);\t\r\n\t}\r\n\r\n\t$user = $query[0];\r\n\t$row = array('id' => $user->getId(), \r\n\t\t\t\t 'user_name' => $user->getUserName(),\r\n\t\t\t\t 'display_name' => $user->getDisplayName(),\r\n\t\t\t\t 'password' => $user->getPassword(),\r\n\t\t\t\t 'email' => $user->getEmail(),\r\n\t\t\t\t 'activation_token' => $user->getActivationToken(),\r\n\t\t\t\t 'last_activation_request' => $user->getLastActivationRequest(),\r\n\t\t\t\t 'lost_password_request' => $user->getLostPasswordRequest(),\r\n\t\t\t\t 'active' => $user->getActive(),\r\n\t\t\t\t 'title' => $user->getTitle(),\r\n\t\t\t\t 'sign_up_stamp' => $user->getSignUpStamp(),\r\n\t\t\t\t 'last_sign_in_stamp' => $user->getLastSignInStamp());\r\n\treturn ($row);\r\n}", "title": "" }, { "docid": "c584e894fa88d259681ad51ee01ee1d0", "score": "0.69432026", "text": "public function getUser()\n {\n }", "title": "" }, { "docid": "ad5da803829160f364a21edcd474da55", "score": "0.69287014", "text": "public function getUserDetailsApi() {\n $user = auth()->user();\n\n return response()->json([\n 'user' => $user->toArray(),\n 'status' => Notification::SUCCESS\n ]);\n }", "title": "" }, { "docid": "b53a2e901ce4cffd8ebe4932696f8ce7", "score": "0.6907006", "text": "private function retrieve_user_description()\n {\n }", "title": "" }, { "docid": "3dbe784a83148a6a02a24ad004346131", "score": "0.69036126", "text": "public function infos()\n {\n\t\t$user = Auth::user();\n\n\t\t// Get the currently authenticated user's ID...\n\t\t$id = Auth::id(); \n\t}", "title": "" }, { "docid": "dfe77a1ad8a5b158b6e07542aedb8d48", "score": "0.6886239", "text": "public function getUserInfo($params = array())\r\n\t{\r\n\t\t$user_name = @(string)$params['user_name'];\r\n\t\t$user_id = @(string)$params['user_id'];\r\n\t\t$response = array();\r\n\t\tif (empty($user_id) && empty($user_name))\r\n\t\t{\r\n\t\t\tthrow new Exception('Specify an user id or an user name.');\r\n\t\t}\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\t$this -> authorize(@$params['access_token'], @$params['secret_token']);\r\n\t\t\tif (!empty($user_id))\r\n\t\t\t{\r\n\t\t\t\t$response = $this -> _objPlugin -> usersShow($user_id);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$response = $this -> _objPlugin -> usersShow(null, $user_name);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception $e)\r\n\t\t{\r\n\t\t\techo $e -> getMessage();\r\n\t\t}\r\n\t\t//echo \"<pre>\"; print_r($response); echo \"</pre>\"; die;\r\n\t\treturn $response;\r\n\t}", "title": "" }, { "docid": "7d3fc24bdbfc0b5aa54bed8fc729dca8", "score": "0.68832123", "text": "function get_user_info($user_id, $user_name = '') {\r\n\t$User = M('users');\r\n\tif ($user_id) {\r\n\t\t$user_info = $User->where(\"user_id='$user_id'\")->find();\r\n\t} elseif (!empty($user_name)) {\r\n\t\t$user_info = $User->where(\"user_name='$user_name'\")->find();\r\n\t}\r\n\tif ($user_info) {\r\n\t\t$user_info['reg_time'] = date('Y-m-d H:i:s', $user_info['reg_time']);\r\n\t\treturn $user_info;\r\n\t}\r\n}", "title": "" }, { "docid": "4f55bff926fcde8da217706d1d84b4a9", "score": "0.6869135", "text": "public function getInfo($id) {\n\t\t\t$sql = new SQL();\n\t\t\t$this->userId = $id;\n\t\t\t$array = $sql->getArray(\"SELECT * FROM \".$sql->prefix.\"User WHERE user_id=\".$this->userId);\n\t\t\t$this->email = $array['email'];\n\t\t\t$this->name = $array['name'];\n\t\t\t$this->profile_pic = $array['picture'];\n\t\t}", "title": "" }, { "docid": "d8c22d8a73f29652321575dcb0f15240", "score": "0.685019", "text": "public function actionGet() {\n $user = User::model()->findByPk($this->_userSession->id);\n \n $userInformation = $this->_getUserInformation($user);\n \n $this->sendResponse(200, $this->getObjectEncoded($userInformation, $this->_serviceContainer));\n }", "title": "" }, { "docid": "6f0a95534bfd5742f2927d5d1f8b8889", "score": "0.68382716", "text": "public function getUserInfo() {\n global $context;\n\n $user = array();\n if( !$context['user']['is_logged']) {\n $user['anonymous'] = true;\n $user['id'] = -2;\n } else {\n $userData = $context['user'];\n $user['anonymous'] = false;\n $user['name'] = $userData['name'];\n $user['avatar'] = $userData['avatar']['href'];\n $user['id'] = $userData['id'];\n $user['pm'] = $userData['messages'];\n $user['pm_unread'] = $userData['unread_messages'];\n $user['logout_link'] = ssi_logout('/', 'noecho');\n }\n return $user;\n }", "title": "" }, { "docid": "b10fadeab4904bf21498f672e6da9e8c", "score": "0.6832049", "text": "function userDetail($user_id) {\n $user_id = intval($user_id);\n $query = $this->db->get_where(\"sys_users\", array(\"id\" => $user_id));\n return $query->row();\n }", "title": "" }, { "docid": "c10e96b79787f3e99483a6e89ac94592", "score": "0.6831418", "text": "public function getUser($id = 0);", "title": "" }, { "docid": "252b2356b797da5e5a3affd166d90c4f", "score": "0.6830962", "text": "public function userinfo()\n {\n $user = $this->guard()->user();\n\n return $this->success('success',null,[\n 'user' => new UserResource($user),\n 'issign' => User\\UserIntegralLog::where([\n ['type','=',User\\UserIntegralLog::TYPE_SIGN_IN],\n ['user_id','=',$user->id],\n ['created_at','>',date('Y-m-d 00:00:00')],\n ])->first() ? 1 : 0,\n ]);\n }", "title": "" }, { "docid": "48642daf486c16621c3244310a276628", "score": "0.68195987", "text": "public function info($optional = [])\n {\n return $this->apiCall('get', '/users.info');\n }", "title": "" }, { "docid": "be801d712641968fb4183fdafe772e11", "score": "0.6813069", "text": "public function userDetail($id)\n\t {\n\t\t $data = User::where('id', $id)->get();\n return response()->json($data);\n\t }", "title": "" }, { "docid": "832200be00c6cc60a71a0412a0cb301e", "score": "0.68121326", "text": "public function information($id){\n\t\t$this->result = $this->crud->read('SELECT * FROM _users WHERE user_id = :id',array(':id'=>$id),'assoc');\n\t\t\n\t\t/* remove login security */\n\t\tunset($this->result['password']);\n\t\tunset($this->result['varKey']);\n\n\t\t$this->info = $this->result;\n\t\t\n\t\t/* get the role of the user*/\n\t\t$role = $this->crud->read('SELECT role FROM _role WHERE role_id=:rid',array(':rid'=>$this->result['role_id']),'assoc');\n\t\t$this->info['role'] = $role['role'];\n\n\t\treturn $this->info;\n\t}", "title": "" }, { "docid": "d1d629692de6b57a6242d98e86077f27", "score": "0.6809496", "text": "public function getUser()\n {\n $user = $this->service->userinfo->get();\n $aUser['id'] = $user['id'];\n $aUser['firstName'] = $user['givenName'];\n $aUser['lastName'] = $user['familyName'];\n $aUser['email'] = $user['email'];\n\n return $aUser;\n }", "title": "" }, { "docid": "c9852e8529ca2123c2ee7187d3e06708", "score": "0.6807037", "text": "public static function getUser()\r\n {\r\n \treturn self::getInstance()->get('user');\r\n }", "title": "" }, { "docid": "eb7beceb17ba705a56f4a629c3fa7487", "score": "0.6806606", "text": "protected function getUser($user_id) {\n\t\t$user_info = Yii::app()->db->createCommand()\n\t\t\t->select('username, email')\n\t\t\t->from('user')\n\t\t\t->where(':id = id', array(':id' => $user_id))\n\t\t\t->queryRow();\n\t\t\n\t\treturn $user_info;\n\t}", "title": "" }, { "docid": "727d73493383f2b407c71249f55a59b9", "score": "0.6802912", "text": "public function details()\n {\n $user = auth()->user()->toArray();\n $user['profile'] = auth()->user()->profile;\n return response()->json($user, 200);\n }", "title": "" }, { "docid": "da48ac22dcde39a3b34dd8706aedf422", "score": "0.67913365", "text": "function detailUser($idUser){\n\t\t\t$sql=\"SELECT * FROM users WHERE idUser=$idUser\";\n\t\t\t$re=mysql_query($sql) or die(mysql_error());\n\t\t\treturn $re;\n\t\t}", "title": "" }, { "docid": "814c4798908a54f5b8f7316d2346736a", "score": "0.6791171", "text": "public function userinfoAction() {\n $this->_helper->viewRenderer->setNoRender();\n $user_name = $_POST['user_name'];\n $db_user = new Application_Model_DbTable_User();\n $db = $db_user->getAdapter();\n $where = $db->quoteInto('user_name = ?', $user_name);\n $user_data = $db_user->fetchRow($where);\n\n $db_biller = new Application_Model_DbTable_Biller();\n $db = $db_biller->getAdapter();\n $where = $db->quoteInto('biller_name = ?', $user_name);\n $biller_data = $db_biller->fetchRow($where);\n\n $db_billingcompany = new Application_Model_DbTable_Billingcompany();\n $db = $db_billingcompany->getAdapter();\n $where = $db->quoteInto('id = ?', $biller_data['billingcompany_id']);\n $billingcompany_data = $db_billingcompany->fetchRow($where);\n\n $data = array();\n $data = array('billingcompany_name' => $billingcompany_data['billingcompany_name'], 'role' => $user_data['role']);\n $json = Zend_Json::encode($data);\n echo $json;\n }", "title": "" }, { "docid": "436cf7f350945f8bef551914dd2af38e", "score": "0.6791086", "text": "public function details()\n {\n $user = Auth::user();\n\n return new UserResource($user);\n }", "title": "" }, { "docid": "9ef645fada06f8faf20edf82a5303a3e", "score": "0.67650634", "text": "public function get_user_details($id)\n\t{\n\t\tself::getConnection();\n\t\t\n\t \t$qry = \"SELECT * FROM mobile_users WHERE id='\".$id.\"'\";\n\t\tself::$dbo->doQuery($qry);\n\t\t$result = self::$dbo->getResultRow();\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "43afd12313e9b66422605fee7be1909d", "score": "0.6763181", "text": "public function userinfo(){\n\t \techo \"<h1>userdata</h1>\\n\";\n\t \techo 'username:'.$this->session->userdata('username').\"<br>\\n\";\n\t\techo 'user_id:'.$this->session->userdata('user_id').\"<br>\\n\";\n\t\techo 'user_email:'.$this->session->userdata('user_email').\"<br>\\n\";\n\t\techo 'logged_id:'.$this->session->userdata('logged_in').\"<br>\\n\";\n\n\t }", "title": "" }, { "docid": "c9c15289d45c9da6796b69faf3588a3b", "score": "0.676039", "text": "public function getUser() {\n return User::find($this->type_info()->select('user_id')->value('user_id'));\n }", "title": "" }, { "docid": "fbab0a47acfde24947e5299bc0cf392d", "score": "0.6756867", "text": "public function user();", "title": "" }, { "docid": "fbab0a47acfde24947e5299bc0cf392d", "score": "0.6756867", "text": "public function user();", "title": "" }, { "docid": "fbab0a47acfde24947e5299bc0cf392d", "score": "0.6756867", "text": "public function user();", "title": "" }, { "docid": "fbab0a47acfde24947e5299bc0cf392d", "score": "0.6756867", "text": "public function user();", "title": "" }, { "docid": "fbab0a47acfde24947e5299bc0cf392d", "score": "0.6756867", "text": "public function user();", "title": "" }, { "docid": "fbab0a47acfde24947e5299bc0cf392d", "score": "0.6756867", "text": "public function user();", "title": "" }, { "docid": "fbab0a47acfde24947e5299bc0cf392d", "score": "0.6756867", "text": "public function user();", "title": "" }, { "docid": "fbab0a47acfde24947e5299bc0cf392d", "score": "0.6756867", "text": "public function user();", "title": "" }, { "docid": "e86c88a8a933195afaf5cbeaed85b11e", "score": "0.6755193", "text": "public function getUser($id) {\n $sql = 'SELECT * FROM User WHERE id = ?';\n $res = $this->db->ExecuteSelectQueryAndFetchAll($sql, array($id));\n\n if (!isset($res[0])) {\n return \"Det finns ingen användare med detta id ({$id}).\";\n }\n else {\n $r = $res[0];\n \n $back = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : \"movies.php\";\n $action = \"<a href='{$back}'>[ Tillbaka ]</a>\";\n if (($this->IsAuthenticated() && $this->GetId() == $id) || ($this->getAcronym() == \"admin\")) {\n $action .= \"&nbsp;&nbsp;&nbsp;<a href='?edit&id={$id}'>[ Redigera ]</a>\";\n if ($this->getAcronym() == \"admin\") {\n $action .= \"&nbsp;&nbsp;&nbsp;<a href='?delete&id={$id}'>[ Radera ]</a>\";\n }\n }\n $img = \"<img src='img.php?src=Actions-im-user-icon.png&height=208' title='Profile pic'/>\";\n return <<<EOD\n <div class='userDetails'>\n <div class='image'>{$img}</div>\n <div class='metadata'>\n <span class='acronym'><strong>Acronym:</strong>{$r->acronym}</span>\n <span class='name'><strong>Name:</strong>{$r->name}</span>\n </div>\n <div class='action'>\n {$action}\n </div>\n </div>\nEOD;\n }\n }", "title": "" }, { "docid": "a1a22cfd4ff3e14e469cc2453adcc950", "score": "0.67543143", "text": "public function get_user_by_email ()\r\n\t{\r\n\t\t$request = \"\";\r\n\t\t$url = \"userdata/get/\".$this->email;\r\n\t\t$return = $this->submit_api_request ($request, $url);\r\n\t\t$response = json_decode ($return, true);\r\n\t\t$this->add_user_details ($response);\r\n\t}", "title": "" }, { "docid": "0b07e877a89e035f0eb1e9c5e26b5594", "score": "0.6754203", "text": "public function it_loads_the_users_details_page()\n {\n $response = $this->get('/usuarios/5')\n ->assertStatus(200)\n ->assertSee('Mostrando detalles del id: 5');\n\n\n }", "title": "" }, { "docid": "f72f197b98b96eb03edda3d093cd300e", "score": "0.67503536", "text": "function get_user_info($sunetid, $attributes=0) {\n // Connect if necessary\n if($this->is_connected() == false) $this->connect_and_bind();\n \n $result = $this->search(\"uid=$sunetid\", $attributes);\n \n if($result) {\n return $result[0];\n }\n else {\n return array();\n }\n }", "title": "" }, { "docid": "88a262a4380beef2eba10e5f55cd7ae5", "score": "0.6746633", "text": "public function getUser()\n {\n if($result = $this->_connection->query(\"SELECT * FROM users\"))\n {\n print_r($result->fetch_assoc());\n }\n else\n {\n echo $this->_connection->errno;\n }\n }", "title": "" }, { "docid": "2050026e296f066e882d6c0523ef6979", "score": "0.6744753", "text": "function get_user_info($key = NULL)\n\t{\n\t\tif ($key !== NULL && method_exists($this->user, 'get_'.$key))\n\t\t{\n\t\t\treturn $this->user->{\"get_\".$key}();\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn 'User info does not exist';\n\t\t}\n\t}", "title": "" }, { "docid": "bde37d20de1cee448e9ce2d6748ffc3f", "score": "0.6742451", "text": "function getProfile()\n\t{\n\t\t$u_id = getUserId();\n\t\t\n\t\t$sql = \"\n\t\t\t\tSELECT\tfirst_name,\n\t\t\t\t\t\tlast_name,\n\t\t\t\t\t\tphone_num,\n\t\t\t\t\t\temail_add,\n\t\t\t\t\t\timg_url\n\t\t\t\tFROM\tuser_table\n\t\t\t\tWHERE\tuser_id='$u_id'\n\t\t\";\n\t\t$result = getDBResultRecord($sql);\n\t\t\n\t\techo json_encode($result);\n\t}", "title": "" }, { "docid": "1c1b4642d1671342a12d90fa3f345f0c", "score": "0.67317915", "text": "public function getUserInfoObject()\n {\n return $this->user->getUserInfoObject();\n }", "title": "" } ]
4c2d60b54f191d6a36b3a1ef0eaf6cdc
Take first x fields
[ { "docid": "1fb037104bc99917980242fedb89c111", "score": "0.0", "text": "public function take($length)\n {\n if(!is_int($length))\n {\n throw new \\InvalidArgumentException();\n }\n\n if($length>=0 && $length>$this->length())\n {\n $length = $this->length();\n }\n elseif($length<0 && $length<(0-$this->length()))\n {\n $length = 0-$this->length();\n }\n\n $temp = $this->newInstance();\n\n if($length>=0)\n {\n $temp->setData(array_slice($this->getData(), 0, $length));\n }\n else\n {\n $temp->setData(array_slice($this->getData(), $length));\n }\n\n return $temp;\n }", "title": "" } ]
[ { "docid": "4e4c059a0b9ab74477ac4fbe29237f08", "score": "0.5777517", "text": "function take($count);", "title": "" }, { "docid": "ed52a8f98b462c1cbe94305bc48ea4c4", "score": "0.57452554", "text": "function head($count = 10)\n\t{\n\t\treturn array_slice($this->_data, 0, $count);\n\t}", "title": "" }, { "docid": "9b668a2b50339b212723ade865082f2e", "score": "0.5681135", "text": "public function fetchFields();", "title": "" }, { "docid": "a7f9e26a3834b5797bcf1c845af40e16", "score": "0.5610571", "text": "function getFields($table,$fields=\"\",$condition=\"\",$limit=\"\",$calculateRows=false,$fastHint=false);", "title": "" }, { "docid": "65ebdd8605020e40c74ca294d48bc72d", "score": "0.55401844", "text": "public function take($size = 1, $from = 0);", "title": "" }, { "docid": "4e1de711a1231eaa3be1a510c96c1097", "score": "0.54596025", "text": "public function first($columns = ['*']);", "title": "" }, { "docid": "1c37be4be31252a64c43a473981f917b", "score": "0.5381214", "text": "public function firstByField($field, $value, $columns = ['*']);", "title": "" }, { "docid": "53ad1ec322f5359bf737e89fd92e8f3e", "score": "0.53683317", "text": "public function take($limit = 20);", "title": "" }, { "docid": "1ac8ffc909d797493b348f63266f4265", "score": "0.5316216", "text": "public function fetch_fields() {}", "title": "" }, { "docid": "53d0548f69334b568b4a9cf9de781d80", "score": "0.53102136", "text": "abstract public function getFields();", "title": "" }, { "docid": "53d0548f69334b568b4a9cf9de781d80", "score": "0.53102136", "text": "abstract public function getFields();", "title": "" }, { "docid": "0bd9913ceafb7869674500e39c678c3c", "score": "0.5284953", "text": "abstract public function fields();", "title": "" }, { "docid": "993d368d5380af7c65cb15f1dc379af1", "score": "0.52814925", "text": "abstract protected function getFields();", "title": "" }, { "docid": "82369edb3256db6e323a5aa6aacce9c1", "score": "0.52711713", "text": "function getFields();", "title": "" }, { "docid": "f4022e4424db8922bfff3a2272661b05", "score": "0.52601546", "text": "abstract function fields();", "title": "" }, { "docid": "8fbbbd3465e440a9e90c9ecc46713cd3", "score": "0.52281475", "text": "abstract public function filterFields();", "title": "" }, { "docid": "234f12c609bc33e99828c46bc6e9043c", "score": "0.52170086", "text": "abstract protected function _getFeedFields();", "title": "" }, { "docid": "33e93b5f32fb2bad94506250a33e2c09", "score": "0.51698786", "text": "public function getFields() {}", "title": "" }, { "docid": "33e93b5f32fb2bad94506250a33e2c09", "score": "0.51698786", "text": "public function getFields() {}", "title": "" }, { "docid": "33e93b5f32fb2bad94506250a33e2c09", "score": "0.51698786", "text": "public function getFields() {}", "title": "" }, { "docid": "08d8c8589c550134ac7b4b226e32a1ac", "score": "0.5157553", "text": "function getFirst() ;", "title": "" }, { "docid": "66a7dbd02695b9454042e0cbf0451ff4", "score": "0.5146737", "text": "public function take() {\n\n $records = self::query();\n\n if ($records) {\n $table_name = $this->_table;\n\n foreach ($records as $record) {\n $object = $table_name::find((int)$record[\"id\"]);\n $object->_fields = $record;\n $objects[] = $object;\n }\n return $objects;\n }\n return null;\n }", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.5145889", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.5145889", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.5145889", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.5145889", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.5145889", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.5145889", "text": "public function getFields();", "title": "" }, { "docid": "84c3a64ea55bd458b5fb3e04daa11749", "score": "0.5138131", "text": "function extractFields($parameters)\r\n\t{\r\n\t\t$result = array();\r\n\t\tforeach ($parameters['columns'] as $fieldName=>$fieldProperties)\r\n\t\t\t$result[$fieldName] = $fieldProperties['title'];\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "77d4873ffba80d190a23297fd98ead82", "score": "0.51350355", "text": "public function fields();", "title": "" }, { "docid": "77d4873ffba80d190a23297fd98ead82", "score": "0.51350355", "text": "public function fields();", "title": "" }, { "docid": "77d4873ffba80d190a23297fd98ead82", "score": "0.51350355", "text": "public function fields();", "title": "" }, { "docid": "77d4873ffba80d190a23297fd98ead82", "score": "0.51350355", "text": "public function fields();", "title": "" }, { "docid": "77d4873ffba80d190a23297fd98ead82", "score": "0.51350355", "text": "public function fields();", "title": "" }, { "docid": "1ead32033f68b02e800500e5834ed09c", "score": "0.50703156", "text": "function allWithLimit() {\n\n }", "title": "" }, { "docid": "13c267af5b8fc3047025de12dbcc53ff", "score": "0.50570196", "text": "function extract_fields($criteria = array())\n{\n\t$fields = array();\n\t\n\tforeach ($criteria as $table => $info)\n\t{\n\t\tforeach ($info['fields'] as $code => $name)\n\t\t{\n\t\t\t$fields[$code] = $name;\n\t\t}\n\t}\n\t\n\treturn $fields;\n}", "title": "" }, { "docid": "e113c961dbdc81b32dcd32649b3b32f0", "score": "0.5052746", "text": "public function get_fields($count = false) {\n \n $return = '';\n \n $i = 0;\n foreach($this->get('fields') as $field) \n {\n if($count === true AND $i == 0) \n {\n $return .= 'SQL_CALC_FOUND_ROWS(`' . $field->name . '`), ';\n $i = 1;\n } \n else\n {\n $return .= $field->name . ', ';\n }\n }\n \n return substr($return, 0, -2);\n \n }", "title": "" }, { "docid": "b8d0101c108d250ffa5397cce1021f6f", "score": "0.50408787", "text": "function minimize_collection_data($raw_collections, $how_many = 0, $offset = 0)\n{\n if ($how_many > 0) {\n $limited_collections = array_slice($raw_collections, $offset, $how_many);\n }\n\n return $limited_collections;\n}", "title": "" }, { "docid": "3adb5b050a864b8e678bd4ceb2b32d7b", "score": "0.50396574", "text": "function custom_sdppi($scrap_raw, $slice_array = 44, $field_count = 10)\n\t{\n\t\t$data = [];\n\n\t\tif (!is_null($scrap_raw))\n\t\t{\n\t\t\t$result = array_slice($scrap_raw, $slice_array); // Menghilangkan data header/array header\n\t\t\t$total_array = count($result);\n\t\t\t$j = 0;\n\n\t\t\tfor ($i=0; $i < $total_array; $i++)\n\t\t\t{\n\t\t\t\t$temp = array_slice($result, $j, $field_count);\n\t\t\t\t// Memisahkan data per field_count elemen dengan syarat array tidak kosong, \n\t\t\t\t// data pertama setiap array adalah integer dan tidak lebih dari jumlah field_count - 1\n\t\t\t\tif (!empty($temp) AND is_numeric($temp[0]) AND count($temp) > ($field_count - 1))\n\t\t\t\t{\n\t\t\t\t\t$data[$i] = $temp;\n\t\t\t\t\t$j += $field_count;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "8cd89c922a5d4e345963df4fe5486b5c", "score": "0.5027723", "text": "private function set_firstItem()\n {\n $firstItem = null;\n\n // Get table and field\n list( $table, $field ) = explode( '.', $this->curr_tableField );\n\n // Get TS filter configuration\n //$conf_name = $this->conf_view['filter.'][$table . '.'][$field];\n $conf_array = $this->conf_view[ 'filter.' ][ $table . '.' ][ $field . '.' ];\n\n // RETURN first item shouldn't displayed\n if ( !$conf_array[ 'first_item' ] )\n {\n return;\n }\n // RETURN first item shouldn't displayed\n // RETURN first item shouldn't displayed\n if ( !$conf_array[ 'first_item.' ][ 'display_wo_items' ] )\n {\n if ( ( int ) $this->hits_sum[ $this->curr_tableField ] < 1 )\n {\n return;\n }\n }\n // RETURN first item shouldn't displayed\n // Get the labels for the fields uid and hits\n $uidField = $this->sql_filterFields[ $this->curr_tableField ][ 'uid' ];\n $hitsField = $this->sql_filterFields[ $this->curr_tableField ][ 'hits' ];\n\n // Get the uid of the first item\n $uid = $conf_array[ 'first_item.' ][ 'option_value' ];\n\n // LOOP all fields of current filter / tableField\n foreach ( $this->sql_filterFields[ $this->curr_tableField ] as $field )\n {\n // SWITCH field\n switch ( true )\n {\n case( $field == $uidField ):\n $firstItem[ $uid ][ $uidField ] = $uid;\n break;\n case( $field == $hitsField ):\n $firstItem[ $uid ][ $hitsField ] = ( int ) $this->hits_sum[ $this->curr_tableField ];\n break;\n default:\n $firstItem[ $uid ][ $field ] = null;\n break;\n }\n // SWITCH field\n }\n // LOOP all fields of current filter / tableField\n // Add first item to the rows of the current filter\n $this->rows = ( array ) $firstItem + ( array ) $this->rows;\n\n return;\n }", "title": "" }, { "docid": "fe504793ea9b2ccdc0357e0e748a3ae7", "score": "0.5023394", "text": "abstract public function getList($first = -1, $limit = -1);", "title": "" }, { "docid": "0e7d4bbf3822f51b4d04fcd69429e706", "score": "0.497899", "text": "public function getSaleFirstData($conditions,$fields) {\t\r\n return $this->find('first', array('fields' => $fields,'conditions'=>$conditions,'recursive'=>-1));\r\n }", "title": "" }, { "docid": "6fc14edb045999c2cb10b20d6d65cf0f", "score": "0.49415088", "text": "function stripFirst ($count = 1)\n {\n $this->A = array_slice ($this->A, $count);\n return $this;\n }", "title": "" }, { "docid": "5939ea5b6c063b95f2d87cf0213a0bfe", "score": "0.4939023", "text": "abstract protected function fields();", "title": "" }, { "docid": "5939ea5b6c063b95f2d87cf0213a0bfe", "score": "0.4939023", "text": "abstract protected function fields();", "title": "" }, { "docid": "10207249569d2f5f20950a11dde40b2d", "score": "0.49219278", "text": "private function getPreviewFields() \r\n\t{\r\n\t\t$sql = \"select field1, field2, field3, field4, field5 \r\n\t\t\t\tfrom redcap_ddp_preview_fields where project_id = \" . $this->project_id;\r\n\t\t$q = db_query($sql);\r\n\t\tif (db_num_rows($q)) {\r\n\t\t\t// Remove all blank instances\r\n\t\t\t$preview_fields = db_fetch_assoc($q);\r\n\t\t\tforeach ($preview_fields as $key=>$field) {\r\n\t\t\t\tif ($field == '') unset($preview_fields[$key]);\r\n\t\t\t}\r\n\t\t\treturn array_values($preview_fields);\r\n\t\t} else {\r\n\t\t\treturn array();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "6b3d915a6cb9fbd2802f442906d8673f", "score": "0.49158207", "text": "private static function fields()\n {\n $fields = static::$fields;\n $primary_key = static::$primary_key;\n\n $rows = [$primary_key, ...$fields];\n\n if(!count($rows)) {\n return ['*'];\n }\n\n return $rows;\n }", "title": "" }, { "docid": "d0055c48f0a1f69a644e0fa0c8e6ae80", "score": "0.49122396", "text": "protected function getFirstField(/*# string */ $key)\n {\n $parts = explode($this->field_splitter, $key);\n return array_shift($parts);\n }", "title": "" }, { "docid": "12ee0da1db739e3540c28e51f979e393", "score": "0.4908307", "text": "function openskydora_get_most_viewed_items($count, $weeks_ago=7, $exclude=NULL) {\n\n $records = openskydora_get_most_viewed($count+20, $weeks_ago, $exclude);\n $item_records = array(); // No collections\n \n // filter out collection citation model\n foreach ($records as $pid=>$data) {\n $data->obj = islandora_object_load($pid);\n if (in_array('islandora:collectionCModel',$data->obj->models)) {\n // dsm ('collection! '. $pid);\n } else {\n $item_records[$pid] = $data;\n }\n }\n return array_slice($item_records, 0, $count, TRUE);\n}", "title": "" }, { "docid": "9c942e912385d381cdc310f5e056ad2a", "score": "0.4892852", "text": "function numFields( $res );", "title": "" }, { "docid": "4b30200c656849756f323bea733333f6", "score": "0.48901588", "text": "public function getFirstItem() {}", "title": "" }, { "docid": "4b30200c656849756f323bea733333f6", "score": "0.48885638", "text": "public function getFirstItem() {}", "title": "" }, { "docid": "39b6dfaf837ac7841332f9253d9f70aa", "score": "0.48875743", "text": "abstract public function getFields($entity);", "title": "" }, { "docid": "ddad6c91ed05e43f21060b0e343c4698", "score": "0.48811764", "text": "function fieldName( $res, $n );", "title": "" }, { "docid": "9840808009016b4e4369068bfce5940a", "score": "0.48440498", "text": "public function numOfFields();", "title": "" }, { "docid": "64f72415acc061e48cbb736f6fc8e5df", "score": "0.48274896", "text": "function take(iterable $iterable, int $n): Iterator\n{\n /** @psalm-suppress DeprecatedFunction */\n return slice($iterable, 0, $n);\n}", "title": "" }, { "docid": "fce1f788f74f39aeaf05dadb9167a8d0", "score": "0.48249233", "text": "function skip($count=1) {\n\t\tif ($this->dry()) {\n\t\t\ttrigger_error(self::TEXT_M2Empty);\n\t\t\treturn;\n\t\t}\n\t\tself::load($this->criteria,$this->order,$this->offset+$count);\n\t}", "title": "" }, { "docid": "e93fd70a1cb9e799be8c349b8d4cb43c", "score": "0.48174456", "text": "function paginateWithExtra($size = 15);", "title": "" }, { "docid": "8034b37b37d871f0bcf4ceda7bf5ee9f", "score": "0.48036653", "text": "function getFirstItemsOfArray($array, $numberOfItemsToReturn) {\r\n\t\t$outArray = array();\r\n\t\tforeach($array as $key => $value) {\r\n\t\t\tif($count++ < $numberOfItemsToReturn) {\r\n\t\t\t\t$outArray[$key] = $value;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $outArray;\r\n\t}", "title": "" }, { "docid": "744404c8ebb837e79836d14b955d8434", "score": "0.47947386", "text": "protected abstract function getOrderFields();", "title": "" }, { "docid": "b30be7160f72d0f4853258ad099e7cc3", "score": "0.47918946", "text": "public function numberOfFields();", "title": "" }, { "docid": "d5d115655542b9a66f4460c3e6542fd9", "score": "0.4791168", "text": "function first($limit = 1){\n\t\treturn $this->substr(0,$limit);\n\t}", "title": "" }, { "docid": "e6f1da73d918900637f3b0b2d53139f2", "score": "0.47898877", "text": "public function fetchFieldsForPage($default = null);", "title": "" }, { "docid": "416ec9228a8ceccb4fefc4dbe5f08cbf", "score": "0.47801626", "text": "public function skip($n);", "title": "" }, { "docid": "62cc78c6a53109f8aaebd178e26e23e5", "score": "0.4777284", "text": "public function getAllFields();", "title": "" }, { "docid": "b1445f98db1e9b33aa5ebbb97b6fc37b", "score": "0.47722784", "text": "public function skip($howMany);", "title": "" }, { "docid": "52b114862fdc2f74c924eb1ec552a2c0", "score": "0.4771574", "text": "function get_apr_mandatory_fields(){\n $fields = array(\n 'field_ef_date_and_partici_bm',\n 'field_ef_working_methods_rating',\n 'field_ef_general_kind_access',\n 'field_ef_related_acess',\n 'field_ef_general_kind_useful',\n 'field_ef_related_deliv_useful',\n 'field_ef_support_admin_rating',\n 'field_ef_support_deliver_rating',\n //'field_ef_invoicing_policy_rating',\n //'field_ef_ef_adherence_rating',\n //'field_ef_yammer_rating',\n 'field_ef_cms_system_rating',\n //'field_ef_network_tend_main_area',\n //'field_ef_completed_by',\n );\n\n return $fields;\n}", "title": "" }, { "docid": "5db8171d8c40bfc486659f55dc5b3cd0", "score": "0.47692075", "text": "public function firstN($expression, $n): static;", "title": "" }, { "docid": "552af95fa5b8ef9516f51d6dc11038aa", "score": "0.4769097", "text": "function expression_function_take($collection, $number)\n{\n if (is_array($collection)) {\n return array_slice($collection, 0, $number, true);\n } else if ($collection instanceof \\Iterator) {\n return new \\LimitIterator($collection, 0, $number);\n } else {\n throw new \\InvalidArgumentException('Collection must be an array or an Iterator');\n }\n}", "title": "" }, { "docid": "cda86d5a30e4e16c98cc20b0679a5feb", "score": "0.47681123", "text": "protected function prepareFoundRows ($fields) {\t\t\n\t\t$fields = @mergeAsArray(null, $fields);\n\t\tif (empty($fields[0])) {\n\t\t\t$fields = array(\"SQL_CALC_FOUND_ROWS (null)\", \"{$this->alias}.*\");\n\t\t} else {\n\t\t\tarray_unshift($fields, 'SQL_CALC_FOUND_ROWS (null)');\n\t\t}\n\t\treturn $fields;\n\t\t\n\t\t\n\t\t/*******************************************************************************\n\t\t * DEPRECATE\n\t\t */\n//\t\tif (is_array($fields) && !@empty($fields[0])) {\n//\t\t\t$fields[0] = \"SQL_CALC_FOUND_ROWS \".$fields[0];\n//\t\t} else {\n//\t\t\t$fields = !empty($fields) ? \"SQL_CALC_FOUND_ROWS {$fields}\" : \"SQL_CALC_FOUND_ROWS `{$this->alias}`.*\";\n//\t\t\t$fields = array($fields);\n//\t\t}\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "96c60c754a1b9d7f8cb14878fca661c1", "score": "0.4760463", "text": "public static function get_fields()\n {\n }", "title": "" }, { "docid": "8567ff7f2fdc303d9d202c9ebe853c75", "score": "0.47591564", "text": "private function take($param) {\n if (isset($param['start']) && isset($param['offset'])) {\n $this->sql .= 'LIMIT ' . $param['start'] . ', ' . $param['offset'];\n }\n }", "title": "" }, { "docid": "8eb465fbe1ff3842fceef7eaac471393", "score": "0.4757639", "text": "public function getFirst() {}", "title": "" }, { "docid": "0c36466bbd021ed03d8b4508d7ec5133", "score": "0.47565463", "text": "public function getFirstItem();", "title": "" }, { "docid": "e5a439a7028683e2dde3c9a0394a541d", "score": "0.47562456", "text": "public function firstItem();", "title": "" }, { "docid": "5a7cd4436b2e6199cfb49d0cbef99991", "score": "0.47454333", "text": "public function getFirstResult();", "title": "" }, { "docid": "5a7cd4436b2e6199cfb49d0cbef99991", "score": "0.47454333", "text": "public function getFirstResult();", "title": "" }, { "docid": "88e738b6d3b802e25447b317f60c4585", "score": "0.47350845", "text": "public function getFirst();", "title": "" }, { "docid": "545ed6fd1513ce7131e785ac1e04f516", "score": "0.47275394", "text": "function explodeFK($input = '', $table = '', $limit = 0) {\n $input = explode(\" \", $input);\n\n if (count($input) > 1) {\n $default = 1;\n \n foreach ($input as $value) {\n if ($default == 1)\n $pk = $value;\n else {\n $pk .= \" OR pk = $value\";\n }\n \n $default++;\n }\n } else {\n $pk = array_shift($input);\n }\n\n connectDatabase();\n \n $result = queryDatabase(\"SELECT name\n FROM $table\n WHERE pk = $pk\n ORDER BY name ASC\");\n\n $default = 1;\n\n while ($row = mysql_fetch_object($result)) {\n if ($default == 1)\n $input = \"$row->name<br />\";\n elseif ($default < 4 && $limit == 1)\n $input .= \"$row->name<br />\";\n elseif ($default == 4 && $limit == 1)\n $input .= \"More...<br />\";\n elseif ($default > 1 && $limit == 0)\n $input .= \"$row->name<br />\";\n\n $default++;\n }\n\n return $input;\n}", "title": "" }, { "docid": "7110b57b1822cc47f21f27e936d50e27", "score": "0.47255594", "text": "public function extractFirst(): array\n {\n if (!$this->keyTotal) {\n return [];\n }\n\n $this->keyTotal--;\n\n return array_splice($this->keys, 0, 1);\n }", "title": "" }, { "docid": "5cfb13b79d6abb231ce305449ec86675", "score": "0.47246763", "text": "function skip($count);", "title": "" }, { "docid": "35d7e3934df7594f0662dc316479982a", "score": "0.47240987", "text": "function sliced($anarray,$entries){\n$count_until_end = count($anarray) - $entries;\n$sliced = array_slice($anarray,$count_until_end);\nreturn $sliced;\n}", "title": "" }, { "docid": "bf572db9c5804a704f32067a4848532e", "score": "0.47212306", "text": "public function skip($_count=1) {\n\t\tif ($this->dry()) {\n\t\t\ttrigger_error(self::TEXT_AxonEmpty);\n\t\t\treturn;\n\t\t}\n\t\t$this->load($this->criteria,$this->order,$this->offset+$_count);\n\t}", "title": "" }, { "docid": "beee3024bd549e4b9d0d4c950973a6d6", "score": "0.47181684", "text": "function get_fields()\n\t{\n\t\trequire_code('ocf_members');\n\n\t\t$indexes=collapse_2d_complexity('i_fields','i_name',$GLOBALS['FORUM_DB']->query_select('db_meta_indices',array('i_fields','i_name'),array('i_table'=>'f_member_custom_fields'),'ORDER BY i_name'));\n\n\t\t$fields=array();\n\t\tif (has_specific_permission(get_member(),'view_profiles'))\n\t\t{\n\t\t\t$rows=ocf_get_all_custom_fields_match(NULL,1,1);\n\t\t\trequire_code('fields');\n\t\t\tforeach ($rows as $row)\n\t\t\t{\n\t\t\t\tif (!array_key_exists('field_'.strval($row['id']),$indexes)) continue;\n\n\t\t\t\t$ob=get_fields_hook($row['cf_type']);\n\t\t\t\t$temp=$ob->get_search_inputter($row);\n\t\t\t\tif (is_null($temp))\n\t\t\t\t{\n\t\t\t\t\t$type='_TEXT';\n\t\t\t\t\t$special=make_string_tempcode(get_param('option_'.strval($row['id']),''));\n\t\t\t\t\t$display=$row['trans_name'];\n\t\t\t\t\t$fields[]=array('NAME'=>strval($row['id']),'DISPLAY'=>$display,'TYPE'=>$type,'SPECIAL'=>$special);\n\t\t\t\t} else $fields=array_merge($fields,$temp);\n\t\t\t}\n\n\t\t\t$age_range=get_param('option__age_range',get_param('option__age_range_from','').'-'.get_param('option__age_range_to',''));\n\t\t\t$fields[]=array('NAME'=>'_age_range','DISPLAY'=>do_lang_tempcode('AGE_RANGE'),'TYPE'=>'_TEXT','SPECIAL'=>$age_range);\n\t\t}\n\n\t\t$map=has_specific_permission(get_member(),'see_hidden_groups')?array():array('g_hidden'=>0);\n\t\t$group_count=$GLOBALS['FORUM_DB']->query_value('f_groups','COUNT(*)');\n\t\tif ($group_count>300) $map['g_is_private_club']=0;\n\t\tif ($map==array()) $map=NULL;\n\t\t$rows=$GLOBALS['FORUM_DB']->query_select('f_groups',array('id','g_name'),$map,'ORDER BY g_order');\n\t\t$groups=form_input_list_entry('',true,'---');\n\t\t$default_group=get_param('option__user_group','');\n\t\t$group_titles=array();\n\t\tforeach ($rows as $row)\n\t\t{\n\t\t\t$row['text_original']=get_translated_text($row['g_name'],$GLOBALS['FORUM_DB']);\n\n\t\t\tif ($row['id']==db_get_first_id()) continue;\n\t\t\t$groups->attach(form_input_list_entry(strval($row['id']),strval($row['id'])==$default_group,$row['text_original']));\n\t\t\t$group_titles[$row['id']]=$row['text_original'];\n\t\t}\n\t\tif (strpos($default_group,',')!==false)\n\t\t{\n\t\t\t$bits=explode(',',$default_group);\n\t\t\t$combination=new ocp_tempcode();\n\t\t\tforeach ($bits as $bit)\n\t\t\t{\n\t\t\t\tif (!$combination->is_empty()) $combination->attach(do_lang_tempcode('LIST_SEP'));\n\t\t\t\t$combination->attach(escape_html(@$group_titles[intval($bit)]));\n\t\t\t}\n\t\t\t$groups->attach(form_input_list_entry(strval($default_group),true,do_lang_tempcode('USERGROUP_SEARCH_COMBO',escape_html($combination))));\n\t\t}\n\t\t$fields[]=array('NAME'=>'_user_group','DISPLAY'=>do_lang_tempcode('GROUP'),'TYPE'=>'_LIST','SPECIAL'=>$groups);\n\t\tif (has_specific_permission(get_member(),'see_hidden_groups'))\n// $fields[]=array('NAME'=>'_photo_thumb_url','DISPLAY'=>do_lang('PHOTO'),'TYPE'=>'','SPECIAL'=>'','CHECKED'=>false);\n\t\t{\n\t\t\t//$fields[]=array('NAME'=>'_emails_only','DISPLAY'=>do_lang_tempcode('EMAILS_ONLY'),'TYPE'=>'_TICK','SPECIAL'=>'');\tCSV export better now\n\t\t}\n\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "19ea6e850629f4b7b9748c249b1cd209", "score": "0.47122595", "text": "protected function getFieldsFromShowItem() {}", "title": "" }, { "docid": "0cf4181e41338b844c77654125fb220b", "score": "0.47120315", "text": "public function select($fields);", "title": "" }, { "docid": "a0dffb95b8027816bc3777dcb1f590fb", "score": "0.4706315", "text": "public function limit($sql){\n\t\t$params = get_params(func_get_args());\n\t\t$sql_new = $sql;\n\t\n\t\tif(isset($params['limit']) && is_numeric($params['limit'])){\n\t\t\t$sql_new.=\" FIRST $params[limit]\";\n\t\t}\n\t\t\n\t\tif(isset($params['offset']) && is_numeric($params['offset'])){\n\t\t\t$sql_new.=\" SKIP $params[offset]\";\n\t\t}\n\t\t\n\t\treturn $sql_new;\n\t}", "title": "" }, { "docid": "144f62860563a904f6e5088aaa2e32e8", "score": "0.47028077", "text": "abstract public function getFields(): array;", "title": "" }, { "docid": "2715c36a1ade725a1f6015e54686778d", "score": "0.4698828", "text": "public function select($table, $fields, $where, $order, $start);", "title": "" }, { "docid": "04ec0ad033dcf2ec0b6e23d92e1254cf", "score": "0.4697231", "text": "public function first(array $columns = ['*'])\n {\n }", "title": "" }, { "docid": "6a23856a7c752309770488189000db90", "score": "0.46957624", "text": "public function slice($start, $amount);", "title": "" }, { "docid": "21f65607c102ec021be440205cff1915", "score": "0.46916258", "text": "function extractFields(&$data, $fields, $ignoredFields) {\n\t//sanitize whole array of room + bookings fields\n\t$out = [];\n\tforeach ($fields as $field) {\n\t\t$out[$field] = $data[0][$field];\n\t\tfor ($i = 0; $i < count($data); $i++)\n\t\t\tunset($data[$i][$field]);\n\t}\n\tforeach ($ignoredFields as $field) {\n\t\tfor ($i = 0; $i < count($data); $i++)\n\t\t\tunset($data[$i][$field]);\n\t}\n\treturn $out;\n}", "title": "" }, { "docid": "845afca6bef36ada99276fb8f049d504", "score": "0.46735784", "text": "public function take(int $n): VectorInterface;", "title": "" }, { "docid": "082abb0082d1e8ebee909f90bdb67b8d", "score": "0.4667086", "text": "protected function fetch_fields()\n {\n if(empty($this->table_fields))\n {\n $fields = $this->_database->list_fields($this->table);\n foreach ($fields as $field) {\n $this->table_fields[] = $field;\n }\n }\n }", "title": "" }, { "docid": "aa4f46acfd6710bb822bea39aa9348a8", "score": "0.465979", "text": "public function selectRows($fields='*', $table='users' ,$limit=10) {\n\t\tif(is_array($fields))\n\t\t{\n\t\t\t$fields = implode(\",\",$fields);\n\t\t}\n\t $sql = \"SELECT $fields from $table LIMIT $limit\"; \n $result = mysql_query($sql);\n\t\t$returnArray = array();\n\t\twhile($row = mysql_fetch_assoc($result))\n\t\t{\n\t\t\t$returnArray[] = $row;\n\t\t}\n\t\treturn $returnArray;\n }", "title": "" }, { "docid": "2f343c0174f310d5a4d574e45e59c3f9", "score": "0.465673", "text": "public function getListFields();", "title": "" }, { "docid": "e17ef481bf7b9e84b6bcae099682f058", "score": "0.4651132", "text": "abstract protected function fields(): array;", "title": "" }, { "docid": "e17ef481bf7b9e84b6bcae099682f058", "score": "0.4651132", "text": "abstract protected function fields(): array;", "title": "" }, { "docid": "cc5cb468dca3ef5c2ba036a0d6932478", "score": "0.46460792", "text": "public function first($columns = ['*'])\n {\n return $this->take(1)->get($columns)->first();\n }", "title": "" }, { "docid": "ea6c9fa1d1b97d919d9f043e64edcc46", "score": "0.46405455", "text": "function getResult($limit, $idField, $dateField = null);", "title": "" }, { "docid": "c32e0405657f2f37d47477253952ff0f", "score": "0.46398386", "text": "public function &getFields();", "title": "" } ]
67deadc26a81cd5f3e54a7d9a70d1e89
Operation flagPrototypeDestroyReviewsWithHttpInfo Deletes reviews of this model.
[ { "docid": "b1d045df5a316c2170971bcf95506a87", "score": "0.68470573", "text": "public function flagPrototypeDestroyReviewsWithHttpInfo($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 flagPrototypeDestroyReviews');\n }\n // parse inputs\n $resourcePath = \"/Flags/{id}/reviews\";\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 // 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 '/Flags/{id}/reviews'\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": "0b048a942a4584ed12e8cb0815bbb225", "score": "0.71828175", "text": "public function flagPrototypeDestroyReviews($id)\n {\n list($response) = $this->flagPrototypeDestroyReviewsWithHttpInfo($id);\n return $response;\n }", "title": "" }, { "docid": "b7bbe655d8dc9c3fcaec65229f972bfd", "score": "0.59036046", "text": "public function flagPrototypeCreateReviews($id, $data = null)\n {\n list($response) = $this->flagPrototypeCreateReviewsWithHttpInfo($id, $data);\n return $response;\n }", "title": "" }, { "docid": "f687aa0f0ccd55e96b54543a155d5065", "score": "0.56392795", "text": "public function flagPrototypeCreateReviewsWithHttpInfo($id, $data = null)\n {\n // verify the required parameter 'id' is set\n if ($id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id when calling flagPrototypeCreateReviews');\n }\n // parse inputs\n $resourcePath = \"/Flags/{id}/reviews\";\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 // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n // body params\n $_tempBody = null;\n if (isset($data)) {\n $_tempBody = $data;\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 'POST',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\DBCDK\\CommunityServices\\Model\\Review',\n '/Flags/{id}/reviews'\n );\n\n return array($this->apiClient->getSerializer()->deserialize($response, '\\DBCDK\\CommunityServices\\Model\\Review', $httpHeader), $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\DBCDK\\CommunityServices\\Model\\Review', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "title": "" }, { "docid": "c45a262e53b037d71c85fefc28abdcd0", "score": "0.5614344", "text": "public function flagPrototypeUpdateReviews($id, $data = null)\n {\n list($response) = $this->flagPrototypeUpdateReviewsWithHttpInfo($id, $data);\n return $response;\n }", "title": "" }, { "docid": "ebc569eab30abf5248cc9c19cf256751", "score": "0.52002364", "text": "public function destroy(reviews $reviews)\n {\n //\n }", "title": "" }, { "docid": "193482309f538466e265b78131de5677", "score": "0.51819354", "text": "public function flagPrototypeUpdateReviewsWithHttpInfo($id, $data = null)\n {\n // verify the required parameter 'id' is set\n if ($id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id when calling flagPrototypeUpdateReviews');\n }\n // parse inputs\n $resourcePath = \"/Flags/{id}/reviews\";\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 // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n // body params\n $_tempBody = null;\n if (isset($data)) {\n $_tempBody = $data;\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 'PUT',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\DBCDK\\CommunityServices\\Model\\Review',\n '/Flags/{id}/reviews'\n );\n\n return array($this->apiClient->getSerializer()->deserialize($response, '\\DBCDK\\CommunityServices\\Model\\Review', $httpHeader), $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\DBCDK\\CommunityServices\\Model\\Review', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "title": "" }, { "docid": "77056b1c92f5ecb77524650540847d79", "score": "0.49335483", "text": "public function flagPrototypeGetReviews($id, $refresh = null)\n {\n list($response) = $this->flagPrototypeGetReviewsWithHttpInfo($id, $refresh);\n return $response;\n }", "title": "" }, { "docid": "555ab34f4221fff85af19f61d58c0c3f", "score": "0.4711314", "text": "public function flagPrototypeDestroyPosts($id)\n {\n list($response) = $this->flagPrototypeDestroyPostsWithHttpInfo($id);\n return $response;\n }", "title": "" }, { "docid": "e03328f833b21ad51cc986a24ed92a6e", "score": "0.46772325", "text": "public function flagPrototypeDestroyPostsWithHttpInfo($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 flagPrototypeDestroyPosts');\n }\n // parse inputs\n $resourcePath = \"/Flags/{id}/posts\";\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 // 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 '/Flags/{id}/posts'\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": "dd0e2f6432a95ece8aa6f901f864621d", "score": "0.4578032", "text": "public function flagPrototypeGetReviewsWithHttpInfo($id, $refresh = null)\n {\n // verify the required parameter 'id' is set\n if ($id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id when calling flagPrototypeGetReviews');\n }\n // parse inputs\n $resourcePath = \"/Flags/{id}/reviews\";\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 // query params\n if ($refresh !== null) {\n $queryParams['refresh'] = $this->apiClient->getSerializer()->toQueryValue($refresh);\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 // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'GET',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\DBCDK\\CommunityServices\\Model\\Review',\n '/Flags/{id}/reviews'\n );\n\n return array($this->apiClient->getSerializer()->deserialize($response, '\\DBCDK\\CommunityServices\\Model\\Review', $httpHeader), $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\DBCDK\\CommunityServices\\Model\\Review', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "title": "" }, { "docid": "ffba52479a652e945697cdf651baf86d", "score": "0.45620862", "text": "public function flagPrototypeDestroyCommentsWithHttpInfo($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 flagPrototypeDestroyComments');\n }\n // parse inputs\n $resourcePath = \"/Flags/{id}/comments\";\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 // 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 '/Flags/{id}/comments'\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": "945ed164efbc73b3455c5a53492703ff", "score": "0.4456613", "text": "public function destroy(Review $review)\n {\n //\n }", "title": "" }, { "docid": "945ed164efbc73b3455c5a53492703ff", "score": "0.4456613", "text": "public function destroy(Review $review)\n {\n //\n }", "title": "" }, { "docid": "945ed164efbc73b3455c5a53492703ff", "score": "0.4456613", "text": "public function destroy(Review $review)\n {\n //\n }", "title": "" }, { "docid": "1a20641aed75f33080c93f2fa4f6fe65", "score": "0.43035123", "text": "public function destroy(Review $review)\n {\n $review->delete();\n }", "title": "" }, { "docid": "0966cdfe8811c8694a6f85bdab9aa2db", "score": "0.42700386", "text": "public function destroy(user_reviews $user_reviews)\n {\n //\n }", "title": "" }, { "docid": "293b013fa6fd8fbdcf1a641c098d7e08", "score": "0.4218953", "text": "public function destroy($prodId, $reviewId)\n {\n $review = Review::findOrFail($reviewId);\n\n if(Gate::allows('updateDelete-reviews',$review)) {\n $review->delete();\n $this->statusCode = 204;\n \n return response(null, $this->statusCode);\n }\n abort(403, 'Access Forbidden');\n\n }", "title": "" }, { "docid": "ee470e4f59242dcb38926611701f504b", "score": "0.41408157", "text": "public function flagPrototypeDestroyGroups($id)\n {\n list($response) = $this->flagPrototypeDestroyGroupsWithHttpInfo($id);\n return $response;\n }", "title": "" }, { "docid": "0784c88c98cc840549063ab8603352c7", "score": "0.41361785", "text": "public function flagPrototypeDestroyComments($id)\n {\n list($response) = $this->flagPrototypeDestroyCommentsWithHttpInfo($id);\n return $response;\n }", "title": "" }, { "docid": "cf0f58270272a8008355fd7530a7e01a", "score": "0.41035476", "text": "public function destroy(ProductReview $productReview)\n {\n //\n }", "title": "" }, { "docid": "cf0f58270272a8008355fd7530a7e01a", "score": "0.41035476", "text": "public function destroy(ProductReview $productReview)\n {\n //\n }", "title": "" }, { "docid": "482a94ab19cf491fbbd3b11a245cfee1", "score": "0.40546402", "text": "public function delete(Review $review);", "title": "" }, { "docid": "8c8d35cc1380360a67b88c2968199327", "score": "0.40079996", "text": "public function removeData(Request $request)\n {\n $review = Review::find($request['id']);\n\n if ($review->delete())\n {\n return response()->json('Successfully deleted.');\n }\n }", "title": "" }, { "docid": "50c5855f3b29a144866f309a511d136a", "score": "0.39673704", "text": "public function destroy(Request $request)\n {\n //\n $review = Review::findOrFail($request->review_id);\n $review->delete();\n\n Session::flash('deleted_review', 'The review has been deleted!');\n return redirect()->back();\n\n }", "title": "" }, { "docid": "458812a6c9e62ab84baa58739ea13edc", "score": "0.3905104", "text": "public function destroy(Product $product, Review $review)\n\t\t{\n\t\t\t$review -> delete();\n\t\t\t\n\t\t\treturn response([\n\t\t\t\t\t'data' => 'Review Deleted',\n\t\t\t], Response::HTTP_OK);\n\t\t}", "title": "" }, { "docid": "1a56b904e82d2d6a4b72e29be84b9a27", "score": "0.39014062", "text": "public function destroy(Review $review)\n {\n return view('layouts.app')->with('status', 'Not implemented.');\n }", "title": "" }, { "docid": "62684c07b084917591b4138354ec3cde", "score": "0.38878638", "text": "public function flagPrototypeDestroyGroupsWithHttpInfo($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 flagPrototypeDestroyGroups');\n }\n // parse inputs\n $resourcePath = \"/Flags/{id}/groups\";\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 // 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 '/Flags/{id}/groups'\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": "b215742619db6538b6688b570dd74b9f", "score": "0.38760167", "text": "public function destroy(Request $req,TestReview $testReview)\n {\n $user = auth()->guard('client')->user();\n try{ \n $testReview->delete();\n return $this->sendResponse(\"\", 'testReview deleted successfully.');\n }catch(Exception $x){\n return $this->sendError('access error', 'either you dont have access to this record or it was deleted');\n }\n \n }", "title": "" }, { "docid": "23aaace4c94aa1c40956cdefc4fa1fd3", "score": "0.38137323", "text": "public function destroy($producttypes, Request $request)\n {\n $producttypes = Producttypes::where('id',$producttypes)->firstOrFail();\n $producttypes->delete();\n return response(null,200);\n }", "title": "" }, { "docid": "9e18dbb4fd33e17267b8d38489315b9d", "score": "0.3813092", "text": "public function testProfilePrototypeDestroyByIdReviews()\n {\n\n }", "title": "" }, { "docid": "9de4f5240ecaaca0decfd6f0b7e40913", "score": "0.38016382", "text": "public function destroy(Request $request, Favorite $favorite = null)\n {\n //\n $resource = request('resource_type')::find(request('resource_id'));\n \n $resource->unfavorite();\n }", "title": "" }, { "docid": "1df1c11120a3850f7284c7300f0bcccb", "score": "0.37997678", "text": "public function destroy(Review $review)\n {\n $review->delete();\n // redirect to a comments page\n }", "title": "" }, { "docid": "c7920cee0a39494e1e9f46ecfcf411fd", "score": "0.37502468", "text": "public function destroy($id)\n {\n if ($this->review->find($id)->delete()) {\n return Response::json(array(\n 'deleted' => 1\n )\n );\n }\n\n return Response::json(array(\n 'deleted' => 0\n )\n );\n }", "title": "" }, { "docid": "b901f9862d679b1fb0988ff7747385e7", "score": "0.3689973", "text": "public function setReviews($reviews) {\n $this->properties['reviews'] = $reviews;\n\n return $this;\n }", "title": "" }, { "docid": "cb98938b85109577ee862db7af7c8005", "score": "0.367809", "text": "public function destroy(Review $review)\n {\n $review->delete();\n return back();\n }", "title": "" }, { "docid": "3bd7179fd948d42210bf08f5f262de82", "score": "0.36408263", "text": "public function destroy(catalogos $catalogos)\n {\n //\n }", "title": "" }, { "docid": "78b5c6799e1063f624a48bffef49f60d", "score": "0.36272603", "text": "public function destroy(Request $request)\n {\n $RatingDescription = RatingDescription::find($request->input('id'));\n $RatingDescription->delete();\n $sen['id'] = $request['id'];\n return response($sen);\n }", "title": "" }, { "docid": "9753514400a6ae114a610f27c4db19fb", "score": "0.3606879", "text": "public static function deleteReviewsById($id)\n\t{\n\t\t$review = Review::find($id);\n\t\t$review->delete();\n\t}", "title": "" }, { "docid": "8cb085a6284c7ccdc01c0b46e9f2e0b8", "score": "0.35983312", "text": "public function prune($netreviewsSiteReview = null)\n {\n if ($netreviewsSiteReview) {\n $this->addUsingAlias(NetreviewsSiteReviewTableMap::SITE_REVIEW_ID, $netreviewsSiteReview->getSiteReviewId(), Criteria::NOT_EQUAL);\n }\n\n return $this;\n }", "title": "" }, { "docid": "44c5f03bb68e15769812c37d0821896b", "score": "0.35906976", "text": "public function destroy(Request $request)\n {\n $trashed_place = $this->placeRepository->makeModel()->withTrashed()\n ->where('id', $request->get('id'))\n ->first();\n\n //Remove photos\n foreach ($trashed_place->photos as $photo) {\n \\Storage::disk('media')->delete($photo->path);\n $photo->delete();\n }\n\n //Remove Documents\n foreach ($trashed_place->documents as $document) {\n \\Storage::disk('media')->delete($document->path);\n $document->delete();\n }\n\n $trashed_place->appointments()->delete();\n\n $trashed_place->reservations()->delete();\n\n $trashed_place->calendar_settings()->delete();\n\n //remove place\n $trashed_place->forceDelete();\n\n if (request()->wantsJson()) {\n\n return response()->json(['removed' => $trashed_place]);\n }\n }", "title": "" }, { "docid": "43077c2e304b8303ce99ed48f880abeb", "score": "0.35894847", "text": "public function delete_reviews($fields = NULL)\n\t{\n\t\t$this->db->delete('reviews', $fields);\n\t\tvar_dump($this->db->last_query());\n\t}", "title": "" }, { "docid": "ad844b595a2a2edec85b1b4dca8d4528", "score": "0.35859865", "text": "public function deleteTranscoderOverlayDecodeAppConfigWithHttpInfo($server_name, $vhost_name, $template_name, $overlay_name, $app_name)\n {\n $returnType = '';\n $request = $this->deleteTranscoderOverlayDecodeAppConfigRequest($server_name, $vhost_name, $template_name, $overlay_name, $app_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": "e46eeddcec5f85c92d0e24271391b8eb", "score": "0.3583968", "text": "public function destroy(Request $request)\n {\n $server = Helper::worketicIsDemoSiteAjax();\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->category::where('id', $id)->delete();\n $json['type'] = 'success';\n $json['message'] = trans('lang.cat_deleted');\n return $json;\n }\n }", "title": "" }, { "docid": "2a551b9619084a259343d006b31bf6a5", "score": "0.35743904", "text": "public function delete($name, $optParams = [])\n {\n $params = ['name' => $name];\n $params = array_merge($params, $optParams);\n return $this->call('delete', [$params], VisionEmpty::class);\n }", "title": "" }, { "docid": "bbe301329a324596b566470ca074e7b2", "score": "0.3565919", "text": "public function flagPrototypeUpdateAttributes($id, $data = null)\n {\n list($response) = $this->flagPrototypeUpdateAttributesWithHttpInfo($id, $data);\n return $response;\n }", "title": "" }, { "docid": "f0fc79431885680d048a858b052fdd19", "score": "0.35613927", "text": "public function flagPrototypeCreatePosts($id, $data = null)\n {\n list($response) = $this->flagPrototypeCreatePostsWithHttpInfo($id, $data);\n return $response;\n }", "title": "" }, { "docid": "353f11b52c6835386f7cbc2aa376bd62", "score": "0.35558712", "text": "public function destroy(Review $review)\n {\n $author = $review->author;\n $product_id = $review->product_id;\n $deleted = $review->delete();\n\n if($deleted) {\n $product = Product::where('id', $product_id)->first();\n return redirect()->route('products.show', $product->slug)->with('author', $author);\n }\n \n }", "title": "" }, { "docid": "c7593922a18168b3f512237ac05ac3ff", "score": "0.35526526", "text": "public function destroy($id)\n {\n // find review by id\n $review = ReviewBook::info()->find($id);\n\n // if review doesnt exist return error message\n if (!$review) return response()->json(['message' => 'Review does not exist']);\n \n // delete review\n $review->delete();\n\n // return success message\n $response = ['message' => \"Review delete success\"];\n return response()->json($response);\n }", "title": "" }, { "docid": "0b2f21fbde0730528412c7d808ff2eb6", "score": "0.35129502", "text": "public function destroy(Request $request)\n {\n $customers = Customer::find($request->id)->delete();\n return response()->json();\n }", "title": "" }, { "docid": "f7cd90dc10c95573d3d1442b9f239293", "score": "0.35056406", "text": "protected function deleteSlideShapesRequest(Requests\\DeleteSlideShapesRequest $request)\n {\n // verify the required parameter 'name' is set\n if ($request->name === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $name when calling deleteSlideShapes');\n }\n // verify the required parameter 'slide_index' is set\n if ($request->slideIndex === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $slideIndex when calling deleteSlideShapes');\n }\n\n $resourcePath = '/slides/{name}/slides/{slideIndex}/shapes';\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n\n // query params\n if ($request->shapes !== null) {\n $queryParams['shapes'] = ObjectSerializer::toQueryValue($request->shapes);\n }\n // query params\n if ($request->password !== null) {\n $queryParams['password'] = ObjectSerializer::toQueryValue($request->password);\n }\n // query params\n if ($request->folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($request->folder);\n }\n // query params\n if ($request->storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($request->storage);\n }\n\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"name\", $request->name);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"slideIndex\", $request->slideIndex);\n $this->headerSelector->selectHeaders(\n $headerParams,\n ['application/json'],\n ['application/json']);\n\n return $this->createRequest($resourcePath, $queryParams, $headerParams, $httpBody, 'DELETE');\n }", "title": "" }, { "docid": "327d8b0616b58f4a06379a34a120884b", "score": "0.350086", "text": "public function destroy(Request $request)\n\t{\n\t\tif (!isset($request->document_variation_id)) {\n\t\t\treturn Response::make('', 400);\n\t\t}\n\n\t\t$variation = DocumentVariation::find($request->document_variation_id);\n\t\tif (!isset($variation)) {\n\t\t\treturn Response::json([\n\t\t\t\t\"message\"\t=> \"Document variation with the provided ID not found\",\n\t\t\t], 404);\n\t\t}\n\n\t\tDB::transaction(function () use ($variation) {\n\t\t\t$fields = DocumentField::where(\"document_variation_id\", $variation->id)->get();\n\n\t\t\t/**\n\t\t\t * delete fields and their positions\n\t\t\t */\n\t\t\tforeach ($fields as $field) {\n\t\t\t\tFieldPosition::where(\"document_field_id\", $field->id)->delete();\n\t\t\t\t$field->delete();\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * delete document field groups\n\t\t\t */\n\t\t\tDocumentFieldGroup::where(\"document_variation_id\", $variation->id)->delete();\n\n\t\t\t/**\n\t\t\t * signatories\n\t\t\t */\n\t\t\t$document_signatories = Signatory::where(\"document_variation_id\", $variation->id)->get();\n\t\t\tforeach ($document_signatories as $signatory) {\n\t\t\t\tSignaturePosition::where(\"signatory_id\", $signatory->id)->delete();\n\t\t\t\t$signatory->delete();\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * template images\n\t\t\t */\n\t\t\t$template_images = TemplateImage::where(\"document_variation_id\", $variation->id)->get();\n\t\t\tforeach ($template_images as $image) {\n\t\t\t\tStorage::delete($image->location);\n\t\t\t\t$image->delete();\n\t\t\t}\n\n\t\t\t$variation->delete();\n\t\t});\n\t}", "title": "" }, { "docid": "2710547707f5fe62cfc97bb1dba5927a", "score": "0.34828997", "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 \n if (!empty($id)) {\n Vaccination::where('id', $id)->delete();\n \n $json['type'] = 'success';\n $json['message'] = 'Vaccination Deleted Successfully';\n return $json;\n } else {\n $json['type'] = 'error';\n return $json;\n }\n }", "title": "" }, { "docid": "ef3efd56223f3f2483fff81fb3a6580b", "score": "0.34763694", "text": "public function testProfilePrototypeDeleteReviews()\n {\n\n }", "title": "" }, { "docid": "8ec8dc8134e09a25c59e49df36f6def0", "score": "0.3474058", "text": "public function destroy(TipoProductos $tipoProductos)\n {\n //\n }", "title": "" }, { "docid": "41b45e1385f429d0ead598b14bd4b1c1", "score": "0.34716046", "text": "public function destroy(Request $request)\n {\n $id = $request->input('id', 0);\n\n if ($id) {\n \\App\\Models\\ProductComment::find($id)->delete();\n\n return response()->json([\n 'rs' => 1,\n 'msg' => 'Xóa bình luận thành công',\n ]);\n }\n\n return response()->json([\n 'rs' => 0,\n 'msg' => 'Xóa bình luận không thành công'\n ]);\n }", "title": "" }, { "docid": "23b3932eb145dae320436f6d1369b819", "score": "0.34575933", "text": "public function deleteShippingInfo(array $parameters = [], array $data = []) {\n return $this->oauth()->requestBool('DELETE','/shipping/info/:shipping_info_id', $parameters, $data);\n }", "title": "" }, { "docid": "400dbc9ee2c6c020340c1a1921410304", "score": "0.34539565", "text": "public function getReviewInfoCount()\n {\n return $this->count(self::review_info);\n }", "title": "" }, { "docid": "04097989f3446481be87eb730937f179", "score": "0.3447352", "text": "public function destroy(Request $request)\n {\n $evaluation = Evaluation::find($request->id);\n\n if($evaluation == null)\n {\n abort(404, 'Request not found!');\n }\n\n $evaluation->delete();\n\n return response()->json(['message' => 'Request Successfully Removed!']);\n }", "title": "" }, { "docid": "b6ee31006c90bf04862e88a26049bf0b", "score": "0.34424204", "text": "function getReviews(){\n $reviews = $this->all('schema:reviews');\n if ($reviews){\n \tEasyRdf_TypeMapper::set('schema:Review', 'WorldCat\\Discovery\\Review');\n \t$reviews = static::reloadGraph($this->graph)->resource($this->getUri())->all('schema:reviews');\n \tEasyRdf_TypeMapper::delete('schema:Review');\n }\n return $reviews;\n }", "title": "" }, { "docid": "6853ac3a9a61d594f9554382cf903c22", "score": "0.34413406", "text": "public function destroy(PokemonDestroyRequest $request, Pokemon $pokemon)\n {\n $pokemon->delete();\n return response(null, 204);\n }", "title": "" }, { "docid": "a704f58de4b71250c9d853f1f418876f", "score": "0.34393233", "text": "public function deleteReview($review_id)\n\t{\n\t\t$model = self::model()->findByPk($review_id);\n\t\tif (empty($model)) throw new Exception('Review does not exists');\n\t\t$modelTransaction = $model->dbConnection->beginTransaction(); // Transaction for model begin\n\t\ttry {\n\t\t\tif (!$model->delete())\n\t\t\t\tthrow new Exception('Cannot delete review.');\n\t\t\t\n\t\t\tif ($model->is_draft==self::NO_DRAFT && $model->status==self::TYPE_APPROVED) {\n\t\t\t\t// Delete all comment & compliment of review\n\t\t\t\tYii::import('application.modules.reviews.models.JLComment');\n\t\t\t\tJLComment::model()->deleteAllByAttributes(array(\n\t\t\t\t\t'object_type' => JLComment::TYPE_REVIEW,\n\t\t\t\t\t'object_id' => $model->id,\n\t\t\t\t));\n\t\t\t\tYii::import('application.modules.reviews.models.JLCompliment');\n\t\t\t\tJLCompliment::model()->deleteAllByAttributes(array(\n\t\t\t\t\t'object_type' => JLCompliment::TYPE_REVIEW,\n\t\t\t\t\t'object_id' => $model->id,\n\t\t\t\t));\n\t\t\t\t\n\t\t\t\t// TODO: Delete top review in search page\n\t\t\t}\n\t\t\t\n\t\t\t$modelTransaction->commit();\n\t\t\t\n\t\t\tif ($model->is_draft==self::NO_DRAFT && $model->status==self::TYPE_APPROVED) {\n\t\t\t\t/***** Remove point of user *****/\n\t\t\t\t// Attach behavior for user\n\t\t\t\t$user = JLUser::getUserInfo($model->user_id);\n\t\t\t\tYii::import('application.modules.pointSystem.models.JLPointSystem');\n\t\t\t\t$user->attachBehavior('UserPoint', 'application.modules.pointSystem.components.behaviors.JLUserPointBehavior');\n\t\t\t\t$user->retrieveAction(JLPointSystem::WRITE_REVIEW, null, $model->id);\n\t\t\t\tif ($model->is_first)\n\t\t\t\t\t$user->retrieveAction(JLPointSystem::FIRST_REVIEW, null, $model->id);\n\t\t\t\t$user->detachBehavior('UserPoint');\n\t\t\t\t\n\t\t\t\t// Decrease reviews in business\n\t\t\t\tYii::import('application.modules.businesses.models.JLBusiness');\n\t\t\t\t$modelBiz = JLBusiness::model()->findByPk($model->business_id);\n\t\t\t\tif ($modelBiz) $modelBiz->decReviews();\n\t\t\t}\n\t\t\treturn array(\n\t\t\t\t'error' => false,\n\t\t\t\t'model' => $model,\n\t\t\t);\n\t\t} catch (Exception $e) {\n\t\t\t$modelTransaction->rollBack();\n\t\t\treturn array(\n\t\t\t\t'error' => true,\n\t\t\t\t'msg' => $e->getMessage(),\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "085ddb796f5072d1d9265f529d7e8810", "score": "0.34371212", "text": "public function destroy(Prospectos $prospecto)\n {\n $prospecto->delete();\n return response(200);\n }", "title": "" }, { "docid": "b3f0ea8bf5f3d871fe9b2882e381178f", "score": "0.34234276", "text": "public function destroy(Review $review)\n {\n $review->delete();\n flash()->success('Review Deleted');\n\n return back();\n }", "title": "" }, { "docid": "267dbccad90636df3b4cc3079e5aaf64", "score": "0.3422034", "text": "public function destroy(priorities $priorities)\n {\n //\n }", "title": "" }, { "docid": "f6beb01697e0d869e012146722dc4e2c", "score": "0.34178865", "text": "public function destroy(ProductosServicio $productosServicio)\n {\n //\n }", "title": "" }, { "docid": "3ea7fa464e6a7e56c65602f62f590523", "score": "0.34062383", "text": "public function getReviews(Request $request)\n {\n\t\t$user = null;\n\t\t$nope = false;\n\t\t$v = \"\";\n\t\t\n\t\t$signals = $this->helpers->signals;\n\t\t$plugins = $this->helpers->getPlugins();\n\t\t#$this->helpers->populateTips();\n $cpt = ['user','signals','plugins'];\n\t\t\t\t\n\t\tif(Auth::check())\n\t\t{\n\t\t\t\n\t\t\t$user = Auth::user();\n\t\t\t\n\t\t\tif($this->helpers->isAdmin($user))\n\t\t\t{\n\t\t\t\t$hasPermission = $this->helpers->hasPermission($user->id,['view_reviews']);\n\t\t\t\t#dd($hasPermission);\n\t\t\t\t$req = $request->all();\n\t\t\t\t\n\t\t\t\tif($hasPermission)\n\t\t\t\t{\n\t\t\t\t$v = \"reviews\";\n\t\t\t\t$req = $request->all();\n $reviews = $this->helpers->getReviews();\n\t\t\t\t#dd($reviews);\n array_push($cpt,'reviews');\n }\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tsession()->flash(\"permissions-status-error\",\"ok\");\n\t\t\t\t\treturn redirect()->intended('/');\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tAuth::logout();\n\t\t\t\t$u = url('/');\n\t\t\t\treturn redirect()->intended($u);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$v = \"login\";\n\t\t}\n\t\treturn view($v,compact($cpt));\n }", "title": "" }, { "docid": "00b8d5a401f8f2c062e6c9910532a8e7", "score": "0.33999163", "text": "public function destroy(Request $request)\n {\n\n $delete = Reviews::findOrFail($request->id);\n $delete->delete();\n return redirect()->route('reviews.index')->with(\"message\",'تم الحذف بنجاح');\n\n \n \n }", "title": "" }, { "docid": "66d71a87fbdd6c2d0ba42e6b98739518", "score": "0.3386338", "text": "public function destroy(Request $request, Vision $vision)\n {\n if (!is_null($vision)) {\n if (File::exists('images/vision/' . $vision->image)) {\n File::delete('images/vision/' . $vision->image);\n }\n $vision->delete();\n }\n //write success message\n $request->session()->flash('delete', ' vision deleted Successfully');\n\n return redirect()->route('aboutpage.show');\n }", "title": "" }, { "docid": "18d1fa012c30dc027e5100c477e34ff6", "score": "0.33854914", "text": "public function flagPrototypeCreatePostsWithHttpInfo($id, $data = null)\n {\n // verify the required parameter 'id' is set\n if ($id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id when calling flagPrototypeCreatePosts');\n }\n // parse inputs\n $resourcePath = \"/Flags/{id}/posts\";\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 // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n // body params\n $_tempBody = null;\n if (isset($data)) {\n $_tempBody = $data;\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 'POST',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\DBCDK\\CommunityServices\\Model\\Post',\n '/Flags/{id}/posts'\n );\n\n return array($this->apiClient->getSerializer()->deserialize($response, '\\DBCDK\\CommunityServices\\Model\\Post', $httpHeader), $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\DBCDK\\CommunityServices\\Model\\Post', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "title": "" }, { "docid": "732532d40e568cdeec711ef8e6594228", "score": "0.33809662", "text": "public function deletePlacementWithHttpInfo($uuid, $accept = 'application/json', $content_type = 'application/json')\n {\n $returnType = '';\n $request = $this->deletePlacementRequest($uuid, $accept, $content_type);\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 case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\BigCommerce\\Widgets\\Model\\ErrorBase1',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 422:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\BigCommerce\\Widgets\\Model\\ErrorBase1',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "9e354968025ff753da6aa990c7cb32c8", "score": "0.33753043", "text": "public function destroy(Professionnel $professionnel)\n {\n //\n }", "title": "" }, { "docid": "869f915867a8d2190f87a54bcb303899", "score": "0.33683205", "text": "public function flagPrototypeCreateCommentsWithHttpInfo($id, $data = null)\n {\n // verify the required parameter 'id' is set\n if ($id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id when calling flagPrototypeCreateComments');\n }\n // parse inputs\n $resourcePath = \"/Flags/{id}/comments\";\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 // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n // body params\n $_tempBody = null;\n if (isset($data)) {\n $_tempBody = $data;\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 'POST',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\DBCDK\\CommunityServices\\Model\\Comment',\n '/Flags/{id}/comments'\n );\n\n return array($this->apiClient->getSerializer()->deserialize($response, '\\DBCDK\\CommunityServices\\Model\\Comment', $httpHeader), $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\DBCDK\\CommunityServices\\Model\\Comment', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "title": "" }, { "docid": "751607871154a243e2dfd6131ea9d08d", "score": "0.33664763", "text": "protected function deleteNotesSlideShapesRequest(Requests\\DeleteNotesSlideShapesRequest $request)\n {\n // verify the required parameter 'name' is set\n if ($request->name === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $name when calling deleteNotesSlideShapes');\n }\n // verify the required parameter 'slide_index' is set\n if ($request->slideIndex === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $slideIndex when calling deleteNotesSlideShapes');\n }\n\n $resourcePath = '/slides/{name}/slides/{slideIndex}/notesSlide/shapes';\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n\n // query params\n if ($request->shapes !== null) {\n $queryParams['shapes'] = ObjectSerializer::toQueryValue($request->shapes);\n }\n // query params\n if ($request->password !== null) {\n $queryParams['password'] = ObjectSerializer::toQueryValue($request->password);\n }\n // query params\n if ($request->folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($request->folder);\n }\n // query params\n if ($request->storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($request->storage);\n }\n\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"name\", $request->name);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"slideIndex\", $request->slideIndex);\n $this->headerSelector->selectHeaders(\n $headerParams,\n ['application/json'],\n ['application/json']);\n\n return $this->createRequest($resourcePath, $queryParams, $headerParams, $httpBody, 'DELETE');\n }", "title": "" }, { "docid": "3c6406cc876cd147084f9a779209e589", "score": "0.33658808", "text": "public function destroy(Review $review)\n {\n // dd($review);\n $deleteReview = DB::table('reviews')->where('id', $review->id)->delete();\n return Redirect::route('dashboard.reviews');\n }", "title": "" }, { "docid": "f36908f313afdff8358446389a47682a", "score": "0.33622214", "text": "public function destroy(Request $request)\n {\n $employeetypesRequest = json_decode($request->input('employees'));\n \n foreach ($employeetypesRequest as $key => $employeetypeRequest) {\n try {\n\n $employeeTypeObject = MasterDetail::findOrFail($employeetypeRequest->id);\n $employeeTypeObject->delete();\n\n $employeetypesResponse[] = $employeetypeRequest;\n\n } catch (Exception $e) {\n \n }\n }\n\n return Response()->Json($employeetypesResponse);\n }", "title": "" }, { "docid": "cb0d43e9e5c15b8cbc1d273750ddff22", "score": "0.33562863", "text": "public function destroy(Request $request)\n {\n \n $validation = Validator::make(\n $request->all(),\n [\n 'status_id' => 'required|integer|numeric',\n ]\n );\n $errors = $validation->errors();\n\n if($validation->fails()){\n\n $response = array(\n \"message\" => \"Failed\",\n \"errors\" => $errors,\n\n );\n return response()->json($response);\n\n }\n else{\n\n if($request->isMethod(\"delete\")){\n\n $pivotStatus = PivotStatus::find($request->status_id);\n $this->authorize('delete', $pivotStatus);\n $pivotStatus->delete();\n \n $response = array(\n \"message\" => \"Deleted\",\n \"request\" => $request->all(),\n );\n \n return response()->json($response);\n\n }\n\n }\n \n }", "title": "" }, { "docid": "40d83fd58a5c90473368b8982732a466", "score": "0.33525902", "text": "public function destroy(PrizeType $prizeType)\n {\n //\n }", "title": "" }, { "docid": "463f9de34d6ad41e929bf676398b8e81", "score": "0.3351169", "text": "public function destroy(Documentos $documentos)\n {\n //\n }", "title": "" }, { "docid": "c651bdca02dbff858308105c8f47db17", "score": "0.33491093", "text": "public function destroy(Request $request)\n { \n \n $team = Team::find($request->id);\n\n // delete related \n $team->players()->delete();\n\n $team->delete();\n\n return response()->json(['response' => 'success', 'message' => 'Team deleted along with related Players']);\n \n \n }", "title": "" }, { "docid": "efb170fc7b36e88f812c2285d142c83a", "score": "0.33488697", "text": "public function destroy(Request $request, $id)\n {\n $movie = Movie::find($id);\n if (!$movie) {\n return $this->notFoundResponse( $id );\n }\n $movie->delete();\n\n return $this->successResponse( $movie, 'Deleted.');\n\n }", "title": "" }, { "docid": "c644e36062c69a094e96d8b7a22c5783", "score": "0.33382067", "text": "public function reviewsCount()\n {\n return count($this->reviews);\n }", "title": "" }, { "docid": "86ee785fe5076ee919ef468fc3c831b5", "score": "0.3335343", "text": "public function destroy($id)\n {\n return $this->reviewRepository->delete($id);\n }", "title": "" }, { "docid": "027eb91b91b5985997efc129c033a48f", "score": "0.33289635", "text": "public function destroy(Request $request)\n {\n if ($request->isMethod('delete')){\n $idArray=json_decode($request->input('ids'));\n if(\\App\\Models\\Client::destroy($idArray)){\n return 'true';\n }else{\n return 'false';\n }\n }else{\n abort(500);\n }\n }", "title": "" }, { "docid": "67bbd86c650847dd706e1c5d981dc143", "score": "0.33287996", "text": "public function destroy(EmployeeCalendarDestroyRequest $request, Employee $employee, EmployeeCalendar $calendar)\n {\n $calendar->delete();\n return [\"message\" => \"deleted\"];\n }", "title": "" }, { "docid": "7d5954d5e2b0d096412131951b328cc9", "score": "0.33228177", "text": "public function destroy(PersonalInfo $personal)\n {\n $result = $this->deleteData($this->personalInfoRepo, $personal);\n\n echo json_encode($result);\n die;\n }", "title": "" }, { "docid": "810a228cd5080f6eeb3f642192b0db51", "score": "0.33211023", "text": "public function destroy(int $id)\n {\n $result = $this->bookReviewService->destroy($id);\n return $this->sendResponse($result);\n }", "title": "" }, { "docid": "0ff0539157614512935ec2c2f8506eaa", "score": "0.33159137", "text": "public function create(CreateReviewRequest $request);", "title": "" }, { "docid": "e59dd4ee4f8127b5f3490e1998c9d50d", "score": "0.3315665", "text": "public function destroyClient(Request $request)\n {\n /** Recovers parameters */\n $clientId = $request->get('id');\n /** Initialize validator */\n $validator = Validator::make($request->all(),[\n 'id' => 'required',\n ]);\n /** If validator fails */\n if ($validator->fails())\n {\n return response()->json(['success' => false, 'error_messages' => $validator->errors()],401);\n }\n /** Try to recover data */\n try\n {\n return response()->json(['success' => true, 'data' => ClienteFacade::destroyById($clientId)], 200);\n }\n catch (HttpException $httpException)\n {\n return response()->json(['success' => false, 'error_message' => $httpException->getMessage()], $httpException->getCode());\n }\n }", "title": "" }, { "docid": "513cf28ab00224ac48314969bcb0692e", "score": "0.33088169", "text": "public function testRemoveReviewer()\n {\n $user = new User;\n $user->setId('joe')->setEmail('joe')->setFullName('joe')->save();\n $user->setId('jane')->setEmail('jane')->setFullName('jane')->save();\n\n $review = new Review($this->p4);\n $review->setParticipants(array('joe', 'nonadmin', 'jane'))\n ->set('author', 'jane')\n ->save();\n\n $this->getRequest()\n ->setMethod(\\Zend\\Http\\Request::METHOD_POST)\n ->setQuery(new Parameters(array('_method' => 'delete')));\n\n $this->dispatch('/reviews/1/reviewers/nonadmin');\n\n $this->assertResponseStatusCode(200);\n\n $review = Review::fetch(1, $this->p4);\n $this->assertSame(array('joe'), $review->getReviewers());\n }", "title": "" }, { "docid": "0a57133692d18b7a822c99ed1b9d34e0", "score": "0.3304946", "text": "public function deleted(ReviewableContract $reviewable)\n {\n if (!$this->removeReviewsOnDelete($reviewable)) {\n return;\n }\n\n $reviewable->removeReviews();\n }", "title": "" }, { "docid": "71b74329c25a757f09b97c2906519b56", "score": "0.33048737", "text": "public function destroy(Vision $vision)\n {\n //\n }", "title": "" }, { "docid": "85d1ae37215e3a7333a5810fd29c57b6", "score": "0.32947657", "text": "public function destroy(Request $request)\n {\n $validation = Validator::make(\n $request->all(),\n [\n 'rightAnswer' => 'required|integer|numeric',\n ]\n );\n $errors = $validation->errors();\n\n if($validation->fails()){\n\n $response = array(\n \"message\" => \"Failed\",\n \"errors\" => $errors,\n\n );\n return response()->json($response);\n\n }\n else{\n\n if($request->isMethod(\"delete\")){\n\n $rightAnswer = RightAnswer::find($request->rightAnswer);\n $this->authorize('delete', $rightAnswer);\n $rightAnswer->delete();\n \n $response = array(\n \"message\" => \"Deleted\",\n \"request\" => $request->all(),\n );\n \n return response()->json($response);\n\n }\n\n }\n\n }", "title": "" }, { "docid": "f68266c71fe13782891bba4825f52991", "score": "0.32921493", "text": "public function destroy(Request $request)\n {\n ConsultationsICD::find($request->id)->delete();\n return;\n }", "title": "" }, { "docid": "20c2de75b5e891588610582b71d790f1", "score": "0.32868716", "text": "public function destroy(Request $request)\n {\n $fid = $request->fid;\n $fv = Favorite::find($fid);\n if ($fv != null) {\n $fv->delete();\n return $this->send_response(true, [], 200, 'Favorite removed');\n }\n return $this->send_response(false, [], 401, 'Favorite not found');\n }", "title": "" }, { "docid": "c410365fc31f0095e2ffa6a4b65f27fa", "score": "0.32860622", "text": "public function destroy($id, Request $request)\n {\n $risks_politic = RisksPolitics::find($id);\n $risks_politic->delete();\n $data = array(\n 'risks_politic' => $risks_politic,\n 'status' => 'success',\n 'code' => 200\n );\n\n return response()->json($data, 200);\n }", "title": "" }, { "docid": "ba49e25fa78403ca2b3d1f08ac304ff9", "score": "0.32731533", "text": "public function destroy_conceptos( Request $request ){\n\n $error = null;\n DB::beginTransaction();\n try {\n $response = SysConceptosFacturacionesModel::where(['id' => $request->id])->delete();\n SysUsersFacturacionesModel::where(['id_concepto' => $request->id])->delete();\n DB::commit();\n $success = true;\n } catch (\\Exception $e) {\n $success = false;\n $error = $e->getMessage().\" \".$e->getLine().\" \".$e->getFile();\n DB::rollback();\n }\n\n if ($success) {\n return $this->_message_success( 200, $response , self::$message_success );\n }\n return $this->show_error(6, $error, self::$message_error );\n\n }", "title": "" }, { "docid": "1212613e6b6cbcd3c0f90582ddc35680", "score": "0.32727697", "text": "public function flagPrototypeCreateComments($id, $data = null)\n {\n list($response) = $this->flagPrototypeCreateCommentsWithHttpInfo($id, $data);\n return $response;\n }", "title": "" }, { "docid": "1fe63222ae211a28b32de1751a241efc", "score": "0.32726586", "text": "public function postOutboundContactlistfiltersPreviewWithHttpInfo($body)\n {\n $returnType = '\\PureCloudPlatform\\Client\\V2\\Model\\FilterPreviewResponse';\n $request = $this->postOutboundContactlistfiltersPreviewRequest($body);\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 '\\PureCloudPlatform\\Client\\V2\\Model\\FilterPreviewResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 401:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 403:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 413:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 415:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 429:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 500:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 503:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 504:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\PureCloudPlatform\\Client\\V2\\Model\\ErrorBody',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "100d9d7e9f5ee0b049984c714ac705cd", "score": "0.3266871", "text": "protected function deleteSlideSubshapesRequest(Requests\\DeleteSlideSubshapesRequest $request)\n {\n // verify the required parameter 'name' is set\n if ($request->name === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $name when calling deleteSlideSubshapes');\n }\n // verify the required parameter 'slide_index' is set\n if ($request->slideIndex === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $slideIndex when calling deleteSlideSubshapes');\n }\n\n $resourcePath = '/slides/{name}/slides/{slideIndex}/shapes/{path}';\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n\n // query params\n if ($request->shapes !== null) {\n $queryParams['shapes'] = ObjectSerializer::toQueryValue($request->shapes);\n }\n // query params\n if ($request->password !== null) {\n $queryParams['password'] = ObjectSerializer::toQueryValue($request->password);\n }\n // query params\n if ($request->folder !== null) {\n $queryParams['folder'] = ObjectSerializer::toQueryValue($request->folder);\n }\n // query params\n if ($request->storage !== null) {\n $queryParams['storage'] = ObjectSerializer::toQueryValue($request->storage);\n }\n\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"name\", $request->name);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"slideIndex\", $request->slideIndex);\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"path\", $request->path);\n $this->headerSelector->selectHeaders(\n $headerParams,\n ['application/json'],\n ['application/json']);\n\n return $this->createRequest($resourcePath, $queryParams, $headerParams, $httpBody, 'DELETE');\n }", "title": "" }, { "docid": "d083da56c0c185d1e4d082b5fd025703", "score": "0.32629347", "text": "public function destroy(Request $request)\n {\n $p = Product::where('id', $request->id)->first();\n if($p){\n if($p->product_type == 'variable'){\n Product::where('product_sku', $p->product_sku)->delete();\n }\n else{\n Product::destroy($request->id);\n }\n return response()->json('Product Deleted', 200); \n }\n return response()->json('Invalid Data', 422);\n }", "title": "" } ]
5696cd76afe580aa4a1b978055e8dbb1
Register our REST Server
[ { "docid": "ed2e8013f96c62f6ece70a4bc4c59581", "score": "0.57263976", "text": "public function hook_rest_server(){\n $_get_settings = wspra_get_settings();\n //print_R($_get_settings);\n $_get_settings = wspra_get_settings('wpsr_set_enb_api');\n if($_get_settings == 1 ){\n add_action( 'rest_api_init', 'register_routes' );\n }\n \n }", "title": "" } ]
[ { "docid": "4883b5c73db6b181b60ff377f5da95f5", "score": "0.68714356", "text": "public function register_rest_routes() {\n\t\t$schemas = new SchemaController();\n\t\t$routes = new RoutesController( $schemas );\n\t\t$routes->register_routes();\n\t}", "title": "" }, { "docid": "a2edfb9962bef26b78654c148cd3fc94", "score": "0.6648508", "text": "public function register() {\n\t\tregister_rest_route(\n\t\t\tself::REST_BASE,\n\t\t\tself::ENDPOINT . '(?:/(?P<id>\\d+))?',\n\t\t\t[\n\t\t\t\t'methods' => [ 'GET' ],\n\t\t\t\t'callback' => [ $this, 'get' ],\n\t\t\t\t'permission_callback' => function () {\n\t\t\t\t\treturn current_user_can( 'edit_posts' );\n\t\t\t\t},\n\t\t\t]\n\t\t);\n\t\tregister_rest_field(\n\t\t\t'product',\n\t\t\t'meta',\n\t\t\t[\n\t\t\t\t'get_callback' => [ $this, 'return_customize_review' ],\n\t\t\t]\n\t\t);\n\t}", "title": "" }, { "docid": "937c352232d45270b913bb09c0bcc049", "score": "0.66452754", "text": "public function registerResource();", "title": "" }, { "docid": "66d7aa2ba9f166081f4a68b12ca9e40f", "score": "0.6598865", "text": "public function pod_restful_server(){\n add_action( 'rest_api_init', array( $this, 'pod_routes' ) );\n }", "title": "" }, { "docid": "482fd123a84c05a0a40842ba8dec1dc0", "score": "0.6598558", "text": "public function register_routes() {\n\t\tforeach ( $this->routes as $route ) {\n\t\t\tregister_rest_route(\n\t\t\t\t$route->get_namespace(),\n\t\t\t\t$route->get_path(),\n\t\t\t\t$route->get_args()\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "e41ffaa0445134ef57a815a0785549ac", "score": "0.6557074", "text": "public function register_routes() {\n\t\tregister_rest_route(\n\t\t\t$this->get_namespace(),\n\t\t\t'/' . $this->rest_base,\n\t\t\t[\n\t\t\t\t[\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'get_settings_data' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'admin_permissions_check' ),\n\t\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t\t'callback' => array( $this, 'update_items' ),\n\t\t\t\t\t'args' => $this->get_endpoint_args_for_item_schema( WP_REST_Server::EDITABLE ),\n\t\t\t\t\t'permission_callback' => array( $this, 'admin_permissions_check' ),\n\t\t\t\t],\n\t\t\t\t'schema' => array( $this, 'get_item_schema' ),\n\t\t\t]\n\t\t);\n\t}", "title": "" }, { "docid": "17c78f7348c5ba9b4aa1e2d98595151a", "score": "0.6480567", "text": "public function register_routes() {\n register_rest_route(\n $this->namespace, '/' . $this->base, [\n\t\t\t\t[\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => [ $this, 'get_logs' ],\n\t\t\t\t\t'permission_callback' => [ $this, 'check_permission' ],\n\t\t\t\t],\n\t\t\t]\n );\n }", "title": "" }, { "docid": "4c9900840c2b6014763ab905b06ae471", "score": "0.64502746", "text": "public function onRestInit()\n {\n register_rest_route(\"auditor/v1\", '/event', [\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => [$this, 'get'],\n 'permission_callback' => $this->hasPermission('manage_options')\n ]);\n\n register_rest_route(\"auditor/v1\", '/event', [\n 'methods' => WP_REST_Server::CREATABLE,\n 'callback' => [$this, 'post'],\n 'permission_callback' => $this->hasPermission('manage_options')\n ]);\n }", "title": "" }, { "docid": "a09c783ab4a6ecf74973dc0a597fc05c", "score": "0.6436615", "text": "public function register_routes() {\n\t\tif ( get_option( WP_Site_Monitor::OPTION_NAMES['wp_version'], true ) ) {\n\t\t\tregister_rest_route(\n\t\t\t\t$this->namespace, '/wp-version', array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t\t'callback' => array( $this, 'get_wp_version' ),\n\t\t\t\t\t\t'permission_callback' => array( $this, 'check_permissions' ),\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\tif ( get_option( WP_Site_Monitor::OPTION_NAMES['plugins'], true ) ) {\n\t\t\tregister_rest_route(\n\t\t\t\t$this->namespace, '/plugins', array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t\t'callback' => array( $this, 'get_plugins' ),\n\t\t\t\t\t\t'permission_callback' => array( $this, 'check_permissions' ),\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "e0ecc8319fea832e1c1e4e47c395a929", "score": "0.6421788", "text": "public function register_rest_routes() {\n foreach ( $this->get_rest_namespaces() as $namespace => $controllers ) {\n foreach ( $controllers as $controller_name => $controller_class ) {\n $this->controllers[ $namespace ][ $controller_name ] = new $controller_class();\n $this->controllers[ $namespace ][ $controller_name ]->register_routes();\n }\n }\n }", "title": "" }, { "docid": "1b98457de7f3ece0fa104e50574353bd", "score": "0.64065695", "text": "public function register() {\n\t\tadd_action( 'rest_api_init', function() {\n\t\t\tregister_rest_route( 'v1', 'contact', array(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => \\WP_REST_Server::CREATABLE,\n\t\t\t\t\t'callback' => array( $this, 'send_email' )\n\t\t\t\t)\n\t\t\t) );\n\t\t} );\n\t}", "title": "" }, { "docid": "b6a9e0a74fe2a35fc9c936527b7696ed", "score": "0.6395323", "text": "public function register_rest_api_endpoint(): void {\n\n\t\t$this->_rest_controller = new WC_Customer_Profile_Pictures_REST_Controller();\n\t\t$this->_rest_controller->register_routes();\n\n\t}", "title": "" }, { "docid": "8e6ce432694cedc7d6fb2835df86cf44", "score": "0.63951063", "text": "public function register_routes() {\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_items' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_items_permissions_check' ),\n\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::CREATABLE,\n\t\t\t\t'callback' => array( $this, 'create_item' ),\n\t\t\t\t'permission_callback' => array( $this, 'create_item_permissions_check' ),\n\t\t\t\t'args' => $this->get_endpoint_args_for_item_schema( WP_REST_Server::CREATABLE ),\n\t\t\t),\n\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t) );\n\t}", "title": "" }, { "docid": "4c8409315c5855bc13cfc7e72789ab91", "score": "0.6386248", "text": "public function register_routes() {\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t$this->rest_base,\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'get_search_results' ),\n\t\t\t\t\t'permission_callback' => 'is_user_logged_in',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "ae6270e74843c6f04bd4f4f77bcfbaed", "score": "0.6358031", "text": "public function rest_api_init() {\n\t\t$this->rest_api = new RegenerateThumbnails_REST_Controller();\n\t\t$this->rest_api->register_routes();\n\t\t$this->rest_api->register_filters();\n\t}", "title": "" }, { "docid": "fc9eb0a62a3adbe09ad2dbf1910d05f5", "score": "0.6334721", "text": "public function registerApiRest()\n {\n return parent::registerApiRest();\n }", "title": "" }, { "docid": "d4b0fd10a88db5b6a0c813c83aa1dcd1", "score": "0.6320108", "text": "public function register_routes() {\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_posts' ),\n\t\t\t)\n\t\t) );\n\t}", "title": "" }, { "docid": "dcb21c07dc1232b0d4ec5e7c3ade90c2", "score": "0.63118833", "text": "public static function api_register_data() {\n\t\tif ( function_exists( 'register_rest_field' ) ) {\n\t\t\tregister_rest_route( 'wp-recipe-maker/v1', '/manage/revision', array(\n\t\t\t\t'callback' => array( __CLASS__, 'api_manage_revisions' ),\n\t\t\t\t'methods' => 'POST',\n\t\t\t\t'permission_callback' => array( __CLASS__, 'api_required_permissions' ),\n\t\t\t) );\n\t\t}\n\t}", "title": "" }, { "docid": "56b848461392417fde97cf8c40ea6538", "score": "0.63099515", "text": "public function register_routes() {\n register_rest_route( $this->get_namespace(), 'user/(?P<id>\\d+)', array(\n 'methods' => 'POST',\n 'callback' => [$this, 'update_user']\n ));\n register_rest_route( $this->get_namespace(), 'user/(?P<id>\\d+)/intersect', array(\n 'methods' => 'GET',\n 'callback' => [$this, 'get_intersected']\n ));\n }", "title": "" }, { "docid": "ddf3500dfe6eabbdfffc8fbce6953b9e", "score": "0.62913406", "text": "function universityLikeRoutes(){\n //register 2 new routes\n //this is for post method i.e this is responsible for POST https type request\n register_rest_route('university/v1', 'manageLike', array(\n 'methods' => 'POST',\n 'callback' => 'createLike'\n ));\n\n //this is for delete method i.e this is responsible for DELETE https type request\n register_rest_route('university/v1', 'manageLike', array(\n 'methods' => 'DELETE',\n 'callback' => 'deleteLike' \n ));\n}", "title": "" }, { "docid": "ed18e8898cc758da5aa1a48ba2e7b4ab", "score": "0.62497646", "text": "public function _initRest(){\n $frontController = Zend_Controller_Front::getInstance();\n $restRoute = new Zend_Rest_Route($frontController, array(), array('api' => array('objects', 'status')));\n $frontController->getRouter()->addRoute('rest', $restRoute);\n $frontController->setRequest(new REST_Request);\n $frontController->setResponse(new REST_Response);\n $router = $frontController->getRouter();\n $config = new Zend_Config_Ini(APPLICATION_PATH . '/config/routes.ini', 'production');\n $router->addConfig($config, 'routes');\n }", "title": "" }, { "docid": "c0fac33e057a3421b602edbcf7d2c5b7", "score": "0.6241909", "text": "public function register_routes() {\n\n\t\tregister_rest_route(\n\t\t\t$this->namespace, \"/{$this->rest_base}\", [\n\t\t\t\t[\n\t\t\t\t\t'methods' => \\WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => [ $this, 'get_items' ],\n\t\t\t\t\t'permission_callback' => [ $this, 'get_items_permissions_check' ],\n\t\t\t\t],\n\t\t\t\t'schema' => [ $this, 'get_public_item_schema' ],\n\t\t\t]\n\t\t);\n\n\t\tregister_rest_route(\n\t\t\t$this->namespace, \"/{$this->rest_base}/(?P<id>[\\w-]+)\", [\n\t\t\t\t'args' => [\n\t\t\t\t\t'id' => [\n\t\t\t\t\t\t'description' => __( 'Unique identifier for the resource.', 'woocommerce' ),\n\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'methods' => \\WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => [ $this, 'get_item' ],\n\t\t\t\t\t'permission_callback' => [ $this, 'get_items_permissions_check' ],\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'methods' => \\WP_REST_Server::EDITABLE,\n\t\t\t\t\t'callback' => [ $this, 'update_item' ],\n\t\t\t\t\t'permission_callback' => [ $this, 'update_item_permissions_check' ],\n\t\t\t\t\t'args' => $this->get_endpoint_args_for_item_schema( \\WP_REST_Server::EDITABLE ),\n\t\t\t\t],\n\t\t\t\t'schema' => [ $this, 'get_public_item_schema' ],\n\t\t\t]\n\t\t);\n\t}", "title": "" }, { "docid": "c76896d0d52acb72969f2f657dfa8446", "score": "0.6214431", "text": "public function register_routes()\n {\n register_rest_route($this->namespace, '/' . $this->rest_base, array(\n array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array($this, 'get_items'),\n 'permission_callback' => array($this, 'get_items_permissions_check'),\n 'args' => $this->get_collection_params(),\n ),\n ));\n }", "title": "" }, { "docid": "aa55dc11f8f546484feca12dff3a41ab", "score": "0.61924756", "text": "public static function api_register_data() {\n\t\tif ( function_exists( 'register_rest_field' ) ) { // Prevent issue with Jetpack.\n\t\t\tregister_rest_route( 'wp-recipe-maker/v1', '/nutrition/matches', array(\n\t\t\t\t'callback' => array( __CLASS__, 'api_get_matches' ),\n\t\t\t\t'methods' => 'POST',\n\t\t\t\t'permission_callback' => array( __CLASS__, 'api_required_permissions' ),\n\t\t\t));\n\t\t\tregister_rest_route( 'wp-recipe-maker/v1', '/nutrition/matches/options', array(\n\t\t\t\t'callback' => array( __CLASS__, 'api_get_matches_options' ),\n\t\t\t\t'methods' => 'POST',\n\t\t\t\t'permission_callback' => array( __CLASS__, 'api_required_permissions' ),\n\t\t\t));\n\t\t}\n\t}", "title": "" }, { "docid": "3ea14245153494f35883b1b9fa5c64f2", "score": "0.6188196", "text": "function rest_routes() {\n\t\tregister_rest_route( 'sfp-live-search/v1', '/search', array(\n\t\t\t'methods' => [ 'POST', 'GET' ],\n\t\t\t'callback' => array( $this, 'search' ),\n\t\t) );\n\n\t}", "title": "" }, { "docid": "9996d72b1ce2e1b83a80f811e2159a4e", "score": "0.61708045", "text": "public static function init()\n {\n $cur_file_path = plugin_dir_path(__FILE__);\n include_once($cur_file_path . \"../includes/sun-backend-constants.php\");\n\n register_rest_route(PLUGIN_ENDPOINT . '/' . PRODUCTION_VERSION, '/featured/(?P<category>[A-Za-z]+)', array(\n 'methods' => 'GET',\n 'callback' => 'SunAppExtension_FeaturedEndpoint::get_featured_in_category'\n ));\n\n register_rest_route(PLUGIN_ENDPOINT . '/' . PRODUCTION_VERSION, '/featured', array(\n 'methods' => 'GET',\n 'callback' => 'SunAppExtension_FeaturedEndpoint::get_featured_home_post'\n ));\n }", "title": "" }, { "docid": "a04daddec6ae41169e43cfd20f202b69", "score": "0.6149497", "text": "public function register_api_endpoints() {\n\n\t\tregister_rest_route( 'food-scout/v1', '/restaurants', array(\n\t\t\t'methods' => 'GET',\n\t\t\t'callback' => [ $this, 'get_restaurants_via_api' ],\n\t\t) );\n\n\t\tregister_rest_route( 'food-scout/v1', '/food', array(\n\t\t\t'methods' => 'GET',\n\t\t\t'callback' => [ $this, 'get_food_via_api' ],\n\t\t) );\n\n\t\tregister_rest_route( 'food-scout/v1', '/taste', array(\n\t\t\t'methods' => 'GET',\n\t\t\t'callback' => [ $this, 'get_taste_via_api' ],\n\t\t) );\n\n\t\tregister_rest_route( 'food-scout/v1', '/locations', array(\n\t\t\t'methods' => 'GET',\n\t\t\t'callback' => [ $this, 'get_locations_via_api' ],\n\t\t) );\n\n\t\tregister_rest_route( 'food-scout/v1', '/specials', array(\n\t\t\t'methods' => 'GET',\n\t\t\t'callback' => [ $this, 'get_specials_via_api' ],\n\t\t) );\n\t}", "title": "" }, { "docid": "ea2d506001191ce3497bbb3578028712", "score": "0.6147435", "text": "public function register_routes() {\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/' . $this->rest_base,\n\t\t\t[\n\t\t\t\t[\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => [ $this, 'get_items' ],\n\t\t\t\t\t'permission_callback' => [ $this, 'get_items_permissions_check' ],\n\t\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t\t],\n\t\t\t\t'schema' => [ $this, 'get_public_item_schema' ],\n\t\t\t]\n\t\t);\n\t}", "title": "" }, { "docid": "f26c3e1c35e184c8cb2bcb734ee5bead", "score": "0.6141884", "text": "public function register_routes() {\n\t\t$version = '1';\n\t\t$namespace = 'edc/v' . $version;\n\t\t$ep = 'now';\n register_rest_route( $namespace, '/' . $ep , array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_now' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_now_permissions_check' )\n\t\t\t),\n\t\t) );\n\t}", "title": "" }, { "docid": "e768e03881a96ba35f450d980afaa6e5", "score": "0.61069924", "text": "public function register_routes() {\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_items' ),\n\t\t\t\t// 'permission_callback' => array( $this, 'get_items_permissions_check' ),\n\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t),\n\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<id>[\\d]+)', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_item' ),\n\t\t\t\t// 'permission_callback' => array( $this, 'get_item_permissions_check' ),\n\t\t\t\t'args' => array(\n\t\t\t\t\t'context' => $this->get_context_param( array( 'default' => 'view' ) ),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t) );\n\t}", "title": "" }, { "docid": "0b3b76f75884bb281f52dada9fc19f42", "score": "0.61043566", "text": "function sl_register_routes() {\n\t\n\t// Menus, Header, Footer\n \n register_rest_route( 'routes', '/main-menu/', array(\n 'methods' => 'GET',\n 'callback' => 'main_menu'\n ));\n \n register_rest_route( 'routes', '/footer-info/', array(\n 'methods' => 'GET',\n 'callback' => 'footer_info'\n ));\n \n // Pages\n \n register_rest_route( 'routes', '/home/', array(\n 'methods' => 'GET',\n 'callback' => 'page_home'\n ));\n \n register_rest_route( 'routes', '/work/', array(\n 'methods' => 'GET',\n 'callback' => 'page_work'\n ));\n \n register_rest_route( 'routes', '/work/(?P<slug>[-\\w]+)', array(\n 'methods' => 'GET',\n 'callback' => 'page_single_work',\n\t\t'args' => [\n\t\t\t'slug'\n\t\t]\n ));\n}", "title": "" }, { "docid": "d1631388e6ffa6b5f48ef2028d3d04ff", "score": "0.60950136", "text": "private static function register_rest_route($data){\n register_rest_route( $data['namespace'], $data['route'], $data['args'] );\n }", "title": "" }, { "docid": "c0b746d68aa948dfe005888a0b286ee3", "score": "0.6092453", "text": "public function register_routes() {\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/' . $this->rest_base . '/patterns',\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'get_items' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'get_items_permissions_check' ),\n\t\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t\t),\n\t\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "dd2b191c3848578bd2fd63128670290e", "score": "0.607005", "text": "public function register_routes() {\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_profiles' ),\n\t\t\t\t'permission_callback' => array( $this, 'manage_profiles_permission_callback' ),\n\t\t\t\t'args' => array( 'fields' => array( 'validate_callback' => array( $this, 'validate_profile_fields' ) ),\n\t\t\t\t\t\t\t\t 'orderby' => array( 'validate_callback' => array( $this, 'validate_profile_fields' ) ),\n\t\t\t\t\t\t\t\t 'page' => array( 'validate_callback' => array( $this, 'validate_numeric_field' ) ),\n\t\t\t\t\t\t\t\t 'per_page' => array( 'validate_callback' => array( $this, 'validate_numeric_field' ) ) )\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::CREATABLE,\n\t\t\t\t'callback' => array( $this, 'create_profile' ),\n\t\t\t\t'permission_callback' => array( $this, 'manage_profiles_permission_callback' )\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<id>[\\d]+)', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_profile' ),\n\t\t\t\t'permission_callback' => array( $this, 'manage_profiles_permission_callback' ),\n\t\t\t\t'args' => array( 'fields' => array( 'validate_callback' => array( $this, 'validate_profile_fields' ) ) )\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => array( $this, 'update_profile' ),\n\t\t\t\t'permission_callback' => array( $this, 'manage_profiles_permission_callback' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::DELETABLE,\n\t\t\t\t'callback' => array( $this, 'delete_profile' ),\n\t\t\t\t'permission_callback' => array( $this, 'manage_profiles_permission_callback' )\n\t\t\t)\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<id>[\\d]+)/duplicate', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => array( $this, 'duplicate_profile' ),\n\t\t\t\t'permission_callback' => array( $this, 'manage_profiles_permission_callback' )\n\t\t\t)\n\t\t) );\n\n\t}", "title": "" }, { "docid": "a4fe85e2565a5a92ee3d2d582b63b225", "score": "0.603475", "text": "public static function api_register_data() {\n\t\tif ( function_exists( 'register_rest_field' ) ) {\n\t\t\tregister_rest_route( 'wp-recipe-maker/v1', '/manage/trash', array(\n\t\t\t\t'callback' => array( __CLASS__, 'api_manage_trash' ),\n\t\t\t\t'methods' => 'POST',\n\t\t\t\t'permission_callback' => array( __CLASS__, 'api_required_permissions' ),\n\t\t\t) );\n\t\t}\n\t}", "title": "" }, { "docid": "103c925f6895a5df5d7642ffc4beb335", "score": "0.6021754", "text": "function ja_rest_api_register_routes() {\n\tregister_rest_route( 'ja/v1', '/search', array(\n\t\t'methods' => 'GET',\n\t\t'callback' => 'ja_rest_api_search',\n\t) );\n}", "title": "" }, { "docid": "d0f7bae38ba58151e56d27d72fda0d90", "score": "0.598173", "text": "public function register_routes() {\n\n\n\n\t\t\t//$this->token = '2tz745fwp6d7z1d50euboegms7pgvglbnn5biilw';\n\t\t\t\n\n\t\t\t$this->type = 'user';\n\t\t\tregister_rest_route( $this->namespace, '/'. $this->type .'/', array(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'get_user' ),\n\t\t\t\t\t'permission_callback' \t\t=> array( $this, 'get_user_permissions_check' ),\n\t\t\t\t),\n\t\t\t));\n\n\t\t\tregister_rest_route( $this->namespace, '/'. $this->type .'/profile/', array(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'get_user_profile' ),\n\t\t\t\t\t'permission_callback' \t\t=> array( $this, 'get_user_permissions_check' ),\n\t\t\t\t),\n\t\t\t));\n\n\t\t\tregister_rest_route( $this->namespace, '/'. $this->type .'/profile/(?P<tab>\\w+)?(&P<per_page>\\d+)?(&P<paged>\\d+)', array(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_user_profile_tab' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_user_permissions_check' ),\n\t\t\t\t'args' \t=> array(\n\t\t\t\t\t'context' => $this->get_context_param( array( 'default' => 'view' ) ),\n\t\t\t\t\t'id' \t=> array(\n\t\t\t\t\t\t'validate_callback' => function( $param, $request, $key ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn is_string( $param );\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t),\n\t\t\t\t),\n\n\t\t\t) );\n\n\t\t\tregister_rest_route( $this->namespace, '/'. $this->type .'/coursestatus/(?P<course>\\d+)?', array(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_course_status' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_user_course_status_permissions_check' ),\n\t\t\t\t'args' \t=> array(\n\t\t\t\t\t'context' => $this->get_context_param( array( 'default' => 'view' ) ),\n\t\t\t\t\t'id' \t=> array(\n\t\t\t\t\t\t'validate_callback' => function( $param, $request, $key ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn is_numeric( $param );\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t),\n\t\t\t\t),\n\n\t\t\t) );\n\t\t\tregister_rest_route( $this->namespace, '/'. $this->type .'/coursestatus/(?P<course>\\d+)/item/(?P<id>\\d+)?', array(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_course_status_item' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_user_course_status_permissions_check' ),\n\t\t\t\t'args' \t=> array(\n\t\t\t\t\t'context' => $this->get_context_param( array( 'default' => 'view' ) ),\n\t\t\t\t\t'id' \t=> array(\n\t\t\t\t\t\t'validate_callback' => function( $param, $request, $key ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn is_numeric( $param );\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t),\n\t\t\t\t),\n\n\t\t\t) );\t\n\t\t\tregister_rest_route( $this->namespace, '/'. $this->type .'/coursestatus/(?P<course>\\d+)/retake_quiz/(?P<id>\\d+)?', array(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'init_retake_quiz' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_user_course_status_permissions_check' ),\n\t\t\t\t'args' \t=> array(\n\t\t\t\t\t'context' => $this->get_context_param( array( 'default' => 'view' ) ),\n\t\t\t\t\t'id' \t=> array(\n\t\t\t\t\t\t'validate_callback' => function( $param, $request, $key ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn is_numeric( $param );\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t),\n\t\t\t\t),\n\n\t\t\t) );\n\n\t\t\tregister_rest_route( $this->namespace, '/'. $this->type .'/course/pmprochecklevel/(?P<course>\\d+)/level/(?P<level>\\d+)', array(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'pmpro_check_level' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_user_permissions_check' ),\n\t\t\t\t'args' \t=> array(\n\t\t\t\t\t'id' \t=> array(\n\t\t\t\t\t\t'validate_callback' => function( $param, $request, $key ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn is_numeric( $param );\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t),\n\t\t\t\t),\n\n\t\t\t) );\n\n\n\t\t\tregister_rest_route( $this->namespace, '/'. $this->type .'/course/mycredcheckpoints/(?P<course>\\d+)/points/(?P<points>\\d+)', array(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'mycred_check_points' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_user_permissions_check' ),\n\t\t\t\t'args' \t=> array(\n\t\t\t\t\t'id' \t=> array(\n\t\t\t\t\t\t'validate_callback' => function( $param, $request, $key ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn is_numeric( $param );\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t),\n\t\t\t\t),\n\n\t\t\t) );\n\t\t\t\n\t\t\tregister_rest_route( $this->namespace, '/'. $this->type .'/finishcourse', array(\n\t\t\t\t'methods' => 'POST',\n\t\t\t\t'callback' => array( $this, 'finish_course' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_user_course_permissions_check' ),\n\t\t\t) );\n\n\t\t\tregister_rest_route( $this->namespace, '/updatecourse/progress', array(\n\t\t\t\t'methods' => 'POST',\n\t\t\t\t'callback' => array( $this, 'update_course_progress' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_user_course_permissions_check' ),\n\t\t\t) );\n\n\t\t\t\n\t\t\tregister_rest_route( $this->namespace,'/'. $this->type .'/getreview/(?P<course>\\d+)', array(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_review' ),\n\t\t\t) );\n\n\t\t\tregister_rest_route( $this->namespace, '/updatecourse/addreview', array(\n\t\t\t\t'methods' => 'POST',\n\t\t\t\t'callback' => array( $this, 'add_review' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_user_course_permissions_check' ),\n\t\t\t) );\n\n\t\t\tregister_rest_route( $this->namespace, '/activity/add', array(\n\t\t\t\t'methods' => 'POST',\n\t\t\t\t'callback' => array( $this, 'add_activity' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_user_permissions_check' ),\n\t\t\t) );\n\n\t\t\tregister_rest_route( $this->namespace, '/'. $this->type .'/submitresult', array(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => 'POST',\n\t\t\t\t\t'callback' => array( $this, 'add_user_result' ),\n\t\t\t\t\t'permission_callback' \t\t=> array( $this, 'get_user_permissions_check' ),\n\t\t\t\t),\n\t\t\t));\n\t\t\t\n\t\t\tregister_rest_route( $this->namespace, '/'. $this->type .'/signin/', array(\n\t\t\t\t'methods' => 'POST',\n\t\t\t\t'callback' => array( $this, 'signin_user' ),\n\t\t\t\t'permission_callback' \t\t=> array( $this, 'get_verify_permissions_check' ),\n\t\t\t) );\n\n\t\t\tregister_rest_route( $this->namespace, '/'. $this->type .'/logout/', array(\n\t\t\t\t'methods' => 'POST',\n\t\t\t\t'callback' => array( $this, 'logout_user' ),\n\t\t\t\t'permission_callback' \t\t=> array( $this, 'get_user_permissions_check' ),\n\t\t\t) );\n\n\t\t\tregister_rest_route( $this->namespace, '/'. $this->type .'/register/', array(\n\t\t\t\t'methods' => 'POST',\n\t\t\t\t'callback' => array( $this, 'register_user' ),\n\t\t\t\t'permission_callback' \t\t=> array( $this, 'get_verify_permissions_check' ),\n\t\t\t) );\n\n\t\t\tregister_rest_route( $this->namespace, '/'. $this->type .'/verify/', array(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'verfify_user' ),\n\t\t\t\t),\n\t\t\t));\n\n\t\t\tregister_rest_route( $this->namespace, '/'. $this->type .'/activity/', array(\n\t\t\t\t'methods' => 'POST',\n\t\t\t\t'callback' => array( $this, 'add_activity' ),\n\t\t\t\t'permission_callback' \t\t=> array( $this, 'get_user_permissions_check' ),\n\t\t\t) );\n\n\t\t\tregister_rest_route( $this->namespace, '/'. $this->type .'/subscribe/', array(\n\t\t\t\t'methods' => 'POST',\n\t\t\t\t'callback' => array( $this, 'add_to_course' ),\n\t\t\t\t'permission_callback' \t\t=> array( $this, 'get_user_permissions_check' ),\n\t\t\t) );\n\t\t\tregister_rest_route( $this->namespace, '/'. $this->type .'/course/renew/', array(\n\t\t\t\t'methods' => 'POST',\n\t\t\t\t'callback' => array( $this, 'renew_course' ),\n\t\t\t\t'permission_callback' \t\t=> array( $this, 'get_user_permissions_check' ),\n\t\t\t) );\n\t\t\t/* Quiz Functions */\n\t\t\tregister_rest_route( $this->namespace, '/'. $this->type .'/quiz/start', array(\n\t\t\t\t'methods' => 'POST',\n\t\t\t\t'callback' => array( $this, 'start_quiz' ),\n\t\t\t\t'permission_callback' \t\t=> array( $this, 'get_user_permissions_check' ),\n\t\t\t) );\n\n\t\t\tregister_rest_route( $this->namespace, '/'. $this->type .'/quiz/submit', array(\n\t\t\t\t'methods' => 'POST',\n\t\t\t\t'callback' => array( $this, 'submit_quiz' ),\n\t\t\t\t'permission_callback' \t\t=> array( $this, 'get_user_permissions_check' ),\n\t\t\t) );\n\n\t\t\tregister_rest_route( $this->namespace, '/'. $this->type .'/profile/image/', array(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => 'POST',\n\t\t\t\t\t'callback' => array( $this, 'submit_quiz' ),\n\t\t\t\t\t'permission_callback' \t\t=> array( $this, 'get_user_permissions_check' ),\n\t\t\t\t),\n\t\t\t));\n\n\t\t\tregister_rest_route( $this->namespace, '/'. $this->type .'/profile/fields', array(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => 'POST',\n\t\t\t\t\t'callback' => array( $this, 'set_field' ),\n\t\t\t\t\t'permission_callback' \t\t=> array( $this, 'get_user_permissions_check' ),\n\t\t\t\t),\n\t\t\t));\n\n\t\t\tregister_rest_route( $this->namespace, '/'. $this->type .'/chart/course', array(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'get_course_chart' ),\n\t\t\t\t\t'permission_callback' \t\t=> array( $this, 'get_user_permissions_check' ),\n\t\t\t\t),\n\t\t\t));\n\n\t\t\tregister_rest_route( $this->namespace, '/'. $this->type .'/chart/quiz', array(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'get_quiz_chart' ),\n\t\t\t\t\t'permission_callback' \t\t=> array( $this, 'get_user_permissions_check' ),\n\t\t\t\t),\n\t\t\t));\n\n\t\t\t/*\n\t\t\tIn App Purchases\n\t\t\t */\n\t\t\tregister_rest_route( $this->namespace, '/'. $this->type .'/wallet', array(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'get_user_wallet' ),\n\t\t\t\t\t'permission_callback' \t\t=> array( $this, 'get_user_permissions_check' ),\n\t\t\t\t),\n\t\t\t));\n\t\t\tregister_rest_route( $this->namespace, '/'. $this->type .'/wallet/transactions', array(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'get_transactions' ),\n\t\t\t\t\t'permission_callback' \t\t=> array( $this, 'get_user_permissions_check' ),\n\t\t\t\t),\n\t\t\t));\n\t\t\tregister_rest_route( $this->namespace, '/'. $this->type .'/wallet/update', array(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => 'POST',\n\t\t\t\t\t'callback' => array( $this, 'update_wallet' ),\n\t\t\t\t\t'permission_callback' \t\t=> array( $this, 'get_user_permissions_check' ),\n\t\t\t\t),\n\t\t\t));\n\t\t}", "title": "" }, { "docid": "ae53326a38d1602438b51b1765211d3c", "score": "0.59815645", "text": "public function register_routes() {\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/' . $this->rest_base,\n\t\t\tarray(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => \\WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'get_items' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'get_items_permissions_check' ),\n\t\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => \\WP_REST_Server::CREATABLE,\n\t\t\t\t\t'callback' => array( $this, 'create_item' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'create_item_permissions_check' ),\n\t\t\t\t\t'args' => array_merge(\n\t\t\t\t\t\t$this->get_endpoint_args_for_item_schema( \\WP_REST_Server::CREATABLE ),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'product_id' => array(\n\t\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t\t'description' => __( 'Unique identifier for the product.', 'woocommerce-rest-api' ),\n\t\t\t\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'review' => array(\n\t\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t\t'description' => __( 'Review content.', 'woocommerce-rest-api' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'reviewer' => array(\n\t\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t\t'description' => __( 'Name of the reviewer.', 'woocommerce-rest-api' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'reviewer_email' => array(\n\t\t\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t\t'description' => __( 'Email of the reviewer.', 'woocommerce-rest-api' ),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t\t),\n\t\t\ttrue\n\t\t);\n\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/' . $this->rest_base . '/(?P<id>[\\d]+)',\n\t\t\tarray(\n\t\t\t\t'args' => array(\n\t\t\t\t\t'id' => array(\n\t\t\t\t\t\t'description' => __( 'Unique identifier for the resource.', 'woocommerce-rest-api' ),\n\t\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => \\WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'get_item' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'get_item_permissions_check' ),\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t'context' => $this->get_context_param( array( 'default' => 'view' ) ),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => \\WP_REST_Server::EDITABLE,\n\t\t\t\t\t'callback' => array( $this, 'update_item' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'update_item_permissions_check' ),\n\t\t\t\t\t'args' => $this->get_endpoint_args_for_item_schema( \\WP_REST_Server::EDITABLE ),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => \\WP_REST_Server::DELETABLE,\n\t\t\t\t\t'callback' => array( $this, 'delete_item' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'delete_item_permissions_check' ),\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t'force' => array(\n\t\t\t\t\t\t\t'default' => false,\n\t\t\t\t\t\t\t'type' => 'boolean',\n\t\t\t\t\t\t\t'description' => __( 'Whether to bypass trash and force deletion.', 'woocommerce-rest-api' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t\t),\n\t\t\ttrue\n\t\t);\n\n\t\t$this->register_batch_route();\n\t}", "title": "" }, { "docid": "9e97fa53d395dc73ca6700fdc1d34082", "score": "0.5967613", "text": "public function register_routes(){\n register_rest_route($this->namespace, '/' . $this->rest_base, array(\n array(\n 'methods' => \\WP_REST_Server::READABLE,\n 'callback' => array($this, 'get_items'),\n 'permission_callback' => array($this, 'get_items_permissions_check'),\n\t 'args' => $this->get_collection_params(),\n ),\n\t array(\n\t\t 'methods' => \\WP_REST_Server::CREATABLE,\n\t\t 'callback' => array($this, 'create_item'),\n\t\t 'permission_callback' => array($this, 'create_item_permissions_check'),\n\t\t 'args' => $this->get_endpoint_args_for_item_schema(\\WP_REST_Server::CREATABLE),\n\t ),\n ));\n register_rest_route($this->namespace, '/' . $this->rest_base . '/(?P<collection_id>[\\d]+)', array(\n array(\n 'methods' => \\WP_REST_Server::READABLE,\n 'callback' => array($this, 'get_item'),\n 'permission_callback' => array($this, 'get_item_permissions_check'),\n\t 'args' => $this->get_endpoint_args_for_item_schema(\\WP_REST_Server::READABLE),\n ),\n array(\n 'methods' => \\WP_REST_Server::EDITABLE,\n 'callback' => array($this, 'update_item'),\n 'permission_callback' => array($this, 'update_item_permissions_check'),\n 'args' => $this->get_endpoint_args_for_item_schema(\\WP_REST_Server::EDITABLE),\n ),\n array(\n 'methods' => \\WP_REST_Server::DELETABLE,\n 'callback' => array($this, 'delete_item'),\n 'permission_callback' => array($this, 'delete_item_permissions_check'),\n\t 'args' => array(\n\t \t'permanently' => array(\n\t\t 'description' => __('To delete permanently, you can pass \\'permanently\\' as true. By default this will only trash collection'),\n\t\t\t 'default' => 'false'\n\t\t ),\n\t )\n ),\n ));\n }", "title": "" }, { "docid": "44803b9fe955f8a1d3682e3ddea292d8", "score": "0.5953479", "text": "public function register () {}", "title": "" }, { "docid": "29b22b3777be661b5b91b656a9c75002", "score": "0.59427553", "text": "public function register_routes() {\n\n\t\t\t// Get items and create item routes.\n\t\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'get_items' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'get_items_permission_check' ),\n\t\t\t\t\t'args' => array(),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => WP_REST_Server::CREATABLE,\n\t\t\t\t\t'callback' => array( $this, 'create_item' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'create_item_permissions_check' ),\n\t\t\t\t\t'args' => $this->get_endpoint_args_for_item_schema( false ),\n\t\t\t\t),\n\t\t\t) );\n\n\t\t\t// Get, update and delete item routes.\n\t\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<id>[\\d]+)', array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t\t'callback' => array( $this, 'get_item' ),\n\t\t\t\t\t\t'permission_callback' => array( $this, 'get_item_permissions_check' ),\n\t\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t\t'context' => array(\n\t\t\t\t\t\t\t\t'default' => 'view',\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\tarray(\n\t\t\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t\t\t'callback' => array( $this, 'update_item' ),\n\t\t\t\t\t\t'permission_callback' => array( $this, 'update_item_permissions_check' ),\n\t\t\t\t\t\t'args' => $this->get_endpoint_args_for_item_schema( false ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'methods' => WP_REST_Server::DELETABLE,\n\t\t\t\t\t\t'callback' => array( $this, 'delete_item' ),\n\t\t\t\t\t\t'permission_callback' => array( $this, 'delete_item_permissions_check' ),\n\t\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t\t'force' => array(\n\t\t\t\t\t\t\t\t'default' => false,\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}", "title": "" }, { "docid": "c68ee82bbb813112c74db72a9256635a", "score": "0.59351677", "text": "public function register()\n {\n parent::register();\n\n $this->app->singleton(['server' => Contracts\\Factory::class], function ($app) {\n return new Server\\Factory($app, storage_path('server'));\n });\n }", "title": "" }, { "docid": "8b73a43f54ceb5a36cef7bf8dbd3da2f", "score": "0.5932807", "text": "public function init()\n {\n register_rest_route(\n $this->namespace,\n $this->base,\n array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array($this, 'get_items'),\n 'permission_callback' => array($this, 'get_items_permissions_check'),\n 'args' => $this->get_collection_params(),\n )\n );\n\n register_rest_route(\n $this->namespace,\n $this->base . '/statuses',\n array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array($this, 'get_orders_statuses'),\n 'permission_callback' => array($this, 'get_items_permissions_check'),\n 'args' => $this->get_collection_params(),\n )\n );\n\n register_rest_route(\n $this->namespace,\n $this->base . '/(?P<id>[\\d]+)',\n array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array($this, 'get_item'),\n 'permission_callback' => array($this, 'get_item_permissions_check'),\n 'args' => $this->get_collection_params(),\n )\n );\n\n register_rest_route(\n $this->namespace,\n $this->base . '/(?P<id>[\\d]+)',\n array(\n 'methods' => WP_REST_Server::EDITABLE,\n 'callback' => array($this, 'update_item'),\n 'permission_callback' => array($this, 'update_item_permissions_check'),\n 'args' => $this->get_endpoint_args_for_item_schema(WP_REST_Server::EDITABLE),\n )\n );\n }", "title": "" }, { "docid": "b5fb138e4094326396e41ea4db6fd6cc", "score": "0.592535", "text": "function give_gutenberg_register_rest_api() {\n register_rest_route( 'give-api/v1', '/form/(?P<id>\\d+)', array(\n 'methods' => 'GET',\n 'callback' => 'give_fetch_form_data',\n ));\n}", "title": "" }, { "docid": "d29d53a3a2460ede7b17a5e5193d5955", "score": "0.59182185", "text": "public function register();", "title": "" }, { "docid": "d29d53a3a2460ede7b17a5e5193d5955", "score": "0.59182185", "text": "public function register();", "title": "" }, { "docid": "d29d53a3a2460ede7b17a5e5193d5955", "score": "0.59182185", "text": "public function register();", "title": "" }, { "docid": "d29d53a3a2460ede7b17a5e5193d5955", "score": "0.59182185", "text": "public function register();", "title": "" }, { "docid": "932caa520f9bdee596a5a39be90e7c21", "score": "0.5907119", "text": "public function register(){}", "title": "" }, { "docid": "a4792afa5739b1fea0749d74f89bb213", "score": "0.5903035", "text": "protected function registerAuthorizationServer()\n {\n $this->app->singleton(AuthorizationServer::class, function () {\n return tap($this->makeAuthorizationServer(), function ($server) {\n $server->enableGrantType(\n $this->makeAuthCodeGrant(), Passport::tokensExpireIn()\n );\n\n $server->enableGrantType(\n $this->makeRefreshTokenGrant(), Passport::tokensExpireIn()\n );\n\n $server->enableGrantType(\n $this->makePasswordGrant(), Passport::tokensExpireIn()\n );\n\n $server->enableGrantType(\n new PersonalAccessGrant, new DateInterval('P1Y')\n );\n\n $server->enableGrantType(\n $this->makeCustomGrant(), Passport::tokensExpireIn()\n );\n\n $server->enableGrantType(\n new ClientCredentialsGrant, Passport::tokensExpireIn()\n );\n\n if (Passport::$implicitGrantEnabled) {\n $server->enableGrantType(\n $this->makeImplicitGrant(), Passport::tokensExpireIn()\n );\n }\n });\n });\n }", "title": "" }, { "docid": "590755999eacfe0e55740fc467043af1", "score": "0.5902086", "text": "public function register_routes() {\n\t\tregister_rest_route(\n\t\t\tself::ENDPOINT_NAMESPACE,\n\t\t\t'/' . self::ENDPOINT,\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => array( $this, 'callback' ),\n\t\t\t\t'permission_callback' => self::RETURN_TRUE\n\t\t\t)\n\t\t);\n\n\t\tregister_rest_route(\n\t\t\tself::ENDPOINT_NAMESPACE,\n\t\t\t'/' . self::PAYNOW_CHARGE_STATUS_ENDPOINT,\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'callback_paynow_payment_status' ),\n\t\t\t\t'permission_callback' => self::RETURN_TRUE\n\t\t\t)\n\t\t);\n\n\t\tregister_rest_route(\n\t\t\tself::ENDPOINT_NAMESPACE,\n\t\t\t'/' . self::OCBC_PAO_CALLBACK_ENDPOINT . '/(?P<order_id>\\d+)',\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'callback_ocbc_pao_callback' ),\n\t\t\t\t'permission_callback' => self::RETURN_TRUE\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "629ec9837124968dd2ed5196bbce17a3", "score": "0.5895272", "text": "public static function register() {}", "title": "" }, { "docid": "1f7a3b1d33fc27ada9aeb4f83d1ea01b", "score": "0.5892749", "text": "function setup() {\n\tregister_rest_route(\n\t\tREST_NAMESPACE,\n\t\t'/revisions/(?P<id>\\d+)',\n\t\t[\n\t\t\t'methods' => 'GET',\n\t\t\t'callback' => __NAMESPACE__ . '\\\\get_revisions_response',\n\t\t\t'permission_callback' => __NAMESPACE__ . '\\\\revisions_request_permissions_callback',\n\t\t\t'args' => [\n\t\t\t\t'id' => [\n\t\t\t\t\t'sanitize_callback' => 'absint',\n\t\t\t\t\t'validate_callback' => function ( $param, $request, $key ) {\n\t\t\t\t\t\treturn is_numeric( $param );\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\t'paged' => [\n\t\t\t\t\t'sanitize_callback' => 'absint',\n\t\t\t\t\t'validate_callback' => function ( $param, $request, $key ) {\n\t\t\t\t\t\treturn is_numeric( $param );\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\t'per_page' => [\n\t\t\t\t\t'sanitize_callback' => 'absint',\n\t\t\t\t\t'validate_callback' => function ( $param, $request, $key ) {\n\t\t\t\t\t\treturn is_numeric( $param );\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t],\n\t\t]\n\t);\n\n}", "title": "" }, { "docid": "8c96fef75382e7be09792126f5983b23", "score": "0.58763975", "text": "public function api_init( ) {\n\n register_rest_route( 'wp-rets-client/v1', '/systemCheck', array(\n 'methods' => 'GET',\n 'callback' => array( $this, 'rpc_system_check' ),\n ) );\n\n register_rest_route( 'wp-rets-client/v1', '/systemPing', array(\n 'methods' => 'GET',\n 'callback' => array( $this, 'rpc_system_ping' ),\n ) );\n\n register_rest_route( 'wp-rets-client/v1', '/deleteProperty', array(\n 'methods' => array( 'POST', 'GET' ),\n 'callback' => array( $this, 'rpc_delete_property' ),\n ) );\n\n register_rest_route( 'wp-rets-client/v1', '/trashProperty', array(\n 'methods' => array( 'POST', 'GET' ),\n 'callback' => array( $this, 'rpc_trash_property' ),\n ) );\n\n register_rest_route( 'wp-rets-client/v1', '/getPostIdByMlsId', array(\n 'methods' => array( 'POST', 'GET' ),\n 'callback' => array( $this, 'rpc_get_post_id_by_mls_id' ),\n ) );\n\n register_rest_route( 'wp-rets-client/v1', '/editProperty', array(\n 'methods' => 'POST',\n 'callback' => array( $this, 'rpc_edit_property' ),\n ) );\n\n register_rest_route( 'wp-rets-client/v1', '/updateProperty', array(\n 'methods' => 'POST',\n 'callback' => array( $this, 'rpc_update_property' ),\n ) );\n\n register_rest_route( 'wp-rets-client/v1', '/getProperty', array(\n 'methods' => array('GET', 'POST' ),\n 'callback' => array( $this, 'rpc_get_property' ),\n 'args' => array(\n 'ID' => array(\n 'default' => null,\n ),\n 'mls_number' => array(\n 'default' => null\n ),\n 'detail' => array(\n 'default' => true\n ),\n )\n ) );\n\n register_rest_route( 'wp-rets-client/v1', '/createProperty', array(\n 'methods' => 'POST',\n 'callback' => array( $this, 'rpc_create_property' ),\n ) );\n\n register_rest_route( 'wp-rets-client/v1', '/removeDuplicates', array(\n 'methods' => 'POST',\n 'callback' => array( $this, 'rpc_remove_duplicated_mls' ),\n ) );\n\n register_rest_route( 'wp-rets-client/v1', '/getHistogram', array(\n 'methods' => 'GET',\n 'callback' => array( $this, 'rpc_get_modified_histogram' ),\n ) );\n\n register_rest_route( 'wp-rets-client/v1', '/cleanupProcess', array(\n 'methods' => 'GET',\n 'callback' => array( $this, 'rpc_cleanup_process' ),\n ));\n\n register_rest_route( 'wp-rets-client/v1', '/scheduleStats', array(\n 'methods' => array( 'POST', 'GET' ),\n 'callback' => array( $this, 'rpc_get_schedule_stats' ),\n ));\n\n register_rest_route( 'wp-rets-client/v1', '/scheduleListings', array(\n 'methods' => array( 'POST', 'GET' ),\n 'args' => array(\n 'per_page' => array(\n 'default' => 10,\n 'sanitize_callback' => 'absint',\n ),\n 'offset' => array(\n 'default' => 0,\n 'sanitize_callback' => 'absint',\n ),\n 'unique' => array(\n 'default' => 'wpp::rets_pk'\n ),\n 'post_status' => array(\n 'default' => array( 'publish', 'private', 'future', 'draft' )\n ),\n 'schedule_id' => array(\n 'default' => false,\n 'sanitize_callback' => 'sanitize_title',\n ),\n 'order' => array(\n 'default' => 'asc',\n 'sanitize_callback' => 'sanitize_title',\n ),\n 'detail' => array(\n 'default' => false,\n 'sanitize_callback' => 'sanitize_title',\n ),\n 'slug' => array(\n 'default' => false,\n 'sanitize_callback' => 'sanitize_title',\n )\n ),\n 'callback' => array( $this, 'rpc_get_schedule_listings' ),\n ));\n\n register_rest_route( 'wp-rets-client/v1', '/insertMedia', array(\n 'methods' => 'POST',\n 'callback' => array( $this, 'rpc_insert_media' ),\n 'args' => array(\n 'post_id' => array(\n 'default' => null,\n ),\n 'mls_number' => array(\n 'default' => null\n ),\n '_media' => array(\n 'default' => null\n ),\n )\n\n ) );\n\n }", "title": "" }, { "docid": "884903b152d852c428c5206d953be85c", "score": "0.5862474", "text": "public function register() {\n\t\tif ( ! $this->vendor ) {\n\t\t\tthrow new VendorNotSetException;\n\t\t}\n\n\t\tif ( ! $this->version ) {\n\t\t\tthrow new VersionNotSetException;\n\t\t}\n\n\t\tforeach ( $this->endpoints as $endpoint ) {\n\t\t\tregister_rest_route(\n\t\t\t\t$this->get_namespace(),\n\t\t\t\t$endpoint->get_route(),\n\t\t\t\t$endpoint->get_options()\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "f7d13d70dddfa234013535936018cb5b", "score": "0.57964265", "text": "public function onRestAPIInit()\n\t{\n\t\tregister_rest_route(RestAPI::NS, '/markers(\\/\\d+)?/', array(\n\t\t\t'methods' => 'GET',\n\t\t\t'callback' => array($this, 'markers')\n\t\t));\n\t}", "title": "" }, { "docid": "ae7ec9f98b6d1db503b7c2cdd5052df1", "score": "0.5784273", "text": "public function register_routes() {\n $namespace = 'bom/v1';\n $path = 'departments';\n\n register_rest_route( $namespace, '/' . $path, [\n array(\n 'methods' => WP_REST_Server::READABLE,\n 'callback' => array( $this, 'get_items' ),\n 'permission_callback' => array( $this, 'get_items_permissions_check' )\n )\n ]); \n }", "title": "" }, { "docid": "dff396be18aa99fa947c68c897a0a905", "score": "0.5772124", "text": "public function register_routes() {\n\n\t\t$endpoints = array(\n\t\t\t'wpmoly\\rest\\endpoints\\Actors',\n\t\t\t'wpmoly\\rest\\endpoints\\Collections',\n\t\t\t'wpmoly\\rest\\endpoints\\Genres',\n\t\t\t'wpmoly\\rest\\endpoints\\Grids',\n\t\t\t'wpmoly\\rest\\endpoints\\Movies',\n\t\t\t'wpmoly\\rest\\endpoints\\Persons',\n\t\t\t'wpmoly\\rest\\endpoints\\Pages',\n\t\t\t'wpmoly\\rest\\endpoints\\Settings',\n\t\t\t'wpmoly\\rest\\endpoints\\TMDb',\n\t\t);\n\n\t\tforeach ( $endpoints as $class ) {\n\t\t\tif ( class_exists( $class ) ) {\n\t\t\t\t$controller = new $class;\n\t\t\t\t$controller->register_routes();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "ce3edf48275ff453cff255bae1d148bd", "score": "0.57674986", "text": "protected function registerEndpoints()\n\t{\n\t\t$this->app->bind('endpoints.packagist', function () {\n\t\t\treturn new Packagist;\n\t\t});\n\n\t\t$this->app->bind('endpoints.github_api', function ($app) {\n\t\t\t$credentials = $app['config']->get('services.github');\n\t\t\t$github = new Github;\n\t\t\t$github->authenticate($credentials['id'], $credentials['secret'], Github::AUTH_URL_CLIENT_ID);\n\n\t\t\treturn $github;\n\t\t});\n\n\t\t$this->app->bind('endpoints.guzzle', function ($app) {\n\t\t\treturn new Client('https://packagist.org');\n\t\t});\n\n\t\t$this->app->bind('endpoints.github', function ($app) {\n\t\t\t$github = new Client('https://github.com/');\n\t\t\t$github->setDefaultOption('headers', ['Accept' => 'application/json']);\n\n\t\t\treturn $github;\n\t\t});\n\n\t\t$this->app->bind('endpoints.bitbucket', function ($app) {\n\t\t\treturn new Bitbucket;\n\t\t});\n\n\t\t$this->app->bind('endpoints.travis', function ($app) {\n\t\t\treturn new Client('https://api.travis-ci.org/repos/');\n\t\t});\n\n\t\t$this->app->bind('endpoints.scrutinizer', function ($app) {\n\t\t\treturn new Client('https://scrutinizer-ci.com/api/repositories/g/');\n\t\t});\n\t}", "title": "" }, { "docid": "6405e43a1987d4c5f5acd6fe225abef1", "score": "0.5753207", "text": "public function register()\n {\n $this->app->singleton('microservs', function () {\n return $this->app->make(Helper::class);\n });\n\n foreach (config('microservs.servs') as $name => $cls) {\n $app = $this->app;\n\n if (@$cls['class']) {\n $app->singleton(\"microservs.api.$name\", function () use ($app, $cls) {\n return $app->make($cls['class']);\n });\n }\n\n $app->singleton(\"microservs.client.$name\", function () use ($app, $name, $cls) {\n if (@$cls['class']) {\n $host = @$cls['host'] ?: 'localhost';\n $client = new Client(\"http://$host/yar/$name\");\n $client->token = @app(\"microservs.api.$name\")->token ?: false;\n } else {\n $client = new Client($cls['url']);\n $client->token = @$cls['token'] ?: false;\n }\n\n\n $client->setOpt(YAR_OPT_PACKAGER, @$cls['packager'] ?: 'php');\n return $client;\n });\n }\n }", "title": "" }, { "docid": "10730ce717afbdb94140389c0e9ea30c", "score": "0.5752799", "text": "public function registerRouter() {\n $this->app->make(RouterRegister::class)->all();\n }", "title": "" }, { "docid": "71eee9eb7d25b573b687b02dbc47396c", "score": "0.5751585", "text": "public function register_routes() {\n\n\t\t\tregister_rest_route( $this->namespace, '/members', array(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'permission_callback' => array( $this, 'get_members_permissions' ),\n\t\t\t\t\t'callback' => array( $this, 'get_members' ),\n\t\t\t\t),\n\t\t\t));\n\t\t\tregister_rest_route( $this->namespace, '/member/(?P<user_id>\\d+)?', array(\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'get_member' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'get_members_permissions' ),\n\t\t\t\t\t'args' \t=> array(\n\t\t\t\t\t\t'user_id' \t=> array(\n\t\t\t\t\t\t\t'validate_callback' => function( $param, $request, $key ) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn is_numeric( $param );\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t));\n\n\t\t}", "title": "" }, { "docid": "327f96bb23a7899595ec3f0ef8435545", "score": "0.57257867", "text": "public function register_routes() {\n echo 'asdasdasdas';\n $_get_settings = wspra_get_settings();\n $my_namespace = esc_attr($_get_settings['wpsr_set_end_slug']);\n $my_version = esc_attr($_get_settings['wpsr_set_ver']);\n $namespace = $my_namespace . '/v'. $my_version;\n register_rest_route( $namespace, '/store_user/', array(\n 'methods' => 'GET',\n 'callback' => 'wcra_wcra_test_callback',\n // $secret_key = sanitize_text_field('stallioni');\n // $_authintication = wspra_authintication($secret_key);\n // if($_authintication['act'] == 'error'){\n // $error = wspra_response( wspra_http_response_code() , $_authintication['msg'] , $_authintication , $secret_key );\n // return $error;\n // }\n ) );\n\n // $get_points = wcra_endpoints_data('array');\n // if($get_points){\n // foreach ($get_points as $registered_base => $basedata) {\n // if($registered_base){\n // register_rest_route( $namespace, '/' . $registered_base, array( \n // array(\n // 'methods' => WP_REST_Server::ALLMETHODS,\n // 'callback' => function($request){\n // $parameters = $request->get_params();\n // $secret_key = sanitize_text_field($request->get_param( 'secret_key' ));\n // $_authintication = wcra_authintication($secret_key);\n\n // if($_authintication['act'] == 'error'){\n // $error = wspra_response( wcra_http_response_code() , $_authintication['msg'] , $_authintication , $secret_key );\n // return $error;\n // }\n\n // $_get_base = wcra_get_base( wcra_request_url());\n // if(wcra_get_basedata($_get_base)){\n // $_get_basedata = wcra_get_basedata($_get_base);\n // $callback = unserialize($_get_basedata->basedata);\n // $callback = $callback['callback'];\n // if(!empty($callback)){\n // if(has_filter($callback)){\n // $parameters = $request->get_params();\n // $parameters['requested_url'] = wcra_request_url();\n // return wspra_response( wcra_http_response_code(),'Response OK',$_authintication,apply_filters($callback, $parameters)); \n // }else{\n // return wspra_response(200 , 'Connection OK', $_authintication,$parameters);\n // }\n // }\n // }\n // return $response = wspra_response( 200 ,'Connection OK' , $_authintication , $parameters);\n // },\n // 'permission_callback' => function(){\n // return true;\n // }\n // ),\n // ) );\n\n // }\n // }\n // }\n\n \n }", "title": "" }, { "docid": "41e7468659617a29d90228f28907e61b", "score": "0.57168317", "text": "protected function initServer() {\n\n if ($this->authType === 'Basic') {\n $authBackend = new \\Baikal\\Core\\PDOBasicAuth($this->pdo, $this->authRealm);\n } else {\n $authBackend = new \\Sabre\\DAV\\Auth\\Backend\\PDO($this->pdo);\n $authBackend->setRealm($this->authRealm);\n }\n $principalBackend = new \\Sabre\\DAVACL\\PrincipalBackend\\PDO($this->pdo);\n\n $nodes = [\n new \\Sabre\\CalDAV\\Principal\\Collection($principalBackend)\n ];\n if ($this->enableCalDAV) {\n $calendarBackend = new \\Sabre\\CalDAV\\Backend\\PDO($this->pdo);\n $nodes[] = new \\Sabre\\CalDAV\\CalendarRoot($principalBackend, $calendarBackend);\n }\n if ($this->enableCardDAV) {\n $carddavBackend = new \\Sabre\\CardDAV\\Backend\\PDO($this->pdo);\n $nodes[] = new \\Sabre\\CardDAV\\AddressBookRoot($principalBackend, $carddavBackend);\n }\n\n $this->server = new \\Sabre\\DAV\\Server($nodes);\n $this->server->setBaseUri($this->baseUri);\n\n $this->server->addPlugin(new \\Sabre\\DAV\\Auth\\Plugin($authBackend, $this->authRealm));\n $this->server->addPlugin(new \\Sabre\\DAVACL\\Plugin());\n $this->server->addPlugin(new \\Sabre\\DAV\\Browser\\Plugin());\n\n $this->server->addPlugin(new \\Sabre\\DAV\\PropertyStorage\\Plugin(\n new \\Sabre\\DAV\\PropertyStorage\\Backend\\PDO($this->pdo)\n ));\n\n // WebDAV-Sync!\n $this->server->addPlugin(new \\Sabre\\DAV\\Sync\\Plugin());\n\n if ($this->enableCalDAV) {\n $this->server->addPlugin(new \\Sabre\\CalDAV\\Plugin());\n $this->server->addPlugin(new \\Sabre\\CalDAV\\ICSExportPlugin());\n $this->server->addPlugin(new \\Sabre\\CalDAV\\Schedule\\Plugin());\n // Scheduling and email delivery. See:\n // http://sabre.io/dav/scheduling/\n // https://groups.google.com/forum/#!searchin/sabredav-discuss/scheduling|sort:relevance/sabredav-discuss/CrGZXqw4sRw/vsHYq6FDcnkJ\n // This needs to be patched on the Baikal start up Server.php, NOT in the SabreDAV server.\n $this->server->addPlugin(new \\Sabre\\CalDAV\\Schedule\\IMipPlugin('[email protected]'));\n }\n if ($this->enableCardDAV) {\n $this->server->addPlugin(new \\Sabre\\CardDAV\\Plugin());\n $this->server->addPlugin(new \\Sabre\\CardDAV\\VCFExportPlugin());\n }\n\n }", "title": "" }, { "docid": "451f50bca65fe9d3e1981e4c296e9c4c", "score": "0.5716138", "text": "public function register_hooks(){\n\n\t\tadd_action('rest_api_init',array( $this , 'register_rest_endpoints'));\n\n\t}", "title": "" }, { "docid": "fcd0b140a6d2405ec7bb5c52b724e0df", "score": "0.56957126", "text": "public function register_routes() {\n\n\t\tregister_rest_route( $this->namespace, '/pages', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_items' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_items_permissions_check' ),\n\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t),\n\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/page/(?P<id>[\\d]+)', array(\n\t\t\t'args' => array(\n\t\t\t\t'id' => array(\n\t\t\t\t\t'description' => __( 'Unique identifier for the object.' ),\n\t\t\t\t\t'type' => 'integer',\n\t\t\t\t),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_item' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_item_permissions_check' ),\n\t\t\t\t'args' => $this->get_context_param( array( 'default' => 'view' ) ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::EDITABLE,\n\t\t\t\t'callback' => array( $this, 'update_item' ),\n\t\t\t\t'permission_callback' => array( $this, 'update_item_permissions_check' ),\n\t\t\t\t'args' => $this->get_endpoint_args_for_item_schema( WP_REST_Server::EDITABLE ),\n\t\t\t),\n\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t) );\n\t}", "title": "" }, { "docid": "11cbd6e619b74ac3ac5ae41435b7b561", "score": "0.56872684", "text": "protected static function register() { }", "title": "" }, { "docid": "fcac6e1880d2f7b6c458e36e967ee167", "score": "0.5685174", "text": "public function init() {\n add_action( 'rest_api_init', array( $this, 'register_rest_routes' ), 10 );\n }", "title": "" }, { "docid": "e36cb01c2ac18848cb0f4c491bb6b0b8", "score": "0.56694543", "text": "public function register()\n {\n $storage = new \\OAuth2\\Storage\\Memory([]);\n $server = new \\OAuth2\\Server($storage, [], []);\n\n \\Slim\\Environment::mock();\n\n $slim = new \\Slim\\Slim();\n\n Authorize::register($slim, $server);\n\n $route = $slim->router()->getNamedRoute('authorize');\n\n $this->assertInstanceOf('\\Slim\\Route', $route);\n $this->assertInstanceOf('\\Chadicus\\Slim\\OAuth2\\Routes\\Authorize', $route->getCallable());\n $this->assertSame([\\Slim\\Http\\Request::METHOD_GET, \\Slim\\Http\\Request::METHOD_POST], $route->getHttpMethods());\n }", "title": "" }, { "docid": "bf449aedafdfdaa197cb17d97b66e3e5", "score": "0.56607985", "text": "public function register(){ }", "title": "" }, { "docid": "d6512d1b15532a7404786b8bb2069366", "score": "0.5645111", "text": "public static function register()\n\t{\n\t\t// To add them use Router::register or new Router()->route method\n\t}", "title": "" }, { "docid": "3ec1c0163164326211816e13887ed3db", "score": "0.5638489", "text": "public function start()\n\t{\n\t\t\\Bitrix\\Replica\\Client\\HandlersManager::register(new UrlMetadataHandler());\n\t}", "title": "" }, { "docid": "a0408e21b5eab3bc1c056b0c8d3d56af", "score": "0.5628094", "text": "public function register_routes() {\n\t\tparent::register_routes();\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<id>[\\d]+)/orders', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_subscription_orders' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_items_permissions_check' ),\n\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t),\n\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base . '/statuses', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_statuses' ),\n\t\t\t),\n\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t) );\n\t}", "title": "" }, { "docid": "a0408e21b5eab3bc1c056b0c8d3d56af", "score": "0.5628094", "text": "public function register_routes() {\n\t\tparent::register_routes();\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base . '/(?P<id>[\\d]+)/orders', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_subscription_orders' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_items_permissions_check' ),\n\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t),\n\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t) );\n\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base . '/statuses', array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_statuses' ),\n\t\t\t),\n\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t) );\n\t}", "title": "" }, { "docid": "8a6381a75aa970cde8b2c8b7cb205e4c", "score": "0.56206137", "text": "public function register_routes() {\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/' . $this->rest_base,\n\t\t\tarray(\n\t\t\t\t'args' => array(\n\t\t\t\t\t'order_id' => array(\n\t\t\t\t\t\t'description' => __( 'The order ID.', 'woocommerce-rest-api' ),\n\t\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => \\WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'get_items' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'get_items_permissions_check' ),\n\t\t\t\t\t'args' => $this->get_collection_params(),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => \\WP_REST_Server::CREATABLE,\n\t\t\t\t\t'callback' => array( $this, 'create_item' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'create_item_permissions_check' ),\n\t\t\t\t\t'args' => array_merge(\n\t\t\t\t\t\t$this->get_endpoint_args_for_item_schema( \\WP_REST_Server::CREATABLE ),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'note' => array(\n\t\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t\t\t'description' => __( 'Order note content.', 'woocommerce-rest-api' ),\n\t\t\t\t\t\t\t\t'required' => 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),\n\t\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t\t),\n\t\t\ttrue\n\t\t);\n\n\t\tregister_rest_route(\n\t\t\t$this->namespace,\n\t\t\t'/' . $this->rest_base . '/(?P<id>[\\d]+)',\n\t\t\tarray(\n\t\t\t\t'args' => array(\n\t\t\t\t\t'id' => array(\n\t\t\t\t\t\t'description' => __( 'Unique identifier for the resource.', 'woocommerce-rest-api' ),\n\t\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t),\n\t\t\t\t\t'order_id' => array(\n\t\t\t\t\t\t'description' => __( 'The order ID.', 'woocommerce-rest-api' ),\n\t\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => \\WP_REST_Server::READABLE,\n\t\t\t\t\t'callback' => array( $this, 'get_item' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'get_item_permissions_check' ),\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t'context' => $this->get_context_param( array( 'default' => 'view' ) ),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'methods' => \\WP_REST_Server::DELETABLE,\n\t\t\t\t\t'callback' => array( $this, 'delete_item' ),\n\t\t\t\t\t'permission_callback' => array( $this, 'delete_item_permissions_check' ),\n\t\t\t\t\t'args' => array(\n\t\t\t\t\t\t'force' => array(\n\t\t\t\t\t\t\t'default' => false,\n\t\t\t\t\t\t\t'type' => 'boolean',\n\t\t\t\t\t\t\t'description' => __( 'Required to be true, as resource does not support trashing.', 'woocommerce-rest-api' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'schema' => array( $this, 'get_public_item_schema' ),\n\t\t\t),\n\t\t\ttrue\n\t\t);\n\t}", "title": "" }, { "docid": "8f1effc6455724124547593fa1451bfc", "score": "0.5615049", "text": "public function register()\n {\n $this->glideServer();\n $this->registerRoute();\n }", "title": "" }, { "docid": "f94ad6a521492a97b0e4f58f74cc4e63", "score": "0.5595791", "text": "public function register_routes()\n {\n $this->register_ping();\n $this->register_routes_for_queue();\n $this->register_survey_routes();\n $this->register_sync_stats();\n }", "title": "" }, { "docid": "c9c221871fb827fb007b0d8ba7656ff6", "score": "0.5591403", "text": "function prefix_register_events_calendar_routes() {\r\n register_rest_route( 'wp/v2', '/events_calendar', array(\r\n // By using this constant we ensure that when the WP_REST_Server changes our readable endpoints will work as intended.\r\n 'methods' => 'GET',\r\n // Here we register our callback. The callback is fired when this endpoint is matched by the WP_REST_Server class.\r\n 'callback' => 'events_calendar',\r\n ) );\r\n}", "title": "" }, { "docid": "d90c1313d53a499253bea2994916ce31", "score": "0.5585717", "text": "public function register()\n {\n // 扩展路由方法\n \\Route::macro('manage', function ($class, $name = '') {\n return (new \\Duxravel\\Core\\Util\\Route($class, $name));\n });\n\n // 注册组件\n $this->app->singleton(Build::class);\n\n // 编译包\n app(Build::class)->getBuild();\n\n }", "title": "" }, { "docid": "46023f96782d68f8a57f0aff5fa1d576", "score": "0.55841994", "text": "public function registerRoutes(): void;", "title": "" }, { "docid": "6ac9cc1340e8659c9b224478664ce311", "score": "0.5582049", "text": "public function register()\n\t\t{\n\t\t\t//DO REQUEST AND GET A REGISTRATIONHANDLE/ID BACK\n\t\t\t$request=$this->request;\n\t\t\t$response=$this->wsdl->register($request);\n\t\t\t$this->request[\"registrationHandle\"]=$response->registrationHandle;\n\t\t\treturn $response;\n\t\t}", "title": "" }, { "docid": "2cbf73efc15a1b4d7f0d6102e4195390", "score": "0.55804706", "text": "public function register() {\n\t\tadd_filter(\n\t\t\t'googlesitekit_rest_routes',\n\t\t\tfunction ( $rest_routes ) {\n\t\t\t\t$health_check_routes = $this->get_rest_routes();\n\n\t\t\t\treturn array_merge( $rest_routes, $health_check_routes );\n\t\t\t}\n\t\t);\n\t}", "title": "" }, { "docid": "a988ae76e0b56b307298fcfc0cdfd1bb", "score": "0.55788994", "text": "public function register() { }", "title": "" }, { "docid": "f3a2bd7bfa867881666a6fb51c3dc160", "score": "0.55739254", "text": "abstract public function register();", "title": "" }, { "docid": "f3a2bd7bfa867881666a6fb51c3dc160", "score": "0.55739254", "text": "abstract public function register();", "title": "" }, { "docid": "f3a2bd7bfa867881666a6fb51c3dc160", "score": "0.55739254", "text": "abstract public function register();", "title": "" }, { "docid": "f3a2bd7bfa867881666a6fb51c3dc160", "score": "0.55739254", "text": "abstract public function register();", "title": "" }, { "docid": "0ad02fcd1de3547ba35eb989e6af6cd9", "score": "0.55703944", "text": "public function __construct() {\n\t\tadd_action( 'rest_api_init', [ $this, 'register' ] );\n\t}", "title": "" }, { "docid": "a5a9eb84e27c189a4fd3f2d4695e5ede", "score": "0.5569917", "text": "public function _initServer(){\n //write http request info into server\n setCountInfo();\n }", "title": "" }, { "docid": "6ccf4975c721f810bcd06e18636abebc", "score": "0.5561414", "text": "protected function registerResources()\n {\n $this->loadViewsFrom(__DIR__ . '/../resources/views', 'planet');\n// $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'nova');\n// $this->loadJsonTranslationsFrom(resource_path('lang/vendor/nova'));\n//\n// if (Nova::runsMigrations()) {\n// $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n// }\n//\n// $this->registerRoutes();\n }", "title": "" }, { "docid": "5959d543e8c7f313213a0b9d7674d112", "score": "0.5550714", "text": "public function register()\n {\n $this->app->singleton('tus-server', function ($app) {\n \\TusPhp\\Config::set([\n 'file' => [\n 'dir' => '/tmp/',\n 'name' => 'tus_php.cache',\n ],\n ]);\n\n $server = new TusServer();\n\n $server->middleware()->add(TusAuthenticated::class);\n\n $server->setApiPath('/upload');\n return $server;\n });\n }", "title": "" }, { "docid": "c7553a630af97709f25d848c59a9891d", "score": "0.5546112", "text": "protected abstract function registerRoutes();", "title": "" }, { "docid": "5eec260a203b5d565017ee9b518a4690", "score": "0.5545286", "text": "public function register()\n {}", "title": "" }, { "docid": "e825ae56c38831bd0779c6aeb1573fd2", "score": "0.55431604", "text": "public function register(Box_App &$app)\n {\n $app->get('/example', 'get_index', array(), get_class($this));\n $app->get('/example/test', 'get_test', array(), get_class($this));\n $app->get('/example/user/:id', 'get_user', array('id'=>'[0-9]+'), get_class($this));\n $app->get('/example/api', 'get_api', array(), get_class($this));\n }", "title": "" }, { "docid": "85f642c754a827fefb51082075137d40", "score": "0.5541108", "text": "public function register(): void\n {\n $this->router->get(\"/endpoints\", EndpointsController::class);\n }", "title": "" }, { "docid": "7728d81e75d9a74359cb068600a54ad0", "score": "0.55393213", "text": "public function registerServer($prefix, RequestHandler $server)\n {\n $this->handlers[$prefix] = $server;\n }", "title": "" }, { "docid": "f612e245760cf8b751f7e16e6ad30dfb", "score": "0.5531283", "text": "public function register_routes() {\n\t\t$public_post_types = $this->post_type_helper->get_public_post_types();\n\n\t\tforeach ( $public_post_types as $post_type ) {\n\t\t\t$this->register_rest_fields( $post_type, 'for_post' );\n\t\t}\n\n\t\t$public_taxonomies = $this->taxonomy_helper->get_public_taxonomies();\n\n\t\tforeach ( $public_taxonomies as $taxonomy ) {\n\t\t\tif ( $taxonomy === 'post_tag' ) {\n\t\t\t\t$taxonomy = 'tag';\n\t\t\t}\n\t\t\t$this->register_rest_fields( $taxonomy, 'for_term' );\n\t\t}\n\n\t\t$this->register_rest_fields( 'user', 'for_author' );\n\t\t$this->register_rest_fields( 'type', 'for_post_type_archive' );\n\t}", "title": "" }, { "docid": "82d4d216b2862615f4ecdf5b0f901127", "score": "0.55245674", "text": "public function register()\n {\n\n // set api formatter\n $this->app->singleton(Response::class,function ($app){\n\n return new Response(config('sapi'));\n\n });\n\n }", "title": "" }, { "docid": "2260312108bfd4ad8f6de559adeab8cf", "score": "0.5522467", "text": "public function registerAuthorizer()\n {\n $this->app->bindShared('oauth2-server.authorizer', function ($app) {\n\n $config = $app['config']->get('oauth2');\n\n $limitClientsToGrants = $config['limit_clients_to_grants'];\n $limitClientsToScopes = $config['limit_clients_to_scopes'];\n\n // Authorization server\n $issuer = new AuthorizationServer();\n $issuer->setSessionStorage(new SessionStorage($app['db']));\n $issuer->setAccessTokenStorage(new AccessTokenStorage($app['db']));\n $issuer->setRefreshTokenStorage(new RefreshTokenStorage($app['db']));\n $issuer->setClientStorage(new ClientStorage($app['db'], $limitClientsToGrants));\n $issuer->setScopeStorage(new ScopeStorage($app['db'], $limitClientsToScopes, $limitClientsToGrants));\n $issuer->setAuthCodeStorage(new AuthCodeStorage($app['db']));\n $issuer->requireScopeParam($config['scope_param']);\n $issuer->setDefaultScope($config['default_scope']);\n $issuer->requireStateParam($config['state_param']);\n $issuer->setScopeDelimiter($config['scope_delimiter']);\n $issuer->setAccessTokenTTL($config['access_token_ttl']);\n\n // add the supported grant types to the authorization server\n foreach ($config['grant_types'] as $grantIdentifier => $grantParams) {\n $grant = new $grantParams['class'];\n $grant->setAccessTokenTTL($grantParams['access_token_ttl']);\n\n if (array_key_exists('callback', $grantParams)) {\n $grant->setVerifyCredentialsCallback($grantParams['callback']);\n }\n if (array_key_exists('auth_token_ttl', $grantParams)) {\n $grant->setAuthTokenTTL($grantParams['auth_token_ttl']);\n }\n if (array_key_exists('refresh_token_ttl', $grantParams)) {\n $grant->setRefreshTokenTTL($grantParams['refresh_token_ttl']);\n }\n $issuer->addGrantType($grant);\n }\n\n // Resource server\n $sessionStorage = new SessionStorage($app['db']);\n $accessTokenStorage = new AccessTokenStorage($app['db']);\n $clientStorage = new ClientStorage($app['db'], $limitClientsToGrants);\n $scopeStorage = new ScopeStorage($app['db'], $limitClientsToScopes, $limitClientsToGrants);\n\n $checker = new ResourceServer(\n $sessionStorage,\n $accessTokenStorage,\n $clientStorage,\n $scopeStorage\n );\n\n $authorizer = new Authorizer($issuer, $checker);\n $authorizer->setRequest($app['request']);\n $authorizer->setTokenType($app->make($config['token_type']));\n\n $app->refresh('request', $authorizer, 'setRequest');\n\n return $authorizer;\n });\n\n $this->app->bind('Rapiro\\OAuth2Server\\Authorizer', function($app)\n {\n return $app['oauth2-server.authorizer'];\n });\n }", "title": "" }, { "docid": "24aad456705f6ede01da14d92a7389b5", "score": "0.5518848", "text": "public function register() {\n //Register Blog API \n $this->registerBlog();\n }", "title": "" } ]
912311051755905af44f8901595ef631
Implementation of hook_validate This function validates a form prior to insert or update. If an error is detected, it sets the error using form_set_error() which takes the user back to the form to make corrections. This validation is being used for three activities: CASE A: Update a node that exists in both Drupal and Chado CASE B: Synchronizing a node from Chado to Drupal CASE C: Inserting a new node that exists in neither Drupal nor Chado
[ { "docid": "8405beb12f9644d149fef5c718e5b6e6", "score": "0.72562546", "text": "function chado_worm_order_form_validate($node, $form, &$form_state) {\n // We only want to validate when the node is saved.\n // Since this validate can be called on AJAX and Deletion of the node\n // we need to make this check to ensure queries are not executed\n // without the proper values.\n if(property_exists($node, \"op\") and $node->op != 'Save') {\n return;\n }\n\n // we are syncing if we do not have a node ID but we do have a worm_order_form_id. We\n // don't need to validate during syncing so just skip it.\n if (!property_exists($node, 'nid') and property_exists($node, 'worm_order_form_id') and $node->worm_order_form_id != 0) {\n return;\n }\n // be sure to always trim text fields\n $node->contact_name = property_exists($node, 'contact_name') ? trim($node->contact_name) : '';\n // Validating for an update. If the 'nid' property is present in the node then\n // this is an update and validation can be different for updates\n if (property_exists($node, 'nid')) {\n if(!valid_email_address($node->contact_email)){\n form_set_error('worm_order_form_type', t(\"The email address does not seem correct.\"));\n }\n $phone_ok = array();\n preg_match(\"/^([ +\\d\\-\\(\\)]+)$/\", $node->delivery_phone, $phone_ok);\n if (empty($phone_ok)){\n form_set_error('worm_order_form_type', t(\"The contact phone number does not seem correct.\"));\n }\n\n $node->worm_quantity = str_replace(',', '', $node->worm_quantity);\n if(!is_numeric($node->worm_quantity)){\n form_set_error('worm_order_form_type', t(\"The provided worm quantity does not seem correct.\"));\n }\n\n\n $account_ok = array();\n preg_match(\"/^([ +\\w\\d\\-\\(\\)]+)$/\", $node->fedex_account, $account_ok);\n if (empty($account_ok)){\n form_set_error('worm_order_form_type', t(\"The carrier account number does not seem correct.\"));\n }\n // make sure the worm_order_form type is an allowed term\n //$type_cv = tripal_get_default_cv('worm_order_form', 'type_id');\n //$type = tripal_get_cvterm(array(\n // 'name' => $node->worm_order_form_type,\n // 'cv_id' => $type_cv->cv_id,\n // ));\n // if (!$type) {\n // form_set_error('worm_order_form_type', t(\"The worm_order_form type is not a valid name from the Sequence Ontology.\"));\n // }\n\n // TODO: also we should check that the unique constraint is not invalidated\n // by changing either the type_id, organism_id or uniquename.\n }\n // Validating for an insert\n else {\n if(!valid_email_address($node->contact_email)){\n form_set_error('worm_order_form_type', t(\"The email address does not seem correct.\"));\n }\n $phone_ok = array();\n preg_match(\"/^([ +\\d\\-\\(\\)]+)$/\", $node->delivery_phone, $phone_ok);\n if (empty($phone_ok)){\n form_set_error('worm_order_form_type', t(\"The contact phone number does not seem correct.\"));\n }\n $account_ok = array();\n preg_match(\"/^([ +\\d\\-\\(\\)]+)$/\", $node->fedex_account, $account_ok);\n if (empty($account_ok)){\n form_set_error('worm_order_form_type', t(\"The carrier account number does not seem correct.\"));\n }\n\n $node->worm_quantity = str_replace(',', '', $node->worm_quantity);\n if(!is_numeric($node->worm_quantity)){\n form_set_error('worm_order_form_type', t(\"The provided worm quantity does not seem correct.\"));\n }\n // make sure the worm_order_form type is an allowed term\n //$type_cv = tripal_get_default_cv('worm_order_form', 'type_id');\n // $type = tripal_get_cvterm(array(\n // 'name' => $node->worm_order_form_type,\n // 'cv_id' => $type_cv->cv_id,\n // ));\n //if (!$type) {\n // form_set_error('worm_order_form_type', t(\"The worm_order_form type is not a valid name from the Sequence Ontology.\"));\n // }\n // TODO: also we should check that the unique constraint doesn't already exist\n }\n}", "title": "" } ]
[ { "docid": "99e112fc4f833412220841a445859223", "score": "0.6690871", "text": "function facebook_status_admin_validate($form, &$form_state) {\n}", "title": "" }, { "docid": "761e63c59b538ee17d13241864b9f77a", "score": "0.65062314", "text": "function thumbwhere_action_edit_form_validate(&$form, &$form_state) {\n \n //if (twCanDebug()) debug($form); \n //if (twCanDebug()) debug($form_state);\n\n\n // No validation for pk\n\n\n // Convert fk autocomplete for fk_contentingest\n $value = $form['fk_contentingest']['#value'];\n // If we have something, escape the auto-completion encoding.\n if (!empty($value)) { \n $value = entity_autocomplete_get_id($value);\n form_set_value($form['fk_contentingest'], $value,$form_state);\n }\n //if (twCanDebug()) debug($form['fk_contentingest']);\n if (twCanDebug()) debug('fk_contentingest = ' . $value);\n // Validate fk fk_contentingest\n\n\n // Convert fk autocomplete for fk_like\n $value = $form['fk_like']['#value'];\n // If we have something, escape the auto-completion encoding.\n if (!empty($value)) { \n $value = entity_autocomplete_get_id($value);\n form_set_value($form['fk_like'], $value,$form_state);\n }\n //if (twCanDebug()) debug($form['fk_like']);\n if (twCanDebug()) debug('fk_like = ' . $value);\n // Validate fk fk_like\n\n\n // Convert fk autocomplete for fk_follow\n $value = $form['fk_follow']['#value'];\n // If we have something, escape the auto-completion encoding.\n if (!empty($value)) { \n $value = entity_autocomplete_get_id($value);\n form_set_value($form['fk_follow'], $value,$form_state);\n }\n //if (twCanDebug()) debug($form['fk_follow']);\n if (twCanDebug()) debug('fk_follow = ' . $value);\n // Validate fk fk_follow\n\n\n // Convert fk autocomplete for fk_fan\n $value = $form['fk_fan']['#value'];\n // If we have something, escape the auto-completion encoding.\n if (!empty($value)) { \n $value = entity_autocomplete_get_id($value);\n form_set_value($form['fk_fan'], $value,$form_state);\n }\n //if (twCanDebug()) debug($form['fk_fan']);\n if (twCanDebug()) debug('fk_fan = ' . $value);\n // Validate fk fk_fan\n\n\n // Convert fk autocomplete for fk_share\n $value = $form['fk_share']['#value'];\n // If we have something, escape the auto-completion encoding.\n if (!empty($value)) { \n $value = entity_autocomplete_get_id($value);\n form_set_value($form['fk_share'], $value,$form_state);\n }\n //if (twCanDebug()) debug($form['fk_share']);\n if (twCanDebug()) debug('fk_share = ' . $value);\n // Validate fk fk_share\n\n\n // Convert fk autocomplete for fk_awardedtrophy\n $value = $form['fk_awardedtrophy']['#value'];\n // If we have something, escape the auto-completion encoding.\n if (!empty($value)) { \n $value = entity_autocomplete_get_id($value);\n form_set_value($form['fk_awardedtrophy'], $value,$form_state);\n }\n //if (twCanDebug()) debug($form['fk_awardedtrophy']);\n if (twCanDebug()) debug('fk_awardedtrophy = ' . $value);\n // Validate fk fk_awardedtrophy\n\n\n // Convert fk autocomplete for fk_mediaitemrating\n $value = $form['fk_mediaitemrating']['#value'];\n // If we have something, escape the auto-completion encoding.\n if (!empty($value)) { \n $value = entity_autocomplete_get_id($value);\n form_set_value($form['fk_mediaitemrating'], $value,$form_state);\n }\n //if (twCanDebug()) debug($form['fk_mediaitemrating']);\n if (twCanDebug()) debug('fk_mediaitemrating = ' . $value);\n // Validate fk fk_mediaitemrating\n\n\n // Convert fk autocomplete for fk_booking\n $value = $form['fk_booking']['#value'];\n // If we have something, escape the auto-completion encoding.\n if (!empty($value)) { \n $value = entity_autocomplete_get_id($value);\n form_set_value($form['fk_booking'], $value,$form_state);\n }\n //if (twCanDebug()) debug($form['fk_booking']);\n if (twCanDebug()) debug('fk_booking = ' . $value);\n // Validate fk fk_booking\n\n\n // Convert fk autocomplete for fk_checkin\n $value = $form['fk_checkin']['#value'];\n // If we have something, escape the auto-completion encoding.\n if (!empty($value)) { \n $value = entity_autocomplete_get_id($value);\n form_set_value($form['fk_checkin'], $value,$form_state);\n }\n //if (twCanDebug()) debug($form['fk_checkin']);\n if (twCanDebug()) debug('fk_checkin = ' . $value);\n // Validate fk fk_checkin\n\n\n // Convert fk autocomplete for fk_consume\n $value = $form['fk_consume']['#value'];\n // If we have something, escape the auto-completion encoding.\n if (!empty($value)) { \n $value = entity_autocomplete_get_id($value);\n form_set_value($form['fk_consume'], $value,$form_state);\n }\n //if (twCanDebug()) debug($form['fk_consume']);\n if (twCanDebug()) debug('fk_consume = ' . $value);\n // Validate fk fk_consume\n\n\n // Convert fk autocomplete for fk_produce\n $value = $form['fk_produce']['#value'];\n // If we have something, escape the auto-completion encoding.\n if (!empty($value)) { \n $value = entity_autocomplete_get_id($value);\n form_set_value($form['fk_produce'], $value,$form_state);\n }\n //if (twCanDebug()) debug($form['fk_produce']);\n if (twCanDebug()) debug('fk_produce = ' . $value);\n // Validate fk fk_produce\n\n\n // Convert fk autocomplete for fk_consumermember\n $value = $form['fk_consumermember']['#value'];\n // If we have something, escape the auto-completion encoding.\n if (!empty($value)) { \n $value = entity_autocomplete_get_id($value);\n form_set_value($form['fk_consumermember'], $value,$form_state);\n }\n //if (twCanDebug()) debug($form['fk_consumermember']);\n if (twCanDebug()) debug('fk_consumermember = ' . $value);\n // Validate fk fk_consumermember\n\n\n // Convert fk autocomplete for fk_producermember\n $value = $form['fk_producermember']['#value'];\n // If we have something, escape the auto-completion encoding.\n if (!empty($value)) { \n $value = entity_autocomplete_get_id($value);\n form_set_value($form['fk_producermember'], $value,$form_state);\n }\n //if (twCanDebug()) debug($form['fk_producermember']);\n if (twCanDebug()) debug('fk_producermember = ' . $value);\n // Validate fk fk_producermember\n\n\n \n\n //form_set_value( array('#parents' => array('array_key_parent', 'array_key_to_replace')) , $value, $form_state);\n\n \n \n $thumbwhere_action = $form_state['thumbwhere_action'];\n\n // Notify field widgets to validate their data.\n field_attach_form_validate('thumbwhere_action', $thumbwhere_action, $form, $form_state);\n \n \n \n}", "title": "" }, { "docid": "f997199e798790a3f989c6baaa2e3f82", "score": "0.6456884", "text": "function validateForm() {\n/*\n\t\tforeach ($PAGE_form as &$field) {\n\t\t\tvar_dump($field);\n\t\t}\n*/\n\t\tglobal $PAGE_form;\n\n\t\tforeach ($PAGE_form as &$field) {\n\n\t\t\t$thisId = \"\";\n\t\t\tif (isset($field[\"id\"]))\n\t\t\t\t$thisId = $field[\"id\"];\n\t\t\telse {\n\t\t\t\t$thisId = $field[\"label\"];\n\t\t\t\t$thisId = str_replace(' ','',$thisId);\n\t\t\t\t$thisId = str_replace(':','',$thisId);\n\t\t\t}\n\n\t\t\t$temp[\"content\"] = formGet(strtolower($thisId));\n\t\t\t$field[\"content\"] = $temp[\"content\"];\n\t\t\t//echo \"<p>\" . $field[\"content\"] . \"</p>\";\n\n\t\t\t// If set to use null, set null instead of empty string on this field.\n\t\t\tif (isset($field[\"null\"]))\n\t\t\t\tif ($field[\"null\"] && $field[\"content\"] == '')\n\t\t\t\t\t$field[\"content\"] = null;\n\n\t\t\tif (isset($field[\"errors\"]))\n\t\t\t\t$errors = $field[\"errors\"];\n\t\t\telse\n\t\t\t\t$errors = array();\n\n\t\t\t$content = $field[\"content\"];\n\n\t\t\t// Support for [MIN], [LABEL], etc inside the error messages.\n\t\t\tforeach ($errors as &$error)\n\t\t\t{\n\t\t\t\tif (isset($field[\"min\"]))\n\t\t\t\t\t$error = str_replace(\"[MIN]\",$field[\"min\"],$error);\n\t\t\t\tif (isset($field[\"max\"]))\n\t\t\t\t\t$error = str_replace(\"[MAX]\",$field[\"max\"],$error);\n\n\t\t\t\t$error = str_replace(\"[LABEL]\", str_replace(\":\",\"\",$field[\"label\"]), $error);\n\t\t\t\t$error = str_replace(\"[CONTENT]\",$field[\"content\"],$error);\n\t\t\t}\n\n\n\t\t\t// Check for \"empty\"-validation and if present push the empty-error.\n\t\t\tif ((isset($errors[\"min\"]) && isset($field[\"min\"]) )) {\n\t\t\t\tif (mb_strlen($content) < 1) {\n\t\t\t\t\tif ($errors[\"min\"] != '' && $field[\"min\"] > 0)\n\t\t\t\t\t\tpushError(\"<strong>\" . $field[\"label\"] . \"</strong> \" . $errors[\"min\"]);\n\t\t\t\t} elseif (mb_strlen($content) > 0 && mb_strlen($content) < $field[\"min\"]) {\n\t\t\t\t\tpushError(\"<strong>\" . $field[\"label\"] . \"</strong> \" . $errors[\"min\"]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isset($errors[\"max\"]) && isset($field[\"max\"])) {\n\t\t\t\tif (mb_strlen($content) > $field[\"max\"]) {\n\t\t\t\t\tpushError(\"<strong>\" . $field[\"label\"] . \"</strong> \" . $errors[\"max\"]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset($errors[\"mail\"]) && mb_strlen($content) > 0) {\n\t\t\t\tif ( !isValidEmail($content) ) {\n\t\t\t\t\tpushError(\"<strong>\" . $field[\"label\"] . \"</strong> \" . $errors[\"mail\"]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset($errors[\"numeric\"]) && mb_strlen($content) > 0) {\n\t\t\t\tif (!preg_match('/^(?:\\d+(?:,|$))+$/', $content)) {\n\t\t\t\t\tpushError(\"<strong>\" . $field[\"label\"] . \"</strong> \" . $errors[\"numeric\"]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset($errors[\"exact\"]) && isset($field[\"min\"]) && mb_strlen($content) > 0) {\n\t\t\t\tif (mb_strlen($content) != $field[\"min\"]) {\n\t\t\t\t\tpushError(\"<strong>\" . $field[\"label\"] . \"</strong> \" . $errors[\"exact\"]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n/*\n\t\tforeach ($PAGE_form as &$field) {\n\t\t\tvar_dump($field);\n\t\t}\n*/\n\n\t}", "title": "" }, { "docid": "9208889bd030e54ee70375ab500b68e5", "score": "0.64253587", "text": "function thumbwhere_activity_edit_form_validate(&$form, &$form_state) {\n \n //if (twCanDebug()) debug($form); \n //if (twCanDebug()) debug($form_state);\n\n\n // No validation for pk\n\n\n // Convert fk autocomplete for fk_actor\n $value = $form['fk_actor']['#value'];\n // If we have something, escape the auto-completion encoding.\n if (!empty($value)) { \n $value = entity_autocomplete_get_id($value);\n form_set_value($form['fk_actor'], $value,$form_state);\n }\n //if (twCanDebug()) debug($form['fk_actor']);\n if (twCanDebug()) debug('fk_actor = ' . $value);\n // Validate fk fk_actor\n if (empty($value)) {\n form_set_error('fk_actor', t('Validation error, \\'fk_actor\\' is mandatory1.'));\n // throw new Exception('Field \\'fk_actor\\' in is mandatory');\n }\n\n // Convert fk autocomplete for fk_action\n $value = $form['fk_action']['#value'];\n // If we have something, escape the auto-completion encoding.\n if (!empty($value)) { \n $value = entity_autocomplete_get_id($value);\n form_set_value($form['fk_action'], $value,$form_state);\n }\n //if (twCanDebug()) debug($form['fk_action']);\n if (twCanDebug()) debug('fk_action = ' . $value);\n // Validate fk fk_action\n if (empty($value)) {\n form_set_error('fk_action', t('Validation error, \\'fk_action\\' is mandatory1.'));\n // throw new Exception('Field \\'fk_action\\' in is mandatory');\n }\n\n // Convert fk autocomplete for fk_subject\n $value = $form['fk_subject']['#value'];\n // If we have something, escape the auto-completion encoding.\n if (!empty($value)) { \n $value = entity_autocomplete_get_id($value);\n form_set_value($form['fk_subject'], $value,$form_state);\n }\n //if (twCanDebug()) debug($form['fk_subject']);\n if (twCanDebug()) debug('fk_subject = ' . $value);\n // Validate fk fk_subject\n if (empty($value)) {\n form_set_error('fk_subject', t('Validation error, \\'fk_subject\\' is mandatory1.'));\n // throw new Exception('Field \\'fk_subject\\' in is mandatory');\n }\n\n // Convert fk autocomplete for fk_place\n $value = $form['fk_place']['#value'];\n // If we have something, escape the auto-completion encoding.\n if (!empty($value)) { \n $value = entity_autocomplete_get_id($value);\n form_set_value($form['fk_place'], $value,$form_state);\n }\n //if (twCanDebug()) debug($form['fk_place']);\n if (twCanDebug()) debug('fk_place = ' . $value);\n // Validate fk fk_place\n\n\n \n\n //form_set_value( array('#parents' => array('array_key_parent', 'array_key_to_replace')) , $value, $form_state);\n\n \n \n $thumbwhere_activity = $form_state['thumbwhere_activity'];\n\n // Notify field widgets to validate their data.\n field_attach_form_validate('thumbwhere_activity', $thumbwhere_activity, $form, $form_state);\n \n \n \n}", "title": "" }, { "docid": "cd93e6610d364ef1ec6a207ab83bbded", "score": "0.6394247", "text": "function form_validate($form, &$form_state) {\n }", "title": "" }, { "docid": "5200f292a410ccfe5433289fde3d16ca", "score": "0.6389639", "text": "protected function validation_hooks() {}", "title": "" }, { "docid": "bc70ce6b96994d78ef54b7d677eb4ce4", "score": "0.63867545", "text": "function gcaba_drupal_form_forms_validate($form, &$form_state, $id = NULL) {\n if ($form_state['triggering_element']['#value'] == t('Back')) {\n return;\n } \n \n switch ($form_state['stage']) { \n \n case 'step_1':\n return gcaba_drupal_form_forms_step_1_validate($form, $form_state, $id);\n break; \n \n case 'step_2': \n return gcaba_drupal_form_forms_step_2_validate($form, $form_state); \n break;\n\n case 'step_3':\n \treturn gcaba_drupal_form_forms_step_3_validate($form, $form_state);\n \tbreak;\n }\n \n}", "title": "" }, { "docid": "4f9a49a275f7556b52e838cbd17c3421", "score": "0.6372217", "text": "function tripal_analysis_validate($node, $form, &$form_state) {\n\n // We only want to validate when the node is saved.\n // Since this validate can be called on AJAX and Deletion of the node\n // we need to make this check to ensure queries are not executed\n // without the proper values.\n if($node->op != 'Save') {\n return;\n }\n\n // we are syncing if we do not have a node ID but we do have a analysis_id. We don't\n // need to validate during syncing so just skip it.\n if (is_null($node->nid) and property_exists($node, 'analysis_id') and $node->analysis_id != 0) {\n return;\n }\n\n // remove surrounding white-space on submitted values\n $node->analysisname = trim($node->analysisname);\n $node->program = trim($node->program);\n $node->programversion = trim($node->programversion);\n $node->algorithm = trim($node->algorithm);\n $node->sourcename = trim($node->sourcename);\n $node->sourceversion = trim($node->sourceversion);\n $node->sourceuri = trim($node->sourceuri);\n\n // Validating for an update\n if (!is_null($node->nid)) {\n\n // get the existing node\n $values = array('analysis_id' => $node->analysis_id);\n $result = chado_select_record('analysis', array('*'), $values);\n $analysis = $result[0];\n\n // if the name has changed make sure it doesn't conflict with an existing name\n if ($analysis->name != $node->analysisname) {\n $values = array('name' => $node->analysisname);\n $result = chado_select_record('analysis', array('analysis_id'), $values);\n if ($result and count($result) > 0) {\n form_set_error('analysisname', 'Cannot update the analysis with this analysis name. An analysis with this name already exists.');\n return;\n }\n }\n\n // if the unique constraint has changed check to make sure it doesn't conflict with an\n // existing record\n if ($analysis->program != $node->program or $analysis->programversion != $node->programversion or\n $analysis->sourcename != $node->sourcename) {\n $values = array(\n 'program' => $node->program,\n 'programversion' => $node->programversion,\n 'sourcename' => $node->sourcename,\n );\n $result = chado_select_record('analysis', array('analysis_id'), $values);\n if ($result and count($result) > 0) {\n if ($analysis->program != $node->program) {\n $field = 'program';\n }\n if ($analysis->programversion != $node->programversion) {\n $field = 'programversion';\n }\n if ($analysis->sourcename != $node->sourcename) {\n $field = 'sourcename';\n }\n form_set_error($field, 'Cannot update the analysis with this program,\n program version and source name. An analysis with these values already exists.');\n return;\n }\n }\n }\n // Validating for an insert\n else {\n $values = array(\n 'program' => $node->program,\n 'programversion' => $node->programversion,\n 'sourcename' => $node->sourcename,\n );\n $analysis = chado_select_record('analysis', array('analysis_id'), $values);\n if ($analysis and count($analysis) > 0) {\n form_set_error('program', 'Cannot add the analysis with this program,\n program version and source name. An analysis with these values already exists.');\n return;\n }\n\n // make sure we have a unique analysis name. This is not a requirement\n // for the analysis table but we use the analysis name for the Drupal node\n // title, so it should be unique\n $values = array('name' => $node->analysisname);\n $result = chado_select_record('analysis', array('analysis_id'), $values);\n if ($result and count($result) > 0) {\n form_set_error('analysisname', 'Cannot add the analysis with this analysis name. An analysis with this name already exists.');\n return;\n }\n }\n}", "title": "" }, { "docid": "225ec0995d000dd8fa1a92e822dc3f70", "score": "0.6317997", "text": "function ldap_authentication_admin_form_validate($form, &$form_state) {\n $values = $form_state['values'];\n\n // If the name is set...\n if (isset($values['name'])){\n\n // If the ldap_config is new...\n if (isset($values['is_new']) && $values['is_new'] ) {\n\n // Load ctools export.\n ctools_include('export');\n\n // If a ldap_config already exists with the name..\n $ldap_config = ctools_export_crud_load('ldap_authentication', $values['name']);\n if($ldap_config){\n form_set_error('name', t('An LDAP config with the name %name already exists.', array('%name' => $values['name'])));\n }\n }\n }\n\n // Otherwise if a name was not set...\n else{\n form_set_error('name', 'You must provide a unique name for this LDAP config.');\n }\n\n\n // If the port was not numeric...\n if (!is_numeric($values['port'])) {\n form_set_error('port', t('The TCP/IP port must be an integer.'));\n }\n}", "title": "" }, { "docid": "2b472956ef861a2a8f292a0245e45948", "score": "0.63150084", "text": "function create_nomination_admin_settings_form_validate($form, &$form_state) {\n // No validation right now.\n}", "title": "" }, { "docid": "be3362c4129d05db1482aa69896562fa", "score": "0.6306309", "text": "function data_ui_create_form_validate($form, &$form_state) {\n if (data_get_table(data_name($form_state['values']['name']))) {\n form_set_error('name', t('Name is already taken.')); \n }\n if (isset($form_state['values']['field_num'])) {\n if (is_numeric($form_state['values']['field_num'])) {\n if ($form_state['values']['field_num'] < 1) {\n form_set_error('field_num', t('At least one field must be created.')); \n }\n }\n else {\n form_set_error('field_num', t('Enter a number greater than 0.')); \n }\n }\n // Check for dupes.\n if (isset($form_state['values']['fields'])) {\n $names = array();\n foreach ($form_state['values']['fields'] as $field) {\n if (is_numeric($names[$field['name']])) {\n form_set_error('name', t('Names can\\'t be numbers.'));\n }\n if (!isset($names[$field['name']])) {\n $names[$field['name']] = $field['name'];\n }\n else {\n form_set_error('name', t('Names must be unique.'));\n }\n }\n }\n}", "title": "" }, { "docid": "2845d637f7e6afa10e52a09518f18fec", "score": "0.6275036", "text": "function field_attach_form_validate($entity_type, $entity, $form, &$form_state, $options = array()) {\n // Validate $options since this is a new parameter added after Drupal 7 was\n // released.\n $options = is_array($options) ? $options : array();\n\n // Extract field values from submitted values.\n _field_invoke_default('extract_form_values', $entity_type, $entity, $form, $form_state);\n\n // Perform field_level validation.\n try {\n field_attach_validate($entity_type, $entity, $options);\n }\n catch (FieldValidationException $e) {\n // Pass field-level validation errors back to widgets for accurate error\n // flagging.\n foreach ($e->errors as $field_name => $field_errors) {\n foreach ($field_errors as $langcode => $errors) {\n $field_state = field_form_get_state($form['#parents'], $field_name, $langcode, $form_state);\n $field_state['errors'] = $errors;\n field_form_set_state($form['#parents'], $field_name, $langcode, $form_state, $field_state);\n }\n }\n _field_invoke_default('form_errors', $entity_type, $entity, $form, $form_state, $options);\n }\n}", "title": "" }, { "docid": "4993f616556640c9d6ec712d42a1de43", "score": "0.623475", "text": "function full_node_version_node_status_form_validate($form, &$form_state) {\n $values = $form_state['values'];\n if (\n $values['testing_status']['d'] &&\n $values['testing_status']['c']\n ) {\n form_set_error('testing_status', t('Only one version can be in testing'));\n $error = TRUE;\n }\n if (\n $values['live_status']['d'] &&\n $values['live_status']['c']\n ) {\n form_set_error('live_status', t('Only one version can be live'));\n $error = $true;\n }\n return !$error;\n\n}", "title": "" }, { "docid": "c54321fff5e4172930b7e2a90a19518a", "score": "0.62188876", "text": "function _ws_apply_submit_validate($form, &$form_state) {\n switch ($form['#id']) {\n case '-ws-apply-form-type-form':\n $js = 'ws_apply_form_basics';\n break;\n case '-ws-apply-form-type-school':\n $js = 'ws_apply_form_school';\n break;\n default:\n $js = 'ws_apply_forms';\n }\n drupal_add_js(drupal_get_path('module', 'woolman_semester') . '/js/' . $js . '.js', 'module', 'header', TRUE, FALSE);\n $required = array();\n\n foreach ($form as $field=> $value) {\n if (!is_array($value) || strpos($field, '#') !== FALSE || empty($value['#type']) || $value['#type'] == 'hidden')\n continue;\n if ($value['#type'] == 'fieldset') {\n foreach ($value as $f=> $v) {\n if (!is_array($v) || strpos($field, '#') !== FALSE || empty($v['#type']) || $v['#type'] == 'hidden')\n continue;\n if (!empty($v['#req']) && is_array($value))\n $required[$f] = $value['#title'].': ' . $v['#title'];\n }\n }\n elseif ($value['#req']) {\n $required[$field] = $value['#title'];\n }\n }\n\n foreach ($required as $field=> $title) {\n if (!$form_state['values'][$field]) {\n form_set_error($field, 'Please fill in the ' . $title);\n }\n }\n}", "title": "" }, { "docid": "3390c36be7c5de60a50170231558363a", "score": "0.62010425", "text": "function voipextension_user_modify_validate($form, &$form_state) {\n\n // Make sure the language setting saves.\n if ($form_state['clicked_button']['#post']['language']) {\n $form_state['values']['language'] = $form_state['clicked_button']['#post']['language'];\n }\n\n user_profile_form_validate($form, $form_state);\n $node = $form['#node'];\n if ($form_state['clicked_button']['#id'] === 'edit-submit') {\n $node = $node->_account;\n }\n require_once drupal_get_path('module', 'node') .'/node.pages.inc';\n $node->changed = strtotime(date(\"Y-m-d H:i:s\"));\n unset($node->name);\n node_validate($node, $form);\n}", "title": "" }, { "docid": "32a20eca1c89422ad43853ffefbe256c", "score": "0.6188232", "text": "public function validateForm() {\r\n \r\n if ( $this->_Util->isPostRequest() ) { \r\n $this->_errors = array();\r\n if( !$this->_Validator->emailIsValid($this->_EmailModel->getEmail()) ) {\r\n $this->_errors[] = 'E-mail is invalid.';\r\n } \r\n if( !$this->_Validator->activeIsValid($this->_EmailModel->getActive()) ) {\r\n $this->_errors[] = 'Active is invalid.';\r\n } \r\n }\r\n \r\n }", "title": "" }, { "docid": "f1ffc710e1359616ed29eacc5dbdacdf", "score": "0.61768496", "text": "function complaint_category_edit_form_validate($form, &$form_state) {\n\n //complaint form, make sure that the given category is unique.\n $category_name = (string) $form_state['values']['category_name'];\n $query = db_select('aai_complaint_category', 'c')->condition('c.category_name', $category_name, '=')->condition('status', 1,'=');\n if (!empty($form_state['values']['category_id'])) {\n $query->condition('c.category_id', $form_state['values']['category_id'], '<>');\n }\n if ($query->countQuery()->execute()->fetchField()) {\n form_set_error('category_name', t('A complaint form with category %category already exists.', array('%category' => $category_name)));\n }\n \n}", "title": "" }, { "docid": "cb60c0821a8549ece6d0aafa676d2eb9", "score": "0.6172377", "text": "function google_plus_admin_form_validate($form, $form_state) {\n if (empty($form_state['values']['product_name'])) {\n form_set_error('product_name', t('You must set a product name for this Drupal installation.'));\n }\n\n if (!valid_url($form_state['values']['redirect_uri'], TRUE)) {\n form_set_error('redirect_uri', t('Invalid Request URI.'));\n }\n}", "title": "" }, { "docid": "45d5641b902116ca31e5723727cc1de8", "score": "0.6161318", "text": "function dmn_form_validate($form, &$form_state) {\r\n if (!isset($form_state['values']['dmn_info'])) {\r\n $form_state['values']['dmn_info'] = '';\r\n }\r\n if (empty($form_state['values']['dmn_fname'])) {\r\n form_set_error('dmn_fname', 'empty first name');\r\n }\r\n if (empty($form_state['values']['dmn_lname'])) {\r\n form_set_error('dmn_lname', 'empty last name');\r\n }\r\n}", "title": "" }, { "docid": "cef82f81aeb7deeecaa4e2659000688e", "score": "0.61449987", "text": "function form_backend_validation()\n {\n return true ;\n }", "title": "" }, { "docid": "1eefd5b99d59f3d221aa45f5aedac36d", "score": "0.6137413", "text": "function synteny_form_validate($form, $form_state) {\n // print error if the \n \n}", "title": "" }, { "docid": "933fa21e418770e70ae4daba8fdfcd51", "score": "0.61251575", "text": "function _eatlas_ncanimate2_create_validate($form, &$form_state) {\n}", "title": "" }, { "docid": "61516723dacead6f6c06d1ad65e5c047", "score": "0.61076254", "text": "function taxonomy_map_mapping_form_validate(&$form, $form_state) {\n $values = $form_state['values'];\n $msg = array(\n 'illegal_mapping' => t('You cannot have a mapping for both TAXONOMY and PATH. Please set selected TAXONOMY term to blank(first item) or remove the PATH value!'),\n 'missing_mapping' => t('Please select a MAPPED TAXONOMY TERM!'),\n 'same_mapping' => t('TAXONOMY cannot be the same as MAPPED TAXONOMY TERM!'),\n 'vocab' => t('VOCABULARY was chosen. Please select taxonomy term'),\n 'path' => t('Invalid Path. Please insert a valid path!'),\n );\n\n if (!empty($values['old_items'])) {\n foreach ($values['old_items'] as $key => $value) {\n if ($value['tid'] !== '0' && $value['path'] != '') {\n form_set_error('old_items][' . $key . '][tid', $msg['illegal_mapping']);\n form_set_error('old_items][' . $key . '][path');\n }\n if ($value['mapped_tid'] === '0') {\n form_set_error('old_items][' . $key . '][mapped_tid', $msg['illegal_mapping']);\n }\n if ($value['tid'] == $value['mapped_tid']) {\n form_set_error('old_items][' . $key . '][mapped_tid', $msg['same_mapping']);\n }\n if (!is_numeric($value['tid'])) {\n form_set_error('old_items][' . $key . '][tid', $msg['vocab']);\n }\n if (!is_numeric($value['mapped_tid'])) {\n form_set_error('old_items][' . $key . '][mapped_tid', $msg['vocab']);\n }\n if ($value['tid'] === '0' && !drupal_valid_path($value['path'])) {\n form_set_error('old_items][' . $key . '][path', $msg['path']);\n }\n }\n }\n if (!empty($values['new_item'])) {\n if ($values['new_item']['tid'] !== '0' &&\n $values['new_item']['path'] !== '' &&\n $values['new_item']['mapped_tid'] !== '0') {\n if ($values['new_item']['tid'] != '0' && $values['new_item']['path'] != '') {\n form_set_error('new_item][tid', $msg['illegal_mapping']);\n form_set_error('new_item][path');\n }\n if ($values['new_item']['mapped_tid'] === '0') {\n form_set_error('new_item][mapped_tid', $msg['illegal_mapping']);\n }\n if ($values['new_item']['tid'] == $values['new_item']['mapped_tid']) {\n form_set_error('new_item][mapped_tid', $msg['same_mapping']);\n }\n if(!is_numeric($values['new_item']['tid'])) {\n form_set_error('new_item][tid', $msg['vocab']);\n }\n if (!is_numeric($values['new_item']['mapped_tid'])) {\n form_set_error('new_item][mapped_tid', $msg['vocab']);\n }\n if ($values['new_item']['path'] != '' && !drupal_valid_path($value['path'])) {\n form_set_error('new_item][path', $msg['path']);\n }\n }\n }\n}", "title": "" }, { "docid": "ab556695b6b5417011a7ed264d7e0387", "score": "0.60724264", "text": "private function validateForm()\n\t{\n\t\tif($this->frm->isSubmitted())\n\t\t{\n\t\t\tif($this->frm->isCorrect())\n\t\t\t{\n\t\t\t\t// redirect to the settings page\n\t\t\t\t$this->redirect(BackendModel::createURLForAction('settings') . '&report=saved');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "6a92a2a8cb866b4c48fb01a0e65de191", "score": "0.6072006", "text": "function agent_client_form_validate1( &$form, &$form_state ) {\n $values = $form_state[ 'values' ];\n $email = $values[ 'account' ][ 'email' ];\n $telephone = $values[ 'account' ][ 'telephone' ];\n $promo_code = $values[ 'account' ][ 'promo_code' ];\n\n if ( !valid_email_address( $email ) ) {\n form_set_error( 'account][email', t( 'The e-mail address %mail is not valid.' ) );\n }\n //Referral Code - Restrict size to 10 characters.\n if ( !empty( $promo_code ) && !filter_var( $promo_code, FILTER_VALIDATE_REGEXP, array(\n \"options\" => array(\n \"regexp\" => \"/^[a-zA-Z0-9]{0,10}+$/\"\n )\n ) ) ) {\n form_set_error( 'account][promo_code', t( 'Referral Code - This is not a valid Referral Code.' ) );\n }\n // Telephone - Only allow numbers and phone characters such as (-).\n if ( !empty( $telephone ) && !filter_var( $telephone, FILTER_VALIDATE_REGEXP, array(\n \"options\" => array(\n \"regexp\" => \"/^(\\(?\\+?[0-9]*\\)?)?[0-9_\\- \\(\\)]*$/\"\n )\n ) ) ) {\n form_set_error( 'account][telephone', t( 'Telephone - Only numbers and phone characters such as ()+- are allowed.' ) );\n }\n}", "title": "" }, { "docid": "915c81ef110542c586b74628c5de5bf4", "score": "0.6067278", "text": "private function validateForm(): void\n { if ($this->form->isSubmitted()) {\n // cleanup the submitted fields, ignore fields that were added by hackers\n $this->form->cleanupFields();\n\n // required fields\n $this->form->getField('file')->isFilled(BL::err('FieldIsRequired'));\n $this->form->getField('label')->isFilled(BL::err('FieldIsRequired'));\n $this->form->getField('format')->isFilled(BL::err('FieldIsRequired'));\n\n $templateFile = $this->getContainer()->getParameter('site.path_www');\n // check if the template file exists\n $templateFile .= '/src/Frontend/Themes/' . $this->form->getField('theme')->getValue() . '/Core/Layout/Templates/' . $this->form->getField('file')->getValue();\n if (!is_file($templateFile)) {\n $this->form->getField('file')->addError(BL::err('TemplateFileNotFound'));\n }\n\n // validate syntax\n $syntax = trim(str_replace([\"\\n\", \"\\r\", ' '], '', $this->form->getField('format')->getValue()));\n\n // init var\n $table = BackendExtensionsModel::templateSyntaxToArray($syntax);\n\n // validate the syntax\n if (empty($table)) {\n $this->form->getField('format')->addError(BL::err('InvalidTemplateSyntax'));\n } else {\n $html = BackendExtensionsModel::buildTemplateHTML($syntax);\n $cellCount = 0;\n $first = true;\n $errors = [];\n\n // loop rows\n foreach ($table as $row) {\n // first row defines the cellcount\n if ($first) {\n $cellCount = count($row);\n }\n\n // not same number of cells\n if (count($row) != $cellCount) {\n // add error\n $errors[] = BL::err('InvalidTemplateSyntax');\n\n // stop\n break;\n }\n\n // double check position names\n foreach ($row as $cell) {\n // ignore unavailable space\n if ($cell != '/') {\n // not alphanumeric -> error\n if (!in_array($cell, $this->names)) {\n $errors[] = sprintf(BL::getError('NonExistingPositionName'), $cell);\n } elseif (mb_substr_count($html, '\"#position-' . $cell . '\"') != 1) {\n // can't build proper html -> error\n $errors[] = BL::err('InvalidTemplateSyntax');\n }\n }\n }\n\n // reset\n $first = false;\n }\n\n // add errors\n if (!empty($errors)) {\n $this->form->getField('format')->addError(implode('<br />', array_unique($errors)));\n }\n }\n\n // no errors?\n if ($this->form->isCorrect()) {\n // build array\n $item = [];\n $item['id'] = $this->id;\n $item['theme'] = $this->form->getField('theme')->getValue();\n $item['label'] = $this->form->getField('label')->getValue();\n $item['path'] = 'Core/Layout/Templates/' . $this->form->getField('file')->getValue();\n $item['active'] = $this->form->getField('active')->isChecked();\n\n // copy data from previous version, otherwise default_extras from other languages are overwritten\n $item['data'] = $this->record['data'];\n $item['data']['format'] = trim(str_replace([\"\\n\", \"\\r\", ' '], '', $this->form->getField('format')->getValue()));\n $item['data']['names'] = $this->names;\n $item['data']['default_extras'] = $this->extras;\n $item['data']['default_extras_' . BL::getWorkingLanguage()] = $this->extras;\n $item['data']['image'] = $this->form->getField('image')->isChecked();\n\n // serialize\n $item['data'] = serialize($item['data']);\n\n // if this is the default template make the template active\n if ($this->get('fork.settings')->get('Pages', 'default_template') == $this->record['id']) {\n $item['active'] = true;\n }\n\n // if the template is in use we can't de-activate it\n if (BackendExtensionsModel::isTemplateInUse($item['id'])) {\n $item['active'] = true;\n }\n\n // insert the item\n BackendExtensionsModel::updateTemplate($item);\n\n // set default template\n if ($this->form->getField('default')->getChecked() && $item['theme'] == $this->get('fork.settings')->get('Core', 'theme', 'Fork')) {\n $this->get('fork.settings')->set('pages', 'default_template', $item['id']);\n }\n\n // update all existing pages using this template to add the newly inserted block(s)\n if (BackendExtensionsModel::isTemplateInUse($item['id'])) {\n BackendPagesModel::updatePagesTemplates($item['id'], $item['id'], $this->form->getField('overwrite')->getChecked());\n }\n\n // everything is saved, so redirect to the overview\n $this->redirect(BackendModel::createUrlForAction('ThemeTemplates') . '&theme=' . $item['theme'] . '&report=edited-template&var=' . rawurlencode($item['label']) . '&highlight=row-' . $item['id']);\n }\n }\n }", "title": "" }, { "docid": "41941bb74b898d911e6396ccee66d0df", "score": "0.6057259", "text": "function node_type_form_validate($form, &$form_state) {\n $type = new stdClass();\n $type->type = $form_state['values']['type'];\n $type->name = trim($form_state['values']['name']);\n\n // Work out what the type was before the user submitted this form\n $old_type = $form_state['values']['old_type'];\n\n $types = node_type_get_names();\n\n if (!$form_state['values']['locked']) {\n // 'theme' conflicts with theme_node_form().\n // '0' is invalid, since elsewhere we check it using empty().\n if (in_array($type->type, array('0', 'theme'))) {\n form_set_error('type', t(\"Invalid machine-readable name. Enter a name other than %invalid.\", array('%invalid' => $type->type)));\n }\n }\n\n $names = array_flip($types);\n\n if (isset($names[$type->name]) && $names[$type->name] != $old_type) {\n form_set_error('name', t('The human-readable name %name is already taken.', array('%name' => $type->name)));\n }\n}", "title": "" }, { "docid": "29931690e05148dc2aab672f888bcac1", "score": "0.60433596", "text": "function agent_client_form_validate2( $form, &$form_state ) {\n $basic = $form_state[ 'values' ][ 'basic' ];\n $step1 = $basic[ 'step1' ];\n if ( $step1 == 0 ) {\n form_set_error( 'basic][step1', t( 'Please first complete account section' ) );\n }\n $passport_exp_date = str_replace( '/', '-', $basic[ 'passport_expdate' ] );\n $DOB = str_replace( '/', '-', $basic[ 'birthdate' ] );\n $date_of_birth = format_date( strtotime( \"$DOB\" ), 'custom', 'd-m-Y' );\n $birth_diff = \"\";\n $birth_diff = calculate_date_of_birth( $date_of_birth );\n if ( $birth_diff < 15 ) {\n form_set_error( 'basic][birthdate', t( 'Date of Birth - You must be 15 or older to apply.' ) );\n }\n $passport_expiry_date = format_date( strtotime( \"$passport_exp_date\" ), 'custom', 'd-m-Y' );\n if ( $passport_expiry_date != '' ) {\n $current_date = strtotime( format_date( time(), 'custom', 'd-m-Y' ) );\n if ( $current_date > strtotime( \"$passport_expiry_date\" ) ) {\n form_set_error( 'basic][passport_expdate', t( 'Passport Expiry Date - Expiry date cannot be less than today.' ) );\n }\n }\n}", "title": "" }, { "docid": "32f4ec504fda9d18e739a0d4af72eaff", "score": "0.60404575", "text": "function complaint_subcategory_edit_form_validate($form, &$form_state) {\n\n //complaint form, make sure that the given subcategory is unique.\n $subcategory_name = (string) $form_state['values']['subcategory_name'];\n $query = db_select('aai_complaint_subcategory', 'sc')->condition('sc.subcategory_name', $subcategory_name, '=')->condition('status', 1,'=');\n if (!empty($form_state['values']['subcategory_id'])) {\n $query->condition('sc.subcategory_id', $form_state['values']['subcategory_id'], '<>');\n }\n if ($query->countQuery()->execute()->fetchField()) {\n form_set_error('subcategory_name', t('A complaint form with Subcategory %subcategory already exists.', array('%subcategory' => $subcategory_name)));\n }\n \n}", "title": "" }, { "docid": "156cc0b21394535a9064236db0087219", "score": "0.6019521", "text": "function redhen_contact_contact_form_validate($form, &$form_state) {\n $contact = $form_state['redhen_contact'];\n\n // Notify field widgets to validate their data.\n field_attach_form_validate('redhen_contact', $contact, $form, $form_state);\n}", "title": "" }, { "docid": "00fd0da3bff6b78fe97973517b48e578", "score": "0.599674", "text": "function voipextension_content_field_overview_form_validate($form, &$form_state) {\n if (isset($form_state['clicked_button']['#post']['_add_new_field']['field_name']) &&\n $form_state['clicked_button']['#post']['_add_new_field']['field_name'] != '') {\n $field_name = 'field_'. $form_state['clicked_button']['#post']['_add_new_field']['field_name'];\n if ($field_name == VOIPEXTENSION_EXTENSION_MAIN_FIELD) {\n form_set_error('_add_new_field', t('Please choose some other field name. This is reserved to be use by VoIP Extension module.'));\n }\n\n module_load_include('inc', 'voipextension', 'includes/voipextension.field_operations');\n if (in_array($field_name, _voipextension_directory_field_names())) {\n form_set_error('_add_new_field', t('Please choose some different field name. This is reserved to be used by VoIP extension module.'));\n }\n }\n\n if (isset($form_state['clicked_button']['#post']['_add_new_group']['group_name']) &&\n $form_state['clicked_button']['#post']['_add_new_group']['group_name'] != '') {\n $group_name = 'group_'. $form_state['clicked_button']['#post']['_add_new_group']['group_name'];\n if ($group_name == VOIPEXTENSION_GROUP_FIELD_NAME || $group_name == VOIPEXTENSION_VOIPDIRECTORY_GROUP_FIELD_NAME) {\n form_set_error('_add_new_group', t('Please choose some different group name. This is reserved to be used by VoIP extension module.'));\n }\n }\n\n if (isset($form_state['clicked_button']['#post']['_add_new_field']) && is_array($form_state['clicked_button']['#post']['_add_new_field']) && isset($form_state['clicked_button']['#post']['_add_new_field']['type']) && $form_state['clicked_button']['#post']['_add_new_field']['type'] != '' && isset($form_state['clicked_button']['#post']['_add_new_field']['widget_type']) && $form_state['clicked_button']['#post']['_add_new_field']['widget_type'] != '' && $form_state['clicked_button']['#post']['_add_new_field']['type'] == 'voipextension' && $form_state['clicked_button']['#post']['_add_new_field']['widget_type'] == 'voipextension') {\n if (_voipextension_check_cck_field_exists($form['#type_name'], 'voipextension', 'voipextension')) {\n form_set_error('_add_new_field', t('Only one VoIP extension cck field can be added to one content type'));\n }\n }\n}", "title": "" }, { "docid": "7bf56e1d3312552028f46c21bb3f678c", "score": "0.5994673", "text": "private function validateForm()\n {\n // form submitted\n if ($this->frm->isSubmitted()) {\n // required fields\n $this->frm->getField('email')->isEmail('Please provide a valid e-mail address.');\n $this->frm->getField('password')->isFilled('This field is required.');\n $this->frm->getField('confirm')->isFilled('This field is required.');\n if ($this->frm->getField('password')->getValue() != $this->frm->getField('confirm')->getValue()\n ) {\n $this->frm->getField('confirm')->addError('The passwords do not match.');\n }\n\n // all valid\n if ($this->frm->isCorrect()) {\n // update session\n \\SpoonSession::set('email', $this->frm->getField('email')->getValue());\n \\SpoonSession::set('password', $this->frm->getField('password')->getValue());\n \\SpoonSession::set('confirm', $this->frm->getField('confirm')->getValue());\n\n $this->createYAMLConfig();\n\n // redirect\n \\SpoonHTTP::redirect('/install?step=7');\n }\n }\n }", "title": "" }, { "docid": "15b4d8d2e760f5e9e60be97b1fdfc037", "score": "0.5991308", "text": "function options_validate(&$form, &$form_state) {\n $values = &$form_state['values'];\n\n\n if (!empty($values['paypal_username_change'])) {\n $values['paypal_username'] = $values['paypal_username_input'];\n }\n\n if (!empty($values['paypal_password_change'])) {\n $values['paypal_password'] = $values['paypal_password_input'];\n }\n\n if (!empty($values['paypal_signature_change'])) {\n $values['paypal_signature'] = $values['paypal_signature_input'];\n }\n\n if (!empty($values['transaction_fee_percent']) && !is_numeric($values['transaction_fee_percent'])) {\n form_set_error('transaction_fee_percent', t('Variable transaction fee must be a number.'));\n }\n\n if (!empty($values['transaction_fee_fixed']) && !is_numeric($values['transaction_fee_fixed']) ){\n form_set_error('transaction_fee_fixed', t('Fixed transaction fee must be a number.'));\n }\n\n }", "title": "" }, { "docid": "6ffaeb8a5db88a7494fe89c822f4b37f", "score": "0.5967168", "text": "function organization_form_validate(&$form, &$form_state) {\n field_attach_form_validate('user', $form_state['user'], $form, $form_state);\n}", "title": "" }, { "docid": "29dc6bb2c06e85bc7257441bf09bd0f9", "score": "0.59601766", "text": "function crm_case_edit_form_validate(&$form, &$form_state) {\n $crm_case = $form_state['crm_case'];\n \n // Notify field widgets to validate their data.\n field_attach_form_validate('crm_case', $crm_case, $form, $form_state);\n}", "title": "" }, { "docid": "2b94e157f629916af1a59fbd0a3d4b44", "score": "0.5928053", "text": "function project_issue_project_edit_form_validate($form, &$form_state) {\n if (!empty($form_state['values']['mail_digest']) && ($data = user_validate_mail($form_state['values']['mail_digest']))) {\n form_set_error('mail_digest', $data);\n }\n if (!empty($form_state['values']['mail_copy']) && ($data = user_validate_mail($form_state['values']['mail_copy']))) {\n form_set_error('mail_copy', $data);\n }\n}", "title": "" }, { "docid": "1c5700a7ddac12cde63ef8006d5b27af", "score": "0.59248877", "text": "function bibdk_reservation_sbkopi_validate($form, &$form_state, &$type = NULL) {\n // $new represents a new user, $old represents an already registred user\n $new = bibdk_reservation_sb_kopi_new_user_fields();\n $old = bibdk_reservation_sb_kopi_old_user_fields();\n\n // check if new has been filled out\n foreach ($old as $key) {\n if (!(empty($form_state['values'][$key]))) {\n continue;\n }\n else {\n $old = FALSE;\n break;\n }\n }\n\n // check if old has been filled out\n foreach ($new as $key) {\n if (!empty($form_state['values'][$key])) {\n continue;\n }\n else {\n $new = FALSE;\n break;\n }\n }\n\n if (!$old && !$new) {\n return array(\n 'field' => 'form',\n 'message' => 'sb_kopi_fill_out_the_form_please'\n );\n }\n\n if (is_array($old) && is_array($new)) {\n // both forms has been filled out; use the one for already registred users ($old)\n foreach ($new as $key) {\n $form_state['values'][$key] = NULL;\n }\n }\n\n // now check that the form that has been filled out was set correct\n if ($old && !$new) {\n if (isset($form_state['values']['pincode']) && isset($form_state['values']['userId'])) {\n if (!empty($form_state['values']['pincode']) && (!is_numeric($form_state['values']['pincode']) || strlen($form_state['values']['pincode']) != 4)) {\n return array('pincode', 'Pincode needs to be a four digit number');\n }\n if (!empty($form_state['values']['userId']) && !is_numeric($form_state['values']['userId'])) {\n return array('userId', 'CPR-number needs to be a valid CPR-number');\n }\n }\n }\n\n if (!$old && $new) {\n if (isset($form_state['values']['bestil_kopi_cpr_number'])) {\n // cpr should be numeric\n if (!is_numeric($form_state['values']['bestil_kopi_cpr_number'])) {\n return array(\n 'bestil_kopi_cpr_numer',\n 'CPR-number needs to be a valid CPR-number'\n );\n }\n }\n }\n\n // set the type of user\n if ($old) {\n $type = 'OLD';\n }\n elseif ($new) {\n $type = 'NEW';\n }\n}", "title": "" }, { "docid": "99108a22198d5b604ac909b90e188b02", "score": "0.5910149", "text": "function terra_admin_block_validate(&$form, $form_state) {\n $delta = $form['delta']['#value'];\n if ($delta == 'terra-block') {\n if (!filter_var($form_state['values']['email'], FILTER_VALIDATE_EMAIL)) {\n form_set_error('email', t('Enter valid email please'));\n }\n }\n}", "title": "" }, { "docid": "e824491a53c7e81aa4941293a9128c16", "score": "0.5908305", "text": "function vals_soc_form_user_register_form_validate_handler(&$form, &$form_state){\n $current_role = getRole();\n \n if ($current_role == 'administrator'){\n return;\n }\n \n if (! (isset($form_state['values']['account_key']))){\n form_set_error('account_key', t('There is no key entered. Ask the Semester of Code Admin.'));\n return;\n }\n $code_entered = $form_state['values']['account_key'];\n $requested_user_type = isset($form_state['values']['account_type']) ? $form_state['values']['account_type'] : 'none';\n \n //Check the student belonging to a valid group\n if ($requested_user_type == 'student'){\n if (! isset($form_state['values']['institute']) || $form_state['values']['institute'] == 0){\n form_set_error('institute', t('You should select your university or institute.'));\n }\n $db_and = db_and();\n $db_and->condition('code', $code_entered);\n $db_and->condition('type', 'group');//Since we do not want a long list of groups during registration\n //we use the institute instead and so we select not on type student, but on group\n $db_and->condition('org', $form_state['values']['institute']);\n $valid_groups_cnt = db_select('soc_codes')->fields('soc_codes')->condition($db_and)->execute()->rowCount();\n if ($valid_groups_cnt == 0){\n form_set_error('account_key', t('This is no valid key you entered. Ask your tutor.'));\n }\n return;\n }\n $org = 0;\n if (($requested_user_type == 'mentor' ) && $form_state['values']['organisation']){\n $org = $form_state['values']['organisation'];\n }\n if (($requested_user_type == 'supervisor' ) && $form_state['values']['institute']){\n $org = $form_state['values']['institute'];\n }\n $db_and2 = db_and();\n $db_and2->condition('type', $requested_user_type);\n $db_and2->condition('code', $code_entered);\n if ((! in_array($requested_user_type, array('institute_admin', 'organisation_admin', 'soc', 'administrator')))&&\n $org){\n $db_and2->condition('org', $org);\n }\n $found_codes = db_select('soc_codes')->fields('soc_codes')->condition($db_and2)->execute()->rowCount();\n $possible_code_rec = db_select('soc_codes')->fields('soc_codes')->\n condition('type', $requested_user_type)->\n condition('org', $org)->\n execute()->fetchAssoc();\n //->fetchAllAssoc('type', PDO::FETCH_ASSOC); returns [student=>[type=>student, code=><student_code>,....]\n if (!$found_codes){\n form_set_error('account_key', t('The key you typed is not correct. Ask the Semester of Code Admin.'.\n (_DEBUG ? '<BR>'.t('In this phase, we just give you the code: ').$possible_code_rec['code']: '')));\n } else {\n return;\n }\n \n}", "title": "" }, { "docid": "4bc619c655a5e184eee3e13b038beeaa", "score": "0.58230436", "text": "protected function Form_Validate() {\n\t\t\t// By default, we report the result of validation from the parent\n\t\t\t$blnToReturn = parent::Form_Validate();\n\n\t\t\t// Custom Validation Rules\n\t\t\t// TODO: Be sure to set $blnToReturn to false if any custom validation fails!\n\t\t\t\n\n\t\t\t$blnFocused = false;\n\t\t\tforeach ($this->GetErrorControls() as $objControl) {\n\t\t\t\t// Set Focus to the top-most invalid control\n\t\t\t\tif (!$blnFocused) {\n\t\t\t\t\t$objControl->Focus();\n\t\t\t\t\t$blnFocused = true;\n\t\t\t\t}\n\n\t\t\t\t// Blink on ALL invalid controls\n\t\t\t\t$objControl->Blink();\n\t\t\t}\n\n\t\t\treturn $blnToReturn;\n\t\t}", "title": "" }, { "docid": "3c300a9cfaaeb26ce24a9b36373d42e6", "score": "0.5819041", "text": "protected function preValidate() {}", "title": "" }, { "docid": "1b0157f88c8aea8b10b898916c2d8b4d", "score": "0.5814272", "text": "function helloworld_admin_validate($form, &$form_state) {\n\t $helloworld_pagelimit = $form_state['values'][PAGELIMIT];\n\t $helloworld_autocompletelimit = $form_state['values'][AUTOCOMPLETELIMIT];\n\t \n\t if (!is_numeric($helloworld_pagelimit)) {\n\t form_set_error('helloworld_pagelimit', t('You must enter a number for the maximum number of records in a page.'));\n\t } else if ($helloworld_pagelimit <= 0) {\n\t form_set_error('helloworld_pagelimit', t('Maximum number of records in a page must be positive.'));\n\t }\n\t \n\t if (!is_numeric($helloworld_autocompletelimit)) {\n\t form_set_error('helloworld_autocompletelimit', t('You must enter a number for the maximum number of records displayed in autocomplete function.'));\n\t } else if ($helloworld_autocompletelimit <= 0) {\n\t form_set_error('helloworld_autocompletelimit', t('Maximum number of records in autocomplete function must be positive.'));\n\t } \n\t \n\t}", "title": "" }, { "docid": "fdf992ecaaed2770a91e1bb72cda13f0", "score": "0.57844186", "text": "function publication_edit_form_validate(&$form, &$form_state){\n $publication = $form_state['publication'];\n // Notify field widgets to validate their data.\n field_attach_form_validate('publication', $publication, $form, $form_state);\n}", "title": "" }, { "docid": "81a59987cd3d7ced3ef5726efaaba8d6", "score": "0.5783486", "text": "function check_for_valid_fields() {\n\t\t$error = \"\";\n\t\tif (is_array($this->config['required_formfields']) && count($this->config['required_formfields']) > 0) {\n\t\t\tforeach ($this->config['required_formfields'] AS $req_field) {\n\t\t\t\t$raiseError\t\t= true;\n\n\t\t\t\tswitch ( $req_field ) {\n\t\t\t\t\t// ignore adults of folks that don't check youth\n\t\t\t\t\tcase 'parents_name' :\n\t\t\t\t\t\tif ( ( ! $this->requiresParent || ! $GLOBALS['TSFE']->fe_user->user['date_of_birth'] )\n\t\t\t\t\t\t\t&& ! $this->postvars['youth']\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t$raiseError\t\t= false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault :\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ( $raiseError && empty($this->postvars[$req_field]) ) {\n\t\t\t\t\t$error .= '<li> \"'.ucfirst($this->pi_getLL('form_'.$req_field.'_label')).'\" '.$this->pi_getLL('form_required_blank') . '</li>';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// check if optional one is required\n\t\tforeach ($this->postvars as $fieldName => $fieldValue) {\n\t\t\t$lastCh = substr($fieldName,strlen($fieldName)-1,1);\n\t\t\tif ($lastCh == '+') { // required marker\n\t\t\t\t$shortFieldName = substr($fieldName,0,strlen($fieldName)-1);\n\t\t\t\t$altFieldValue = 0;\n\t\t\t\tif ($this->postvars[$shortFieldName]) {\n\t\t\t\t\t$altFieldValue = $this->postvars[$shortFieldName];\n\t\t\t\t}\n\t\t\t\tif (!$altFieldValue && (!strlen($fieldValue) || empty($fieldValue))) {\n\t\t\t\t\t$fieldName = substr($fieldName,0,strlen($fieldName)-1);\n\t\t\t\t\t$fieldName = strtr($fieldName,'_',' ');\n\t\t\t\t\t$error .= '<li> \"'.ucfirst($fieldName).'\" '.$this->pi_getLL('form_required_blank') .'</li>';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (!empty($this->postvars['email'])) {\n\t\t\tif (t3lib_div::validEmail($this->postvars['email']) == false) {\n\t\t\t\t$error .= '<li> '.$this->pi_getLL('form_email_label').\" \".$this->pi_getLL('form_invalid_field').\"</li>\";\n\t\t\t}\n\t\t}\n\n\t\tif (!strlen($error))\n\t\t\treturn 0;\n\t\telse\n\t\t\treturn '<ul>'.$error.'</ul>';\n\t}", "title": "" }, { "docid": "50712c2e0dad34c9423905fdbd392989", "score": "0.57727486", "text": "function procurement_plan_form_validate($form, &$form_state) {\n $form_state['values']['nid'] = $form_state['values']['webform'];\n\n // if sid is null, nid set to null too.\n if (!empty($form_state['values']['nid']) && empty($form_state['values']['sid'])) {\n $form_state['values']['nid'] = 0;\n }\n\n // process sid values\n $sids = isset($form_state['values']['sid']) ? $form_state['values']['sid'] : 0;\n if (is_array($sids)) {\n foreach ($sids as $i => $sid) {\n if ($sid == TRUE) {\n $form_state['values']['sid'] = $i;\n break;\n }\n }\n }\n\n if (empty($form_state['values']['sid'])) {\n form_set_error(NULL, t('Submission must be selected.'));\n }\n}", "title": "" }, { "docid": "8bae2ee61947d65a241c43809f9adf5e", "score": "0.5768872", "text": "protected function onInValid()\n {\n // We disable this standard error message as we are not changing anything here\n //$this->addMessage(sprintf($this->_('Input error! Changes to %s not saved!'), $this->getTopic()));\n\n if ($this->_csrf) {\n if ($this->_csrf->getMessages()) {\n $this->addMessage($this->_('The form was open for too long or was opened in multiple windows.'));\n }\n }\n }", "title": "" }, { "docid": "961fee1d51145b1fceb3342d2d9104b5", "score": "0.5764683", "text": "private function _validate()\r\n {\r\n if (!$this->user->hasPermission('modify', MyParcel()->getMyparcelModulePath())) {\r\n $this->error['warning'] = $this->language->get('error_permission');\r\n }\r\n // form error checking\r\n return !$this->error;\r\n }", "title": "" }, { "docid": "76e2e6ac6e757f8f86e51ff62f1088d0", "score": "0.5758281", "text": "protected function _validate()\n { \n if (empty($this->title)) {\n $this->addError('title', __('The page must be given a title.'));\n } \n \n if (255 < strlen($this->title)) {\n $this->addError('title', __('The title for your page must be 255 characters or less.'));\n }\n \n if (!$this->fieldIsUnique('title')) {\n $this->addError('title', __('The title is already in use by another page. Please choose another.'));\n }\n \n if (trim($this->slug) == '') {\n $this->addError('slug', __('The page must be given a valid slug.'));\n }\n \n if (preg_match('/^\\/+$/', $this->slug)) {\n $this->addError('slug', __('The slug for your page must not be a forward slash.'));\n }\n \n if (255 < strlen($this->slug)) {\n $this->addError('slug', __('The slug for your page must be 255 characters or less.'));\n }\n \n if (!$this->fieldIsUnique('slug')) {\n $this->addError('slug', __('The slug is already in use by another page. Please choose another.'));\n }\n \n if (!is_numeric($this->order) || (!(strpos((string)$this->order, '.') === false)) || intval($this->order) < 0) {\n $this->addError('order', __('The order must be an integer greater than or equal to 0.'));\n }\n }", "title": "" }, { "docid": "45ebf0ada04f47ea2091e41ee23cff5c", "score": "0.5756749", "text": "function validate()\n\t{\n\t\tEvent::run('formogroup.pre_validate', $this);\n\n\t\tforeach ($this->elements as $element=>$value)\n\t\t{\n\t\t\t$this->$element->validate();\n\t\t}\n\t\t\n\t\tif ($this->required AND ! Formo::has_value(Input::instance()->post($this->name)))\n\t\t{\n\t\t\t$this->error = $this->required_msg;\n\t\t\t$this->add_class($this->error_class);\n\t\t\treturn $this->error;\n\t\t}\n\t\telseif ($this->rule)\n\t\t{\n\t\t\t$rules = ( ! is_array($this->rule)) ? array($this->rule) : $this->rule;\n\t\t\tforeach ($rules as $rule)\n\t\t\t{\n\t\t\t\t$function = (isset($rule['rule'])) ? $rule['rule'] : $rule;\n\t\t\t\t$error_msg = (isset($rule['error_msg'])) ? $rule['error_msg'] : $this->error_msg;\n\t\t\t\t$type = $this->post_type;\n\n\t\t\t\tif ( ! call_user_func($function, Input::instance()->$type($this->name)))\n\t\t\t\t{\n\t\t\t\t\t$this->error = $error_msg;\n\t\t\t\t\t$this->add_class($this->error_class);\n\t\t\t\t\treturn $this->error;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tEvent::run('formogroup.post_validate', $this);\n\t}", "title": "" }, { "docid": "85926ac729ad1932b8ad07fc8fe5f933", "score": "0.57474554", "text": "function chado_analysis_validate($node, $form, &$form_state) {\n // use the analysis parent to validate the node\n tripal_analysis_validate($node, $form, $form_state);\n}", "title": "" }, { "docid": "f1df226a987658c3f96a311848697d51", "score": "0.57206213", "text": "protected function checkFormEdit() {\n global $dbKITform;\n global $dbKITformFields;\n global $kitContactInterface;\n global $dbKITformTableSort;\n global $kitLibrary;\n\n $checked = true;\n $message = '';\n\n $form_id = isset($_REQUEST[dbKITform::field_id]) ? $_REQUEST[dbKITform::field_id] : -1;\n\n $form_data = $dbKITform->getFields();\n unset($form_data[dbKITform::field_timestamp]);\n foreach ($form_data as $field => $value) {\n switch ($field) :\n case dbKITform::field_id :\n $form_data[$field] = $form_id;\n break;\n case dbKITform::field_name :\n $form_data[$field] = isset($_REQUEST[$field]) ? $_REQUEST[$field] : '';\n if (empty($form_data[$field])) {\n $message .= $this->lang->translate('<p>The <b>form name</b> must contain 3 charactes at minimum!</p>');\n $checked = false;\n break;\n }\n $name = str_replace(' ', '_', strtolower(media_filename(trim($form_data[$field]))));\n $SQL = sprintf(\"SELECT %s FROM %s WHERE %s='%s' AND %s!='%s'\", dbKITform::field_id, $dbKITform->getTableName(), dbKITform::field_name, $name, dbKITform::field_status, dbKITform::status_deleted);\n $result = array();\n if (!$dbKITform->sqlExec($SQL, $result)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $dbKITform->getError()));\n return false;\n }\n if (count($result) > 0) {\n if (($form_id > 0) && ($result[0][dbKITform::field_id] !== $form_id)) {\n // Formular kann nicht umbenannt werden, der\n // Bezeichner wird bereits verwendet\n $message .= $this->lang->translate('<p>The form name can not changed to <b>{{ name }}</b>, this name is already in use by the form with the <b>ID {{ id }}</b>.</p>', array(\n 'name' => $name,\n 'id' => sprintf('%03d', $result[0][dbKITform::field_id])\n ));\n unset($_REQUEST[$field]);\n $checked = false;\n break;\n }\n elseif ($form_id < 1) {\n // Der Bezeichner wird bereits verwendet\n $message .= $this->lang->translate('<p>The name <b>{{ name }}</b> is already in use by the form with the <b>ID {{ id }}</b>, please use another name!</p>', array(\n 'name' => $name,\n 'id' => sprintf('%03d', $result[0][dbKITform::field_id])\n ));\n unset($_REQUEST[$field]);\n $checked = false;\n break;\n }\n }\n $form_data[$field] = $name;\n break;\n case dbKITform::field_title :\n $form_data[$field] = isset($_REQUEST[$field]) ? $_REQUEST[$field] : '';\n if (empty($form_data[$field]) || (strlen($form_data[$field]) < 6)) {\n $message .= $this->lang->translate('<p>At minimum the form title must be 5 or more characters long!</p>');\n $checked = false;\n }\n break;\n case dbKITform::field_action :\n case dbKITform::field_description :\n case dbKITform::field_fields :\n case dbKITform::field_must_fields :\n $form_data[$field] = isset($_REQUEST[$field]) ? $_REQUEST[$field] : '';\n break;\n case dbKITform::field_status :\n $form_data[$field] = isset($_REQUEST[$field]) ? $_REQUEST[$field] : dbKITform::status_locked;\n if ($form_data[$field] == dbKITform::status_deleted) {\n // Formular loeschen\n $where = array(\n dbKITform::field_id => $form_id\n );\n if (!$dbKITform->sqlDeleteRecord($where)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $dbKITform->getError()));\n return false;\n }\n // Formular Items loeschen\n $where = array(\n dbKITformFields::field_form_id => $form_id\n );\n if (!$dbKITformFields->sqlDeleteRecord($where)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $dbKITform->getError()));\n return false;\n }\n // es gibt nichts mehr zu tun, zurueck zur\n // Uebersichtsliste\n $this->lang->translate('<p>The form with the <b>ID {{ id }}</b> was successfully deleted.</p>', array(\n 'id' => sprintf('%03d', $form_id)\n ));\n return $this->dlgFormList();\n }\n break;\n case dbKITform::field_provider_id :\n $form_data[$field] = isset($_REQUEST[$field]) ? $_REQUEST[$field] : -1;\n if ($form_data[$field] == -1) {\n // kein Diensleister ausgewaehlt\n $message .= $this->lang->translate('<p>Please select a service provider for this form!</p>');\n $checked = false;\n }\n break;\n case dbKITform::field_email_cc :\n $cc = isset($_REQUEST[$field]) ? $_REQUEST[$field] : '';\n if (!empty($cc)) {\n // CC Adressen auslesen\n $cc_arr = explode(',', $cc);\n $new_arr = array();\n foreach ($cc_arr as $email) {\n if (!$kitLibrary->validateEMail(trim($email))) {\n $message .= $this->lang->translate('<p>The email address <b>{{ email }}</b> is not valid, please check your input.</p>', array(\n 'email' => $email\n ));\n $checked = false;\n }\n $new_arr[] = trim($email);\n }\n $cc = implode(',', $new_arr);\n }\n $form_data[$field] = $cc;\n break;\n case dbKITform::field_email_html :\n $form_data[$field] = isset($_REQUEST[$field]) ? $_REQUEST[$field] : dbKITform::html_off;\n break;\n case dbKITform::field_captcha :\n $form_data[$field] = isset($_REQUEST[$field]) ? $_REQUEST[$field] : dbKITform::captcha_on;\n break;\n default :\n // uebrige Felder ueberspringen\n break;\n endswitch\n ;\n }\n\n // Action Links pruefen\n $links = array();\n foreach ($dbKITform->action_array as $key => $text) {\n if (isset($_REQUEST[$key])) $links[$key] = $_REQUEST[$key];\n }\n // ... und uebernehmen\n $form_data[dbKITform::field_links] = http_build_query($links);\n\n // pruefen ob ein Feld entfernt werden soll oder ob Felder als\n // Pflichtfelder gesetzt werden sollen\n $fields = explode(',', $form_data[dbKITform::field_fields]);\n $must_fields = explode(',', $form_data[dbKITform::field_must_fields]);\n foreach ($fields as $key => $value) {\n if ($value < 100) {\n // KIT Felder\n $field_name = array_search($value, $kitContactInterface->index_array);\n if (!isset($_REQUEST[$field_name])) {\n $message .= $this->lang->translate('<p>The datafield <b>{{ field }}</b> was removed.</p>', array(\n 'field' => $kitContactInterface->field_array[$field_name]\n ));\n unset($fields[$key]);\n }\n if (isset($_REQUEST['must_' . $field_name]) && !in_array($value, $must_fields)) {\n $must_fields[] = $value;\n }\n }\n else {\n // allgemeine Felder\n $further_check = true;\n $where = array(\n dbKITformFields::field_id => $value\n );\n $data = array();\n if (!$dbKITformFields->sqlSelectRecord($where, $data)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $dbKITformFields->getError()));\n return false;\n }\n if (count($data) < 1) {\n continue;\n /**\n *\n * @todo continue instead prompting error is only a workaround!\n */\n // $this->setError(sprintf('[%s - %s] %s', __METHOD__,\n // __LINE__, kit_error_invalid_id));\n // return false;\n }\n $data = $data[0];\n $field_name = $data[dbKITformFields::field_name];\n $field_id = $data[dbKITformFields::field_id];\n if (!isset($_REQUEST[$field_name])) {\n // Feld entfernen\n $message .= $this->lang->translate('<p>The datafield <b>{{ field }}</b> was removed.</p>', array(\n 'field' => $field_name\n ));\n unset($fields[$key]);\n $further_check = false;\n // Tabelle aktualisieren\n $where = array(\n dbKITformFields::field_id => $field_id\n );\n if (!$dbKITformFields->sqlDeleteRecord($where)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $dbKITformFields->getError()));\n return false;\n }\n }\n if (isset($_REQUEST[\"must_$field_name\"]) && !in_array($value, $must_fields)) {\n $must_fields[] = $value;\n }\n if ($further_check) {\n // erweiterte Pruefung der Felder in Abhaenigkeit des Feld\n // Typen\n switch ($data[dbKITformFields::field_type]) :\n case dbKITformFields::type_text :\n // Einfache Text Eingabefelder pruefen\n $field_data = array(\n dbKITformFields::field_name => (isset($_REQUEST['name_' . $field_name])) ? $_REQUEST['name_' . $field_name] : 'free_' . $field_id,\n dbKITformFields::field_title => (isset($_REQUEST['title_' . $field_name])) ? $_REQUEST['title_' . $field_name] : 'title_' . $field_id,\n dbKITformFields::field_value => (isset($_REQUEST['default_' . $field_name])) ? $_REQUEST['default_' . $field_name] : '',\n dbKITformFields::field_data_type => (isset($_REQUEST['data_type_' . $field_name])) ? $_REQUEST['data_type_' . $field_name] : dbKITformFields::data_type_text,\n dbKITformFields::field_hint => (isset($_REQUEST['hint_' . $field_name])) ? $_REQUEST['hint_' . $field_name] : ''\n );\n $where = array(\n dbKITformFields::field_id => $field_id\n );\n if (!$dbKITformFields->sqlUpdateRecord($field_data, $where)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $dbKITformFields->getError()));\n return false;\n }\n break;\n case dbKITformFields::type_text_area :\n // textarea pruefen\n // first we have to check the additional settings for count and limit characters\n $additional = array();\n if (isset($_REQUEST[\"limit_chars_$field_name\"])) {\n if (intval($_REQUEST[\"limit_chars_$field_name\"]) > 65534)\n $additional['limit_chars'] = 65534;\n elseif (intval($_REQUEST[\"limit_chars_$field_name\"]) < 1)\n $additional['limit_chars'] = -1;\n else\n $additional['limit_chars'] = intval($_REQUEST[\"limit_chars_$field_name\"]);\n }\n else {\n $additional['limit_chars'] = -1;\n }\n if (($additional['limit_chars'] > -1) || isset($_REQUEST[\"count_chars_$field_name\"]))\n $additional['count_chars'] = 1;\n else\n $additional['count_chars'] = 0;\n $field_data = array(\n dbKITformFields::field_name => (isset($_REQUEST['name_' . $field_name])) ? $_REQUEST['name_' . $field_name] : 'free_' . $field_id,\n dbKITformFields::field_title => (isset($_REQUEST['title_' . $field_name])) ? $_REQUEST['title_' . $field_name] : 'title_' . $field_id,\n dbKITformFields::field_value => (isset($_REQUEST['default_' . $field_name])) ? $_REQUEST['default_' . $field_name] : '',\n dbKITformFields::field_data_type => dbKITformFields::data_type_text,\n dbKITformFields::field_hint => (isset($_REQUEST['hint_' . $field_name])) ? $_REQUEST['hint_' . $field_name] : '',\n dbKITformFields::field_type_add => http_build_query($additional)\n );\n $where = array(\n dbKITformFields::field_id => $field_id\n );\n if (!$dbKITformFields->sqlUpdateRecord($field_data, $where)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $dbKITformFields->getError()));\n return false;\n }\n break;\n case dbKITformFields::type_file :\n // FILE Type\n $settings = array();\n $parse = str_replace('&amp;', '&', $data[dbKITformFields::field_type_add]);\n parse_str($parse, $settings);\n $upload_max_filesize = $this->convertBytes(ini_get('upload_max_filesize'));\n $post_max_size = $this->convertBytes(ini_get('post_max_size'));\n $max_filesize = $upload_max_filesize;\n if ($upload_max_filesize > $post_max_size) $max_filesize = $post_max_size;\n\n // check if the field NAME has changed ...\n if ($settings['upload_method']['name'] != \"upload_method_$field_name\") {\n $settings['upload_method']['name'] = \"upload_method_$field_name\";\n $settings['file_types']['name'] = \"file_types_$field_name\";\n $settings['max_file_size']['name'] = \"max_file_size_$field_name\";\n }\n // update settings ...\n if (isset($_REQUEST[\"upload_method_$field_name\"])) {\n // check the upload method\n $dummy = strtolower($_REQUEST[\"upload_method_$field_name\"]);\n switch ($dummy) :\n case 'standard' :\n $settings['upload_method']['value'] = 'standard';\n break;\n case 'uploadify' :\n if (!file_exists(LEPTON_PATH . '/modules/kit_uploader/info.php')) {\n // missing kitUploader\n $message .= $this->lang->translate('<p>To use the upload method <b>uploadify</b> kitUploader must be installed!</p>');\n $settings['upload_method']['value'] = 'standard';\n break;\n }\n $settings['upload_method']['value'] = 'uploadify';\n break;\n default :\n $checked = false;\n $message .= $this->lang->translate('<p>Unknown upload method: <b>{{ method }}</b>, allowed methods are <i>standard</i> or <i>uploadify</i>.</p>', array(\n 'method' => $dummy\n ));\n $settings['upload_method']['value'] = 'standard';\n break;\n endswitch\n ;\n }\n else {\n $settings['upload_method']['value'] = 'standard';\n }\n if (isset($_REQUEST[\"file_types_$field_name\"])) {\n // set allowed file extensions, grant lowercase\n // and remove spaces\n $dummy = strtolower($_REQUEST[\"file_types_$field_name\"]);\n $dummy = str_replace(' ', '', $dummy);\n $settings['file_types']['value'] = $dummy;\n }\n else {\n $settings['file_types']['value'] = $this->file_allowed_filetypes;\n }\n if (isset($_REQUEST[\"max_file_size_$field_name\"])) {\n $max = (int) $_REQUEST[\"max_file_size_$field_name\"];\n if (($max * 1024 * 1024) > $max_filesize) {\n $max = ($max_filesize / 1024 / 1024);\n $message .= $this->lang->translate('<p>System does not allow uploads greater than <b>{{ max_filesize }} MB</b>. Please contact your webmaster to increase this value.</p>', array(\n 'max_filesize' => $max_filesize / 1024 / 1024\n ));\n }\n $settings['max_file_size']['value'] = $max;\n }\n else {\n $settings['max_file_size']['value'] = $max_filesize / 1024 / 1024;\n }\n $field_data = array(\n dbKITformFields::field_name => (isset($_REQUEST['name_' . $field_name])) ? $_REQUEST['name_' . $field_name] : 'free_' . $field_id,\n dbKITformFields::field_title => (isset($_REQUEST['title_' . $field_name])) ? $_REQUEST['title_' . $field_name] : 'title_' . $field_id,\n dbKITformFields::field_value => '',\n dbKITformFields::field_data_type => dbKITformFields::data_type_undefined,\n dbKITformFields::field_hint => (isset($_REQUEST['hint_' . $field_name])) ? $_REQUEST['hint_' . $field_name] : '',\n dbKITformFields::field_type_add => http_build_query($settings)\n );\n $where = array(\n dbKITformFields::field_id => $field_id\n );\n if (!$dbKITformFields->sqlUpdateRecord($field_data, $where)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $dbKITformFields->getError()));\n return false;\n }\n break;\n case dbKITformFields::type_checkbox :\n // CHECKBOX pruefen\n $cboxes = array();\n $parse = str_replace('&amp;', '&', $data[dbKITformFields::field_type_add]);\n parse_str($parse, $cboxes);\n $checkboxes = array();\n foreach ($cboxes as $checkbox) {\n $cb_name = $checkbox['name'];\n if (!isset($_REQUEST['cb_active_' . $cb_name])) {\n continue;\n }\n if (!empty($_REQUEST['cb_value_' . $cb_name])) $checkbox['value'] = $_REQUEST['cb_value_' . $cb_name];\n if (!empty($_REQUEST['cb_text_' . $cb_name])) $checkbox['text'] = $_REQUEST['cb_text_' . $cb_name];\n $checkbox['checked'] = (isset($_REQUEST['cb_checked_' . $cb_name])) ? 1 : 0;\n $checkboxes[] = $checkbox;\n }\n\n // neue Checkboxen dazunehmen\n if (isset($_REQUEST['cb_active_' . $field_id])) {\n // es soll eine neue Checkbox uebernommen werden\n if (isset($_REQUEST['cb_value_' . $field_id]) && !empty($_REQUEST['cb_value_' . $field_id]) && isset($_REQUEST['cb_text_' . $field_id]) && !empty($_REQUEST['cb_text_' . $field_id])) {\n // ok - checkbox uebernehmen\n $value = str_replace(' ', '_', strtolower(media_filename($_REQUEST['cb_value_' . $field_id])));\n $checkboxes[] = array(\n 'name' => $field_id . '_' . $value,\n 'value' => $value,\n 'text' => $_REQUEST['cb_text_' . $field_id],\n 'checked' => isset($_REQUEST['cb_checked_' . $field_id]) ? 1 : 0\n );\n }\n else {\n // Definition der Checkbox ist nicht\n // vollstaendig\n $message .= $this->lang->translate('<p>The definition of the new checkbox is not complete. Please specify a <b>value</b> and a <b>text</b> for it!</p>');\n }\n }\n // allgemeine Daten der Checkbox pruefen\n $field_data = array(\n dbKITformFields::field_name => (isset($_REQUEST['name_' . $field_name])) ? $_REQUEST['name_' . $field_name] : 'free_' . $field_id,\n dbKITformFields::field_title => (isset($_REQUEST['title_' . $field_name])) ? $_REQUEST['title_' . $field_name] : 'title_' . $field_id,\n dbKITformFields::field_value => (isset($_REQUEST['default_' . $field_name])) ? $_REQUEST['default_' . $field_name] : '',\n dbKITformFields::field_data_type => dbKITformFields::data_type_undefined,\n dbKITformFields::field_hint => (isset($_REQUEST['hint_' . $field_name])) ? $_REQUEST['hint_' . $field_name] : '',\n dbKITformFields::field_type_add => http_build_query($checkboxes)\n );\n $where = array(\n dbKITformFields::field_id => $field_id\n );\n if (!$dbKITformFields->sqlUpdateRecord($field_data, $where)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $dbKITformFields->getError()));\n return false;\n }\n break;\n case dbKITformFields::type_radio :\n // RADIOBUTTON pruefen\n $rbuttons = array();\n $parse = str_replace('&amp;', '&', $data[dbKITformFields::field_type_add]);\n parse_str($parse, $rbuttons);\n $radios = array();\n foreach ($rbuttons as $radio) {\n $rb_name = $radio['name'];\n if (!isset($_REQUEST['rb_active_' . $rb_name])) continue;\n if (!empty($_REQUEST['rb_value_' . $rb_name])) $radio['value'] = $_REQUEST['rb_value_' . $rb_name];\n if (!empty($_REQUEST['rb_text_' . $rb_name])) $radio['text'] = $_REQUEST['rb_text_' . $rb_name];\n $radio['checked'] = (isset($_REQUEST['rb_checked_' . $field_name]) && ($_REQUEST['rb_checked_' . $field_name] == $radio['value'])) ? 1 : 0;\n $radios[] = $radio;\n }\n // neuen Radiobutton dazunehmen\n if (isset($_REQUEST['rb_active_' . $field_id])) {\n // es soll eine neuer Radio uebernommen werden\n if (isset($_REQUEST['rb_value_' . $field_id]) && !empty($_REQUEST['rb_value_' . $field_id]) && isset($_REQUEST['rb_text_' . $field_id]) && !empty($_REQUEST['rb_text_' . $field_id])) {\n // ok - radiobutton uebernehmen\n $value = str_replace(' ', '_', strtolower(media_filename($_REQUEST['rb_value_' . $field_id])));\n $radios[] = array(\n 'name' => $field_id . '_' . $value,\n 'value' => $value,\n 'text' => $_REQUEST['rb_text_' . $field_id],\n 'checked' => 0\n );\n }\n else {\n // Definition der Checkbox ist nicht\n // vollstaendig\n $message .= $this->lang->translate('<p>The definition of the new radiobutton is not complete. Please specify a <b>value</b> and a <b>text</b> for it!</p>');\n }\n }\n // allgemeine Daten der Radiobuttons pruefen\n $field_data = array(\n dbKITformFields::field_name => (isset($_REQUEST['name_' . $field_name])) ? $_REQUEST['name_' . $field_name] : 'free_' . $field_id,\n dbKITformFields::field_title => (isset($_REQUEST['title_' . $field_name])) ? $_REQUEST['title_' . $field_name] : 'title_' . $field_id,\n dbKITformFields::field_value => (isset($_REQUEST['default_' . $field_name])) ? $_REQUEST['default_' . $field_name] : '',\n dbKITformFields::field_data_type => dbKITformFields::data_type_undefined,\n dbKITformFields::field_hint => (isset($_REQUEST['hint_' . $field_name])) ? $_REQUEST['hint_' . $field_name] : '',\n dbKITformFields::field_type_add => http_build_query($radios)\n );\n $where = array(\n dbKITformFields::field_id => $field_id\n );\n if (!$dbKITformFields->sqlUpdateRecord($field_data, $where)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $dbKITformFields->getError()));\n return false;\n }\n break;\n case dbKITformFields::type_select :\n // SELECT Auswahlliste pruefen\n $sOptions = array();\n $parse = str_replace('&amp;', '&', $data[dbKITformFields::field_type_add]);\n parse_str($parse, $sOptions);\n\n $options = array();\n foreach ($sOptions as $option) {\n $opt_name = $option['name'];\n if (!isset($_REQUEST['opt_active_' . $opt_name])) continue;\n if (!empty($_REQUEST['opt_value_' . $opt_name])) $option['value'] = $_REQUEST['opt_value_' . $opt_name];\n if (!empty($_REQUEST['opt_text_' . $opt_name])) $option['text'] = $_REQUEST['opt_text_' . $opt_name];\n $option['checked'] = (isset($_REQUEST['opt_checked_' . $field_name]) && ($_REQUEST['opt_checked_' . $field_name] == $option['value'])) ? 1 : 0;\n $options[] = $option;\n }\n // neues Auswahlfeld dazunehmen\n if (isset($_REQUEST['opt_active_' . $field_id])) {\n // es soll eine neuer OPTION Eintrag uebernommen\n // werden\n if (isset($_REQUEST['opt_value_' . $field_id]) && !empty($_REQUEST['opt_value_' . $field_id]) && isset($_REQUEST['opt_text_' . $field_id]) && !empty($_REQUEST['opt_text_' . $field_id])) {\n // ok - OPTION uebernehmen\n $value = str_replace(' ', '_', strtolower(media_filename($_REQUEST['opt_value_' . $field_id])));\n $options[] = array(\n 'name' => $field_id . '_' . $value,\n 'value' => $value,\n 'text' => $_REQUEST['opt_text_' . $field_id],\n 'checked' => 0\n );\n }\n else {\n // Definition der Auswahlliste ist nicht\n // vollstaendig\n $message .= $this->lang->translate('<p>The definition of the new selection list is not complete. Please specify a <b>value</b> and a <b>text</b> for it!</p>');\n }\n }\n // allgemeine Daten der Auswahlliste pruefen\n $field_data = array(\n dbKITformFields::field_name => (isset($_REQUEST['name_' . $field_name])) ? $_REQUEST['name_' . $field_name] : 'free_' . $field_id,\n dbKITformFields::field_title => (isset($_REQUEST['title_' . $field_name])) ? $_REQUEST['title_' . $field_name] : 'title_' . $field_id,\n dbKITformFields::field_value => (isset($_REQUEST['size_' . $field_name])) ? $_REQUEST['size_' . $field_name] : '1',\n dbKITformFields::field_data_type => dbKITformFields::data_type_undefined,\n dbKITformFields::field_hint => (isset($_REQUEST['hint_' . $field_name])) ? $_REQUEST['hint_' . $field_name] : '',\n dbKITformFields::field_type_add => http_build_query($options)\n );\n $where = array(\n dbKITformFields::field_id => $field_id\n );\n if (!$dbKITformFields->sqlUpdateRecord($field_data, $where)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $dbKITformFields->getError()));\n return false;\n }\n break;\n case dbKITformFields::type_html :\n // Daten fuer das HTML Feld pruefen\n $field_data = array(\n dbKITformFields::field_name => (isset($_REQUEST['name_' . $field_name])) ? $_REQUEST['name_' . $field_name] : 'free_' . $field_id,\n dbKITformFields::field_title => (isset($_REQUEST['title_' . $field_name])) ? $_REQUEST['title_' . $field_name] : 'title_' . $field_id,\n dbKITformFields::field_value => (isset($_REQUEST['html_' . $field_name])) ? $_REQUEST['html_' . $field_name] : '',\n dbKITformFields::field_hint => (isset($_REQUEST['hint_' . $field_name])) ? $_REQUEST['hint_' . $field_name] : '',\n dbKITformFields::field_data_type => dbKITformFields::data_type_text\n );\n $where = array(\n dbKITformFields::field_id => $field_id\n );\n if (!$dbKITformFields->sqlUpdateRecord($field_data, $where)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $dbKITformFields->getError()));\n return false;\n }\n break;\n case dbKITformFields::type_hidden :\n // Daten fuer versteckte Felder pruefen\n $field_data = array(\n dbKITformFields::field_name => (isset($_REQUEST['name_' . $field_name])) ? $_REQUEST['name_' . $field_name] : 'free_' . $field_id,\n dbKITformFields::field_title => (isset($_REQUEST['title_' . $field_name])) ? $_REQUEST['title_' . $field_name] : 'title_' . $field_id,\n dbKITformFields::field_value => (isset($_REQUEST['value_' . $field_name])) ? $_REQUEST['value_' . $field_name] : '',\n dbKITformFields::field_data_type => dbKITformFields::data_type_text\n );\n $where = array(\n dbKITformFields::field_id => $field_id\n );\n if (!$dbKITformFields->sqlUpdateRecord($field_data, $where)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $dbKITformFields->getError()));\n return false;\n }\n break;\n case dbKITformFields::type_delayed :\n // check the data for delayed transmissions\n $type_add = array();\n if (isset($_REQUEST['text_' . $field_name])) {\n $type_add = array(\n 'text' => $_REQUEST['text_' . $field_name]\n );\n }\n $field_data = array(\n dbKITformFields::field_name => dbKITformFields::kit_delayed_transmission,\n dbKITformFields::field_title => (isset($_REQUEST['title_' . $field_name])) ? $_REQUEST['title_' . $field_name] : 'title_' . $field_id,\n dbKITformFields::field_value => 1,\n dbKITformFields::field_data_type => dbKITformFields::data_type_integer,\n dbKITformFields::field_hint => (isset($_REQUEST['hint_' . $field_name])) ? $_REQUEST['hint_' . $field_name] : '',\n dbKITformFields::field_type_add => http_build_query($type_add)\n );\n $where = array(\n dbKITformFields::field_id => $field_id\n );\n if (!$dbKITformFields->sqlUpdateRecord($field_data, $where)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $dbKITformFields->getError()));\n return false;\n }\n break;\n default :\n $message .= $this->lang->translate('<p>The datatype {{ datatype }} is not supported!</p>', array(\n 'datatype' => $data[dbKITformFields::field_type]\n ));\n endswitch\n ;\n }\n }\n }\n $form_data[dbKITform::field_fields] = implode(',', $fields);\n\n // pruefen ob Pflichtfelder zurueckgestuft werden sollen\n foreach ($must_fields as $key => $value) {\n if ($value < 100) {\n // KIT Felder\n $field_name = array_search($value, $kitContactInterface->index_array);\n if (!isset($_REQUEST['must_' . $field_name])) {\n unset($must_fields[$key]);\n }\n }\n else {\n // allgemeine Felder\n $where = array(\n dbKITformFields::field_id => $value\n );\n $data = array();\n if (!$dbKITformFields->sqlSelectRecord($where, $data)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $dbKITformFields->getError()));\n return false;\n }\n if (count($data) < 1) {\n continue;\n /**\n *\n * @todo continue is only a workaround, what is the reason for\n * invalid ids?\n */\n // $this->setError(sprintf('[%s - %s] %s', __METHOD__,\n // __LINE__, kit_error_invalid_id));\n // return false;\n }\n $field_name = $data[0][dbKITformFields::field_name];\n if (!isset($_REQUEST[\"must_$field_name\"])) {\n unset($must_fields[$key]);\n }\n }\n }\n $form_data[dbKITform::field_must_fields] = implode(',', $must_fields);\n if ($checked) {\n // Datensatz fuer das Formular uebernehmen oder aktualisieren\n if ($form_id > 0) {\n // Datensatz aktualisieren\n $where = array(\n dbKITform::field_id => $form_id\n );\n if (!$dbKITform->sqlUpdateRecord($form_data, $where)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $dbKITform->getError()));\n return false;\n }\n $message .= $this->lang->translate('<p>The form with the <b>ID {{ id }}</b> was updated.</p>', array(\n 'id' => $form_id\n ));\n }\n else {\n // Datensatz einfuegen\n if (!$dbKITform->sqlInsertRecord($form_data, $form_id)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $dbKITform->getError()));\n return false;\n }\n $message .= $this->lang->translate('<p>The form with the <b>ID {{ id }}</b> was successfully created.</p>', array(\n 'id' => $form_id\n ));\n }\n // $_REQUEST's zuruecksetzen\n foreach ($form_data as $field => $value) {\n if (isset($_REQUEST[$field])) unset($_REQUEST[$field]);\n }\n // FORM_ID setzen\n $_REQUEST[dbKITform::field_id] = $form_id;\n }\n\n // KIT Datenfelder hinzufuegen\n $kit_fields = $kitContactInterface->index_array;\n if (isset($_REQUEST[self::request_add_kit_field]) && (array_key_exists($_REQUEST[self::request_add_kit_field], $kit_fields))) {\n $new_field = $_REQUEST[self::request_add_kit_field];\n if ($form_id > 0) {\n // Formular ist gueltig, neues Datenfeld einfuegen\n $fields = explode(',', $form_data[dbKITform::field_fields]);\n $fields[] = $kit_fields[$new_field];\n $where = array(\n dbKITform::field_id => $form_id\n );\n $form_data[dbKITform::field_fields] = implode(',', $fields);\n // nur die Felder aktualisieren\n $data = array(\n dbKITform::field_fields => $form_data[dbKITform::field_fields]\n );\n if (!$dbKITform->sqlUpdateRecord($data, $where)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $dbKITform->getError()));\n return false;\n }\n $message .= $this->lang->translate('<p>The KIT datafield <b>{{ field }}</b> was added to the form.</p>', array(\n 'field' => $kitContactInterface->field_array[$new_field]\n ));\n }\n else {\n // Formular ist noch nicht aktiv\n $message .= $this->lang->translate('<p>Please save the new form before you insert the datafield <b>{{ field }}</b>!</p>', array(\n 'field' => $kitContactInterface->field_array[$new_field]\n ));\n }\n }\n\n // Allgemeine Felder hinzufuegen\n if (isset($_REQUEST[self::request_add_free_field]) && ($_REQUEST[self::request_add_free_field] != -1)) {\n if (isset($_REQUEST[self::request_free_field_title]) && ($_REQUEST[self::request_free_field_title] !== $this->lang->translate('Enter title ...')) && !empty($_REQUEST[self::request_free_field_title])) {\n if ($form_id > 0) {\n // Formular ist gueltig, neues Datenfeld hinzufuegen\n $data = array(\n dbKITformFields::field_type => $_REQUEST[self::request_add_free_field],\n dbKITformFields::field_title => $_REQUEST[self::request_free_field_title],\n dbKITformFields::field_form_id => $form_id\n );\n $field_id = -1;\n if (!$dbKITformFields->sqlInsertRecord($data, $field_id)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $dbKITformFields->getError()));\n return false;\n }\n if ($data[dbKITformFields::field_type] == dbKITformFields::type_file) {\n // create settings for file uploads\n $upload_max_filesize = $this->convertBytes(ini_get('upload_max_filesize'));\n $post_max_size = $this->convertBytes(ini_get('post_max_size'));\n $max_filesize = $upload_max_filesize;\n\n $settings = array(\n 'upload_method' => array(\n 'label' => 'Upload method',\n 'name' => \"upload_method_free_$field_id\",\n 'value' => 'standard'\n ),\n 'file_types' => array(\n 'label' => 'Allowed filetypes',\n 'name' => \"file_types_free_$field_id\",\n 'value' => $this->file_allowed_filetypes\n ),\n 'max_file_size' => array(\n 'label' => 'max. filesize (MB)',\n 'name' => \"max_file_size_free_$field_id\",\n 'value' => $max_filesize / 1024 / 1024\n )\n );\n $data = array(\n dbKITformFields::field_name => \"free_$field_id\",\n dbKITformFields::field_type_add => http_build_query($settings)\n );\n }\n elseif ($data[dbKITformFields::field_type] == dbKITformFields::type_delayed) {\n // create settings for delayed transmissions\n $data = array(\n dbKITformFields::field_name => dbKITformFields::kit_delayed_transmission,\n dbKITformFields::field_value => 1\n );\n }\n else {\n // create all other fields ...\n $data = array(\n dbKITformFields::field_name => \"free_$field_id\"\n );\n }\n $where = array(\n dbKITformFields::field_id => $field_id\n );\n if (!$dbKITformFields->sqlUpdateRecord($data, $where)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $dbKITformFields->getError()));\n return false;\n }\n $fields = explode(',', $form_data[dbKITform::field_fields]);\n $fields[] = $field_id;\n $where = array(\n dbKITform::field_id => $form_id\n );\n $form_data[dbKITform::field_fields] = implode(',', $fields);\n $data[dbKITform::field_fields] = $form_data[dbKITform::field_fields];\n if (!$dbKITform->sqlUpdateRecord($data, $where)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $dbKITform->getError()));\n return false;\n }\n $message .= $this->lang->translate('<p>The general datafield <b>{{ field }}</b> was added to the form.</p>', array(\n 'field' => $_REQUEST[self::request_free_field_title]\n ));\n }\n else {\n // Formular ist noch nicht aktiv\n $message .= $this->lang->translate('<p>Please save the new form before you insert the datafield <b>{{ field }}</b>!</p>', array(\n 'field' => $_REQUEST[self::request_free_field_title]\n ));\n }\n }\n else {\n // Titel fehlt oder ist unguelig\n $message .= $this->lang->translate('<p>Please select a datafield <b>and</b> specify a title for the new field!</p>');\n }\n }\n\n // Sortierung pruefen\n $where = array(\n dbKITformTableSort::field_value => $form_id,\n dbKITformTableSort::field_table => 'mod_kit_form'\n );\n $sorter = array();\n if (!$dbKITformTableSort->sqlSelectRecord($where, $sorter)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $dbKITformTableSort->getError()));\n return false;\n }\n if (count($sorter) > 0) {\n $form_fields = explode(',', $form_data[dbKITform::field_fields]);\n $sort_fields = explode(',', $sorter[0][dbKITformTableSort::field_order]);\n // erster Schritt: Sortierfeld bereinigen\n $unset = array_diff($sort_fields, $form_fields);\n foreach ($unset as $id) {\n $key = array_search($id, $sort_fields);\n unset($sort_fields[$key]);\n }\n // zweiter Schritt: Sortierfeld ergaenzen\n $add = array_diff($form_fields, $sort_fields);\n foreach ($add as $id) {\n $sort_fields[] = $id;\n }\n // letzter Schritt: Sortierfeld uebernehmen\n $form_data[dbKITform::field_fields] = implode(',', $sort_fields);\n $where = array(\n dbKITform::field_id => $form_id\n );\n // nur die Sortierung aktualisieren\n $data = array(\n dbKITform::field_fields => $form_data[dbKITform::field_fields]\n );\n if (!$dbKITform->sqlUpdateRecord($data, $where)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $dbKITform->getError()));\n return false;\n }\n }\n $this->setMessage($message);\n return $this->dlgFormEdit();\n }", "title": "" }, { "docid": "967f3ef03b3bce302e80de59fcccc436", "score": "0.5715323", "text": "function marketing_concierge_additional_order_form_validate($form, &$form_state){\n $values = $form_state['values'];\n\n $direct_mail = $values['direct_mail_postcards'];\n $order = commerce_order_load($values['order_id']);\n if($form_state['step'] == 2){\n\t $sstest = $values['direct_mail_postcards_9']['upload_own_list'];\n\t $stest = count($order->field_just_listed_mail_list['und']['0']['fid']);\n\t if ($stest == 0 && $sstest != '0') {\n\t\tform_set_error('direct_mail_postcards_9', 'Please upload your list before continuing.');\n\t }\n\t $lstest = $values['direct_mail_postcards_10']['upload_own_list'];\n\t $ltest = count($order->field_just_sold_mail_list['und']['0']['fid']);\n\t if ($ltest == 0 && $lstest != '0') {\n\t\tform_set_error('direct_mail_postcards_10', 'Please upload your list before continuing.');\n\t }\n\t}\n}", "title": "" }, { "docid": "04024208db355ac34e80dc347a416a26", "score": "0.5705266", "text": "public function validateForm(array &$form, FormStateInterface $form_state) {\n parent::validateForm($form, $form_state);\n }", "title": "" }, { "docid": "04024208db355ac34e80dc347a416a26", "score": "0.5705266", "text": "public function validateForm(array &$form, FormStateInterface $form_state) {\n parent::validateForm($form, $form_state);\n }", "title": "" }, { "docid": "6e8dbe38cfbf5026e2633f4308e41202", "score": "0.570162", "text": "static function validate($validation_result){\t\t\n\t\t// 2 - Get the form object from the validation result\n\t\t$form = $validation_result[\"form\"];\n\t\t\n\t\t//if the crm is attached\n\t\tif($form['customcrm_enabled']){\n\t\t\t// 3 - Get the current page being validated\n\t\t\t$current_page = rgpost('gform_source_page_number_' . $form['id']) ? rgpost('gform_source_page_number_' . $form['id']) : 1;\n\t\t\t\n\t\t\t//loop thouth the form fields\n\t\t\tforeach($form['fields'] as &$field){\n\t\t\t\t// 6 - Get the field's page number\n\t\t\t\t$field_page = $field['pageNumber'];\n\n\t\t\t\t// 7 - Check if the field is hidden by GF conditional logic\n\t\t\t\t$is_hidden = RGFormsModel::is_field_hidden($form, $field, array());\n\n\t\t\t\t// 8 - If the field is not on the current page OR if the field is hidden, skip it\n\t\t\t\tif($field_page != $current_page || $is_hidden) continue;\n\t\t\t\t\n\t\t\t\tswitch(RGFormsModel::get_input_type($field)){\n\t\t\t\t\tcase \"address\" :\n\t\t\t\t\t\tif($field[\"isRequired\"])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$street = $_POST[\"input_\" . $field[\"id\"] . \"_1\"];\n\t\t\t\t\t\t\t$city = $_POST[\"input_\" . $field[\"id\"] . \"_3\"];\n\t\t\t\t\t\t\t$state = $_POST[\"input_\" . $field[\"id\"] . \"_4\"];\n\t\t\t\t\t\t\t$zip = $_POST[\"input_\" . $field[\"id\"] . \"_5\"];\n\t\t\t\t\t\t\t$country = $_POST[\"input_\" . $field[\"id\"] . \"_6\"];\n\t\t\t\t\t\t\tif(empty($street) || empty($city) || empty($zip) || (empty($state) && !$field[\"hideState\"] ) || (empty($country) && !$field[\"hideCountry\"])){\n\t\t\t\t\t\t\t\t$field[\"failed_validation\"] = true;\n\t\t\t\t\t\t\t\t$field[\"validation_message\"] = empty($field[\"errorMessage\"]) ? __(\"This field is required. Please enter a complete address.\", \"gravityforms\") : $field[\"errorMessage\"];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(!is_numeric($zip)){\n\t\t\t\t\t\t\t\t$field[\"failed_validation\"] = true;\n\t\t\t\t\t\t\t\t$field[\"validation_message\"] = __(\"Zip code must be numeric\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t$validation_result['form'] = $form;\n\t\treturn $validation_result;\n\t\t\n\t}", "title": "" }, { "docid": "f5b745d69790170fb3f26309daf03b0f", "score": "0.56994486", "text": "function validate_form($fields_to_validate = null)\n {\n $h = parent::validate_form($fields_to_validate);\n\n return $h;\n }", "title": "" }, { "docid": "21070589888d95a2683b0ee629ff73d9", "score": "0.56983364", "text": "function validForm()\r\n{\r\n global $f3;\r\n $isValid = true;\r\n\r\n if (!validName($f3->get('fname')))\r\n {\r\n $isValid = false;\r\n $f3->set(\"errors['fname']\", \"Please enter a valid first name\");\r\n }\r\n\r\n if (!validName($f3->get('lname')))\r\n {\r\n $isValid = false;\r\n $f3->set(\"errors['lname']\", \"Please enter a valid last name\");\r\n }\r\n\r\n if (!validAddress($f3->get('address')))\r\n {\r\n $isValid = false;\r\n $f3->set(\"errors['address']\", \"Please enter your address\");\r\n }\r\n\r\n if (!validEmail($f3->get('email')))\r\n {\r\n $isValid = false;\r\n $f3->set(\"errors['email']\", \"Please enter a valid email address\");\r\n }\r\n\r\n if (!validPassword($f3->get('pass')))\r\n {\r\n $isValid = false;\r\n $f3->set(\"errors['pass']\", \"Please enter a valid password, at least 7 characters\");\r\n }\r\n\r\n if (!validSamePass($f3->get('pass'), $f3->get('pass1')))\r\n {\r\n $isValid = false;\r\n $f3->set(\"errors['pass1']\", \"Password must be matched, Please re-enter your password\");\r\n }\r\n return $isValid;\r\n}", "title": "" }, { "docid": "1bb2daa047aa51070d704cc179fb0dff", "score": "0.56976366", "text": "private function formIsValid()\n\t{\n\t\tif (strlen(Tools::getValue('certissim_login')) < 1)\n\t\t\t$this->_errors[] = $this->l('Login can\\'t be empty');\n\t\tif (strlen(Tools::getValue('certissim_password')) < 1)\n\t\t\t$this->_errors[] = $this->l('Password can\\'t be empty');\n\t\tif (strlen(Tools::getValue('certissim_siteid')) < 1)\n\t\t\t$this->_errors[] = $this->l('Siteid can\\'t be empty');\n\t\tif (!preg_match('#^[0-9]+$#', Tools::getValue('certissim_siteid')))\n\t\t\t$this->_errors[] = $this->l('Siteid has to be integer.');\n\t\tif (!in_array(Tools::getValue('certissim_status'), $this->_certissim_statuses))\n\t\t\t$this->_errors[] = $this->l('You must give a correct status');\n\t\tif (!in_array(Tools::getValue('certissim_default_product_type'), array_keys($this->_product_types)))\n\t\t\t$this->_errors[] = $this->l('You must configure a valid default product type');\n\t\tif (!in_array(Tools::getValue('certissim_default_carrier_type'), array_keys($this->_carrier_types)))\n\t\t\t$this->_errors[] = $this->l('You must configure a valid default carrier type');\n\n\t\t//categories check\n\t\t$shop_categories = $this->loadProductCategories();\n\t\tforeach ($shop_categories as $id => $shop_category)\n\t\t\tif (!in_array(Tools::getValue('certissim_'.$id.'_product_type'), array_merge(array_keys($this->_product_types), array('0'))))\n\t\t\t\t$this->_errors[] = $this->l('Invalid product type for category:').\" '\".$shop_category['name'].\"'\";\n\n\t\t//carriers check\n\t\t$shop_carriers = $this->loadCarriers();\n\t\tforeach ($shop_carriers as $id => $shop_carrier)\n\t\t\tif (!in_array(Tools::getValue('certissim_'.$id.'_carrier_type'), array_merge(array_keys($this->_carrier_types), array('0'))))\n\t\t\t\t$this->_errors[] = $this->l('Invalid carrier type for carrier:').\" '\".$shop_carrier['name'].\"'\";\n\n\t\t//payment types check\n\t\t$shop_payments = $this->loadPaymentMethods();\n\t\tforeach ($shop_payments as $id => $shop_payment)\n\t\t\tif (!in_array(Tools::getValue('certissim_'.$id.'_payment_type'), array_keys($this->_payment_types)))\n\t\t\t\t$this->_errors[] = $this->l('Invalid payment type for method:').\" '\".$shop_payment['name'].\"'\";\n\n\t\treturn empty($this->_errors);\n\t}", "title": "" }, { "docid": "b48d1ae1e4a373455852f4a51fe816b3", "score": "0.56976193", "text": "private function handle_form_not_validated() {\n // If not valid, warn the user.\n \\core\\notification::error(get_string('training_management_warning_invalid_form', 'tool_attestoodle'));\n }", "title": "" }, { "docid": "92e99f2703cfdaa2de0984979363fda7", "score": "0.5697187", "text": "function commerce_installments_edit_form_validate(&$form, &$form_state) {\n $installment = $form_state['commerce_installments'];\n \n // Notify field widgets to validate their data.\n field_attach_form_validate('commerce_installments', $installment, $form, $form_state);\n}", "title": "" }, { "docid": "4bd025e69f3f9af7f2c270c53ad65dde", "score": "0.5690489", "text": "public function validate_fields(string $error_type = 'template', array $required = array(), array $datatypes = array(), array $minlength = array(), array $maxlength = array(), array $labels = array())\n{ \n\n // Debug\n debug::add(4, tr(\"Starting to validate various form fields\"));\n\n // Check required fields\n foreach ($required as $var) { \n $value = app::_post($var) ?? '';\n if ($value == '') { \n $label = $labels[$var] ?? ucwords(str_replace(\"_\", \" \", $var));\n\n if ($error_type == 'template') { view::add_callout(tr(\"The form field %s was left blank, and is required\", $label), 'error'); }\n else { throw new FormException('field_required', $label); }\n }\n }\n\n // Check data types\n foreach ($datatypes as $var => $type) { \n\n // Set variables\n $errmsg = '';\n $value = app::_post($var) ?? '';\n $label = $labels[$var] ?? ucwords(str_replace(\"_\", \" \", $var));\n\n // Check type\n if ($type == 'alphanum' && !preg_match('/^[a-zA-Z]+[a-zA-Z0-9._]+$/', $value)) { \n $errmsg = \"The form field %s must be alpha-numeric, and can not contain spaces or special characters.\";\n\n } elseif ($type == 'integer' && preg_match(\"/\\D/\", (string) $value)) { \n $errmsg = \"The form field %s must be an integer only.\";\n\n } elseif ($type == 'decimal' && $value != '' && !preg_match(\"/^[0-9]+(\\.[0-9]{1,8})?$/\", (string) $value)) { \n $errmsg = \"The form field %s can only be a decimal / amount.\";\n\n } elseif ($type == 'email' && !filter_var($value, FILTER_VALIDATE_EMAIL)) { \n $errmsg = \"The form field %s must be a valid e-mail address.\";\n\n } elseif ($type == 'url' && !filter_var($value, FILTER_VALIDATE_URL)) { \n $errmsg = \"The form field %s must be a valid URL.\";\n }\n\n // Give error if needed\n if ($errmsg != '') { \n if ($error_type == 'template') { view::add_callout(tr($errmsg, $label), 'error'); }\n else { throw new ApexException('error', $errmsg, $label); }\n }\n }\n\n // Minlength\n foreach ($minlength as $var => $length) { \n $value = app::_post($var) ?? '';\n\n if (strlen($value) < $length) { \n $label = $labels[$var] ?? ucwords(str_replace(\"_\", \" \", $var));\n $errmsg = tr(\"The form field %s must be a minimum of %i characters in length.\", $label, $length);\n\n if ($error_type == 'template') { view::add_callout($errmsg, 'error'); }\n else {throw new ApexException('error', $errmsg); }\n }\n }\n\n // Max lengths\n foreach ($maxlength as $var => $length) { \n $value = app::_post($var) ?? '';\n\n // Check\n if (strlen($value) > $length) { \n $label = $labels[$var] ?? ucwords(str_replace(\"_\", \" \", $var));\n $errmsg = tr(\"The form field %s can not exceed a maximum of %i characters.\", $label, $length);\n\n if ($error_type == 'template') { view::add_callout($errmsg, 'error'); }\n else { throw new ApexException('error', $errmsg); }\n }\n }\n\n // Debug\n debug::add(4, \"Completed validating all various form fields\");\n\n\n}", "title": "" }, { "docid": "03efa7a58e6443fdef4b74fcd10e8440", "score": "0.568579", "text": "function validate_form(array &$form, array $safe_input): bool\n{\n $success = true;\n\n if (isset($form['fields'])) {\n foreach ($form['fields'] as $field_index => &$field) {\n $field['value'] = $safe_input[$field_index];\n\n foreach ($field['validate'] ?? [] as $validator_index => $field_validator) {\n if (is_array($field_validator)) {\n $validator_function = $validator_index;\n $validator_params = $field_validator;\n\n $is_valid = $validator_function($field['value'], $field, $validator_params);\n } else {\n $validator_function = $field_validator;\n\n $is_valid = $validator_function($field['value'], $field);\n }\n if (!$is_valid) {\n $success = false;\n break;\n }\n }\n }\n }\n //Dabar tikrinsim formos lygio validatorius\n foreach ($form['validators'] ?? [] as $validator_index => $form_validator) {\n if (is_array($form_validator)) {\n $validator_function = $validator_index;\n $validator_params = $form_validator;\n\n $is_valid = $validator_function($safe_input, $form, $validator_params);\n } else {\n $validator_function = $form_validator;\n\n $is_valid = $validator_function($safe_input, $form);\n }\n if (!$is_valid) {\n $success = false;\n break;\n }\n }\n\n if ($success) {\n if (isset($form['callbacks']['success'])) {\n $form['callbacks']['success']($safe_input, $form);\n }\n } else {\n if (isset($form['callbacks']['fail'])) {\n $form['callbacks']['fail']($safe_input, $form);\n }\n }\n\n return $success;\n}", "title": "" }, { "docid": "3abef8429222a2288b78be1634cef8e9", "score": "0.567835", "text": "function contactlog_admin_overview_validate($form, &$form_state) {\n $form_state['values']['contactlogs'] = array_diff($form_state['values']['contactlogs'], array(0));\n if (count($form_state['values']['contactlogs']) == 0) {\n form_set_error('', t('Please select one or more contactlogs to perform the update on.'));\n }\n}", "title": "" }, { "docid": "2e7c6d837f9f63e3bfc97aa13806609c", "score": "0.5676313", "text": "function team_solicitud_validate($form, &$form_state) {\n\tglobal $user;\n\t$nid_Equipo = $form_state['values']['nid_Equipo'];\n\t//Verifica que no se inserten dos solicitudes por parte del jugador\n\t\n\t$solicitud = db_fetch_object(db_query('SELECT ie.Estado FROM {eSM_Integrantes_Equipo} AS ie\n\t\t\t\t\t\t\t\t\t\t INNER JOIN {eSM_Jugador} AS j ON ie.id_Jugador = j.id_Jugador\n\t\t\t\t\t\t\t\t\t\t WHERE j.uid = %d AND ie.nid_Equipo = %d',\n\t\t\t\t\t\t\t\t\t\t $user->uid, $nid_Equipo));\n\t\n\tif (is_object($solicitud)) {\n\t\tif($solicitud->Estado == INVITADO) {\n\t\t\tform_set_error('nid_Equipo', t('El capitan de este equipo ya te ha invitado.'));\n\t\t}\n\t\t\t\n\t\tif($solicitud->Estado == SOLICITA) {\n\t\t\tform_set_error('nid_Equipo', t('Ya has enviado esta solicitud anteriormente.'));\n\t\t}\n\t}\n\t//Verifica que el equipo tenga espacio para aceptar al jugador\n\t$equipo = node_load(array('nid' => $nid_Equipo));\n\t$modalidad = get_modalidad($equipo->id_Modalidad_Juego_Temporada);\n\t$num_players = _team_num_players($equipo->nid);\n\tif ($num_players == $modalidad->Maximo_Jugadores) {\n\t\tform_set_error('nid_Equipo', t('Este equipo ya tiene el máximo de jugadores permitidos en esta modalidad. </br>No puedes enviar esta solicitud.'));\n\t}\n\t//Verifica que el usuario no tenga equipo todavía\n\t$estado = tiene_equipo($user->uid, $modalidad->id_Modalidad_Juego_Temporada);\n\tif ($estado == TIENE_EQUIPO) {\n\t form_set_error('nid_Equipo', t('Ya perteneces a un equipo en esta modalidad.'));\n\t}\n}", "title": "" }, { "docid": "5ca2b4c107a669043e9b2f475250ca10", "score": "0.5669931", "text": "function skimlinks_admin_settings_form_validate($form, &$form_state) {\n\n $publisher_id = &$form_state['values']['skimlinks_publisherid'];\n\n // Trim whitespace\n $publisher_id = trim($publisher_id);\n\n // Ensure the skimlinks account consist of only numbers and letters\n if (!preg_match('/^[a-zA-Z0-9]*$/', $publisher_id)) {\n form_set_error('skimlinks_publisherid', 'A valid Domain ID should have the following format: 000000X000000');\n\n return FALSE;\n }\n\n if ($form_state['values']['skimlinks_subdomain']) {\n $subdomain = &$form_state['values']['skimlinks_subdomain'];\n $subdomain = _skimlinks_clean_url($subdomain);\n }\n else {\n form_set_value($form['account']['skimlinks_subdomain'], 'go.redirectingat.com', $form_state);\n }\n}", "title": "" }, { "docid": "0b865c80a17f0849fb512b24b9ecaa35", "score": "0.56654215", "text": "function _webform_form_config_translate_add_form_validate(&$form, FormStateInterface $form_state) {\n $values = $form_state->getValues();\n\n $config_name = $form_state->get('webform_config_name');\n $source_elements = $form_state->get('webform_source_elements');\n $submitted_translation_elements = Yaml::decode($values['translation']['config_names'][$config_name]['elements']);\n $translation_elements = $source_elements;\n\n // Remove all custom translation properties.\n WebformElementHelper::merge($translation_elements, $submitted_translation_elements);\n\n // Remove any translation property that has not been translated.\n _webform_form_config_translate_add_form_filter_elements($translation_elements, $source_elements);\n\n // Update webform value.\n $values['translation']['config_names'][$config_name]['elements'] = ($translation_elements) ? Yaml::encode($translation_elements) : '';\n $form_state->setValues($values);\n}", "title": "" }, { "docid": "c71da4631b08f7230757f29f63bb3135", "score": "0.5663044", "text": "public function validate()\n {\n $submit = $this->getPost(\"question\");\n $submit_other = $this->getPost(\"other_question\");\n $value = [];\n $value[\"value\"] = $submit[$this->id];\n $value[\"other\"] = $submit_other[$this->id];\n $varInput = $this->validator($value);\n $this->value = $varInput;\n }", "title": "" }, { "docid": "62d0276187348fc509464f9ccc9e3959", "score": "0.5658114", "text": "function searchFormSidebar_validate($form, $form_state)\n{\n $allEmpty = true;\n\n // ensure that there is at least one field filled in\n while(true){\n if (!empty($form_state['values']['name'])){ // check the name\n $allEmpty = false;\n break;\n }\n foreach($form_state['values']['status'] as $status){ //check statuses\n if ($status != '0'){\n\t$allEmpty = false;\n\tbreak 2;\n }\n }\n foreach($form_state['values']['teams'] as $team){ //check teams\n if ($team != '0'){\n\t$allEmpty = false;\n\tbreak 2;\n }\n }\n if (isset($form_state['showAdvanced'])){\n if ($form_state['values']['country'] != '[none]' || $form_state['values']['state'] != '[none]'\n\t || !empty($form_state['values']['city']) || !empty($form_state['co_organization'])\n\t || !empty($form_state['values']['within5Years']) || !empty($form_state['values']['date']) \n\t || !empty($form_state['values']['year']) || !empty($form_state['values']['tags'])){\n\t$allEmpty = false;\n\tbreak;\n }\n }\n break;\n }\n\n if ($allEmpty){\n form_set_error('', 'You need to fill out at least one field.');\n }\n\n // ensure there are <2 time constraints selected\n $timeConstraints = 0;\n $timeConstraints += !empty($form_state['values']['within5Years']) ? 1 : 0;\n $timeConstraints += isset($form_state['values']['date']) ? 1 : 0;\n $timeConstraints += isset($form_state['values']['year']) && $form_state['values']['year'] != 'select' ? 1 : 0;\n\n if ($timeConstraints > 1){\n form_set_error('', 'Please pick at most one time constraint.');\n }\n}", "title": "" }, { "docid": "ee3aaf0ee841a42bd27e953518779a76", "score": "0.56547076", "text": "public function _postValidation(&$postErrors) {\n \n }", "title": "" }, { "docid": "f3832763ee9069bc82b826ddf556803a", "score": "0.56475", "text": "private static function check_form_edit( ) {\n\t\tif ( isset( $_POST['save-translation-group'] ) ) {\n\t\t\tcheck_admin_referer( 'save-translation-group' );\n\n\t\t\t// Get existing settings\n\t\t\t$db_settings = get_site_option( BEA_MM_OPTION );\n\t\t\tif ( $db_settings == false ) {\n\t\t\t\t$db_settings = array( );\n\t\t\t}\n\n\t\t\t// Strip ?\n\t\t\t$_POST['groupsites'] = stripslashes_deep( $_POST['groupsites'] );\n\t\t\t\n\t\t\t// Santize data\n\t\t\tforeach ( $_POST['groupsites'] as $groupsite_name => $groupsite ) {\n\t\t\t\t// Check tcheat ?\n\t\t\t\tif ( !isset( $db_settings[$groupsite_name] ) ) {\n\t\t\t\t\twp_die( __( 'Tcheater' ) );\n\t\t\t\t}\n\n\t\t\t\t// Label are filled ?\n\t\t\t\tif ( empty( $groupsite['label'] ) ) {\n\t\t\t\t\tadd_settings_error( 'bea-mm-network', 'translation_group', __( 'All label fields are required.' ), 'error' );\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// Update value\n\t\t\t\t$db_settings[$groupsite_name]['label'] = $groupsite['label'];\n\n\t\t\t\t// Check for delation ?\n\t\t\t\tif ( isset( $groupsite['delete'] ) ) {\n\t\t\t\t\tunset( $db_settings[$groupsite_name] );\n\t\t\t\t\tBea_MM_GroupSites_Factory::deregister($groupsite_name);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Update data into settings\n\t\t\tupdate_site_option( BEA_MM_OPTION, $db_settings );\n\n\t\t\tadd_settings_error( 'bea-mm-network', 'translation_group', __( 'Translation group updated.' ), 'updated' );\n\t\t}\n\t}", "title": "" }, { "docid": "a0de232bdf2f2ef3d2210cfb0e81e48e", "score": "0.56397784", "text": "function fileshare_edit_form_validate(&$form, &$form_state) {\n $fileshare = $form_state['fileshare'];\n\n // Validate the recipient's access to the fileshare system\n if ($recipient = user_load($form_state['values']['recipient'])) {\n if (!user_access('use fileshare system', $recipient)) {\n form_set_error('recipient', t('@recipient cannot receive messages.', array('@recipient' => $recipient->name)));\n }\n }\n else {\n form_set_error('recipient', t('Please enter a valid user to send the message to.'));\n }\n\n // Validate the Carbon Copy field\n if (!empty($form_state['values']['carbon'])) {\n $cc_array = explode(',', $form_state['values']['carbon']);\n foreach ($cc_array as $email) {\n if (!valid_email_address(trim($email))) {\n form_set_error('carbon', t('%email is not a valid email address.', array('%email' => $email)));\n }\n }\n }\n\n // Notify field widgets to validate their data.\n field_attach_form_validate('fileshare', $fileshare, $form, $form_state);\n}", "title": "" }, { "docid": "a530f245dfdc8a0872f6ad537386e113", "score": "0.5638102", "text": "function account_pane_checkout_form_validate($form, &$form_state, $checkout_pane, $order)\n{\n global $user;\n\n $fields = array();\n\n if (!empty($form_state['values'][$checkout_pane['pane_id']])) {\n $pane_values = $form_state['values'][$checkout_pane['pane_id']];\n\n // если введен email\n if ($user->uid == 0) {\n if (!empty($pane_values['access']['mail'])) {\n // проверить валидность email\n if ($error = user_validate_mail($pane_values['access']['mail'])) {\n form_set_error($checkout_pane['pane_id'] . '][access][mail', $error);\n $fields[] = 'mail';\n }\n\n // проверить, существует ли такой пользователь в бд\n $account = db_select('users', 'u')\n ->fields('u', array('uid', 'name'))\n ->condition('mail', $pane_values['access']['mail'])\n ->range(0, 1)\n ->execute()\n ->fetchObject();\n\n // если существует\n if ($account && $account->uid) {\n // если пароль ещё не затребован - вывести сообщение и поле для пароля\n if (empty($form_state['pass_demand'])) {\n // $link = l('Войдите с паролем', '/ajax_register/login/nojs', array(\n // 'query' => array(\n // 'email=' . $pane_values['access']['mail'],\n // 'redirect=/checkout',\n // ),\n // 'attributes' => array('class' => array('ctools-use-modal', 'ctools-modal-ctools-ajax-register-style', 'default-throbber')),\n // ));\n // form_set_error($checkout_pane['pane_id'] . '][access][mail', $link . ' или укажите другой e-mail, чтобы оформить заказ');\n form_set_error($checkout_pane['pane_id'] . '][access][pass', 'Введите пароль или укажите другой e-mail, чтобы оформить заказ');\n $fields[] = 'mail';\n\n // при следующей проверке требовать пароль или проверять, введен ли новый email\n $form_state['mail_demand'] = $pane_values['access']['mail'];\n $form_state['pass_demand'] = true;\n }\n // если пароль уже задан, попытаться авторизовать\n else {\n if ($uid = user_authenticate($account->name, $pane_values['access']['pass'])) {\n $user = user_load($uid);\n user_login_finalize();\n } else {\n form_set_error($checkout_pane['pane_id'] . '][access][pass', 'Неверный пароль для указанного e-mail.');\n $fields[] = 'pass';\n }\n }\n }\n } else {\n $fields[] = 'access][mail';\n }\n }\n\n if (empty($pane_values['phone'])) { $fields[] = 'phone'; }\n if (empty($pane_values['surname'])) { $fields[] = 'surname'; }\n if (empty($pane_values['name_first'])) { $fields[] = 'name_first'; }\n if (empty($pane_values['name_second'])) { $fields[] = 'name_second'; }\n }\n\n if ($fields) {\n $message = 'Заполните поля информации о пользователе, выделенные красным.';\n foreach($fields as $field) {\n if ($field != 'mail' && $field != 'pass') {\n form_set_error($checkout_pane['pane_id'] . '][' . $field, $message);\n $message = '';\n }\n }\n return false;\n } else {\n return true;\n }\n}", "title": "" }, { "docid": "e657696e181538e02e1961e7c1579c47", "score": "0.56356555", "text": "protected function processForm() {\n\t\t$success = false;\n\t\tif ($this->form) {\n\t\t\t$this->form->validate();\n\t\t\tif ($this->form->valid) {\n\t\t\t\t$valid = true;\n\t\t\t\tif (isset($this->params['customValidate'])) {\n\t\t\t\t\t$valid = $this->customValidation();\n\t\t\t\t}\n\t\t\t\tif ($valid) {\n\t\t\t\t\t//echo(\"Valid? \".(($valid) ? 'true' : 'false').\"<br />\");\n\t\t\t\t\t$this->dataModel->applyData($this->input,$this->params['currUser']);\n\t\t\t\t\tif ($this->dataModel->save()) {\n\t\t\t\t\t\t$this->outMess = \"Your submission was completed successfully.\";\n\t\t\t\t\t\t$this->messageType = 'success';\n\t\t\t\t\t\t$success = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!$success) {\n\t\t\t$this->outMess = \"Errors were encountered processing your request.\";\n\t\t\tif (!empty($this->form->errors)) {\n\t\t\t\t$this->outMess .= \"Errors: \".$this->form->errors;\n\t\t\t} else if ($this->dataModel->errorCode != -1) {\n\t\t\t\t$this->outMess .= \"Errors: \".$this->dataModel->statusMess;\n\t\t\t}\n\t\t\t$this->messageType = 'fail';\n\t\t}\n\t\tif ($this->debug) {\n\t\t\t$this->data['dump'] = $this->dataModel->dumpData();\n\t\t}\n\t\treturn $success;\n\t}", "title": "" }, { "docid": "db369cfb17bd45fd872d0f59d8fad912", "score": "0.56352586", "text": "private function postValidation()\n {\n if (Tools::getIsset('btnSubmit')) {\n if (!Tools::getIsset('clientcode')) {\n $this->postErrors[] = $this->l('Client Code required');\n }\n if (!Tools::getIsset('pass')) {\n $this->postErrors[] = $this->l('User Password required');\n }\n\n if (Tools::getValue('newpage_payment') != 2\n && (!filter_var(Tools::getValue('iframe_height'), FILTER_VALIDATE_INT) ||\n Tools::getValue('iframe_height') < 440)\n ) {\n $this->postErrors[] = $this->l('The height of the iframe must be at least 440');\n }\n\n // Check Terminal empty fields SECURE\n foreach (Tools::getValue('term') as $key => $term) {\n if ((Tools::getValue('terminales')[$key] == 0 ||\n Tools::getValue('terminales')[$key] == 2) && ($term == \"\" || !is_numeric($term))) {\n $this->postErrors[] = $this->l('Terminal') . \" \" . ($key + 1) . \"º. [3D SECURE] \" .\n $this->l('Terminal number invalid');\n }\n if ((Tools::getValue('terminales')[$key] == 0 ||\n Tools::getValue('terminales')[$key] == 2) && Tools::getValue('pass')[$key] == \"\") {\n $this->postErrors[] = $this->l('Terminal') . \" \" . ($key + 1) . \"º. [3D SECURE] \" .\n $this->l('Password invalid');\n }\n if ((Tools::getValue('terminales')[$key] == 0 ||\n Tools::getValue('terminales')[$key] == 2) && Tools::getValue('jetid')[$key] == \"\" &&\n Tools::getValue('integration') == 1) {\n $this->postErrors[] = $this->l('Terminal') . \" \" . ($key + 1) . \"º. [3D SECURE] \" .\n $this->l('JET ID number invalid');\n }\n }\n\n // Check Terminal empty fields NO SECURE\n foreach (Tools::getValue('term_ns') as $key => $term_ns) {\n if ((Tools::getValue('terminales')[$key] == 1 ||\n Tools::getValue('terminales')[$key] == 2) && ($term_ns == \"\" || !is_numeric($term_ns))) {\n $this->postErrors[] = $this->l('Terminal') . \" \" . ($key + 1) . \"º. [NO 3D SECURE] \" .\n $this->l('Terminal number invalid');\n }\n if ((Tools::getValue('terminales')[$key] == 1 ||\n Tools::getValue('terminales')[$key] == 2) && Tools::getValue('pass_ns')[$key] == \"\") {\n $this->postErrors[] = $this->l('Terminal') . \" \" . ($key + 1) . \"º. [NO 3D SECURE] \" .\n $this->l('Password invalid');\n }\n if ((Tools::getValue('terminales')[$key] == 1 ||\n Tools::getValue('terminales')[$key] == 2) &&\n Tools::getValue('jetid_ns')[$key] == \"\" &&\n Tools::getValue('integration') == 1) {\n $this->postErrors[] = $this->l('Terminal') . \" \" . ($key + 1) . \"º. [NO 3D SECURE] \" .\n $this->l('JET ID number invalid');\n }\n }\n\n // Check 3Dmin and Currency\n foreach (Tools::getValue('term_ns') as $key => $term_ns) {\n if (Tools::getValue('terminales')[$key] == 2 &&\n (Tools::getValue('tdmin')[$key] != \"\" &&\n !is_numeric(Tools::getValue('tdmin')[$key]))) {\n $this->postErrors[] = $this->l('Terminal') . \" \" . ($key + 1) . \"º. \" .\n $this->l('Use 3D Secure on purchases over invalid');\n }\n if (empty(Tools::getValue('moneda')[$key])) {\n $this->postErrors[] = $this->l('Terminal') . \" \" . ($key + 1) . \"º. \" .\n $this->l('Currency required');\n }\n }\n\n // Check Duplicate Terms\n $arrTerminales = array_unique(Tools::getValue('term'));\n if (sizeof($arrTerminales) != sizeof(Tools::getValue('term'))) {\n $this->postErrors[] = $this->l('Duplicate Terminals');\n }\n\n // Check Duplicate Currency\n $arrMonedas = array_unique(Tools::getValue('moneda'));\n if (sizeof($arrMonedas) != sizeof(Tools::getValue('moneda'))) {\n $this->postErrors[] = $this->l('Duplicate Currency. Specify a different currency for each terminal');\n }\n\n // Si no hay errores previos se contrastan los datos\n if (!sizeof($this->postErrors)) {\n $arrValidatePaycomet = $this->validatePaycomet();\n if ($arrValidatePaycomet[\"error\"] != 0) {\n $this->postErrors[] = $arrValidatePaycomet[\"error_txt\"];\n }\n }\n }\n }", "title": "" }, { "docid": "946d1b6d71500d254780bb98c63ac81b", "score": "0.56269735", "text": "function cma_employment_form_validate($form_id, $form_values) {\n\t\n}", "title": "" }, { "docid": "1c8458e6b82877b19cb89fe4c2c79189", "score": "0.5626816", "text": "private function _set_form_validation() {\n $this->form_validation->set_error_delimiters('<label id=\"error\">', '</label>');\n\n $this->form_validation->set_rules('bundle_id', 'Bundle Selection', 'trim|required|integer|callback__validate_bundle_id');\n }", "title": "" }, { "docid": "cdc368dd8ae2f01970382da9551c2ab6", "score": "0.5624541", "text": "function add_document_form_validate( $form, &$form_state ) {\n $clientid = $form_state[ 'values' ][ 'clientid' ];\n if ( trim( $clientid ) == 0 ) {\n form_set_error( 'clientid', t( 'Please Select Client' ) );\n $redirect = 'agent/client/add/document';\n drupal_goto( $redirect );\n }\n $type = $form_state[ 'values' ][ 'document_type' ];\n if ( trim( $type ) == '' ) {\n form_set_error( 'document_type', t( 'Please Select Document Type' ) );\n ($clientid) ? $redirect = 'agent/client/add/' . $clientid . '/document' : $redirect = 'agent/client/add/document';\n drupal_goto( $redirect );\n }\n}", "title": "" }, { "docid": "9aa35f4ed762ba4dea4ad0b8aa637889", "score": "0.56215173", "text": "public function beforeValidate()\n \t{\n \t\tif ($this->isNewRecord) {\n \t\t} else {\n \t\t}\n\n \t\t// todo: for all language filed that is required but data is empty, copy the value from default language so when params.backendLanguages do not include those params.languages, validation error wont throw out\n\n \t\treturn parent::beforeValidate();\n \t}", "title": "" }, { "docid": "eebf4e9f17a835b2fea084e0f5fa9b34", "score": "0.5619295", "text": "function form()\n{\n global $f3;\n $isValid = true;\n if (!validName($f3->get('fname'))) {\n $isValid = false;\n $f3->set(\"errors['fname']\", \"Please enter your first name\");\n }\n if (!validName($f3->get('lname'))) {\n $isValid = false;\n $f3->set(\"errors['lname']\", \"Please enter your last name\");\n }\n if (!validAge($f3->get('age'))) {\n $isValid = false;\n $f3->set(\"errors['age']\", \"Please enter your age \");\n }\n if (!validPhone($f3->get('phone'))) {\n $isValid = false;\n $f3->set(\"errors['phone']\", \"Please enter your phone number\");\n }\n if (!validEmail($f3->get('email'))) {\n $isValid = false;\n $f3->set(\"errors['email']\", \"Please enter a valid email\");\n }\n return $isValid;\n}", "title": "" }, { "docid": "f697a5591bd5e04e3852e57affc748e6", "score": "0.5618418", "text": "function yandex_webmaster_add_site_form_validate($form, &$form_state) {\r\n $uid = variable_get('yandex_webmaster_uid', '');\r\n $idna = new idna_convert();\r\n // Now we will encode hostname.\r\n $host = $idna->encode($_SERVER['HTTP_HOST']);\r\n\r\n // Send server request.\r\n $options = array(\r\n 'method' => 'POST',\r\n 'headers' => array('Authorization' => 'OAuth ' . variable_get('yandex_webmaster_token', '')),\r\n 'data' => '<host><name>' . $host . '</name></host>',\r\n );\r\n $result = drupal_http_request(yandex_webmaster_domain_name() . 'api/' . $uid . '/hosts', $options);\r\n // Host has sucessfully added to Yandex.Webmaster.\r\n if ($result->code == 201) {\r\n drupal_set_message(t('Site was sucessfully added to Yandex.Webmaster.'));\r\n }\r\n // If an error has occurred.\r\n else {\r\n preg_match(\"/<error>(.*?)<\\/error>/\", $result->data, $matches);\r\n $error = $matches[1];\r\n drupal_set_message(t('An error occurred while adding new site to Yandex.Webmaster. @error', array('@error' => $error)), 'error');\r\n }\r\n\r\n // Get current host id\r\n $hostlist = yandex_webmaster_get_hosts();\r\n // Empty host list.\r\n if (!count($hostlist)) {\r\n drupal_set_message(t('An error occurred while getting current host ID from Yandex.Webmaster service.'), 'error');\r\n drupal_goto('admin/config/services/yandex_webmaster');\r\n }\r\n $host_id = '';\r\n // Now we will decode hostname.\r\n $host = $idna->decode($_SERVER['HTTP_HOST']);\r\n foreach ($hostlist as $id => $item) {\r\n if ($item['name'] == $host || str_replace('www.', '', $host) == str_replace('www.', '', $item['name'])) {\r\n $host_id = $id;\r\n break;\r\n }\r\n }\r\n if ($host_id == '') {\r\n drupal_set_message(t('An error occurred while getting current host ID from Yandex.Webmaster service.'), 'error');\r\n drupal_goto('admin/config/services/yandex_webmaster');\r\n }\r\n variable_set('yandex_webmaster_basic_host_id', $host_id);\r\n\r\n // Get uin to add new site.\r\n $uin = yandex_webmaster_get_host_uin($host_id);\r\n if (!$uin) {\r\n drupal_set_message(t('An error occurred while getting current host UIN from Yandex.Webmaster service.'), 'error');\r\n drupal_goto('admin/config/services/yandex_webmaster');\r\n }\r\n\r\n // Check file access permission to create new file in site root directory\r\n // for verification.\r\n $root = $_SERVER['DOCUMENT_ROOT'];\r\n $use_meta_tag = $form_state['values']['yandex_webmaster_use_metatag'];\r\n if (!$use_meta_tag) {\r\n // Create empty file and set verification type.\r\n $use_meta_tag = (!is_writable($root) || file_put_contents($root . 'yandex_' . $uin . '.txt', '') === FALSE);\r\n }\r\n // Drupal installation in subfolder.\r\n if (base_path() != '/') {\r\n drupal_set_message(t('Current site (@site) can\\'t be automatic verified. You will need to create empty text file \"@filename\" in site root directory.', array('@site' => $current_host, '@filename' => 'yandex_' . $uin . '.txt')), 'error');\r\n $use_meta_tag = FALSE;\r\n }\r\n\r\n // Set verification type code.\r\n $verification_type = $use_meta_tag ? 'META_TAG' : 'TXT_FILE';\r\n variable_set('yandex_webmaster_verification_type', $verification_type);\r\n // Send PUT-request\r\n $options = array(\r\n 'method' => 'PUT',\r\n 'headers' => array('Authorization' => 'OAuth ' . variable_get('yandex_webmaster_token', '')),\r\n 'data' => '<host><type>' . $verification_type . '</type></host>',\r\n );\r\n $result = drupal_http_request(yandex_webmaster_domain_name() . 'api/' . $uid . '/hosts/' . $host_id . '/verify', $options);\r\n if ($result->code != 204) {\r\n drupal_set_message(t('An error occurred while sending verification type to Yandex.Webmaster service.'), 'error');\r\n }\r\n\r\n menu_rebuild();\r\n drupal_goto('admin/config/services/yandex_webmaster');\r\n}", "title": "" }, { "docid": "5d458fce1b89d8f01d3d61c82dc5490e", "score": "0.5618221", "text": "protected abstract function _validate();", "title": "" }, { "docid": "e1228744b1bbccd8f75f430c416a70e4", "score": "0.5617065", "text": "public function validate()\n {\n //{\n // $this->errors->add('first_name', \"can't be the same as Last Name\");\n // $this->errors->add('last_name', \"can't be the same as First Name\");\n //}\n }", "title": "" }, { "docid": "e5da0bfd27e38a86f4bd7d3eee24068d", "score": "0.5603445", "text": "function dbc_zabbix_settings_form_validate($form, &$form_state) {\n\n foreach ( $form_state['values']['items'] as $key => $item ) {\n if ($item['origin'] == 'variables' && !empty($item['url'])) {\n if (empty($item['label'])) {\n form_set_error('items][' . $key . '][url',\n t(\"Label is not set for \\\"@name\\\".\", array('@name' => $item['url'])));\n }\n if (!variable_get($item['url'], NULL)) {\n form_set_error('items][' . $key . '][url',\n t(\"No variable named \\\"@name\\\" exist.\", array('@name' => $item['url'])));\n }\n }\n }\n \n}", "title": "" }, { "docid": "146eace60a35dec5d2fce34ab76cc5b1", "score": "0.56028616", "text": "function validate_forms()\n{\n\tglobal $alert,$db;\n\tif($_REQUEST['dont_save']!=1)\n\t{\n\t\t//Validations\n\t\t$alert = '';\n\t\t$fieldRequired \t\t= array($_REQUEST['advert_title']);\n\t\t$fieldDescription \t= array('Banner Title');\n\t\t$fieldEmail \t\t= array();\n\t\t$fieldConfirm \t\t= array();\n\t\t$fieldConfirmDesc \t= array();\n\t\t$fieldNumeric \t\t= array();\n\t\t$fieldNumericDesc \t= array();\n\t\t\n\t\tif (($cbo_type=='IMG' || $cbo_type=='SWF' ) && !$_REQUEST['advert_id'])//do only in case of insert\n\t\t{\n\t\t\t\t$fieldRequired[] \t= $_FILES['file_advert']['name'];\n\t\t\t\t$fieldDescription[] = array('Select File');\n\t\t}\t\n\t\tserverside_validation($fieldRequired, $fieldDescription, $fieldEmail, $fieldConfirm, $fieldConfirmDesc, $fieldNumeric, $fieldNumericDesc);\n\t}\n}", "title": "" }, { "docid": "c0befbbead77255e8136fdb6e2eabb6d", "score": "0.5602642", "text": "function user_validate_form() {\r\n\tglobal $dbi;\r\n\t\r\n\t$does_password_needs_editing = !empty( $_REQUEST['passHidden'] );\r\n\t\r\n\t$ret = '<div style=\"color: red; padding: 5px;\">';\r\n\tif ( empty( $_REQUEST['name'] ) ) { $ret = $ret.'Name required!<br/>'; }\r\n\tif ( empty( $_REQUEST['uname'] ) ) { $ret = $ret.'User name required!<br/>'; }\r\n\tif ( empty( $_REQUEST['pass'] ) && ( empty( $_REQUEST['uid'] ) || $does_password_needs_editing ) ) { $ret = $ret.'Password required!<br/>'; }\r\n\t$ret = $ret.'</div>';\r\n\t\r\n\tif ( strcmp( $ret, '<div style=\"color: red; padding: 5px;\"></div>' ) == 0 ) { # valid\r\n\t\t$name = $_REQUEST['name'];\r\n\t\t$uname = $_REQUEST['uname'];\r\n\t\t$pass = md5( $_REQUEST['pass'] );\r\n\t\t$email = $_REQUEST['email'];\r\n\t\t$utype = $_REQUEST['utype'];\r\n\t\t$organisation = $_REQUEST['organisation'];\r\n\t\t$location = $_REQUEST['location'];\r\n\t\t$aclevel = $_REQUEST['aclevel'];\r\n\t\t$playerid = $utype == 0 ? $_REQUEST['playerid'] : 0; # if user is not a player ignore his player data connection\r\n\t\t$uactive = $_REQUEST['uactive'];\r\n\t\t\r\n\t\t$sql = 'INSERT INTO tuser (id, version, fullname, uname, pass, useraclevel, usertype_id, email, verein_id, theme, uactive, failcount, location_id, player_id) VALUES ';\r\n\t\t$sql = $sql.' (0, 0, \"'.$name.'\", \"'.$uname.'\", \"'.$pass.'\", \"'.$aclevel.'\", '.$utype.', \"'.$email.'\", '.(empty($organisation) ? '0' : $organisation).', \"Lite\", '.$uactive.', 0, '.(empty($location) ? '0' : $location).', '.$playerid.') ';\r\n\t\t\r\n\t\tif ( isset( $_REQUEST['uid'] ) && !empty( $_REQUEST['uid'] ) ) {\r\n\t\t\tif ( $does_password_needs_editing ) {\r\n\t\t\t\t$pass_edit_sql = ' pass = \"'.$pass.'\", ';\r\n\t\t\t}\r\n\t\t\t$sql = 'UPDATE tuser SET '.$pass_edit_sql.' fullname = \"'.$name.'\", uname = \"'.$uname.'\", usertype_id = '.$utype.', email = \"'.$email.'\", verein_id = '.$organisation;\r\n\t\t\t$sql = $sql.', uactive = '.$uactive.', location_id = '.$location.', player_id = '.$playerid.' WHERE id = '.$_REQUEST['uid'];\r\n\t\t}\r\n\t\t\r\n\t\t$insert_update_result = sql_query( $sql, $dbi );\r\n\r\n\t\tif ($insert_update_result == TRUE) {\r\n\t\t\t$ret = $ret.'<script> window.location.href = \"admin_system_users.php?op=new_user_created\" </script>';\t\t\r\n\t\t} else {\r\n\t\t\t$ret = $ret.'<div style=\"color: red;\">Creation/update of a user failed for unknown reasons!</div>';\t\t\r\n\t\t}\r\n\t} else {\r\n\t\t$ret = $ret.user_form();\r\n\t}\r\n\treturn $ret;\r\n}", "title": "" }, { "docid": "d70e4e1f89da86e5b71bac4f43a129a2", "score": "0.5592747", "text": "function content_podgroup_field_overview_form_validate($form, &$form_state) {\n $form_values = $form_state['values'];\n\n $type_name = $form['#type_name'];\n $fields = array();\n $groups = array();\n\n $group = $form_values['_add_new_group'];\n if (array_filter(array($group['label'], $group['group_name']))) {\n $group['settings'] = field_group_default_settings($group['group_type']);\n $validation = fieldgroup_validate_name($group, $form['#type_name']);\n\n // If there's something wrong with the new group,\n // don't bother doing any more validation, further\n // processing will be stopped by the fieldgroup module.\n if (!empty($validation['errors'])) {\n return;\n }\n $group['group_name'] = $validation['group_name'];\n $new_group_name = $group['group_name'];\n $groups['_add_new_group'] = $group;\n }\n\n // See if we have fields moving into or out of a podgroup.\n // Set any fields to use the new name here so they will get processed\n // correctly by the fieldgroup module when saved.\n foreach ($form_values as $key => $values) {\n if ($values['parent'] == '_add_new_group') {\n $values['parent'] = $new_group_name;\n $form_values[$key] = $values;\n }\n\n if (!empty($form[$key]['#row_type']) && $form[$key]['#row_type'] == 'group') {\n // Gather up info about all groups.\n $group_name = $form_values[$key]['group']['group_name'];\n $groups[$group_name] = $form_values[$key]['group'];\n }\n if (!empty($form[$key]['#row_type']) && $form[$key]['#row_type'] == 'field') {\n if ($values['prev_parent'] != $values['parent']) {\n // Gather up fields that have moved in or out of a group.\n $fields[$key] = $form_values[$key]['field'];\n }\n }\n }\n\n $rebuild = FALSE;\n foreach ($fields as $field_name => $field) {\n $new_group = $form_values[$field_name]['parent'];\n $old_group = $form_values[$field_name]['prev_parent'];\n if (!empty($new_group) && isset($groups[$new_group]) && $groups[$new_group]['group_type'] == 'podgroup') {\n $allowed_in = content_podgroup_allowed_in($field, $groups[$new_group]);\n if (!$allowed_in['allowed']) {\n form_set_error($field_name, $allowed_in['message']);\n }\n else {\n if (!empty($allowed_in['message'])) {\n drupal_set_message($allowed_in['message']);\n }\n module_load_include('inc', 'content', 'includes/content.crud');\n $content_type = content_types($type_name);\n $multiple_values = content_podgroup_nesting_options();\n $field = $content_type['fields'][$field_name];\n $field['multiple'] = TRUE;\n $field = content_field_instance_collapse($field);\n content_field_instance_update($field, FALSE);\n $rebuild = TRUE;\n drupal_set_message(t('The field %field has been updated to use multiple values needed for the %group podgroup.', array(\n '%field' => $field['label'], '%group' => $groups[$new_group]['label'])));\n }\n }\n elseif (!empty($old_group) && isset($groups[$old_group]) && $groups[$old_group]['group_type'] == 'podgroup') {\n $allowed_out = content_podgroup_allowed_out($field, $groups[$old_group]);\n if (!$allowed_out['allowed']) {\n form_set_error($field_name, $allowed_out['message']);\n }\n elseif (!empty($allowed_out['message'])) {\n drupal_set_message($allowed_out['message']);\n }\n }\n }\n\n // Clear caches and rebuild menu only if any field has been updated.\n if ($rebuild) {\n content_clear_type_cache(TRUE);\n menu_rebuild();\n }\n}", "title": "" }, { "docid": "a3be287877fbcbb524a02f1c41bb3841", "score": "0.5587306", "text": "function validateForm(&$errors, $field_list){\n $patternName = '/([A-Za-z])\\w+/';\n $patternEmail = '/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,4}/';\n $patternUsername = '/[a-zA-Z0-9\\s\\-\\,]{5,}.\\*?/';\n $patternPassword = '/[a-zA-Z]\\w{3,14}/';\n $patternDOB = '/[0-9]{4}-[0-1][0-9]-[0-3][0-9]/';\n $patternPhone = '/^\\+?\\d((\\.|\\-)?\\d)+$/';\n\n//Matches each field to it's respective pattern. If they do not match then an error is created\n if (!preg_match($patternEmail, $field_list['email']))\n $errors['email'] = '*Email is Invalid';\n if (!preg_match($patternName, $field_list['firstname']))\n $errors['firstname'] = '<span syle=\"color:red\">*Firstname is Invalid</span>';\n if (!preg_match($patternName, $field_list['lastname']))\n $errors['lastname'] = '*Last Name is Invalid';\n if (!preg_match($patternDOB, $field_list['dob']))\n $errors['dob'] = '*Date of Birth is Invalid';\n if (!preg_match($patternPhone, $field_list['phone']))\n $errors['phone'] = '* Phone is Invalid';\n if (!preg_match($patternPhone, $field_list['postcode']))\n $errors['postcode'] = '*Postcode is Invalid';\n\n\n }", "title": "" }, { "docid": "4cbd236dcf8bd85ae96e50a435c70e6b", "score": "0.5586997", "text": "public function validateForm() {\n $bitReturn = true;\n\n $strTemplateId = $this->objTemplate->readTemplate(\"/module_postacomment/\".$this->getParam(\"comment_template\"), \"validation_error_row\");\n if(uniStrlen($this->getParam(\"comment_name\")) < 2) {\n $bitReturn = false;\n $this->strErrors .= $this->fillTemplate(array(\"error\" => $this->getLang(\"validation_name\")), $strTemplateId);\n }\n if(uniStrlen($this->getParam(\"comment_message\")) < 2) {\n $bitReturn = false;\n $this->strErrors .= $this->fillTemplate(array(\"error\" => $this->getLang(\"validation_message\")), $strTemplateId);\n }\n if($this->objSession->getCaptchaCode() != $this->getParam(\"form_captcha\") || $this->getParam(\"form_captcha\") == \"\") {\n $bitReturn = false;\n $this->strErrors .= $this->fillTemplate(array(\"error\" => $this->getLang(\"validation_code\")), $strTemplateId);\n }\n return $bitReturn;\n }", "title": "" }, { "docid": "55e75c6d1e97f26fbcd9dc78ffc94c5d", "score": "0.55858", "text": "protected function _postValidation() {\n\t\tif (Tools::isSubmit ( 'btnSubmit' )) {\n\t\t\tif (! Tools::getValue ( 'HOMEPAY_USER' ))\n\t\t\t\t$this->_postErrors [] = $this->l ( 'User id are required.' );\n\t\t\t\telseif (! Tools::getValue ( 'HOMEPAY_PUBLIC' ))\n\t\t\t\t$this->_postErrors [] = $this->l ( 'Public key is required.' );\n\t\t\t\telseif (! Tools::getValue ( 'HOMEPAY_PRIVATE' ))\n\t\t\t\t$this->_postErrors [] = $this->l ( 'Private key is required.' );\n\t\t\t\telseif (! Tools::getValue ( 'HOMEPAY_PUBLIC_PSC' ))\n\t\t\t\t$this->_postErrors [] = $this->l ( 'Public key PSC is required.' );\n\t\t\t\telseif (! Tools::getValue ( 'HOMEPAY_PRIVATE_PSC' ))\n\t\t\t\t$this->_postErrors [] = $this->l ( 'Private key PSC is required.' );\n\t\t}\n\t}", "title": "" }, { "docid": "ad82e9075b4a19e39e64773ec256d0b7", "score": "0.5585132", "text": "function gsb_migrate_config_form_validate($form, &$form_state) {\n $database = $form_state['values'][$form_state['values']['driver']];\n $database['driver'] = $form_state['values']['driver'];\n $form_state['storage']['database'] = $database;\n\n // Make sure we can connect\n try {\n Database::addConnectionInfo('gsb_legacy', 'default', $database);\n $connection = Database::getConnection('default', 'gsb_legacy');\n\n $admin_uid = $connection->select('users', 'u')\n ->fields('u', array('uid'))\n ->condition('uid', 1)\n ->execute()\n ->fetchField();\n if (!$admin_uid) {\n form_set_error('driver', t('The source database does not appear to be a Drupal database.'));\n }\n }\n catch (Exception $e) {\n form_set_error('driver', t('Failed to connect to source database, message returned: %message',\n array('%message' => $e->getMessage())));\n return;\n }\n}", "title": "" }, { "docid": "3512df8f9d18be7a07a8a4d29ecbae05", "score": "0.5580567", "text": "function todolist_create_task_validate($form, &$form_state) {\n /*\n //Execute a count query to see if there's other similar values.\n $query = new EntityFieldQuery;\n $query->entityCondition('entity_type', 'field_collection_item')\n ->fieldCondition('field_unique', 'value', $value)\n ->count();\n $count = $query->execute();\n if ($count > 1) {\n form_set_error('field_unique', 'Unique field value is already used.');\n }\n */ \n \n if($form_state['values']['date'] < date('Y-m-d')){\n form_set_error('date', 'The Date cannot be in the past.');\n }\n}", "title": "" }, { "docid": "f141649c312443f9c1261d762a226052", "score": "0.5580004", "text": "private function edit_form_validate($validation_type)\n {\n\n $errors=[];\n\n if($validation_type == \"post_img_new\"){\n \n //validate the post_img\n $uploaded_img_num=count($_FILES[\"post_img_new\"][\"name\"]);\n $uploaded_img_ext=pathinfo($_FILES[\"post_img_new\"][\"name\"][0],PATHINFO_EXTENSION);\n $uploaded_img_size=$_FILES[\"post_img_new\"][\"size\"][0];\n $valid_ext=[\"jpg\",\"jpeg\",\"png\"];\n\n if($uploaded_img_num > 1){\n\n $errors[\"length_error\"]=array(\n\n \"target\"=>\".ep-sec__form-row--dropzone .ep-sec__form-col--1\",\n \"error_msg\"=>'\n <div class=\"ep-sec__form-msg ep-sec__form-msg--error\">\n <p>\n <i class=\"fa fa-exclamation-circle\"></i>\n <span>You can upload only 1 File</span>\n </p>\n </div>\n '\n );\n\n }elseif(!in_array($uploaded_img_ext,$valid_ext)){\n\n $errors[\"format\"]=array(\n\n \"target\"=>\".ep-sec__form-row--dropzone .ep-sec__form-col--1\",\n \"error_msg\"=>'\n <div class=\"ep-sec__form-msg ep-sec__form-msg--error\">\n <p>\n <i class=\"fa fa-exclamation-circle\"></i>\n <span>.jpg, .jpeg or.png is supported format</span>\n </p>\n </div>\n '\n );\n\n\n }elseif(intval($uploaded_img_size) > 1048576){\n\n $errors[\"size_error\"]=array(\n \n \"target\"=>\".ep-sec__form-row--dropzone .ep-sec__form-col--1\",\n \"error_msg\"=>'\n <div class=\"ep-sec__form-msg ep-sec__form-msg--error\">\n <p>\n <i class=\"fa fa-exclamation-circle\"></i>\n <span>File size must be less than 1MB</span>\n </p>\n </div>\n '\n \n );\n }\n\n \n }elseif($validation_type == \"post_form\"){\n\n //store the previously uploaded image name\n $post_img_old=htmlspecialchars(trim($_POST[\"post_img_old\"]));\n\n //store the newly uploaded image name\n $post_img_new=htmlspecialchars(trim($_FILES[\"post_img_new\"][\"name\"]));\n \n //store the post title\n $post_title=htmlspecialchars(trim($_POST[\"post_title\"]));\n \n //store the post category\n $post_category=htmlspecialchars(trim($_POST[\"post_category\"]));\n \n //store the post visibility\n $post_visibility=htmlspecialchars(trim($_POST[\"post_visibility\"]));\n \n //store the post description\n $post_desc=htmlspecialchars(trim($_POST[\"post_desc\"]));\n\n if(empty($post_img_old) && empty($post_img_new)){\n\n $errors[\"file_error\"]=array(\n\n \"target\"=>\".ep-sec__form-row--dropzone .ep-sec__form-col--1\",\n \"error_msg\"=>'\n <div class=\"ep-sec__form-msg ep-sec__form-msg--error\">\n <p>\n <i class=\"fa fa-exclamation-circle\"></i>\n <span>Please choose a Thumbnail for you Post</span>\n </p>\n </div>\n '\n );\n }\n\n \n if(empty($post_title)){\n\n $errors[\"post_title_error\"]=array(\n\n \"target\"=>\".ep-sec__form-row--title .ep-sec__form-col--1\",\n \"error_msg\"=>'\n <div class=\"ep-sec__form-msg ep-sec__form-msg--error\">\n <p>\n <i class=\"fa fa-exclamation-circle\"></i>\n <span>Please choose a title</span>\n </p>\n </div>\n '\n );\n\n }elseif(strlen($post_title) > 100){\n\n $errors[\"post_title_error\"]=array(\n\n \"target\"=>\".ep-sec__form-row--title .ep-sec__form-col--1\",\n \"error_msg\"=>'\n <div class=\"ep-sec__form-msg ep-sec__form-msg--error\">\n <p>\n <i class=\"fa fa-exclamation-circle\"></i>\n <span>Title length must be less than 100</span>\n </p>\n </div>\n '\n );\n }\n\n\n if(empty($post_category)){\n\n $errors[\"post_category_error\"]=array(\n \"target\"=>\".ep-sec__form-row--catagory .ep-sec__form-col--1\",\n \"error_msg\"=>'\n <div class=\"ep-sec__form-msg ep-sec__form-msg--error\">\n <p>\n <i class=\"fa fa-exclamation-circle\"></i>\n <span>Please select a category</span>\n </p>\n </div>\n '\n );\n }\n\n if(empty($post_visibility)){\n\n $errors[\"post_visibility_error\"]=array(\n\n \n \"target\"=>\".ep-sec__form-row--visibility .ep-sec__form-col--1\",\n \"error_msg\"=>'\n <div class=\"ep-sec__form-msg ep-sec__form-msg--error\">\n <p>\n <i class=\"fa fa-exclamation-circle\"></i>\n <span>Choose your post status</span>\n </p>\n </div>\n '\n );\n\n }\n\n if(empty($post_desc)){\n \n $errors[\"post_desc_error\"]=array(\n \"target\"=>\".ep-sec__form-row--editor .ep-sec__form-col--1\",\n \"error_msg\"=>'\n <div class=\"ep-sec__form-msg ep-sec__form-msg--error\">\n <p>\n <i class=\"fa fa-exclamation-circle\"></i>\n <span>Description can\\'t be empty</span>\n </p>\n </div>\n '\n );\n }\n \n }\n\n return $errors;\n\n }", "title": "" }, { "docid": "8fa0def1a7acdf3c3991cb337e6f8673", "score": "0.55795854", "text": "function google_maps_api_configuration_generic_validate($form, &$form_state) {\r\n \r\n}", "title": "" }, { "docid": "74d6a2f7adbae3e23b6e7a3b37d8cded", "score": "0.55652165", "text": "protected function validate() {\r\n \r\n // Block to check the user permission to manipulate the module\r\n if (!$this->user->hasPermission('modify', 'extension/total/quantity_taxation')) {\r\n $this->error['warning'] = $this->language->get('error_permission');\r\n }\r\n \r\n \r\n // Block returns true if no error is found, else false if any error detected\r\n if (!$this->error) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "782e601e377ab349947ba12f1f99a815", "score": "0.5544801", "text": "protected function on_validate()\n {\n return true;\n }", "title": "" }, { "docid": "e0cc146d13d14e86196d01c7c7b1466e", "score": "0.55406386", "text": "function diff_node_revisions_validate($form, &$form_state) {\n $old_vid = $form_state['values']['old'];\n $new_vid = $form_state['values']['new'];\n if ($old_vid == $new_vid || !$old_vid || !$new_vid) {\n form_set_error('diff', t('Select different revisions to compare.'));\n }\n}", "title": "" }, { "docid": "c18510504d7660acef47993010db7245", "score": "0.55336535", "text": "function google_maps_api_configurations_edit_validate($form, &$form_state) {\r\n}", "title": "" }, { "docid": "dfe42d1588b4b040b127b8478ad95666", "score": "0.55317", "text": "function form_backend_validation()\n {\n $valid = true ;\n \n //printf('%s:%s<br>', basename(__FILE__), __LINE__) ;\n\t return $valid ;\n }", "title": "" }, { "docid": "cf8bbbceb4a2b4b3230996a97ab6a3a7", "score": "0.55298704", "text": "public function validate()\n\t{\n\t\t$this->driver('pre_validate');\n\n\t\tif ( ! $this->sent())\n\t\t{\n\t\t\t// Return and don't run any callbacks\n\t\t\treturn FALSE;\n\t\t}\n\n\t\tif ($this->get('render') === FALSE OR $this->get('ignore') === TRUE)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif (Kohana::$profiling === TRUE)\n\t\t{\n\t\t\t// Start a new benchmark\n\t\t\t$benchmark = Profiler::start('Formo', __FUNCTION__);\n\t\t}\n\n\t\t$pass_validation = TRUE;\n\n\t\tforeach ($this->_fields as $field)\n\t\t{\n\t\t\tif ($field->validate() === FALSE)\n\t\t\t{\n\t\t\t\t$pass_validation = FALSE;\n\t\t\t}\n\t\t}\n\n\t\tif ($pass_validation === TRUE)\n\t\t{\n\t\t\tif (Arr::get($this->_errors, $this->alias()))\n\t\t\t{\n\t\t\t\t$pass_validation = TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$validation = $this->validation();\n\t\t\t\t$pass_validation = $validation->check();\n\t\t\t\t$this->_errors = $validation->errors();\n\t\t\t}\n\t\t}\n\n\t\t$this->_run_callbacks($pass_validation);\n\n\t\tif ($this->error())\n\t\t{\n\t\t\t$pass_validation = FALSE;\n\t\t}\n\n\t\tif (isset($benchmark))\n\t\t{\n\t\t\t// Stop benchmarking\n\t\t\tProfiler::stop($benchmark);\n\t\t}\n\n\t\treturn $pass_validation;\n\t}", "title": "" }, { "docid": "033ee0c4d1b05aa1ce84925b9803bebc", "score": "0.5526527", "text": "protected abstract function validate();", "title": "" } ]
bf14c1da446e4a824ae6e2e385d3700d
Get URL protocol scheme, http or https.
[ { "docid": "629f7470b50a5a4a7cdc8342e28d9e08", "score": "0.6415256", "text": "public function getProtocol(): string\n\t{\n\t\treturn $this->protocol;\n\t}", "title": "" } ]
[ { "docid": "af245ca4bd5278c2c0074cc2edd582b1", "score": "0.82426786", "text": "private function getScheme(): string\n {\n $scheme = 'http';\n if (isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') {\n $scheme = 'https';\n }\n return $scheme;\n }", "title": "" }, { "docid": "03e0ca3c68068cf4c0313aa196d48c7f", "score": "0.82345754", "text": "public function getScheme()\r\n {\r\n return $this->isSecure() ? 'https' : 'http';\r\n }", "title": "" }, { "docid": "b0d5a433e1ea06c4dc7c513b168cccf4", "score": "0.82212317", "text": "public function getScheme(): string\n {\n return $this->isSecure() ? 'https' : 'http';\n }", "title": "" }, { "docid": "5e01b04e35a17dccad3609d224f8cc71", "score": "0.8136778", "text": "private static function getScheme() {\n $isHttps = $_SERVER['HTTPS'] ?? $_SERVER['HTTP_X_FORWARDED_PROTO'] ?? false;\n\n if ($isHttps) {\n return 'https';\n }\n\n return 'http';\n }", "title": "" }, { "docid": "02c49a662e1215e2f9a7c5ff5d4e6c75", "score": "0.8135579", "text": "public function getScheme()\n {\n return (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? self::SCHEME_HTTPS : self::SCHEME_HTTP;\n }", "title": "" }, { "docid": "2021d61cc7de83a57eb86abf767bc3f8", "score": "0.8132386", "text": "public function getScheme()\r\n {\r\n if ('on' === strtolower($this->getServer('HTTPS')) || 1 == $this->getServer('HTTPS')) {\r\n return 'https';\r\n } else {\r\n return 'http';\r\n }\r\n }", "title": "" }, { "docid": "3765ff687fd9f8c52f4c621caa0ecdba", "score": "0.8125862", "text": "public function scheme(): string\n\t{\n\t\treturn $this->isSecure() ? 'https' : 'http';\n\t}", "title": "" }, { "docid": "c0c1095f74ae696917701029995a6a0e", "score": "0.8022801", "text": "public static function protocol()\n\t{\n\t\treturn (isset($_SERVER['HTTPS']) and $_SERVER['HTTPS'] !== 'off') ? 'https' : 'http';\n\t}", "title": "" }, { "docid": "93295fe702b8bb50add5f404267ce4b4", "score": "0.7992123", "text": "public function getProtocol()\n {\n return $this->isSsl() ? 'https://' : 'http://';\n }", "title": "" }, { "docid": "a918d75dbaa1acd15999153427fbb424", "score": "0.7949285", "text": "public function getScheme()\n {\n return ($this->getServer('HTTPS') == 'on') ? self::SCHEME_HTTPS : self::SCHEME_HTTP;\n }", "title": "" }, { "docid": "b2564f4af105f69645a4a070ad6c281c", "score": "0.7929182", "text": "protected static function getCurrentScheme()\n {\n if (isset($_SERVER['HTTPS'])\n && ($_SERVER['HTTPS'] == 'on' || $_SERVER['HTTPS'] === true)\n ) {\n return 'https';\n }\n\n return 'http';\n }", "title": "" }, { "docid": "814f7bc9448c82ab6c2e2b71155a62cb", "score": "0.79211974", "text": "public function getProtocol() : string\n {\n return $this->url->scheme;\n }", "title": "" }, { "docid": "33b6be913d987a0a0edeaca621183099", "score": "0.784694", "text": "protected function protocol(): string\n {\n $protocol = 'http://';\n if ((! empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] === 443) {\n $protocol = 'https://';\n }\n\n return $protocol;\n }", "title": "" }, { "docid": "66e557cf96d1715a5744cd64202c3aeb", "score": "0.7788073", "text": "protected static function getProtocol() {\n $protocol = 'http';\n if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off'){\n $protocol = 'https';\n }\n return $protocol; \n }", "title": "" }, { "docid": "40c14bb16b117371543c8dbbb4ec6168", "score": "0.77706975", "text": "public static function protocol()\n {\n return (empty(static::server('HTTPS')) ? 'http' : 'https');\n }", "title": "" }, { "docid": "f3e6b3dd0718df004017c6d599c7bfee", "score": "0.77428794", "text": "public static function protocol()\n\t{\n\t\treturn (static::server('HTTPS') !== null and static::server('HTTPS') != 'off') ? 'https' : 'http';\n\t}", "title": "" }, { "docid": "84dae75229e82c0fdd66e7798adff2fb", "score": "0.76668227", "text": "static public function getCurrentScheme()\n\t{\n \tif(isset($_SERVER['HTTPS'])\n \t\t\t&& ($_SERVER['HTTPS'] == 'on' || $_SERVER['HTTPS'] === true)\n \t\t\t)\n\t\t{\n\t\t\t$scheme = 'https';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$scheme = 'http';\n\t\t}\n\t\treturn $scheme;\n\t}", "title": "" }, { "docid": "7eb00e4e77ec62471108e34000d34381", "score": "0.7652184", "text": "public function getProtocol()\n {\n return $this->isSsl() ? 'https' : 'http';\n }", "title": "" }, { "docid": "4d7ae5d1546bf1b56472c7b0a900c4b9", "score": "0.7634197", "text": "public static function getCurrentUrlProtocolPrefix()\n {\n if (self::usingSecureMode()) {\n return 'https://';\n } else {\n return 'http://';\n }\n }", "title": "" }, { "docid": "b193e8ab01dee6ff2ca9fe82391aa977", "score": "0.7469617", "text": "public function getProtocol()\n {\n $isSecure = false;\n if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {\n $isSecure = true;\n } elseif (\n !empty($_SERVER['HTTP_X_FORWARDED_PROTO']) &&\n $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' ||\n !empty($_SERVER['HTTP_X_FORWARDED_SSL']) &&\n $_SERVER['HTTP_X_FORWARDED_SSL'] == 'on'\n ) {\n $isSecure = true;\n }\n\n return $isSecure ? 'HTTPS' : 'HTTP';\n }", "title": "" }, { "docid": "1d6ab7a5469b679f55cc6f1d174bfe62", "score": "0.738032", "text": "public function getSchemeAndHttpHost()\r\n {\r\n return $this->getScheme() . '://' . $this->getHttpHost();\r\n }", "title": "" }, { "docid": "c43665d68fac45ae9ed3033f226a649b", "score": "0.7378876", "text": "function medula_get_protocol() {\n\tif ( is_ssl() ) {\n\t\treturn \"https://\";\n\t} else {\n\t\treturn \"http://\";\n\t}\n}", "title": "" }, { "docid": "1ca737ead2a93822e02b665b687d8a6f", "score": "0.7377299", "text": "public function getSchemeAndHttpHost(): string;", "title": "" }, { "docid": "7544b912a9f00ff49fee6f4890d10643", "score": "0.73734426", "text": "function http_protocol() {\n\tif (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) {\n\t return 'https';\n\t} else {\n\t\treturn 'http';\n\t}\n}", "title": "" }, { "docid": "28bbd2c02f84be314a0bf05f008dd9c1", "score": "0.73309386", "text": "public function getSchemeAndHost()\r\n {\r\n $port = $this->getServer('SERVER_PORT');\r\n if ($port == 80 || $port == 433 || empty($port)) {\r\n $port = '';\r\n } else {\r\n $port = ':' . $port;\r\n }\r\n return $this->getScheme() . '://' . $this->getHost() . $port;\r\n }", "title": "" }, { "docid": "9525a274f206286472c96bd7668ac286", "score": "0.72963667", "text": "public function getSchemeAndHttpHost();", "title": "" }, { "docid": "7f550f5440b12eab00935a3e1a432b87", "score": "0.7253507", "text": "function getProtocol(){\n return (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? 'https://' : 'http://';\n}", "title": "" }, { "docid": "e40f2a9c54efc0a41e5d064fa00546d2", "score": "0.72100294", "text": "function get_protocol()\n{\n preg_match(\"|^HTTP[S]?|is\",$_SERVER['SERVER_PROTOCOL'],$m);\n return strtolower($m[0]);\n}", "title": "" }, { "docid": "de835dce86de73e863ba9b9b39e0c2b3", "score": "0.7181602", "text": "public static function getProtocol($use_ssl = null)\n {\n return null !== $use_ssl && $use_ssl ? 'https://' : 'http://';\n }", "title": "" }, { "docid": "935f05c76919ebbd039b9ff5206387cb", "score": "0.7177533", "text": "private function getScheme( $url = null ) {\n\t\treturn parse_url( $url, PHP_URL_SCHEME );\n\t}", "title": "" }, { "docid": "f62ef6449698c882e161bd299138acd5", "score": "0.7175172", "text": "public static function getProtocolInformation()\n {\n if (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443) {\n return 'SERVER_PORT=443';\n }\n\n if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) == 'https') {\n return 'X-Forwarded-Proto';\n }\n\n if (isset($_SERVER['HTTP_X_FORWARDED_SCHEME']) && strtolower($_SERVER['HTTP_X_FORWARDED_SCHEME']) == 'https') {\n return 'X-Forwarded-Scheme';\n }\n\n if (isset($_SERVER['HTTP_X_URL_SCHEME']) && strtolower($_SERVER['HTTP_X_URL_SCHEME']) == 'https') {\n return 'X-Url-Scheme';\n }\n\n return null;\n }", "title": "" }, { "docid": "640eaa8a8d3368ea7e31e668f2cdc8b2", "score": "0.71412796", "text": "protected function getParsingSiteScheme()\n {\n $url = $this->getParserSite()->getUrl();\n $urlInfo = parse_url($url);\n\n return $urlInfo['scheme'];\n }", "title": "" }, { "docid": "170ea2299e322f83173e85a41d52cb48", "score": "0.7125005", "text": "static public function getCurrentSchemeAndHost(){\r\n \r\n if( array_key_exists('HTTPS',$_SERVER) && $_SERVER['HTTPS'] === 'on' ){\r\n return 'https://' . $_SERVER['HTTP_HOST'];\r\n }else{\r\n return 'http://' . $_SERVER['HTTP_HOST'];\r\n }\r\n \r\n }", "title": "" }, { "docid": "258e2323d2e3c23367a636f2bbcb9a0e", "score": "0.70935243", "text": "public function getProtocol()\n {\n return $this->uriProtocol;\n }", "title": "" }, { "docid": "a85efb2507311ec8913e14156f487cbf", "score": "0.7087041", "text": "public static function protocol() {\n\t\treturn Arr::get($_SERVER, 'SERVER_PROTOCOL');\n\t}", "title": "" }, { "docid": "ac39ace37c9afb1ec6b700ac1d64e5bd", "score": "0.70545626", "text": "public function getScheme()\n {\n return $this->get('scheme', '');\n }", "title": "" }, { "docid": "d1c9f0c6a850ee25a572f481eee47dde", "score": "0.70510656", "text": "public static function getProtocolForTokenizedUrl()\n\t{\n\t\t$useSslOnTokenizedUrls = craft()->config->get('useSslOnTokenizedUrls');\n\n\t\t// If they've explicitly set `useSslOnTokenizedUrls` to true, use https.\n\t\tif ($useSslOnTokenizedUrls === true)\n\t\t{\n\t\t\treturn 'https';\n\t\t}\n\t\t// If they've explicitly set `useSslOnTokenizedUrls` to false, use http.\n\t\telse if ($useSslOnTokenizedUrls === false)\n\t\t{\n\t\t\treturn 'http';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Let's auto-detect.\n\n\t\t\t// If the siteUrl is https or the current request is https, use it.\n\t\t\t$scheme = parse_url(craft()->getSiteUrl(), PHP_URL_SCHEME);\n\n\t\t\tif (($scheme && strtolower($scheme) == 'https') || craft()->request->isSecureConnection())\n\t\t\t{\n\t\t\t\treturn 'https';\n\t\t\t}\n\n\t\t\t// Lame ole' http.\n\t\t\treturn 'http';\n\t\t}\n\t}", "title": "" }, { "docid": "4390fb8de60f5dffb0545ad1a045c8fa", "score": "0.7000543", "text": "static function getProtocol(){\n\t\tif (isset($_SERVER[\"SERVER_PROTOCOL\"]))\n\t\t\treturn $_SERVER[\"SERVER_PROTOCOL\"];\n\n\t\treturn self::DEFAULT_PROTOCOL;\n\t}", "title": "" }, { "docid": "98c720c79371077b9aa1b96dd0cc2f92", "score": "0.6990196", "text": "public function getScheme(): string\n {\n return $this->scheme;\n }", "title": "" }, { "docid": "98c720c79371077b9aa1b96dd0cc2f92", "score": "0.6990196", "text": "public function getScheme(): string\n {\n return $this->scheme;\n }", "title": "" }, { "docid": "a141a6604f6b0b716ba225d00422b94e", "score": "0.6969135", "text": "public function schemeAndHttpHost(): string;", "title": "" }, { "docid": "ea5b17132461edf676e357ce6c658244", "score": "0.6836404", "text": "public function getScheme() {\n return $this->components['scheme'];\n }", "title": "" }, { "docid": "01a3f5d4eb22aa45b1fb93b8bbe4c05d", "score": "0.6771288", "text": "public function getScheme($secure): string\n {\n if ( ! is_null($secure)) {\n return $secure ? 'https://' : 'http://';\n }\n\n if (is_null($this->cachedScheme)) {\n $this->cachedScheme = $this->forcedScheme ?: $this->request->getScheme().'://';\n }\n\n return $this->cachedScheme;\n }", "title": "" }, { "docid": "a19df6216c780d899fc95f0cb3fec9f5", "score": "0.677", "text": "public static function getURL()\n {\n return ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']) == 'on' ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];\n }", "title": "" }, { "docid": "3bff5923ce6c131c3529e28f3f100179", "score": "0.67527103", "text": "static function getProtocol()\n {\n if (method_exists('xarConfigVars','Get')) {\n try {\n if (xarConfigVars::get(null, 'Site.Core.EnableSecureServer') == true) {\n if (preg_match('/^http:/', self::getVar('REQUEST_URI') ?? '')) {\n return self::PROTOCOL_HTTP;\n }\n $serverport = $_SERVER['SERVER_PORT'];\n $protocol = ($serverport == xarConfigVars::get(null, 'Site.Core.SecureServerPort')) ? self::PROTOCOL_HTTPS : self::PROTOCOL_HTTP;\n return $protocol;\n }\n } catch (Exception $e) {\n return self::PROTOCOL_HTTP;\n }\n }\n return self::PROTOCOL_HTTP;\n }", "title": "" }, { "docid": "2a0b5ef31550bd61eb0e0afe88f60c20", "score": "0.6738954", "text": "public function\n\tgetScheme(): string\n\t{\n\t\treturn $this -> scheme;\n\t}", "title": "" }, { "docid": "1afb626dbf5d285db8d67d3bff94e6de", "score": "0.6673172", "text": "public function getScheme()\n {\n return $this->scheme;\n }", "title": "" }, { "docid": "1afb626dbf5d285db8d67d3bff94e6de", "score": "0.6673172", "text": "public function getScheme()\n {\n return $this->scheme;\n }", "title": "" }, { "docid": "1afb626dbf5d285db8d67d3bff94e6de", "score": "0.6673172", "text": "public function getScheme()\n {\n return $this->scheme;\n }", "title": "" }, { "docid": "1afb626dbf5d285db8d67d3bff94e6de", "score": "0.6673172", "text": "public function getScheme()\n {\n return $this->scheme;\n }", "title": "" }, { "docid": "1afb626dbf5d285db8d67d3bff94e6de", "score": "0.6673172", "text": "public function getScheme()\n {\n return $this->scheme;\n }", "title": "" }, { "docid": "2cc28ff518838351b6562c9d7e0669fc", "score": "0.6658307", "text": "function _protocol(){\n\t$protocol = current(explode('/', $_SERVER['SERVER_PROTOCOL']));\t\n\treturn strtolower($protocol);\n}", "title": "" }, { "docid": "8e35256641e9325ac0dcb99bc1e9cfdd", "score": "0.66110665", "text": "public function getScheme()\r\n {\r\n return $this->scheme;\r\n }", "title": "" }, { "docid": "170254d46ca7a5c48ce9aadfa3f283f7", "score": "0.6599054", "text": "public function getScheme()\n {\n return $this->_scheme;\n }", "title": "" }, { "docid": "a5146c799d880e160e67f95be7a8240c", "score": "0.6565943", "text": "public function getProtocol() {\n\n\t\treturn $this->httpProtocol;\n\n\t}", "title": "" }, { "docid": "b0e6d1dacf74372f4a97bcfd47e17f80", "score": "0.6557256", "text": "public function getScheme() {\n return $this->scheme;\n }", "title": "" }, { "docid": "def33fd3ade1041a1ff4356a578eaa8d", "score": "0.65554833", "text": "public function getScheme(): ?string {\n return $this->scheme;\n }", "title": "" }, { "docid": "0e3e4a72ee6102a32e03c5a1dc02f45f", "score": "0.6539832", "text": "public function getProtocol(): string\n {\n return $this->protocol;\n }", "title": "" }, { "docid": "1df1b81abf16bac654ca231003c6ff0a", "score": "0.64870834", "text": "private function getProtocol($ssl, $src) \n {\n //if the ssl flag is set, go with that\n if ($ssl==\"yes\" || $ssl==\"on\") {\n return \"https\";\n } else if ($ssl==\"no\" || $ssl==\"off\") {\n return \"http\";\n }\n \n //otherwise look for protocol in the url, falling back on http if it's not found.\n $segs = parse_url($src);\n if($segs['scheme']==\"http\" || $segs['scheme']==\"https\"){\n return $segs['scheme'];\n }\n return \"http\";\n }", "title": "" }, { "docid": "1e2892ee2bcbba223c9f3d2f8ee962b8", "score": "0.6435186", "text": "public function isHttpOrHttps()\r\n\t{\r\n\t\treturn $this->_scheme === 'http' || $this->_scheme === 'https';\r\n\t}", "title": "" }, { "docid": "6bfd1dfaee3d10a39f12d9c8febe69da", "score": "0.64303726", "text": "public function protocol(): string {\n return $this->protocol;\n }", "title": "" }, { "docid": "ff1879b31d0655e2d048fb94361cb728", "score": "0.6390794", "text": "public static function getFullUrl(){ \n\t\treturn (empty($_SERVER[self::HTTPS]) ? '' : ($_SERVER[self::HTTPS] == self::ON) ? self::HTTPS_PROTOCOL : self::HTTP_PROTOCOL) . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];\n\t}", "title": "" }, { "docid": "0f462bff14af557aa82c399ed8afbb08", "score": "0.63580304", "text": "public function getUriPrefix()\n {\n $pathArray = $this->getPathInfoArray();\n if ($this->isSecure())\n {\n $standardPort = '443';\n $protocol = 'https';\n }\n else\n {\n $standardPort = '80';\n $protocol = 'http';\n }\n $host = explode(':', $this->getHost());\n if (count($host) == 1)\n {\n $host[] = isset($pathArray['SERVER_PORT']) ? $pathArray['SERVER_PORT'] : '';\n }\n if ($host[1] == $standardPort || empty($host[1]))\n {\n unset($host[1]);\n }\n return $protocol.'://'.implode(':', $host);\n }", "title": "" }, { "docid": "bff3c9b92bd57af52cfad297b89f1688", "score": "0.634386", "text": "public function getScheme(){\r\n \r\n return $this->scheme;\r\n \r\n }", "title": "" }, { "docid": "f6bd9aa1c9f76482cc95e95185b39d8a", "score": "0.633035", "text": "public function get_normalized_http_url()\n {\n\n// $parts = parse_url($this->http_url);\n $parts = parse_url($this->url());\n\n $scheme = (isset($parts['scheme'])) ? $parts['scheme'] : 'http';\n $port = (isset($parts['port'])) ? $parts['port'] : (($scheme == 'https') ? '443' : '80');\n $host = (isset($parts['host'])) ? strtolower($parts['host']) : '';\n $path = (isset($parts['path'])) ? $parts['path'] : '';\n\n if (($scheme == 'https' && $port != '443')\n || ($scheme == 'http' && $port != '80')) {\n $host = \"$host:$port\";\n }\n\n return \"$scheme://$host$path\";\n\n }", "title": "" }, { "docid": "a8180e6ed658dad95ea751310a44deaf", "score": "0.63020635", "text": "public function getProtocol()\n {\n return $this->protocol;\n }", "title": "" }, { "docid": "a8180e6ed658dad95ea751310a44deaf", "score": "0.63020635", "text": "public function getProtocol()\n {\n return $this->protocol;\n }", "title": "" }, { "docid": "a8180e6ed658dad95ea751310a44deaf", "score": "0.63020635", "text": "public function getProtocol()\n {\n return $this->protocol;\n }", "title": "" }, { "docid": "a8180e6ed658dad95ea751310a44deaf", "score": "0.63020635", "text": "public function getProtocol()\n {\n return $this->protocol;\n }", "title": "" }, { "docid": "c0c6967bcbc07586af7afff75f51998e", "score": "0.6276259", "text": "protected static function getSchemeFrom(&$proxy)\n {\n if (!preg_match('@^([a-z0-9]*)://@', $proxy, $match)) {\n return 'http://';\n }\n\n $scheme = $match[1].'://';\n $proxy = str_replace($scheme, '', $proxy);\n\n return $scheme;\n }", "title": "" }, { "docid": "af692817708f657506a299de82cd8501", "score": "0.6259762", "text": "function getStandardPort($scheme)\r\n {\r\n switch (strtolower($scheme)) {\r\n case 'http': return 80;\r\n case 'https': return 443;\r\n case 'ftp': return 21;\r\n case 'imap': return 143;\r\n case 'imaps': return 993;\r\n case 'pop3': return 110;\r\n case 'pop3s': return 995;\r\n default: return null;\r\n }\r\n }", "title": "" }, { "docid": "70cf0cbc3dbef57ad6cf2b39baefe3b3", "score": "0.62585044", "text": "protected function getUri() {\n\t\t// Find host-name / IP, always in lowercase:\n\t\t$isHttp = (strpos(GeneralUtility::getIndpEnv('TYPO3_REQUEST_HOST'), 'http://') === 0);\n\t\t$uri = GeneralUtility::getIndpEnv('REQUEST_URI');\n\t\tif ($this->configuration->get('recreateURI')) {\n\t\t\t$uri = $this->recreateURI($uri);\n\t\t}\n\t\treturn ($isHttp ? 'http://' : 'https://') . strtolower(GeneralUtility::getIndpEnv('HTTP_HOST')) . $uri;\n\t}", "title": "" }, { "docid": "da777c156ab12c28beaf0df6b61b6fa9", "score": "0.62514555", "text": "public static function site_url_without_protocols(): string {\n\t\t$protocols = array( 'https://', 'https://www.', 'www.' );\n\t\treturn str_replace( $protocols, '', get_bloginfo( 'wpurl' ) );\n\t}", "title": "" }, { "docid": "b2a92d2f59018eabaaae6103c72925d6", "score": "0.6249934", "text": "static public function home_url_maybe_https() {\n\t\t$home_url = get_home_url();\n\t\t$ssl = Util_Environment::url_to_maybe_https( $home_url );\n\n\t\treturn $ssl;\n\t}", "title": "" }, { "docid": "325d63e2cf104a028afbbb4e14b0452c", "score": "0.62482697", "text": "public function getUriPrefix()\n {\n $pathArray = $this->getPathInfoArray();\n if ($this->isSecure())\n {\n $standardPort = '443';\n $protocol = 'https';\n }\n else\n {\n $standardPort = '80';\n $protocol = 'http';\n }\n\n $host = explode(\":\", $pathArray['HTTP_HOST']);\n if (count($host) == 1)\n {\n $host[] = $pathArray['SERVER_PORT'];\n }\n\n if ($host[1] == $standardPort || empty($host[1]))\n {\n unset($host[1]);\n }\n\n return $protocol.'://'.implode(':', $host);;\n }", "title": "" }, { "docid": "304428c9549f04aa0d046b0382e82bd8", "score": "0.6217393", "text": "public function getProtocol()\n {\n if (!isset($this->_protocol))\n {\n $this->setProtocol();\n }\n return $this->_protocol;\n }", "title": "" }, { "docid": "5667aa5afe35fa39f823c176e30972a8", "score": "0.6214553", "text": "function set_url_scheme( $url, $scheme = null ) {\n\t$orig_scheme = $scheme;\n\n\tif ( ! $scheme ) {\n\t\t$scheme = is_ssl() ? 'https' : 'http';\n\t} elseif ( $scheme === 'admin' || $scheme === 'login' || $scheme === 'login_post' || $scheme === 'rpc' ) {\n\t\t$scheme = is_ssl() || force_ssl_admin() ? 'https' : 'http';\n\t} elseif ( $scheme !== 'http' && $scheme !== 'https' && $scheme !== 'relative' ) {\n\t\t$scheme = is_ssl() ? 'https' : 'http';\n\t}\n\n\t$url = trim( $url );\n\tif ( substr( $url, 0, 2 ) === '//' )\n\t\t$url = 'http:' . $url;\n\n\tif ( 'relative' == $scheme ) {\n\t\t$url = ltrim( preg_replace( '#^\\w+://[^/]*#', '', $url ) );\n\t\tif ( $url !== '' && $url[0] === '/' )\n\t\t\t$url = '/' . ltrim($url , \"/ \\t\\n\\r\\0\\x0B\" );\n\t} else {\n\t\t$url = preg_replace( '#^\\w+://#', $scheme . '://', $url );\n\t}\n\n\t/**\n\t * Filters the resulting URL after setting the scheme.\n\t *\n\t * @since 3.4.0\n\t *\n\t * @param string $url The complete URL including scheme and path.\n\t * @param string $scheme Scheme applied to the URL. One of 'http', 'https', or 'relative'.\n\t * @param string|null $orig_scheme Scheme requested for the URL. One of 'http', 'https', 'login',\n\t * 'login_post', 'admin', 'relative', 'rest', 'rpc', or null.\n\t */\n\treturn apply_filters( 'set_url_scheme', $url, $scheme, $orig_scheme );\n}", "title": "" }, { "docid": "84a59609bdc403fa253b16732643d5c9", "score": "0.6210464", "text": "public function getScheme() : string;", "title": "" }, { "docid": "f6de783fc0b3aa2f75bee46094f28635", "score": "0.6207519", "text": "function set_url_scheme( $url, $scheme = null ) {\n\t$orig_scheme = $scheme;\n\n\tif ( ! $scheme ) {\n\t\t$scheme = is_ssl() ? 'https' : 'http';\n\t} elseif ( $scheme === 'admin' || $scheme === 'login' || $scheme === 'login_post' || $scheme === 'rpc' ) {\n\t\t$scheme = is_ssl() || force_ssl_admin() ? 'https' : 'http';\n\t} elseif ( $scheme !== 'http' && $scheme !== 'https' && $scheme !== 'relative' ) {\n\t\t$scheme = is_ssl() ? 'https' : 'http';\n\t}\n\n\t$url = trim( $url );\n\tif ( substr( $url, 0, 2 ) === '//' ) {\n\t\t$url = 'http:' . $url;\n\t}\n\n\tif ( 'relative' == $scheme ) {\n\t\t$url = ltrim( preg_replace( '#^\\w+://[^/]*#', '', $url ) );\n\t\tif ( $url !== '' && $url[0] === '/' ) {\n\t\t\t$url = '/' . ltrim( $url, \"/ \\t\\n\\r\\0\\x0B\" );\n\t\t}\n\t} else {\n\t\t$url = preg_replace( '#^\\w+://#', $scheme . '://', $url );\n\t}\n\n\t/**\n\t * Filters the resulting URL after setting the scheme.\n\t *\n\t * @since 3.4.0\n\t *\n\t * @param string $url The complete URL including scheme and path.\n\t * @param string $scheme Scheme applied to the URL. One of 'http', 'https', or 'relative'.\n\t * @param string|null $orig_scheme Scheme requested for the URL. One of 'http', 'https', 'login',\n\t * 'login_post', 'admin', 'relative', 'rest', 'rpc', or null.\n\t */\n\treturn apply_filters( 'set_url_scheme', $url, $scheme, $orig_scheme );\n}", "title": "" }, { "docid": "a4811092ff554b87d6c46837888f4779", "score": "0.6188553", "text": "public function get_normalized_http_url() {\n\t\t$parts = parse_url( $this->http_url );\n\n\t\t$scheme = (isset( $parts['scheme'] )) ? $parts['scheme'] : 'http';\n\t\t$port = (isset( $parts['port'] )) ? $parts['port'] : (($scheme == 'https') ? '443' : '80');\n\t\t$host = (isset( $parts['host'] )) ? $parts['host'] : '';\n\t\t$path = (isset( $parts['path'] )) ? $parts['path'] : '';\n\n\t\tif ( ( $scheme == 'https' && $port != '443' ) || ( $scheme == 'http' && $port != '80' ) )\n\t\t\t$host = \"$host:$port\";\n\n\t\treturn \"$scheme://$host$path\";\n\t}", "title": "" }, { "docid": "f1e5db3f3875801008d519c97be94811", "score": "0.61706746", "text": "public function getProtocol(): string;", "title": "" }, { "docid": "f1e5db3f3875801008d519c97be94811", "score": "0.61706746", "text": "public function getProtocol(): string;", "title": "" }, { "docid": "3817649704e953716930f8cea539ec04", "score": "0.61688477", "text": "public function getScheme(): string;", "title": "" }, { "docid": "3817649704e953716930f8cea539ec04", "score": "0.61688477", "text": "public function getScheme(): string;", "title": "" }, { "docid": "03d20bc75210af895d3715c870c3af4d", "score": "0.61664635", "text": "public function getProtocol()\n\t{\n\t\treturn $this->protocol;\n\t}", "title": "" }, { "docid": "d69fbef8331303a157b3501689d1393c", "score": "0.61623305", "text": "public static function getRootURL(): string\n {\n $prot = $_SERVER['REQUEST_SCHEME'] ?? null;\n if ($prot === null) {\n if (array_key_exists('HTTPS', $_SERVER) and $_SERVER['HTTPS'] == 'On') {\n $prot = 'https';\n } else {\n $prot = 'http';\n }\n }\n $host = $_SERVER['HTTP_HOST'] ?? null;\n\n return $prot . '://' . $host;\n }", "title": "" }, { "docid": "5788a972cf0a71bea9c89bebcd279a50", "score": "0.613647", "text": "function url(){\n $protocol = ($_SERVER['HTTPS'] && $_SERVER['HTTPS'] != \"off\") ? \"https\" : \"http\";\n return $protocol . \"://\" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n }", "title": "" }, { "docid": "41b95715734090fedaaa03d40afaefda", "score": "0.61197615", "text": "public function getUrl()\n {\n if (!$this->url) {\n throw new InvalidUrlException();\n }\n\n $url = $this->url;\n\n if (! parse_url($this->url, PHP_URL_SCHEME)) {\n $url = $this->getProtocol().$url;\n }\n\n return $url;\n }", "title": "" }, { "docid": "4be787e8bbadb88afa79c51d3b7c366b", "score": "0.61135477", "text": "public function getHttpHost()\r\n {\r\n $scheme = $this->getScheme();\r\n $port = $this->getPort();\r\n\r\n if (('http' == $scheme && 80 == $port) || ('https' == $scheme && 443 == $port)) {\r\n return $this->getHost();\r\n }\r\n\r\n return $this->getHost() . ':' . $port;\r\n }", "title": "" }, { "docid": "d8385918b7bb72a57803916eade03785", "score": "0.60993934", "text": "private function get_normalized_http_url() {\r\n $parts = parse_url($this->api_url);\r\n \r\n $port = @$parts['port'];\r\n $scheme = $parts['scheme'];\r\n $host = $parts['host'];\r\n $path = @$parts['path'];\r\n \r\n $port or $port = ($scheme == 'https') ? '443' : '80';\r\n \r\n if (($scheme == 'https' && $port != '443')\r\n || ($scheme == 'http' && $port != '80')) {\r\n $host = \"$host:$port\";\r\n }\r\n return \"$scheme://$host$path\";\r\n }", "title": "" }, { "docid": "e7707af8f36121a4eec7ea78dbbd2626", "score": "0.6092667", "text": "public function getPreferredSchema()\n {\n return (string) ($this->getCsv()->getValueForKeyPath('general', 'preferred_scheme') ?: 'https').':';\n }", "title": "" }, { "docid": "b205a7d3b2e5527916e2379be3a20557", "score": "0.60810065", "text": "function getCurrentTransport() {\n\tif( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != '' ) {\n\t\treturn 'https';\n\t}\n\treturn 'http';\n}", "title": "" }, { "docid": "3bbf113078e09766f34087adf73f5d90", "score": "0.6078507", "text": "function rocket_add_url_protocol( $url ) {\n\tif ( strpos( $url, 'http://' ) === false && strpos( $url, 'https://' ) === false ) {\n\t\t$url = 'http://' . ltrim( $url, '//' );\n\t}\n\treturn $url;\n}", "title": "" }, { "docid": "cb0c73dcbd11af3b56b6ba16150b830f", "score": "0.6074868", "text": "public static function getUrl()\n {\n if (empty(self::$_url)) {\n self::$_url = 'http' . ((isset($_SERVER['HTTPS']) && 'on' === $_SERVER['HTTPS']) ? 's' : '');\n self::$_url .= '://' . $_SERVER[\"SERVER_NAME\"];\n self::$_url .= $_SERVER['REQUEST_URI'];\n }\n return self::$_url;\n }", "title": "" }, { "docid": "435b77cc873fa291f487c9efdfaf334d", "score": "0.60001725", "text": "public function getUrl()\n\t{\n\t\t$scheme = 'http';\n\t\t$hostname = filter_input(INPUT_SERVER, 'HTTP_HOST');\n\t\t$port = filter_input(INPUT_SERVER, 'SERVER_PORT');\n\t\t$path = filter_input(INPUT_SERVER, 'REQUEST_URI');\n\t\t$query = filter_input(INPUT_SERVER, 'QUERY_STRING');\n\n\t\t$path = parse_url($path, PHP_URL_PATH);\n\n\t\tif (filter_input(INPUT_SERVER, 'HTTPS') != null) {\n\t\t\t$scheme = 'https';\n\t\t}\n\n\t\t$url = \"{$scheme}://{$hostname}\";\n\n\t\tif (($scheme == 'http' && $port != 80) || ($scheme == 'https' && $port != 43)) {\n\t\t\t$url .= \":{$port}\";\n\t\t}\n\n\t\t$url .= $path;\n\n\t\tif ($query != '') {\n\t\t\t$url .= \"?{$query}\";\n\t\t}\n\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "252b0b6461e9783a3204ee799ecb4816", "score": "0.5994343", "text": "public function getServerProtocol()\n {\n return self::getInfoValue(self::INFO_SERVER_PROTOCOL);\n \n }", "title": "" }, { "docid": "e620d58e4e70c9e1b0c06ea656e6f4e0", "score": "0.5983276", "text": "function http_is_protocol_https() {\n\treturn !empty( $_SERVER['HTTPS'] ) && ( utf8_strtolower( $_SERVER['HTTPS'] ) != 'off' );\n}", "title": "" }, { "docid": "e1e8aa4e8e1ba96bb7bfdd4dc7f5596c", "score": "0.597939", "text": "public function scheme($scheme = null){\n\t\tif(0 === func_num_args())\n\t\t\treturn $this->scheme;\n\t\t$this->scheme = $scheme;\n\t}", "title": "" }, { "docid": "afd0d954ce470925a3dff671c33c5dc0", "score": "0.5955822", "text": "function hasProtocol($theurl)\n{\n $lowname=strtolower(ltrim($theurl));\n if(substr($lowname,0,7)===\"http://\")\n {\n return true;\n }\n if(substr($lowname,0,6)===\"ftp://\")\n {\n return true;\n }\n if(substr($lowname,0,8)===\"https://\")\n {\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "b21be56cec867dda3b39db23db7730f4", "score": "0.59539473", "text": "public function getUri() : string\n {\n $hostname = $this->getIpv4() ? : $this->getIpv6() ? : $this->getDomainName() ? : 'localhost';\n\n $port = $this->getPort() ? : '8443';\n $apiVersion = '1.0';\n $url = 'https://' . $hostname . ':' . $port . '/' . $apiVersion . '/';\n\n return $url;\n }", "title": "" } ]
d03b388b5c2bcd743860d5a3096e1c5d
Execute the console command.
[ { "docid": "b5a6967d9f065af430d5eed4aea82d9b", "score": "0.0", "text": "public function handle()\n {\n $this->info('Available Helper:');\n $this->info('[1] Update Permission Table');\n $this->info('[2] Truncate All Transactions');\n $this->info('[3] Update Composer And NPM');\n $this->info('[4] Check Outdated NPM Packages');\n $this->info('[5] Language Sync');\n $this->info('[6] Update Lookup Table');\n $this->info('[7] Clear All Cache');\n\n $choose = $this->ask('Choose Helper');\n\n switch ($choose) {\n case 1:\n $this->updatePermission();\n break;\n case 2:\n $this->truncateTables();\n break;\n case 3:\n $this->updateComposerAndNPM();\n break;\n case 3:\n $this->updateComposerAndNPM();\n break;\n case 4:\n $this->checkOutdated();\n break;\n case 5:\n $this->langSync();\n break;\n case 6:\n $this->updateLookup();\n break;\n case 7:\n $this->clearCache();\n break;\n default:\n break;\n }\n\n sleep(3);\n $this->info('Done!');\n }", "title": "" } ]
[ { "docid": "f0fed3d97502e0b21a88efa83da2dde5", "score": "0.66642773", "text": "public function handle()\n {\n $arguments = $this->argument('name');\n $this->writeRepository($arguments);\n $this->composer->dumpAutoloads();\n }", "title": "" }, { "docid": "c8cf4776a96e0f908cad6e0d63fe75c1", "score": "0.6500011", "text": "public function handle()\n {\n // Get the arguments.\n $arguments = $this->argument();\n // Get the options.\n $options = $this->option();\n // Write rule.\n $this->writeRule($arguments, $options);\n // Dump autoload.\n $this->composer->dumpAutoloads();\n }", "title": "" }, { "docid": "ed83f0b9bf2fa21797b4391e7d0b6d23", "score": "0.6445659", "text": "public function handle()\n {\n $name = Str::snake(trim($this->input->getArgument('name')));\n\n $this->writeDeployment($name);\n\n $this->composer->dumpAutoloads();\n }", "title": "" }, { "docid": "628b3ce2eff9b9b0295dd89b87c51f5a", "score": "0.64087355", "text": "public function handle()\n {\n $xuid = $this->argument('xuid');\n $this->gamer = Gamer::whereXuid($xuid)->first();\n $this->getXboxOneGames($xuid);\n }", "title": "" }, { "docid": "44b8c8c2b50c118b4a8f1203877bbf76", "score": "0.63971704", "text": "public function handle()\n {\n $user_id = $this->argument('user_id');\n\n if ($user_id != null) {\n $this->setWotdForUser(User::find($user_id));\n } else {\n $users = User::all();\n foreach ($users as $user) {\n $this->setWotdForUser($user);\n }\n }\n\n $this->info('Word of the day command completed successfully.');\n }", "title": "" }, { "docid": "974c9344b1f8ff84c39a86f9a23f153f", "score": "0.6373869", "text": "public function handle()\n {\n $this->setAccountsCharts($this->argument('teamId'));\n }", "title": "" }, { "docid": "7c0382f9cc85dd93bd4a316eff479a4e", "score": "0.63546", "text": "public function handle()\n {\n if ($this->argument('class')) {\n $this->annotateClass($this->argument('class'));\n return;\n }\n\n $this->annotateFolder($this->getScanPath());\n }", "title": "" }, { "docid": "3a91f3012e1a4846cdafee20af8edc7b", "score": "0.63282424", "text": "public function handle()\n {\n $this->listenForEvents();\n\n $adapter = $this->argument('adapter')\n ?: $this->laravel['config']['ts.default'];\n\n $this->runBot($adapter);\n }", "title": "" }, { "docid": "62beaeb60db8aa36f74f250846dac0f0", "score": "0.6317861", "text": "public function handle()\n {\n // Get the arguments.\n $arguments = $this->argument();\n\n // Get the options.\n $options = $this->option();\n\n // Write module.\n $this->writePackage($arguments, $options);\n\n // Dump autoload.\n $this->composer->dumpAutoloads();\n }", "title": "" }, { "docid": "7d13ad91df1edc7ad70fa046da404521", "score": "0.6294101", "text": "public function handle()\n {\n $basePathKey = $this->argument( 'basePathKey' );\n\n if( $basePathKey )\n $this->fetchElement( $basePathKey );\n else\n $this->fetchAll();\n }", "title": "" }, { "docid": "fb4c2581f9892d2bc7ed6b7eb6edfb1e", "score": "0.6264935", "text": "public function handle()\n {\n $vkId = $this->argument('vk_id');\n\n (new VkService)->getFriends($vkId, true);\n }", "title": "" }, { "docid": "f943cb28765f47d65ec33da0eee55f26", "score": "0.6261452", "text": "public function handle()\n {\n $this->matches->compileMatchMap();\n $this->matches->saveMatchMap();\n }", "title": "" }, { "docid": "565527f53fc70ea3ec10f760ab5a5809", "score": "0.62581533", "text": "public function handle() {\n $model = trim($this->input->getArgument('model'));\n\n $this->writeRepository($model);\n\n $this->_composer->dumpAutoloads();\n }", "title": "" }, { "docid": "84d18540304c463711311598f18919c2", "score": "0.62568194", "text": "public function handle()\n {\n $this->setCryptIVFromUrl($this->argument('url'));\n\n $draw = URLParser::parseByName('dearSanta', $this->argument('url'))->participant->draw;\n\n $participant = $draw->participants->find($this->argument('id'));\n\n if ($this->argument('email')) {\n $participant->email = $this->argument('email');\n $participant->save();\n }\n\n $participant->notifyNow(new TargetDrawn);\n $this->info('Participant mail sent');\n }", "title": "" }, { "docid": "2327a31392252323ffbc3ff1e592ed53", "score": "0.62506586", "text": "public function handle()\n {\n $this->call('inspire');\n $this->call('translations:import', ['--replace' => true]);\n $this->exportTranslations();\n }", "title": "" }, { "docid": "f95f255f2c996ad087ff78389b82f9cf", "score": "0.62478465", "text": "public function handle()\n {\n $arguments = [];\n if ($this->option('preview')) {\n $arguments['--preview'] = true;\n }\n\n $this->call('contentful:sync-locales', $arguments);\n\n $this->call('contentful:sync-data', $arguments);\n\n if ($this->option('no-switch')) {\n $arguments['--no-switch'] = true;\n }\n\n if ($this->option('no-truncate')) {\n $arguments['--no-truncate'] = true;\n }\n\n $this->call('contentful:sync-flatten', $arguments);\n }", "title": "" }, { "docid": "2ee7e89a5394df401f099ba4f25f870e", "score": "0.62390065", "text": "public function handle()\n {\n $trxId = $this->argument('id');\n $prod = $this->option('live');\n\n $this->sendPayload($trxId, $prod);\n }", "title": "" }, { "docid": "a7c3442b28618fcef8abf7d50138a8e7", "score": "0.62222594", "text": "public function handle()\n {\n $updater = $this->manager->getUpdater();\n\n $updater->setConsole($this);\n \n $result = $updater->update();\n\n if($result === true) {\n $this->info('Statistics updated successfully');\n }\n else {\n $this->error('Something went wrong while updating statistics.');\n }\n }", "title": "" }, { "docid": "5a05444e0acf36f7d8731a673d4412a5", "score": "0.6219729", "text": "public function handle()\n {\n $arr = config(\"user\");\n $arr_uid = array_column($arr, 'uid');\n $args = $this->arguments();\n if (!empty($args['uid'])) {\n StockService::worm($args['uid']);\n } else {\n foreach ($arr_uid as $key => $uid) {\n StockService::worm($uid);\n }\n }\n\n }", "title": "" }, { "docid": "99ad4866b6794310b44b35458d6ea9c7", "score": "0.62143016", "text": "public function handle()\n {\n $fetcher = new KeywordsFetcher(\\Config::get('laravel-google-keywords'));\n $fetcher->fetchAll();\n\n $this->info(\"Command executed.\");\n }", "title": "" }, { "docid": "7f007a8f9516fe3729a0c098d5626cad", "score": "0.6210269", "text": "public function handle()\n {\n $this->entityGenerator\n ->module($this->argument('module'))\n ->generate([$this->argument('entity')], false);\n\n $this->info('Entity generated.');\n }", "title": "" }, { "docid": "8041f87407a27957054361bb85e7b203", "score": "0.61844367", "text": "public function handle()\n {\n $action = $this->argument('action');\n $locale = $this->option('locale');\n\n if ($locale && $action == 'build') {\n $this->service()->buildStorageFile($locale);\n }\n\n }", "title": "" }, { "docid": "44a9b28031e5bbd17cb659db73bc629a", "score": "0.61807895", "text": "public function handle()\n {\n // get all the transactions by a given customer id\n $result = $this->customerTransactionService->getTransactionsByCustomerId($this->argument('id'));\n\n // print the results in the console, based on the number of transactions found\n count($result) > 0 ? $this->table(['date', 'amount'], $result) :\n $this->error('No transactions found for customer '.$this->argument('id'));\n }", "title": "" }, { "docid": "1f07264bceef8ea7da14ff0f757ab1d6", "score": "0.6170433", "text": "public function handle()\n {\n $this->lang = $this->argument('lang');\n $this->force = (bool) $this->option('force');\n\n foreach ($this->lang as $lang) {\n $this->processLang($lang);\n }\n }", "title": "" }, { "docid": "a50ce4b45f709f06e6decc16ced4d2fe", "score": "0.61682665", "text": "public function handle()\n {\n $schedule_id = $this->argument('schedule_id');\n (new Vadim())->deployTimers($schedule_id);\n }", "title": "" }, { "docid": "6a9cbbccb25acf833a2fdf4cbbcef310", "score": "0.6165302", "text": "public function handle()\n {\n $users = $this->getUsers();\n \n if(count($users) != 0) {\n foreach ($users as $user) {\n echo $user->line_id;\n $this->pushReminder($user->line_id);\n }\n }\n\n }", "title": "" }, { "docid": "3dcbafabdf727abc49e5a01ca7cbad96", "score": "0.61624116", "text": "public function handle()\n {\n $user = User::find($this->argument('user'));\n\n // Send email welcome user\n Mail::to($user->email)\n ->send(new WelcomeEmail($user));\n }", "title": "" }, { "docid": "68f710e6de315714785d0d159e14857b", "score": "0.6162071", "text": "public function handle()\n {\n $this->info(sprintf(\"Hello %s\", $this->argument('name')));\n }", "title": "" }, { "docid": "0cf480fbbc387411158e04419cd7f14c", "score": "0.6155323", "text": "public function handle()\n {\n $data_dir = $this->option('data-dir');\n $reset = $this->option('reset');\n $resume = $this->option('resume');\n $force = $this->option('force');\n $spider = new Spider( $data_dir, $force );\n $spider->run($reset, $resume);\n }", "title": "" }, { "docid": "ae1664c77e2bdf1f835e19c9774830f5", "score": "0.6150708", "text": "public function handle()\n {\n $entityCode = $this->input->getArgument('entity');\n\n try {\n $entity = Entity::findByCode($entityCode);\n\n $this->info(\"Compiling `{$entityCode}` entity.\");\n\n (new EntityComplier($entity, $this->files, $this))->compile();\n \n $this->info(\"Entity is compiled successfully and flat table is created.\");\n } catch (ModelNotFoundException $e) {\n $this->error(\"`{$entityCode}` entity doesn't exists.\");\n }\n }", "title": "" }, { "docid": "f649f0a7d5043104b62c7b560165fe64", "score": "0.6142889", "text": "public function handle()\n {\n $social = $this->argument('type');\n\n dispatch(new GetFeedsUserSocial($social));\n exit();\n //dispatch((new GetFeedsUserSocial($environment))->onQueue('high'));\n }", "title": "" }, { "docid": "f3d2406b3d768c9632b2655ee082a29a", "score": "0.61352396", "text": "public function handle()\n {\n $dataset = json_decode(file_get_contents(storage_path($this->argument('file'))), true);\n\n $attack = 0;\n foreach ($dataset as $attributes) {\n $pokemon = new Pokemon($attributes);\n if (! $pokemon->isType('fire')) {\n continue;\n }\n if ($pokemon->abilities->attack > $attack) {\n $attack = $pokemon->abilities->attack;\n }\n }\n\n $this->info(sprintf('The highest attack of pokemons of type fire is %s', $attack));\n }", "title": "" }, { "docid": "8f2f75edbad55309cf620d2245ac3dfb", "score": "0.6134341", "text": "public function handle()\n {\n $url = $this->argument('url');\n\n $string = file_get_contents($url);\n\n $checkIfJson = $this->isJson($string);\n\n /**\n * if data provider returns json\n */\n if ($checkIfJson) { //json\n\n $data = json_decode($string);\n\n $this->handlePlayers($data);\n\n } else { // xml\n\n $xml = simplexml_load_file($url);\n\n $json = json_encode($xml);\n\n $data = json_decode($json, TRUE);\n \n $this->handlePlayers($data);\n\n }\n }", "title": "" }, { "docid": "256c7603c8265b046703a592d9e1b767", "score": "0.6119567", "text": "public function handle()\n {\n $name = $this->argument('name');\n\n RepositoryService::ImplementNow($name);\n\n $this->info(\"Repository pattern implemented for model \". $name);\n }", "title": "" }, { "docid": "5617635a025db33e703e8b3cc082a40c", "score": "0.6116099", "text": "public function handle()\n {\n $options = $this->options();\n $functions = ['callMigrate','createAdminUser','callSeeders'];\n foreach($functions as $func)\n {\n if(!$this->$func($options))\n return Command::FAILURE;\n }\n $this->info(\"success\");\n return Command::SUCCESS;\n }", "title": "" }, { "docid": "c59cf6467c9c2e7cc4208a7afc0a950e", "score": "0.6111858", "text": "public function handle()\n {\n $language = $this->argument('language') ?: false;\n\n try {\n // if we have a language, pass it in, if not the method will\n // automagically sync all languages\n $this->translation->saveMissingTranslations($language);\n\n return $this->info(__('translation::translation.keys_synced'));\n } catch (\\Exception $e) {\n return $this->error($e->getMessage());\n }\n }", "title": "" }, { "docid": "2a6d938c94aac463a0b796d641fe2bd2", "score": "0.6103772", "text": "public function handle()\n {\n $result = $this->generator\n ->setConsole($this)\n ->setOptions([\n 'name' => $this->argument('table'),\n 'fields' => $this->option('fields')\n ])->run();\n\n $this->line($result);\n }", "title": "" }, { "docid": "f5f6182be37c937649394fbf0dfbf091", "score": "0.60950315", "text": "public function handle()\n {\n $fullPath = Helpers::projectProviderPath($this->argument('name') . '.php');\n\n $filesystem = new Filesystem();\n\n if ($filesystem->exists($fullPath)) {\n $this->error(\"File {$fullPath} already exists.\");\n\n return;\n }\n\n if (!$filesystem->exists(Helpers::projectProviderPath())) {\n $filesystem->makeDirectory(Helpers::projectProviderPath(), 0755, true);\n }\n\n $filesystem->put($fullPath, $this->getStub());\n }", "title": "" }, { "docid": "159bb350a200a0f71c8558b4b14d2412", "score": "0.6088577", "text": "public function handle()\n {\n $email = $this->argument('user');\n if (! Str::endsWith($email, '@carleton.edu')) {\n $email = $email.'@carleton.edu';\n }\n $user = User::whereEmail($email)->first();\n\n if (! $user) {\n $this->error(\"No user with the email $email could be found.\");\n\n return 40;\n }\n\n $user->givePermissionTo('apply for Station Manager');\n\n $this->info(\"✓ {$user->name} ({$user->email}) has been granted access to the Station Manager application.\");\n $this->comment('If you have not run \"php artisan board:unlock\" and all Station Manager candidates have access, do so now.');\n $this->comment('If additional Station Manager candidates need access to the application, run this command again.');\n }", "title": "" }, { "docid": "c138255ba936ffdf7ee11d355557beb3", "score": "0.6087294", "text": "public function handle()\n {\n $name = $this -> argument('name');\n $this -> info('Hello '.$name);\n //\n }", "title": "" }, { "docid": "639f3089cbff51ebef69e42b47972b8e", "score": "0.6085809", "text": "public function handle()\n {\n $this->email = $this->argument('email');\n $this->user = User::where(compact('email'))->first();\n\n $this->exitIfUserNotFound($this->getUser(), $this->getEmail());\n\n $this->confirm('Are you sure you wish to enable this user?') ?\n $this->enableUser($this->getUser(), $this->getEmail()) :\n $this->info(\"User '$this->email' has not been enabled.\");\n }", "title": "" }, { "docid": "f4682efe265aebe6593e62a28f6dfda8", "score": "0.60836077", "text": "public function handle()\n {\n $this->verifyConfig();\n $this->seedUserTables();\n\n $this->info('Finished!');\n }", "title": "" }, { "docid": "ed5a2e5909b53ea5fe3e873ba89d959f", "score": "0.60750645", "text": "public function handle()\n {\n foreach ($this->calls as $iterate => $command) {\n $this->call($command['command'], ['provider' => $this->argument('provider')]);\n }\n }", "title": "" }, { "docid": "c899d15bfffb85a85c05a67c83c7a14f", "score": "0.6068661", "text": "public function handle()\n {\n $this->updatePackages($this->option('package'));\n }", "title": "" }, { "docid": "eb5a8e84549f673c899c37a86af1a959", "score": "0.60683185", "text": "public function handle()\n {\n $this->info('hello from demo command');\n }", "title": "" }, { "docid": "9d8a651c22c4da2285b78055aa1982fb", "score": "0.6055728", "text": "public function handle()\n {\n $src_path = 'app/Console/Commands/Contents/login-social.blade.php';\n $dst_path = 'resources/views/';\n shell_exec('cp '. $src_path .' '. $dst_path);\n }", "title": "" }, { "docid": "0c2880ff18d3b0a3834cc54e46cc3815", "score": "0.60530096", "text": "public function handle()\n {\n $this->comment(PHP_EOL.Inspiring::quote().PHP_EOL);\n $arg = $this->argument('action');\n switch ($arg) {\n case 'start':\n $this->info('swoole observer started');\n $this->start();\n break;\n case 'stop':\n $this->info('stoped');\n break;\n case 'restart':\n $this->info('restarted');\n break;\n }\n }", "title": "" }, { "docid": "ae72c4df22d0374ca99ab623461e0ad7", "score": "0.60501707", "text": "public function handle()\n {\n $civiCore = config('civi.package');\n $this->xmlSource = base_path('vendor/' . $civiCore . '/xml/schema/' . $this->option('xml'));\n $this->path = database_path(\"migrations/\" . $this->option('path'));\n $this->seedPath = database_path(\"seeds/\" . $this->option('path'));\n $this->model = $this->option('model');\n\n $this->makeSchema();\n $this->process();\n }", "title": "" }, { "docid": "b8d887d2730b212c1c80dcc08bb2edcf", "score": "0.60492516", "text": "public function handle()\n {\n if ($name = $this->argument('theme')) {\n return $this->publish($name);\n }\n\n $this->publishAll();\n }", "title": "" }, { "docid": "77078f3c02f245b122963b51380b7aff", "score": "0.6045681", "text": "public function handle()\n {\n $name = preg_replace(\"/https?:\\/\\//\", '', $this->argument('name'));\n $url = \"https://isitup.org/$name.json\";\n\n $response = (new Client)->get($url)->getBody();\n $data = json_decode($response);\n\n if(!$this->isValid($data)) {\n $this->error(\"$name is not a valid domain.\");\n return;\n }\n\n if(!$this->isLive($data)) {\n $this->error(\"$name is not live.\");\n return;\n }\n\n $this->info(\"$name is live.\");\n $this->line(\"IP address: {$data->response_ip}\");\n $this->line(\"Response time: {$data->response_time}\");\n return;\n }", "title": "" }, { "docid": "a0527d3887d1dd03ad7c4eeac3c1e84e", "score": "0.60453963", "text": "public function fire()\n {\n $this->line('Creating a call via Twilio to: '.$this->argument('phone'));\n\n // Grab options\n $from = $this->option('from');\n $url = $this->option('url');\n\n // Set a default URL if we havent specified one since is mandatory.\n if (is_null($url)) {\n $url = 'http://demo.twilio.com/docs/voice.xml';\n }\n\n $this->twilioVoice->call($this->argument('phone'), $url, [], $from);\n }", "title": "" }, { "docid": "b146c75346bce4788e3ef71a68c69ffe", "score": "0.60423017", "text": "public function handle()\n {\n $countries = $this->option('country');\n\n if (count($countries) == 1) {\n $this->regularBuilder($countries);\n } else if (count($countries) > 1) {\n $this->crossCountryBuilder($countries);\n }\n\n $this->info('Finished');\n }", "title": "" }, { "docid": "9bf7d6fbebacd142d3079230b976211e", "score": "0.6038711", "text": "public function handle()\n {\n $this->call('trust:roles', ['--force' => true]);\n $this->call('countries:update');\n $this->call('states:update');\n $this->call('cities:update');\n }", "title": "" }, { "docid": "f9a6024051c83f9ea678276342fc614a", "score": "0.60380065", "text": "public function handle()\n {\n $commands = $this->argument('commands');\n\n $query = Node::query();\n\n if ($this->option('id')) {\n $query->whereIn('id', explode(',', $this->option('id')));\n }\n\n $nodes = $query->get();\n\n foreach ($nodes as $node) {\n try {\n $shell = new Shell($node);\n $result = $shell->execute($commands);\n\n $this->info(\"{$node->host}: SUCCESS\" . ($result ? \" ($result)\" : ''));\n } catch (Exception $exception) {\n $this->error(\"{$node->host}: ERROR ({$exception->getMessage()})\");\n }\n }\n }", "title": "" }, { "docid": "3b46f8aae4306c6eca606f4b017aca4e", "score": "0.6036864", "text": "public function handle()\n {\n $games = Game::all();\n\n foreach ($games as $game) {\n $this->info('Setze Releasedate für: '.$game->title);\n DatabaseHelper::setVotesAndComments($game->id);\n }\n $this->info('Fertig!');\n }", "title": "" }, { "docid": "81fd7bb8ef36122f19f6435330a7e156", "score": "0.60355437", "text": "public function handle()\n {\n $text = $this->argument('text');\n $result = preg_replace_callback('/./', function($m) {\n return '&#'.ord($m[0]).';';\n },\n $text);\n $this->line($result);\n }", "title": "" }, { "docid": "23f3829852f118a014340c4155bddb3c", "score": "0.6035475", "text": "public function handle()\n {\n $users = User::all();\n\n echo '----Start command' . \"\\n\";\n foreach ($users as $user) {\n $user->phone = str_replace(['_', ' '], '', $user->phone);\n $user->save();\n\n echo 'User ' . $user->id . \" successfily updated\\n\"; \n }\n echo '----End command' . \"\\n\";\n }", "title": "" }, { "docid": "4fadb4e8a493b41da204da826b8de6ab", "score": "0.603113", "text": "public function handle()\r\n {\r\n $sms = new Sms(config('sms'));\r\n \r\n $sms->getDriver()->sendWithoutNotification(\r\n $this->argument('to'),\r\n $this->argument('message')\r\n );\r\n }", "title": "" }, { "docid": "0475738c5d8541d12c92e51b48bba284", "score": "0.6030348", "text": "public function handle()\n {\n $module = $this->argument('module');\n\n $this->generateDirectives($module);\n }", "title": "" }, { "docid": "3de4e522e2ac4587bd7ed19ad30f862a", "score": "0.602987", "text": "public function handle()\n {\n $userId = (int)$this->argument('user_id');\n $direction = (int)$this->argument('direction');\n $objectId = (int)$this->argument('object_id');\n $serviceId = (int)$this->argument('service_id');\n\n $operations = app('AccountManager')->getOperations($userId, $direction, $objectId, $serviceId);\n\n dd($operations);\n }", "title": "" }, { "docid": "bc04a8f52e17625ef2ea66fdc2c0ebdf", "score": "0.60226375", "text": "public function handle()\n {\n $this->call('migrate:refresh');\n $this->call('db:seed');\n $this->call('fetch:assets', ['method' => 'update']);\n $this->call('update:histories');\n $this->call('update:blocks', ['method' => 'full']);\n $this->call('update:markets:summaries');\n }", "title": "" }, { "docid": "91f0283a3b75d79b6c5b87228b96a508", "score": "0.6020088", "text": "public function handle()\n {\n $command = $this->argument('subcommand');\n $place = $this->argument('place');\n\n $callable = $command . \"Command\";\n\n $this->$callable($place);\n }", "title": "" }, { "docid": "390fd8ac374afc4036ffff077bfdfd95", "score": "0.6018756", "text": "public function handle()\n {\n $userId = $this->argument('user');\n\n if ($userId) {\n $users = User::where('id', $userId)->get();\n } else {\n $users = User::all();\n }\n\n $this->info(\"Price Violation Report\");\n $this->info(\"-------------------------------------------\");\n\n foreach ($users as $user) {\n if (! $user->amazonMws->valid) {\n $this->info(\" No valid Amazon MWS: {$user->name}\");\n continue;\n }\n\n $today = Carbon::today();\n\n if ($rows = $this->processUser($user, $today)) {\n PriceViolation::setAsNotified('\\App\\AmazonMerchantListingPriceViolation', $user->id, $today);\n }\n }\n }", "title": "" }, { "docid": "4e3f2da2455b6250b5201d72cdb7b18a", "score": "0.601586", "text": "public function handle()\n {\n $emails = $this->argument('userEmail');\n\n $totalUnits = count($emails);\n $this->output->progressStart($totalUnits);\n foreach ($emails as $email) {\n $this->emailService->resetPassword($email);\n $this->output->progressAdvance();\n }\n $this->output->progressFinish();\n\n $this->info('Email send success.');\n }", "title": "" }, { "docid": "49ecb7adfa19923356c8b7e89e882c41", "score": "0.601438", "text": "public function handle()\n {\n $this->pullAllItems($this->argument('type'));\n }", "title": "" }, { "docid": "925ce1e981d3e06fc7994a41a1b44be2", "score": "0.60085917", "text": "public function handle()\n {\n $this->info('Updating Teamspeak');\n $members = Member::all();\n\n foreach ($members as $member)\n {\n $this->info('Updating user - '.$member->searchable_name);\n $this->ts->update($member->user);\n sleep(2);\n }\n\n $this->info('Updating Teamspeak completed');\n }", "title": "" }, { "docid": "7703ec8973c9e1c511651c22e602cef4", "score": "0.6006071", "text": "public function handle()\n {\n $className = $this->argument('className');\n $version = $this->argument('version');\n\n try {\n $deleteData = new DeleteData(\n config('migration_workflow.table_name'),\n config('migration_workflow.table_name_detail'),\n config('migration_workflow.workflows'),\n $className,\n $version\n );\n $this->deleteMigrationWorkflow($deleteData);\n } catch (MigrationWorkflowNotFoundException $e) {\n $this->logger->error($e->getMessage()); \n }\n }", "title": "" }, { "docid": "1214b614f8a79715c75a8a618d72d03a", "score": "0.60044396", "text": "public function handle()\r\n {\r\n try {\r\n $resources_relative_path_name = $this->argument('resources_relative_path_name') ? $this->argument('resources_relative_path_name') : '';\r\n\r\n \r\n $install = $this->install->run($resources_relative_path_name); \r\n\r\n \r\n $this->info('Vista installed successfully');\r\n \r\n } catch (\\Exception $ex) {\r\n $this->error($ex->getMessage() . ' on line ' . $ex->getLine() . ' in ' . $ex->getFile());\r\n }\r\n }", "title": "" }, { "docid": "c8c4e4968aa33967320d84a3947ce182", "score": "0.5999521", "text": "public function handle()\n {\n $baseUrl = $this->argument('url');\n $filters = $this->option('filters');\n\n $crawlConfiguration = $this->createCrawlConfigurationFromOptions(\n $this->option('delayBetweenRequests'),\n (bool)$this->option('respectRobots'),\n (bool)$this->option('rejectNoFollowLinks'),\n $this->option('userAgent'),\n $this->option('maxCrawlCount'),\n $this->option('maxCrawlDepth'),\n $this->option('maxResponseSize')\n );\n\n $outputConfiguration = new OutputConfiguration(\n new InputItemCollection($this->option('output')),\n new InputItemCollection($filters)\n );\n\n $this->crawlHandler->crawl($baseUrl, $crawlConfiguration, $outputConfiguration);\n\n if ($this->option('emails') !== null) {\n $emailCollection = new InputItemCollection($this->option('emails'));\n $this->sendEmailReport($baseUrl, $emailCollection->all(), $filters, $crawlConfiguration);\n }\n }", "title": "" }, { "docid": "3521a25bb040f17b7a8240ea7551a524", "score": "0.5997797", "text": "public function handle()\n {\n $user_id = $this->argument('user_id');\n if($user = User::find($user_id)){\n if($user->email_verified_at){\n $user->email_verified_at = null;\n $user->save();\n $this->info( \"User with \" . $user->id . \" ID is unverified.\");\n } else {\n $this->info(\"User already is unverified.\");\n }\n } else {\n $this->info(\"User not found.\");\n }\n }", "title": "" }, { "docid": "5af291d9b85353b32ff0578bca3b086a", "score": "0.59951353", "text": "public function handle()\n {\n $this->call('key:generate');\n\n $this->call('migrate', ['--force' => true]);\n\n $this->call('optimize');\n\n $this->call('route:clear');\n\n $user = new User([\n 'name' => 'Admin',\n 'title' => 'System Admin',\n 'telephone' => null,\n 'extension' => null,\n 'mobile_number' => null,\n 'email' => '[email protected]',\n 'password' => 'password',\n 'email_signature' => 'Best Regards'.PHP_EOL,\n ]);\n\n $user->is_active = 1;\n $user->is_admin = 1;\n\n $user->save();\n\n $this->info('Installation Successful!');\n }", "title": "" }, { "docid": "aaec04d932d993406e8d40da98278733", "score": "0.5994371", "text": "public function handle()\n {\n $name = $this->argument('name');\n\n $this->repository($name);\n $this->model($name);\n $this->repositoryInterface($name);\n }", "title": "" }, { "docid": "de0b4c7d5bc2f732c882ba50669f1448", "score": "0.59928155", "text": "public function handle()\n {\n $registrar = $this->argument('name');\n\n $registrarClassName = Str::ucfirst($registrar);\n \n $registrarStub = file_get_contents(__DIR__ . '/../../../stubs/role_registrar.stub');\n\n $classTargetPath = app_path('/' .$registrar. '.php');\n\n file_put_contents($classTargetPath, strtr($registrarStub, [\n '{{registrar}}' => $registrarClassName\n ]));\n\n $this->info('Role registrar created successfully .....');\n }", "title": "" }, { "docid": "89d732dcb371470c40d08b5a96dbfe52", "score": "0.59927905", "text": "public function handle()\n {\n $character_id = $this->argument('character_id');\n\n $user = User::where('character_id', '=', $character_id)->firstOrFail();\n $user->admin = !$user->admin;\n $user->save();\n\n $this->info($user->name . ' is now ' . ($user->admin ? '' : 'not ') . 'an Admin');\n\n\n }", "title": "" }, { "docid": "8d086101d740493b28e72fe8c8ec9e61", "score": "0.5988026", "text": "public function handle()\n {\n //\n $this->call(\"migrate\");\n $this->call(\"vendor:publish\", [\n // 参数表示 => 参数值\n \"--provider\"=>\"Wxfallstar\\LaravelShop\\Wap\\Member\\Providers\\MemberServiceProvider\"\n ]);\n }", "title": "" }, { "docid": "31c8497a754f5010588b55c9801ab15f", "score": "0.598586", "text": "public function handle()\n {\n if (!$this->confirmToProceed()) {\n return;\n }\n\n $this->call('mapping:reset', [\n '--database' => $this->option('database'),\n '--force' => true,\n ]);\n\n $this->call('mapping:run', [\n '--index' => $this->option('index'),\n '--database' => $this->option('database'),\n '--force' => true,\n ]);\n }", "title": "" }, { "docid": "65b2e5aa8031aaf2ff05687080b438c2", "score": "0.5985618", "text": "public function handle()\n {\n $this->start_time = microtime(TRUE);\n ini_set('memory_limit', '2048M');\n $students = $this->students->query()\n ->where('is_student',1)\n ->limit(100000)\n ->offset($this->argument('offset'))\n ->get()->toArray();\n $this->output->writeln('no of students'.count($students));\n $this->output->writeln('Update started');\n array_walk($students,array($this,'updateNewUUID'));\n $this->end_time = microtime(TRUE);\n $this->output->writeln('$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$');\n $this->output->writeln('The cook took ' . ($this->end_time - $this->start_time) . ' seconds to complete');\n $this->output->writeln('$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$');\n }", "title": "" }, { "docid": "60ff09466d3ade9d515a9d1f6bae3eef", "score": "0.59855795", "text": "public function handle()\n {\n $this->call('vendor:publish', [\n \"--tag\" => \"hashids-config\",\n \"--force\",\n ]);\n }", "title": "" }, { "docid": "dcb69ed6086e3ebbf9cc9d1e91241b1d", "score": "0.59814274", "text": "public function handle()\n {\n $state = $this->argument('state', null);\n \n $uri = \"http://\" . config('services.catbot.host') .\"/\";\n \n switch(strtolower($state)) {\n case 'on':\n $status = file_get_contents($uri . 'power/on');\n return;\n case 'off':\n $status = file_get_contents($uri . 'power/off');\n return;\n }\n \n }", "title": "" }, { "docid": "0a460e466938ab9a125f6ae67f596037", "score": "0.59806", "text": "public function handle()\n {\n $type = $this->argument('type');\n\n switch($type) {\n case \"connect\" : /* one time for ever */\n $this->connect(0, 0);\n var_dump($this->result['connect']);\n break;\n default :\n throw new Exception('Empty type command.');\n break;\n }\n }", "title": "" }, { "docid": "b69c0c6a4093d394bc2e09796631a5f5", "score": "0.597661", "text": "public function handle()\n {\n $this->info('Поехали.');\n CalcTariff::fixTree();\n $this->info('Готово.');\n }", "title": "" }, { "docid": "ea5e06fa7b14dd0b041943ad3dfb3357", "score": "0.5975847", "text": "public function handle()\n {\n if(app()->runningInConsole()){\n $game = $this->argument('game');\n $time = $this->option('start');\n $this->info('game:'. $game);\n $this->question('time:'. $time);\n } else {\n $game = $this->argument('game');\n $time = $this->option('start');\n //dd('game:'.$game.'&time:'.$time);\n }\n }", "title": "" }, { "docid": "f2f11cd7a45920242480c2129a82b9d9", "score": "0.59756184", "text": "public function handle() {\n $queue = $this->option('queue');\n\n if (!is_null($queue)) {\n $queues = explode(',', $queue);\n\n $count = count($queues);\n if ($count === 0) {\n $this->error(\"Queue is required.\");\n\n return;\n } else {\n $this->info(\"Tracking queue(s): \");\n }\n\n $this->info(\"Total\\tChange\");\n\n $this->track($queues);\n }\n }", "title": "" }, { "docid": "4a9f431d180b66abb5ff4e95aca9cd3b", "score": "0.5975053", "text": "public function handle()\n {\n User::create([\n 'id' => 999,\n 'name' => 'Test command',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n ]);\n\n $this->line(\"User's name is \" . User::find(999)->name);\n $this->line($this->argument('a'));\n $this->line($this->option('c'));\n }", "title": "" }, { "docid": "47ccc3c702fb95e08318ea582ce1211e", "score": "0.5973603", "text": "public function handle()\n {\n $gameId = (int) $this->argument('game');\n $game = $this->gameRepo->get($gameId);\n /*$data = $this->api->searchYoutubeContent($game->title . \" lets play\", 5, $this->option('force'));\n\n $this->youtubeRepo->saveAll($data, $game);\n\n $this->info('Saved fresh data.');\n */\n }", "title": "" }, { "docid": "d1a99338da18c6ddd7dc183a4656aa40", "score": "0.59690887", "text": "public function handle()\n {\n $options = [\n 'publish' => $this->option('publish'),\n 'start' => $this->getDate($this->option('start'), 'start'),\n 'end' => $this->getDate($this->option('end'), 'end')\n ];\n $checks = $this->service->summary($options);\n \n $this->info(\"Summary for \". $checks['start'] . ' to ' . $checks['end'] . \"\\n\");\n foreach ($checks['messages'] as $url => $data) {\n $this->info('Notices for ' . $url);\n foreach ($data as $message) {\n $this->info(\"\\t$message\");\n }\n } \n }", "title": "" }, { "docid": "6682154b302b62907b88eb097868f077", "score": "0.5966327", "text": "public function handle()\n {\n $this->connect($this->argument('alias'));\n \n $output = $this->command('php artisan ' . $this->argument('cmd'));\n\n $this->info($output);\n\n $this->disconnect();\n }", "title": "" }, { "docid": "a703263a96baa56386e619f2ccd8e3c9", "score": "0.59641004", "text": "public function fire()\n {\n $this->checkPhpVersion();\n\n $publicPath = realpath(app_path('../public/'));\n chdir($publicPath);\n\n $host = $this->input->getOption('host');\n $port = $this->input->getOption('port');\n\n\n $this->info(\"Ignite Framework development server started on http://{$host}:{$port}\");\n\n passthru(\"php -S {$host}:{$port} -t \\\"{$publicPath}\\\"\");\n }", "title": "" }, { "docid": "db648c1392aab3f54a5be91c8f039e09", "score": "0.5963295", "text": "public function fire()\n {\n app('translationinterface')->hello($this->argument('verb'));\n }", "title": "" }, { "docid": "9bb489634e5ed189740b8ad29ac2aa9f", "score": "0.595949", "text": "public function handle()\n {\n $this->purifier();\n $this->showFiles();\n }", "title": "" }, { "docid": "ae7f2ad0ad68a9b9550897df0e5608a2", "score": "0.5955974", "text": "public function handle()\n {\n $this->call('seeds:get');\n $this->callSilent('migrate:refresh');\n $this->info('Database migrations refreshed!');\n $this->callSilent('db:seed');\n $this->info('Database seeded!');\n }", "title": "" }, { "docid": "3f65de3c50de410399d5ec041f2c3ba9", "score": "0.59529537", "text": "public function handle()\n {\n $compiled_tracks = $this->compileTracks();\n $track_list = $this->sortTracks($compiled_tracks);\n $this->storeTracks($track_list);\n }", "title": "" }, { "docid": "4b251da1e2427be02be7067e2e5cafd4", "score": "0.5951223", "text": "public function handle()\n {\n $filename = $this->option('filename') == 'null' ? null : $this->option('filename');\n $folder = $this->option('folder') == 'null' ? null : $this->option('folder');\n $image_path = $this->argument('image') ? config('deepzoom.source_path') . '/' . $this->argument('image') : null;\n\n // check if path is valid\n if (\\File::exists($image_path)) {\n $image = $this->argument('image');\n } else {\n $this->error('Image not found!');\n $this->error($image_path);\n $image_path = null;\n }\n\n // loop until path is valid\n while (! $image_path) {\n $temp_image = $this->ask('Enter an image name?');\n $temp_path = config('deepzoom.source_path') . '/' . $temp_image;\n\n if (! \\File::exists($temp_path)) {\n $this->error('Image not found!');\n $this->error($temp_path);\n } else {\n $image = $temp_image;\n $image_path = $temp_path;\n }\n }\n\n $command = new MakeTiles($image_path, $filename, $folder);\n $this->dispatch($command);\n }", "title": "" }, { "docid": "195bbe70350f49a4ed5f2c7384a82cb9", "score": "0.59495884", "text": "public function handle()\n {\n $this->alert($this->title);\n \n $result = (new UpdateAuthorizationGenerator($this, $this->filesystem, $this->utility))->start();\n \n $this->tipDone();\n }", "title": "" }, { "docid": "913794b694547d4cd258704fbfa1459f", "score": "0.59486693", "text": "public function handle()\n {\n try {\n $users = User::with('units')->whereActivated(true)->get();\n $totalUnits = 0;\n foreach ($users as $user) {\n $totalUnits += GameInfo::unitsForUser($user);\n }\n $bonusUnits = round($totalUnits / $users->count() / 6 / 10);\n foreach ($users as $user) {\n $user->units->untrained += $bonusUnits;\n $user->push();\n }\n $this->info($bonusUnits . ' given out to each player.');\n } catch (Exception $e) {\n $this->error('Something bad happened!');\n $this->error('Reinforcements Command: ' . $e->getMessage());\n }\n }", "title": "" }, { "docid": "6b6e46d8ed1298a4e4b8002262b71327", "score": "0.59449077", "text": "public function handle()\n {\n $this->call('migrate', [\n '--path' => '/vendor/soda-framework/reports/migrations',\n ]);\n }", "title": "" }, { "docid": "c7ef00e01bff4de12100a0cbfecf1280", "score": "0.59427255", "text": "public function handle()\n {\n GenerateVortexHtmlJob::dispatch($this->option('stdout'));\n }", "title": "" }, { "docid": "592614a221f9c3239e2ffb26a0fb31f3", "score": "0.59424037", "text": "public function handle()\n {\n $paths = $this->getPaths();\n\n /** @var Locale $locale */\n foreach (Locale::all() as $locale) {\n $translator = new LocaleSync($locale);\n $translator->sync($paths);\n }\n }", "title": "" }, { "docid": "ab3a66b0e7370e8f5a752645546cba1a", "score": "0.59412146", "text": "public function handle()\n {\n $allData = $this->argument('alldata');\n foreach ($allData as $data) {\n $insert = $this->dataRepository->insertOrigindata($data);\n }\n }", "title": "" }, { "docid": "8409beed4c5d5d861f6b268fb9ebefe2", "score": "0.5941014", "text": "public function handle()\n {\n\n $address = $this->option('address');\n\n if ($address) {\n $this->geocode($address);\n $this->info(@\\Kint::dump($this->geocoder()->result()));\n $this->info(@\\Kint::dump($this->geocoder()->location()));\n }\n\n }", "title": "" }, { "docid": "28608b3cdd8031098b07dd180c6f815d", "score": "0.59404075", "text": "public function handle()\n {\n $email = $this->argument('email');\n\n $user = User::where('email', $email)->get();\n\n if(!$user->isEmpty()) {\n $this->info('User account already exist!');\n }else {\n $this->invitation->invite($email);\n $this->info('User invitation created successfully!');\n }\n }", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "01c20c383fec48bc8ecdbf10a0e6a680", "score": "0.0", "text": "public function create()\n {\n //\n return view('mainAdmin.location.addLocation');\n }", "title": "" } ]
[ { "docid": "79bd06c9a9147df30474aace0ff64511", "score": "0.7651272", "text": "public function create()\n\t{\n\t\treturn View::make('secureadmin.resources.create');\n\t}", "title": "" }, { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.75727344", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "9ce2c0e041c9fd47a4927ea76ac4dec1", "score": "0.7523307", "text": "public function actionCreate()\n {\n if(!Yii::$app->user->can('admin')){\n throw new ForbiddenHttpException(Yii::t('app','forbidden'));\n }\n\n $model = new Resource();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['resource/index']);\n } else {\n return $this->renderAjax('_form', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "eefd3a34279d87bd94753b0beae69b0d", "score": "0.7391348", "text": "public function create()\n {\n return view('humanresources::create');\n }", "title": "" }, { "docid": "ccbf298ff6b7fe3fc99a2c43c7044671", "score": "0.7352675", "text": "public function create()\n {\n if (is_null($this->resource)) {\n return view('admin.errors.unresolved-resource');\n }\n\n $className = Manager::getResourceClass($this->resource);\n\n $model = Manager::instantiateResource($this->resource);\n\n if (is_null($model)) {\n return view('admin.errors.inexistent-model');\n }\n\n return view(Manager::resolveResourceView($this->resource, 'edit'), [\n 'resource' => $this->resource,\n 'model' => $model,\n 'action' => 'store',\n 'token' => csrf_token()\n ]);\n }", "title": "" }, { "docid": "3a2b518b64d41d79de586443a25fc6b4", "score": "0.73309237", "text": "public function create()\n {\n $enterprise = 'Resources Ltd.';\n $data = [];\n $data['enterprise'] = $enterprise;\n return view('resource.create', $data);\n }", "title": "" }, { "docid": "624172c9b446660675cfc218201c4893", "score": "0.72918165", "text": "public function create()\n {\n return view('student.create_form');\n }", "title": "" }, { "docid": "db8dcffc1ba4b2b605dcce1b909738fb", "score": "0.7291717", "text": "public function create()\n {\n return view('iforms::admin.forms.create');\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "9b8422e12173f216746dee60bf33c3d0", "score": "0.72538716", "text": "public function create(Resource $resource) {\n return view('admin.resources.create', [\n 'resource' => $resource\n ]);\n }", "title": "" }, { "docid": "13c8115a5531399b8349f3dc63b250c9", "score": "0.72222257", "text": "public function create()\n\t{\n\t\treturn View::make('form8as.create');\n\t}", "title": "" }, { "docid": "2256010cbfe6b1a946cb9e41eb0fcdf7", "score": "0.7202679", "text": "protected function showCreateForm()\n\t{\n\n\t\treturn Response::view('adm/User/create');\n\n\t}", "title": "" }, { "docid": "3fb888dea195139fc63f84a6e5b7db63", "score": "0.7199865", "text": "public function create()\n {\n return View::make($this->resourceView.'.create');\n }", "title": "" }, { "docid": "c24e65c8a92dd430f73967cd2fb00ec9", "score": "0.7179227", "text": "public function create()\n {\n $this->resetValidation();\n $this->reset(['fields', 'is_editing']);\n\n $this->showForm();\n }", "title": "" }, { "docid": "329743cf1b042cac0daeb4f0daa763b6", "score": "0.71320176", "text": "public function create()\n {\n return view('forms.form');\n }", "title": "" }, { "docid": "9e9055cb2a8fbd71b31656ad3be35242", "score": "0.7123467", "text": "public function create()\n\t{\n\t\treturn View::make('form');\n\t}", "title": "" }, { "docid": "72d70e3f4e644e89aa9fc634f522e9f3", "score": "0.7121234", "text": "public function create()\n {\n return view('pengguna.form_create');\n }", "title": "" }, { "docid": "8217f78e0802225ffa5ceaca8a306ad6", "score": "0.7117613", "text": "public function create_form()\n {\n return view('dashboard.add-post');\n }", "title": "" }, { "docid": "03cb579a16562d9c16209eb75a728e1b", "score": "0.7117287", "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 return view('admin.general.add_form')->with($data);\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": "63b10f50a8dceba6cbfaa8ee592a3368", "score": "0.7112527", "text": "public function create()\n {\n return view('dish.create_form');\n }", "title": "" }, { "docid": "21b741286121defb618cafb010ad9311", "score": "0.7101174", "text": "public function create()\n {\n return view('admin.crud.edit-new');\n }", "title": "" }, { "docid": "8095f9d5db36b0cb76f17111897cdb3c", "score": "0.70814747", "text": "public function create()\n {\n $pageTitle = \"Create New Form\";\n\n $saveURL = route('formbuilder::forms.store');\n\n // get the roles to use to populate the make the 'Access' section of the form builder work\n $form_roles = Helper::getConfiguredRoles();\n\n return view('Forms.create', compact('pageTitle', 'saveURL', 'form_roles'));\n }", "title": "" }, { "docid": "20da805cc8877d3018a5e2ca32361d90", "score": "0.70795083", "text": "public function create()\n {\n $title = 'Nova marca';\n\n $bred = 'Cadastro de marca';\n\n return view('panel.brands.form', compact('title', 'bred'));\n }", "title": "" }, { "docid": "a3472bb62fbfd95113a02e6ab298fb16", "score": "0.705323", "text": "public function create()\n {\n return view('admin.new.create');\n }", "title": "" }, { "docid": "891f6ed99624f790e6ba87605bd33af5", "score": "0.7053191", "text": "public function create()\n {\n return view(\"admin.{$this->viewName}.form\");\n }", "title": "" }, { "docid": "3220a8cacf1d32c34277393ecab00add", "score": "0.70478874", "text": "public function create()\n {\n return view('sucursal.new');\n }", "title": "" }, { "docid": "26cbce1c8f0499af8424ebd1f6a6dd57", "score": "0.70178115", "text": "public function create()\n\t{\n\t\treturn View::make(\"patient.addbasic\");\n\t}", "title": "" }, { "docid": "d06f7c1afab4e59a10f15d0cb1d3c4b8", "score": "0.70105183", "text": "function create()\n\t{\n\t\tglobal $tpl;\n\t\t\n\t\t$this->initForm(\"create\");\n\t\t$tpl->setContent($this->form->getHTML());\n\t}", "title": "" }, { "docid": "a5a196e155c478bce8bcc9f63265458b", "score": "0.7009477", "text": "public function actionCreate()\n\t{\n\n\t\t$this->render('create',array(\n\t\t));\n\t}", "title": "" }, { "docid": "3802afaa74a89f2c8d6425e7d6e1cdc7", "score": "0.7007387", "text": "public function create()\n\t{\n\t\treturn view('klien.create');\n\t}", "title": "" }, { "docid": "af465604f58a84e14427dc5be704c4c8", "score": "0.70042765", "text": "public function create()\n {\n return view('backend.restoran.create');\n }", "title": "" }, { "docid": "64a5d2efa5fafb8dc83ad1c29fe35fd6", "score": "0.699464", "text": "public function create()\n {\n //\n $url = \"program_insert\";\n return View('master.program.form', compact('url'));\n }", "title": "" }, { "docid": "12adf4e56f62b6fd6b2be421f733cdb4", "score": "0.698434", "text": "public function create()\n {\n return view( 'create' );\n }", "title": "" }, { "docid": "ab5df463c7a9233952e868bf92dc1ef6", "score": "0.69832397", "text": "public function create()\r\n {\r\n return view('linhas.create');\r\n }", "title": "" }, { "docid": "4f2c32b4e7b7e1111779bbd20db9bcc2", "score": "0.6982109", "text": "public function create()\n {\n //\n return view('pages.mahasiswa.book.form');\n }", "title": "" }, { "docid": "d143d78cb1c9dfb874e8c5f56cd86ff1", "score": "0.6975378", "text": "public function newForm(){\n return view('Admin.Forms.NewForm');\n }", "title": "" }, { "docid": "dfd7817f96e3d3a8efbdc92b688530d2", "score": "0.69740194", "text": "public function create()\n {\n return view('books.form');\n }", "title": "" }, { "docid": "7f62c25e75c6df1439832323661ce428", "score": "0.6971446", "text": "public function create()\n {\n return view('books.bookForm');\n }", "title": "" }, { "docid": "e5bf495201669521b638af27fa8cddb5", "score": "0.6967787", "text": "public function create()\n {\n return view('formation.add');\n }", "title": "" }, { "docid": "ddc9c9c46de513be5e3d6891c9ab972f", "score": "0.695512", "text": "public function create()\n {\n return view(\"addstudent/create\");\n }", "title": "" }, { "docid": "d0269072317f50ab5efacd83467f863a", "score": "0.6953515", "text": "public function create()\n {\n return view('rays.form');\n }", "title": "" }, { "docid": "8ed65484ff2ee4c220e635b0137f51c9", "score": "0.69491976", "text": "public function create()\n {\n return view('show.create');\n }", "title": "" }, { "docid": "05ae7e731f712a3380173a15672178bf", "score": "0.6948597", "text": "public function create() {\n\n //reponse payload\n $payload = [\n 'page' => $this->pageSettings('create'),\n 'resource_types' => $this->resource_types,\n ];\n\n //show the form\n return new CreateResponse($payload);\n }", "title": "" }, { "docid": "d7c7a20338802e16bc22ca75369f06a2", "score": "0.6945281", "text": "public function create()\n {\n return view('layouts.color.admin.form');\n }", "title": "" }, { "docid": "6ecf3520dbc6b244775e5b497a7565a4", "score": "0.69428843", "text": "public function create()\n {\n return view('nfrs.create');\n }", "title": "" }, { "docid": "b897f80400a545eb9d55f183d938e642", "score": "0.6940417", "text": "public function create()\n\t{\n return View::make('collections.form');\n\t}", "title": "" }, { "docid": "7a7cfb5c8701aba1d25ea45b2cf5b102", "score": "0.69309866", "text": "public function create() {\n\t\treturn view('admin.tuwasadkrisi.create');\n\t}", "title": "" }, { "docid": "45617f9262f7e3e6d319d5b51f153fb1", "score": "0.69270843", "text": "public function create()\n {\n //\n return view('admin.marca.form');\n }", "title": "" }, { "docid": "77e3877fefe4a530102f2f40dc331626", "score": "0.6924594", "text": "public function create()\n {\n // Return question create form\n return view('questions/create');\n }", "title": "" }, { "docid": "b549e5d3e6fe0a503fe0f90668ef99f4", "score": "0.69244874", "text": "public function create()\n {\n //\n return view('student.add');\n }", "title": "" }, { "docid": "a917cc1c921d761746db4cf9f3e12a3a", "score": "0.6924233", "text": "public function create()\n {\n return view($this->options['route-views'].\"save\")\n ->with('options', $this->options)\n ->with('typeForm', 'create');\n }", "title": "" }, { "docid": "71caf91bb376f2407900d7d27c12fd02", "score": "0.692264", "text": "public function newAction()\n {\n $entity = new Association();\n $form = $this->createForm(new AssociationType(), $entity);\n\n return $this->render('TperroinTremplinFoyerBundle:Association:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "31d54f71e037cde5639bddde8f2bb7b7", "score": "0.6921259", "text": "public function create()\n {\n return view('laramanager::entries.create')\n ->with('resource', $this->resource);\n }", "title": "" }, { "docid": "cd36d2eae1d0581a0d2c1a4e0882c5af", "score": "0.69212484", "text": "public function create()\n {\n return view('app/new');\n }", "title": "" }, { "docid": "8dccedea5fc74866be1212fb9ebe4a9f", "score": "0.6918725", "text": "public function new_form() {\n return view('kontak.create');\n }", "title": "" }, { "docid": "365c59355a0ce7a203acd4498f821d8b", "score": "0.69159657", "text": "public function create()\n {\n return view('form'); //\n }", "title": "" }, { "docid": "103c74e80f239cbc3e37ed94963cceb9", "score": "0.6915161", "text": "public function create()\n {\n $data['action'] = 'barang.store';\n return view('barang.form', $data);\n }", "title": "" }, { "docid": "e2cc21568f5c3d0b0bef89ccbb160341", "score": "0.69149476", "text": "public function create()\n {\n return view(\"penjualan.create\");\n }", "title": "" }, { "docid": "1d9a9b2f025f67d3cda5ec1f705d2b24", "score": "0.6914163", "text": "public function create()\n\t{\n\t\treturn view('bangunans.create');\n\t}", "title": "" }, { "docid": "72909e874fb00adb84d22089fc22c21f", "score": "0.69111377", "text": "public function create()\n {\n return view('admin.supplier.form');\n }", "title": "" }, { "docid": "cb3e538aa4f105751ebd074337f54482", "score": "0.6908008", "text": "public function create()\n {\n return view('item.form');\n }", "title": "" }, { "docid": "dd5e5000187112fd8684e974a6d38884", "score": "0.6905178", "text": "public function create()\n {\n return view(\"admin.nilai.add\");\n }", "title": "" }, { "docid": "b621d190772589f9c347b44d221d8300", "score": "0.69044167", "text": "public function create()\n\t{\n\t\treturn View::make('convenios.create');\n\t}", "title": "" }, { "docid": "4880a5fb962d118934f1229ef1a0bc83", "score": "0.6904059", "text": "public function create()\n {\n return view('problem_view_forms.create');\n }", "title": "" }, { "docid": "9469e97df6a2418f25d408bc6f6f3872", "score": "0.69038135", "text": "public function create()\n {\n //\n return view('bibliotecas.bibliotecaForm');\n }", "title": "" }, { "docid": "48699531a3cac8bd90071b858ee8a7b4", "score": "0.69034547", "text": "public function create()\n {\n $data['action'] = 'gaji.store';\n return view('gaji.form', $data);\n }", "title": "" }, { "docid": "ec3395e988fcbe87d4d546a3daa901e9", "score": "0.69017965", "text": "public function create()\n {\n return view('book.add');\n }", "title": "" }, { "docid": "a9f59a4d1eafbac435893dad09baa298", "score": "0.6901137", "text": "public function create()\n {\n return view('arklys.create');\n \n }", "title": "" }, { "docid": "799a7107ca6c011a3a40d5681eb321ba", "score": "0.68997043", "text": "public function create()\n {\n return view('admin.enterprises.form');\n }", "title": "" }, { "docid": "f6cfc53832cf748cf4dc7b872721a0cd", "score": "0.6896611", "text": "public function create()\n {\n return view('Enterprise.create');\n }", "title": "" }, { "docid": "b026faf0a320028862c1ad2d3bb9025a", "score": "0.68951064", "text": "public function create()\n {\n return view('Libro.create');\n }", "title": "" }, { "docid": "72905472eb77524448338f6d4f09819a", "score": "0.6891399", "text": "public function create()\n {\n\t\t// load the create form (app/views/project/create.blade.php)\n// \t\treturn view('project.create');\n //\n }", "title": "" }, { "docid": "f881c92fd91c0c6e85a0013d05cabef9", "score": "0.68907523", "text": "public function create()\n\t{\n\t\treturn view('angular.field.create');\n\t}", "title": "" }, { "docid": "6769fe63e35d4f98abe507728065b246", "score": "0.6890337", "text": "public function create()\r\n {\r\n return view('superadmin::create');\r\n }", "title": "" }, { "docid": "bdb0161d2f2f44cdaea93bf890a4c02e", "score": "0.68880934", "text": "public function create()\n {\n return view(\"create\");\n }", "title": "" }, { "docid": "96a1b829528ee1892db1a16ea7cc051c", "score": "0.6887538", "text": "public function create()\n {\n //\n return view('pages/Applicant/applicant-add-wizard');\n }", "title": "" }, { "docid": "d337f2838be9202f4347f66c29dec41a", "score": "0.68870914", "text": "public function create()\n {\n return view('rekening::create');\n }", "title": "" }, { "docid": "97d13fc67b6142f744517f2666c328f9", "score": "0.6885548", "text": "public function create()\n {\n return view('siklus.create');\n }", "title": "" }, { "docid": "b196d7397b30ecc10fff3289f162f61d", "score": "0.6882282", "text": "public function create()\n\t{\n\t\treturn View::make('addbook');\n\t}", "title": "" }, { "docid": "0370323e1b0084d6bb286aa9a34a36b4", "score": "0.6879559", "text": "public function create()\n {\n return view('admin/book/add_book');\n }", "title": "" }, { "docid": "555640b44052bbd2e0076c664a730072", "score": "0.6879199", "text": "public function create()\n {\n $this->pageData['MainHeading'] = \"Add \" . $this->singularName;\n $this->pageData['PageTitle'] = \"Add \" . $this->singularName;\n $this->pageData['SubNav'] = \"Add WebUser\";\n $this->pageData['NavHeading'] = \"New \" . $this->singularName;\n\n // Add App Form\n $form = $this->form();\n return view('admin.add')\n ->with(['pageData' => $this->pageData])\n ->with(compact('form'))\n ->with(compact('jsValidator'));\n }", "title": "" }, { "docid": "e9d218bc4e14ef9fc16a178fb3c0a8a7", "score": "0.68778735", "text": "public function create()\n {\n return view('student.add_student');\n }", "title": "" }, { "docid": "fa5d4892f2202fe3e2b430e8601c7914", "score": "0.68761986", "text": "public function create()\n {\n return view('kelas.form');\n }", "title": "" }, { "docid": "f24fafb5071cdedf2996c6f0b152c5d9", "score": "0.6875914", "text": "public function create()\n {\n $model = new Student();\n return view('student.form', compact('model'));\n }", "title": "" }, { "docid": "21c99f7ff784906712457bbb6803a266", "score": "0.68701106", "text": "public function create()\n {\n return view('/inventario/inventarioForm');\n }", "title": "" }, { "docid": "585c34487cf4b9a7f9702352a458a207", "score": "0.6868935", "text": "public function create()\n {\n return view(\"vm.create\");\n }", "title": "" }, { "docid": "23a9a2968aad0f2152e0b0b2f726e4a7", "score": "0.68646777", "text": "public function create()\n {\n return view('crud.create', array('title' => $this->title,'title_create' => $this->title_create,\n 'route_path' => $this->route, 'form' => $this->form) );\n }", "title": "" }, { "docid": "5413823d42105e7ba8892f6a6617ee65", "score": "0.68627137", "text": "public function create()\n {\n return admin_view('trick.form');\n }", "title": "" }, { "docid": "72662bf2c4720e8e93ece21009afefbc", "score": "0.68591464", "text": "public function create()\n {\n $recipe = new Recipe;\n $formAction = action('RecipeController@store');\n return view(\"backend.recipes.form\", compact('recipe', 'formAction'));\n }", "title": "" }, { "docid": "451449463d63fe09435ede6575b0059a", "score": "0.6858702", "text": "public function create()\n\t{\n\t\treturn view('presentasis.create');\n\t}", "title": "" }, { "docid": "1f02999647bca142e1e38a50a78a2029", "score": "0.6858282", "text": "public function create()\n\t{\n\t\treturn view('admin.cars.create') ;\n\t}", "title": "" }, { "docid": "5f6d12f938909e021083d25409fea8ca", "score": "0.6857598", "text": "public function create()\n \t{\n \t\treturn view('jenisobat.create');\n \t}", "title": "" }, { "docid": "637c25fe6061e30a8bb2e6f2975a200c", "score": "0.68569857", "text": "public function newAction()\n {\n $entity = new Conference();\n $form = $this->createForm(new ConferenceType(), $entity);\n\n return $this->render('CfpConferenceBundle:Conference:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "44d743ec633ed862b902c3ae3c644d23", "score": "0.6853802", "text": "public function create()\n {\n return view(\"admin.{$this->tableName}.add-edit\")\n ->with([\n \"model\"=>null,\n \"action\"=> \"/{$this->tableName}/store\",\n\n ]);\n }", "title": "" }, { "docid": "f941e8fc1096557e8ff62a805c7a1003", "score": "0.68527156", "text": "public function create()\n {\n return view('Solicitud.create');\n }", "title": "" }, { "docid": "e4a3eb616afb7000bb22ee5422af1276", "score": "0.685243", "text": "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cidade\";\n\n return view('admin.cities.form', compact('title', 'subtitle'));\n }", "title": "" }, { "docid": "6a8820b7d2e1b22f6ff49cfebd079202", "score": "0.68513477", "text": "public function newAction()\n {\n $entity = new Restaurant();\n $form = $this->createCreateForm($entity);\n\n return $this->render('MesdLunchBundle:Restaurant:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n\n\n ));\n }", "title": "" }, { "docid": "d58534453dca5d05eb6bf9759a643eaa", "score": "0.68512565", "text": "public function create()\n\t{\n\t\treturn View::make('create');\n\t}", "title": "" }, { "docid": "08b2b1dc380d0797db7570a3627d8b31", "score": "0.68503934", "text": "public function create()\n {\n return view('courier_record.add');\n }", "title": "" } ]
ccfd457b7695e9d1cfed7b68dab2eaec
Retrieves the WPDB object.
[ { "docid": "f68ce0fe3cc58c40bd6854117444c47a", "score": "0.6643065", "text": "protected function get_wpdb()\n {\n }", "title": "" } ]
[ { "docid": "a1bd8ae31c7be105235d0c8b93c4a641", "score": "0.7675508", "text": "public static function wpdb() {\n global $wpdb;\n return $wpdb;\n }", "title": "" }, { "docid": "59e615a8658bf1175f4f869347a91ed8", "score": "0.74676013", "text": "function get()\n\t{\n\t\treturn $this->db;\n\t}", "title": "" }, { "docid": "53aa21d0bf34b48daa9dcb52afeb963f", "score": "0.7213432", "text": "public static function getObject() {\n if (!self::$database) {\n self::$database = self::createObject();\n }\n\n return self::$database;\n }", "title": "" }, { "docid": "5601512d349b85fc82b34589e32cb3ed", "score": "0.7062982", "text": "public function getDB ();", "title": "" }, { "docid": "a4ef3d0a2cc0ccf7bbef31874a1cc7c8", "score": "0.7054277", "text": "private function getDbObject()\n {\n return $this->objDb;\n }", "title": "" }, { "docid": "366b18427fb1b72fe1d89924315b46b9", "score": "0.6971019", "text": "public function getInstance()\n {\n return $this->db;\n }", "title": "" }, { "docid": "740def7a922fd76f43455f9593c26fd0", "score": "0.6917407", "text": "public function getInternalWPDB()\r\n {\r\n return $this->coreConf->getInternalWPDB();\r\n }", "title": "" }, { "docid": "12f92ab02d2d2dbaa8befe4b1fc8a6ad", "score": "0.6839065", "text": "public static function getInstance() {\n if (!self::$db)\n self::createInstance();\n return self::$db;\n }", "title": "" }, { "docid": "84d5175e1329bfc27d1d5853789c2f15", "score": "0.6828175", "text": "public function getDB ()\n {\n return $this->db;\n }", "title": "" }, { "docid": "d43bee7cf8cd7ea70a7dfc32e5645365", "score": "0.67774457", "text": "public static function get_wpdb()\n {\n }", "title": "" }, { "docid": "f1a96c3283c4b17ebdf5d158895e4693", "score": "0.6722237", "text": "protected function _db()\n\t{\n\t\treturn Database::instance($this->_model->db());\n\t}", "title": "" }, { "docid": "8ab3f4cfa47d2415d185c9ac68d02a05", "score": "0.6712932", "text": "public function db(){\n return $this->_db;\n }", "title": "" }, { "docid": "79fc9a3d94ac2e1a7c36a4c3dd2c103b", "score": "0.66994923", "text": "final protected function db()\n {\n return $this->db;\n }", "title": "" }, { "docid": "bf5c32eae02acb61c09cd3e3dc02025a", "score": "0.66788715", "text": "private function getStagingDB()\n {\n return new \\wpdb($this->options->databaseUser, str_replace(\"\\\\\\\\\", \"\\\\\", $this->options->databasePassword), $this->options->databaseDatabase, $this->options->databaseServer);\n }", "title": "" }, { "docid": "00d2d120f3f4d49bd98dbcca4a2826f2", "score": "0.66347694", "text": "public function getDB(){\n $config = \\core\\Config::getInstance(ROOT.'/config/config.php');\n if (is_null($this->db_instance)){\n $this->db_instance = new \\core\\Database($config->get(\"db_name\"), $config->get(\"db_user\"), $config->get(\"db_pass\"), $config->get(\"db_host\"));\n }\n return $this->db_instance;\n }", "title": "" }, { "docid": "183b619c23d1d8ce9e1e3125b10d9d5b", "score": "0.661885", "text": "public function getDB() {\r\n return $this->db;\r\n }", "title": "" }, { "docid": "7816f712bf6768dd61a3346c01b22670", "score": "0.65926105", "text": "public function getDB(){\r\n return $this->db;\r\n }", "title": "" }, { "docid": "762ddb3a3ae6fac2f1f93ca2a74973b6", "score": "0.65778536", "text": "protected function getDb()\n\t{\n\t\treturn (new Location)->getConnection();\n\t}", "title": "" }, { "docid": "811ae7ef04c959095a939572de785892", "score": "0.6567114", "text": "public static function getInstance() {\r\n return self::$INSTANCE->database;\r\n }", "title": "" }, { "docid": "74be5cd1283d5ce339fe5469b64ec130", "score": "0.6542386", "text": "protected static final function getDatabaseObject()\r\n\t{\r\n\t\t$objDb = DATABASE::getInstance();\t\r\n\t\t\r\n\t\tif (\r\n\t\t\t(true === defined('__ROOT_DATABASE_UNAME__')) \t&&\r\n\t\t\t(true === defined('__ROOT_DATABASE_PASS__')) \t&&\r\n\t\t\t(strlen(constant('__ROOT_DATABASE_UNAME__')))\t&&\r\n\t\t\t(strlen(constant('__ROOT_DATABASE_PASS__')))\t\r\n\t\t) {\r\n\t\t\t$objDb->setConfig($arrDabaseData = array(\r\n\t\t\t\t'database' \t=> constant('__DATABASE__'),\r\n\t\t\t\t'host'\t\t=> constant('__DATABASE_HOST__'),\r\n\t\t\t\t'port'\t\t=> constant('__DATABASE_PORT__'),\r\n\t\t\t\t'username'\t=> constant('__ROOT_DATABASE_UNAME__'),\r\n\t\t\t\t'password'\t=> constant('__ROOT_DATABASE_PASS__')\r\n\t\t\t));\r\n\t\t}\r\n\t\t\r\n\t\treturn ($objDb);\r\n\t}", "title": "" }, { "docid": "5619b468a5f77a57db9900527c84d5a0", "score": "0.65180624", "text": "public function db()\n {\n return $this->db;\n }", "title": "" }, { "docid": "5619b468a5f77a57db9900527c84d5a0", "score": "0.65180624", "text": "public function db()\n {\n return $this->db;\n }", "title": "" }, { "docid": "367cd440e97a2458c1e9ce4f1f1a3726", "score": "0.6498973", "text": "protected function _get_db(){\n $app = $this->_get_app();\n $DB = $app->getDb();\n return $DB;\n }", "title": "" }, { "docid": "19f4854eb23c07b8f0e148475bb8177e", "score": "0.64661735", "text": "public function DB(){\n\t\treturn $this->Db_;\n\t}", "title": "" }, { "docid": "30d40c3bb8bf7ec0c15e28f7b12be151", "score": "0.6463334", "text": "private function getResource()\n {\n return new DB(self::$table, self::$model);\n }", "title": "" }, { "docid": "df861dfbc18f9d57b1a49fafc4f9937b", "score": "0.643459", "text": "public function getDatabase();", "title": "" }, { "docid": "df861dfbc18f9d57b1a49fafc4f9937b", "score": "0.643459", "text": "public function getDatabase();", "title": "" }, { "docid": "408fd339db5bcd0ebd29c8d96c82ae67", "score": "0.6402049", "text": "function getDb()\n {\n $db = ORM::get_db();\n\n\n return $db;\n }", "title": "" }, { "docid": "64d11a19aef59fd3933ac0438be9eeed", "score": "0.639618", "text": "public function getDb()\n {\n return $this->_db;\n }", "title": "" }, { "docid": "64d11a19aef59fd3933ac0438be9eeed", "score": "0.639618", "text": "public function getDb()\n {\n return $this->_db;\n }", "title": "" }, { "docid": "64d11a19aef59fd3933ac0438be9eeed", "score": "0.639618", "text": "public function getDb()\n {\n return $this->_db;\n }", "title": "" }, { "docid": "64d11a19aef59fd3933ac0438be9eeed", "score": "0.639618", "text": "public function getDb()\n {\n return $this->_db;\n }", "title": "" }, { "docid": "8b1753493ff11e41fd2662b77e03b0ed", "score": "0.6392311", "text": "public function getDb()\n {\n return self::$db;\n }", "title": "" }, { "docid": "62afe2b93dc3861ebfea83b5b35b7970", "score": "0.63894165", "text": "public function getDb(){\n return $this->db;\n }", "title": "" }, { "docid": "1a3a77b8ed6d9b8d6be07495085d2249", "score": "0.6367765", "text": "public function getDb() {\n\t\treturn $this->_db;\n\t}", "title": "" }, { "docid": "9a323eee9882423dccbe4a3724825597", "score": "0.6358214", "text": "public function getWDB()\n {\n return $this->WDB;\n }", "title": "" }, { "docid": "38f5d0a81c29540696182acf1bd9c1d7", "score": "0.6352141", "text": "function db()\n {\n return di()->get('db');\n }", "title": "" }, { "docid": "336b4eba529f06b2eabcb9e09da21000", "score": "0.6326033", "text": "public function getDb()\n\t{\n\t\treturn $this->get(self::SERVICE_DB);\n\t}", "title": "" }, { "docid": "213e106259d077f249d8a21d3645dc56", "score": "0.63170576", "text": "protected function getDb()\n\t{\n\t\treturn $this->db;\n\t}", "title": "" }, { "docid": "2ae4c3c42f103e85c439d1f246f839f8", "score": "0.63105303", "text": "public static function db() \n\t{\n\t\treturn static::table()->db();\n\t}", "title": "" }, { "docid": "52a3b2be26db4dc96a5c65cbe4ebec11", "score": "0.63085157", "text": "public function getDb()\n\t{\n\t\treturn $this->_db;\n\t}", "title": "" }, { "docid": "52a3b2be26db4dc96a5c65cbe4ebec11", "score": "0.63085157", "text": "public function getDb()\n\t{\n\t\treturn $this->_db;\n\t}", "title": "" }, { "docid": "52a3b2be26db4dc96a5c65cbe4ebec11", "score": "0.63085157", "text": "public function getDb()\n\t{\n\t\treturn $this->_db;\n\t}", "title": "" }, { "docid": "9832a9e0d98066f6a87c93de7fd6312a", "score": "0.6301131", "text": "public function getDb()\n {\n return $this->get('db');\n }", "title": "" }, { "docid": "a40df4277003e4991688505067c5459d", "score": "0.62922686", "text": "public function getDb()\n\t{\n\t return $this->db;\n\t}", "title": "" }, { "docid": "eece2fcbde410ef41d64696b58fc2e52", "score": "0.62911487", "text": "private function get_db_instance() {\n require_once(dirname(__FILE__).'/../connect.php'); // Require needed classes\n $dbh = new DBHandler(); // Create DBHandler\n \n // Check if database connection established successfully\n if ($dbh->getInstance() === null) {\n die(\"Fatal error : no database connection\");\n }\n \n return $dbh;\n \n }", "title": "" }, { "docid": "1503b30f1947dcd0ce811308587c699a", "score": "0.6291082", "text": "public function getDb()\r\n {\r\n if (empty($this->db))\r\n {\r\n $this->createDb();\r\n }\r\n \r\n return $this->db;\r\n }", "title": "" }, { "docid": "ac97a7f7a767f5b9e66d6011eafba9e2", "score": "0.62908864", "text": "public function getDb()\n\t{\n\t\treturn self::$_db;\n\t}", "title": "" }, { "docid": "e223ab50a2ab7e1987a0235d9903e0d7", "score": "0.6288201", "text": "public function getDb()\n {\n if (null === $this->db) \n {\n $this->setDb();\n }\n return $this->db;\n }", "title": "" }, { "docid": "17986dc633b9627b676a6ec781b4f47d", "score": "0.62876904", "text": "public function getDb() {\n\t\tif ($this->inTransaction()) {\n\t\t\t$this->o_db = $this->getTransaction()->getDb();\n\t\t} else {\n\t\t\tif (!$this->o_db) {\n\t\t\t\t$this->o_db = new Db();\n\t\t\t\t$this->o_db->dieOnError(false);\n\t\t\t}\n\t\t}\n\t\treturn $this->o_db;\n\t}", "title": "" }, { "docid": "1349b3c442416ec3c4f6ca7295cba00f", "score": "0.62733096", "text": "public function getDb()\n {\n return $this->db;\n }", "title": "" }, { "docid": "1349b3c442416ec3c4f6ca7295cba00f", "score": "0.62733096", "text": "public function getDb()\n {\n return $this->db;\n }", "title": "" }, { "docid": "1349b3c442416ec3c4f6ca7295cba00f", "score": "0.62733096", "text": "public function getDb()\n {\n return $this->db;\n }", "title": "" }, { "docid": "1349b3c442416ec3c4f6ca7295cba00f", "score": "0.62733096", "text": "public function getDb()\n {\n return $this->db;\n }", "title": "" }, { "docid": "1349b3c442416ec3c4f6ca7295cba00f", "score": "0.62733096", "text": "public function getDb()\n {\n return $this->db;\n }", "title": "" }, { "docid": "1349b3c442416ec3c4f6ca7295cba00f", "score": "0.62733096", "text": "public function getDb()\n {\n return $this->db;\n }", "title": "" }, { "docid": "cc6dd9369d0ed3694e8dfb8fa9d866d8", "score": "0.62709093", "text": "public function getDb() {\n return $this->get('db');\n }", "title": "" }, { "docid": "a91b9f322d0837cf126ce290e0637b99", "score": "0.62674624", "text": "protected function getDb() \n\t{\n\t\t$this->_db = DbConnection::getInstance();\n\t\t\n\t\treturn $this->_db;\n\t}", "title": "" }, { "docid": "82bc8984fea9abd269cf8e33a25a49a3", "score": "0.6262152", "text": "public static function &getDBO() {\r\n\t\treturn CN_Database::getInstance();\r\n\t}", "title": "" }, { "docid": "5b3e635b76d3badb852c7960dd7e4e2a", "score": "0.62601024", "text": "public function getDb() {\n return $this->db;\n }", "title": "" }, { "docid": "2fb8b6c1e9519f2369f698d7525c0b73", "score": "0.6252027", "text": "public static function getDB(){\r\n\t\treturn Tools::$db;\r\n\t}", "title": "" }, { "docid": "42d1d4cfe48af7cfa5e566aceffd800b", "score": "0.62436175", "text": "public function getDB()\n\t{\n\t\treturn $this->vars;\n\t}", "title": "" }, { "docid": "7d93777a396c19fc7e1ff7013e6a7f7d", "score": "0.6242262", "text": "public static function getDB(){\n\t\tif(self::$db_connection == NULL)\n\t\t\tself::$db_connection = new DBWrapper(Config::$DB_SERVER, Config::$DB_LOGIN, Config::$DB_PASSWORD, Config::$DB_DATABASE);\n\t\treturn self::$db_connection;\n\t}", "title": "" }, { "docid": "b62387a7c283c248881cf4f8fc40362d", "score": "0.6235123", "text": "function getDb() : Database\n {\n static $db = null;\n if ($db === null)\n $db = new Database(Config::get());\n return $db;\n }", "title": "" }, { "docid": "a1e1020777c5ede0fcdbd5fd58837a0d", "score": "0.622587", "text": "protected function getDB() {\r\n\t\tif (is_null($this->mDb))\r\n\t\t\t$this->mDb = $this->getQuery()->getDB();\r\n\t\treturn $this->mDb;\r\n\t}", "title": "" }, { "docid": "bb054969e560cf37edc608d1fd9096a6", "score": "0.62189513", "text": "public static function getInstance()\n {\n if(!isset(self::$_instance)):\n self::$_instance = new DB;\n endif;\n \n return self::$_instance;\n }", "title": "" }, { "docid": "8f4b410d93f9f16eb687f4dc9c2499cd", "score": "0.62153506", "text": "protected function getDatabase() {\r\n\t\treturn $this->db;\r\n\t}", "title": "" }, { "docid": "c266ba43b2259b761911f435453a8181", "score": "0.6214015", "text": "public static function getInstance() {\n if(!isset(self::$_instance)) {\n // self je isto kot this za statične metode\n self::$_instance = new DB();\n }\n return self::$_instance;\n }", "title": "" }, { "docid": "67b320b5acdc27780a50839485562de3", "score": "0.6208768", "text": "protected function db()\n\t{\n\t\tif ( ! is_null($this->db)) return $this->db;\n\n\t\treturn $this->db = Database::connection();\n\t}", "title": "" }, { "docid": "aeb0f8ab327da972abc4700cd35cad0d", "score": "0.6207026", "text": "function db() {\n return $this->PDO;\n }", "title": "" }, { "docid": "325e53adb9dc6c47ed2c68e8e597853e", "score": "0.61867625", "text": "private static function getInstance()\n {\n return self::$dbh;\n }", "title": "" }, { "docid": "a42641b96c78a2425faf42f53df41d5c", "score": "0.61834097", "text": "public static function getDatabase(){\n return Database::get(Environment::$environment);\n }", "title": "" }, { "docid": "22e2440f6c6963bf43ff621bf4567d46", "score": "0.6176863", "text": "protected function _getDb()\n\t{\n\t\tif ($this->_db === null)\n\t\t{\n\t\t\t$this->_db = XenForo_Application::get('db');\n\t\t}\n\n\t\treturn $this->_db;\n\t}", "title": "" }, { "docid": "4374571f38bf91e2d6c84b91a2c67b8a", "score": "0.6175038", "text": "public function get_db_handle() {\n\t\treturn $this->db_handle;\n\t}", "title": "" }, { "docid": "b0e74558f663f3bf9c0ba4c0eef086cd", "score": "0.6172991", "text": "public static function getInstance() {\n\t\t\tif( !isset(self::$_instance) ) {\n\n\t\t\t\tself::$_instance = new DB();\n\t\t\t}\n\t\t\t\n\t\t\treturn self::$_instance;\n\t\t}", "title": "" }, { "docid": "0fac7b5f4f1c02c4f8215f98784b673b", "score": "0.6163629", "text": "public function getDb()\n {\n return Yii::$app->get($this->db);\n }", "title": "" }, { "docid": "7e981247f94c41111ff5d569e674f507", "score": "0.6157062", "text": "public function getDB()\n {\n return DB::connection()->getMongoDB();\n }", "title": "" }, { "docid": "c2c5540abf4574dbd1c0209b1ed15308", "score": "0.6153657", "text": "function getDB()\n {\n if ($this->db == null) {\n $sqlDb = 'sqlite:'.$this->config['Database']['sqllite'];\n //$this->db = new PDO($sqlDb);\n }\n return $this->db;\n }", "title": "" }, { "docid": "78bc314f0ad7cffea3a78eb41e93f401", "score": "0.61427987", "text": "static public function getDbObj()\n {\n\t\tswitch (MpmDbHelper::getMethod())\n\t\t{\n\t\t case MPM_METHOD_PDO:\n \t return MpmDbHelper::getPdoObj();\n case MPM_METHOD_MYSQLI:\n return MpmDbHelper::getMysqliObj();\n default:\n throw new Exception('Unknown database connection method defined in database configuration.');\n\t\t}\n }", "title": "" }, { "docid": "331c9276d907abbf088a1b796f57929b", "score": "0.6140354", "text": "public static function getDatabase()\n {\n return self::$database[self::$counter];\n }", "title": "" }, { "docid": "58431e652fe1f23dd45aded67af594da", "score": "0.61351585", "text": "static public function getDatabase(){\n if(self::$_instance == NULL)\n self::$_instance = new Database();\n return self::$_instance;\n }", "title": "" }, { "docid": "fb49428a8eaa68baea0dbf369fe7a43e", "score": "0.6134406", "text": "public static function getInstance() {\n if(!isset(self::$_instance)) {\n self::$_instance = new DB();\n }\n return self::$_instance;\n }", "title": "" }, { "docid": "e74b8e91ed44b918620b2574cdb41476", "score": "0.61274064", "text": "public static function getDB()\n\t{\n\t\tif(!isset(self::$db))\n\t\t{\n\t\t\trequire_once '/usr/local/uvm-inc/kgauger.inc';\n\t\t\tdefine(\"HOST\", \"webdb.uvm.edu\"); // The host you want to connect to.\n\t\t\tdefine(\"USER\", $DB_INFO['writer']['username']); // The database username.\n\t\t\tdefine(\"PASSWORD\", $DB_INFO['writer']['password']); // The database password. \n\t\t\tdefine(\"DATABASE\", \"KGAUGER_BARRETOWNFOREST\"); // The database name.\n\n\t\t\tself::$db = new mysqli(HOST, USER, PASSWORD, DATABASE);\n\t\t}\n\t\treturn self::$db;\n\t}", "title": "" }, { "docid": "304e4fb0401ae6e944640d76c2e473ef", "score": "0.6126702", "text": "public static function getInstance() {\n\t\tif (!isset(self::$_instance)) {\n\t\t\tself::$_instance = new DB();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "title": "" }, { "docid": "b3d70e759f75a9c2610dea727223d901", "score": "0.61242306", "text": "public static function getDatabase(){\n\t\tself::$db = Core::getInstance(\"Database\")->getConnection();\n\t\treturn Core::getInstance(\"Database\")->getConnection();\n\t}", "title": "" }, { "docid": "f008f9867733203b6414cf8807521ed2", "score": "0.6122904", "text": "public function getDB()\n { \n\t\n if (is_array($this->db_conf)) { \n\t\t require('ez_sql.php');\n\t\t\tif($this->db_conf['type']=='mysql')\n\t\t\t\t$db = new ezSQL_mysql($this->db_conf['user'],$this->db_conf['password'],$this->db_conf['dbname'],$this->db_conf['host']);\n\t\t\telse if($this->db_conf['type']=='sqlite')\n\t\t\t\t$db = new ezSQL_sqlite($this->db_conf['host'],$this->db_conf['dbname']); \n\t\t\t\t\n\t\t\treturn $db;\t\n\t\t} \n\t\treturn false;\n }", "title": "" }, { "docid": "2fea2226d330e989efdc253cacbca5ca", "score": "0.6112023", "text": "public function getDatabase() {\n\t\t\tif (!isset($this->database)) {\n\t\t\t\t$this->database = new Database();\n\t\t\t}\n\n\t\t\treturn $this->database;\n\t\t}", "title": "" }, { "docid": "c625403c41412350994bff9b2aa9709d", "score": "0.60995144", "text": "private static function getInstance(): DB\n {\n if (self::$instance === null) {\n self::$instance = new self();\n }\n\n return self::$instance;\n }", "title": "" }, { "docid": "83e9d88a738d3a994d770e53fa5dd22f", "score": "0.609321", "text": "function databese() {\n $db = Database::instance();\n return$db;\n }", "title": "" }, { "docid": "ecd6c035fbbcc261ba036e321fa7847c", "score": "0.60798746", "text": "public static function getInstance()\r\n {\r\n if( !isset( self::$_instance ) )\r\n {\r\n self::$_instance = new DB();\r\n }\r\n return self::$_instance;\r\n }", "title": "" }, { "docid": "692fea3fe8aa7b65eda2d8c3153ca442", "score": "0.60757387", "text": "public static function getDbInstance(){\n if(self::$database === NULL){\n self::$database = new Database();\n self::$database->execQuery('SET NAMES utf8;', false);\n }\n return self::$database;\n }", "title": "" }, { "docid": "407ffcc16a76b206ca6d155a284cd39f", "score": "0.6072099", "text": "protected function getDatabase() {\n\t\treturn $GLOBALS['TYPO3_DB'];\n\t}", "title": "" }, { "docid": "9267699bcaf6180508c6c1e9a10265e5", "score": "0.6071851", "text": "public function getDb()\r\n {\r\n if (empty($this->db))\r\n {\r\n $db_name = \\Base::instance()->get('event.db');\r\n $this->db = new \\DB\\Mongo('mongodb://127.0.0.1:27017', $db_name);\r\n }\r\n \r\n return $this->db;\r\n }", "title": "" }, { "docid": "2a6770a7d9209937b678d872a2394218", "score": "0.6065215", "text": "public static function getInstance() {\n\t\t// create a new db instance only if it has not already been instantiated\n\t\tif(! isset(self::$_instance)) {\n\t\t\tself::$_instance = new DB();\n\t\t}\n\n\t\treturn self::$_instance;\n\t}", "title": "" }, { "docid": "5b56230993c865d6319f789c072011f3", "score": "0.6062113", "text": "public function getDb()\n\t{\n\t\treturn $this->getMongoDBComponent()->getDbInstance();\n\t}", "title": "" }, { "docid": "31eb6f08fa15efa10774bc46f350d4c8", "score": "0.6051639", "text": "public static function getInstance() {\n\t\tif (!isset(self::$_instance)) {\n\t\t\t// we assign the $_instance variable as a new Database Object\n\t\t\tself::$_instance = new self();\n\t\t}\n\t\treturn self::$_instance;\n\t}", "title": "" }, { "docid": "407e7fdadd54083c34839c91942e99ab", "score": "0.6046163", "text": "public static function getDB()\n {\n if (!self::$db) {\n self::$db = new PDO(\"mysql:host=\".DB_HOST.\";dbname=\".DB_NAME.\";port=\".DB_PORT, DB_USER, DB_PASS, array(\n PDO::ATTR_PERSISTENT => true,\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,\n PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ,\n PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true,\n PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES 'utf8'\"\n )\n );\n }\n\n return self::$db;\n }", "title": "" }, { "docid": "43db882144515010d5436d6d7b67d51f", "score": "0.603682", "text": "function db()\n{\n\treturn SilkDatabase::get_instance();\n}", "title": "" }, { "docid": "5cd6626290056a4eec2feda17da68b05", "score": "0.6030474", "text": "public function getDatabase(): Database\n {\n return $this->database;\n }", "title": "" }, { "docid": "63cef4779a3a7214bf28c241cf71fa3b", "score": "0.6021563", "text": "static public function getDatabase() {\n if (self::$_instance == NULL)\n self::$_instance = new Database();\n return self::$_instance;\n }", "title": "" } ]
7f1d59ef27deff04a378c8607d2c9026
/ void unloadImage() Purpose: unloads the current image Parameters: none Returns: nothing
[ { "docid": "c3782ef15135ac5e7c8ba4a6771c2fe6", "score": "0.84223294", "text": "public function unloadImage()\r\n\t{\r\n\t\tif (!$this->imageLoaded()) {\r\n\t\t\tthrow new Exception('Unable to unload image. No image was loaded.');\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\timagedestroy($this->orig_img);\r\n\t\t$this->orig_img = null;\r\n\t\t$this->filetype = null;\r\n\t}", "title": "" } ]
[ { "docid": "0364752dc8ff449b4ec30c24a33ab6a1", "score": "0.74696267", "text": "public function removeImage () {}", "title": "" }, { "docid": "c80a91e17454b77dce3719ba3d739ec9", "score": "0.7381518", "text": "public function __destruct()\r\n\t{\r\n\t\tif ($this->imageLoaded()) {\r\n\t\t\t$this->unloadImage();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "bc3a10c61dadec768183c89746e86712", "score": "0.71858996", "text": "public function removeImage() {\n\t}", "title": "" }, { "docid": "62ba872a03e3e7fa02c6532cd825d030", "score": "0.7107189", "text": "public function despeckleImage () {}", "title": "" }, { "docid": "7a5c145484f4b48a582880dfdbb11d37", "score": "0.7058617", "text": "public function despeckleImage() {\n\t}", "title": "" }, { "docid": "f97b22a72fffc94a7c420f6a8282e7a7", "score": "0.68510574", "text": "public function deleteImage()\n\t{\n\t\t$file = $this->getImagePath() . $this->getImageFilename();\n\n\t\tif(file_exists($file))\n\t\t{\n\t\t\tunlink($file);\n\t\t\t$this->image_filename = '';\n\t\t}\n\t}", "title": "" }, { "docid": "fb1cc1707e78811917a351cfb1f9f9ed", "score": "0.6792073", "text": "public static function destroyImage(){\n\t\tif(imagedestroy(Image::$image)) return TRUE;\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "cc5909bfb31783d63f71c0fe2eff6207", "score": "0.67705005", "text": "function __destruct(){\r\n imagedestroy($this->image);\r\n }", "title": "" }, { "docid": "1828ca89aefc4fc1052ac9e303f3232b", "score": "0.66513646", "text": "function __destruct()\n {\n imagedestroy($this->image);\n\n }", "title": "" }, { "docid": "192025898b1f7284a7c15982789d9edf", "score": "0.6601021", "text": "public function destroy() {\n if ($this->image === null) {\n return;\n }\n \n imagedestroy($this->image);\n \n $this->image = null;\n }", "title": "" }, { "docid": "6050c803aba3ee9f16a874fab0407f5b", "score": "0.6557531", "text": "function __destruct(){\n if($this->initialized) imagedestroy($this->picture);\n }", "title": "" }, { "docid": "9ac8cd644e8c91a1586c6ebdd17a2405", "score": "0.65519553", "text": "public function deconstructImages () {}", "title": "" }, { "docid": "17a49b5423046820265db48b4722be7e", "score": "0.6551363", "text": "public function remove_image() {\n $ad = $this->ad_protected_for_current_user($this->params['id']);\n $ad->remove_image($this->params['image_id']);\n redirect('/ads/edit', ['notice' => 'Image successfully removed.'], ['id' => $ad->id]);\n }", "title": "" }, { "docid": "a4e9a7f142cd627137470276bf228116", "score": "0.6515852", "text": "public function __destruct()\n {\n if ($this->image !== null && get_resource_type($this->image) === 'gd') {\n imagedestroy($this->image);\n }\n }", "title": "" }, { "docid": "cc6166fc7dd623b705a488d41c231b06", "score": "0.65016985", "text": "public function unload() {\n\n\t}", "title": "" }, { "docid": "c601f7b802188e33ca46b3d2daa5d29f", "score": "0.64452696", "text": "function unlink_image_bank($img_id){\t\t\t\t\t\n\t\t$this->Campaign_Model->delete_image_bank(array('img_id'=>$img_id));\t\t\n\t}", "title": "" }, { "docid": "b691b87106ac4d94b2f04424103e784a", "score": "0.6433915", "text": "public function deconstructImages() {\n\t}", "title": "" }, { "docid": "49de0f8528373dea1539882d12763c33", "score": "0.64168835", "text": "public function deleteImage()\n {\n $this->setValue($this->options['emptyReturn']);\n unlink($this->options['wwwDir'] . $this->hidden);\n $this->hidden = null;\n }", "title": "" }, { "docid": "b035646e8698e907084e1528f71e08a6", "score": "0.628908", "text": "private function deleteImage()\n\t\t{\n\t\t\t$directory = FN::getSessionValue(\"img-dir\");\n\t\t\t$name = FN::sanitise($_REQUEST['name']);\n\t\t\tunlink(\"$directory/$name\");\n\t\t}", "title": "" }, { "docid": "3baf49178e07f3bae37269cafc0f9911", "score": "0.62642974", "text": "public function __destruct()\n {\n imagedestroy($this->resource);\n }", "title": "" }, { "docid": "24268586bbcdc7fc8030b201ea265a19", "score": "0.62607765", "text": "public function removeFile() {\n //check if we have an old image\n if ($this->path) {\n //store the old name to delete on the update\n $this->temp = $this->path;\n //delete the current image\n $this->path = NULL;\n }\n }", "title": "" }, { "docid": "604785022b7670c8be92bc0c1fd00dce", "score": "0.6250924", "text": "public function testImageDestroy()\n {\n $testImage = new GD(__DIR__ . '/../resources/test.gif');\n unset($testImage);\n self::assertSame(false, isset($testImage));\n }", "title": "" }, { "docid": "5cd5b3e7e9543b78d868376f0653f875", "score": "0.61719435", "text": "public function deleteImage()\n {\n Storage::delete($this->image);\n }", "title": "" }, { "docid": "5cd5b3e7e9543b78d868376f0653f875", "score": "0.61719435", "text": "public function deleteImage()\n {\n Storage::delete($this->image);\n }", "title": "" }, { "docid": "5cd5b3e7e9543b78d868376f0653f875", "score": "0.61719435", "text": "public function deleteImage()\n {\n Storage::delete($this->image);\n }", "title": "" }, { "docid": "a66f84f8aadeea4854c7ff8de8da80e8", "score": "0.6150355", "text": "function actionRemoveImage(){\r\n $this->clubDatas = $this->_oDb->getEntryById($_POST['club_id']);\r\n $this->removeClubCoverBackground();\r\n }", "title": "" }, { "docid": "d77be597211dc74b6bd3f6a878058ebe", "score": "0.6123524", "text": "public function __destruct() {\n $this->_imagick->clear();\n $this->_imagick->destroy();\n }", "title": "" }, { "docid": "6380002cd67946d5d5829e41d1489690", "score": "0.61183214", "text": "function unlinkImage($abspath, $filename)\n\t\t{\n\t\t\tif( !empty($filename)){\n\t\t\t\tif (file_exists($abspath.$filename))\n\t\t\t\t\t@unlink( $abspath.$filename );\t\t\t\t\t\t\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "640a1f0e9c16b8da0678f94688e97acb", "score": "0.61132777", "text": "public function getImageDispose () {}", "title": "" }, { "docid": "920240885edfbf7575f97c9af9e1bb7b", "score": "0.60854095", "text": "public function Delete(){\n\t\t$file = $this->imagesPath.$this->filename; \n\t\tif(file_exists($file))\n\t\t\tunlink($file);\n\t\tparent::Delete();\n\t}", "title": "" }, { "docid": "3cedc5350127296b1cbc94444361e665", "score": "0.60829777", "text": "public function getImageDispose() {\n\t}", "title": "" }, { "docid": "8b24d6a0c1730ee18a0bf9afb24f21f7", "score": "0.6077127", "text": "public function __destruct()\n\t{\n\t\t$this->im->clear();\n\t\t$this->im->destroy();\n\t}", "title": "" }, { "docid": "4071e4be9f1d15037b6fedc0e97c2ef8", "score": "0.6073104", "text": "public function deregisterImage($request);", "title": "" }, { "docid": "4ed7099816e8fbbdb44f42837d300569", "score": "0.60652685", "text": "public function destroy()\n\t{\n\t\tif ($this->isLoaded())\n\t\t{\n\t\t\treturn imagedestroy($this->handle);\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "23d98957f1db9fcd8cadcd9a472655e4", "score": "0.6047384", "text": "public function delete_imgAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Resource_Service_Img::getGameImg($id);\n\t\tif ($info && $info['id'] == 0) $this->output(-1, '无法删除');\n\t\tUtil_File::del(Common::getConfig('siteConfig', 'attachPath') . $info['img']);\n\t\t$result = Resource_Service_Img::deleteGameImg($id);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "title": "" }, { "docid": "0198c2d31800fecf63e3d368cc9b6ffe", "score": "0.6033144", "text": "protected function _after()\n {\n unset($this->imageCache);\n unset($this->image);\n parent::_after();\n }", "title": "" }, { "docid": "5b1eb64ab42c8f4453b3f83963879e79", "score": "0.6014975", "text": "function classifiedImgUnlink()\n\t{\n\t//\tprint_r($_REQUEST);\n\t\tif(isset($_REQUEST['cls_img']))\n\t\t{\n\t\t\t$business_img = $_REQUEST['cls_img'];\n\t\t\t$img_id = $_REQUEST['cls_img_id'];\n\t\t\t$cls_id = $_REQUEST['cls_id'];\n\t\t\t$return = $this->classifieddeleteImage($img_id, $business_img);\n\t\t\t$arr=array('a'=>$return);\n\t\t\tprint_r(json_encode($arr));\n\t\t}\n\t}", "title": "" }, { "docid": "c14afb1f1a41fb1f7bd6628fe98b8327", "score": "0.5996796", "text": "public function stripImage () {}", "title": "" }, { "docid": "c147f4f62e0142ac3420483e1aacfb0c", "score": "0.59841865", "text": "public function deleteImage($image){\n return libvirt_image_remove($this->connection,$image);\n }", "title": "" }, { "docid": "a64061624b7ed0256662859ccd5fa1de", "score": "0.59641117", "text": "protected function _after()\n {\n unset($this->image);\n parent::_after();\n }", "title": "" }, { "docid": "ab9d796da61e697c0c260b091a4811bd", "score": "0.5955874", "text": "public function free()\n {\n if (is_resource($this->_handle)) {\n imagedestroy($this->_handle);\n }\n\n if (is_resource($this->_target_handle)) {\n imagedestroy($this->_target_handle);\n }\n\n $args = func_get_args();\n\n if (! empty($args)) {\n foreach ($args as $resource) {\n if (is_resource($resource)) {\n imagedestroy($resource);\n }\n }\n }\n }", "title": "" }, { "docid": "0fe7dacb37ab93d3dafb713e0b388db1", "score": "0.5955765", "text": "public function remove_photo () {\n\t\tif (file_exists ('cache/saasy/accounts/' . $this->id . '.jpg')) {\n\t\t\tunlink ('cache/saasy/accounts/' . $this->id . '.jpg');\n\t\t}\n\t\tif (file_exists ('cache/saasy/accounts/' . $this->id . '.png')) {\n\t\t\tunlink ('cache/saasy/accounts/' . $this->id . '.png');\n\t\t}\n\t\tif (file_exists ('cache/saasy/accounts/' . $this->id . '.gif')) {\n\t\t\tunlink ('cache/saasy/accounts/' . $this->id . '.gif');\n\t\t}\n\t}", "title": "" }, { "docid": "144ec99932b86f2b63cf33fcbd6d56db", "score": "0.59382236", "text": "function businessImgUnlink()\n\t{\n\t//\tprint_r($_REQUEST);\n\t\tif(isset($_REQUEST['business_img']))\n\t\t{\n\t\t\t$business_img = $_REQUEST['business_img'];\n\t\t\t$img_id = $_REQUEST['img_id'];\n\t\t\t$vac_id = $_REQUEST['vac_id'];\n\t\t\t$return = $this->deleteImage($img_id, $business_img);\n\t\t\t$countcls = $this->model->get_data('*','tbl_vacation_list_images', array('vac_id' => $vac_id));\n\t\t\techo count($countcls);\n\t\t}\n\t}", "title": "" }, { "docid": "977fd7ad10b846148d4fe674c3e6b2e9", "score": "0.59006304", "text": "protected function unlinkOldPicture()\n\t{\n\t\t$customer = $this->repository->byId($this->id);\n\n\t\tif(file_exists($customer->picture))\n\t\t{\n\t\t\tunlink($customer->picture);\n\t\t}\n\t}", "title": "" }, { "docid": "ff90d01924229d7be3c41bcc139c7233", "score": "0.5892481", "text": "function removeimg($img){\n if($img != null) {\n $path = \"../images/Users/\".$this->userid.\"/Uploads/\".$img;\n unlink($path);\n }\n }", "title": "" }, { "docid": "af744dcaa70f7ff3e0853f2ba12ffbd2", "score": "0.58692724", "text": "public function destroy(Image $image)\n {\n //\n }", "title": "" }, { "docid": "af744dcaa70f7ff3e0853f2ba12ffbd2", "score": "0.58692724", "text": "public function destroy(Image $image)\n {\n //\n }", "title": "" }, { "docid": "af744dcaa70f7ff3e0853f2ba12ffbd2", "score": "0.58692724", "text": "public function destroy(Image $image)\n {\n //\n }", "title": "" }, { "docid": "d4571b2bbd40b87b0d30f10b9762edd2", "score": "0.5868458", "text": "final public function __destruct()\n {\n if (is_resource($this->raw)) {\n imagedestroy($this->raw);\n }\n }", "title": "" }, { "docid": "3bb00abe528cd2467e7a18d79e613b94", "score": "0.5866323", "text": "function __destruct () {\n\t\tunset ($this->nbt);\n\t\timagedestroy ($this->image);\n\t}", "title": "" }, { "docid": "917837a5989e9aff75b6f2f53bdd258d", "score": "0.5849036", "text": "public function stripImage() {\n\t}", "title": "" }, { "docid": "3959b9b5c6f2a18797a0da19dbc01aa2", "score": "0.5847583", "text": "public function __destruct() {\n\t\tif(!empty($this->image)) {\n\t\t\timagedestroy($this->image);\n\t\t}\n\t\tif(!empty($this->canvas)) {\n\t\t\timagedestroy($this->canvas);\n\t\t}\n\t}", "title": "" }, { "docid": "52233df73f812042fde19168f548ac40", "score": "0.5841672", "text": "public function removeImage($image_url = null) {\r\n try {\r\n // grab the current logged in user\r\n $sessVar = $this->Auth->user();\r\n\r\n // create a data object with the user's info\r\n $data = array(\r\n 'User' => array(\r\n 'id' => $sessVar['id'],\r\n 'username' => $sessVar['username'],\r\n 'image_url' => \"\"\r\n )\r\n );\r\n\r\n Configure::write('debug', 0);\r\n $this->autoRender = false;\r\n $this->layout = null;\r\n\r\n // update the user's profile in the db\r\n if ($this->User->save($data)) {\r\n $this->deleteImagesForUser($image_url);\r\n echo \"true\";\r\n exit;\r\n } else {\r\n echo \"false\";\r\n exit;\r\n }\r\n } catch (Exception $e) {\r\n $this->log(\"{UsersController#removeImage} - An exception was thrown: \" . $e->getMessage());\r\n echo \"false\";\r\n exit;\r\n }\r\n }", "title": "" }, { "docid": "a10c199d4ab3c07b9647f2c1b833b603", "score": "0.5802458", "text": "public function removeImageAction()\n {\n Pi::service('log')->mute();\n\n $id = $this->params('id', 0);\n $fakeId = $this->params('fake_id', 0);\n $affectedRows = 0;\n $module = $this->getModule();\n\n if ($id) {\n $rowAuthor = $this->getModel('author')->find($id);\n\n if ($rowAuthor && $rowAuthor->photo) {\n // Delete photo\n @unlink(Pi::path($rowAuthor->photo));\n\n // Update db\n $rowAuthor->photo = '';\n $affectedRows = $rowAuthor->save();\n }\n } elseif ($fakeId) {\n $session = Media::getUploadSession($module, 'author');\n\n if (isset($session->$fakeId)) {\n $uploadInfo = isset($session->$id)\n ? $session->$id : $session->$fakeId;\n\n @unlink(Pi::path($uploadInfo['tmp_name']));\n\n unset($session->$id);\n unset($session->$fakeId);\n }\n }\n\n echo json_encode([\n 'status' => $affectedRows ? true : false,\n 'message' => 'ok',\n ]);\n exit;\n }", "title": "" }, { "docid": "af7b239d996b7e19ac2b0fbddb565276", "score": "0.5789142", "text": "function drop_image($img_id) {\n\t\t$this->db->query(sprintf(\"DELETE FROM images WHERE img_id='%d'\",$img_id));\n\t\t$this->db->query(sprintf(\"DELETE FROM thumbnails WHERE img_id='%d'\",$img_id));\n\t\t$this->db->query(sprintf(\"DELETE FROM info WHERE img_id='%d'\",$img_id));\n\t\t$this->db->query(sprintf(\"DELETE FROM tag_link WHERE img_id='%d'\",$img_id));\n\t}", "title": "" }, { "docid": "8f2f7e1ea60663628ea7a780adcbe253", "score": "0.5784869", "text": "public function clean(){\n\t\t\timagedestroy($this->handle);\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "b44a0380926de1fb8341fdb3ef8a91fd", "score": "0.57781476", "text": "public function delImage()\n\t{\n\t\tif (isset($_POST['file']) && $_POST['file'] != '')\n\t\t{\n\t\t\t$userID = Auth::user()->id;\n\t\t\t//disect the URL\n\t\t\t$temp = explode(\"/\", $_POST['file']);\n\t\t\t$fileName = array_pop( $temp );\n\t\t\t$userDirID = array_pop( $temp );\n\t\t\t//make sure this is the user's images\n\t\t\tif ($userID == $userDirID)\n\t\t\t{\n\t\t\t\t//all good, remove!\n\t\t\t\t$images_uploadDir = Setting::where('name', 'images_uploadDir')->first();\n\t\t\t\tunlink( './'. $images_uploadDir->value . '/' . $userID. '/' . $fileName );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "751ed2a60e1bf24f9b17cb46591308eb", "score": "0.5763481", "text": "static function clear(bool $debugPng = false)\n {\n foreach (self::$_cache as $file) {\n if ($file === self::$broken_image) {\n continue;\n }\n if ($debugPng) {\n print \"[clear unlink $file]\";\n }\n if (file_exists($file)) {\n unlink($file);\n }\n }\n\n foreach (self::$tempImages as $versions) {\n foreach ($versions as $file) {\n if ($file === self::$broken_image) {\n continue;\n }\n if ($debugPng) {\n print \"[unlink temp image $file]\";\n }\n if (file_exists($file)) {\n unlink($file);\n }\n }\n }\n\n self::$_cache = [];\n self::$tempImages = [];\n }", "title": "" }, { "docid": "26c13fd8107b8fdc6f2d15f43da9333d", "score": "0.57454747", "text": "public function Deletar($img_nome) {\n\n\t\t/*Marcando a tabela\n\t\t*/\n\t\t$query = \" DELETE FROM {$this->prefix}imagens \";\n\n\t\t/*Falando onde\n\t\t*/\n\t\t$query .= \" WHERE img_nome = :img_nome \";\n\n\t\t/*E atribuindo valor ao parâmetro\n\t\t*/\n\t\t$params = array(':img_nome' => $img_nome);\n\n\t\t/*Executa a query\n\t\t*/\n\t\t$this->ExecuteSQL($query, $params);\n\n\t}", "title": "" }, { "docid": "ddda521a1365f821d09ded7237ddb964", "score": "0.5724154", "text": "public function remove_image($name) {\n return $this->delete('/images/' . $name);\n }", "title": "" }, { "docid": "56646e7a0088f5e00babc253a1217b4b", "score": "0.5721646", "text": "public function deleteImage()\n {\n if(!$this->hasImage()->exists()){\n return;\n }\n\n Storage::disk('public')->delete($this->hasImage->name);\n $this->hasImage()->delete();\n }", "title": "" }, { "docid": "0cffe9ce53de44131719c968fcb664ca", "score": "0.5716552", "text": "public function destroy(AnnonceImage $annonceImage)\n {\n //\n }", "title": "" }, { "docid": "d03159e0707e02c0cfca43b65630a0a0", "score": "0.5699196", "text": "public function removeImageProfile ($name) {}", "title": "" }, { "docid": "3e338e727ba3a81193129f8dc0e75fcd", "score": "0.56941134", "text": "public function removeImageAction()\n {\n \t$params=$this->getRequest()->getParams();\n \t$user_id=Auth_UserAdapter::getIdentity()->getId();\n \t$userObj = \\Extended\\ilook_user::getRowObject($user_id);\n// \t$result=Extended\\ilook_user::updateProfileImageName(\"\", $user_id);\n \t$result = Extended\\ilook_user::updateColumnValues( Auth_UserAdapter::getIdentity()->getId(),\n \t\t\tarray( 'professional_image' => '' )\n \t);\n \tif($result){\n \t\t$big_thumbnail=\"images/profile/big_thumbnails/\".$params[\"filepath\"];\n \t\t$medium_thumbnail=\"images/profile/medium_thumbnails/\".$params[\"filepath\"];\n \t\t$small_thumbnail=\"images/profile/small_thumbnails/\".$params[\"filepath\"];\n \t\t$originalname=explode(\"thumbnail_\",$params[\"filepath\"]);\n \t\t// $orginal_image=\"images/profile/\".$originalname[1];\n \t\tunlink($big_thumbnail);\n \t\tunlink($medium_thumbnail);\n \t\tunlink($small_thumbnail);\n \t\t// unlink($orginal_image);\n \t\tif(\\Extended\\ilook_user::USER_GENDER_MALE==$userObj->getGender())\n \t\t{\n \t\t\t$bigImg=\"default_profile_image_male_big.png\";\n \t\t\t$smallImg=\"default_profile_image_male_small.png\";\n \t\t}\n \t\telse if(\\Extended\\ilook_user::USER_GENDER_FEMALE==$userObj->getGender()){\n \t\t\t$bigImg=\"default_profile_image_female_big.png\";\n \t\t\t$smallImg=\"default_profile_image_female_small.png\";\n \t\t}\n \t\techo $defaultImage=Zend_Json::encode(array(\"image\"=>$bigImg,\"smallImage\"=>$smallImg));\n \t}\n \tdie;\n }", "title": "" }, { "docid": "ac99e3acf1bba9c6c1cb63adf4232470", "score": "0.5687072", "text": "function recallImage() {\n\t\t//echo \"at recall <br />\";\n\t\tif (!$this->exists) {\n\n\t\t \t$this->db = mysql_connect($this->db_host,$this->db_user,$this->db_pass);\n\t\t\tmysql_select_db($this->db_name, $this->db);\t\t \n\n\t\t\t$query = \"select imagedata from images where username='\".$this->user.\"'\";\n\t\t\n\t\t\tif(!$result || mysql_num_rows($result) > 1 || mysql_num_rows($result) < 1) { die('faield'); }\n\n\t\t\t$this->userdata = mysql_fetch_assoc($result);\n\t\t\t\t\n\t\t\tmysql_free_result($result);\n\t\t\tmysql_close($this->db);\n\t\t\t\n\t\t\t$this->image = $this->userdata['imagedata'];\n\t\t}\n\t\t\n\t\telse {\n\t\t\n\t\t\t$this->image = $this->imagedata;\n\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "ec2c0970cd73f5fa383e38da95345201", "score": "0.56789804", "text": "public function core_notify_image_remove($image_id)\n {\n //This is a notify type core event, so return value is not used or needed\n }", "title": "" }, { "docid": "8b138d8cff0fb276729337a34642438b", "score": "0.5673326", "text": "public function setImageDispose ($dispose) {}", "title": "" }, { "docid": "492d924b62ea1956017f6c5be3bbeed2", "score": "0.5666136", "text": "public function deletImage($id)\n {\n\n $ProductImage = banner::where(['id'=>$id])->first();\n\n //2-) get the images paths\n $image_path = 'images/images_frontend/banners/';\n\n //3-) check if the image name is exists then delete it\n // delete larg image\n if(file_exists($image_path.$ProductImage->image)){\n // unlink uses to delete the image from the main file\n unlink($image_path.$ProductImage->image);\n }\n banner::where(['id' => $id])->update(['image' => '']);\n return redirect()->back()->with('success', 'Your Image has been Deleted');\n }", "title": "" }, { "docid": "19509a4d91f25f24ad3846d14ab5e2c8", "score": "0.56513333", "text": "public function unload(array $data){ }", "title": "" }, { "docid": "4f2fab7c569c617bd88c4aa0692e0aa2", "score": "0.5651083", "text": "function delete_image()\n {\n if (isset($_POST['remove'])) {\n global $wpdb;\n $img_path = $_POST['path'];\n\n // get the images meta ID.\n $query = \"SELECT ID FROM wp_posts where guid = '\" . esc_url($img_path) . \"' AND post_type = 'attachment'\";\n $results = $wpdb->get_results($query);\n\n // delete images meta\n foreach ($results as $row) {\n wp_delete_attachment($row->ID); //delete the image and also delete the attachment from the Media Library.\n }\n delete_option('ink_image'); //delete image path from database.\n }\n }", "title": "" }, { "docid": "ade6ce00b025746b4cbbc3623f56a3cc", "score": "0.56501967", "text": "public function deleteimageAction()\r\n {\r\n $path = Mage::getBaseDir();\r\n $attributeId = $this->getRequest()->getPost('aId');\r\n $optionId = $this->getRequest()->getPost('oId');\r\n $imageDirectory = $path . DS . 'media' . DS . 'colorswatch' . DS . $attributeId . DS;\r\n $imageDirectory = $imageDirectory . DS . $optionId . DS . 'img';\r\n unlink($imageDirectory);\r\n $optionDriectory = $path . DS . 'media' . DS . 'colorswatch' . DS . $attributeId . DS . $optionId;\r\n rmdir($optionDriectory);\r\n $attributeDirectory = $path . DS . 'media' . DS . 'colorswatch' . DS . $attributeId . DS;\r\n rmdir($attributeDirectory);\r\n }", "title": "" }, { "docid": "3f33bbaba6a012ab8f3a2323866a77fe", "score": "0.56459653", "text": "public function deleteImage(){\n\t\t$img=ProductImage::find(Input::get('id'));\n\t\tunlink('img/p/'.$img['image']);\t\t\n\t\t$img->delete();\n\t\t\n\t\treturn '';\n\t}", "title": "" }, { "docid": "a00a7dbcfa27a91e1075d897adb9bdaa", "score": "0.5639998", "text": "public function destroyimg($id)\n {\n $this->db->where('id_kost', $id);\n return $this->db->delete('image');\n }", "title": "" }, { "docid": "3821678d92dc5c820771cf762cf93fc1", "score": "0.56330365", "text": "public function picture_delete ()\n {\n $picture = $this->products::PICTURE_PATH . $this->upload->data('file_name') ?? '';\n if (is_file($picture)) unlink ($picture);\n }", "title": "" }, { "docid": "6b76e43ea91792e5bd18627a07f234ba", "score": "0.56187665", "text": "function deldbimg($f) {\n\t$n = NomeImmagine($f);\n\tif (file_exists($n)) unlink($n);\n\tif (file_exists($n.'.info')) unlink($n.'.info');\n}", "title": "" }, { "docid": "de6146dbd6c7d281157eb74402ba7b06", "score": "0.5617942", "text": "function pf_deactivate_pictifly() {\n require_once PF_PATH.'/kernel/classes/class-pf-deactivator.php';\n PF_Deactivator::deactivate();\n}", "title": "" }, { "docid": "3b530bdca0eefa192a6f1d15be95c9f3", "score": "0.5610886", "text": "public function remove_image()\n\t{\n\t\tif (IS_AJAX)\n\t\t{\n\t\t\t$id = $this->input->post('id');\n\t\t\tif ($this->listings_model->delete_image($id))\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": "97313dffdcdda3ec18679b117ef711f7", "score": "0.56066996", "text": "function picture_delete() {\n\t\t$person = $this->Person->read(null, $this->Session->read('person'));\n\t\tif (!empty($person['Person']['picture'])) {\n\t\t\t$this->__deleteImage($person['Person']['picture']);\n\t\t}\n\t\t$person['Person']['picture'] = \"\";\n\t\t$this->Person->save($person);\n\t\t$this->redirect($this->referer());\n\t}", "title": "" }, { "docid": "b862791839f50c10509f8c1274a4aef2", "score": "0.55981034", "text": "public function borrarImagen(){\n $existeArchivo = file_exists(CARPETAS_IMAGENES . $this->imagen);\n if($existeArchivo){\n unlink(CARPETAS_IMAGENES . $this->imagen);\n }\n }", "title": "" }, { "docid": "078911cd63c6a55ca3cd09bde2caca86", "score": "0.5596058", "text": "public function removeProfilleimg()\n {\n if (isset($_SESSION [LOGGED_IN])) {\n $user = $_SESSION [LOGGED_IN];\n $userID = $user [USER_ID];\n $this->load->model('usermanagement/Usermanagementmodel');\n $result = $this->Usermanagementmodel->removeProfileimg($userID);\n $_SESSION[LOGGED_IN]['profile'] = 0;\n if ($result) {\n $response = array(\n STATUS => true,\n );\n } else {\n $response = array(\n STATUS => false,\n );\n }\n $this->apiResponse($response);\n }\n }", "title": "" }, { "docid": "fdf8193414779985fcd2e2b5725a797c", "score": "0.55955213", "text": "public function DeleteImage()\n\t{\t\n\t\t// === GET ID === //\n\t\t$id = $this->segment_item;\n\t\t\n\t\t$this->companies_model->RemovePostImage($id);\n\t\t\n\t\tredirect($this->_getBaseURI().\"/edit/$this->segment_orderby/\".$this->segment_orderseq.\"/\".$this->segment_offset.\"/\".$id);\n\t}", "title": "" }, { "docid": "718c97a385e930ec40a881da23303d79", "score": "0.5589411", "text": "public static function deleteImageinventory($image) {\n if (!empty($image)) {\n $ruta = \"../resources/img/inventario/\";\n unlink($ruta . $image);\n }\n }", "title": "" }, { "docid": "7f26cbaadedc2eaddbdc5ae818f756b9", "score": "0.55869603", "text": "public function delete_image_file($filename)\n {\n $filename = preg_replace('/[^\\w\\._]+/', '', $filename);\n \n //Get extension and filename.\n $ext_pos = strrpos($filename, '.');\n $filename_raw = substr($filename, 0, $ext_pos);\n $extension = substr($filename, $ext_pos+1);\n \n //Don't delete the default icon.\n if($filename_raw == 'x_default')\n return;\n \n //Find target directory.\n $dir = PATH_COMPONENTS.DS.$this->component.DS.'uploads'.DS.'images'.DS;\n \n //See if the original is found here.\n if(!is_file($dir.$filename))\n throw new \\exception\\NotFound('The original image was not found.');\n \n //Delete the original file.\n @unlink($dir.$filename);\n \n //Find all of it's buddies and kill 'em dead. >:3\n foreach(glob($dir.'cache'.DS.$filename_raw.'*.'.$extension) as $buddy){\n @unlink($buddy);\n }\n \n }", "title": "" }, { "docid": "3612ff88278a74b1ec6fe0cdb0c37e8f", "score": "0.5579538", "text": "public function deleteImage( $id , $image ) {\n\t\t$widget = $this->getWidgetByID( $id );\n\t \t$widget->image = '';\n\t \t$widget->save();\n\t\tFile::delete($image);\n\t}", "title": "" }, { "docid": "1f4b6f449f01663f5fb59f9640c5a381", "score": "0.55791634", "text": "public function destroyCaptcha()\r\n {\r\n if (isset($_SESSION['imgName'])) {\r\n if (file_exists('img/captcha/' . $_SESSION['imgName'] . '.jpg')) {\r\n unlink('img/captcha/' . $_SESSION['imgName'] . '.jpg');\r\n unset($_SESSION['cptCode']);\r\n unset($_SESSION['imgName']);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "7a3a9978125130ac822804a4e5bb2714", "score": "0.55763793", "text": "private function deleteOldImage($imagename) {\n try {\n if (file_exists(public_path(\"/img/users/$imagename\"))) {\n unlink(public_path(\"/img/users/$imagename\"));\n }\n } catch (\\Exception $exception) {}\n }", "title": "" }, { "docid": "ca34ca225606f7523b88737eaddb4fde", "score": "0.55721444", "text": "public function removeCreateMarketPlaceImage(){\n\t\t\n\t\t$file_name\t\t\t=\tInput::get('img_name');\n\t\t$key\t\t\t=\tInput::get('key');\n\t\t$job_image_array\t=\tSession::get('marketplace_image_array');\n\t\t\t\n\t\t\tSession::forget('marketplace_image_array.'.$key);\n\t\t\tif(File::exists(MARKET_PLACE_IMAGE_ROOT_PATH.$file_name)){\n\t\t\t\t@unlink(MARKET_PLACE_IMAGE_ROOT_PATH.$file_name);\n\t\t\t}\t\n\t}", "title": "" }, { "docid": "7066ac769ca742d164e110a924744c9a", "score": "0.55430967", "text": "public function removeCVFile() {\n //check if we have an old image\n if ($this->cvFile) {\n //store the old name to delete the image on the upadate\n $this->temp = $this->cvFile;\n //delete the current image\n $this->setCvFile(NULL);\n }\n }", "title": "" }, { "docid": "90eb7311f58679e17f3a348b651969e6", "score": "0.5542276", "text": "public function destroy(ImageManipulation $imageManipulation){\n\t\t//\n\t}", "title": "" }, { "docid": "8c4f325ac3a6cc90a9066f4d92e05a54", "score": "0.55390334", "text": "public function erase()\n {\n $this->bg->destroy();\n $this->frame->clearComponents();\n $this->frame->destroy();\n $this->destroyComponents();\n\n parent::destroy();\n }", "title": "" }, { "docid": "6cf5949a81690cfda92808534f89712b", "score": "0.5530022", "text": "public function afterDelete()\n {\n parent::afterDelete();\n\n if ($this->image) {\n @unlink(Yii::getAlias('@webroot').$this->image);\n }\n }", "title": "" }, { "docid": "fb4d25d01ec70e2e12eddd74ebe89a59", "score": "0.5529653", "text": "public function postRemove($image)\n {\n $this->deleteImageFile($image);\n }", "title": "" }, { "docid": "7fc0f2d25c5ce3f8065d38743310b24a", "score": "0.55193835", "text": "protected function tearDown()\n {\n if (file_exists(dirname(__FILE__).DIRECTORY_SEPARATOR.'testImage.jpg')) {\n unlink(dirname(__FILE__).DIRECTORY_SEPARATOR.'testImage.jpg');\n }\n if (file_exists(dirname(__FILE__).DIRECTORY_SEPARATOR.'newImage.jpg')) {\n unlink(dirname(__FILE__).DIRECTORY_SEPARATOR.'newImage.jpg');\n }\n\n if (is_dir(dirname(__FILE__).DIRECTORY_SEPARATOR.'tempDir')) {\n unlink(dirname(__FILE__).DIRECTORY_SEPARATOR.'tempDir'.DIRECTORY_SEPARATOR.\"newImage.jpg\");\n rmdir(dirname(__FILE__).DIRECTORY_SEPARATOR.'tempDir');\n }\n\n }", "title": "" }, { "docid": "7c64e8273ae72498b91bc590aaff1e52", "score": "0.5500482", "text": "public function destroy($id) {\n Image::destroy($id);\n }", "title": "" }, { "docid": "454cf96589c8ee0f1f269eee469951ec", "score": "0.54869455", "text": "public static function unRegister();", "title": "" }, { "docid": "6fdbe1082c127775c3151c45f5014266", "score": "0.5480979", "text": "public function deleteImage() {\r\n if (static::unlinkFiles($this->profile_image_file_name, $this->profile_image_extension) == false) {\r\n return false;\r\n }\r\n $this->profile_image_file_name = null;\r\n $this->profile_image_extension = null;\r\n return true;\r\n }", "title": "" }, { "docid": "d3a58f859a0739e35068dda28e956379", "score": "0.54665726", "text": "private function sql_img_actualizar(){\n\t\t$imagen = $_POST['imagen'];\n\t\tunset($_POST['imagen']);\n\t\t$this->actualizar_db('anuncios_img',$imagen);\n\t}", "title": "" }, { "docid": "f2c04812ad8bdc323f0aa12e0d294d97", "score": "0.5465119", "text": "public function delete_image($superGlobal){\n\t\tif(static::deleteRecord($superGlobal)) :\n\t\t\t$target_path = SITE_ROOT.DS. 'admin' . DS . $this->picture_path();\n\t\t\treturn unlink($target_path) ? true : false;\n\t\telse :\n\t\t\treturn false;\n\t\tendif;\n\t}", "title": "" }, { "docid": "5778835ec16ef55e8064b000f93a438f", "score": "0.5462217", "text": "public function destroy(EventImage $eventImage)\n {\n //\n }", "title": "" }, { "docid": "5225398a5ef97ca82ee212fe23996182", "score": "0.546014", "text": "public function unload()\n {\n if (false !== $this->isLoaded) { \n \n $this->db->createCommand()->delete($this->name)->execute();\n if (null !== $this->tableSchema->sequenceName) {\n $this->db->createCommand()->resetSequence($this->name, 1)->execute();\n }\n $this->isLoaded = false;\n }\n }", "title": "" } ]
01699fb17d68a2d3977090a6afc602a4
Remove the specified Voucher from storage.
[ { "docid": "ebb317b26393c67227a68147beb7b8eb", "score": "0.5574487", "text": "public function destroy($id)\n {\n $voucher = $this->voucherRepository->findWithoutFail($id);\n\n if (empty($voucher)) {\n Flash::error('Voucher not found');\n\n return redirect(route('admin.vouchers.index'));\n }\n\n $this->voucherRepository->delete($id);\n\n Flash::success('Voucher deleted successfully.');\n\n return redirect(route('admin.vouchers.index'));\n }", "title": "" } ]
[ { "docid": "62d1b8967606123ff6db910f58522964", "score": "0.7094172", "text": "public function removeVoucher()\n {\n $elements = Helper::findElements($this, ['removeVoucher']);\n $elements['removeVoucher']->click();\n }", "title": "" }, { "docid": "48a0586f340150d6dd1349946f121181", "score": "0.62999755", "text": "public function destroy(VoucherRegister $vocucherRegister)\n {\n //\n }", "title": "" }, { "docid": "a99f7a60eedfc502365fb94f0091e246", "score": "0.6180991", "text": "public function destroy(Voucher $voucher)\n {\n $voucher->delete();\n return redirect()->route('vouchers.index')\n ->with('success','Voucher deleted successfully');\n }", "title": "" }, { "docid": "04ce164b9b25454162a5cf1c9a424235", "score": "0.58216375", "text": "public function destroy($id)\n {\n $destroy = Voucher::where('id','=',$id)\n ->first();\n $payment=Paymentsheet::where('paymentFor','voucher')\n ->where('uid',$id)\n ->delete();\n if($destroy->count()){\n $destroy->delete();\n return response()->json(['msg'=>'success','status'=>$id]);\n } else {\n return response()->json(['msg'=>'error','status'=>$id]);\n }\n }", "title": "" }, { "docid": "9194fba823cf89326677eea3fc50d917", "score": "0.57838684", "text": "function remove($tmpfs_storage_volume_id) {\n\t\t// remove from db\n\t\t$db=htvcenter_get_db_connection();\n\t\t$rs = $db->Execute(\"delete from \".$this->_db_table.\" where tmpfs_storage_volume_id=\".$tmpfs_storage_volume_id);\n\t}", "title": "" }, { "docid": "349ed5b76c2d9807793774631efa7aab", "score": "0.57194084", "text": "public function sUpdateVoucher()\n {\n $voucher = $this->sGetVoucher();\n if ($voucher) {\n $this->sDeleteArticle('voucher');\n if (is_array($this->sAddVoucher($voucher['code']))) {\n $this->session->offsetSet('sBasketVoucherRemovedInCart', true);\n }\n }\n }", "title": "" }, { "docid": "f3145913d36c871004ac569d3ea3b842", "score": "0.57041967", "text": "public function remove()\n {\n /** Not needed in this storage */\n }", "title": "" }, { "docid": "c24ca6bd4de1736703465614cb8d7e6d", "score": "0.56983405", "text": "public function destroy($id)\n {\n if (! Gate::allows('voucher_manage')) {\n return abort(401);\n }\n Vouchers::where('id', $id)->delete();\n Session::flash('message','Voucher Successfully Delete ');\n return back();\n }", "title": "" }, { "docid": "c61898994313dd05fff043aa97449f33", "score": "0.5677214", "text": "function remove_by_name($tmpfs_storage_volume_name) {\n\t\t// remove from db\n\t\t$db=htvcenter_get_db_connection();\n\t\t$rs = $db->Execute(\"delete from \".$this->_db_table.\" where tmpfs_storage_volume_name='\".$tmpfs_storage_volume_name.\"'\");\n\n\t}", "title": "" }, { "docid": "78a6ba32f1dfbbdeff89201369d43f92", "score": "0.56519717", "text": "public function destroy($id)\n {\n $voucher_data = PurchaseVoucherType::find($id);\n\n $voucher_data->delete();\n return Redirect::back()->with('success','Deleted Successfully');\n\n }", "title": "" }, { "docid": "2f2ad8db732ba34787c3d3f783f296a5", "score": "0.56052154", "text": "public function eliminar()\n\t{\n\t\t// Toma el id del reporte actual\n\t\t$id = $this->id;\n\n\n\t\t// Crear una instancia de la conexion\n\t\t$conexion = new Conexion;\n\n\n\t\t// Elimina al reporte de la bd encontrado por id\n\t\t$conexion->conn->query(\"DELETE FROM ventas WHERE id = $id LIMIT 1\");\n\t}", "title": "" }, { "docid": "33d10a0171eabd9b8fe683d93d2886aa", "score": "0.5558717", "text": "public function destroy() {\n $this->provider->trash( $this->getData() );\n }", "title": "" }, { "docid": "8dc461e85d0fad4983223ef01cebb9bc", "score": "0.5536001", "text": "function delete_advance_voucher()\n {\n $db = JFactory::getDbo();\n \n $advance_id = intval(JRequest::getVar(\"advance_id\"));\n \n $query = \"select e.employee_name, a.employee_id, a.amount, a.instrument from `#__hr_advance_salary_payments` a inner join `#__hr_employees` e on a.employee_id=e.id where a.id=\" . $advance_id;\n $db->setQuery($query);\n $advance = $db->loadObject();\n \n $query = \"delete from `#__hr_advance_salary_payments` where id=\" . $advance_id;\n $db->setQuery($query);\n $db->query();\n \n if($advance->instrument == CASH)\n {\n $query = \"update `#__settings` set `value_numeric`=value_numeric+\" . floatval($advance->amount) . \" where `key`='cash_in_hand'\";\n $db->setQuery($query);\n $db->query();\n }\n \n Functions::log_activity(\"Advance payment voucher of \" . $advance->amount . \"/- for \" . $advance->employee_name . \"(\" . $advance->employee_id . \") has been deleted.\", \"\", $advance_id);\n return \"Advance payment deleted successfully.\";\n }", "title": "" }, { "docid": "a1e57d31130065e64da441b9f77a65cd", "score": "0.5502295", "text": "public function excluir(Persistente $persistente)\n {\n }", "title": "" }, { "docid": "f4d3ce4874db7ad61bcfc0838157e7b6", "score": "0.5481819", "text": "public function destroy(Request $request)\n\t{\n\t\t$voucher = AccountEntry::findOrFail($request->id);\n\n\t\t$voucher->delete();\n\n\t\treturn response()->json(['status' => 1, 'message' => 'Voucher'.config('constants.flash.deleted'), 'data' => []]);\n\t}", "title": "" }, { "docid": "49d15f822dfd652237898762b1555ff1", "score": "0.538716", "text": "public function onRemove()\n {\n try {\n $this->repository->getFilesystem()->delete($this->storageKey);\n } catch (FileNotFound $e) {\n if (!$this->isMissingFileIgnoredOnDelete()) {\n throw $e;\n }\n }\n }", "title": "" }, { "docid": "6e05affedbf5e8038f1322ad98434577", "score": "0.5339333", "text": "public function excluirVol(int $codigo)\n {\n $this->conexao->query(\"DELETE FROM usuario WHERE cod_user = $codigo\");\n }", "title": "" }, { "docid": "3f7a6c91b5dec52def1b43b872d8d807", "score": "0.5297551", "text": "public function delete(User $user, Voucher $voucher)\n {\n return $user->hasAccess(\"admin.vouchers.destroy\");\n }", "title": "" }, { "docid": "74c66fbace0fc888fe83a98cc6b98e12", "score": "0.526372", "text": "public function destroy(Equipe $equipe)\n {\n $equipe->delete();\n Storage::disk('public')->delete('img/' . $equipe->image);\n\n return redirect()->back();\n }", "title": "" }, { "docid": "5b99f46922942dab045c237e0c148f90", "score": "0.52602077", "text": "public function delete(){\n \tif(!Auth::check()){\n \t\tLog::critical('Not loged user was allowed to request a version deletion');\n \t\tabort(500);\n \t}\n\n $file = \\App\\File::withTrashed()\n ->where('id', $this->idFile)->first();\n \t// We get info before deleting\n \t$filename = $file->name;\n \t$file_id = $file->id;\n \t$version_id = $this->id;\n\n \t$count = \\App\\Version::where('path', $this->path)->count();\n \t$removing = ($count == 1);\n\n \tif($removing){\n \t\tif(!Storage::disk('local')->delete($this->path)){\n \t\t\tLog::error(\"Could not delete version file \" . $this->id);\n \t\t\tabort(500);\n \t\t}\n \t}\n\n \tLog::notice(\"Version removal notice. The version $version_id of the file $filename with id $file_id was removed by user \" . Auth::user()->email . \". The file was\" . ($removing ? \" \" : \" not \") . \"removed from the system\");\n\n \treturn parent::delete();\n }", "title": "" }, { "docid": "1910e615c061a7ebf72675d5e79946f8", "score": "0.5260196", "text": "public function eliminar(){\n $this->equipos()->detach();\n $this->materiales()->detach();\n $this->manoDeObra()->detach();\n $this->transportes()->detach();\n $this->delete();\n }", "title": "" }, { "docid": "2cab2c7ecc05485da04deed3d3e3ed37", "score": "0.52556586", "text": "public function destroy($id)\n {\n $account=VendorAccount::where('id',$id)->firstOrFail();\n if(File::exists('uploads/vendor/accounts/bills/'.$account->bill)){\n unlink('uploads/vendor/accounts/bills/'.$account->bill);\n unlink('uploads/vendor/accounts/bills/200x200/'.$account->bill);\n }\n $account->delete();\n session()->flash('msg','Account has beed successfully deleted.');\n return redirect()->route('admin.get_accounts');\n }", "title": "" }, { "docid": "8999bd566421511b360bd24163248aa9", "score": "0.525373", "text": "public function destroy($id)\n {\n $venta = Venta::find($id);\n\n foreach($venta->lineaVentas as $l){\n $prod=Producto::find($l->producto_id);\n $stock =Stock::find($prod->stock_id);\n $stock->cantidad = $stock->cantidad+$l->cantidad;\n $stock->save();\n $l->save();\n }\n\n $venta->forceDelete();\n flash(\"Se elimino la Venta del Empleado: \" . $venta->user->name . \" correctamente!\")->error();\n return redirect(route('ventaContado.index'));\n }", "title": "" }, { "docid": "1a66b751f766c19e4fb4f52fd3f7df15", "score": "0.52357036", "text": "public function destroy(Comprobante_Venta $comprobante_Venta)\n {\n //\n }", "title": "" }, { "docid": "6431de611c573a19db0ba3678e104c9e", "score": "0.52233213", "text": "public function destroy($id)\n {\n //eliminar por id\n $usuario= Usuarios::findOrFail($id);\n\n if( Storage::delete('public/'.$usuario->Foto)){\n Usuarios::destroy($id);\n }\n \n return redirect('usuarios');\n\n }", "title": "" }, { "docid": "2f4790089e5c37427a1aefe3b3016aff", "score": "0.5209822", "text": "public function destroy(Competitor $competitor)\n {\n // Not needed\n }", "title": "" }, { "docid": "600f5ccd2a01f5f856e1022b8498dbef", "score": "0.52038515", "text": "public function destroy()\n {\n $praktikum = Current_Praktikum::all()->first();\n $praktikum->status = 777; //lucky but nooo, cause praktikum just deleted :v\n $praktikum->save();\n broadcast(new praktikumStatusUpdated($praktikum));\n\n DB::table('current__praktikums')->truncate();\n }", "title": "" }, { "docid": "9032da906ba0d24a90f5f1e8e1e8530e", "score": "0.52012014", "text": "public function destroy($book_id, $vol_id)\n {\n $v = Vol::query()->findOrFail($vol_id);\n $b_id = $v->book_id;\n $v->delete();\n return redirect()->route('info', ['id'=>$b_id])->with('status','Xóa vol thành công');\n }", "title": "" }, { "docid": "aca30c87eefe8a23c18dbd6599be3d6d", "score": "0.5181741", "text": "public function unprovision(){\n // need to pass company_id to indicate which company we want to delete\n $url = $this->application->url . \"company/\" . $this->company_id;\n $response = $this->send_curl_request('DELETE', $url);\n }", "title": "" }, { "docid": "e325e5031cde4388293cd6b319104c2e", "score": "0.517471", "text": "public function destroy($id)\n {\n \n //delete useraccount dta\n $useraccountData=useraccount::find($id);\n\n if($useraccountData->photo_image!='noimage.jpg')\n {\n //delete image from store\n Storage::delete('public/useraccount_photos/'.$useraccountData->useraccount_image);\n\n }\n\n $useraccountData->delete();\n\n //store status message\n Session::flash('success_msg','useraccount deleted successfully');\n\n return redirect()->route('useraccounts.index');\n }", "title": "" }, { "docid": "e2daf37ef17fef99f8e6e87e489e75c1", "score": "0.5163767", "text": "public function destroy($id)\n {\n $database = $this->firebase->getDatabase();\n\n $database->getReference('erp/libro/'.$id)->remove();\n return redirect()->route('libro.index')->with('success','Registro eliminado satisfactoriamente');\n }", "title": "" }, { "docid": "e1b65b3583619c0d9f88d1594f91cfdb", "score": "0.5157628", "text": "public function destroy($id)\n {\n // dd($id);\n // Recuperando la compra\n $compra = compra::findOrFail($id);\n $compra->estado='cancelada';\n\n //Recuperando los productos de la compra\n $productosComprados = pedidocompra::where('cod_compra_fk', $id)->get();\n \n\n foreach ($productosComprados as $productoComprado) {\n \n // Recuperando el producto desde el inventario\n $productoInventario = producto::find($productoComprado->cod_producto_fk);\n \n\n // Regresando el stock\n $productoInventario->cantidad -= $productoComprado->cantidad; \n \n // Actualizando el stock\n //$productoInventario->update();\n\n // Eliminando el producto comprado\n //$productoComprado->delete();\n }\n \n\n // Registrando la eliminacion de la comprado\n $bitacora= new historialcompra();\n $bitacora->operacion=\"Eliminar\";\n $bitacora->cod_empleado_fk=Auth::user()->cod_empleado_fk;\n $bitacora->cod_compra_fk=$id;\n $bitacora->save();\n\n\n // Eliminando la compra\n $compra->update();\n\n\n\n return redirect('/PendienteCompra')->with('datos', 'Pedido cancelado exitosamente');\n }", "title": "" }, { "docid": "88a821963855fa902fbf134e18719ae5", "score": "0.51485926", "text": "public function destroy($voto_id) {\n $votocandidato = Votocandidato::where('voto_id', $voto_id);\n $votocandidato->delete();\n return redirect('/votocandidato');\n }", "title": "" }, { "docid": "4371cd0ddddb132fc01a673449f5a797", "score": "0.5138974", "text": "public function destroy(SignosVital $signosVital)\n {\n //\n }", "title": "" }, { "docid": "5c2a796cae084dc0002eb5e886c549e4", "score": "0.5137814", "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": "28231acca2759439fe5ced94581c5031", "score": "0.5137786", "text": "public function remove(Response $response);", "title": "" }, { "docid": "18bc63d3f096b65ea66b5e7e04c61e16", "score": "0.51377285", "text": "public function destroy(Book $book)\n {\n $filename = $book->title.'_'.$book->isbn.'.pdf';\n $filepath = storage_path('app/books/'.$filename);\n if (File::exists($filepath)) {\n File::delete($filepath);\n if ($book->delete()) {\n session()->flash('success', 'Book has been successfully deleted');\n\n return redirect()->back();\n } else {\n session()->flash('error', 'Failed to Delete Book');\n\n return redirect()->back();\n }\n }\n }", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.5135667", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.5135667", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.5135667", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.5135667", "text": "public function remove();", "title": "" }, { "docid": "9fc00d95bb6083b7c3ce93c99d039224", "score": "0.51317644", "text": "public function destroy(Request $request)\n {\n $vendor = Vendor::find($request['id']);\n $vendor->delete();\n return redirect()->back()->with('OK', 'Berhasil menghapus Vendor!'); \n }", "title": "" }, { "docid": "cb9b777fe582be002f9a3fdf85d1a613", "score": "0.51139826", "text": "public function remove($customerId, $productId);", "title": "" }, { "docid": "ed4adeddba86742035e71f12ebfa838b", "score": "0.5109031", "text": "public function del(&$vo){\n\t\tif(mysql_query(\"DELETE FROM expense WHERE expense_id=$vo->expense_id\")) {\n\t\t\t$vo->cust_id=0;\n\t\t}\n\t}", "title": "" }, { "docid": "0d1539582ffb5f8b2e8f2d23d797cd09", "score": "0.5104308", "text": "public function delete()\n {\n $this->_state->deleteSyncCache($this->_devid, $this->_user);\n $this->_data = array();\n }", "title": "" }, { "docid": "4aa4ed14a7b715f44b266220dc8620da", "score": "0.5095899", "text": "public function destroy(Request $request,$id)\n {\n $asset = Asset::find($id);\n\n $cus = new Customer;\n $cus->product_name = $asset->name;\n $cus->seller_id = auth()->user()->id;\n $cus->cost = $request['price'];\n $cus->quantity = $request['quantity'];\n $asset->available = $asset->available - $cus->quantity;\n $asset->save();\n \n $cus->vendor = $asset->vendor;\n $cus->customer = $request['name'];\n $cus->save();\n \n\n return redirect('http://localhost/vesit/public/asset')->with('success','Asset Removed');\n \n }", "title": "" }, { "docid": "cc4e7cfad48b29d555543ff68e9cbba3", "score": "0.50912267", "text": "public function destroy(Equipe $equipe)\n {\n $equipe->delete();\n return redirect()->route(\"equipes.index\");\n }", "title": "" }, { "docid": "3a0ec4669566285458e423b42ab398d7", "score": "0.5090485", "text": "public function destroy(Livraison_externe $livraison_externe)\n {\n }", "title": "" }, { "docid": "d3de183319816e68e04b4ba5ab69a652", "score": "0.50904286", "text": "public function wipeStorage(): void;", "title": "" }, { "docid": "a0d1b9b4537c30f2023d9b5304eb747d", "score": "0.5087193", "text": "public function destroy(Request $renvoi)\n {\n $renvoi = Renvoi::find($renvoi->id);\n $renvoi->membres_tribunal()->detach();\n $renvoi->delete();\n\n }", "title": "" }, { "docid": "0a742320199d1d86f45bd821dabb731f", "score": "0.5084593", "text": "public function destroy($id)\n {\n\n //Valor de la imagen\n $valoress = contact::where('id',$id)\n ->firstOr(['Nombre_foto'],function(){});\n $nombre_foto =$valoress->Nombre_foto;\n //elimina en cloudinary\n Cloudder::destroyImages($nombre_foto);\n\n //elimina DB\n contact::destroy($id);\n return redirect('/contacts')->with('success','Contacto Eliminado');\n }", "title": "" }, { "docid": "95949e1b6ac40a2c36c8a4c589197bbc", "score": "0.50828946", "text": "public function destroy($id)\n {\n $mUser = DetalleCompra::find($id);\n\n $mCompra = Compra::find($mUser->idCompra);\n $mCompra->constotal = ($mCompra->constotal - ($mUser->costoTotalxP));\n $mCompra->save();\n\n $mUser->delete();\n\n Session::flash('message', 'Producto eliminado!');\n return Redirect::to('almacen');\n }", "title": "" }, { "docid": "2714b2b985905bdb1825750284cd7b62", "score": "0.5081718", "text": "public function delete($key)\n {\n if ($this->has($key)) {\n unset($this->storage[$key]);\n }\n }", "title": "" }, { "docid": "f8a37017e6752b37bd4e5ca8782cd83f", "score": "0.50812376", "text": "public function destroy($id)\n {\n $user = User::find($id);\n $this->name = $user->name;\n $sup = $user->supplier;\n if($user->supplier){\n $url = str_replace('http://localhost:8000/', '', $sup->file_logo);\n Storage::disk('public')->delete($url );\n }\n\n User::destroy($id);\n session()->flash('destroy', 'Se elimino el usuario '. $this->name);\n $this->name ='';\n\n\n }", "title": "" }, { "docid": "d53f603033599fe82c8fdbe22c9056e3", "score": "0.5081184", "text": "public function removeBook($entry)\n {\n print \"Deleting \".$entry->getId()->getText().\"\\n\\n\";\n $this->gdClient->deleteVolume($entry);\n }", "title": "" }, { "docid": "ba1426a19cb988790e1b77dd15d85cbb", "score": "0.5080722", "text": "public function destroy(Executive $executive)\n {\n $executive->delete();\n\n if (file_exists(public_path($executive->image)))\n {\n unlink(public_path($executive->image));\n }\n\n Toastr::success('Executive member successfully Deleted', 'Success');\n\n return redirect()->route('admin.executives.index');\n }", "title": "" }, { "docid": "d6decfba1f176686197fda845da7fe08", "score": "0.507959", "text": "public function remove($data) {\n\t\t$offset = 0;\n\t\tforeach ($this->storage as $value) {\n\t\t\tif ($value == $data) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$offset++;\n\t\t}\n\t\t$this->storage->offsetUnset($offset);\n\t}", "title": "" }, { "docid": "dd6ca59e48c6588b154033a6498d446b", "score": "0.507916", "text": "public function destroy(Competitor $competitor) {\n\t\t//\n\t}", "title": "" }, { "docid": "e6abd1b919373f9c47dd766a3924ca23", "score": "0.50744706", "text": "public function destroy($id)\n {\n $transaction = Transaction::findOrFail($id);\n \n \n if($transaction->pdf != null) {\n \n Storage::disk('s3')->delete($transaction->pdf);\n }\n \n $transaction->delete();\n \n return redirect()->route(\"transactions.index\");\n }", "title": "" }, { "docid": "d74694d7e1484ca6c1a0a8df26dd3c08", "score": "0.5072567", "text": "public function destroyTercero($idVehiculo)\n {\n Vehiculotercero::destroy($idVehiculo);\n }", "title": "" }, { "docid": "f1c3eaf8704808985f2d7282d03cf9d4", "score": "0.5064394", "text": "public function remove(array $data): void\n {\n $invoice = (new AppInvoice())->find(\"user_id = :user AND id = :invoice\", \"user={$this->user->id}&invoice={$data['invoice']}\")->fetch();\n\n //verificando se a fatura existe\n if ($invoice) {\n $invoice->destroy();\n }\n\n $this->message->success(\"Tudo pronto {$this->user->first_name}. O lançamento foi removido com sucesso!\")->flash();\n if ($invoice->type == \"income\" || $invoice->type == \"fixed_income\") {\n $json['redirect'] = url(\"/app/receber\");\n }\n if ($invoice->type == \"expense\" || $invoice->type == \"fixed_expense\") {\n $json['redirect'] = url(\"/app/pagar.\");\n }\n echo json_encode($json);\n }", "title": "" }, { "docid": "7ce8ce53c940abf7e96ef1e37b58de17", "score": "0.5064034", "text": "public function accountingDocumentRemoved(AccountingDocument $document): void\n {\n $this->accountingDocuments->removeElement($document);\n }", "title": "" }, { "docid": "543b1e5f129ef009b1a39b2fe77b9dcc", "score": "0.506393", "text": "public function destroy($id)\n {\n Receipt::find($id)->update(['deleted_at'=>now()]);\n $items = \\DB::table('receipt_products')->where('receipt_id',$id)->get();\n \\DB::table('receipt_products')->where('receipt_id',$id)->delete();\n if(!empty($items)){\n foreach ($items as $item) {\n $warehouse = Warehouse::where('product_id',$item->product_id)->where('color_id',$item->color_id)->where('size_id',$item->size_id)->first();\n $warehouse->quantities -= $item->quantities;\n $warehouse->save();\n }\n }\n Cache::forget('receipts');\n }", "title": "" }, { "docid": "0e4fc58c839962f5d9923c348685e0bf", "score": "0.50495696", "text": "public function destroy(Venta $venta)\n {\n //\n }", "title": "" }, { "docid": "71f0e83ff45588131ac42219f3ee5535", "score": "0.50490785", "text": "public function destroy(Book $book)\n {\n //\n }", "title": "" }, { "docid": "f5e45327e9b026d6999c6ed1b10d6ccc", "score": "0.50464267", "text": "public function destroy(Request $request)\n {\n $this->validate($request, [\n 'kode_vendor' => 'required'\n ]);\n DB::connection($this->sql)->beginTransaction();\n \n try {\n if($data = Auth::guard($this->guard)->user()){\n $nik= $data->nik;\n $kode_lokasi= $data->kode_lokasi;\n }\n \n $del = DB::connection($this->sql)->table('vendor')\n ->where('kode_lokasi', $kode_lokasi)\n ->where('kode_vendor', $request->kode_vendor)\n ->delete();\n\n DB::connection($this->sql)->commit();\n $success['status'] = true;\n $success['message'] = \"Data Vendor berhasil dihapus\";\n \n return response()->json($success, $this->successStatus); \n } catch (\\Throwable $e) {\n DB::connection($this->sql)->rollback();\n $success['status'] = false;\n $success['message'] = \"Data Vendor gagal dihapus \".$e;\n \n return response()->json($success, $this->successStatus); \n }\t\n }", "title": "" }, { "docid": "5bdb5b92d2ea972ebe5089b1cdd776c1", "score": "0.5044257", "text": "public function deleteVoucherCode() {\n\n if ($this->checkVoucherCodeIsUsed())\n {\n return false;\n }\n\n return $this->model->delete();\n }", "title": "" }, { "docid": "b4156437dde026b3d7060cb02d1c43d6", "score": "0.5042307", "text": "public function destroy($id)\n {\n $companypartnership = companypartnership::find($id);\n File::delete(public_path('/upload/companypartnership/'.$companypartnership->logo)); \n File::delete(public_path('/upload/companypartnership/'.$companypartnership->favicon)); \n $companypartnership->delete();\n \\Session::flash('warning', 'Company Partnership data has been successfully deleted!,');\n return redirect('/companypartnership');\n }", "title": "" }, { "docid": "cb6d92c5a83feb6dd568cd641e4190ad", "score": "0.50410134", "text": "public function destroy($v)\n {\n $kk=School::find(base64_decode($v));\n if($kk->delete())\n return redirect('school')->with('success','Record Deleted');\n else\n return redirect('school')->withErrors('Unable to delete record.');\n }", "title": "" }, { "docid": "221de0333cec1309efddd33a75bcb64c", "score": "0.5039632", "text": "public function remove() {\r\n self::removeById($this->id);\r\n }", "title": "" }, { "docid": "4465636532b1ab1709bf262a1e114b62", "score": "0.503941", "text": "public function destroy($id)\n {\n $data = escaner::find($id);\n Storage::delete(\"$data->ubicacion_archivo\");\n $data->delete();\n Alert::success('', 'el archivo ha sido eliminado de forma exita!')->persistent('Close');\n return redirect()->route('escaner.index'); \n }", "title": "" }, { "docid": "c7e2c1e2e054533ac805d32377cf0ca5", "score": "0.5036826", "text": "public function destroy($cod_producto){\n $producto = Producto::Find($cod_producto);\n\n # Elimina en la base datos \n $producto->delete();\n\n }", "title": "" }, { "docid": "78f3fcb6a4df88ba8ea45797087a7e8d", "score": "0.5031311", "text": "public function remove($entity);", "title": "" }, { "docid": "78f3fcb6a4df88ba8ea45797087a7e8d", "score": "0.5031311", "text": "public function remove($entity);", "title": "" }, { "docid": "a34f537f8f474d297d886a8e6aa1dd4e", "score": "0.50258917", "text": "public function eliminar($codigo_vendedor=null){\n\n $vendedor = new Vendedor();\n\n $datosvendedor=$vendedor->where('codigo_vendedor',$codigo_vendedor)->first();\n\n //instruccion para eliminar datos\n $vendedor->where('codigo_vendedor',$codigo_vendedor)->delete($codigo_vendedor);\n //echo\"Datos borarrados \".$Codigo_vendedor;\n\n //permite visualizar inmediatamente los datos de la tabla vendedores\n return $this->response->redirect(base_url('/listarvendedores')); \n \n \n }", "title": "" }, { "docid": "998ee969a44f702d37ac642535834d91", "score": "0.50245315", "text": "public function destroy(Request $request)\n {\n $num = $request->id;\n\n drop_car::where('filenumber','=',$num)->delete();\n return response()->json();\n }", "title": "" }, { "docid": "51fd23ca1bdf54e0f86b631df17368ec", "score": "0.50227505", "text": "public function removeCostume($locale, $user_ID, $costume_ID)\n {\n $user = User::findOrFail($user_ID);\n $costume = Costume::findOrFail($costume_ID);\n\n $user->costumes()->detach($costume->id);\n\n return redirect()->back();\n }", "title": "" }, { "docid": "4bc4eaf7bf1a2c50039a117849fd9cb7", "score": "0.50204784", "text": "public function destroy($id)\n {\n $user=Auth()->user();\n $folder=\"VenteRemove/\";\n $name=uniqid().'-'.date(\"Y-m-d H:i:s\").'-'.$user->name;\n $filename=$name.\".\".\"txt\";\n $filebackup= new BackUpFermeController();\n \n try {\n $value=Vente::findorfail($id); \n $filebackup->backupfile($folder,$filename,$value);\n Vente::destroy($id);\n //dd($value); \n return redirect()->route('vente');\n } catch (\\Throwable $th) {\n throw $th;\n }\n \n }", "title": "" }, { "docid": "0519235e9b0671dce124bf16c982a22e", "score": "0.5018686", "text": "public function remove($user);", "title": "" }, { "docid": "05f25bf4580c609acbe38b97f1352c92", "score": "0.50185764", "text": "public function destroy($id)\n {\n $book = StatusBook::select('id')\n ->where('book_id', '=', $id) \n ->where('user_id', '=', Auth::user()->id)\n ->first(); \n $book->delete();\n return redirect()->route('showbook.index'); \n }", "title": "" }, { "docid": "b9a28ce36aef8610ad3670b9901e9226", "score": "0.50183594", "text": "public function destroy($id)\n {\n $receiptToDelete = Receipt::find($id);\n $receiptToDelete->delete();\n $paymentTypeAvlAmount = $receiptToDelete->payment_type->avl_amount;\n PaymentType::where('id',$receiptToDelete->payment_type->id)->update(['avl_amount'=>$paymentTypeAvlAmount - $receiptToDelete->amount]);\n return redirect('/receipts')->with('success','تم حذف سند القبض بنجاح');\n }", "title": "" }, { "docid": "fe7e5fa3abc62304817217147284b739", "score": "0.50142777", "text": "public function destroy(Voter $voter)\n {\n $voter->delete();\n session()->flash('status', 'Voter information was successfully deleted.');\n return redirect()->back();\n }", "title": "" }, { "docid": "5a5e27d4baf0a8d48a3ac4cd3f04c3ed", "score": "0.501255", "text": "function removeStorage($imgName,$storagePath){\n return Storage::delete($storagePath.\"/\".$imgName);\n }", "title": "" }, { "docid": "ddef6ce3d73c310f486c5dbbbb1c3f34", "score": "0.5007908", "text": "public function destroy(Rack $rack, Unit $unit)\n {\n $rack->update([\n 'units_used' => $rack->units_used - $unit->type->unit_height\n ]);\n\n $unit->delete();\n\n return redirect()->route('floors.rooms.show', [$rack->room->floor, $rack->room])\n ->with('success', 'unit successfully deleted.');\n }", "title": "" }, { "docid": "afeb8a711f00e093bd3c9dbb13bba023", "score": "0.50013775", "text": "public function destroy($id)\n {\n $book=Book::find($id);\n if(file_exists('uploads/book/'.$book->image)){\n \n //unlink('uploads/book/'.$book->image);\n }\n $book->delete(); \n return redirect()->back()->with('successMsg','Book Succesfully Deleted');\n \n }", "title": "" }, { "docid": "9a3fb17518efe8911c9caa31836bf58e", "score": "0.50010127", "text": "public function destroy($id)\n {\n //\n $storage = Storage::findOrFail($id);\n $storage->delete();\n return redirect()->route('admin.specificate.storage.index');\n }", "title": "" }, { "docid": "3c52eb9b763651c2a719f50b4a4167bb", "score": "0.49994755", "text": "public function destroy(StockKeluar $stockKeluar)\n {\n //\n }", "title": "" }, { "docid": "6b635a8156201130111f0f5e06916bd5", "score": "0.49942985", "text": "public function destroy(Request $request)\n {\n $compromiso = Compromiso::find($request->input('id'));\n $compromiso->delete();\n\n return redirect($request->input('ruta'))->with('success', 'Compromiso eliminado');\n }", "title": "" }, { "docid": "b8c78cd19161cf7966e7567365e984a3", "score": "0.49933228", "text": "public function remove(): void;", "title": "" }, { "docid": "b8c78cd19161cf7966e7567365e984a3", "score": "0.49933228", "text": "public function remove(): void;", "title": "" }, { "docid": "a026f3ede198f3fb93bcad88386d926d", "score": "0.4992309", "text": "public function remove()\r\n\t{\r\n\t\tif ($this->id)\r\n\t\t{\r\n\t\t\t// TODO: delete\r\n\t\t\t$this->id = null;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "8b7702eda2ddab44b269dfb7b5a38e05", "score": "0.49840948", "text": "function destroy($obj)\n {\n $this->remove($obj);\n }", "title": "" }, { "docid": "0f5e0b73062a7d82a05657254ec0ee14", "score": "0.49832824", "text": "public function destroy($id)\n {\n //\n kunnecsell::find($id)->delete();\n salesupload::where('kunnecsell_id',$id)->delete();\n return redirect()->back()->with('message','Deleted Succesfully');\n }", "title": "" }, { "docid": "e0355aad4b31aae9d8a63949b48a1ea7", "score": "0.49829513", "text": "public function destroy($uuid)\n {\n $livro = Livro::where('uuid', '=', $uuid)->delete();\n \n return redirect()\n ->route('livros.index')\n ->withSuccess('Excluído com sucesso!');\n }", "title": "" }, { "docid": "567f2d5fab8f0b568c5bc1313222956c", "score": "0.49828243", "text": "function remove($record){\n\t\t$o = $this->_options;\n\t\t$this->_dbmole->doQuery(\"DELETE FROM $o[table_name] WHERE\n\t\t\t$o[owner_field_name]=:owner AND\n\t\t\t$o[subject_field_name]=:record\n\t\t\",array(\":owner\" => $this->_owner,\":record\" => $record));\n\t\t$this->_clearCache();\n\t}", "title": "" }, { "docid": "b1142f035b94f70b1c6b673cb743b493", "score": "0.49824607", "text": "public function destroy(VueloCobro $vueloCobro)\n {\n //\n }", "title": "" }, { "docid": "8a502ef95e263ab797a00fd57d04ebf6", "score": "0.49751276", "text": "public function destroy(Request $request)\n {\n $Invoice_attachments = InvoiceAttachment::findOrFail($request->file_id);\n $Invoice_attachments->delete();\n Storage::disk('public_uploads')->delete($request->invoice_number.'/'.$request->file_name);\n session()->flash('delete','تم حذف المنتج بنجاح');\n return back();\n return $Invoice_attachments;\n\n }", "title": "" }, { "docid": "2e39126e531750a86cda47765c1cb177", "score": "0.49747914", "text": "public function destroy(Request $request)\n {\n $id = $request->id;\n StockItem::find($id)->delete();\n return redirect()->back();\n }", "title": "" }, { "docid": "a226626376a3ac073790a43e7957e6ee", "score": "0.4966075", "text": "public function deleting($model)\n {\n\t\t$errors \t\t\t\t\t\t\t= new MessageBag();\n\n \t//1. Check transaction used this voucher\n\n if($model->transactions()->count())\n {\n $errors->add('Voucher', 'Tidak dapat menghapus voucher yang telah digunakan dalam transaksi.');\n }\n\n //2. Delete quota logs\n foreach ($model->quotalogs as $key => $value) \n {\n if(!$value->delete())\n {\n $errors->add('Voucher', $value->getError());\n }\n }\n\n if($errors->count())\n {\n $model['errors'] \t\t= $errors;\n\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "8580531a487799494786e6f51c1985a9", "score": "0.49629456", "text": "public function destroy(Carro $carro)\n {\n if(Gate::denies('carros-delete')){\n abort(403,\"Não autorizado!\");\n }\n\n foreach ($carro->categorias as $key => $value) {\n $carro->categorias()->detach($value);\n }\n\n foreach ($carro->imagens as $key => $value) {\n $value->delete();\n }\n\n $carro->delete();\n return redirect()->route('carros.index');\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "d1e918223e8abb5ddf6573466439349a", "score": "0.0", "text": "public function index()\n\t{\n\t\t$docs = Document::all();\n\t\treturn view('admin.doc.docs', compact('docs'));\n\t}", "title": "" } ]
[ { "docid": "66dba62b6171d79d179d2efe10c0caba", "score": "0.7473484", "text": "public function index()\n\t{\n\t\t// Paginate resource resutls\n\t\t$results = $this->paginate();\n\n\t\t// If results found add asset to make tables responsive\n\t\t$results->total();\n\n\t\t// Create header links for sorting by column\n\t\t$links = (object) link_to_sort_by($this->resource->getVisibleLabels());\n\n\t\t// Set the route for the return button\n\t\t$returnRouteName = replace_last_segment($this->prefix);\n\n\t\t// Add data to the view\n\t\t$view = view('resource.index', compact(['results', 'links', 'returnRouteName']));\n\n\t\t// Add data to the layout\n\t\t$this->layout->title = $this->resource->plural();\n\t\t$this->layout->subtitle = ($results->lastPage() > 1) ? sprintf(_('Page %d/%d'), $results->currentPage(), $results->lastPage()) : _('Index');\n\n\t\t// Return layout + view\n\t\treturn $this->layout($view);\n\t}", "title": "" }, { "docid": "26a2d94e339f9f1ef18aaa8555d5948f", "score": "0.745603", "text": "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $filter = $this->Request()->getParam('filter', []);\n $sort = $this->Request()->getParam('sort', []);\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": "26a2d94e339f9f1ef18aaa8555d5948f", "score": "0.745603", "text": "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $filter = $this->Request()->getParam('filter', []);\n $sort = $this->Request()->getParam('sort', []);\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": "725058cd65108ac80a78fe0051c949b4", "score": "0.7406147", "text": "public function lists()\n\t{ \n\t\t$input \t = $this->getListRequest();\t\t\n\t\t$resources = $this->resourceRepository->find($input['take'], $input['skip'], $input['sort'], $input['filter']);\n\t\t$total = $this->resourceRepository->count($input['filter']);\n\n\t\treturn $this->makeListResponse($resources, $total);\n\t}", "title": "" }, { "docid": "870d86aa3e5336ed0150f4b1a79d3bc6", "score": "0.7392234", "text": "public function listAction()\n {\n $entityRepository = $this->getRepository();\n $entities = $entityRepository->findAll();\n\n return $this->render(\n $this->getTemplate(__FUNCTION__),\n [\n 'entities' => $entities,\n ]\n );\n\n }", "title": "" }, { "docid": "18be17ef8678843ecf6d65f5aa5a9ee8", "score": "0.7376227", "text": "public function actionList() {\r\n\t\t// ToDo: Add security, Add pagination\r\n\t\t\r\n\t\t// Get a list of all the required resources\r\n\t\t$models = \\parallel\\yii\\ActiveRecord::model($this->_model)->findAll();\r\n\t\t\r\n\t\t// Return the list to the client\r\n\t\t$this->sendResponse($models);\r\n\t}", "title": "" }, { "docid": "fc2792e1b13ff38e0c9384e5367be91c", "score": "0.7353814", "text": "public function actionList()\n {\n return $this->render('list');\n }", "title": "" }, { "docid": "143d9a58e87ac1f21fc152d696ad25d6", "score": "0.72700995", "text": "public function index()\n {\n $catalog_lists = Catalog::paginate(GlobalEnum::PerPage);\n\n if ($catalog_lists->total()) {\n return $this->ok('', CatalogResource::collection($catalog_lists)->response()->getData(true));\n }\n\n return $this->ok(__('global.record_not_found'));\n }", "title": "" }, { "docid": "393e0d0bda703c386c7b465265bed633", "score": "0.716953", "text": "public function indexAction()\n {\n $filter = $this->Request()->getParam('filter', []);\n\n $result = $this->resource->getList($filter);\n\n //Api controllers inherit from the shopware_controllers api rest.\n //It extends the enlight_action_controller,but\n //overrides predispatch and postdispatch method through which it defines\n //details regarding views,setting headers and json_encoding the results from the resources\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "title": "" }, { "docid": "915fb596a541fe3490b48ffd04162d2e", "score": "0.71563244", "text": "public function listAction()\n {\n $page = (int) $this->params()->fromRoute('page', 1);\n return $this->forward()->dispatch($this->getRouteIdentifierPrefix(), array('action' => 'index', 'page' => $page));\n }", "title": "" }, { "docid": "6c72516079b466368fa3fffe94f8ae35", "score": "0.71305037", "text": "function index() {\n render(\"list\");\n }", "title": "" }, { "docid": "d9b48afdd79e90cf917b6d111ca6416b", "score": "0.7120558", "text": "public function index()\n {\n $resources = Resource::orderBy('id', 'desc')->paginate(Cache::get('pagination', 10));\n\n return view('resources.index')->with(compact('resources'));\n }", "title": "" }, { "docid": "c92dfed9c6b1a4ac51bf0fb7614258f9", "score": "0.7105959", "text": "public function listAction ( )\n {\n $model = $this->getModel($this->_modelName);\n $request = $this->getRequest();\n\n $this->view->items = $model->paginate($request->getParams());\n\n }", "title": "" }, { "docid": "effdeaea4d3380c2ef0732f21651687d", "score": "0.71053994", "text": "public function index()\n {\n $resources = $this->resource->all();\n\n return view('laramanager::resources.index', compact('resources'));\n }", "title": "" }, { "docid": "90a1f4f6b697ee3ec0f4fa576dd38523", "score": "0.7097557", "text": "public function index()\n {\n return view('resources', ['resources' => Resource::orderBy('name', 'asc')->get(), 'listings' => RentResource::whereDate('start_time', '=', Carbon::today()->toDateString())->orderBy('start_time', 'asc')->get() ]);\n }", "title": "" }, { "docid": "ba6dd0e8295ef2a549fdf27a9cd12661", "score": "0.7008717", "text": "public function listAction()\n\t{\n\t\t$params = ['page' => 'page-catalog-list'];\n\n\t\tforeach( app( 'config' )->get( 'shop.page.catalog-list' ) as $name )\n\t\t{\n\t\t\t$params['aiheader'][$name] = Shop::get( $name )->header();\n\t\t\t$params['aibody'][$name] = Shop::get( $name )->body();\n\t\t}\n\n\t\treturn Response::view( Shop::template( 'catalog.list' ), $params )\n\t\t\t->header( 'Cache-Control', 'private, max-age=' . config( 'shop.cache_maxage', 30 ) );\n\t}", "title": "" }, { "docid": "79651e14a4b964194c02d9ee700a9ad5", "score": "0.70068276", "text": "public function list(): void\n {\n $list = $this->mysql->select($this->getListQuery());\n $this->page->show($this->getListPageTemplate(), ['list' => $list]);\n }", "title": "" }, { "docid": "5f679e4189acdce779f6ef9e23a350f9", "score": "0.70015985", "text": "public function actionList()\n {\n $pagination = $this->setPagination('article');\n \n $list = $pagination['recordList'];\n $pages = $pagination['pages'];\n\n return $this->render('list',['list' => $list,'pages' => $pages]);\n }", "title": "" }, { "docid": "904740a092ed938ccd50ca494c286c30", "score": "0.697071", "text": "public function list()\r\n\t\t{\r\n\t\t\t// Page title\r\n\t\t\t$this->title = 'Pathways list';\r\n\r\n\t\t\t// Function parameter\r\n\t\t\t$parametros = ( func_num_args() >= 1 ) ? func_get_arg(0) : array();\r\n\r\n\t\t\t// Load models\r\n\t\t\t$settings_model = $this->load_model('settings-model');\r\n\t\t\t$pathway_model = $this->load_model('pathway-model');\r\n\r\n\t\t\t/** Load files from view **/\r\n\r\n\t\t\t// Load the template definitions\r\n\t\t\trequire ABSPATH . '/views/_includes/template_config.php';\r\n\r\n\t\t\t// Load the template head section\r\n\t\t\trequire ABSPATH . '/views/_includes/template_start.php';\r\n\r\n\t\t\t// Load the page initial definitions\r\n\t\t\trequire ABSPATH . '/views/_includes/page_head.php';\r\n\r\n\t\t\t// Load the page itself\r\n\t\t\trequire ABSPATH . '/views/pathway_module/pathway_list-view.php';\r\n\r\n\t\t\t// Load the page footer\r\n\t\t\trequire ABSPATH . '/views/_includes/template_end.php';\r\n\r\n\t\t}", "title": "" }, { "docid": "bc75e71d755fa3c285f90da23f029065", "score": "0.6959779", "text": "public function listingAction()\n {\n /** @var Factory $Factory */\n $Factory = $this->get('factory');\n\n /** @var Product[] $Products */\n $Products = $Factory->getAllProducts();\n\n return $this->render(\n 'ACAShopBundle:Products:list.html.twig',\n array(\n 'Products' => $Products\n )\n );\n }", "title": "" }, { "docid": "bdcd442e256866ea4c741c1ff1cc3685", "score": "0.69389576", "text": "public function index()\n {\n // redirect($this->_url(\"all\"));\n $this->_create_list();\n $this->_display();\n }", "title": "" }, { "docid": "cffe60b04946e2b283ae38e3049adc3f", "score": "0.69368696", "text": "public function listAction()\n {\n if (!$this->service) {\n throw new \\RuntimeException('No CRUD service defined');\n }\n\n $label = (isset($this->label)) ? $this->label : '';\n \n $service = $this->getServiceLocator()->get($this->service);\n\n $this->trigger(CrudEvent::EVENT_LIST_PRE);\n\n $where = $this->parseWhere($this->getRequest());\n $order = $this->params()->fromQuery('order', array());\n\n $perPage = $service::INDEX_LIMIT;\n\n $page = ($this->params()->fromQuery('page', 1) -1);\n \n $list = $service->getList($where, $order, ($page * $perPage), $perPage);\n\n $count = $service->getCount($where);\n\n $this->trigger(CrudEvent::EVENT_LIST_POST, $list);\n\n $currentQuery = $this->params()->fromQuery();\n unset($currentQuery['page']);\n\n return $this->loadView(\n 'zucchi-admin/crud/list', \n array(\n 'resource' => $this->resource,\n 'list' => $list,\n 'count' => $count,\n 'page' => $page+1,\n 'currentQuery' => http_build_query($currentQuery),\n 'pages' => ceil($count/$perPage),\n 'listFields' => $this->listFields,\n 'metadata' => $service->getMetaData(),\n 'where' => $where,\n 'order' => $order,\n 'label' => $label,\n\n )\n );\n }", "title": "" }, { "docid": "d033fdb664b5308858d97fa62eaec1dd", "score": "0.69196737", "text": "public function showResourcesList(array $data);", "title": "" }, { "docid": "26f8fdc71a4939e7422fb301f2c7eb6b", "score": "0.6912179", "text": "public function index()\n {\n $questions = Question::latest()->paginate(10);\n\n return QuestionResource::collection($questions)->additional(['result' => 1, 'message' => 'Retrieved.']);\n }", "title": "" }, { "docid": "9614c14c55791e230f2a0558a1a13ab5", "score": "0.6893261", "text": "public function index() {\n $arrObjResource = Resource::latest()->paginate(self::INT_LIMIT);\n return view('resource.index', compact('arrObjResource'))\n ->with('i', (request()->input('page', 1) - 1) * 5);\n }", "title": "" }, { "docid": "4f3eab1a65aa0d6cf0ac4845abdf26ac", "score": "0.68886745", "text": "public function index()\n {\n $resources = Resource::all();\n\n return view('admin.resource.index',['resources' => $resources]);\n }", "title": "" }, { "docid": "e4d514bd62d1c63ab8647f831833ec4f", "score": "0.6883741", "text": "public function index()\n {\n \n return $this->list();\n \n }", "title": "" }, { "docid": "227cc9dea5d541678d4dfd2730fdac56", "score": "0.68733084", "text": "public function index()\n {\n $queryBuilder = QueryBuilder::for(Repository::enabled())\n ->allowedFilters([\n 'name',\n 'license',\n 'description',\n AllowedFilter::exact('author.name'),\n 'author.display_name',\n AllowedFilter::exact('tags.name'),\n 'tags.category.name',\n ])\n ->allowedSorts([\n 'name',\n 'stargazers',\n 'last_push',\n 'author.name',\n ])\n ->defaultSort('-stargazers')\n ->with('author', 'tags', 'tags.category');\n // Paginate if request has a page parameter\n if (request()->has('page')) {\n return RepositoryFullResource::collection($queryBuilder->jsonPaginate(100));\n } else {\n return RepositoryFullResource::collection($queryBuilder->get());\n }\n }", "title": "" }, { "docid": "85415f9379a58cfef9a5550ad415fc13", "score": "0.68717533", "text": "public function index()\n {\n return StatusResource::collection(\n Status::latest()->paginate(10)\n );\n }", "title": "" }, { "docid": "9bdc4409374aa0ca956ab945dfb3719d", "score": "0.68556744", "text": "public function listAction(){\r\n\t\t\t\r\n\t\t\t//$totalItem \t\t\t\t\t= $this->_model->countItem($this->arrParams, null);\r\n\t\t\t//$this->setPagination(array(\"totalItemPerPage\" => 5, \"pageRange\" => 2));\r\n\t\t\t//$this->_view->pagination \t= new Pagination($totalItem, $this->_pagination);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$this->_view->nameCategory \t= $this->_model->getNameCategory($this->arrParams, array(\"task\" => \"get-name-category\"));\r\n\t\t\t$this->_view->_listBook\t\t= $this->_model->infoItem($this->arrParams, null);\r\n\r\n\r\n\t\t\t$this->_view->_title = \"<title>List</title>\";\r\n\t\t\t$this->_view->render(\"book/list\");\r\n\t\t}", "title": "" }, { "docid": "728f8e03f8b5006e5477454a725a1745", "score": "0.68467355", "text": "public function index()\n {\n return response(EntryList::getAll(), 200);\n }", "title": "" }, { "docid": "27835938400657712b507591c21e8655", "score": "0.68351257", "text": "public function actionIndex()\n\t{\n\t\t$objects = self::apiRequest();\n\t\t\n\t\t$this->render('index',array(\n\t 'objects'=>$objects,\n\t 'page'=>$this->pNumber\n\t ));\n\t}", "title": "" }, { "docid": "4b8e52b6fdf81afdda958487f24d56b3", "score": "0.68277323", "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": "ddc72035c6eee5bda438fcd2d80fe704", "score": "0.68212914", "text": "public function index() {\n\t\t$resources = Resource::with(array('projects' => function($query) {\n\t\t\t$query->orderBy('updated_at','desc');\n\t\t}))->take(10)->get();\n\t\treturn View::make('resource/index', compact('resources'));\n\t}", "title": "" }, { "docid": "d773e5fd60f9ab29f11ae0739ce3ee4a", "score": "0.681965", "text": "public function index( ) {\n\t Session::set(\"list_refer\", $_SERVER['REQUEST_URI']);\n\t\t$this->set_order();\n\t\t$this->display_action_name = 'List Items';\n\n\t\t$this->all_rows = $this->model->order($this->get_order())->page($this->this_page,$this->list_limit);\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": "cf0df3ff4d7be7a54e874c2996c82e4e", "score": "0.68174404", "text": "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Applications\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all applications allowed access via API\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/applications/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => array('button', 'float_right')))\n\t\t\t\t\t\t\t\t);\n\t\t$this->datagrid->setConfig ( OauthClients::grid() )->datagrid ();\n\t}", "title": "" }, { "docid": "7dd3e647ccd9b808f98f8f06413992bc", "score": "0.6814742", "text": "public function listingAction()\r\n {\r\n $oZendDbSelect = new Zend_Db_Select(Zend_Db_Table::getDefaultAdapter());\r\n $oSelect = $oZendDbSelect->from('r_scenarios')->order('r_scenario_id desc');\r\n \r\n // Search engine on the query\r\n $oMySearchEngine = new My_Search_Engine($oSelect);\r\n \r\n $oMySearchEngine->findWordOn(array('r_scenario_libelle' => array('operator' => 'like')));\r\n $oMySearchEngine->findByFields(array(\r\n 'r_scenario_id' => array('operator' => 'eql'),\r\n 'r_scenario_actif' => array('operator' => 'eql'),\r\n 'r_scenario_libelle' => array('operator' => 'like')\r\n ));\r\n\r\n $oMySearchEngine->makeOrderBy();\r\n \r\n // Downloading the filtered list in CSV\r\n if ($this->_helper->ContextSwitch()->getCurrentContext() == 'csv') {\r\n $oAdapterExport = new My_Data_Export_Source_Adapter_Select($oMySearchEngine->getSelect());\r\n $oExport = new My_Data_Export_CSV($oAdapterExport);\r\n $this->view->csv = $oExport->make();\r\n $this->view->filename = Phoenix_Data_Export_Csv::buildFileName();\r\n } // Viewing the filtered list in HTML\r\n else {\r\n // Handle pagination\r\n $oAdapter = new Zend_Paginator_Adapter_DbSelect($oMySearchEngine->getSelect());\r\n $oPaginator = new My_Paginator($oAdapter);\r\n $oPaginator->setCurrentPageNumber($this->_getParam('page'));\r\n $oPaginator->setItemCountPerPage(15);\r\n $this->view->paginator = $oPaginator;\r\n }\r\n }", "title": "" }, { "docid": "a422edadfd877c23034b14eb7c872f20", "score": "0.68017745", "text": "public function index()\n {\n // Get Students\n\n $students = Student::paginate(10); \n return StudentResource::collection($students);\n }", "title": "" }, { "docid": "8fb097585964e814f54986427cb4f2a5", "score": "0.6799695", "text": "public function listAction ()\n {\n\n $this->_helper->viewRenderer->setNoRender(false);\n $this->_helper->viewRenderer->setViewScriptPathSpec(\"server/list.phtml\");\n $this->_helper->serverTester->listAction($this->_serverClass, $this);\n }", "title": "" }, { "docid": "9eac380992aafa51fd5f8cad7dd703c0", "score": "0.6790209", "text": "public function index()\n\t{\n\t\treturn View::make('backoffice.resource.index');\n\t}", "title": "" }, { "docid": "5d12cb46b97d3119f7b5023b68501a38", "score": "0.6787119", "text": "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $altinvs = $em->getRepository('SGIBundle:Altinv')->findAll();\n\n return $this->render('altinv/list.html.twig', array(\n 'altinvs' => $altinvs,\n ));\n }", "title": "" }, { "docid": "971c5bf5ae183faa04c5c48cbd18c860", "score": "0.67837936", "text": "public function do_list()\n {\n\n $request = $this->getRequest();\n $console = $this->getConsole();\n\n $workarea = $console->tpl->getWorkArea( );\n $workarea->addTemplate( 'usermgmt/list' );\n\n }", "title": "" }, { "docid": "009c68f22edb5d32fe04a4694c775ca1", "score": "0.6775978", "text": "public function indexAction() {\n $this->render('list', array(\n 'entries' => $this->newsRepository->getAll(array('date' => 'DESC'))\n ));\n }", "title": "" }, { "docid": "f942ddab63eeccb58e9b51ecacb7adee", "score": "0.67753416", "text": "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\tlist($total, $result) = Resource_Service_Attribute::getList($page, $perpage,array('at_type' => 1,'status' => 1));\n\t\t$this->assign('result', $result);\n\t\t$this->assign('total', $total);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'?'));\n\t}", "title": "" }, { "docid": "1cda64db2e68c557b90cdabeccaba33f", "score": "0.6758781", "text": "public function index()\n {\n //\n $items = Item::all();\n return ItemResource::collection($items);\n }", "title": "" }, { "docid": "183389798fc3f84d25abd7fc3486c685", "score": "0.67524254", "text": "function index()\n\t\t{\n\t\t\tif($this->AJAXCall)\n\t\t\t\texit;\n\t\t\t\n\t\t\t$this->_generate_listing(false);\n\t\t}", "title": "" }, { "docid": "117edb0c09e0fdcb587db5412ef18996", "score": "0.67509466", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $user = $em->getRepository('TicketswapUserBundle:Users')->find(1);\n $listings = $em->getRepository('TicketswapListingBundle:Listings')->findBy(['user' => $user]);\n\n return $this->render('listings/index.html.twig', array(\n 'listings' => $listings,\n ));\n }", "title": "" }, { "docid": "a0016ac4bfda3ac0418505813ba2e862", "score": "0.6733415", "text": "public function indexAction()\n {\n if ( ! $this->getUser()) {\n return $this->redirect($this->generateUrl('user_sign_in'));\n }\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('BWBlogBundle:Resource')->findBy(array(\n 'user' => $this->getUser(),\n ), array(\n 'created' => 'DESC',\n ));\n $resources = new ArrayCollection($entities);\n\n return $this->render('BWBlogBundle:Resource:index.html.twig', array(\n 'entities' => $entities,\n 'resources' => $resources,\n ));\n }", "title": "" }, { "docid": "274943ce909ef8e9f446ec40976ee886", "score": "0.6730245", "text": "public function listAction()\n {\n $all = $this->rss->findAll();\n \n $this->theme->setTitle(\"Visa alla RSS-flöden\");\n $this->views->add('rss/list-all', [\n 'feeds' => $all,\n 'title' => \"Visa alla RSS-flöden\",\n ], 'main');\n \n $this->views->add('rss/rss-sidebar', [], 'rsidebar');\n }", "title": "" }, { "docid": "c6af5753a45a23a4039724edd2030d18", "score": "0.6730181", "text": "public function index()\n {\n $data = array(\n 'objects' => $this->instituicaoBo->list_all(),\n 'title' => 'Instituição',\n 'heading' => 'Lista de',\n );\n\n $this->load->view('/instituicao/list_instituicao.html.php', $data);\n }", "title": "" }, { "docid": "ed091402879b52de0ec1b21125fb6df3", "score": "0.67278576", "text": "public function index()\n {\n //Get Products\n $products = Product::paginate(100);\n \n //Return collection of products as resource\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "0ee391ae331b2e93b8a1c88e428dfb9a", "score": "0.6725415", "text": "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $rentals = $em->getRepository('SGIBundle:Rental')->findAll();\n\n return $this->render('rental/list.html.twig', array(\n 'rentals' => $rentals,\n ));\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.6724347", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "d89867a60ba15fed734e46000a36620d", "score": "0.6721309", "text": "static function listAction() {\n // Get user files\n $users = self::getUsers();\n\n // Display user ids\n echo '<ul>';\n\n foreach ($users as $user) {\n echo '<li><a href=\"/users/' . $user->USR . '\">' . $user->NAME . ' (' . $user->USR . ')</a></li>';\n }\n\n echo '</ul>';\n }", "title": "" }, { "docid": "b10432984ae1b667b192f3f5d3985a4c", "score": "0.6714338", "text": "public function showList()\n {\n //var_dump($this->post);\n if (isset($this->post['page']) || isset($this->get['page'])) {\n if ($this->post) {\n $this->doListing($this->criteria, $this->orderBy);\n }\n if ($this->get) {\n $this->doPagination();\n }\n } else {\n //..destrói todas as sessões gravadas e cria uma view limpa.\n Session::destroySession('sqlData');\n Session::destroySession('criteria');\n Session::destroySession('orderBy');\n Session::destroySession('limit');\n Session::destroySession('lastPage');\n $this->viewList->show();\n }\n }", "title": "" }, { "docid": "a82e643c16a81545d59c105f6fd9019e", "score": "0.67109877", "text": "public function index()\n {\n return PlaylistResource::collection(Playlist::with('tracks')->paginate());\n }", "title": "" }, { "docid": "ff3e5f5bb761df19ee88cd46c9c44f75", "score": "0.671047", "text": "public function index()\n {\n $this->global['pageTitle'] = 'List Partners - '.APP_NAME;\n $this->global['pageMenu'] = 'List Partners';\n $this->global['contentHeader'] = 'List Partners';\n $this->global['contentTitle'] = 'List Partners';\n $this->global ['role'] = $this->role;\n $this->global ['name'] = $this->name;\n $this->global ['repo'] = $this->repo;\n \n $data['readonly'] = $this->readonly;\n $data['classname'] = $this->cname;\n $data['url_list'] = base_url($this->cname.'/list/json');\n $this->loadViews($this->view_dir.'index', $this->global, $data);\n }", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67095095", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67095095", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67095095", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67095095", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67095095", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67095095", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67095095", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "9c3a8017fadc1446e144ef2847a75de3", "score": "0.67043793", "text": "public function index()\n {\n return PlaylistResource::collection(\\App\\Playlist::orderBy('created_at', 'desc')->get());\n }", "title": "" }, { "docid": "1c6e0baa6678b891bebbc943f9480efa", "score": "0.6699389", "text": "public function indexAction()\r\n\t{\r\n\r\n\t\t$this->_view->_title = ucfirst($this->_controller) . ' Manager :: List';\r\n\r\n\t\t $totalItems = $this->_model->countItems($this->_arrParam);\r\n\t\t $configPagination = ['totalItemsPerPage' => 3, 'pageRange' => 3];\r\n\t\t$this->setPagination($configPagination);\r\n\t\t$this->_view->pagination = new Pagination($totalItems, $this->_pagination);\r\n\t\r\n\t\t$this->_view->Items = $this->_model->listItem($this->_arrParam, null);\r\n\t\t$this->_view->slbGroup = $this->_model->itemInSelectBox($this->_arrParam);\r\n\t\t$this->_view->render($this->_controller . '/index');\r\n\t}", "title": "" }, { "docid": "da46f30f701104b01168396ab42fd3e4", "score": "0.669921", "text": "public function actionList()\n\t{\n\t\t$data = Desire::getAll(10);\n\t\t$articles = $data['articles'];\n\t\t$count = $data['count'];\n\n\n\n\t\treturn $this->render('list', [\n\t\t\t'articles' => $articles,\n\t\t\t'count' => $count,\n\t\t\t'ajaxUrl' => '/desire/desire/list-ajax'\n\t\t]);\n\t}", "title": "" }, { "docid": "d92ce07568892bbdbac73cfad06a3cff", "score": "0.66966647", "text": "public function index() {\n $rows = Module::paginate(10);\n return View::make(\"CoreCms::module.listing\")->with(\"models\", $rows);\n }", "title": "" }, { "docid": "8fdc346d2ae73862487e8562ba0d2f8e", "score": "0.6696212", "text": "public function index()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->data['crud'] = $this->crud;\n $this->data['title'] = ucfirst(($this->book ? $this->book->title . ' --> ' : '') . $this->crud->entity_name_plural);\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 }", "title": "" }, { "docid": "f38c30f9e765863f55cf5c7e5b441e0a", "score": "0.6694349", "text": "public function listAction()\n {\n $this->_title($this->__('System'))->_title($this->__('Index Management'));\n\n $this->loadLayout();\n $this->_setActiveMenu('system/index');\n $this->renderLayout();\n }", "title": "" }, { "docid": "ce01e387a99bc334b00eed748a6952cf", "score": "0.66922796", "text": "public function index()\n {\n return $this->respondWithPaginatedCollection(SmartBin::paginate(), $this->smartBinTransformer);\n }", "title": "" }, { "docid": "6302f4af4daf8199c6e51ccba9683ada", "score": "0.66920424", "text": "public function index()\n {\n $flights = Resources::all();\n return view('admin.resource.view', compact('flights'));\n }", "title": "" }, { "docid": "a852cb19289ccd3ae31b2b0e5320aea1", "score": "0.6691155", "text": "public function index()\n {\n Gate::authorize('view', 'products');\n $product = Product::paginate();\n\n return ProductResource::collection($product);\n }", "title": "" }, { "docid": "d8835f9930d0f9c4f3c53749e67962c3", "score": "0.66847134", "text": "public function listAction() {\n\n // Use the model to get all stored users\n $allUsers = $this->userModel->findAll();\n\n // Creates an array with the information to be displayed\n $userInfo = $this->userInfoBuilder([\n 'update', 'inactivate', 'activate', 'soft-delete', 'undo-delete', 'hard-delete'\n ], $allUsers);\n\n // Display the result in a view\n $this->views->add('user/list-all', [\n 'title' => 'Alla användare',\n 'users' => $userInfo\n ]);\n }", "title": "" }, { "docid": "d69e4f0b4187ff68e97b4e7a5d09ad96", "score": "0.6679615", "text": "public function list()\n {\n }", "title": "" }, { "docid": "a656fd3c504977ccfaf035cdddd42150", "score": "0.6679307", "text": "public function listAction() : void {\n $this -> view -> assignMultiple([\n 'server' => $this -> serverRepository -> findAll()\n ]);\n }", "title": "" }, { "docid": "a9f952d5e07e7d6d7e049c37f8d2fa2e", "score": "0.6677349", "text": "public function listAction(){\n // In a controller this can be:\n // $this->request->getQuery('page', 'int'); // GET\n $currentPage = $this->request->getPost('pageindex', 'int'); // POST\n $pageNum = ($currentPage == null) ? 1 : $currentPage;\n\n // The data set to paginate\n $contact = new Contact();\n $results = $contact->getContact4Admin();\n\n // Create a Model paginator, show 10 rows by page starting from $currentPage\n $paginator = new PaginatorArray(\n array(\n \"data\" => $results,\n \"limit\" => 10,\n \"page\" => $pageNum\n )\n );\n\n // Get the paginated results\n $page = $paginator->getPaginate();\n\n return $this->response->setJsonContent($page);\n\n }", "title": "" }, { "docid": "af48da44bf6d55a059ab53c7dd12c14e", "score": "0.6677084", "text": "public function index()\n {\n $this->authorize('view', $this->repository->modelName());\n\n $resources = $this->repository->filter()->cast();\n\n return $this->responder->ok()->withData($resources)->send();\n }", "title": "" }, { "docid": "88a8d702b1375b13dc358eb9e6dfdb8e", "score": "0.66768384", "text": "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Tickets list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the tickets.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/tickets/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\n\t\t$this->datagrid->setConfig ( Tickets::grid() )->datagrid ();\n\t}", "title": "" }, { "docid": "fcbdc058a31d41050a367e7b15d55776", "score": "0.66731256", "text": "protected function listAction()\n {\n $this->dispatch(EasyAdminMongoOdmEvents::PRE_LIST);\n\n $fields = $this->document['list']['fields'];\n $paginator = $this->mongoOdmFindAll($this->document['class'], $this->request->query->get('page', 1), $this->document['list']['max_results'], $this->request->query->get('sortField'), $this->request->query->get('sortDirection'));\n\n $this->dispatch(EasyAdminMongoOdmEvents::POST_LIST, ['paginator' => $paginator]);\n\n $parameters = [\n 'paginator' => $paginator,\n 'fields' => $fields,\n // RESTRICTED_ACTIONS 'delete_form_template' => $this->createDeleteForm($this->document['name'], '__id__')->createView(),\n ];\n\n return $this->executeDynamicMethod('render<DocumentName>Template', ['list', $this->document['templates']['list'], $parameters]);\n }", "title": "" }, { "docid": "f6d989efb8c8e985bb96c0559d9bde67", "score": "0.6672873", "text": "public function index()\n\t{\n $listings = Listing::paginate(3);\n return response( $listings,200);\n\t}", "title": "" }, { "docid": "561ee0fde098e9e4a73a2a5669089034", "score": "0.66714823", "text": "public function index()\n {\n // Get employees\n $employees = Employee::latest()->paginate(5);\n\n // Return employees\n return EmployeeResource::collection($employees);\n }", "title": "" }, { "docid": "d25f4e517682766596d2c16eca86c7fa", "score": "0.6671476", "text": "public function index()\n {\n return view('resource.index',['resources'=>Resource::all()]);\n }", "title": "" }, { "docid": "2a6023a5396366a36aac2f066e03181d", "score": "0.6671474", "text": "public function index()\n {\n $playlists = Playlist::query()\n ->with('author')\n ->latest()\n ->paginate(16);\n return PlaylistResource::collection($playlists);\n }", "title": "" }, { "docid": "f16b067e8febaf73c982ac35e0e11cd0", "score": "0.6658865", "text": "public function index()\n {\n return ActionResource::collection(Action::paginate(5));\n }", "title": "" }, { "docid": "ca2f35e9a4c5b25c7b81f82a26bdc119", "score": "0.6656953", "text": "public function list()\n {\n $books = Book::visible();\n\n return $this->apiListingResponse($books, [\n 'id', 'name', 'slug', 'description', 'created_at', 'updated_at', 'created_by', 'updated_by', 'owned_by',\n ]);\n }", "title": "" }, { "docid": "36f38270af9227d848d8bfe2fc2fb2f6", "score": "0.6649726", "text": "public function index()\n\t{\n\t\t$resources = $this->repository->getResources();\n\t\t$menuTab = $this->menuTab;\n\t\treturn response()->view('admin.resources.index', compact(['resources', 'menuTab']));\n\t}", "title": "" }, { "docid": "842b9bbe43e49f877c207858fd6dd962", "score": "0.66489387", "text": "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Products list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the products.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/products/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Products::grid () )->datagrid ();\n\t}", "title": "" }, { "docid": "7654a7b909673402548e3c1d711a6d3b", "score": "0.6645314", "text": "public function list()\n {\n $data = array(\n 'title' => 'Laporan Vclaim',\n 'class_name' => $this->class,\n 'route_name' => $this->routes\n );\n\n $data['contents'] = 'contents/laporan/' . $this->class . '/index';\n $this->load->view('master', $data);\n\n }", "title": "" }, { "docid": "165ffb7039a9dcc6c1d81e1ca64483e4", "score": "0.66452366", "text": "public function index()\n {\n // Get books\n\t $books = Book::orderBy('created_at', 'desc')->paginate(5);\n\n\t return BookResource::collection($books);\n }", "title": "" }, { "docid": "6aae86ba51583240c8fe0f141159a841", "score": "0.66431487", "text": "public function index()\n {\n $accountDetail = AccountDetail::all()->sortBy('id');\n return AccountDetailResource::collection($accountDetail);\n }", "title": "" }, { "docid": "10a2b9d6812eccfed7ddcd2d5f7a7eb0", "score": "0.6640491", "text": "public function index()\n {\n $sub_localization_model = SubLocalization::on();\n $this->addUserFilteringToDataFetch($sub_localization_model, 'name', 'where', ['name', 'LIKE']);\n $this->addUserFilteringToDataFetch($sub_localization_model, 'description', 'where', ['description', 'LIKE']);\n $this->addUserFilteringToDataFetch($sub_localization_model, 'localization_id', 'where', ['localization_id', '=']);\n\n return BaseResource::collection($sub_localization_model->get());\n }", "title": "" }, { "docid": "d768f601d0b3a2a45a883075e9bd74fa", "score": "0.66390806", "text": "public function index()\n {\n $products = Product::latest()->paginate();\n\n return $this->respond(ProductResource::collection($products));\n }", "title": "" }, { "docid": "6d76de53bb869e73d429cbb2f319f520", "score": "0.66381824", "text": "public function index(Request $request)\n {\n $resources = Resource::where('status', 1);\n\n $request_append = array();\n\n if($request->has('q')) {\n\n $query_string = $request->input('q');\n\n $request_append['q'] = $query_string;\n\n $resources = $resources->where('name', 'LIKE', '%' . $query_string . '%')\n ->orWhere('source_name', 'LIKE', '%' . $query_string . '%')\n ->orWhere('description', 'LIKE', '%' . $query_string . '%');\n }\n\n \n\n $resources = $resources->paginate(env('USER_LIST_PAGINATION_SIZE'))->appends($request_append);\n\n return View('resources.show-resources', compact('resources'));\n }", "title": "" }, { "docid": "b2f9c5d65d641e65a8807637650b4e37", "score": "0.663317", "text": "public function index()\n {\n $limit = 0;\n $list_obj = Collection::where('status', 1)->orderBy('created_at', 'DESC')->paginate($limit);\n return view('admin.collection.list')->with('list_obj', $list_obj);\n }", "title": "" }, { "docid": "701976fee18cc3b85c2b2cb729fee5d7", "score": "0.6632529", "text": "public function display_list(){\r\n\t\t\r\n\t\t$collection = new User_Collection();\r\n\t\t$variables = array(\r\n\t\t\t'collection' => $collection->getPaginated(),\r\n\t\t\t'pagination' => $collection->getPagination(),\r\n\t\t\t'sorters' => $collection->getSortableLinks(),\r\n\t\t);\r\n\t\t\r\n\t\tBackendLayout::get()\r\n\t\t\t->prependTitle('Список пользователей')\r\n\t\t\t->setLinkTags($collection->getLinkTags())\r\n\t\t\t->setContentPhpFile(self::TPL_PATH.'admin_list.php', $variables)\r\n\t\t\t->render();\r\n\t}", "title": "" }, { "docid": "1863deff5f71e623d3df5630ccdabb09", "score": "0.66309845", "text": "public function indexAction()\n {\n $this->_initAction();\n $this->_title('Items');\n $this->renderLayout();\n }", "title": "" }, { "docid": "fbca53bf6960e73cbc1141408c860e37", "score": "0.6627913", "text": "function index()\n\t\t{\n\t\t// en $this->_view->_listado para poder acceder a el desde la vista.\n\t\t\t$this->_view->_listado = $listado = $this->_historialModel->getHistorial();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "title": "" }, { "docid": "fc175898bd7c35e91f0a34b68f176c7f", "score": "0.662721", "text": "public function listing()\n\t{\n\t\treturn ADMIN_URL.'/list?item='.$this->get_table();\n\t}", "title": "" }, { "docid": "425d9ab98ae18d02acd009984f9a2fb2", "score": "0.6625087", "text": "public function apiListsAction()\n {\n $api = $this->_param('api');\n\n if (!$api || !array_key_exists($api, Thrive_List_Manager::$AVAILABLE)) {\n exit();\n }\n $connection = Thrive_List_Manager::connectionInstance($api);\n\n echo $this->_view('partials/api-lists', array(\n 'selected_api' => $connection,\n 'connection' => $connection,\n 'lists' => $connection->getLists($this->_param('force_fetch') ? false : true)\n ));\n\n exit();\n }", "title": "" }, { "docid": "da5a6a8e08d78cfa23a7671fa0667dac", "score": "0.6624904", "text": "public function listingAction(){\n if (LoginHelper::isAdmin()){\n $this->view->render('doctor/list', Doctor::all());\n }else{\n Router::redirect('home', '<p class=\"alert alert-danger\">You are not authorized</p>');\n }\n }", "title": "" } ]
53c59b44860fc2fadad925e225d51a82
Update the specified resource in storage. POST /tiempo/editar
[ { "docid": "48658adb2755cf51c509d99a9d0a931c", "score": "0.0", "text": "public function postEditar()\n {\n if ( Request::ajax() ) {\n $regex='regex:/^([a-zA-Z .,ñÑÁÉÍÓÚáéíóú]{2,60})$/i';\n $required='required';\n $reglas = array(\n 'nombre' => $required.'|'.$regex,\n );\n\n $mensaje= array(\n 'required' => ':attribute Es requerido',\n 'regex' => ':attribute Solo debe ser Texto',\n );\n\n $validator = Validator::make(Input::all(), $reglas, $mensaje);\n\n if ( $validator->fails() ) {\n return Response::json(\n array(\n 'rst'=>2,\n 'msj'=>$validator->messages(),\n )\n );\n }\n $tiempoId = Input::get('id');\n $tiempo = Tiempo::find($tiempoId);\n $tiempo['nombre'] = Input::get('nombre');\n $tiempo['apocope'] = Input::get('apocope');\n $tiempo['totalminutos'] = Input::get('minutos');\n $tiempo['estado'] = Input::get('estado');\n $tiempo['usuario_updated_at'] = Auth::user()->id;\n $tiempo->save();\n\n return Response::json(\n array(\n 'rst'=>1,\n 'msj'=>'Registro actualizado correctamente',\n )\n );\n }\n }", "title": "" } ]
[ { "docid": "538685304e8d3bac22b1a675088aa45e", "score": "0.6899865", "text": "public function update(Request $request, $id)\n\n {\n $Mensaje=['required'=>'El campo :attribute es requerido'];\n\n $emprendimiento= Emprendimiento::find($id);\n $emprendimiento->nombre = $request->get('nombre');\n $emprendimiento->descripcion = $request->get('descripcion');\n $emprendimiento->localidad_id = $request->get('localidad_id');\n $emprendimiento->direccion = $request->get('direccion');\n $emprendimiento->sitio_web = $request->get('sitio_web');\n $emprendimiento->instagram = $request->get('instagram');\n $emprendimiento->facebook = $request->get('facebook');\n $emprendimiento->nro_telefono = $request->get('nro_telefono');\n //$emprendimiento->logo= $request->get('logo');\n \n \n if($request->hasFile('logo')){\n $emprendimiento=Emprendimiento::findOrFail($id);\n\n Storage::delete('public/'.$emprendimiento->logo); \n \n $emprendimiento['logo']=$request->file('logo')->store('uploads','public');\n }\n // $emprendimiento->usuario_id = auth()->user()->id;\n $emprendimiento->tipoempresa_id = $request->get('tipoempresa_id');\n $emprendimiento->latitud = $request->get('latitud');\n $emprendimiento->longitud = $request->get('longitud');\n \n // $emprendimiento::where('id','=',$id)->update($emprendimiento);\n \n $emprendimiento->save();\n return redirect('/emprendimiento')->with('Mensaje','Emprendimiento actualizado con éxito');\n }", "title": "" }, { "docid": "178cbfa6dc2270fdab0a68d5d087e5f2", "score": "0.6842548", "text": "public function update(EditarArticuloRequest $request, $id)\n {\n $articulo = Articulo::find($id);\n $articulo->codigo = $request->input('codigo');\n $articulo->nombre = $request->input('nombre');\n $articulo->descripcion = $request->input('descripcion');\n $articulo->categoria = $request->input('categoria');\n $articulo->stock = $request->input('stock');\n $articulo->proveedor_id = $request->input('proveedor_id');\n $articulo->subfamilia_id = $request->input('subfamilia_id');\n $articulo->familia_id = $request->input('familia_id');\n $articulo->precio_venta = $request->input('precio_venta');\n $articulo->precio_compra = $request->input('precio_compra');\n $articulo->marca_maquina_id = $request->input('marca_maquina_id');\n $articulo->modelos_articulos = $request->input('modelos_articulos');\n\n\n //edicion imagen\n if($request->imagen){\n $imagen = $request->file('imagen');\n $filename = time() . '-' . $articulo->nombre . '.' . $imagen->getClientOriginalExtension();\n $location = public_path('images/articulos/' . $filename);\n Image::make($imagen->getRealPath())->resize(300, 300)->save($location);\n $oldfilename = $articulo->imagen;\n //actualizo base\n $articulo->imagen = $filename;\n //eliminar foto vieja\n Storage::delete($oldfilename);\n }\n\n $articulo->save(); //Se hace un save para que exista el objeto => tiene\n //una id => puedo relacionarlo con otros objetos\n\n if($request->has('reemplazos')){\n\n //Elimino los articulos que ya estaban relacionados con el articulo\n foreach ($articulo->mi_reemplazo as $r) {\n $articulo->remove_reemplazo($r->codigo);\n }\n\n $codigos = $request->input('reemplazos');\n $cod_array = explode(',', $codigos); //explode separa un string segun el\n //primer parametro que le paso\n foreach ($cod_array as $c) {\n $articulo->add_reemplazo($c);\n }\n }\n\n $articulo->save();\n\n Session::flash('success', 'El articulo se ha actualizado correctamente');\n\n return redirect('/articulos');\n }", "title": "" }, { "docid": "5fdf5bd9f1fb0173d94066cf1628383f", "score": "0.680374", "text": "public function updateAction(Request $request, $id)\n{\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('gemaBundle:Raza')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Raza entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n $editForm = $this->createEditForm($entity);\n $editForm->handleRequest($request);\n $accion = ' ';\n $this->get(\"gema.utiles\")->traza($accion);\n $em->flush();\n\n \n \n\n \n return $this->redirect($this->generateUrl('admin_raza'));\n \n}", "title": "" }, { "docid": "1c9408c58b097820bcca9e17f13bf9fc", "score": "0.6767314", "text": "public function update(Request $request, Reto $reto)\n {\n // dd(Str::after($file,'/'));\n Storage::delete($reto->url_imagen);\n $file = $request->file('url_imagen_e')->store('public/imgReto');\n //$file = $request->url_imagen_e->store('imgReto');\n $nombre = explode('/',$file);\n $reto->enunciado = $request->enunciado;\n $reto->descripcion = $request->descripcion;\n if($file){\n $reto->url_imagen = $nombre[2];\n }\n $reto->save();\n return redirect('admin/retos');\n }", "title": "" }, { "docid": "54374fc45b3895b2aa5a72a80efe0357", "score": "0.6727619", "text": "public function update(Request $request, Receta $receta)\n {\n\n //Verificacion del policy\n\n $this->authorize('update', $receta ); \n $data=$request->validate([\n\n 'nombre'=>'required|min:6',\n 'categoria'=>'required',\n 'ingredientes'=>'required',\n 'preparacion'=>'required',\n \n\n ]);\n\n //Asignar valores \n $receta->nombre=$data['nombre'];\n $receta->categoria_id=$data['categoria'];\n $receta->ingredientes=$data['ingredientes'];\n $receta->preparacion=$data['preparacion'];\n\n //Nueva imagen\n\n if(request('imagen')){\n // Guardar la imagen en nuestro store\n $ruta_imagen=$request['imagen']->store('upload-recetas','public');\n //Despues aplicamos el estilo\n $img=Image::make(public_path(\"storage/{$ruta_imagen}\"))->fit(1000,550);\n $img->save();\n $receta->imagen=$ruta_imagen; \n\n }\n\n // Guardar informacion\n $receta->save(); \n\n //redieccionar \n return redirect()->action([RecetaController::class, 'index']);\n }", "title": "" }, { "docid": "801c9495d9cbfe5ca168a2b95be597d7", "score": "0.67169935", "text": "public function update(Request $request, Empresa $empresa)\n\n {\n\n//Miramos a ver si hay nuevo logo\n\n if ($request->file('logo') != null) {\n $name = $request->file('logo')->getClientOriginalName();;\n $directorioDeLogos = asset(\"storage/logos\");\n $a = $request->file('logo')->storeAs('logos', $name);\n info(\"He guardado el fichero \", [$a]);\n $empresa->logo = $name;\n }\n $empresa->fill($request->input())->saveOrFail();\n return redirect()->route('empresas.index');\n //\n }", "title": "" }, { "docid": "38101acdde95025c69ab1532cc4e75f1", "score": "0.66326284", "text": "public function update(EmpresaUpdateRequest $request, $id)\n {\n $empresa = Empresa::find($id);\n\n $empresa->fill($request->all())->save();\n\n\n //IMAGE \n if($request->file('image')){\n $path = Storage::disk('public')->put('image', $request->file('image'));\n $empresa->fill(['file' => asset($path)])->save();\n }\n\n Alert::success('Empresa actualizada con exito')->persistent('Cerrar');\n return redirect()->route('empresas.edit', $empresa->id);\n }", "title": "" }, { "docid": "7d3ae85f7074e73441c95a224a124b7e", "score": "0.6624766", "text": "public function editar(Request $request)\n {\n \n $preguntas = Preguntas::findOrFail($request->id);\n $preguntas->encabezado = $request->input('encabezado');\n $preguntas->save();\n\n return redirect()->route('examen_view');\n\n \n }", "title": "" }, { "docid": "99478a707b608c7d45d0d61a40e2d3c0", "score": "0.6600857", "text": "public function update(Request $request, $id)\n {\n //\n $campos=[\n 'Nombre'=>'required|string|max:100',\n 'Cantidad'=>'required|string|max:100',\n 'Descuento'=>'required|string|max:100',\n 'Precio'=>'required|string|max:100',\n ];\n $mensaje=[\n 'required'=>' :attribute es requerido',\n ];\n if($request->hasFile('Imagen')){\n $campos=['Imagen'=>'required|max:10000|mimes::jpeg,png,jpg',];\n $mensaje=['Imagen.required'=>'La Imagen es requerida'];\n }\n\n $this->validate($request,$campos,$mensaje);\n\n $datosProducto = request()->except(['_token','_method'] );\n \n if($request->hasFile('Imagen')){\n $producto=Ofertas::findOrFail($id);\n Storage::delete('public/'.$producto->Imagen);\n $datosProducto['Imagen']=$request->file('Imagen')->store('uploads','public');\n }\n\n Ofertas::where('id','=',$id)->update($datosProducto);\n $producto=Ofertas::findOrFail($id);\n //return view('ProductoCanasta.edit',compact('producto'));\n return redirect('Ofertas')->with('mensaje','Oferta Actualizada');\n }", "title": "" }, { "docid": "4c107672c79706171e49ba3ea2e1418d", "score": "0.6577247", "text": "public function update(StoreAnuncio $request, Anuncio $anuncio)\n {\n// dd($request->user(),$anuncio);\n //policies\n if($request->user()->cant('update',$anuncio))\n abort('403','No Autorizado, No puedes actualizar este anuncio');\n \n $rutaImage = $anuncio->imagen;\n $idUser = $request->user()->id; \n \n // dd($rutaImage);\n //recupera el fichero de imagen\n if($request->hasFile('imagen')){ //si llega la imagen \n if($rutaImage!=\"\")\n Storage::delete(config('filesystems.anunciosImageDir').$rutaImage);\n $ruta= $request->file('imagen')->store(config('filesystems.anunciosImageDir')); //guardarla\n $rutaImage = pathinfo($ruta,PATHINFO_BASENAME);\n }\n \n //recupera los valores de los inputs en una lista\n $datos = $request->only(['titulo','precio','descripcion']); \n \n $datos+=$request->except('imagen')+['imagen'=>$rutaImage]; \n \n $anuncio->update($datos); //actualiza los datos de la moto\n \n //carga la vista y muestra el mensaje a los detalles de la moto creada\n return back()->with('success',\"El anuncio $anuncio->titulo Actualizado correctamente!\");\n }", "title": "" }, { "docid": "a416d0ff1aebecae2d505cc5906f5d66", "score": "0.65749604", "text": "public function handleEdit(Request $request)\n {\n $id=$request->id;\n $entreprise=Entreprise::where('id', $id)->first();\n \n $entreprise->nom = $request->nom;\n $entreprise->secteur = $request->secteur;\n $entreprise->adresse = $request->adresse;\n //$entreprise->id_document = 0;\n $entreprise->phone = $request->phone;\n $entreprise->email = $request->email;\n $entreprise->statut = $request->status;\n \n $entreprise->save();\n toastr()->success('Entreprise modifieé avec succeés!');\n\n \n return redirect()->route('showListeEntreprise');\n }", "title": "" }, { "docid": "7b7f78e698c6ac744f6adf388e5f0fbe", "score": "0.65733004", "text": "public function update(Request $request, tiempo $tiempo)\n {\n //\n }", "title": "" }, { "docid": "a4fb3844f92952a67a489235c5635927", "score": "0.6567398", "text": "public function update(ProductoUpdateRequest $request, Producto $producto)\n {\n \n $producto = Producto::find($producto->id);\n $producto->fill($request->all())->save();\n\n if($request->file('descripcion_pdf')){\n $path = Storage::disk('public')->put('uploads',$request->file('descripcion_pdf'));\n $producto->fill(['descripcion_pdf'=>asset($path)])->save();\n }\n\n if($request->file('foto')){\n $path = Storage::disk('public')->put('uploads',$request->file('foto'));\n $producto->fill(['foto'=>asset($path)])->save();\n } \n \n\n $productos = Producto::orderBy('id','DESC')->get();\n return redirect()->route('productos.index',compact('productos'))->with('info', 'Producto actualizado con exito');\n\n\n }", "title": "" }, { "docid": "913399b4af4c43d251a1f70c92eb8e8d", "score": "0.6542458", "text": "public function update(Request $request, Establecimiento $establecimiento)\n {\n // Ejecutar el policy\n $this->authorize('update', $establecimiento);\n\n $validatedData = $request->validate([\n 'nombre' => 'required',\n 'categoria_id' => 'required|exists:App\\Categoria,id', // Comproba que dicha id exista en la tabla categoria\n 'imagen_principal' => 'image|max:1000',\n 'direccion' => 'required||min:6',\n 'barrio' => 'required|min:6',\n 'lat' => 'required',\n 'lng' => 'required',\n 'telefono' => 'required|numeric',\n 'descripcion' => 'required|min:50',\n 'apertura' => 'date_format:H:i',\n 'cierre' => 'date_format:H:i|after:apertura',\n 'uuid' => 'required|uuid'\n ]);\n\n if ($request['imagen_principal']) {\n\n $oldImg = $establecimiento->imagen_principal;\n\n if (File::exists('storage/' . $oldImg)) {\n\n // Eliminar imagen del servidor\n File::delete('storage/' . $oldImg);\n }\n\n\n\n // Guardar imagen\n $ruta_imagen = $request['imagen_principal']->store('principales', 'public');\n\n // Resize\n $img = Image::make( public_path(\"storage/{$ruta_imagen}\"))->fit(800, 600);\n $img->save();\n\n // Agregando la ruta de la imagen ppal al array validado\n $validatedData['imagen_principal'] = $ruta_imagen;\n\n\n\n }\n\n $establecimiento->update($validatedData);\n\n return back()->with('estado', 'Tu informacion se almaceno correctamente');\n\n\n }", "title": "" }, { "docid": "6c7e0b2b2f80efbf6dfc85f6a714e9ae", "score": "0.64831316", "text": "public function update(Request $request, $id){\n $tipoActividad = TipoActividad::findOrFail($id);\n if($request->file('rutaImagen')){\n //Eliminando Foto anterior\n $path = $tipoActividad->rutaImagen;\n File::delete(storage_path('app/public/'.$tipoActividad->rutaImagen));\n Storage::delete($path);\n //Guardar la nueva imagen\n $file = $request->file('rutaImagen');\n $preRuta = 'tipoActividad/';\n $name = 'tA'.time().'.'.$file->getClientOriginalExtension();\n $storage = Storage::disk('actividades')->put($preRuta.$name, \\File::get($file));\n if($storage){\n $rutaImagen = 'actividades/'.$preRuta.$name;\n }else{\n $rutaImagen = $actividad->rutaImagen;\n }\n }else {\n $rutaImagen = $tipoActividad->rutaImagen;\n }\n $tipoActividad->rutaImagen = $rutaImagen;\n $tipoActividad->dirigidoA = $this->getDirigidoA($request);\n $tipoActividad->responsable = $this->getResponsable($request);\n $tipoActividad->update();\n\n return Redirect::to('admin/tipoActividad');\n }", "title": "" }, { "docid": "513af3baac52614bef8c17634490a0e4", "score": "0.64817375", "text": "public function update(Request $request, $id)\n {\n //\n $campos=[\n 'AutorNombre'=>'required|string|max:100',\n 'AutorApellido'=>'required|string|max:100',\n 'LibroNombre'=>'required|string|max:100',\n 'LibroGenero'=>'required|string|max:100',\n 'EditorialNombre'=>'required|string|max:100',\n 'Precio'=>'required|string|max:100',\n ];\n $mensaje=[\n 'required'=>'El :attribute es requerido', \n ];\n if($request->hasFile('TapaFrontal')){\n $campos=[ 'TapaFrontal'=>'required|max:10000|mimes:jpeg,png,jpg'];\n }\n if($request->hasFile('TapaFrontal')){\n $campos=[ 'TapaFrontal'=>'required|max:10000|mimes:jpeg,png,jpg'];\n $mensaje=[ 'TapaFrontal.required'=> 'La Tapa Frontal es requerida'];\n }\n if($request->hasFile('TapaTrasera')){\n $campos=[ 'TapaTrasera'=>'required|max:10000|mimes:jpeg,png,jpg'];\n $mensaje=[ 'TapaTrasera.required'=> 'La Tapa Trasera es requerida'];\n }\n $this->validate($request, $campos, $mensaje);\n\n\n $datosdecatalogo = request()->except(['_token','_method']);\n\n if($request->hasFile('TapaFrontal')) {\n $catalogo=Catalogo::findOrFail($id);\n Storage::delete('public/'.$catalogo->TapaFrontal);\n $datosdecatalogo['TapaFrontal']=$request->file('TapaFrontal')->store('uploads','public');\n }\n if($request->hasFile('TapaTrasera')) {\n $catalogo=Catalogo::findOrFail($id);\n Storage::delete('public/'.$catalogo->TapaTrasera);\n $datosdecatalogo['TapaTrasera']=$request->file('TapaTrasera')->store('uploads','public');\n }\n Catalogo::where('id','=','$id')->update($datosdecatalogo);\n $catalogo=Catalogo::findOrFail($id);\n return redirect('catalogo')->with('mensaje','Se edito un libro ');\n \n }", "title": "" }, { "docid": "efe1de6bb2bb254de6e36f1b160a8e77", "score": "0.6470893", "text": "public function editaravion($id){\n $datosPeticion=$this->request->getRawInput();\n \n //2. Obtener SOLO los datos que deseo editar\n $nombre=$datosPeticion[\"nombre\"];\n $telefono=$datosPeticion[\"codigo\"];\n\n //3. Creamos un arreglo asociativo con los datos para enviar al modelo\n $datosEnvio=array(\n \"nombre\"=>$nombre,\n \"codigo\"=>$codigo\n );\n\n //4. Validamos y ejecutamos la operación en BD\n if($this->validate('avionesPUT')){\n \n $this->model->update($id,$datosEnvio);\n $mensaje=array('estado'=>true,'mensaje'=>\"registro editado con exito\");\n return $this->respond($mensaje);\n\n }else{\n $validation = \\Config\\Services::validation();\n return $this->respond($validation->getErrors(),400);\n\n }\n\n\n \n\n\n\n\n }", "title": "" }, { "docid": "4a79ab282e81712d43946497315acdcb", "score": "0.6470606", "text": "public function update(Request $request, $id)\n {\n //\n $destino_id=$request->input('destino');\n $url=$request->input('url');\n $idioma=$request->input('idioma');\n $titulo=$request->input('titulo');\n $detalle=$request->input('detalle');\n $imagen=$request->file('imagen');\n $imagen_=$request->input('imagen_');\n if($idioma=='0')\n return redirect()->back()->withInput($request->all())->with(['warning'=>'Escoja un idioma.']);\n\n if($destino_id=='0')\n return redirect()->back()->withInput($request->all())->with(['warning'=>'Escoja un destino.']);\n\n $destino_inicio= DestinoInicio::findOrFail($id);\n $destino_inicio->url=$url;\n $destino_inicio->titulo=$titulo;\n $destino_inicio->idioma=$idioma;\n $destino_inicio->detalle=$detalle;\n $destino_inicio->destino_id=$destino_id;\n $destino_inicio->estado=1;\n $destino_inicio->save();\n\n // borramos de la db la foto de portada que han sido eliminadas por el usuario\n if(!isset($imagen_)){\n $destino_inicio->imagen=NULL;\n $destino_inicio->save();\n }\n if(!empty($imagen)){\n $filename ='imagen-'.$destino_inicio->id.'.'.$imagen->getClientOriginalExtension();\n $destino_inicio->imagen=$filename;\n $destino_inicio->save();\n Storage::disk('destino_inicio')->put($filename, File::get($imagen));\n }\n return redirect()->route('admin.destino-inicio.index.path')->with(['success'=>'Datos editados correctamente.']);\n }", "title": "" }, { "docid": "562f8548d3bee5c34fa758564fde5b1a", "score": "0.6450324", "text": "public function update(Request $request, $id)\n { \n $parceiro = Parceiro::find($id);\n $parceiro->nome = $request->nome;\n $parceiro->referencia = $request->referencia;\n $parceiro->save();\n\n if(isset($request->file))\n {\n Storage::delete(\"public/$parceiro->logo\");\n\n if ($request->file->getMaxFilesize() < $request->file->getClientSize()) {\n return redirect()->back()->with('error', \"Anexo muito grande !\");\n }\n\n if (strstr('.jpg;.jpeg;.gif;.png;', $request->file->clientExtension())) {\n $imagename = md5( date('his') . $parceiro->id) . \".\" . $request->file->clientExtension();\n Image::make($request->file)->resize(280, 209, function ($constraint) {\n $constraint->aspectRatio();\n $constraint->upsize();\n })->save(storage_path('app/public') . \"/parceiros/$imagename\");\n\n $parceiro->logo = \"parceiros/$imagename\";\n $parceiro->save();\n }else{\n return redirect()->back()->with('error', \"Extensão de imagem não permitida!\");\n }\n }\n\n return redirect()->route('parceiros.admin');\n\n }", "title": "" }, { "docid": "3003ecf965cfc6406e1202af1d9d00b1", "score": "0.6449052", "text": "public function update(Request $request,$id)\n {\n $DatosServicio=request()->except(['_token','_method']);\n if($request->hasFile('foto'))\n {\n $servicios = servicio::findOrFail($id); //verifica que id exista\n Storage::delete('public/'.$servicios->foto); //borra la foto que esta en storage\n $DatosServicio['foto']=$request->File('foto')->store('uplouds','public');\n }\n\n\n servicio::where('id','=',$id)->update($DatosServicio);\n\n $servicios = servicio::findOrFail($id);\n return view('Servicios.editar',compact('servicios'));\n }", "title": "" }, { "docid": "a1df7888c8a4f44614e69cd1696dff92", "score": "0.64444214", "text": "public function update(Request $request, Funcionario $funcionario)\n {\n\n try\n {\n // dd($request->all());\n $id = $request->id;\n $funcionario = Funcionario::find($id);\n $funcionario->nombre = $request->nombre;\n $funcionario->cargo = $request->cargo;\n $funcionario->tipo_funcionario_id = $request->tipo_funcionario;\n $objeto_guardado = $funcionario->save();\n\n if($objeto_guardado==true)\n {\n // inicio actualizacion de la imagen\n $imagen_formulario = $request->imagen;\n $imagen_funcionario_actualizada = Funcionario::find($id);\n\n // Revisa en el campo url del registro de la tabla Noticias\n // y despues captura el nombre de la imagen y verifica si existe\n // la imagen en el directorio public/noticia.\n // solo se editara si existe la imagen en la carpeta public/noticia\n\n // Solo si viene una imagen en el formulario,revisar en el campo sql de noticias y revisar en el\n // disco public/noticias para borrar y actualizar\n if($imagen_formulario)\n {\n // Existe en nombre de la imagen en la tabla Noticias\n if ($imagen_funcionario_actualizada->url) {\n // Eliminar y actualiza la imagen existe o no en el disco public/noticia\n if (Storage::disk('public')->exists($imagen_funcionario_actualizada->url)) {\n # code...\n //Eliminamos la imagen de la carpeta public/noticia\n storage::disk('public')->delete($imagen_funcionario_actualizada->url);\n }\n\n //Creamos la imagen en el disco local public/noticia\n $imagen_actualizar =Storage::disk('public')->putFile('/funcionario', new File($imagen_formulario));\n // y se actualiza\n $imagen_funcionario_actualizada->url = $imagen_actualizar;\n }\n }\n\n\n $imagen_funcionario_actualizada->save();\n return response()->json(\"¡El Funcionario se actualizo exitosamente!\");\n\n // fin de la actualizacion de la imagen\n }\n elseif($objeto_guardado==false)\n {\n # code...\n return response()->json(\"¡El Funcionario no se actualizo debido que ha ocurrido un error en el sistema.!\");\n }\n DB::commit();\n }\n catch (Exception $e)\n {\n //dd($e->getMessage());\n DB::rollback();\n // something went wrong\n // var_dump(e->errorInfo );\n // print_r($e->getMessage());\n // error = ->errorInfo; //dd();\n // return redirect()->route('listado.paciente')->with('error_insercion','Se produjo una excepción al guardar el registro');\n return response()->json(\"¡Ha ocurrido una excepcion en el sistema.!\");\n }\n\n }", "title": "" }, { "docid": "7cde0792cbc1c5005f50c89d697a8050", "score": "0.64442456", "text": "public function update(Request $request, $id)\n {\n $profil = $request->file('profil');\n\n $nomimage = 'etudiant'.time().uniqid().'.'.$profil->getClientOriginalExtension();\n\n $path = $profil->storeAS('public/profil',$nomimage);\n\n $etudiant = Etudiant::find($id);\n\n $etudiant->prenom = $request->prenom;\n $etudiant->nom = $request->nom;\n $etudiant->phone = $request->phone;\n $etudiant->adresse = $request->adresse;\n $etudiant->profil = $nomimage;\n\n $etudiant->save();\n\n\n return redirect()->route('etudiants.index')->with('message','etudiant modifiée');\n }", "title": "" }, { "docid": "abd42a8c65cd4fe21451bb541a80abdf", "score": "0.642395", "text": "public function atualizar($id, SalvarTermoReferenciaRequest $request)\n {\n DB::beginTransaction();\n try {\n $termoReferencia = TermoReferencia::find($id);\n $termoReferencia->update($request->except(['anexo', 'insumo']));\n\n if (!is_null($request->file('anexo'))) {\n $delete_file = $termoReferencia->anexo;\n $anexo = $this->arquivoUploader->upload($request->file('anexo'), 'termo_referencia');\n $termoReferencia->update(['anexo' => $anexo]);\n }\n\n if ($request->get('insumo')) {\n $termoReferencia->insumos()->attach(TermoReferencia::prepararRequestParaInsert($request->get('insumo')));\n }\n\n if (isset($delete_file)) {\n File::delete($delete_file);\n }\n\n flash(\"Os dados do registro foram alterados com sucesso.\", 'success');\n DB::commit();\n\n return redirect()->route('termo_referencia.index');\n } catch (Exception $e) {\n flash(\"Não foi possivel alterar os dados do registro, contate o suporte técnico.\", 'danger');\n DB::rollback();\n }\n }", "title": "" }, { "docid": "11de51960a792ed2c84c98501eb2c41d", "score": "0.64226365", "text": "public function edit(Request $request)\n { \n\n /*Validaciones de los campos*/\n $this->validate($request, [\n 'categoria' => 'required',\n 'estado' => 'required',\n 'marca' => 'required',\n 'referencia' => 'required',\n 'descripcion' => 'required'\n ]);\n $cedula = explode(\"-\", $request->get('cliente'));\n $articulo = Articulo::find($request->id);\n $articulo->id_categoria = $request->categoria;\n $articulo->id_estado_articulo = $request->estado;\n $articulo->marca = $request->marca;\n $articulo->referencia = $request->referencia;\n $articulo->descripcion = $request->descripcion;\n $articulo->id_cliente = $cedula[0];\n\n $articulo->save();\n\n session()->flash('success','Articulo Actualizado Correctamente');\n return redirect()->route('articulos.index');\n\n }", "title": "" }, { "docid": "282fd23f5a79fffaa6e6d054fd3586e2", "score": "0.63956153", "text": "public function update(Request $request, estudiante_carrera $estudiante_carrera)\n {\n //\n }", "title": "" }, { "docid": "a8b62f465905bb6f205263ee24c74743", "score": "0.63856643", "text": "public function update(Request $request, $id)\n {\n //metodo de editar producto\n }", "title": "" }, { "docid": "ab03125957f71a150e6c8bcad10ba2bd", "score": "0.63790816", "text": "public function update(Request $request, Empresa $empresa)\n {\n //\n }", "title": "" }, { "docid": "648c459ef0783038e3c1ee1b2707d7aa", "score": "0.63680506", "text": "public function update(Request $request, evidencia $evidencia)\n {\n request()->validate([\n 'beneficiario_id' => 'required',\n ]);\n\n $evidencia = new evidencia();\n \n $file = $file;\n /*$filename = time().'.'.$file->getClientOriginalExtension();\n $request->file->move('assets', $filename);\n $evidencia->file=$filename;*/\n\n $evidencia->nombre=$request->nombre;\n $evidencia->descripcion=$request->descripcion;\n\n $id = request('beneficiario_id');\n $beneficiario = Beneficiario::find($id);\n $beneficiario->notas()->save($evidencia);\n\n return redirect('beneficiario/'.$id)->with('nuevo','Evidencia Registrada Exitósamente');\n }", "title": "" }, { "docid": "515b3f3caf148e8ba63fde47d793c129", "score": "0.63635147", "text": "public function edit(Request $request,$id){\n $dataUsuario=request()->except((['_token', '_method']));\n\n //Subimos la imagen ingresada para el usuario\n if($request->hasFile('imagen')){\n $usuario = Usuario::findOrFail($id);\n Storage::delete('public/'.$usuario->imagen);\n $dataUsuario['imagen']= $request->file('imagen')->store('imagenes', 'public');\n }\n\n Usuario::where('id','=', $id)->update($dataUsuario);\n return back()->with('usuarioModificado', 'Usuario Modificado');\n }", "title": "" }, { "docid": "e7cd7483496ba94fb16fc60d0f577504", "score": "0.6359918", "text": "public function update(TerceroRequest $request, $id)\n {\n if($request['respuesta'] != 'falso')\n { \n $tercero = \\App\\Tercero::find($id);\n $tercero->fill($request->all());\n $tercero->Cargo_idCargo = (($request['Cargo_idCargo'] == '' or $request['Cargo_idCargo'] == 0) ? null : $request['Cargo_idCargo']);\n $tercero->Zona_idZona = (($request['Zona_idZona'] == '' or $request['Zona_idZona'] == 0) ? null : $request['Zona_idZona']);\n $tercero->SectorEmpresa_idSectorEmpresa = (($request['SectorEmpresa_idSectorEmpresa'] == '' or $request['SectorEmpresa_idSectorEmpresa'] == 0) ? null : $request['SectorEmpresa_idSectorEmpresa'\n ]);\n $tercero->Tercero_idEmpleadorContratista = (($request['Tercero_idEmpleadorContratista'] == '' or $request['Tercero_idEmpleadorContratista'] == 0) ? null : $request['Tercero_idEmpleadorContratista'\n ]);\n $tercero->CentroCosto_idCentroCosto = (($request['CentroCosto_idCentroCosto'] == '' or $request['CentroCosto_idCentroCosto'] == 0) ? null : $request['CentroCosto_idCentroCosto'\n ]);\n\n $tercero->TipoProveedor_idTipoProveedor = (($request['TipoProveedor_idTipoProveedor'] == '' or $request['TipoProveedor_idTipoProveedor'] == 0) ? null : $request['TipoProveedor_idTipoProveedor'\n ]);\n // Checlbbox de contratista\n $tercero->contratistaTercero = isset($request['contratistaTercero']) ? 1 : 0;\n \n\n if(null !== Input::file('imagenTercero') )\n {\n $image = Input::file('imagenTercero');\n $imageName = $request->file('imagenTercero')->getClientOriginalName();\n $manager = new ImageManager();\n $manager->make($image->getRealPath())->heighten(500)->save('imagenes/tercero/'. $imageName);\n\n $tercero->imagenTercero = 'tercero/'. $imageName;\n } \n\n $tercero->save();\n\n $indice = array(\n 'Tercero_idTercero' => $id);\n\n $data = array(\n 'fechaNacimientoTerceroInformacion' => $request['fechaNacimientoTerceroInformacion'],\n 'fechaIngresoTerceroInformacion' => $request['fechaIngresoTerceroInformacion'],\n 'fechaRetiroTerceroInformacion' => $request['fechaRetiroTerceroInformacion'],\n 'fechaInicioExamenMedicoTerceroInformacion' => $request['fechaInicioExamenMedicoTerceroInformacion'],\n 'tipoContratoTerceroInformacion' => $request['tipoContratoTerceroInformacion'],\n 'aniosExperienciaTerceroInformacion' => $request['aniosExperienciaTerceroInformacion'],\n 'educacionTerceroInformacion' => $request['educacionTerceroInformacion'],\n 'experienciaTerceroInformacion' => $request['experienciaTerceroInformacion'],\n 'formacionTerceroInformacion' => $request['formacionTerceroInformacion'],\n 'estadoCivilTerceroInformacion' => $request['estadoCivilTerceroInformacion'],\n 'numeroHijosTerceroInformacion' => $request['numeroHijosTerceroInformacion'],\n 'composicionFamiliarTerceroInformacion' => $request['composicionFamiliarTerceroInformacion'],\n 'personasACargoTerceroInformacion' => $request['personasACargoTerceroInformacion'],\n 'estratoSocialTerceroInformacion' => $request['estratoSocialTerceroInformacion'],\n 'tipoViviendaTerceroInformacion' => $request['tipoViviendaTerceroInformacion'],\n 'tipoTransporteTerceroInformacion' => $request['tipoTransporteTerceroInformacion'],\n 'HobbyTerceroInformacion' => $request['HobbyTerceroInformacion'],\n 'actividadFisicaTerceroInformacion' => $request['actividadFisicaTerceroInformacion'],\n 'consumeLicorTerceroInformacion' => $request['consumeLicorTerceroInformacion'],\n 'FrecuenciaMedicion_idConsumeLicor' => \n (\n ($request['FrecuenciaMedicion_idConsumeLicor'] == '' or \n $request['FrecuenciaMedicion_idConsumeLicor'] == 0) \n ? null \n : $request['FrecuenciaMedicion_idConsumeLicor']),\n 'consumeCigarrilloTerceroInformacion' => $request['consumeCigarrilloTerceroInformacion']);\n\n $terceroinformacion = \\App\\TerceroInformacion::updateOrCreate($indice, $data);\n\n for ($i=0; $i < count($request['cumpleTerceroTipoProveedorSeleccion']); $i++) \n { \n $indice = array(\n 'idTerceroTipoProveedorSeleccion' => $request['idTerceroTipoProveedorSeleccion'][$i]);\n\n $data = array(\n 'cumpleTerceroTipoProveedorSeleccion' => $request['cumpleTerceroTipoProveedorSeleccion'][$i],\n 'Tercero_idTercero' => $id,\n 'TipoProveedorSeleccion_idTipoProveedorSeleccion' => $request['TipoProveedorSeleccion_idTipoProveedorSeleccion'][$i]);\n\n $datos = \\App\\TerceroTipoProveedorSeleccion::updateOrCreate($indice, $data);\n }\n\n \n\n \\App\\TerceroContacto::where('Tercero_idTercero',$id)->delete();\n \\App\\TerceroProducto::where('Tercero_idTercero',$id)->delete();\n // \\App\\TerceroExamenMedico::where('Tercero_idTercero',$id)->delete();\n // \\App\\TerceroArchivo::where('Tercero_idTercero',$id)->delete();\n \n $contadorContacto = count($request['nombreTerceroContacto']);\n for($i = 0; $i < $contadorContacto; $i++)\n {\n \\App\\TerceroContacto::create([\n 'Tercero_idTercero' => $id,\n 'nombreTerceroContacto' => $request['nombreTerceroContacto'][$i],\n 'cargoTerceroContacto' => $request['cargoTerceroContacto'][$i],\n 'telefonoTerceroContacto' => $request['telefonoTerceroContacto'][$i],\n 'movilTerceroContacto' => $request['movilTerceroContacto'][$i],\n 'correoElectronicoTerceroContacto' => $request['correoElectronicoTerceroContacto'][$i]\n ]);\n }\n\n $contadorProducto = count($request['FichaTecnica_idFichaTecnica']);\n for($i = 0; $i < $contadorProducto; $i++)\n {\n \\App\\TerceroProducto::create([\n 'Tercero_idTercero' => $id,\n 'FichaTecnica_idFichaTecnica' => $request['FichaTecnica_idFichaTecnica'][$i]\n ]);\n }\n // Se quita Esta mltiregistro ya que es un campo que ya están en cargos / perfiles\n // $contadorExamen = count($request['TipoExamenMedico_idTipoExamenMedico']);\n // for($i = 0; $i < $contadorExamen; $i++)\n // {\n // \\App\\TerceroExamenMedico::create([\n // 'Tercero_idTercero' => $id,\n // 'TipoExamenMedico_idTipoExamenMedico' => $request['TipoExamenMedico_idTipoExamenMedico'][$i], \n // 'ingresoTerceroExamenMedico' => $request['ingresoTerceroExamenMedico'][$i], \n // 'retiroTerceroExamenMedico' => $request['retiroTerceroExamenMedico'][$i], \n // 'periodicoTerceroExamenMedico' => $request['periodicoTerceroExamenMedico'][$i], \n // 'FrecuenciaMedicion_idFrecuenciaMedicion' => $request['FrecuenciaMedicion_idFrecuenciaMedicion'][$i] \n // ]);\n // }\n\n \n // HAGO UN INSERT A LOS NUEVOS ARCHIVOS SUBIDOS EN EL DROPZONE\n if ($request['archivoTerceroArray'] != '') \n {\n $arrayImage = $request['archivoTerceroArray'];\n $arrayImage = substr($arrayImage, 0, strlen($arrayImage)-1);\n $arrayImage = explode(\",\", $arrayImage);\n $ruta = '';\n\n for($i = 0; $i < count($arrayImage); $i++)\n {\n if ($arrayImage[$i] != '' || $arrayImage[$i] != 0) \n {\n $origen = public_path() . '/imagenes/repositorio/temporal/'.$arrayImage[$i];\n $destinationPath = public_path() . '/imagenes/tercero/'.$arrayImage[$i];\n \n if (file_exists($origen))\n {\n copy($origen, $destinationPath);\n unlink($origen);\n $ruta = '/tercero/'.$arrayImage[$i];\n\n DB::table('terceroarchivo')->insert(['idTerceroArchivo' => '0', 'Tercero_idTercero' =>$tercero->idTercero,'fechaTerceroArchivo' => $request['fechaTerceroArchivo'],'rutaTerceroArchivo' => $ruta]);\n } \n else\n {\n echo \"No existe el archivo\";\n }\n }\n }\n }\n \n\n // HAGO UN UPDATE DE LOS DATOS\n // $index = array(\n // 'idTerceroArchivo' => $request['idTerceroArchivo'][$i]);\n\n // $data= array(\n // 'Tercero_idTercero' => $tercero->idTercero,\n // 'tituloTerceroArchivo' => '',\n // 'fechaTerceroArchivo' => $request['fechaTerceroArchivo'][$i],\n // 'descripcionTerceroArchivo' => '',\n // 'rutaTerceroArchivo' => '');\n \n // $save = \\App\\TerceroArchivo::updateOrCreate($index, $data);\n // for ($i=0; $i < ; $i++) \n // { \n // DB::table('terceroarchivo')->update(['idTerceroArchivo' => '', 'Tercero_idTercero' =>$tercero->idTercero,'fechaTerceroArchivo' => '', 'descripcionTerceroArchivo' => '','rutaTerceroArchivo' => '']);\n // }\n\n // ELIMINO LOS ARCHIVOS\n $idsEliminar = $request['eliminarArchivo'];\n $idsEliminar = substr($idsEliminar, 0, strlen($idsEliminar)-1);\n if($idsEliminar != '')\n {\n $idsEliminar = explode(',',$idsEliminar);\n \\App\\TerceroArchivo::whereIn('idTerceroArchivo',$idsEliminar)->delete();\n }\n return redirect('/tercero?tipoTercero='.$request['tipoTercero']);\n }\n }", "title": "" }, { "docid": "93d800d24674a6871b0ec324e0d3d02b", "score": "0.6357383", "text": "public function update(Request $request, $id) {\n $inquilino = Inquilino::find($id);\n $persona = Persona::find($inquilino->persona_id);\n $nombreImagen = \"sin_imagen.png\";\n \n if ($request->file('imagen')) {\n $file = $request->file('imagen');\n $nombreImagen = 'persona_' . time() .'.png';\n if ((Storage::disk('personas')->exists($persona->foto_perfil)) && ($persona->foto_perfil !== \"sin_imagen.png\")) {\n Storage::disk('personas')->delete($persona->foto_perfil); // Borramos la imagen anterior. \n }\n $persona->fill($request->all());\n $persona->foto_perfil = $nombreImagen; // Actualizamos el nombre de la nueva imagen.\n Storage::disk('personas')->put($nombreImagen, \\File::get($file)); // Movemos la imagen nueva al directorio /imagenes/personas \n $persona->save();\n $inquilino->fill($request->all());\n $inquilino->save();\n Session::flash('message', '¡Se ha actualizado la información del paciente con éxito!');\n return redirect()->route('inquilinos.index');\n }\n $persona->fill($request->all());\n $persona->save();\n $inquilino->fill($request->all());\n $inquilino->save();\n Session::flash('message', '¡Se ha actualizado la información del inquilino con éxito!');\n return redirect()->route('inquilinos.index');\n }", "title": "" }, { "docid": "5e03de2c593771ca6318084fcc51ee6f", "score": "0.63550496", "text": "public function update(Request $request, $id)\n {\n\n $material=AlmacenEmpaque::findOrFail($id);\n $unidades=$this->propiedadesUnidadMedida($request->get(\"idUnidadMedida\"));\n $unidadDeMedida=$unidades->nombreUnidadMedida;\n $capacidadUnidadMedida= $unidades->cantidad;\n $totalUnidadesCompletas= $capacidadUnidadMedida* $unidadesCompletas = $request->get('unidadesCompletas');\n $unidadCentral = $request->get('unidadCentral');\n $unidadesMedida =$request->get('unidadDeMedida');\n $stockReal = $request->get('stock_min');\n $stockMinimo = $cantidadAlmacen= $this->calcularStockMinimoReal($unidadDeMedida,$stockReal,$capacidadUnidadMedida);\n $cantidadAlmacen= $this->calcularEquivalencia($unidadDeMedida,$totalUnidadesCompletas, $unidadCentral,$unidadesMedida);\n\n $material->idFormaEmpaque=$request->get('idEmpaque');\n\n if (Input::hasFile('imagen')){ //validar la imagen, si (llamanos clase input y la funcion hash_file(si tiene algun archivo))\n $file=Input::file('imagen');//si pasa la condicion almacena la imagen\n $file->move(public_path().'/imagenes/almacenempaque',$file->getClientOriginalName());//lo movemos a esta ruta \n $material->imagen=$file->getClientOriginalName();\n }\n $material->descripcion=$request->get('descripcion');\n $material->cantidad=$cantidadAlmacen;\n $material->idUnidadMedida=$request->get('idUnidadMedida');\n $material->codigo=$request->get('codigo');\n $material->stock_minimo=$stockMinimo;\n $material->estado='Activo';\n $material->update();\n return Redirect::to('detalleEditar/empaques');\n }", "title": "" }, { "docid": "591e162a5df70bda04d2b5adc3d58e70", "score": "0.6348971", "text": "public function update(Request $request, $id)\n {\n $boton=$request->get('actualizar');\n if ($boton=='anular') {\n $servicio= Servicios::find($id);\n $servicio->estado_anular='1';\n $servicio->save();\n return redirect()->route('servicios.index');\n }\n elseif ($boton=='edit_servicio') {\n if($request->hasfile('foto')){\n $image1 =$request->file('foto');\n $name =time().$image1->getClientOriginalName();\n $destinationPath = public_path('/archivos/imagenes/servicios/');\n $image1->move($destinationPath,$name);\n }else{\n $name=$request->get('foto_original');\n }\n\n // Tipo de cambio -------------------------------------------------------------------------------------\n $cambio=TipoCambio::latest('created_at')->first();\n\n // Moneda --------------------------------------------------------------------------------------------\n $moneda_principal=Moneda::where('tipo','nacional')->first();\n $moneda_principal_id=$moneda_principal->id;\n $moneda_id=$request->get('moneda');\n\n // Generar Cambio para precio nacional y precio extranjero ----------------------------------------------\n if($moneda_principal_id==$moneda_id){\n $precio_nacional=$request->get('precio');\n $precio_extranjero=$precio_nacional/$cambio->paralelo;\n }else{\n $precio_extranjero=$request->get('precio');\n $precio_nacional=$precio_extranjero*$cambio->paralelo;\n }\n\n $servicio= Servicios::find($id);\n $servicio->moneda_id=$moneda_id;\n $servicio->nombre=$request->get('nombre');\n $servicio->descripcion=$request->get('descripcion');\n $servicio->descuento=$request->get('descuento');\n $servicio->utilidad=$request->get('utilidad');\n $servicio->precio_nacional=round($precio_nacional,2);\n $servicio->precio_extranjero=round($precio_extranjero,2);\n $servicio->foto=$name;\n $servicio->tipo_afectacion_id=$request->get('afectacion');\n $servicio->save();\n return redirect()->route('servicios.show', $id);\n }\n}", "title": "" }, { "docid": "6586db6b2edc05eb070d207b607cf8e3", "score": "0.63362324", "text": "public function putEdit(Request $request, $id){\n $causante = Causante::findOrFail($id);\n $causante->nombre = $request->nombre;\n $causante->tipo = $request->tipo;\n $causante->tipoCausante_id = $request->tipoCausante;\n $causante->save();\n $causantes = Causante::all();\n $resultado=\"Causante Modificado con éxito\";\n return View('/coordinador/causantes/indexCausantes', compact('resultado','causantes'));\n }", "title": "" }, { "docid": "4a027c08f9c28da4793be50a97346724", "score": "0.6335642", "text": "public function update(Request $request, Empresa $empresa,Categoria $categoria,Producto $producto)\n {\n $reglas=[\n 'nombre'=>'max:100',\n \n ];\n $this->validate($request,$reglas);\n $producto->fill($request->Only([ // en caso que al actualizar no entre uno de ellos, esta funcion only lo descarta, se usa cuenta de intersect\n 'nombre',\n 'precio',\n 'imagen',\n 'cantidad',\n 'marca',\n 'estado',\n 'descripcion',\n 'categoria_id',\n 'empresa_id'\n \n ])); \n\n if (!$producto->isDirty()) { //isDirty verifica si hubo un cambio enn olbejeto user, para\n return $this->errorResponse('se debe especificar almenos un valor diferente para actualizar',409);\n }\n $var=$empresa->nombre;\n if(Input::hasFile('imagen')){\n $file = Input::file('imagen');\n $file->move(public_path().\"/imagenes/$var/\",$file->getClientOriginalName());\n $producto->imagen= $file->getClientOriginalName();\n }\n \n $producto->save();\n return $this->showOne($producto,201);\n }", "title": "" }, { "docid": "ca26c0ec0c99c80ec863799c8c87ecea", "score": "0.63294345", "text": "public function update(Request $request, $id)\n {\n\n $data = request()->all();\n\n $this->validate(request(),[\n 'tipo_convenio' => 'required',\n 'fecha_inicio' => 'required',\n 'fecha_termino' => 'required|after:fecha_inicio',\n 'inputEvidencia' => 'required|file|image|mimes:jpeg,png,gif,webp,pdf|max:2048',\n 'convenio_id' => 'required',\n ]);\n\n $convenio = Convenio::findOrfail($id);\n\n $convenio->tipo_convenio = $data['tipo_convenio'];\n $convenio->fecha_inicio = $data['fecha_inicio'];\n $convenio->fecha_termino = $data['fecha_termino'];\n $convenio->organizacion_id = $data['convenio_id'];\n\n if(Arr::exists($data, 'inputEvidencia')){\n //Encontrar la direcion url guardada\n $url = $convenio->evidencia;\n // Transformar la direccion URL en direccion de directorio y borrar\n $location = str_replace(\"/storage\",\"public\",$url);\n \\Storage::delete($location);\n\n // Crear nuevo archivo\n $filename = 'evidencia-convenio-' . $id . '.' . $data['inputEvidencia']->getClientOriginalExtension();\n $file = $request->file('inputEvidencia')->storeAs('public/Convenio/'.$id.'/Evidencia',$filename);\n $evidenciaURL = \\Storage::url($file);\n $convenio->evidencia = $evidenciaURL;\n }\n\n $convenio->save();\n\n return $this->index();\n }", "title": "" }, { "docid": "3fc2534292b566cd6bb4fab4acbede2f", "score": "0.6318215", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n\n 'nilai' => 'required',\n 'deskripsi' => 'required',\n 'fotoSubtema' => 'image|nullable|max:1999',\n ]);\n\n $nilai = nilaiSubtema::find($id);\n $nilai->nilai = $request->input('nilai');\n $nilai->deskripsi = $request->input('deskripsi');\n //handle file upload\n if ($request->hasFile('fotoSubtema')) {\n //get filename with extension\n $filenameWithExt = $request->file('fotoSubtema')->getClientOriginalName();\n //get just file name\n $filename = pathinfo($filenameWithExt, PATHINFO_FILENAME);\n //get just ext\n $extension = $request->file('fotoSubtema')->getClientOriginalExtension();\n //filename to store\n $fileNameToStore = $filename . '_' . time() . '.' . $extension;\n //upload Image\n $path = $request->file('fotoSubtema')->storeAs('public/fotoSubtema', $fileNameToStore);\n if ($request->hasFile('fotoSubtema')) {\n Storage::delete('public/fotoSubtema/' . $nilai->fotoSubtema);\n }\n $nilai->fotoSubtema = $fileNameToStore;\n }\n $nilai->save();\n\n //menyimpan nilai subtema ke dalam nilai tema\n $tema = nilaiTema::where([\n ['idKelas', $nilai->idKelas],\n ['tema', $nilai->tema],\n ['mataPelajaran', $nilai->mataPelajaran],\n ])->first();\n if ($request->input('subtema') == '1' && $request->input('jenis') == 'pengetahuan') {\n $tema->p1 = $request->input('nilai');\n } else if ($request->input('subtema') == '2' && $request->input('jenis') == 'pengetahuan') {\n $tema->p2 = $request->input('nilai');\n } else if ($request->input('subtema') == '3' && $request->input('jenis') == 'pengetahuan') {\n $tema->p3 = $request->input('nilai');\n } else if ($request->input('subtema') == '1' && $request->input('jenis') == 'ketrampilan') {\n $tema->k1 = $request->input('nilai');\n } else if ($request->input('subtema') == '2' && $request->input('jenis') == 'ketrampilan') {\n $tema->k2 = $request->input('nilai');\n } else if ($request->input('subtema') == '3' && $request->input('jenis') == 'ketrampilan') {\n $tema->k3 = $request->input('nilai');\n }\n //menghitung nilai rata rata tema\n $pRata = ($tema->p3 + $tema->p2 + $tema->p1) / 3;\n $kRata = ($tema->k1 + $tema->k2 + $tema->k3) / 3;\n $tema->pRata = $pRata;\n $tema->kRata = $kRata;\n $tema->save();\n return redirect('/daftarNilaiSubtema')->with('success', 'nilai subtema telah dibuat!');\n\n return redirect('/daftarNilaiTema')->with('success', 'nilai tema berhasil diubah!');\n\n }", "title": "" }, { "docid": "cea629fadf2a9e271bfb9117c812dd59", "score": "0.6317467", "text": "public function update(Request $request, $id){\n $this->validate($request,[\n \"titulo\" => \"required|string\",\n \"eliminada\" => \"required|int\",\n \"contenido\" => \"required|string\",\n \"slug\" => \"required|string\"\n ]);\n // dd($request->all());\n if($request->hasFile('img_principal')){\n $archivo = $request->file('img_principal');\n $ext = strtolower($archivo->getClientOriginalExtension());\n $extValidas = ['jpg','jpeg','png'];\n\n if(in_array($ext, $extValidas)){\n $carpeta = 'assets/images/alimentos/';\n if(!file_exists(public_path() . '/' . $carpeta))\n mkdir(public_path() . '/' . $carpeta,0777,true);\n do{\n $nombre = \"\";\n $str = \"abcdefghijklmnopqrstuvwxyz0123456789\";\n for($i=0; $i<=16; $i++ ){\n $nombre .= substr($str, rand(0,strlen($str)-1) ,1 );\n }\n }while(file_exists(public_path() . '/' . $carpeta . $nombre . '.' . $ext));\n $nombre .= '.' . $ext;\n if($archivo->move(public_path() . '/' . $carpeta , $nombre)){\n $archivo = '/' . $carpeta . $nombre;\n\n }\n } \n }\n else\n $archivo = null;\n $evento = pagina::actualiza($id,$request,$archivo);\n $evento = $evento[0];\n if(!$evento){\n return redirect(url('/administrador/pagina_de_contenido.html'))->with('success','Página modificada correctamente');\n }\n else{\n return redirect(url('/administrador/pagina_de_contenido.html'))->with('error',$evento);\n }\n }", "title": "" }, { "docid": "52eb1e7f8faf58cf63453c7deff9be1b", "score": "0.6315431", "text": "public function update(Request $request, $id)\n {\n request()->validate([\n 'nombre1' => ['required','max:20', 'min:3'],\n \n 'ApPaterno' =>'required',\n 'ApMaterno' =>'required',\n 'clinica'=>'required',\n 'email'=>'required | unique:users',\n 'telefono'=>'required|alpha_num'\n\n \n ]);\n $asistente = \\App\\Asistente::find($id);\n //Imagen por defecto\n //Se revisa si se cargo una imagen, si no se cargo ninguna imagen, entonces deja almacenada la que ya se tenía \n if ($request->hasFile('imagen')) {\n $ruta = $request->imagen->store('Asistentes','public');\n $asistente->urlImagen = \"/storage/\".$ruta;\n }\n \n \n \n \n $asistente ->primer_nombre = $request->get('nombre1');\n $asistente ->apellido_paterno = $request->get('ApPaterno');\n $asistente ->apellido_materno = $request->get('ApMaterno');\n $asistente->clinica_id = $request->get('clinica');\n $asistente->correo=$request->get('email');\n $asistente->telefono=$request->get('telefono');\n $asistente->save();\n return redirect('/asistentes');\n }", "title": "" }, { "docid": "4158ab60fa648cb2ece3196c7b196b6c", "score": "0.63119006", "text": "public function update(Request $request, $id)\n {\n\n\n $file = $request->file('file');\n $extension = File::extension($file);\n\n $id_empresa=Auth::user()->empresa;\n $empresas= \\mensajeria\\empresa::on($id_empresa)->where('codigo','=',$id_empresa)->get();\n $empresas2 = \\mensajeria\\empresa::on($id_empresa)->find($empresas->last()->id);\n if (is_null($file))\n {\n\n }else {\n $nombre = $file->getClientOriginalExtension();\n $nuevo_nombre = substr(str_shuffle(\"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\"), 0, 20);\n $nuevo_nombre= $nuevo_nombre.\".\".$nombre;\n // echo $nuevo_nombre;\n \\Storage::disk('public')->put($nuevo_nombre, \\File::get($file)); # code...\n $empresas2->logo =$nuevo_nombre;\n }\n\n\n\n\n $empresas2->fill($request->all());\n $empresas2->save();\n\n return redirect('/empresa')->with('mensaje','update');\n\n }", "title": "" }, { "docid": "6eece627d998cb0a3a614a7b16867709", "score": "0.6307475", "text": "public function update(Request $request){\n // usando Product::find($idProduto)\n //Vai ser necessario usar rotas com parametro \n\n $produto = Produto::find($request->idProduct);\n\n if($request->hasFile('foto') && $request->file('foto')->isValid()) {\n $name = $request->file('foto')->getClientOriginalName();\n $fileName = \"/imagens/{$name}\";\n\n //salvando a foto no storage:\n $upload = $request->foto->storeAs('public/', $fileName);\n //salvando o caminho da foto no BD:\n $produto->foto = $fileName;\n }\n\n $produto->name = $request->nameProduct;\n $produto->description = $request->descriptionProduct;\n $produto->quantity = $request->quantityProduct;\n\n $produto->categoria = $request->categoriaProduct;\n \n $produto->price = $request->priceProduct;\n $produto->oferta = $request->ofertaProduct;\n\n $produto->gamer = $request->gamerProduct;\n $produto->pessoal1 = $request->pessoal1Product;\n $produto->pessoal2 = $request->pessoal2Product;\n $produto->profissional1 = $request->profissional1Product;\n $produto->profissional2 = $request->profissional2Product;\n $produto->profissional3 = $request->profissional3Product;\n $produto->profissional4 = $request->profissional4Product;\n $produto->status = $request->status;\n\n $result = $produto->save();\n\n return view('formUpdate', [\"result\"=>$result]);\n }", "title": "" }, { "docid": "50afd0df1005a4b626f781f143001d06", "score": "0.63014776", "text": "public function update(Request $request, Tema $tema)\n {\n\n $tema->update( $request->all() );\n\n return redirect()->route('temas.index')\n ->with('success', 'El tema fue actualizado con éxito');\n }", "title": "" }, { "docid": "5768f04b31f2232bd358d15ad14e0fe5", "score": "0.62994593", "text": "public\n function update(Request $request, Articulo $articulo)\n {\n //\n }", "title": "" }, { "docid": "e747cd996921f253724222ebece7244f", "score": "0.62993413", "text": "public function update(Request $request,$id)\n {\n $data = request()->all();\n $request->validate([\n 'nombre_asign' => 'required',\n 'periodo' => 'required',\n 'cant_estudiantes'=> 'required',\n 'nombre_profesor' => 'required',\n 'nombre_profesor.*' => 'required',\n 'organizacion_id.*' => 'required',\n 'inputEvidencia.*' => 'required|required_with:organizacion_id.*|file|image|mimes:jpeg,png,gif,webp,pdf|max:2048',\n\n ]);\n $actividadASP= ActividadASP::findOrFail($id);\n\n $actividadASP->asignatura= $data['nombre_asign'];\n $actividadASP->periodo = $data['periodo'];\n $actividadASP->cant_estudiantes = $data['cant_estudiantes'];\n\n //Borrar los arreglos actuales y subirlos denuevo\n\n $actividadASP->profesores()->delete();\n foreach ($data['nombre_profesor'] as $profesor){\n ActividadASPProfesor::create([\n 'actividad_asp_id' => $id,\n 'nombre_profesor' => $profesor,\n ]);\n }\n\n //Borrar el listado de fotos y subirlo denuevo\n\n $contEvidencias = 0;\n // Borrar Archivos antiguos basandose en sus direcciones\n\n // Borrar las Relaciones a la tabla fotografias\n if(Arr::exists($data, 'inputEvidencia')) {\n $organizacionesMine = $actividadASP->organizaciones()->get();\n foreach($organizacionesMine as $org){\n $evidencias[] = $org->pivot->evidencia;\n //Encontrar la direcion url guardada\n $url = $org->pivot->evidencia;\n // Transformar la direccion URL en direccion de directorio y borrar\n $location = str_replace(\"/storage\",\"public\",$url);\n \\Storage::delete($location);\n }\n\n $actividadASP->organizaciones()->detach();\n // Re subir los archivos\n\n foreach ($data['inputEvidencia'] as $key => $evidencia) {\n $filename = 'evidencia-asp-' . $id . '-' . ($key + 1) . '.' . $evidencia->getClientOriginalExtension();\n $file = $evidencia->storeAs('public/AprendisajeServicio/' . $id . '/Evidencia', $filename);\n $evidenciaURL = \\Storage::url($file);\n $evidenciasURLS[] = $evidenciaURL;\n }\n\n foreach ($evidenciasURLS as $key => $URLEVI) {\n ActividadASP_Organizacion::create([\n 'actividadasp_id' => $id,\n 'organizacion_id' => (($data['organizacion_id'])[$key]),\n 'evidencia' => $URLEVI,\n ]);\n }\n }\n $actividadASP->save();\n\n\n return $this->index();\n\n }", "title": "" }, { "docid": "ad52ce80ac76add08491e6306baeef22", "score": "0.62964314", "text": "public function update(Request $request, Archivo $archivo)\n {\n //\n }", "title": "" }, { "docid": "e80a7df0fda8421f774ba5f0dfe7ab03", "score": "0.6285307", "text": "public function editar(Request $request) {\n $id = $request->input('id_convocatoria');\n $convocatoria = Convocatoria::find($id);\n $convocatoria->update($request->all());\n\n //Se elimina la imagen anterior (en caso de haberse cambiado)\n $file = $request->file('imagen');\n if(isset($file)) {\n FileUtils::eliminar($convocatoria->ruta_imagen);\n $convocatoria->ruta_imagen = FileUtils::guardar($file, 'storage/convocatorias/', 'conv_');\n }\n\n //Se revisan los documentos que hay que eliminar\n $idsEliminar = \\GuzzleHttp\\json_decode($request->input('input-deleted-docs'));\n for($i = 0, $max = count($idsEliminar); $i < $max; $i++) {\n $documento = Documento::find($idsEliminar[$i]);\n $documento->delete();\n }\n\n //Se revisan los documentos que hay que actualizar\n if($request->input('doc-id')){\n foreach($request->input('doc-id') as $index => $id_documento) {\n //Se revisa si existe el documento\n $documento = Documento::find($id_documento);\n $titulo = $request->input('doc-titulo')[$index];\n $file = $request->file('doc-file-' . $id_documento);\n\n $documento->titulo = $titulo;\n if(isset($file)) {\n FileUtils::eliminar($documento->ruta_documento);\n $documento->ruta_documento = FileUtils::guardar($file, 'storage/docs/', 'doc_');//Actualizando el formato\n $formato = Formato::where('nombre',$file->getClientOriginalExtension())->get()->first();\n $documento->id_formato = isset($formato->id_formato) ? $formato->id_formato : Formato::OTRO; //El 5 representa otro formato\n }\n $documento->save();\n }\n }\n\n //Se cargan los nuevos documentos\n $titulos = $request->input('doc-titulo-nuevo');\n $files = $request->file('doc-file-nuevo');\n if(isset($files)) {\n foreach ($files as $index => $file) {\n $rutaDoc = FileUtils::guardar($file, 'storage/docs/', 'doc_');\n //Actualizando el formato\n $formato = Formato::where('nombre', $file->getClientOriginalExtension())->get()->first();\n $idFormato = isset($formato->id_formato) ? $formato->id_formato : Formato::OTRO; //El 5 representa otro formato\n Documento::create(array(\n 'titulo' => $titulos[$index],\n 'ruta_documento' => $rutaDoc,\n 'id_formato' => $idFormato,\n 'id_convocatoria' => $convocatoria->id_convocatoria\n )\n );\n }\n }\n $convocatoria->save();\n return redirect('/convocatorias/editar/'.$convocatoria->id_convocatoria);\n }", "title": "" }, { "docid": "c6aa8b5def89095b8a845707ad34c2a8", "score": "0.6276137", "text": "public function update(Request $request, $id)\n {\n try{\n $objetivo = Objective::find($id);\n $objetivo->nombre = $request->nombre;\n $objetivo->peso = $request->peso;\n $objetivo->descripcion = $request->descripcion;\n $objetivo->ability_id = $request->ability_id;\n\n if($objetivo->save()){\n \\Alert::message('Objetivo actualizado correctamente', 'success');\n return redirect(\"/objetivos\");\n }else{\n \\Alert::message('Ocurrio un error, intente nuevamente', 'danger');\n return view(\"objetives.edit\",[\"objetivo\" => $objetivo]);\n }\n }catch(Exception $e){\n \\Alert::message('ocurrio un error, por favor revise el log', 'danger');\n \n $archivo = fopen(\"storage/objetivos_log.txt\", \"a\");\n fwrite($archivo, \"===================== ERROR ===========================\");\n fwrite($archivo, \"\\r\\n\". $e->getMessage().\"\\r\\n\");\n fwrite($archivo, \"=======================================================\");\n fclose($archivo);\n return redirect('/objetivos');\n }\n }", "title": "" }, { "docid": "8908a2e1d62d1875a241a3e88273d243", "score": "0.62692106", "text": "public function update(Request $request, Tipoentrega $tipoentrega)\n {\n //\n }", "title": "" }, { "docid": "1f7ebd6916f98dd6ef0fada5479f8b9f", "score": "0.626243", "text": "public function update(Request $request)\n {\n //\n $id = $request->id;\n\n $update= $this->imposto->where(['id'=>$id])->update([\n 'descricao'=>$request->descricao,\n 'percentagem'=>$request->percentagem\n \n ]);\n if($update){\n echo'Os dados foram alterados com sucesso';\n\n\n }else {\n echo'Houve erro ao atualizar os dados';\n }\n\n }", "title": "" }, { "docid": "447a2a1d01430d2002bfb095534eea40", "score": "0.62556", "text": "public function edit(StorageRental $storageRental)\n {\n //\n }", "title": "" }, { "docid": "f9f31d95d563d10cb3bce4e04b545179", "score": "0.6248968", "text": "public function update(Request $request, $id)\n {\n $reglas = [\n 'nombre' => 'required|string',\n 'imagen' => 'required|file',\n 'descripcion' =>'required|string|max:200',\n 'precio' => 'required|integer',\n 'stock' => 'required|integer',\n 'categoria_id' => 'required|integer'\n ];\n\n $errors = [\n 'required' => 'El campo :attribute es requerido',\n 'string' => 'El campo :attribute debe ser un texto',\n 'max' => 'El campo :attribute tiene mas :max letras',\n 'integer' => 'El campo :attribute debe ser un numero entero'\n ];\n\n $this->validate($request, $reglas, $errors);\n\n $producto = Producto::find($id); \n $ruta = $request->file('imagen')->store('public');\n $nombreImagen = basename($ruta);\n $producto->imagen = $nombreImagen;\n $producto->nombre = $request['nombre'];\n $producto->descripcion = $request['descripcion'];\n $producto->precio = $request['precio'];\n $producto->stock = $request['stock'];\n $producto->categoria_id = $request['categoria_id'];\n\n $producto->save();\n\n return redirect('/admin/producto')->with(compact('producto'));\n }", "title": "" }, { "docid": "ece5fdf7fcf419c074b280f62ebba6ee", "score": "0.62432325", "text": "public function update(Request $request, noticiaint $noticiasint)\n {\n \n $request->validate([\n 'titulo'=>'required',\n 'noticia'=>'required' \n ]);\n\n $entrada=$request->all();\n if ($request->file('file')) {\n $url = Storage::put('post1', $request->file('file'));\n $entrada['url']=$url ; \n \n }\n\n $noticiasint->update($entrada);\n return redirect()->route('admin.noticiasints.index');\n\n }", "title": "" }, { "docid": "693572382749767efcc257ef947e8182", "score": "0.62287754", "text": "public function update(Request $request, $id)\n {\n $empresas = Empresa::find($id);\n $administracion = Configuracion::Search()->where('codigo', '=', \"ADMIN\")->first();\n $inscripcion = Configuracion::Search()->where('codigo', '=', \"INSCRI\")->first();\n $user = $empresas->id_usuario;\n\n $empresas->nit = $request->nit;\n $empresas->nombre = $request->nombre;\n $empresas->nombre_contacto = $request->nombre_contacto;\n $empresas->telefono_contacto = $request->telefono_contacto;\n $empresas->email = $request->email;\n $empresas->id_ciudad = $request->id_ciudad;\n $empresas->direccion = $request->direccion;\n $empresas->estado = $request->estado;\n $empresas->beneficio = $request->beneficio;\n if (isset($request->inscripcion)) {\n $empresas->inscripcion = $request->inscripcion;\n } else {\n $empresas->inscripcion = $inscripcion->valor;\n }\n\n if (isset($request->administracion)) {\n $empresas->administracion = $request->administracion;\n } else {\n $empresas->administracion = $administracion->valor;\n }\n $empresas->id_usuario = $request->id_usuario;\n $empresas->fecha_ingreso = $request->fecha_ingreso;\n $empresas->observacion = $request->observacion;\n $empresas->id_usuario = $user;\n\n $empresas->save();\n\n $empresa = $empresas->id;\n\n return redirect()->route('empresa.show', compact('empresa'))\n ->with('info', 'El empresa fue actualizado');\n }", "title": "" }, { "docid": "8d9be1cd2862ea5ddc87e1e1bee9e734", "score": "0.6221533", "text": "public function update(Request $request, $id)\n {\n echo $request;\n $this->validate($request,[\n 'titulo' => 'required',\n 'fecha' => 'required',\n 'lugar' => 'required',\n 'costo' => 'required',\n 'facultad_nomb' => 'required',\n 'descripcion' => 'required',\n ]);\n\n $eventos = Evento::find($id);\n $eventos->titulo= $request->input('titulo');\n $eventos->fecha= $request->input('fecha');\n $eventos->hora= $request->input('hora');\n $eventos->lugar= $request->input('lugar');\n $eventos->costo= $request->input('costo');\n $eventos->facultad_nomb= $request->input('facultad_nomb');\n $eventos->descripcion= $request->input('descripcion');\n\n if($request->hasFile('imagen')){\n if ($eventos->imagen === 'post-placeholder.jpg')\n {\n }else {\n unlink(public_path().'/imagenes/eventos/'.$eventos->imagen);\n }\n $file = $request->file('imagen');\n $name_image = time().$file->getClientOriginalName();\n $file->move(public_path().'/imagenes/eventos/',$name_image);\n $eventos->imagen = $name_image;\n\n }\n\n $eventos->save();\n return back()->with('success','Los datos del evento ' . $eventos->titulo . ' se han actualizado exitosamente.'); \n }", "title": "" }, { "docid": "dfdad90b35e29da7bb2f7576eef44b07", "score": "0.62132466", "text": "public function update(EstadocivilRequest $request, $id)\n {\n $datoset = EstadoCivilModel::find($id);\n $datoset->etiqueta = strtoupper($request->input('etiqueta')); \n $datoset->id_usu_mod = Auth::user()->id; \n $datoset->save();\n return redirect('/admin/estadocivil/'); \n }", "title": "" }, { "docid": "6663642fdba7b2fd8d82b85a588e5777", "score": "0.62117606", "text": "public function edit(Request $request, Temporada $temporada)\n {\n var_dump($temporada->episodios);\n }", "title": "" }, { "docid": "997df0b4ae6dd980e5c3dcfdc62cedd2", "score": "0.6206572", "text": "public function update(RecetaRequest $request)\n {\n $receta = Recetas::find($request->id);\n $receta->peso = $request->peso;\n $receta->save();\n return redirect()->route('receta.index',$request->events_id)->with('info','Receta actualizada con exito');\n }", "title": "" }, { "docid": "f989aa133b456c2bbfc2cf38828a5d06", "score": "0.62031925", "text": "public function update(Request $request, Receta $receta){\n\n // Revisar policy\n $this->authorize('update', $receta);\n\n // Realizar validación\n $data = $request->validate([\n 'titulo' => 'required|min:6',\n 'categoria' => 'required|integer',\n 'preparacion' => 'required',\n 'ingredientes' => 'required',\n ]);\n\n // Asignar los cambios\n $receta->titulo = $data['titulo'];\n $receta->ingredientes = $data['ingredientes'];\n $receta->preparacion = $data['preparacion'];\n $receta->categoria_id = $data['categoria'];\n\n // Si se sube nueva imagen\n if($request['imagen']){\n // Subir imágenes al servidor\n $rutaImagen = $request['imagen']->store('upload-recetas', 'public');\n\n // Resize de la imagen\n $img = Image::make(public_path(\"storage/{$rutaImagen}\"))->fit(1000, 550);\n $img->save();\n\n // Asignar al objeto\n $receta->imagen = $rutaImagen;\n }\n\n // Guardar los cambios\n $receta->save();\n\n return redirect()->action('RecetaController@index');\n }", "title": "" }, { "docid": "1f4edf752acad4a46da361b5d62e385e", "score": "0.6190316", "text": "public function update(Request $request, $id)\n {\n $rules = [\n 'empresa' => 'required|unique:tbl_empresas,empresa,'.$id,\n 'email' => 'required|unique:tbl_empresas,empresa,'.$id,\n 'ciudad' => 'required|',\n 'direccion' => 'required|',\n 'telefono' => 'required|numeric|',\n 'persona_contacto' => 'required|',\n 'website' => 'required|',\n 'imagen' => 'image',\n ];\n\n $data = [\n 'empresa.required' => 'El nombre de la empresa no debe estar vacio',\n 'empresa.regex' => 'El nombre es invalido',\n 'empresa.unique' => 'El nombre de la empresa ya existe',\n 'email.required' => 'El email no debe estar vacio',\n 'email.unique' => 'El correo ya esta en uso',\n 'ciudad.required' => 'El campo ciudad no debe estar vacio',\n 'direccion.required' => 'El campo direccion no debe estar vacio',\n 'telefono.required' => 'El campo telefono no debe estar vacio',\n 'telefono.numeric' => 'El telefono deben ser numeros',\n 'persona_contacto.required' => 'El campo telefono no debe estar vacio',\n 'website.required' => 'El campo website no debe estar vacio',\n 'imagen.image' => 'El archivo no es valido',\n ];\n\n $validar = Validator::make($request->all(),$rules,$data);\n\n if($validar->fails())\n {\n return redirect()->back()\n ->withErrors($validar->errors())->withInput();\n }else{\n\n $empresa = Empresa::find($id);\n $empresa->empresa = $request->empresa;\n $empresa->email = $request->email;\n $empresa->ciudad = $request->ciudad;\n $empresa->direccion = $request->direccion;\n $empresa->telefono = $request->telefono;\n $empresa->website = $request->website;\n $empresa->persona_contacto = $request->persona_contacto;\n $empresa->save();\n \n $destinationPath = 'imagenes/empresas/';\n\n\n $file = Input::file('imagen');\n if($file){\n $filename =uniqid().\".\".$file->getClientOriginalExtension();\n $imagename =$destinationPath.$filename;\n if($file->move($destinationPath,$filename))\n {\n $empresa->imagen = $imagename;\n }\n }\n\n $empresa->save();\n \n\n return redirect('/empresas');\n }\n \n\n }", "title": "" }, { "docid": "5b047e2a148d81fe97f839d664f9c660", "score": "0.6185415", "text": "public function update(EscritorioFormRequest $request, $id)\n {\n $dataForm = $request->all();\n $escritorio = $this->escritorio->find($id);\n $update = $escritorio->update($dataForm);\n \n if ( $update )\n return redirect()->route('home');\n else\n //- return redirect()->back(); \n return redirect()->route('home',$id)->with(['errors' => 'Falha ao editar']);\n }", "title": "" }, { "docid": "309f769e4c3e4ed21532df1d6f549ea0", "score": "0.61851394", "text": "public function update(Request $request)\n {\n \n\n $input = $request->all();\n $id=$input['dato'];\n\n if(empty($input['archivo'])){\n \n unset($input['archivo']);\n }else{\n \n $nom_doc=$request->file('archivo')->getClientOriginalName();\n $file_img = $request->file('archivo');\n $img = Storage::url($file_img->store('comentarios_hallazgo', 'public'));\n $imgp = strpos($img,'/storage/');\n $img = substr($img, $imgp, strlen($img));\n $input['archivo']=$img;\n $input['nom_doc']=$nom_doc;\n\n } \n\n $input['comentarios']=$input['cometarios'];\n\n $infoComentarios = $this->infoComentariosRepository->find($id);\n\n $infoComentarios = $this->infoComentariosRepository->update($input, $id);\n\n return redirect()->back();\n }", "title": "" }, { "docid": "79d80ff4a7f69ed4319dd1494e3a15d2", "score": "0.6184493", "text": "public function update(Request $request, Alumno $alumno)\n {\n $alumno->update($request->all());\n\n if($request->file('foto')){ //si se manda el archivo\n $path=Storage::disk('public')->put('image', $request->file('foto'));\n //utiliza la funcion de guardar en public crea la carpeta image y pasa el archivo\n $alumno->fill(['foto' => asset($path)])->save(); //actualizame la ruta en el post\n //el asset toma toda la ruta y se genera correctamente toda la ruta\n }\n return redirect()->route('alumnos.index')\n ->with('info','Alumno actualizado con exito');\n }", "title": "" }, { "docid": "ff21d5ee48ab30ce439830ac53b8e54c", "score": "0.618186", "text": "public function update(Request $request, $id)\n {\n $usuario = User::find($id);\n\n $usuario->id = $request->id;\n $usuario->nombre = $request->nombre;\n $usuario->apellido = $request->apellido;\n $usuario->genero = $request->genero;\n $usuario->direccion = $request->direccion;\n $usuario->telefono = $request->telefono;\n $usuario->email = $request->email;\n $usuario->password = bcrypt($request->password);\n $usuario->tipo = $request->tipo;\n\n if($request->file('imagen'))\n {\n //Inicio Imagen\n $file = $request->file('imagen');\n $name = $request->apellido . '_' . $request->nombre . '_' . $request->id . '.' . $file->getClientOriginalExtension();\n $path = public_path() . '\\plugin\\imagenes';\n //Storage::delete(public_path() . $usuario->imagen);\n $file->move($path, $name);\n //Fin Imagen \n $usuario->imagen = $name; \n }else{\n if ($request->genero == 'masculino') {\n $usuario->imagen = 'masculino.png';\n }else{\n $usuario->imagen = 'femenino.png';\n }\n }\n\n $usuario->save();\n\n Flash::warning(\"Se ha Editado El Empleado \" . $request->nombre . ' ' . $request->apellido);\n return redirect()->route('admin.empleados.index');\n //dd($id);\n }", "title": "" }, { "docid": "045d8af25d18487454e2984d2d77d93f", "score": "0.6165509", "text": "public function update(ContratoFormRequest $request, Contrato $contrato)\n {\n $file = $request->file('nombrearchivo');\n $nombrearchivo_anterior = $request->nombrearchivo_anterior;\n $personanatural_anterior = $request->personanatural_anterior;\n $fileName = date(\"dmY\"). '-'. time().'.'.$file->getClientOriginalExtension();\n \n $contratos = $contrato->update($request->except('nombrearchivo', 'personanatural_anterior')\n + ['nombrearchivo' => $fileName]);\n \n $path = $file->storeAs(self::PATH. $request->personanatural_id, $fileName);\n $result = $this->deleteFile($personanatural_anterior, $nombrearchivo_anterior);\n if (Storage::exists($path)){\n return redirect()->route('contrato.index')\n ->with('success',['Contrato actualizado', \n 'Archivo previo borrado completamente: '. $nombrearchivo_anterior,\n 'Se carga nuevo archivo: '. $fileName]);\n }else{\n return redirect()->route('contrato.edit')\n ->with('success',['Error no se escribio archivo en disco']);\n }\n }", "title": "" }, { "docid": "ef4102f2d848506692bc67025a932964", "score": "0.61623925", "text": "public function update(EmpleadoFormReques $request, $id)\n {\n //\n \n $empleado=empleados::findOrFail($id);\n $empleado->PRIMER_NOMBRE=$request->get('PRIMER_NOMBRE');\n $empleado->SEGUNDO_NOMBRE=$request->get('SEGUNDO_NOMBRE');\n $empleado->PRIMER_APELLIDO=$request->get('PRIMER_APELLIDO');\n $empleado->SEGUNDO_APELLIDO=$request->get('SEGUNDO_APELLIDO');\n $empleado->ID_CARGO=$request->get('ID_Cargo');\n $empleado->NO_INSS=$request->get('NO_INSS');\n $empleado->CEDULA=$request->get('CEDULA');\n $empleado->DIRECCION=$request->get('DIRECCION');\n $empleado->ANIOS_EXPERIENCIA=$request->get('ANIOS_EXPERIENCIA');\n $empleado->ESTADO_CIVIL=$request->get('ESTADO_CIVIL');\n $empleado->Email=$request->get('Email');\n $empleado->Telefono=$request->get('Telefono');\n $empleado->Celular=$request->get('Celular');\n $empleado->FECHA_INGRESO=$request->get('FECHA_INGRESO');\n $empleado->Salario_Base=$request->get('Salario_Base'); \n $empleado->ID_ESTADO=$request->get('ID_ESTADO'); \n //$empleado->ID_User=$request->get('ID_User'); \n \n $empleado->Cod_Empleado=$request->get('Cod_Empleado'); \n //$empleado->Sindicalizado=$request->get('Sindicalizado'); \n $Sindicalizado=$request->get('Sindicalizado');\n if ($Sindicalizado == 'on')\n {\n $empleado->Sindicalizado='1';\n }\n \n else\n \n {\n $empleado->Sindicalizado='0';\n }\n $SalarioVariable=$request->get('Salario_V');\n if ($SalarioVariable == 'on')\n {\n $empleado->Salario_V='1';\n }\n \n else\n \n {\n $empleado->Salario_V='0';\n }\n $empleado->update();\n\n \n return Redirect::to('/empleados');\n }", "title": "" }, { "docid": "6f4c58635040241bf39f8b4ced4fe0d9", "score": "0.61614585", "text": "public function updateAction(Request $request, $id)\n {\n if (!$this->get('security.context')->isGranted('ROLE_ADMIN') ) {\n return $this->redirect($this->generateUrl('error'), 302); \n }\n $user = $this->get('security.context')->getToken()->getUser(); \n\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('SytemSGBundle:DadosArquivos')->find($id);\n \n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find DadosArquivos entity.');\n }\n \n $deleteForm = $this->createDeleteForm($id);\n $editForm = $this->createEditForm($entity);\n $editForm->handleRequest($request);\n\n //Validação ip\n $campos = $request->request->all()[\"sytem_bundle_sgbundle_dadosarquivos\"];\n $ip = $campos['ip'];\n $resp =$request->get('responsavel');// $campos['responsavel'];\n $usuario=$request->get('usuario'); //$campos['usuario'];\n \n\n if ($editForm->isValid()) {\n $ipValidate=explode(\".\",$ip);\n\n $ipValidate[0];\n $ipValidate[1];\n $ipValidate[2];\n $ipValidate[3];\n $ipfaixa=$ipValidate[0].\".\".$ipValidate[1].\".\".$ipValidate[2];\n\n $em2 = $this->getDoctrine()->getManager();\n if(!preg_match('/^([0-9]{11})$/',$resp, $matches )||!preg_match('/^([0-9]{11})$/',$usuario, $matches )){\n $this->get('session')->getFlashBag()->add('message','Este valor não é um cpf.');\n $json=json_decode(json_encode($this->ipsValidos(),JSON_FORCE_OBJECT),true);\n return $this->render('SytemSGBundle:DadosArquivos:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n 'json' => $json,\n ));\n }\n if(preg_match('/^([0-9]{11})$/',$resp, $matches ) && preg_match('/^([0-9]{11})$/',$usuario, $matches )){\n if(!$em2->getRepository('SytemSGBundle:Usuariosystem')->findOneByCpf($resp) ){\n if(($this->searchldap($resp/*Request $request*/)!==TRUE) ){\n $this->get('session')->getFlashBag()->add('message','O cpf não existe no ldap ou não há conexão.'.$resp);\n $json=json_decode(json_encode($this->ipsValidos(),JSON_FORCE_OBJECT),true);\n return $this->render('SytemSGBundle:DadosArquivos:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n 'json' => $json,\n ));\n }\n }\n if(!$em2->getRepository('SytemSGBundle:Usuariosystem')->findOneByCpf($usuario)){\n \n if(($this->searchldap($usuario/*Request $request*/)!==TRUE) ){\n $this->get('session')->getFlashBag()->add('message','O cpf não existe no ldap ou não há conexão.'.$usuario);\n $json=json_decode(json_encode($this->ipsValidos(),JSON_FORCE_OBJECT),true);\n return $this->render('SytemSGBundle:DadosArquivos:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n 'json' => $json,\n ));\n }\n }\n }\n if(!$em2->getRepository('SytemSGBundle:Intervalosips')->findOneByIntervalo($ipfaixa)){\n $this->get('session')->getFlashBag()->set('message','O Ip: '.$ip.' informado para atualização não pertence a faixa de ips cadastrados.');\n $json=json_decode(json_encode($this->ipsValidos(),JSON_FORCE_OBJECT),true);\n return $this->render('SytemSGBundle:DadosArquivos:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n 'json' => $json,\n \n ) );\n\n }\n if($em2->getRepository('SytemSGBundle:Ipsexcecoes')->findOneByIpexcecao($ip)){\n $this->get('session')->getFlashBag()->set('message','O Ip: '.$ip.' informado para atualização não pode ser usado pois esta reservado para dispsitivos como impressoras.');\n $json=json_decode(json_encode($this->ipsValidos(),JSON_FORCE_OBJECT),true);\n return $this->render('SytemSGBundle:DadosArquivos:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n 'json' => $json,\n \n ) );\n\n }\n $file= $editForm['filemove']->getData();\n if(is_null($file)){ \n if($usuario!='90000000009'||$usuario!='10000000001'||$usuario!='11111111111'){ //echo $this->validatermo($usuario); exit();\n if($this->validatermo($usuario,$entity->getMac())==0){\n $this->get('session')->getFlashBag()->add('message','O usuário especificado ainda não enviou o termo de compromisso.');\n $json=json_decode(json_encode($this->ipsValidos(),JSON_FORCE_OBJECT),true);\n return $this->render('SytemSGBundle:DadosArquivos:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n 'json' => $json,\n ));\n\n }\n } \n } \n \n if ($file) \n { \n \n $path=$this->patchupload();\n $pdf = DadosArquivosType::processFile($file, $entity,$path);\n $entity->setFile( $path.$pdf);\n } \n $resp1=$em->getRepository('SytemSGBundle:Usuariosystem')->findOneByCpf($resp);\n $user1=$em->getRepository('SytemSGBundle:Usuariosystem')->findOneByCpf($usuario); \n $entity->setResponsavel($resp1); \n $entity->setUsuario($user1); \n\n $this->ReturnUser2($user,$entity); \n $em->flush();\n //$this->FilesARPandDHCP();\n $this->get('session')->getFlashBag()->add('message','1 - Atualização feita com sucesso!! Clique em voltar para ter acesso a todos dados.');\n $results2=array();\n $results=array(); \n $results2=$this->ExecDHCPARPShells();\n $this->get('session')->getFlashBag()->add('message',$results2[0]);\n $this->get('session')->getFlashBag()->add('message',$results2[1]);\n \n $results=$this->ExecShells();\n $this->get('session')->getFlashBag()->add('message',$results[0]);\n $this->get('session')->getFlashBag()->add('message',$results[1]);\n $this->get('session')->getFlashBag()->add('message',$results[2]);\n $this->get('session')->getFlashBag()->add('message',$results[3]);\n\n return $this->redirect($this->generateUrl('dadosarquivos'));\n \n }\n $json=json_decode(json_encode($this->ipsValidos(),JSON_FORCE_OBJECT),true);\n \n return $this->render('SytemSGBundle:DadosArquivos:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n 'json' => $json,\n \n ) );\n\n //}\n // }\n \n //return $this->render('SytemSGBundle:Login:login.html.twig',array('erro' => \"Acesso Negado!!!\", )); \n \n }", "title": "" }, { "docid": "3df815ca451e289b6995be62b743a54e", "score": "0.6160709", "text": "public function index_put($etu) {\n $this->load->model('Etudiant_DB');\n $input = $this->put();\n $this->Etudiant_DB->modify($input, $etu);\n $this->response(['Informations updated successfully.'], REST_Controller::HTTP_OK);\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.61576337", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.61576337", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "1bc0e3700e1377995a06a07e2a72c900", "score": "0.615265", "text": "public function update(ValidarFormularios $request, $id)\n {\n //\n $estudiante=Estudiante::findOrFail($id);\n if ($archivo = Estudiante::setArchivo($request->archivo_up,$estudiante->archivo))\n $request->request->add(['archivo' => $archivo]);\n $estudiante->update($request->all());\n return redirect('vista/estudiante')->with('mensaje', 'Estudiante actualizado con exito');\n }", "title": "" }, { "docid": "ff3e0acbc61b4b1bbaa83f9f595d7684", "score": "0.61523575", "text": "public function update(Request $request, $id)\n {\n\n $arquivo = file_get_contents(storage_path('app/registros.json'));\n $array = collect(json_decode($arquivo, true));\n $input = $array->map(function ($registro, $key) use ($request, $id) {\n if ($registro['id'] == $id) {\n $registro['id'] = $request->id;\n $registro['name'] = $request->name;\n $registro['email'] = $request->email;\n }\n return $registro;\n });\n $dados_json = json_encode($input);\n Storage::put('registros.json', $dados_json);\n return redirect()->back()->with('updated', 'Registro atualizado');\n }", "title": "" }, { "docid": "0e4b50abb27bfa56e821b930fdb34d58", "score": "0.6140082", "text": "public function update(Request $request)\n {\n $regla = ['prdImagen' => 'required|file|image|mimes:jpg,jpeg,png,bmp,gif,svg'];\n $mensaje = ['image' => 'Las extenciones admitidas son JPG, JPEG, PNG, BMP, GIF y SVG. <br> por favor vuelva a intentarlo'];\n //validacion\n $this->validate($request,$regla,$mensaje );\n $ruta = $request->file('prdImagen')->store('public');\n $nombreImagen = basename($ruta);\n\n $Producto = Producto::find($request->input('idProducto'));\n $Producto->prdNombre = $request['prdNombre'];\n $Producto->prdPrecio = $request['prdPrecio'];\n $Producto->marca = $request['idMarca'];\n $Producto->categoria = $request['idCategoria'];\n $Producto->prdStock = $request['prdStock'];\n $Producto->prdPresentacion = $request['prdPresentacion'];\n $Producto->prdImagen = $nombreImagen;\n $Producto->save();\n return redirect('/adminProductos')\n ->with('mensaje', 'Producto '.$Producto->prdNombre.' modificada con éxito');\n\n }", "title": "" }, { "docid": "ef94097d878714a9a419e772a2888309", "score": "0.61392283", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n\n 'nombre' => 'required|string|max:255',\n 'archivo' => 'required'\n\n ]);\n $now = new \\DateTime();\n $fecha = $now->format('Ymd-His');\n $archivo = $request->file('archivo');\n $organizacion = $request->get('nombre');\n $nombre = \"\";\n\n if ($archivo) {\n $extension = $archivo->getClientOriginalExtension();//extension del archivo\n $nombre = \"vinculacion-\" . \"$organizacion\" . \"-\" . $fecha . \".\" . $extension;\n \\Storage::disk('local')->put($nombre, \\File::get($archivo));\n }\n\n $vinculo=Vinculacion::find($id);\n $vinculo->nombre = $request->get(\"nombre\");\n if ($archivo) {\n $vinculo->archivo = $nombre;\n }\n $vinculo->save();\n return redirect()->route('vinculacion.index');\n }", "title": "" }, { "docid": "249918ebc7e8e97236addfa4ef8850fa", "score": "0.6138778", "text": "public function update(Request $request, $id_espe)\n {\n\n/**\n * [$campos description]\n * @var [string]\n */\n $campos=[\n 'rut_espe' => 'required|string|max:100',\n 'nom_espe' => 'required|string|max:100',\n 'apePat_espe' => 'required|string|max:100',\n 'apeMat_espe' => 'required|string|max:100',\n 'email_espe' => 'required|email',\n 'especialidad' => 'required|string|max:100',\n ];\n /**\n * [$Mensaje mensaje de error]\n * @var array\n */\n $Mensaje=[\"required\"=>'El :attribute es requerido'];\n $this->validate($request,$campos,$Mensaje);\n\n $datosEspecialista=request()->except(['_token','_method']);\n\n Especialistas::where('id_espe','=',$id_espe)->update($datosEspecialista);\n\n $especialista= Especialistas::findOrFail($id_espe);\n return redirect('especialistas');\n }", "title": "" }, { "docid": "d71b3fc15e3863a28be7e4ccb1ffe643", "score": "0.6136788", "text": "public function update(Request $request)\n {\n $book = Book::find($request->book_id);\n $item = Item::find($request->id);\n $item->n_ejemplar = $request->n_ejemplar;\n $item->n_registro = $request->n_registro;\n $item->cbn = $request->cbn;\n $item->estado_item = $request->estado_item;\n $item->save();\n $request->session()->flash('Éxito','Se ha actualizado el Ejemplar '.$item->id.\" del libro \".$book->titulo);\n parent::saveOperation(\"Inicio\",\"Registro\",\"Actualizado el ejemplar \".$item->id.\" del libro\".$book->titulo.\"ID de libro \".$request->book_id);\n return redirect('ejemplares/'.$item->book_id);\n }", "title": "" }, { "docid": "f69913a9b9c97d92197a705d0d8eb7aa", "score": "0.6119948", "text": "public function update(Request $request, Tematica $tematica)\n {\n $this->validate($request, [\n 'nombre' => 'required|string|min:4',\n ]);\n\n $tema = Tematica::find($tematica->id);\n $tema->nombre = $request->nombre;\n $tema->save();\n\n return redirect('/tematicas/' . $tematica->id)->with('success','La temática se ha modificado correctamente');\n }", "title": "" }, { "docid": "8a8e68beaeabe1434dccfe2a30e32ffd", "score": "0.6112882", "text": "public function edit(Empresa $empresa)\n {\n //\n }", "title": "" }, { "docid": "8a8e68beaeabe1434dccfe2a30e32ffd", "score": "0.6112882", "text": "public function edit(Empresa $empresa)\n {\n //\n }", "title": "" }, { "docid": "8aa75ed029cdbeb53da0c762b626c73d", "score": "0.6111839", "text": "public function update(Request $request, $id)\n {\n $dados = AlimentacaoAve::find($id);\n $dados->data = ($request->data) ? $request->data : $dados->data;\n $dados->hora = ($request->hora) ? $request->hora : $dados->hora;\n $dados->tipo_racao = ($request->tipo_racao) ? $request->tipo_racao : $dados->tipo_racao;\n $dados->observacoes = ($request->observacoes) ? $request->observacoes : \"-\";\n $dados->id_usuario = ($request->id_usuario) ? $request->id_usuario : session()->get(\"usuario\")->id;\n $dados->id_racao = ($request->id_racao) ? $request->id_racao : null;\n if ($request->tipo_racao == null) {\n session()->put(\"info\", \"Selecione o tipo de ração!\");\n $listaDados = Usuario::all()->where(\"ativo\", \"!=\", 0);\n $listaRacoes = Produto::all()->where(\"ativo\", \"!=\", 0)->where(\"tipo_produto\", \"==\", \"Ração\");\n return view(\"alimentacaoAve.edit\", [\"dados\" => $dados, \"listaDados\" => $listaDados, \"listaRacoes\" => $listaRacoes]);\n }\n if ($request->id_racao == null) {\n session()->put(\"info\", \"Selecione a ração!\");\n $listaDados = Usuario::all()->where(\"ativo\", \"!=\", 0);\n $listaRacoes = Produto::all()->where(\"ativo\", \"!=\", 0)->where(\"tipo_produto\", \"==\", \"Ração\");\n return view(\"alimentacaoAve.edit\", [\"dados\" => $dados, \"listaDados\" => $listaDados, \"listaRacoes\" => $listaRacoes]);\n }\n $racao = Estoque::where(\"id_produto\", \"=\", $dados->id_racao)->first();\n\n if ($request->quantidade_alimento < $dados->quantidade_alimento) {\n $racao->quantidade += $dados->quantidade_alimento - $request->quantidade_alimento;\n $dados->quantidade_alimento = $request->quantidade_alimento;\n } else {\n $racao->quantidade -= $request->quantidade_alimento - $dados->quantidade_alimento;\n $dados->quantidade_alimento = $request->quantidade_alimento;\n }\n\n DB::beginTransaction();\n try {\n $dados->save();\n $racao->save();\n DB::commit();\n } catch (\\Throwable $e) {\n DB::rollback();\n $erro = $e->errorInfo[1];\n session()->put(\"info\", \"Erro ao salvar! ($erro)\");\n $listaDados = Usuario::all()->where(\"ativo\", \"!=\", 0);\n $listaRacoes = Produto::all()->where(\"ativo\", \"!=\", 0)->where(\"tipo_produto\", \"==\", \"Ração\");\n return view(\"alimentacaoAve.edit\", [\"dados\" => $dados, \"listaDados\" => $listaDados, \"listaRacoes\" => $listaRacoes]);\n }\n\n $listaDados = AlimentacaoAve::all()->where(\"ativo\", \"!=\", 0)->sortByDesc(\"data\");\n session()->put(\"info\", \"Registro alterado!\");\n return view(\"alimentacaoAve.index\", [\"listaDados\" => $listaDados]);\n }", "title": "" }, { "docid": "478e0cff24629b0d0509ada000eb8194", "score": "0.61112714", "text": "public function editAction($id)\n {\n $session = $this->getRequest()->getSession();\n if (!$this->get('security.context')->isGranted('ROLE_ADMIN') ) {\n return $this->redirect($this->generateUrl('error'), 302); \n }\n $em = $this->getDoctrine()->getManager(); \n $entity = $em->getRepository('SytemSGBundle:DadosArquivos')->find($id);\n \n if (!$entity) {\n throw $this->createNotFoundException('Unable to find DadosArquivos entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id); \n $json=json_decode(json_encode($this->ipsValidos(),JSON_FORCE_OBJECT),true);\n \n return $this->render('SytemSGBundle:DadosArquivos:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n 'json' => $json,\n\n ));\n\n //}\n //}\n \n //return $this->render('SytemSGBundle:Login:login.html.twig',array('erro' => \"Acesso Negado!!!\", )); \n \n }", "title": "" }, { "docid": "8b54a08bd86cd3d5a93a9a5582855b2c", "score": "0.6109808", "text": "public function postEdit()\n\t{\n\t\t$perfil = Perfil::find(Input::get('id'));\n\t\t$perfil->nombre = Input::get('nombre');\n\t\t$perfil->descripcion = Input::get('descripcion');\n\t\t$perfil->selector = Input::get('selector');\n\t\t$perfil->save();\n\t\treturn Redirect::to('perfiles'); \n\t}", "title": "" }, { "docid": "2f786ffb3912acd71cd8e4827ec03b36", "score": "0.61090136", "text": "public function update(Request $request, $id_estudiante)\n {\n //\n \n $campos=[\n 'nombre'=>'required|string|max:25',\n 'apellido_pa'=>'required|string|max:25',\n 'apellido_ma'=>'required|string|max:25',\n 'edad'=>'required|string|max:25',\n 'email'=>'required|email|max:20',\n 'telefono'=>'required|string|max:15',\n 'id_grupo'=>'required|integer|max:11'\n ];\n $mensaje=[\n 'required' =>'El :attribute es requerido'\n ];\n\n $this->validate($request, $campos, $mensaje);\n \n $datosEstudiante = request()->except(['_token','_method']);\n Estudiante::where('id_estudiante','=',$id_estudiante)->update($datosEstudiante);\n\n $estudiante = Estudiante::findOrFail($id_estudiante);\n //eturn view('estudiante.edit', compact('estudiante'));\n return redirect('estudiante')->with('mensaje','Estudiante actualizado con èxito');\n }", "title": "" }, { "docid": "718f7d64347dbb970d3af2645ff41b28", "score": "0.61081403", "text": "public function update(Request $request, Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "f5596f3f80a83e9d047af1f73d6dace7", "score": "0.61065966", "text": "public function update($id, Updatet_modelosRequest $request)\n {\n $tModelos = $this->tModelosRepository->find($id);\n $oldModelo = $tModelos->modelo;\n $tModelos = $this->tModelosRepository->update($request->all(), $id);\n\n\n if ($request->file('modelo')) {\n Storage::disk('ftp')->delete($oldModelo);\n $path = Storage::disk('ftp')->put('Modelos',$request->file('modelo'));\n $tModelos->fill(['modelo'=>$path])->save();\n # code...\n // \n }\n \n\n Flash::success('Modelo actualizado correctamente');\n\n return redirect(route('tModelos.index'));\n }", "title": "" }, { "docid": "0dbd271629a1c537b57a047da26f2ee8", "score": "0.61035633", "text": "public function update(Request $request, $id) {\n $itinerario = Itinerario::find($id);\n $m = new Itinerario($itinerario->attributesToArray());\n foreach ($itinerario->attributesToArray() as $key => $value) {\n if (isset($request->$key)) {\n $itinerario->$key = strtoupper($request->$key);\n }\n }\n $result = $itinerario->save();\n if ($result) {\n $aud = new Auditoriagestiondocumental();\n $u = Auth::user();\n $aud->usuario = \"ID: \" . $u->identificacion . \", USUARIO: \" . $u->nombres . \" \" . $u->apellidos;\n $aud->operacion = \"ACTUALIZAR DATOS\";\n $str = \"EDICION DE ITINERARIO. DATOS NUEVOS: \";\n $str2 = \" DATOS ANTIGUOS: \";\n foreach ($m->attributesToArray() as $key => $value) {\n $str2 = $str2 . \", \" . $key . \": \" . $value;\n }\n foreach ($itinerario->attributesToArray() as $key => $value) {\n $str = $str . \", \" . $key . \": \" . $value;\n }\n $aud->detalles = $str . \" - \" . $str2;\n $aud->save();\n flash(\"El itinerario <strong>\" . $itinerario->titulo . \"</strong> fue modificado de forma exitosa!\")->success();\n return redirect()->route('itinerario.index');\n } else {\n flash(\"El itinerario <strong>\" . $itinerario->titulo . \"</strong> no pudo ser modificado. Error: \" . $result)->error();\n return redirect()->route('itinerario.index');\n }\n }", "title": "" }, { "docid": "601613257d7e00144e5130685b90b478", "score": "0.6102452", "text": "public function editarTiempo(Request $request){\n if($request->isMethod('post')){ \n $rules = array( \n 'id' => 'required',\n 'lunes' => 'required',\n 'martes' => 'required',\n 'miercoles' => 'required',\n 'jueves' => 'required',\n 'viernes' => 'required',\n 'sabado' => 'required',\n 'domingo' => 'required' \n );\n \n $messages = array( \n 'id.required' => 'El id es requerido',\n 'lunes.required' => 'El lunes es requerido',\n 'martes.required' => 'El martes es requerido',\n 'miercoles.required' => 'El miercoles es requerido',\n 'jueves.required' => 'El jueves es requerido',\n 'viernes.required' => 'El viernes es requerido',\n 'sabado.required' => 'El sabado es requerido',\n 'domingo.required' => 'El domingo es requerido', \n );\n\n $validator = Validator::make($request->all(), $rules, $messages );\n\n if ( $validator->fails() ) \n {\n return [\n 'success' => 0,\n 'message' => $validator->errors()->all()\n ];\n }\n\n DB::beginTransaction();\n \n try { \n\n TiempoAproximado::where('servicios_id', $request->id)->where('dia', 1)->update(['tiempo' => $request->domingo]);\n TiempoAproximado::where('servicios_id', $request->id)->where('dia', 2)->update(['tiempo' => $request->lunes]);\n TiempoAproximado::where('servicios_id', $request->id)->where('dia', 3)->update(['tiempo' => $request->martes]);\n TiempoAproximado::where('servicios_id', $request->id)->where('dia', 4)->update(['tiempo' => $request->miercoles]);\n TiempoAproximado::where('servicios_id', $request->id)->where('dia', 5)->update(['tiempo' => $request->jueves]);\n TiempoAproximado::where('servicios_id', $request->id)->where('dia', 6)->update(['tiempo' => $request->viernes]);\n TiempoAproximado::where('servicios_id', $request->id)->where('dia', 7)->update(['tiempo' => $request->sabado]);\n\n DB::commit(); \n\n return ['success' => 1];\n\n } catch(\\Throwable $e){\n DB::rollback();\n return ['success' => 2];\n }\n\n }\n }", "title": "" }, { "docid": "26f85e8c2aab58a4938979b0f74012f6", "score": "0.610178", "text": "public function update(PostStoreRequest $request, $id)\n {\n $post= Post::find($id);\n $post->fill($request->all())->save();\n\n //Image\n if($request->file('file')){\n $path= Storage::disk('public')->put('image',$request->file('file'));\n\n $post->fill(['file'=>asset($path)])->save();//asse... crea la ruta completa donde se guarda laimage\n }\n //tags\n\n $post->tags()->sync($request->get('tags'));//syc: sincroniza la relacion que hay entre post y etiquetas //evalua para saber si la relacion esta \n\n return redirect()->route('posts.edit',$post->id)//redireciona y envia el id de la etiqueta que recien se creo\n ->with('info','Entrada actualizada con éxito');\n }", "title": "" }, { "docid": "e7366f7b3d2a9db78b31f2261cab5c93", "score": "0.6099148", "text": "public function edit_post(Request $request,$id)\n\t{\n if(Auth::user()->id == Post::find($id)->user->id){\n $page_name = \"Editar post\";\n $post = Post::find($id);\n $post->fill($request->all());\n\n $post->occupations()->detach();\n $post->occupations()->attach($request->get('occupations'));\n\n if(!empty($request->file('image'))){\n File::delete(base_path().'/public/images/posts/images'.$id.'.'.$post->image);\n\n $post->image = $request->file('image')->getClientOriginalExtension();\n\n //Save User image\n $imageName = $post->id . '.' .\n $request->file('image')->getClientOriginalExtension();\n $request->file('image')->move(\n base_path() . '/public/images/posts/images', $imageName\n );\n }\n $post->save();\n\n Session::flash('success','Post atualizado');\n return redirect(route('home.posts.your'));\n }else{\n return Response::view('errors.401',[],401);\n }\n\t}", "title": "" }, { "docid": "79d7f1ffc6bbf339163245a1f9ca9e20", "score": "0.60961396", "text": "public function update(EventRequest $request, $id)\n {\n\n try {\n //Editar evento\n $evento = Event::find($id);\n $evento->nombre = $request['nombre'];\n $evento->ubicacion = $request['ubicacion'];\n $evento->descripcion = $request['descripcion'];\n $evento->fecha = $request['fecha'];\n $evento->hora = date(\"Y-m-d H:i\", strtotime($request['hora']));\n $evento->duracion = $request['duracion'];\n $evento->tipo = $request['tipo'];\n $evento->id_grupo = $request['grupo'];\n \n $evento->save();\n\n if(isset($request['imagen']) && $request['imagen'] != \"\"){\n if(file_exists($evento->imagen)){\n unlink($evento->imagen);\n }\n\n $destinationPath = 'uploads/eventos/'; // upload path\n $extension = $request['imagen']->getClientOriginalExtension();\n $filename = $evento->id.'.'.$extension; \n\n $request['imagen']->move($destinationPath, $filename);\n\n $evento->imagen = $destinationPath.$filename;\n $evento->save();\n }\n\n \n return redirect()->route('evento.show',$id)->with('success', 'El evento se ha modificado exitosamente');\n }catch (Exception $e){\n return redirect()->back()->with('warning', 'Ocurrió un error al hacer esta acción');\n }\n }", "title": "" }, { "docid": "617645ec9e31aef1784d5ff56eb0563d", "score": "0.6095596", "text": "public function edit(Encuesta $encuesta)\n {\n //\n }", "title": "" }, { "docid": "617645ec9e31aef1784d5ff56eb0563d", "score": "0.6095596", "text": "public function edit(Encuesta $encuesta)\n {\n //\n }", "title": "" }, { "docid": "617645ec9e31aef1784d5ff56eb0563d", "score": "0.6095596", "text": "public function edit(Encuesta $encuesta)\n {\n //\n }", "title": "" }, { "docid": "51211e1c9a9900074d5dbeaf027a30af", "score": "0.6092009", "text": "public function update(Request $request, $id)\n {\n // dd($request->all());\n\n $equipo=Equipos::findOrFail($id);\n $emple_eqi=empleados_equipo::all();\n \n $equipo->descripcion=$request->get('name');\n $equipo->entrada=$request->get('entrada');\n $equipo->salida=$request->get('salida');\n $equipo->user=Auth::user()->name;\n $equipo->id_empresa=Auth::user()->id_empresa;\n $equipo->update();\n\n $arrayadd = explode(\",\", $request->get('arreglo'));\n $arrayremo = explode(\",\", $request->get('arregloremo'));\n\n if($arrayadd!=''){\n $n=count($arrayadd);\n for ($i=0; $i<=$n ; $i++) { \n if(!empty($arrayadd[$i])){\n $input['id_empleado']=$arrayadd[$i];\n $input['equipos']=$equipo->id;\n $input['id_empresa']=Auth::user()->id_empresa;\n $input['estado']=0;\n $emple_eqi=empleados_equipo::create($input);\n }\n }\n }\n\n // if( $arrayremo!=''){\n // $r=count($arrayremo);\n // for ($i=0; $i <$r; $i++){ \n // foreach($emple_eqi as $perfil){\n // if(!empty($arrayremo[$i])){\n // if($perfil->id_empleado==$arrayremo[$i]){\n // if($perfil->id_perfiles==$id){\n // $perfil->delete();\n // }\n // }\n // } \n // }\n // }\n // }\n\n\n\n return redirect('Equipos')->with('actualizar','ya');\n }", "title": "" }, { "docid": "1f904ea9ee5c7c8f3100939eb0706772", "score": "0.6091129", "text": "public function update(Request $request, Titulos $titulos, $id)\n {\n \n $save = $titulos->findOrFail($id);\n $save->nome_exibicao = $request->input('nome_exibicao');\n $save->back_color = $request->input('back_color');\n $save->border_color = $request->input('border_color');\n $check_save = $save->save();\n if($check_save){\n return redirect()->back()->with('success', 'Representante atualiado!'); \n return redirect()->route('titulo.index'); // Melhorar isso assim que fizer a pagina de perguntas \n }\n\n\n\n }", "title": "" }, { "docid": "72d5db9191a72a0aea25a885f8757054", "score": "0.60887897", "text": "public function update(Request $request, $id)\n {\n \n $requestData = $request->all();\n if ($request->hasFile('logotipo')) {\n $requestData['logotipo'] = $request->file('logotipo')\n ->store('uploads', 'public');\n }\n\n $empresa = Empresa::findOrFail($id);\n $empresa->update($requestData);\n\n return redirect('empresa')->with('flash_message', 'Empresa updated!');\n }", "title": "" }, { "docid": "ef23755c7f4e5c37347085d364823bb0", "score": "0.60885596", "text": "public function update(Request $request, Trabajador $trabajador)//actualizo un registro de la base de datos\n {\n //dd($trabajador);\n //$trabajador = Trabajador::findOrFail($id);\n $trabajador->cargo_id = $request->cargo_id;\n $trabajador->empresa_id = $request->empresa_id;\n $trabajador->sucursal_id = $request->sucursal_id;\n $trabajador->planilla = $request->planilla;\n $trabajador->sueldo = $request->sueldo;\n $trabajador->horas_trabajo = $request->horas_trabajo;\n $trabajador->tiempo_refrigerio = $request->tiempo_refrigerio;\n $trabajador->persona_id = $request->persona_id;\n\n $trabajador->save();\n return redirect(\"mantenimiento/trabajador\");\n }", "title": "" }, { "docid": "6dd6edf66ace9eb8575b309851ab8ad4", "score": "0.60827947", "text": "public function update(){\n \n //le pasamos la raza a la vista\n $raza = Raza::getById($_POST['id']);\n \n // esta operación solamente la puede hacer el administrador\n \n if(!Login::isAdmin() || !Login::hasPrivilege(500))\n throw new Exception('No tienes los permisos necesarios');\n \n // comprueba que llegue el formulario con los datos\n if(empty($_POST['update']))\n throw new Exception('No se recibieron datos');\n \n $id = intval($_POST['id']); // recuperar el id vía POST\n \n // recuperar la raza\n if(!$raza = Raza::getById($id))\n throw new Exception(\"No existe la raza $id.\");\n \n $raza->nombre = DB::escape($_POST['nombre']);\n $raza->descripcion = DB::escape($_POST['descripcion']);\n $raza->idtipo = $_POST['idtipo'];\n \n // intenta realizar la actualización de datos\n if($raza->update()===false)\n throw new Exception(\"No se pudo actualizar $raza->nombre\");\n \n // prepara un mensaje\n $GLOBALS['mensaje'] = \"Actualización de la raza $raza->nombre correcta.\";\n \n // repite la operación edit, así mantiene la vista de edición.\n $this->edit($raza->id);\n }", "title": "" }, { "docid": "d2dfab38ecbcd6978aa33532afd8a29f", "score": "0.60812503", "text": "public function editar($id){\n\n\t\t$nombre=$this->request->getPost(\"nombreEditar\");\n\t\t$edad=$this->request->getPost(\"edadEditar\");\n\t\t$tipo=$this->request->getPost(\"tipoEditar\");\n\t\t$descripcion=$this->request->getPost(\"descripcionEditar\");\n\t\t$comida=$this->request->getPost(\"comidaEditar\");\n\t\t$raza=$this->request->getPost(\"razaEditar\");\n\t\t$foto=$this->request->getPost(\"fotoEditar\");\n\n\t\t // $nombre=$this->request->getPost(\"nombreEditar\");\n\t\t\t\t// \t$descripcion=$this->request->getPost(\"descripcionEditar\");\n\t\t\t\t//2. Organizar los datos que llegan de las vistas\n\t\t// en un arreglo asociativo \n\t\t//(las claves deben ser iguales a los campos o atributos de la tabla en BD)\n\n\t\t\t\t\t$datosEnvio=array(\n\t\t\t\t\t\t\"nombre\"=>$nombre,\n\t\t\t\t\t\t\"edad\"=>$edad,\n\t\t\t\t\t\t\"tipo\"=>$tipo,\n\t\t\t\t\t\t\"descripcion\"=>$descripcion,\n\t\t\t\t\t\t\"comida\"=>$comida,\n\t\t\t\t\t\t\"raza\"=>$raza,\n\t\t\t\t\t\t\"foto\"=>$foto\n\t\t\t\t\t);\n\t\t\t\t\t//3. Crear un objeto del MODELO para porder \n\t\t//realizar la transacción en BD\n\n\t\t\t\t\t$modeloPersonas= new Modelopersonas();\n\n\t\t\t\t\t//4. Ejecutar el metodo update del modelo\n\n\t\t\t\t\ttry{\n\t\t\t\t\t\t$modeloPersonas->update($id,$datosEnvio);\n\t\t\t\t\t\t $mensaje=\"Registro editado con exito\";\n\t\t\t return (redirect()->to(base_url(\"public/animales/listado\"))->with('editado',$mensaje));\n\n\n\t\t\t\t\t}catch(\n\t\t\t\t\t\\Exception $error ){\n\t\t\t\t\t\techo ($error->getMessage()); \n\t\t\t\t\t }\n\t\t\t\t\t\n\t\t\t\t\t\n\t}", "title": "" }, { "docid": "ad550283069548b15d0904d11893db0d", "score": "0.6081173", "text": "public function update( Request $request , $id ) {\n // return view(); //almacenar el registro de un producto\n //validar datos con reglas de laravel en documentacion hay mas\n //mensajes personalizados para cada campo\n $this->validate($request,Ruta::$rules,Ruta::$messages);\n //crear un prodcuto nuevo\n $ruta = Ruta::find( $id );\n $ruta -> nombre = $request->input('nombre');\n //$product -> description = $request->input('description');\n $ruta -> descripcion = $request->input('descripcion');\n $ruta -> zona_id = $request->input('zona_id');\n $ruta -> estado = $request->input('estado');\n $ruta -> save(); //registrar producto\n //agregar los dias de esa ruta\n if( !empty( $request->input('dias_almacenados') ) ) {\n $arrayDias = explode(\",\" , $request->input('dias_almacenados') );\n foreach( $arrayDias as $index => $dia ) {\n $diaRuta = new DiasRutas();\n $diaRuta -> dia = $dia;\n $diaRuta -> ruta_id = $ruta -> id;\n $diaRuta -> save();\n }\n }\n $notification = 'Ruta ' . $request->input('nombre') . ' Actualizada Exitosamente';\n return redirect('/zona/'.$request->input('zona_id').'/rutas') -> with( compact( 'notification' ) );\n }", "title": "" }, { "docid": "d78d60cf6ad659c456101e2679bc2487", "score": "0.60800815", "text": "public function update(Request $request, $id)\n {\n //\n $produto = Produto::find($id);\n\n\n $imagem = $request->file('img');\n\n $pasta = public_path() . '/imagensProdutos';\n\n if ($imagem == null) {\n\n $produto->img = $produto->img;\n\n\n } else {\n\n $nome_imagem = 'produto' . time() . '.' . $imagem->getClientOriginalExtension();\n\n // Move arquivo para pasta\n $nova_imagem = $imagem->move($pasta, $nome_imagem);\n $sub_var = substr($nova_imagem, 34);\n// return response()-> json($sub_var);\n $produto->img = $sub_var;\n }\n\n $produto->nome = Input::get('nome');\n $produto->descricao = Input::get('descricao');\n $produto->grupo = Input::get('grupo');\n $produto->preco = Input::get('preco');\n\n\n if (Input::get('status')) {\n\n $produto->status = \"1\";\n } else {\n $produto->status = null;\n }\n\n $quant = Input::get('quantidade');\n $entr = Input::get('entrada');\n\n\n $produto->quantidade = $quant + $entr;\n $produto->categoria_id = Input::get('categoria');\n\n\n if ($produto->save()) {\n echo '<script>alert(\"Dados Atualizados com Sucesso!\");</script>';\n\n\n $produtos = Produto::all();\n $categorias = Categoria::all();\n\n return view('produtos.index',\n ['produtos' => $produtos], ['todCat' => $categorias]);\n\n\n } else {\n echo '<script>alert(\"Erro ao Salvar!\"); </script>';\n }\n }", "title": "" }, { "docid": "689567077737b73a36039a3b1126b987", "score": "0.6076735", "text": "public function update(Request $request, $id)\n {\n $validateData = $request->validate([\n 'nome' => 'required',\n 'descricao' => 'required',\n 'data_evento' => 'required|date_format:Y-m-d',\n 'hora_evento' => 'required|date_format:H:i',\n 'imagem' => 'image',\n \n 'data_inicio_inscricao' => 'nullable|date_format:Y-m-d',\n 'hora_inicio_inscricao' => 'nullable|date_format:H:i',\n 'data_fim_inscricao' => 'nullable|date_format:Y-m-d',\n 'hora_fim_inscricao' => 'nullable|date_format:H:i',\n 'numero_vagas' => 'nullable|integer',\n\n 'valor' => 'nullable|integer'\n ]);\n \n $evento = Evento::find($id)->first();\n $evento->nome = $request->nome;\n $evento->descricao = $request->descricao;\n $evento->data_evento = $request->data_evento;\n $evento->hora_evento = $request->hora_evento;\n\n /* Tratar iamgem */\n if(!is_null($request->imagem)){\n $nome_img = uniqid() . '.' . $request->imagem->extension();\n $evento->url_imagem = $nome_img;\n $request->imagem->storeAs('public/eventos/', $nome_img);\n }\n \n if($request->has('inscricao')) {\n $evento->inscricao = true;\n $evento->data_inicio_inscricao = $request->data_inicio_inscricao;\n $evento->hora_inicio_inscricao = $request->hora_inicio_inscricao;\n $evento->data_fim_inscricao = $request->data_fim_inscricao;\n $evento->hora_fim_inscricao = $request->hora_fim_inscricao;\n $evento->numero_vagas = $request->numero_vagas;\n }else{\n $evento->inscricao = false;\n $evento->data_inicio_inscricao = null;\n $evento->hora_inicio_inscricao = null;\n $evento->data_fim_inscricao = null;\n $evento->hora_fim_inscricao = null;\n $evento->numero_vagas = 0;\n }\n\n if($request->has('pagamento')) {\n $evento->pagamento = true;\n $evento->valor = $request->valor;\n if($request->has('pagamento_na_hora')) {\n $evento->pagamento_na_hora = true;\n }else{\n $evento->pagamento_na_hora = false;\n }\n\n if($request->has('pagamento_antecipado')) {\n $evento->pagamento_antecipado = true;\n }else{\n $evento->pagamento_antecipado = false;\n }\n }else{\n $evento->pagamento = false;\n $evento->valor = null;\n $evento->pagamento_na_hora = false;\n $evento->pagamento_antecipado = false;\n }\n\n $evento->save();\n\n return redirect()->route('eventos.lista_abertos', $evento)->with('success', 'Curso cadastrado com sucesso.');\n }", "title": "" } ]
d89e36d90e333cbc7898ebfed7db2be1
\brief Gets the logs associated with a given ticket \param interaction_id Identifier of ticket whose logs are to be grabbed \returns All logs associated with the ticket
[ { "docid": "12d6d46c7f34def2fc4590e83497f771", "score": "0.8021915", "text": "function getLogs($interaction_id) {\n require(\"/var/database_config.php\");\n $pdo = new PDO('mysql:host=' . $db_config['host'] . ';dbname=' . $db_config['dbname'], $db_config['username'], $db_config['password']);\n\n $sql = <<<SQL\nSELECT * from interaction_log\n where interaction_id=?\nSQL;\n\n $statement = $pdo->prepare($sql);\n\n $statement->execute(array($interaction_id));\n if($statement->rowCount() === 0) {\n return null;\n }\n\n $logs = array();\n while ($row = $statement->fetch(PDO::FETCH_ASSOC))\n {\n $log = new Log($row);\n $logs[] = $log;\n }\n\n $interaction_logs = new Requests($logs, Requests::Logs);\n return $interaction_logs;\n}", "title": "" } ]
[ { "docid": "40fbb209ed220a07a448bab5be75d972", "score": "0.6639672", "text": "public static function getAllLogs() {\n $pdo = new PDO_MYSQL();\n $stmt = $pdo->queryMulti(\"SELECT tID FROM entrance_tracing ORDER BY tID\");\n return $stmt->fetchAll(PDO::FETCH_FUNC, \"\\\\Entrance\\\\TracingEntry::fromTID\");\n }", "title": "" }, { "docid": "0d90ab80923c90f96ffe814335959480", "score": "0.6450831", "text": "public function getLogs();", "title": "" }, { "docid": "ed3bee0dad3eaa9ac99449e4324e6d70", "score": "0.63081384", "text": "public static function returnAllLogs(){\n \t//array that will hold all id\n \t$ids_arr = array();\n \t//return array of log\n \t$types = self::all();\n \tforeach ($types as $key => $value) {\n \t\tarray_push($ids_arr, $value['log']);\n \t}\n \treturn $ids_arr;\n }", "title": "" }, { "docid": "9030a33b3b35ef84cc1eedc8f964585a", "score": "0.6264716", "text": "function retrieveWorklogs($id) {\r\n\r\n\t\treturn ($this->query('SELECT * FROM worklogs WHERE incident_id='. $id .' ORDER BY created ASC;'));\r\n\r\n\t}", "title": "" }, { "docid": "9d45be98b0eb5a2fb6c1d51fa0da706e", "score": "0.61537063", "text": "public function getLogs()\n {\n $em = MasterContainer::get('doctrine')->getManager();\n return $em->createQuery(\"\n SELECT\n l\n FROM\n PixoniteServerManagerBundle:LogFile l\n WHERE\n l.serverId = '\". $this->id .\"'\n \")\n ->getResult();\n }", "title": "" }, { "docid": "7c5677c929209f0f0eaf537ede835a66", "score": "0.6129915", "text": "private static function get_logs()\n {\n $filter = new LogFilter();\n \n # Will be nice if we stored the ID of the last log we covered previously, but until then\n # use the time period to cover logs that came in the during the time this script was sleeping.\n $filter->set_max_age(EMAIL_ALERT_INTERVAL + 2);\n \n $filter->enable_alert_level(iRAP\\Logging\\LogLevel::ERROR);\n $filter->enable_alert_level(iRAP\\Logging\\LogLevel::CRITICAL);\n $filter->enable_alert_level(iRAP\\Logging\\LogLevel::ALERT);\n $filter->enable_alert_level(iRAP\\Logging\\LogLevel::EMERGENCY);\n \n return LogTable::getInstance()->load_filter(null, null, $filter);\n }", "title": "" }, { "docid": "99ed0236efd6889fded377e15778785f", "score": "0.60466075", "text": "public function getLogs(): array;", "title": "" }, { "docid": "290a3a7834f45a32cebb2916277efc73", "score": "0.60006917", "text": "function logs(){\n $result = $this->dma->managementApiCall(\"GET\", \"{$this->hashid}/logs\");\n return $result['response'];\n }", "title": "" }, { "docid": "719c9beba6f641d7175ab2a56fe1ce26", "score": "0.5956198", "text": "public function getLogs()\n {\n\n $query = \"SELECT\n *\n FROM\n log\n ORDER BY\n id\n desc\n LIMIT 11\";\n\n $stmt = self::$dbh->prepare($query);\n\n $stmt->execute();\n\n return $stmt->fetchall(\\PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "da97d0b5ef870e92220c7ac582b982c0", "score": "0.5945486", "text": "public function get_log_including_accounts() {\n\t\tif(is_null($this->id)) throw new BadMethodCallException('Server must be in directory before log entries can be listed');\n\t\t$stmt = $this->database->prepare(\"\n\t\t\t(SELECT se.id, se.actor_id, se.date, se.details, se.server_id, NULL as entity_id, 'server' as type\n\t\t\tFROM server_event se\n\t\t\tWHERE se.server_id = ?\n\t\t\tORDER BY id DESC)\n\t\t\tUNION\n\t\t\t(SELECT ee.id, ee.actor_id, ee.date, ee.details, NULL as server_id, ee.entity_id, 'server account' as type\n\t\t\tFROM server_account sa\n\t\t\tINNER JOIN entity_event ee ON ee.entity_id = sa.entity_id\n\t\t\tWHERE sa.server_id = ?\n\t\t\tORDER BY id DESC)\n\t\t\tORDER BY date DESC, id DESC\n\t\t\");\n\t\t$stmt->bind_param('dd', $this->id, $this->id);\n\t\t$stmt->execute();\n\t\t$result = $stmt->get_result();\n\t\t$log = array();\n\t\twhile($row = $result->fetch_assoc()) {\n\t\t\tif($row['type'] == 'server') {\n\t\t\t\t$log[] = new ServerEvent($row['id'], $row);\n\t\t\t} elseif($row['type'] == 'server account') {\n\t\t\t\t$log[] = new ServerAccountEvent($row['id'], $row);\n\t\t\t}\n\t\t}\n\t\t$stmt->close();\n\t\treturn $log;\n\t}", "title": "" }, { "docid": "569f026f17840fe1e5755035de0ac3c2", "score": "0.5869455", "text": "public function logs()\n {\n return $this->hasMany(Log::class, 'EntityId', 'Id');\n }", "title": "" }, { "docid": "ee9264a1439481850103069fedfcba3b", "score": "0.5866563", "text": "public function returnLogs () {\n\t\tglobal $cfg, $db;\n\n\t\t$toReturn = [];\n\n\t\t$source = $db->query(sprintf(\"SELECT * FROM %s_history WHERE module = '%s'\", $cfg->db->prefix, \"sys-login\"));\n\n\t\tif($source->num_rows > 0) {\n\t\t\twhile ($data = $source->fetch_object()) {\n\t\t\t\tarray_push($toReturn, $data);\n\t\t\t}\n\t\t}\n\n\t\treturn $toReturn;\n\t}", "title": "" }, { "docid": "2a91c8db7fde77bf511d2a77fe4818c0", "score": "0.58506066", "text": "public function getLogs()\n\t{\n\t\t$logs = $this->adapter->getLogs();\n\t\treturn $logs;\n\t}", "title": "" }, { "docid": "d3e516647b33a4825ca643d4a9fd303a", "score": "0.5841193", "text": "function getAllWorkLogs() {\n $db = DB::getInstance();\n $logs = $db->query(\n \"SELECT s.id, s.last_update, s.note, u.fname, u.lname\n FROM sage_work_log s\n JOIN users u ON u.id = s.user_id\")->results(true);\n return $logs;\n }", "title": "" }, { "docid": "f04a1c5d812561fb02c15aec7c3956fc", "score": "0.5789933", "text": "public static function getIssueLogsById(int $issueId): array\n {\n $srch = new SearchBase(ReportedIssue::DB_TBL_LOG, 'reislo');\n $srch->joinTable(User::DB_TBL, 'LEFT JOIN', 'user.user_id=reislo.reislo_added_by and reislo.reislo_added_by_type IN (1,2)', 'user');\n $srch->joinTable('tbl_admin', 'LEFT JOIN', 'admin.admin_id=reislo.reislo_added_by and reislo.reislo_added_by_type IN (3)', 'admin');\n $srch->addCondition('reislo_repiss_id', '=', FatUtility::int($issueId));\n $srch->addMultipleFields([\n 'reislo_repiss_id', 'reislo_action', 'reislo_comment', 'reislo_added_on', 'reislo_added_by', 'reislo_added_by_type',\n 'CASE WHEN reislo_added_by_type = 3 THEN admin.admin_name ELSE CONCAT(user.user_first_name, \" \", user.user_last_name) END as user_fullname'\n ]);\n $srch->addOrder('reislo.reislo_id', 'ASC');\n $srch->doNotCalculateRecords();\n $srch->doNotLimitRecords();\n return FatApp::getDb()->fetchAll($srch->getResultSet());\n }", "title": "" }, { "docid": "9fe6058c196057dc3173f4daf7146105", "score": "0.57650745", "text": "public function Controle_log($id){\n\t\t\t$this->control = new Log();\n\t\t\treturn $this->control->all($id);\n\t\t}", "title": "" }, { "docid": "8b0e70fbd7e59cc2ac3b8f3350c3f394", "score": "0.57432735", "text": "function get_audit_trail_logs(){\n\t\t$pagepointer = '';\n\t\tif(isset($_SESSION['temp_storage']['pagepointer']) && $_SESSION['temp_storage']['pagepointer']){\n\t\t\t$pagepointer = $_SESSION['temp_storage']['pagepointer'];\n\t\t}\n\t\t\n\t\t$oldurl = 'tmp/audit_logs/';\n\t\t\n\t\t$array_to_return = array();\n\t\t\n\t\tif(is_dir($pagepointer.$oldurl)){\n\t\t\t//3. Open & Read all files in directory\n\t\t\t$cdir = opendir($pagepointer.$oldurl);\n\t\t\twhile($cfile = readdir($cdir)){\n\t\t\t\tif(!($cfile=='.' || $cfile=='..')){\n\t\t\t\t\t//Check if report exists\n\t\t\t\t\t$get_name = explode('.',$cfile);\n\t\t\t\t\tif(isset($get_name[0]) && $get_name[0]){\n\t\t\t\t\t\t$array_to_return[$get_name[0]] = date('j-M-Y',($get_name[0]/1)).' Log';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($cdir);\n\t\t}\n\t\t\n\t\treturn $array_to_return;\n\t}", "title": "" }, { "docid": "523bd0d0c6401737521addf8baa19c8d", "score": "0.5741368", "text": "public static function getAllActiveLogs() {\n $pdo = new PDO_MYSQL();\n $stmt = $pdo->queryMulti(\"SELECT tID FROM entrance_tracing WHERE active = 1 ORDER BY tID\");\n return $stmt->fetchAll(PDO::FETCH_FUNC, \"\\\\Entrance\\\\TracingEntry::fromTID\");\n }", "title": "" }, { "docid": "73d97f3f3fdedbfe509395233bd5d61d", "score": "0.56756264", "text": "public function getLogs():array;", "title": "" }, { "docid": "f3eb772d90776ff76dc093b2db8dfe47", "score": "0.5663024", "text": "public static function getLogs(){\n $sql = '\n SELECT *\n FROM `'._DB_PREFIX_.'emails_log`' ;\n $row = Db::getInstance()->getRow($sql);\n \n return $row;\n }", "title": "" }, { "docid": "8a35ce2fc16ecfbdce05fca013eaa20b", "score": "0.56588036", "text": "public function getLogs()\n {\n return $this->logs;\n }", "title": "" }, { "docid": "8a35ce2fc16ecfbdce05fca013eaa20b", "score": "0.56588036", "text": "public function getLogs()\n {\n return $this->logs;\n }", "title": "" }, { "docid": "8a35ce2fc16ecfbdce05fca013eaa20b", "score": "0.56588036", "text": "public function getLogs()\n {\n return $this->logs;\n }", "title": "" }, { "docid": "8a35ce2fc16ecfbdce05fca013eaa20b", "score": "0.56588036", "text": "public function getLogs()\n {\n return $this->logs;\n }", "title": "" }, { "docid": "8a35ce2fc16ecfbdce05fca013eaa20b", "score": "0.56588036", "text": "public function getLogs()\n {\n return $this->logs;\n }", "title": "" }, { "docid": "0c6259650edd88df4d25265d04c8b8d8", "score": "0.5645969", "text": "public function getLogs()\r\n\t{\r\n\t\treturn $this->_logs;\r\n\t}", "title": "" }, { "docid": "82a0a8189ba27ef9c876a3be6bfe5a92", "score": "0.56415194", "text": "public function get_log() {\n\t\tif(is_null($this->id)) throw new BadMethodCallException('Server must be in directory before log entries can be listed');\n\t\t$stmt = $this->database->prepare(\"\n\t\t\tSELECT *\n\t\t\tFROM server_event\n\t\t\tWHERE server_id = ?\n\t\t\tORDER BY id DESC\n\t\t\");\n\t\t$stmt->bind_param('d', $this->id);\n\t\t$stmt->execute();\n\t\t$result = $stmt->get_result();\n\t\t$log = array();\n\t\twhile($row = $result->fetch_assoc()) {\n\t\t\t$log[] = new ServerEvent($row['id'], $row);\n\t\t}\n\t\t$stmt->close();\n\t\treturn $log;\n\t}", "title": "" }, { "docid": "11fe4a155966a951ee63f4566061bfa1", "score": "0.5635515", "text": "public function logs()\n {\n return $this->morphMany(UserActionLogs::class, 'log_able');\n }", "title": "" }, { "docid": "462e03cac73f2e7df9a0240beac6c73b", "score": "0.56048715", "text": "function getEventLogs(){\n\t\t\t$strQuery=\"select * from eventlogs\";\n \treturn $this->query($strQuery);\n\t\t}", "title": "" }, { "docid": "9fb0bc5007ab0de2d8b117cecb98cadd", "score": "0.5600012", "text": "public function getTicketHistory($ticket_id) {\n $where = array('ticket_history.ticket_id' => $ticket_id);\n $ticket_history = $this->crm->getData('ticket_history', 'ticket_history.ticket_history_created_at', $where, FALSE, 'ticket_history.ticket_history_created_at', 'DESC', 1);\n return $ticket_history;\n }", "title": "" }, { "docid": "1af387c1bf769ecf80d723a71a6934c7", "score": "0.55833894", "text": "public function getLogs($id, $type)\n {\n if ($type == '0') {\n $logs = $this->mysql->QUERY('SELECT * FROM player_logs WHERE LOG_TYPE = ?', [$id]);\n\n return $logs;\n } else {\n if ($type == '1') {\n $logs = $this->mysql->QUERY('SELECT * FROM player_logs WHERE USER_ID = ?', [$id]);\n\n return $logs;\n } else {\n if ($type == '2') {\n $logs = $this->mysql->QUERY('SELECT * FROM player_logs WHERE PLAYER_ID = ?', [$id]);\n\n return $logs;\n }\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "f5efe49607222f4aab3541b240a854ce", "score": "0.5569651", "text": "public function getAuditTrailLogs(Request $request){\n \t\treturn $this->createGetResponse($request,(new AuditLogs)->newQuery()\n ->orderBy('AUDIT_LOGS_ID','DESC'));\n \t}", "title": "" }, { "docid": "71aecb3e92d28ab4e1df2245db3e43f4", "score": "0.55526984", "text": "function edd_message_get_logged_emails( $id ) {\n\t$args = array(\n\t\t'post_type' => 'edd_log',\n\t\t'post_status' => 'publish',\n\t\t'tax_query' => array(\n\t\t\t'taxonomy' => 'edd_log_type',\n\t\t\t'field' => 'slug',\n\t\t\t'terms' => 'email',\n\t\t),\n\t\t'meta_key' => '_edd_log_customer_id',\n\t\t'meta_value' => $id\n\t);\n\n\t$logs = get_posts( $args );\n\n\tif ( ! empty( $logs ) && ! is_wp_error( $logs ) ) : ?>\n\t\t<div class=\"edd-message-logs\">\n\n\t\t\t<h2><?php _e( 'Message history', 'edd-message' ); ?></h2>\n\n\t\t\t<div id=\"postbox-container-2\" class=\"postbox-container\">\n\n\t\t\t\t<?php foreach ( $logs as $log ) : ?>\n\n\t\t\t\t\t<div id=\"edd-message-log-<?php echo $log->ID; ?>\" class=\"meta-box-sortables ui-sortable-disabled\">\n\t\t\t\t\t\t<div class=\"postbox closed\">\n\t\t\t\t\t\t\t<button type=\"button\" class=\"handlediv button-link\" aria-expanded=\"false\">\n\t\t\t\t\t\t\t\t<span class=\"screen-reader-text\">\n\t\t\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\t\t_e( 'Toggle panel:', 'edd-message' );\n\t\t\t\t\t\t\t\t\techo get_the_title( $log->ID );\n\t\t\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<span class=\"toggle-indicator\" aria-hidden=\"true\"></span>\n\t\t\t\t\t\t\t</button>\n\n\t\t\t\t\t\t\t<h3 class=\"hndle ui-sortable-handle\">\n\t\t\t\t\t\t\t\t<?php echo get_the_title( $log->ID ); ?>\n\t\t\t\t\t\t\t</h3>\n\n\t\t\t\t\t\t\t<em>\n\t\t\t\t\t\t\t\t<?php echo get_the_date( '', $log->ID ); ?>\n\t\t\t\t\t\t\t</em>\n\n\t\t\t\t\t\t\t<div class=\"inside\">\n\t\t\t\t\t\t\t\t<?php edd_message_show_message( $log ); ?>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t<?php endforeach; ?>\n\n\t\t\t</div>\n\t\t</div>\n\t<?php endif;\n}", "title": "" }, { "docid": "013b3dd8a6b1e2b47f413203ffdb5407", "score": "0.5549158", "text": "function getLogsByClientIdTypeAndDates($id, $type, $startTimestamp, $endTimestamp){\n\t$start = date(\"Y-m-d H:i:s\", $startTimestamp);\n\t$end = date(\"Y-m-d H:i:s\", $endTimestamp);\n\t\n\t$reponse = $GLOBALS['bdd']->query('SELECT * FROM '. $GLOBALS['bdd_users'] . ' WHERE clientId=\\'' . openssl_encrypt($id, 'des-cbc', $GLOBALS[\"lemotdepassesiouplait\"], 0, substr(''.$GLOBALS[\"lemotdepassesiouplait\"], 0, 8))\n\t. '\\' AND logType=\\''.openssl_encrypt($type, 'des-cbc', $GLOBALS[\"lemotdepassesiouplait\"], 0, substr(''.$GLOBALS[\"lemotdepassesiouplait\"], 0, 8)).'\\' AND dateOfLog>=\\'' . $start\t. '\\' AND dateOfLog<=\\''.$end.'\\'');\n\t\n\t$results = array();\n\t// On affiche chaque entrée une à une\n\twhile ($donnees = $reponse->fetch()){\n\t\t$log = new Log;\n\t\t$log->processRawData($donnees);\n\t\t$results[count($results)] = $log;\n\t}\n\t\n\t$reponse->closeCursor();\n\t\n\treturn $results;\n}", "title": "" }, { "docid": "4f55b0515f60b11fca381ada214f5b2e", "score": "0.55362093", "text": "public function getAllRevisionLogs();", "title": "" }, { "docid": "9abf1d145429bfa47900eebd5af60257", "score": "0.5515985", "text": "public function get_logs() {\n $logs = array();\n $dirpath = $this->dirpath;\n if (is_dir($this->dirpath)) {\n $it = new RecursiveDirectoryIterator($dirpath, RecursiveDirectoryIterator::SKIP_DOTS);\n $files = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST);\n foreach ($files as $file) {\n $filename = $file->getFilename();\n if ($filename === '.' || $filename === '..') {\n continue;\n }\n $logs[] = $filename;\n }\n }\n return $logs;\n }", "title": "" }, { "docid": "8f5a7f15ded6cd8e8b8efa41048e63d4", "score": "0.5508504", "text": "function getChatLog($AID){\n\t$conn=conDB();\n\t$sql=\"SELECT agents.Fname,chat.Message,chat.TimeStamp FROM chat INNER JOIN agents ON chat.AgentID=agents.IDKey WHERE chat.Global='1' OR chat.TargetAID='$AID' OR chat.AgentID='$AID' ORDER BY chat.IDKey DESC LIMIT 100\";\n\t$result = mysqli_query($conn, $sql);\n\t$return=array();\n\t$x=0;\n\twhile($row= $result->fetch_assoc()){\n\t\t$message=$row[\"Message\"];\n\t\t$player=$row[\"Fname\"];\n\t\t$time=substr($row[\"TimeStamp\"],0,-3);\n\t\t$final=\"$time:$player:$message\";\n\t\t$return[$x]=$final;\n\t\t$x++;\n\t}\n\treturn $return;\n}", "title": "" }, { "docid": "e78eb5a434921e0b4c111c454fb53233", "score": "0.55072415", "text": "public function get_log() {\n\t\tglobal $event_dir;\n\t\tif(is_null($this->id)) throw new BadMethodCallException('Service must be in directory before log entries can be listed');\n\t\treturn $event_dir->list_events(array(), array(\"type\" => \"Service\", \"object_id\" => $this->id));\n\t}", "title": "" }, { "docid": "29f3dc9c22e0abbcd461f712c3709207", "score": "0.5502465", "text": "public function get_log() {\n\t\tglobal $event_dir;\n\t\tif(is_null($this->id)) throw new BadMethodCallException('Server must be in directory before log entries can be listed');\n\t\treturn $event_dir->list_events(array(), array(\"type\" => \"Server\", \"object_id\" => $this->id));\n\t}", "title": "" }, { "docid": "791a890a8fd93b41f1b972f601fb5b97", "score": "0.5500728", "text": "public static function getLog($id_order){\n $sql = '\n SELECT *\n FROM `'._DB_PREFIX_.'emails_log` \n WHERE id_order ='.$id_order ;\n $row = Db::getInstance()->getRow($sql);\n \n return $row;\n }", "title": "" }, { "docid": "2d1be7f9f4fde7846ded08c8f5121549", "score": "0.54875994", "text": "public function getLogs()\n\t{\n\t\t$path = $GLOBALS['db'][$GLOBALS['activeGroup']]['logdir'];\n\t\t$logfiles = glob($path.'/*.log',GLOB_BRACE);\n\t\t\n\t\t\n\t\t$csvArr = array();\n\t\tforeach ($logfiles as $logfile)\n\t\t{\n\t\t\t$csvArr = array_merge($csvArr,\n\t\t\t\t$this->csv_to_array(file_get_contents($logfile),\" | \",\n\t\t\t\t\t\tarray(\"level\",\"date\",\"action\",\"user\",\"message\")));\n\t\t}\n\t\t// Filter non-INFO events (usually ERROR)\n\t\t$csvArr = array_filter($csvArr,function(&$var)\n\t\t{\n\t\t\t//return ($var['level']=='INFO' && strpos($var['message'], '/me/draft/')!==FALSE);\n\t\t\t//return ($var['level']=='INFO' && strpos($var['action'], 'ACTION.LOGIN')!==FALSE);\n\t\t\t//return ($var['level']=='INFO');\n\t\t\treturn ($var['level']=='INFO' || $var['level']=='WARN');\n\t\t\t\n\t\t});\n\t\t\n\t\t$json['items']=array();\n\t\tforeach ($csvArr as $key=>$var)\n\t\t{\n\t\t\t// fix bug with missing user identification in old logs\n\t\t\tif ($var['action'] == 'ACTION.LOGIN' && $var['message']==null)\n\t\t\t{\n\t\t\t\t$nextevent = $csvArr[$key+1];\n\t\t\t\t$var['message'] = $var['user'];\n\t\t\t\t$var['user'] = ($nextevent)? $nextevent['user'] : '[admin @ 127.0.0.1]';\n\t\t\t}\n\t\t\t// get path of view, if relevant log event\n\t\t\tif ($var['action'] == 'GET' && strpos($var['message'], '/me/draft/')!==FALSE)\n\t\t\t{\n\t\t\t\t$keywords = preg_split(\"/[0-9]+/\",$var['message']);\n\t\t\t\t$var['view'] = array_pop($keywords);\n\t\t\t\t\n\t\t\t}\n\t\t\t\t\n\t\t\t//extract username\n\t\t\t$keywords = preg_split(\"/[\\[\\@ \\]]+/\", $var['user'] );\n\t\t\t$var['username'] = $keywords[1];\n\t\t\t$json['items'][] = $var;\n\t\t}\n\t\t\t\n\t\t$response = $this->app->response();\n\t\t$response['Content-Type'] = 'application/x-javascript';\n\t\t$response['X-Powered-By'] = 'openEssayist';\n\t\t$response->status(200);\n\t\t$response->body(json_encode($json));\n\t}", "title": "" }, { "docid": "84fa77e748ab9be1c84f49d0d58ed0fc", "score": "0.54385084", "text": "public function getChangelog() {\r\n\r\n $query = \"SELECT u.username, u.user_id, u.user_avatar, s.time AS timestamp, 'Article created' AS title, '' AS args\r\n FROM nuke_stories AS s\r\n LEFT JOIN nuke_users AS u ON u.user_id = s.user_id\r\n WHERE s.sid = ?\r\n UNION \r\n SELECT u.username, l.user_id, u.user_avatar, l.timestamp, l.title, l.args \r\n FROM log_staff AS l \r\n LEFT JOIN nuke_users AS u ON u.user_id = l.user_id\r\n WHERE `key` = 'article_id' \r\n AND key_val = ? \r\n UNION \r\n SELECT u.username, l.user_id, u.user_avatar, l.timestamp, l.title, l.args \r\n FROM log_general AS l \r\n LEFT JOIN nuke_users AS u ON u.user_id = l.user_id\r\n WHERE `key` = 'article_id' \r\n AND value = ? \r\n ORDER BY UNIX_TIMESTAMP(`timestamp`) DESC\";\r\n\r\n $params = [\r\n $this->id,\r\n $this->id,\r\n $this->id\r\n ];\r\n\r\n $return = $this->db->fetchAll($query, $params);\r\n\r\n foreach ($return as $key => $val) {\r\n\r\n $return[$key]['user'] = array(\r\n \"user_id\" => $val['user_id'],\r\n \"username\" => $val['username'],\r\n \"avatar\" => array(\r\n \"small\" => AvatarUtility::Format($val['user_avatar'], 50, 50),\r\n \"medium\" => AvatarUtility::Format($val['user_avatar'], 80, 80),\r\n \"large\" => AvatarUtility::Format($val['user_avatar'], 128, 128),\r\n ),\r\n \"url\" => UrlUtility::MakeURLs($val)->getURLs()\r\n );\r\n\r\n $return[$key]['args'] = json_decode($val['args'], true);\r\n }\r\n\r\n return $return;\r\n\r\n }", "title": "" }, { "docid": "18703eb9ab53345b075f898d85622bfe", "score": "0.5436033", "text": "public function getLogs()\n {\n static $levelMap = array(\n \\Phalcon\\Logger::DEBUG => \\Mist\\Log\\_1_0\\Level::DEBUG,\n \\Phalcon\\Logger::INFO => \\Mist\\Log\\_1_0\\Level::INFO,\n \\Phalcon\\Logger::NOTICE => \\Mist\\Log\\_1_0\\Level::NOTICE,\n \\Phalcon\\Logger::WARNING => \\Mist\\Log\\_1_0\\Level::WARNING,\n \\Phalcon\\Logger::ERROR => \\Mist\\Log\\_1_0\\Level::ERROR,\n \\Phalcon\\Logger::CRITICAL => \\Mist\\Log\\_1_0\\Level::CRITICAL,\n \\Phalcon\\Logger::ALERT => \\Mist\\Log\\_1_0\\Level::ALERT,\n \\Phalcon\\Logger::EMERGENCE => \\Mist\\Log\\_1_0\\Level::EMERGENCY\n );\n\n $fp = fopen(\"var://\".__CLASS__, 'r');\n $logList = array();\n while ($line = fgets($fp)) {\n $partList = explode(' ', substr($line, 0, -1), 2);\n $logList[] = strtolower($partList[0]).\" $partList[1]\";\n }\n\n return $logList;\n }", "title": "" }, { "docid": "3d91ae876dbc96bfe6eb37299a1c9d0c", "score": "0.5434231", "text": "function getAllLogEvents() {\n $sql = \"SELECT * FROM \\\"LogEvents\\\" ORDER BY \\\"ID\\\";\";\n return $this->getLogEventsImpl($sql);\n }", "title": "" }, { "docid": "a8d8fec5ba78b8f4e75ea5fbd74cb8db", "score": "0.5428341", "text": "public function getLogs()\n {\n $logs = array();\n\n while(!empty($this->messages)) {\n $logs[] = array_shift($this->messages);\n }\n\n return $logs;\n }", "title": "" }, { "docid": "58fd423fe57f4cd6057deff312682ed4", "score": "0.53996897", "text": "public function getLogs($project_id, $type, $offset = 0, $limit = 100){\n\t\t$limit = $offset.','.$limit;\n\t\tif($type == 'import') {\n\t\t\t$imported_file = $this->query('SELECT '.$this->getFieldList('imported_file').' FROM logs WHERE type=\"imported_file\" AND related_id IN (SELECT id FROM inputs WHERE project_id=\"'.$project_id.'\") ORDER BY time DESC LIMIT '.$limit);\n\t\t\t$field = $this->dataField('imported_file', 'filename');\n\t\t\t$file_list = Set::extract($imported_file, '{n}.logs.'.$field);\n\t\t\t$files = Set::combine($imported_file, '{n}.logs.'.$field, '{n}.logs');\n\t\t\tif(!$file_list)\n\t\t\t\t$file_list = array();\n\t\t\t$field = $this->dataField('imported_url', 'filename');\n\t\t\t//debug($field);\n\t\t\t$imported_url = $this->query('SELECT '.$this->getFieldList('imported_url').' FROM logs WHERE type IN (\"imported_url\",\"uploaded_file\") AND '.$field.' IN (\"'.implode('\",\"', $file_list).'\")');\n\t\t\t$imported_url = Set::combine($imported_url, '{n}.logs.'.$field, '{n}.logs');\n\t\t\t$logs = array();\n\t\t\tforeach($files as $t => $f){\n\t\t\t\t$l = array('type' => 'import', 'time' => $f['time']);\n\t\t\t\tforeach($this->data_fields as $j => $df) {\n\t\t\t\t\tif($f[$df])\n\t\t\t\t\t\t$l[$this->logTypes['imported_file'][$j]] = $f[$df];\n\t\t\t\t\tif($imported_url[$t] && $imported_url[$t][$df]) {\n\t\t\t\t\t\t$l[$this->logTypes['imported_url'][$j]] = $imported_url[$t][$df];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$l[$this->logTypes['imported_file']['related']] = $f['related_id'];\n\t\t\t\t$logs[$f['time']] = $l;\n\t\t\t}\n\t\t} else \n\t\t\n\t\tif($type == 'user') { //returns all user actions\n\t\t\t$models = array('values', 'inputs', 'exports', 'methods', 'units', 'users');\n\t\t\t$res = array();\n\t\t\t$users = array();\n\t\t\t$names = array();\n\t\t\tforeach($models as $model) {\n\t\t\t\tif($model != 'users') {\n\t\t\t\t\t$res[$model] = $this->query('SELECT type,'.$this->getFieldList('user_edited').' FROM logs WHERE type IN (\"edited\",\"created\") AND '.$this->dataField('user_edited', 'model').'=\"'.$model.'\" AND related_id IN (SELECT id FROM `'.$model.'` WHERE project_id=\"'.$project_id.'\") ORDER BY time DESC LIMIT '.$limit);\n\t\t\t\t\t$res[$model] = array_merge($res[$model], $this->query('SELECT type,'.$this->getFieldList('user_edited').' FROM logs WHERE type=\"deleted\" AND '.$this->dataField('user_edited', 'project_id').'=\"'.$project_id.'\" ORDER BY time DESC LIMIT '.$limit));\n\t\t\t\t} else {\n\t\t\t\t\t$res[$model] = $this->query('SELECT type,'.$this->getFieldList('user_edited').' FROM logs WHERE type=\"invited\" AND '.$this->dataField('user_edited', 'project_id').'=\"'.$project_id.'\" ORDER BY time DESC LIMIT '.$limit);\n\t\t\t\t}\n\t\t\t\tif(!count($res[$model]))\n\t\t\t\t\tcontinue;\n\t\t\t\t$list = Set::extract($res[$model], '{n}.logs.related_id');\n\t\t\t\t$list = implode(',', $list);\n\t\t\t\t$names[$model] = $this->query('SELECT id,name FROM `'.$model.'` WHERE id IN ('.$list.')');\n\t\t\t\t$names[$model] = Set::combine($names[$model], '{n}.'.$model.'.id', '{n}.'.$model.'.name');\n\t\t\t\t\n\t\t\t\t$list = Set::extract($res[$model], '{n}.logs.'.$this->dataField('user_edited', 'user'));\n\t\t\t\t$list = implode(',', $list);\n\t\t\t\t$users[$model] = $this->query('SELECT id,name FROM `users` WHERE id IN ('.$list.')');\n\t\t\t\t$users[$model] = Set::combine($users[$model], '{n}.users.id', '{n}.users.name');\n\t\t\t\t\n\t\t\t\t$res[$model] = Set::extract($res[$model], '{n}.logs');\n\t\t\t}\n\t\t\t\n\t\t\t$logs = array();\n\t\t\tforeach($res as $model => $r){\n\t\t\t\tforeach($r as $e) {\n\t\t\t\t\t$l = array('type' => 'user', 'time' => $e['time']);\n\t\t\t\t\tforeach($this->data_fields as $j => $df) {\n\t\t\t\t\t\tif($e[$df]) {\n\t\t\t\t\t\t\t$l[$this->logTypes['user_edited'][$j]] = $e[$df];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$l['action'] = $e['type'];\n\t\t\t\t\tif($l['action'] != 'deleted') {\n\t\t\t\t\t\t$l['related_id'] = $e['related_id'];\n\t\t\t\t\t\t$l['name'] = $names[$model][$e['related_id']];\n\t\t\t\t\t}\n\t\t\t\t\t$l['username'] = $users[$model][$l['user']];\n\t\t\t\t\t$logs[$e['time']] = $l;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} else \n\t\t\n\t\tif($type == 'data') {\n\t\t\t$imported_file = $this->query('SELECT '.$this->getFieldList('imported_file').' FROM logs WHERE type=\"imported_file\" AND related_id IN (SELECT id FROM inputs WHERE project_id=\"'.$project_id.'\") ORDER BY time DESC LIMIT '.$limit);\n\t\t\t$field = $this->dataField('imported_file', 'filename');\n\t\t\t$file_list = Set::extract($imported_file, '{n}.logs.'.$field);\n\t\t\t$files = Set::combine($imported_file, '{n}.logs.'.$field, '{n}.logs');\n\t\t\t\n\t\t\t$field = $this->dataField('imported_url', 'filename');\n\t\t\t//debug($field);\n\t\t\t$imported_url = $this->query('SELECT '.$this->getFieldList('imported_url').' FROM logs WHERE type=\"imported_url\" AND '.$field.' IN (\"'.implode('\",\"', $file_list).'\")');\n\t\t\t$imported_url = Set::combine($imported_url, '{n}.logs.'.$field, '{n}.logs');\n\t\t\t$logs = array();\n\t\t\tforeach($files as $t => $f){\n\t\t\t\t$l = array('type' => 'import', 'time' => $f['time']);\n\t\t\t\tforeach($this->data_fields as $j => $df) {\n\t\t\t\t\tif($f[$df])\n\t\t\t\t\t\t$l[$this->logTypes['imported_file'][$j]] = $f[$df];\n\t\t\t\t\tif($imported_url[$t] && $imported_url[$t][$df]) {\n\t\t\t\t\t\t$l[$this->logTypes['imported_url'][$j]] = $imported_url[$t][$df];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$l[$this->logTypes['imported_file']['related']] = $f['related_id'];\n\t\t\t\t$logs[$f['time']] = $l;\n\t\t\t}\n\t\t}\n\t\tkrsort($logs);\n\t\treturn $logs;\n\t}", "title": "" }, { "docid": "c872bf8f55cbfffdfc548ac54a914741", "score": "0.5390522", "text": "function getMyWorkLogs($userid) {\n $db = DB::getInstance();\n $logs = $db->query(\n \"SELECT id, last_update, note\n FROM sage_work_log\n WHERE user_id = \".$userid)->results(true);\n return $logs;\n }", "title": "" }, { "docid": "4fc62ed1a85bc03d9b7deffd6ad533bf", "score": "0.53619885", "text": "public function get($log_id)\n {\n return $this->apiClient->method('get')\n ->addPath('logs', $log_id)\n ->call();\n }", "title": "" }, { "docid": "a3e647d5c502712f747a0c8ca00b3976", "score": "0.535956", "text": "public function logs(){\n\t\t\treturn $this->hasMany(Log::class);\n\t\t}", "title": "" }, { "docid": "79656011e820dc8da83bc5722486e85b", "score": "0.5357833", "text": "public static function getLogs() {\n\t\treturn self::$logs;\n\t}", "title": "" }, { "docid": "eb3cc847b4f77c42ca97efb6aaf4ff21", "score": "0.53569454", "text": "public function get_log() {\n\t\tglobal $event_dir;\n\t\tif(is_null($this->id)) throw new BadMethodCallException('User must be in directory before log entries can be listed');\n\t\treturn $event_dir->list_events(array(), array(\"type\" => \"User\", \"object_id\" => $this->id));\n\t}", "title": "" }, { "docid": "f32946403e2676775ca32ff759e4212f", "score": "0.53504425", "text": "public function getLogics() : array\n {\n\n return $this->logics;\n }", "title": "" }, { "docid": "9d27d50fbc668d33c0786856f1d7b90f", "score": "0.534616", "text": "public static function logs(): array;", "title": "" }, { "docid": "689d904e2f5d13b28a39f28d38f8278c", "score": "0.53445995", "text": "public function logs(): HasMany\n {\n return $this->hasMany(Log::class);\n }", "title": "" }, { "docid": "d34f63931b17beb8f37a1d08d04947ae", "score": "0.53406864", "text": "public function get_audit_history($shift_id);", "title": "" }, { "docid": "b7303f7b3a5d64b1aef3aa9e0c61b72c", "score": "0.53390276", "text": "public function listAllLogs($table, $uuid) {\n try {\n return $this->loggerGatteway->getLog($table, $uuid);\n } catch (PDOException $ex) {\n throw $ex;\n }\n }", "title": "" }, { "docid": "cf6017a23325d9abe695502333c00f41", "score": "0.5324785", "text": "public static function get_logbook_entries()\n {\n return self::$m_logbook_entries;\n }", "title": "" }, { "docid": "98d1a2ee30b4aa6f544679c2199d06be", "score": "0.5312635", "text": "function get_order_log( $order_id ){\n\t\t// Only get Post Meta one time\n\t\tif( ! $this->order_log )\n\t\t\t$this->order_log = get_post_meta( $order_id, WCLSC_META_PREFIX . 'order_log', true );\n\n\t\tif( ! $this->order_log || ! is_array( $this->order_log ) )\n\t\t\t$this->order_log = array();\n\n\t\treturn $this->order_log;\n\t}", "title": "" }, { "docid": "0d34f196b445c7503e00aab69f4d1765", "score": "0.5282122", "text": "public function getLogsByCustomer($id)\n {\n\n $message_log = DB::table('message_logs')\n ->select(DB::raw('messenger_user_id, first_name, last_name, message, created_at'))\n ->where('id', $id)\n ->get();\n\n return response()->json($message_log);\n }", "title": "" }, { "docid": "c4de14c63f4d73969c8c1a939a2e75b7", "score": "0.5277552", "text": "public function getTimeLogs()\n {\n $employees = $this->getAll();\n $timeLogs = [];\n foreach ($employees as $employee) {\n $key = $employee['first_name'].' '.$employee['last_name'];\n $timeLogs[$key] = $this->getEmployeeTimeLogs($employee['id']); \n }\n return $timeLogs;\n }", "title": "" }, { "docid": "bdc7bf401e70e3cfbd2c1e6a32e49b38", "score": "0.52758837", "text": "public function getLogsOption()\n {\n if (!is_null($this->logsCache)) {\n return $this->logsCache;\n }\n $query = \"SELECT log.`id`, log.`name` FROM `cb_log` log\";\n try {\n $res = $this->db->query($query);\n } catch (\\PDOException $e) {\n return array();\n }\n $this->logsCache = array();\n while ($row = $res->fetchRow()) {\n $this->logsCache[$row['id']] = $row['name'];\n }\n return $this->logsCache;\n }", "title": "" }, { "docid": "859130c14a9f2aadd5071b247fcfd86b", "score": "0.5270893", "text": "public static function getLogs() {\n\t\t$logs = array();\n\t\tforeach (self::$_sources as $name => $source) {\n\t\t\t$logs[$name] = $source->getLogs();\n\t\t}\n\t\treturn $logs;\n\t}", "title": "" }, { "docid": "e99e2a375d64d5c4f6725307a1d006ef", "score": "0.5264412", "text": "public function get_audit_history($shift_id) {\n $sql_audits = $this->conn->execute_query(\"SELECT * FROM ShiftAuditTrail WHERE ShiftID=?\",\"d\",$shift_id);\n $audits = array();\n foreach ($sql_audits[1] as $sql_audit) {\n array_push($audits, new AuditTrail($sql_audit[\"ShiftID\"],\n strtotime($sql_audit[\"ModificationDate\"]),\n $sql_audit[\"Details\"]));\n }\n return $audits;\n }", "title": "" }, { "docid": "7b690b87b3b6e9d24d478658944b3ceb", "score": "0.5259112", "text": "public function getLoggers();", "title": "" }, { "docid": "2a503074d14352a1b11c3667d1223796", "score": "0.5254822", "text": "protected function readLogEntries() {\n\t\t$sql = \"SELECT\t\tcronjobs.*, cronjobs_log.*\n\t\t\tFROM\t\twcf\".WCF_N.\"_cronjobs_log cronjobs_log\n\t\t\tLEFT JOIN\twcf\".WCF_N.\"_cronjobs cronjobs\n\t\t\tON\t\t(cronjobs.cronjobID = cronjobs_log.cronjobID)\n\t\t\tWHERE\t\tcronjobs_log.cronjobID IN (\n\t\t\t\t\t\tSELECT\tcronjobID\n\t\t\t\t\t\tFROM\twcf\".WCF_N.\"_cronjobs cronjobs,\n\t\t\t\t\t\t\twcf\".WCF_N.\"_package_dependency package_dependency\n\t\t\t\t\t\tWHERE \tcronjobs.packageID = package_dependency.dependency\n\t\t\t\t\t\t\tAND package_dependency.packageID = \".PACKAGE_ID.\"\n\t\t\t\t\t)\n\t\t\tORDER BY\t\".(($this->sortField == 'classPath' || $this->sortField == 'description') ? 'cronjobs.' : 'cronjobs_log.').$this->sortField.\" \".$this->sortOrder;\n\t\t$result = WCF::getDB()->sendQuery($sql, $this->itemsPerPage, ($this->pageNo - 1) * $this->itemsPerPage);\n\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\tif ($row['error']) {\n\t\t\t\t$row['error'] = nl2br(StringUtil::encodeHTML($row['error']));\n\t\t\t}\n\t\t\t$this->logEntries[] = $row;\n\t\t}\n\t}", "title": "" }, { "docid": "c02464dfa1b9940c31ae89ee95e9dfa1", "score": "0.5236603", "text": "public static function getLogsByOrganization($organization) {\n\t\t$bdd = DB::getInstance();\n\t\t$logs = NULL;\n\n\t\tif($organization === NULL OR $organization === -1) {\n\t\t\t$reponse = $bdd->query(\n\t\t\t 'SELECT Logs.id, Utilisateurs.nom_utilisateur, Organisations.nom AS nom_organisation, Types_log.type, Logs.datetime_creation AS datetime, Logs.commentaire\n\t\t\t\tFROM Logs\n\t\t\t\tLEFT JOIN Utilisateurs ON Logs.utilisateur = Utilisateurs.id\n\t\t\t\tINNER JOIN Types_log ON Logs.type = Types_log.id\n\t\t\t\tLEFT JOIN Organisations ON Logs.organisation = Organisations.id\n\t\t\t\tORDER BY datetime DESC;\n\t\t\t');\n\t\t}\n\t\telse {\n\t\t\t$reponse = $bdd->prepare(\n\t\t\t 'SELECT Logs.id, Utilisateurs.nom_utilisateur, Organisations.nom AS nom_organisation, Types_log.type, Logs.datetime_creation AS datetime, Logs.commentaire\n\t\t\t\tFROM Logs\n\t\t\t\tLEFT JOIN Utilisateurs ON Logs.utilisateur = Utilisateurs.id\n\t\t\t\tINNER JOIN Types_log ON Logs.type = Types_log.id\n\t\t\t\tLEFT JOIN Organisations ON Logs.organisation = Organisations.id\n\t\t\t\tWHERE (Logs.organisation = :organisation OR parent = :organisation)\n\t\t\t\tORDER BY datetime DESC;\n\t\t\t');\n\t\t\t$reponse->execute(array('organisation' => $organization));\n\t\t}\n\n\t\t$logs = $reponse->fetchAll(PDO::FETCH_ASSOC);\n\n\t\treturn $logs;\n\t}", "title": "" }, { "docid": "db77c9c67b8b3ee4d48a8e984f9a7950", "score": "0.5232011", "text": "public function allWithLogs()\n {\n return array_filter(\n $this->allFinished(),\n function ($workflow) {\n return $workflow->get('has_operation_log_output');\n }\n );\n }", "title": "" }, { "docid": "ee9de2d8e90159fdf0e164eb8d70a308", "score": "0.52209586", "text": "public function log(): array\n {\n try {\n $log = Data::read($this->logfile(), 'json');\n $read = true;\n } catch (Throwable $e) {\n $log = [];\n $read = false;\n }\n\n // ensure that the category arrays are defined\n $log['by-ip'] = $log['by-ip'] ?? [];\n $log['by-email'] = $log['by-email'] ?? [];\n\n // remove all elements on the top level with different keys (old structure)\n $log = array_intersect_key($log, array_flip(['by-ip', 'by-email']));\n\n // remove entries that are no longer needed\n $originalLog = $log;\n $time = time() - $this->kirby->option('auth.timeout', 3600);\n foreach ($log as $category => $entries) {\n $log[$category] = array_filter($entries, function ($entry) use ($time) {\n return $entry['time'] > $time;\n });\n }\n\n // write new log to the file system if it changed\n if ($read === false || $log !== $originalLog) {\n if (count($log['by-ip']) === 0 && count($log['by-email']) === 0) {\n F::remove($this->logfile());\n } else {\n Data::write($this->logfile(), $log, 'json');\n }\n }\n\n return $log;\n }", "title": "" }, { "docid": "d62070fbb70a322280245ac3d1a33462", "score": "0.5216135", "text": "public function getLogsAt($offset)\n {\n return $this->get(self::LOGS, $offset);\n }", "title": "" }, { "docid": "3ed90467209367bf8d040ad4809321de", "score": "0.51997155", "text": "public function logs_get_all_events_newer_than($id, $limit)\n {\n global $send_debug_logs_to_server;\n global $logger;\n\n $to_send = array();\n\n\n $where = \"WHERE id > $id\";\n if($send_debug_logs_to_server == false)\n $where .= \" AND loglevel < \" . LogLevel::$log_levels[LogLevel::DEBUG];\n\n $statement = $this->db->prepare('SELECT `id`, `event_time`, `asset`, `course`, `author`, `cam_slide`, `context`, `type_id`, `loglevel`, `message` FROM '.\n self::LOG_TABLE_NAME.\" $where ORDER BY id LIMIT 0,$limit\");\n\n $success = $statement->execute();\n if(!$success) {\n $logger->log(EventType::LOGGER, LogLevel::CRITICAL, \"logs_get_all_events_newer_than failed\", array(\"RecorderLogger\"));\n return $to_send;\n }\n\n $results = $statement->fetchAll(PDO::FETCH_ASSOC);\n\n foreach($results as $key => $value) {\n $server_log = $this->convert_event_to_server_event($value);\n array_push($to_send, $server_log);\n\n }\n return $to_send;\n }", "title": "" }, { "docid": "f4e7bbc6aaf2723647b13b91bc1f3a54", "score": "0.51848584", "text": "public function showLogs()\n {\n return $this->json((new ApiLogsBroker())->findAll());\n }", "title": "" }, { "docid": "830935fbfe0416394d9da49f63e4394f", "score": "0.5179491", "text": "public function get_log()\n {\n $id_log = $_POST['id_log'];\n\n echo json_encode($this->db->get_where('log_project', ['id_log' => $id_log])->row_array());\n }", "title": "" }, { "docid": "27944009d30cb53f08f1ace75b217520", "score": "0.517362", "text": "public function showLog()\r\n {\r\n $query = \"SELECT * \r\n FROM log\r\n Order By id DESC \r\n Limit 10\";\r\n $stmt = self::$dbh->prepare($query);\r\n $stmt->execute();\r\n return $stmt->fetchAll(\\PDO::FETCH_ASSOC);\r\n }", "title": "" }, { "docid": "bb32b2f61c693eb16383a8ef6a37c4ef", "score": "0.51637894", "text": "public function get_history_from_history_id( $id , $_viewer_id ) {\n\t\t\n\t\t$rows = DB::query(\"SELECT u.nickname, u.thumb, h.pseudo_user_id, h.parent_id, h.user_id\n\t\t\t\t\t\t\t\t\t\t\t FROM history_items h \n\t\t\t\t\t\t\t\t\t\t\t left join users u on u.user_id = h.user_id\n\t\t\t\t\t\t\t\t\t\t\t WHERE h.history_id = '{$id}' \n\t\t\t\t\t\t\t\t\t\t \t ORDER BY h.time_created asc\n\t\t\t\t\t\t\t\t\t\t\t LIMIT 100\");\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t//dump( $rows );\n\t\t\n\t\t//echo \"OK<br/>\";\n\t\t\n\t\t//$new_array = $this->full_thread( $rows , \"\" );\n\t\t\n\t\t$_referrer_id = $this->url_user_id;\n\t\t//echo \"WET: \".$_referrer_id ;\n\t\t$new_array = $this->get_linear_viewing_history( $rows , $_viewer_id , $_referrer_id );\n\t\t\n\t\t//$this->print_recursive( $new_array );\n\t\t//dump( $rows );\n\t\t\n\t\treturn $new_array;\n\t\t//die();\n\t}", "title": "" }, { "docid": "b73ab7f5f70925ead44f0b09c69eb639", "score": "0.516305", "text": "public function getLogsFromCurrentFile()\n {\n if ($this->currentFile === null) {\n return [];\n }\n\n if (File::size($this->currentFile) > $this->maxFileSize) {\n return;\n }\n\n $datePattern = '\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}';\n $pattern = \"/\\\\[$datePattern\\\\].*/\";\n $fileContent = File::get($this->currentFile);\n\n preg_match_all($pattern, $fileContent, $rows);\n\n if (! is_array($rows) || count($rows) === 0) {\n return [];\n }\n\n $rows = $rows[0];\n $logs = [];\n\n foreach ($rows as $row) {\n preg_match(\n \"/^\\\\[($datePattern)\\\\].*?(\\\\w+)\\\\.\"\n .'([A-Z]+): (.*?)( in .*?:[0-9]+)?$/',\n $row,\n $matches\n );\n\n if (! isset($matches[4])) {\n continue;\n }\n\n $level = Str::lower($matches[3]);\n\n $inFile = null;\n if (isset($matches[5])) {\n $inFile = substr($matches[5], 4);\n }\n\n $logs[] = (object) [\n 'context' => $matches[2],\n 'level' => $level,\n 'levelClass' => static::$levelsClasses[$level],\n 'levelImg' => static::$levelsImgs[$level],\n 'date' => $matches[1],\n 'text' => trim($matches[4]),\n 'inFile' => $inFile,\n ];\n }\n\n return array_reverse($logs);\n }", "title": "" }, { "docid": "51b693b7c2d26205cbc7cf3fd7b3149d", "score": "0.5156831", "text": "public function getRevisionLog($identifier);", "title": "" }, { "docid": "24e24c06f1b3a5dca5066d5ec1edb67c", "score": "0.5144005", "text": "public function requestLogs()\n {\n return $this->hasMany('Restboat\\Models\\RequestLog', 'request_id', 'id');\n }", "title": "" }, { "docid": "dffb1e272e8bab759991c1ae014d40d2", "score": "0.5113742", "text": "public function getLogs(): string\n {\n $html = '<ul>';\n\n foreach ($_SESSION['ALOGGER'] as $line) {\n $html .= \"<li>{$line->date} : {$line->type} | {$line->text}</li>\";\n }\n\n $html .= '</ul>';\n unset($_SESSION['ALOGGER']);\n return $html;\n }", "title": "" }, { "docid": "68dabb10c188bd8053d7b55174e9ec5e", "score": "0.51125294", "text": "public function getQueryLogs(): array\n {\n return $this->_getQueryLogs();\n }", "title": "" }, { "docid": "59c1cb1fc3bcaab763cd766915878e46", "score": "0.51046115", "text": "public function getEventLogs(): Collection\n {\n $transaction = Transaction::all();\n \n return $transaction;\n }", "title": "" }, { "docid": "a7196ae3ab7ffa7c283a41b7dbb38771", "score": "0.509848", "text": "function getUserLogs(){\n $log_query = \"SELECT `logID`, `type`, `date` FROM `logs_users` WHERE `userID`='\".$_SESSION['uid'].\"' ORDER BY `logID` DESC\";\n $log_get = mysqli_query($GLOBALS['link'], $log_query) or die(\"MySQL Error: Failed to get user logs.\");\n return $log_get;\n }", "title": "" }, { "docid": "7293f5c43a2d06efbd6767e39de4fa41", "score": "0.50930643", "text": "public static function getAdminLogData($id) {\n global $lC_Database;\n\n $Qlog = $lC_Database->query('select al.id, al.module, al.module_action, al.module_id, al.action, a.user_name, unix_timestamp(al.datestamp) as datestamp from :table_administrators_log al, :table_administrators a where al.id = :id and al.administrators_id = a.id limit 1');\n $Qlog->bindTable(':table_administrators_log', TABLE_ADMINISTRATORS_LOG);\n $Qlog->bindTable(':table_administrators', TABLE_ADMINISTRATORS);\n $Qlog->bindInt(':id', $id);\n $Qlog->execute();\n\n $data = $Qlog->toArray();\n $data['date'] = @date('M d Y H:i:s', $Qlog->value('datestamp'));\n\n $Qlog->freeResult();\n\n $Qentries = $lC_Database->query('select action, field_key, old_value, new_value from :table_administrators_log where id = :id');\n $Qentries->bindTable(':table_administrators_log', TABLE_ADMINISTRATORS_LOG);\n $Qentries->bindInt(':id', $id);\n $Qentries->execute();\n $log_html = '';\n while ( $Qentries->next() ) {\n switch ( $Qentries->value('action') ) {\n case 'delete':\n $bgColor = '#E23832';\n $color = '#fff'; \n break;\n case 'insert':\n $bgColor = '#96E97A';\n $color = '#000'; \n break;\n default:\n $bgColor = '#FFC881';\n $color = '#000';\n break;\n }\n $log_html .= '<tr><td valign=\"top\" style=\"background-color:' . $bgColor . '; color:' . $color . ';\">' . $Qentries->valueProtected('field_key') . '</td><td valign=\"top\" style=\"background-color:' . $bgColor . '; color:' . $color . ';\">' . nl2br($Qentries->valueProtected('old_value')) . '</td><td valign=\"top\" style=\"background-color:' . $bgColor . '; color:' . $color . ';\">' . nl2br($Qentries->valueProtected('new_value')) . '</td></tr>';\n }\n\n $Qentries->freeResult();\n\n $data['log_html'] = $log_html;\n\n return $data;\n }", "title": "" }, { "docid": "2d479f315e8820732d0c0db37b493cde", "score": "0.509303", "text": "function getUserLogs(){\n\t\t\t$strQuery=\"select * from userlogs\";\n \treturn $this->query($strQuery);\n\t\t}", "title": "" }, { "docid": "1c8d902b2bbb3338542892cc738c06b3", "score": "0.5089379", "text": "public function get_download_logs_for_permission( $permission_id );", "title": "" }, { "docid": "7a907ba2158744a7ca06d201a53f97d8", "score": "0.5084193", "text": "public function show_all_data(){\n\t\t$sql = sprintf(\"SELECT * FROM logs ORDER BY id_log DESC\");\n\t\t$query = $this->devolverConsulta($sql);\n $array = [];\n while($result = mysqli_fetch_assoc($query)){\n $log = new TOerror( $result['id_log'],$result['user'],$result['date']);\n array_push($array, $log);\n }\n\n\t\treturn $array; \n\t}", "title": "" }, { "docid": "960a0e9f9adeb2a180949dd93db63f31", "score": "0.50795096", "text": "public function get_log($context);", "title": "" }, { "docid": "30669f8fdbbc6919c84c71cef75fcb44", "score": "0.5076194", "text": "function get_activity_stream($cid) {\r\n $this->db->select('*');\r\n $this->db->from('logging');\r\n $this->db->where('cid', $cid);\r\n $this->db->order_by(\"datelogged\", \"desc\");\r\n $query = $this->db->get();\r\n if ($query->num_rows >= 1) {\r\n return $query->result_array();\r\n }\r\n }", "title": "" }, { "docid": "2dbeeba008e3da0e2346b8f5a29f59fc", "score": "0.5072425", "text": "private function getLogs()\n {\n $logs = [];\n $statusText = (new Code)->statusText;\n foreach ($this->resourceLogger as $resourceLog) {\n list($request, $response) = $resourceLog;\n $logs[] = [\n 'request' => $request->toUriWithMethod(),\n 'code' => \"{$response->code} {$statusText[$response->code]}\",\n 'body' => (string)$response\n ];\n }\n return $logs;\n }", "title": "" }, { "docid": "bdae3c066c2927a50b93cc2769d34889", "score": "0.506932", "text": "Public Function getLogMessages() { Return $this->log; }", "title": "" }, { "docid": "86e873e2844f218c39fe205bea6ce5f0", "score": "0.5067636", "text": "public function actionList_log(){\n\t\tif(isset($_GET['date']))\n\t\t\t$logs = TimesheetLog::model()->findAllForWeek(NTime::dateToUnix($_GET['date']));\n\t\tif(isset($_GET['start'])){\n\t\t\t$logs = TimesheetLog::model()->findLogsBetween($_GET['start'], $_GET['end']);\n\t\t}\n\t\techo CJSON::encode($logs);\n\t}", "title": "" }, { "docid": "2dd7ccaf3020d25737d12c73f2d1814c", "score": "0.50652957", "text": "public function actionLogs()\n {\n $searchModel = new ActionLogSearch();\n $pid = Yii::$app->request->queryParams['pid'];\n \n $searchModel->loadUserid(\\Yii::$app->user->id);\n if(is_numeric($pid) && $pid >0){\n //查看项目日志\n $searchModel->loadUserid(null);\n if( !\\Yii::$app->user->can('actionlog_admin') ){ \n //非日志管理员 检查项目id,不属于自己的项目,只列出自己相关日志\n $fid = Procurement::findOne($pid)->userid;\n if($fid!=\\Yii::$app->user->id){\n Yii::$app->getSession()->setFlash('info', \"由于权限设置,只列出该项目与您相关的操作日志!\");\n $searchModel->loadUserid(\\Yii::$app->user->id);\n }\n }\n $searchModel->loadPID($pid);\n }\n if(\\Yii::$app->user->can('actionlog_admin')){\n $searchModel->loadUserid(null);\n }\n \n \n $dataProvider = $searchModel->search(Yii::$app->request->queryParams,true);\n \n return $this->render('logs', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "d1ee867859c59ada240e3e6715b0efd8", "score": "0.5051894", "text": "public function getAllLogs($limit = 25, $paginate = true)\n {\n if ($paginate) {\n return \\Kingsleyudenewu\\AuditTrail\\Models\\AuditTrail::paginate($limit);\n }\n\n return \\Kingsleyudenewu\\AuditTrail\\Models\\AuditTrail::all();\n }", "title": "" }, { "docid": "4dcdb11a7321282c73d680e4fac097f1", "score": "0.50514984", "text": "function getLogs(\\Aliyun\\Log\\Client $client, $project, $logstore) {\n $topic = 'MainFlow';\n $from = time()-3600;\n $to = time();\n $request = new \\Aliyun\\Log\\Models\\Request\\GetLogsRequest($project, $logstore, $from, $to, $topic, '', 100, 0, False);\n\n try {\n $response = $client->getLogs($request);\n foreach($response -> getLogs() as $log)\n {\n print $log -> getTime().\"\\t\";\n foreach($log -> getContents() as $key => $value){\n print $key.\":\".$value.\"<br>\";\n }\n print \"\\n\";\n }\n\n } catch (\\Aliyun\\Log\\Exception $ex) {\n logVarDump($ex);\n } catch (\\Exception $ex) {\n logVarDump($ex);\n }\n}", "title": "" }, { "docid": "ff05390f217a2866bd002a8f6cdf9545", "score": "0.5051284", "text": "public function logs()\n {\n return $this->hasMany(Loginlog::class);\n }", "title": "" }, { "docid": "1bf02a4ea64ced6855cdfed88279544b", "score": "0.5044086", "text": "function get_login_logs($db)\r\n\t{\r\n\t\tif(!is_a($db,\"SQLite3\"))\r\n\t\t{\r\n\t\t\ttrigger_error(\"Handle passed to function get_login_logs is not a valid database.\",E_USER_ERROR);\r\n\t\t\treturn array();\r\n\t\t}\r\n\t\t//Create empty storage array\r\n\t\t$logs=array();\r\n\t\t//Prepare statement for selecting\r\n\t\t$statement=$db->prepare(\"SELECT ip,time,browser,status,unread FROM login\");\r\n\t\tif($statement !== false)\r\n\t\t{\r\n\t\t\t//Execute statement\r\n\t\t\t$result=$statement->execute();\r\n\t\t\tif($result !== false)\r\n\t\t\t{\r\n\t\t\t\t//Loop through all entries\r\n\t\t\t\twhile($entry=$result->fetchArray(SQLITE3_ASSOC))\r\n\t\t\t\t{\r\n\t\t\t\t\t//Setup default\r\n\t\t\t\t\t$logentry=array(\"ip\" => \"127.0.0.1\", \"time\" => 0, \"browser\" => \"ERROR\", \"status\" => 0, \"unread\" => 0);\r\n\t\t\t\t\t//Get data from result\r\n\t\t\t\t\tif(isset($entry[\"IP\"]))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$logentry[\"ip\"]=$entry[\"IP\"];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(isset($entry[\"Time\"]))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$logentry[\"time\"]=$entry[\"Time\"];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(isset($entry[\"Browser\"]))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$logentry[\"browser\"]=$entry[\"Browser\"];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(isset($entry[\"Status\"]))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$logentry[\"status\"]=$entry[\"Status\"];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(isset($entry[\"Unread\"]))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$logentry[\"unread\"]=$entry[\"Unread\"];\r\n\t\t\t\t\t}\r\n\t\t\t\t\t//Make log entry object\r\n\t\t\t\t\t$entryobject=new LoginLogEntry($logentry[\"ip\"],$logentry[\"browser\"],$logentry[\"time\"],$logentry[\"status\"],$logentry[\"unread\"]);\r\n\t\t\t\t\t//Add object to list\r\n\t\t\t\t\t$logs[]=$entryobject;\r\n\t\t\t\t}\r\n\t\t\t\t//Close statement\r\n\t\t\t\t$statement->close();\r\n\t\t\t\tunset($statement);\r\n\t\t\t\treturn $logs;\r\n\t\t\t}\r\n\t\t\t//Failed to execute statement\r\n\t\t\ttrigger_error(\"Failed to execute statement in function get_login_logs.\",E_USER_ERROR);\r\n\t\t\tgoto failure;\r\n\t\t}\r\n\t\t//Failed to create statement\r\n\t\ttrigger_error(\"Failed to create statement in function get_login_logs.\",E_USER_ERROR);\r\n\t\tfailure:\r\n\t\t//Close statement if necessary\r\n\t\tif(isset($statement) && is_a($statement,\"SQLite3Stmt\"))\r\n\t\t{\r\n\t\t\t$statement->close();\r\n\t\t\tunset($statement);\r\n\t\t}\r\n\t\t//Exit\r\n\t\treturn $logs;\r\n\t}", "title": "" }, { "docid": "062bb17f8a676956fbcfbed638b6bfce", "score": "0.5041399", "text": "function sms_survey_getinlogs($link_id) {\n\t$ret = array();\n\t$db_query = \"SELECT * FROM \"._DB_PREF_.\"_featureSurvey_log WHERE link_id='$link_id' AND incoming='1' ORDER BY id\";\n\t$db_result = dba_query($db_query);\n\t$i = 0;\n\twhile ($db_row = dba_fetch_array($db_result)) {\n\t\t$ret[$i] = $db_row;\n\t\t$i++;\n\t}\n\treturn $ret;\n}", "title": "" }, { "docid": "22250976b17a474d15f78829ba40821f", "score": "0.502958", "text": "public function getLogs(): string\n {\n }", "title": "" }, { "docid": "2aa11dc68fdb8f6e82fea76f5d05bdbe", "score": "0.50212896", "text": "public function logs($string = false) {\n\t\tif ($string) {\n\t\t\t$return = '' ;\n\t\t\tforeach($this->_logs as $log) {\n\t\t\t\t$return .= $log['method'] . ' : ' . $log['path'] ;\n\t\t\t\tif (!empty($log['data'])) {\n\t\t\t\t\t$return .= ' > ' . $log['data'] ;\n\t\t\t\t}\n\t\t\t\t$return .= \"\\n\" ;\n\t\t\t}\n\t\t\treturn $return ;\n\t\t}\n\t\treturn $this->_logs ;\n\t}", "title": "" }, { "docid": "5c2da33ea6dc8d6c5cbb61e30b909921", "score": "0.50141746", "text": "public function get()\n {\n $entries = [];\n\n $files = $this->getLogFiles();\n\n if (is_array($files)) {\n // Retrieve the log files\n foreach ($files as $log) {\n // Set the current log path for easy manipulation of the file if needed\n $this->setCurrentLogPath($log['path']);\n\n // Parse the log into an array of entries, passing\n // in the level so it can be filtered\n $parsedLog = $this->parseLog($log['contents'], $this->getLevel());\n\n // Create a new Entry object for each parsed log entry\n foreach ($parsedLog as $entry) {\n $newEntry = new Entry($entry);\n\n // Check if the entry has already been read, and if read entries should be included.\n // If includeRead is false, and the entry is read, then continue processing.\n if (!$this->includeRead && $newEntry->isRead()) {\n continue;\n }\n\n $entries[] = $newEntry;\n }\n }\n\n // Return a new Collection of entries\n return $this->postCollectionModifiers(new Collection($entries));\n }\n\n $message = 'Unable to retrieve files from path: '.$this->getLogPath();\n\n throw new UnableToRetrieveLogFilesException($message);\n }", "title": "" }, { "docid": "175b5756f836a665fe942b17530e909e", "score": "0.50046504", "text": "function getActionLogs( &$pListHash ) {\n\t\tLibertyContent::prepGetList( $pListHash );\n\n\t\t$ret = $bindVars = array();\n\t\t$selectSql = $joinSql = $orderSql = $whereSql = '';\n\n\t\tif( !empty( $pListHash['find'] ) ) {\n\t\t\t$whereSql .= empty( $whereSql ) ? ' WHERE ' : ' AND ';\n\t\t\t$whereSql .= \" UPPER( lal.`log_message` ) LIKE ? \";\n\t\t\t$bindVars[] = '%'.strtoupper( $pListHash['find'] ).'%';\n\t\t}\n\n\t\tif( !empty( $pListHash['find_title'] ) ) {\n\t\t\t$whereSql .= empty( $whereSql ) ? ' WHERE ' : ' AND ';\n\t\t\t$whereSql .= \" UPPER( lal.`title` ) LIKE ? \";\n\t\t\t$bindVars[] = '%'.strtoupper( $pListHash['find_log'] ).'%';\n\t\t}\n\n\t\tif( !empty( $pListHash['user_id'] ) ) {\n\t\t\t$whereSql .= empty( $whereSql ) ? ' WHERE ' : ' AND ';\n\t\t\t$whereSql .= \" lal.`user_id` = ? \";\n\t\t\t$bindVars[] = $pListHash['user_id'];\n\t\t}\n\n\t\tif( !empty( $pListHash['content_id'] ) ) {\n\t\t\t$whereSql .= empty( $whereSql ) ? ' WHERE ' : ' AND ';\n\t\t\t$whereSql .= \" lal.`content_id` = ? \";\n\t\t\t$bindVars[] = $pListHash['content_id'];\n\t\t}\n\n\t\tif( !empty( $pListHash['sort_mode'] )) {\n\t\t\tif( preg_match( \"/^last_modified|^title/\", $pListHash['sort_mode'] )) {\n\t\t\t\t$pListHash['sort_mode'] = \"lal.\".$pListHash['sort_mode'];\n\t\t\t}\n\t\t\t$orderSql = \" ORDER BY \".$this->mDb->convertSortmode( $pListHash['sort_mode'] ).\" \";\n\t\t}\n\n\t\t$query = \"\n\t\t\tSELECT lal.*,\n\t\t\t\tlc.`content_type_guid`, lc.`created`, lct.`content_name`, lct.`content_name_plural`,\n\t\t\t\tuue.`login` AS modifier_user, uue.`real_name` AS modifier_real_name\n\t\t\tFROM `\".BIT_DB_PREFIX.\"liberty_action_log` lal\n\t\t\t\tLEFT OUTER JOIN `\".BIT_DB_PREFIX.\"liberty_content` lc ON ( lc.`content_id` = lal.`content_id` )\n\t\t\t\tLEFT OUTER JOIN `\".BIT_DB_PREFIX.\"liberty_content_types` lct ON ( lct.`content_type_guid` = lc.`content_type_guid` )\n\t\t\t\tLEFT OUTER JOIN `\".BIT_DB_PREFIX.\"users_users` uue ON ( uue.`user_id` = lal.`user_id` )\n\t\t\t$whereSql $orderSql\";\n\n\t\t$result = $this->mDb->query( $query, $bindVars, $pListHash['max_records'], $pListHash['offset'] );\n\n\t\twhile( $aux = $result->fetchRow() ) {\n\t\t\t$aux['user'] = $aux['modifier_user'];\n\t\t\t$aux['editor'] = ( isset( $aux['modifier_real_name'] ) ? $aux['modifier_real_name'] : $aux['modifier_user'] );\n\t\t\t$aux['display_name'] = BitUser::getTitle( $aux );\n\t\t\t$ret[] = $aux;\n\t\t}\n\n\t\t$query = \"SELECT COUNT( lal.`user_id` ) FROM `\".BIT_DB_PREFIX.\"liberty_action_log` lal $whereSql\";\n\t\t$pListHash['cant'] = $this->mDb->getOne( $query, $bindVars );\n\t\tLibertyContent::postGetList( $pListHash );\n\n\t\treturn $ret;\n\t}", "title": "" } ]
e7f46a41e29bef2b6957d71ea9a796e5
//////////////////////////////////////////////// Method to cancel consultation ////////////////////////////////
[ { "docid": "1c7dde0827d4636055cc44ab4de9e808", "score": "0.0", "text": "function removeConsultation($id)\r\n{\r\n require 'dbconn.php';\r\n\r\n //$u_pList = loadProdList($id, null);\r\n try\r\n {\r\n $s = \"SELECT status FROM `consultation` WHERE `status`= 'Arrived' AND id = $id\";\r\n $r = $pdo->query($s);\r\n }\r\n catch(PDOException $e)\r\n {\r\n return \"query\";\r\n }\r\n\r\n if ($r->rowCount() == 0)\r\n {\r\n try\r\n {\r\n $s1 = \"select status from consultation where id = $id\";\r\n $r1 = $pdo->query($s1);\r\n } catch (PDOException $e)\r\n {\r\n return \"query1\";\r\n }\r\n\r\n// while ($row = $r1->fetch())\r\n// {\r\n// $a = $row['status'];\r\n// }\r\n//\r\n// if ($a == 0)\r\n// {\r\n// return \"removed\";\r\n// }\r\n// else\r\n {\r\n try\r\n {\r\n// $s2 = \"UPDATE `consultation` SET `status`= 'Cancelled' WHERE id= $id\";\r\n $s2 = \"DELETE FROM `consultation` WHERE id= $id\";\r\n $r2 = $pdo->exec($s2);\r\n } catch (PDOException $e)\r\n {\r\n return \"query2\";\r\n }\r\n\r\n if ($r2 > 0)\r\n {\r\n return \"inactive\";\r\n }\r\n else\r\n {\r\n return \"rows\";\r\n }\r\n }\r\n }\r\n else\r\n {\r\n try\r\n {\r\n $s3 = \"DELETE FROM `consultation` WHERE id= $id\";\r\n $r3 = $pdo->exec($s3);\r\n }\r\n catch(PDOException $e)\r\n {\r\n return \"query1\";\r\n }\r\n\r\n if ($r3 > 0)\r\n {\r\n return \"remove\";\r\n }\r\n else\r\n {\r\n return \"rows\";\r\n }\r\n }\r\n\r\n try\r\n {\r\n $s3 = \"select scheduleID from consultation where id = $id\";\r\n $r3 = $pdo->query($s3);\r\n }\r\n catch (PDOException $e)\r\n {\r\n }\r\n\r\n if ($r3->rowCount() > 0)\r\n {\r\n foreach($r3 as $row)\r\n {\r\n $c_sID = $row['scheduleID'];\r\n }\r\n\r\n try\r\n {\r\n $s4 = \"update `schedule` set `available`=0 where id = $c_sID\";\r\n $r4 = $pdo->exec($s4);\r\n }\r\n catch(PDOException $e)\r\n {\r\n }\r\n }\r\n else\r\n {\r\n }\r\n}", "title": "" } ]
[ { "docid": "3d220888230c0f4300b531e217f5e6ed", "score": "0.7701852", "text": "public function cancel();", "title": "" }, { "docid": "29679fffab2c6ad5790fc958f9e4b974", "score": "0.7582693", "text": "public function cancel(){\n\t\t\t\n\t}", "title": "" }, { "docid": "c8d713fd3b6c5c702cd50691a5bdae05", "score": "0.71606386", "text": "public function cancel(){\n if($this->start_flag==1){\n $this->dbh->rollback();\n $this->start_flag =0;\n }\n else throw new Exception (\"An error occured without rolling back the last query\");\n }", "title": "" }, { "docid": "d9d7f94e4a9bd53d0fc674d512c2fcb1", "score": "0.704135", "text": "function cancel()\n\t{\n\t\t$msg = JText::_('LNG_OPERATION_CANCELLED',true);\n\t\t$this->setRedirect( 'index.php?option='.getBookingExtName(), $msg );\n\t}", "title": "" }, { "docid": "83a5203671d584cf1d4d4f1f2679e03c", "score": "0.70259696", "text": "public function cancel()\n {\n $this->updateMode = false;\n $this->resetInputFields();\n }", "title": "" }, { "docid": "83a5203671d584cf1d4d4f1f2679e03c", "score": "0.70259696", "text": "public function cancel()\n {\n $this->updateMode = false;\n $this->resetInputFields();\n }", "title": "" }, { "docid": "2133bf15b188460f9463c82e172120a6", "score": "0.7021364", "text": "public function cancellarepAction(){\n $id = intval($this->_request->getParam('id'));\n\n if ($id !== 0) {\n $this->_adminModel->deleteReparto($id);\n }\n }", "title": "" }, { "docid": "e05f312d6f24f7d7267b0ef3d91c9066", "score": "0.696309", "text": "function cancel(){\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\n\t\t$cid\t= JRequest::getVar( 'cid', array(0), 'post', 'array' );\n\t\t$this->_authoriseAccess((int) $cid[0]);\n\n\t\t$model = & $this->getModel(\"person\", \"PeopleModel\");\n\n\t\t$model->getData();\n\n\t\t// Check the table in so it can be edited.... we are done with it anyway\n\t\t$model->checkin();\n\n\t\t$returntask\t= JRequest::getVar( 'returntask', \"people.overview\");\n\t\tif ($returntask!=\"people.list\" && $returntask!=\"people.overview\" && $returntask!=\"people.select\"){\n\t\t\t$returntask=\"people.overview\";\n\t\t}\n\t\t$tmpl = \"\";\n\n\t\tif (method_exists($this,str_replace(\"people.\",\"\",$returntask))){\n\t\t\t$returntask = str_replace(\"people.\",\"\",$returntask);\n\t\t\treturn $this->$returntask();\n\t\t}\n\t\tif ($returntask==\"people.select\" || JRequest::getString(\"tmpl\",\"\")==\"component\"){\n\t\t\t$tmpl =\"&tmpl=component\";\n\t\t}\n\t\t$link = JRoute::_('index.php?option=com_jevpeople&task='.$returntask . $tmpl);\n\t\t$this->setRedirect($link);\n\t}", "title": "" }, { "docid": "b8a583de77f1be071119e6eeef1a18b0", "score": "0.69411325", "text": "function cancel()\n { \n\n $collaborationItem = $this->attribute( 'collaboration_item' );\n if ( $collaborationItem )\n {\n $collaborationItem->setAttribute( 'data_int3', eZApprove2CollaborationHandler::STATUS_DENIED );\n $collaborationItem->setAttribute( 'status', eZCollaborationItem::STATUS_INACTIVE );\n $timestamp = time();\n $collaborationItem->setAttribute( 'modified', $timestamp );\n $collaborationItem->setIsActive( false );\n $collaborationItem->sync();\n }\n\n $this->setAttribute( 'approve_status', eZXApproveStatus::StatusDiscarded );\n $this->sync();\n }", "title": "" }, { "docid": "c4ef4beb512db949fb53350b7227aabe", "score": "0.6877551", "text": "public function cancel()\n\t{\n\t\treturn $this->update(['expired'=>1]);\n\t}", "title": "" }, { "docid": "6ef1e121c8e35eeeb63ce8e38ea24623", "score": "0.6714043", "text": "public function executeCancelAppointment() {\n $customer_appointment = new AB_CustomerAppointment();\n\n if ( $customer_appointment->loadBy( array( 'token' => $this->getParameter( 'token' ) ) ) ) {\n $customer_appointment->delete();\n\n // Delete appointment, if there aren't customers\n $current_capacity = $this->getWpdb()->get_var($this->getWpdb()->prepare('SELECT count(*) from `ab_customer_appointment` WHERE appointment_id = %d', $customer_appointment->get('appointment_id')));\n if (!$current_capacity){\n $appointment = new AB_Appointment();\n $appointment->load($customer_appointment->get('appointment_id'));\n $appointment->delete();\n }\n\n if (get_option( 'ab_settings_cancel_page_url' )){\n exit(wp_redirect(get_option( 'ab_settings_cancel_page_url' )));\n }\n }\n\n exit(wp_redirect(home_url()));\n }", "title": "" }, { "docid": "a5b1d184a4c83337cd855bdd08419a1f", "score": "0.6700135", "text": "public function cancelAction() {\n $lastRealOrderId = $this->_lastRealOrderId;\n if ($lastRealOrderId) {\n $order = Mage::getModel('sales/order')->loadByIncrementId($lastRealOrderId);\n if($order->getId()) {\n // Flag the order as 'cancelled' and save it\n $order->cancel()->setState(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT, true, 'Gateway has declined the payment.')->save();\n }\n }\n }", "title": "" }, { "docid": "185efc5a419c5196d499520c44dc0366", "score": "0.66954315", "text": "function ocicancel($stmt) {}", "title": "" }, { "docid": "1c11556e4bfaf406067e050996600774", "score": "0.6684033", "text": "public function action_cancel() {\n\t\t// add a notice to be displayed\n\t\tMessage::message('cl4admin', 'action_cancelled', NULL, Message::$notice);\n\t\t// redirect to the index\n\t\t$this->redirect_to_index();\n\t}", "title": "" }, { "docid": "787b81d6bbea501aef20fbaabae52ad0", "score": "0.6673907", "text": "protected function cancel_abort() {\n\t\t$this->abort = false;\n\t}", "title": "" }, { "docid": "9c58de59e20d10538f5aeef1c3621f26", "score": "0.6665063", "text": "public function cancel(){\n return $this->call('PATCH', $this->model_name.'/'.$this->id.'/cancel');\n }", "title": "" }, { "docid": "c4146d178bf9c7ae0270cc3a2ab08f9f", "score": "0.66078806", "text": "public function cancelAction() {\n if (Mage::getSingleton('checkout/session')->getLastRealOrderId()) {\n $order = Mage::getModel('sales/order')->loadByIncrementId(Mage::getSingleton('checkout/session')->getLastRealOrderId());\n if ($order->getId()) {\n // Flag the order as 'cancelled' and save it\n $order->cancel()->setState(Mage_Sales_Model_Order::STATE_CANCELED, true, 'Payfort has declined the payment.')->save();\n }\n }\n }", "title": "" }, { "docid": "f53ac36133935003328b1270bfa606f3", "score": "0.6592589", "text": "public abstract function allowCancel();", "title": "" }, { "docid": "58d9ab42e17d1d63ec96fe93f9325243", "score": "0.65662116", "text": "public function cancel()\n\t{\n\t\treturn parent::cancel();\n\t}", "title": "" }, { "docid": "ff66a76dcc659d39244d8972d80337f9", "score": "0.65500903", "text": "public function cancel_activity() {\n\t\tif($this->op == '') {\n\t\t\t$this->setup_block_selection();\n\t\t\t$this->template_args['op'] = 'activity';\n\t\t}\n\t\telse if($this->op == 'activity') {\n\t\t\t$this->setup_activity_selection(FALSE, $this->args['bid']);\n\t\t\t$this->template_args['op'] = \"view/bid/{$this->args['bid']}\";\n\t\t}\n\t\telse if($this->op == 'view') {\n\t\t\t$this->template = 'cancel_activity.tpl';\n\t\t\t$this->template_args['activity'] = new EighthActivity($this->args['aid'], $this->args['bid']);\n\t\t\t$this->title = \"Cancel an Activity\";\n\t\t}\n\t\telse if($this->op == 'update') {\n\t\t\t$activity = new EighthActivity($this->args['aid'], $this->args['bid']);\n\t\t\tself::start_undo_transaction();\n\t\t\t$activity->comment = $this->args['comment'];\n\t\t\t$activity->advertisement = $this->args['advertisement'];\n\t\t\t$activity->cancelled = ($this->args['cancelled'] == \"on\");\n\t\t\tself::end_undo_transaction();\n\t\t\t//redirect(\"eighth/cancel_activity/view/bid/{$this->args['bid']}/aid/{$this->args['aid']}\");\n\t\t\tredirect(\"eighth/cancel_activity/activity/bid/{$this->args['bid']}\");\n\t\t}\n\t}", "title": "" }, { "docid": "0b53f97235d90e0d003902d12de59b11", "score": "0.65349436", "text": "public function cancel()\n {\n $data = $this->twisto->requestJson('POST', 'invoice/' . urlencode($this->invoice_id) . '/cancel/');\n $this->deserialize($data);\n }", "title": "" }, { "docid": "521676907b4906437f75c2c1fb3a8040", "score": "0.65332144", "text": "public function cancel()\n {\n if (!$this->isCancelable()) {\n return;\n }\n\n $this->cancelled = true;\n }", "title": "" }, { "docid": "465002bf25dc71387cb528427d3826a0", "score": "0.653083", "text": "public function cancelled()\n {\n $this->status = self::STATUS_CANCELLED;\n $this->save();\n }", "title": "" }, { "docid": "e8132b5c0f230e03af73d373b7006178", "score": "0.65044785", "text": "public function cancelTask()\n\t{\n\t\t$offering_id = Request::getInt('offering', 0);\n\t\t$section_id = Request::getInt('section', 0);\n\n\t\tApp::redirect(\n\t\t\tRoute::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller . ($offering_id ? '&offering=' . $offering_id : '') . ($section_id ? '&section=' . $section_id : ''), false)\n\t\t);\n\t}", "title": "" }, { "docid": "f47e43d726fafa82c2eeaddfd0d1377a", "score": "0.6503171", "text": "public function cancel_request() {\n\t\t$this->id = $this->input->get('id', TRUE);\n\t\t$this->db->set('status', 'Cancel');\n\t\t$this->db->where('txn_id', $this->id);\n\t\t$this->db->update('transactions');\n\t\t\n\t\tif ($this->db->affected_rows() == 1) {\n return TRUE;\n } else {\n return FALSE;\n }\n\t}", "title": "" }, { "docid": "447e45525cf9a38fb66acff798edc5df", "score": "0.6494805", "text": "protected function eventCancel(){\n if ($this->txn(\"txnStatus\") == \"NEW\") {\n // Delete the curret transaction\n $this->txnDelete($this->tIndex);\n Shared::data(\"transIndex\" , \"\");\n }\n\n // if the status on the txn is UNSAVED delete it as well\n if ($this->txn(\"txnStatus\") == \"UNSAVED\") {\n // Delete the curret transaction\n $this->txnDelete($this->tIndex);\n Shared::data(\"transIndex\" , \"\");\n }\n\n // get the value of the cancel view target\n $cancel = Shared::data(\"transCancel\");\n if ($cancel == 2 ) {\n // reset the cancel view\n Shared::data(\"transCancel\" , 0 );\n // go to the cancel view\n $this->redirectToView(\"review\");\n }\n else {\n // go to the cancel view\n $this->redirectTo(\"index.php\");\n\n }\n\n\n\n // go to the start of the page\n $this->redirectToView(\"index\");\n\n\n }", "title": "" }, { "docid": "cf950c7633e3126c7fb768cebf58948b", "score": "0.6481656", "text": "public function cancelTask()\n\t{\n\t\tApp::redirect(\n\t\t\tRoute::url('index.php?option=' . $this->_option . '&controller=courses', false)\n\t\t);\n\t}", "title": "" }, { "docid": "556056c2ebbd640df5fc323fd7841a24", "score": "0.64645976", "text": "function evt__fr_prestamo__cancelar()\n\t{\n\n\t\tunset($this->s__filtro);\n\t\t$this->s__where = '1=1';\n\t}", "title": "" }, { "docid": "0ab7bb43127c4ae5a8219e515191cb3e", "score": "0.64425975", "text": "public static function cancel(){\n if(Db::getInstance()->getValue('SELECT COUNT(id) FROM ' . _DB_PREFIX_ . 'google_category_batch;') > 0)\n Db::getInstance()->execute('DELETE FROM ' . _DB_PREFIX_ . 'google_category_batch WHERE 1;');\n }", "title": "" }, { "docid": "0c92277007c1c76d6c96f11e17cc44d5", "score": "0.6425559", "text": "function cancel()\n\t{\n\t\t// Initialize some variables\n\t\t$db\t\t= & JFactory::getDBO();\n\t\t$user\t= & JFactory::getUser();\n\n\t\t// Get an article table object and bind post variabes to it [We don't need a full model here]\n\t\t$article = & JTable::getInstance('content');\n\t\t$article->bind(JRequest::get('post'));\n\n\t\tif ($user->authorize('com_content', 'edit', 'content', 'all') || ($user->authorize('com_content', 'edit', 'content', 'own') && $article->created_by == $user->get('id'))) {\n\t\t\t$article->checkin();\n\t\t}\n\n\t\t// If the task was edit or cancel, we go back to the content item\n\t\t$referer = JRequest::getString('ret', base64_encode(JURI::base()), 'get');\n\t\t$referer = base64_decode($referer);\n\t\tif (!JURI::isInternal($referer)) {\n\t\t\t$referer = '';\n\t\t}\n\t\t$this->setRedirect($referer);\n\t}", "title": "" }, { "docid": "fc5447cc71c19c4e8a5c167301dce96c", "score": "0.64214456", "text": "public function cancel()\n {\n dd('Seu pagamento foi cancelado.');\n }", "title": "" }, { "docid": "4774e9c8faaf07962a8eee03231edbda", "score": "0.64104676", "text": "public function cancelTransaction(){\n if($this->transaction){\n $this->pdo->rollback();\n $this->transaction = false;\n }\n }", "title": "" }, { "docid": "cb0f6b46371dfea04da09b5f76c40b41", "score": "0.64085144", "text": "public function cancelAction(){\n\t\t$id = $this->getRequest()->getParam('id');\n\t\t$model = Mage::getModel('laybuy/report')->load($id);\n\t\tMage::log('Action cancel transaction called',null,'laybuy_success.log');\n\t\ttry{\n\t\t\t/* $model->setReport($newStr)->setStatus(-1)->save(); */\n\t\t\tif(Mage::helper('laybuy')->cancelTransaction($model)){\n\t\t\t\t$this->_getSession()->addSuccess(\n\t\t\t\t\tMage::helper('laybuy')->__(\"Transaction was cancelled successfully.\")\n\t\t\t\t);\n\t\t\t}else{\n\t\t\t\t$this->_getSession()->addError(\n\t\t\t\t\t'Cancel request was unsuccessful.Please try again!!'\n\t\t\t\t);\n\t\t\t}\n\t\t}catch (Exception $e) {\n\t\t\t$this->_getSession()->addError(\n\t\t\t\t$e->getMessage()\n\t\t\t);\n\t\t\tMage::logException($e);\n\t\t}\n\t\t$this->_redirect('*/*/details',array('_secure' => true,'id'=>$id));\n\t}", "title": "" }, { "docid": "803abcc0a25c67b6a39461a950ed03b8", "score": "0.64075255", "text": "public function cancel_commitment() {\n $this->form_validation->set_rules('id', 'Opportunity', 'trim|required|callback__verify_cancellation');\n if ($this->form_validation->run()) {\n $this->opportunity_model->unschedule_user($this->input->post('id'), $_SESSION['user']->id);\n }\n else{\n echo $this->form_validation->error_string('<li>', '</li>');\n }\n }", "title": "" }, { "docid": "1910f7c109aef90b22000857b002470b", "score": "0.6383199", "text": "public function cancelAction() \n\t{\n if (Mage::getSingleton('checkout/session')->getLastRealOrderId()) {\n $order = Mage::getModel('sales/order')->loadByIncrementId(Mage::getSingleton('checkout/session')->getLastRealOrderId());\n if($order->getId()) {\n\t\t\t\t// Flag the order as 'cancelled' and save it\n\t\t\t\t$order->cancel()->setState(Mage_Sales_Model_Order::STATE_CANCELED, true, 'Gateway has declined the payment.')->save();\n\t\t\t}\n }\n Mage_Core_Controller_Varien_Action::_redirect('checkout/onepage/failure', array('_secure'=>true));\n\t}", "title": "" }, { "docid": "7d3204908137908c5ab6e9dcb459ebd0", "score": "0.637053", "text": "public function cancel()\n\t{\n\t\tJRequest::checkToken() or jExit(JText::_('JInvalid_Token'));\n\n\t\t// Initialize variables.\n\t\t$app\t= &JFactory::getApplication();\n\t\t$model\t= &$this->getModel('Corporation', 'EveModel');\n\n\t\t// Get the corporation id.\n\t\t$corporationID = (int) $app->getUserState('com_eve.edit.corporation.corporationID');\n\n\t\t// Attempt to check-in the current corporation.\n\t\tif ($corporationID) {\n\t\t\tif (!$model->checkin($corporationID)) {\n\t\t\t\t// Check-in failed, go back to the corporation and display a notice.\n\t\t\t\t$message = JText::sprintf('JError_Checkin_failed', $model->getError());\n\t\t\t\t$this->setRedirect('index.php?option=com_eve&view=corporation&layout=edit', $message, 'error');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// Clean the session data and redirect.\n\t\t$app->setUserState('com_eve.edit.corporation.corporationID',\t\tnull);\n\t\t$app->setUserState('com_eve.edit.corporation.data',\tnull);\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_eve&view=corporations', false));\n\t}", "title": "" }, { "docid": "88e04cc50901c9f629fa2874e9cf90ba", "score": "0.635978", "text": "protected abstract function cancelEntry($entry_id);", "title": "" }, { "docid": "30ade61242c65dcda34f2a4cae79eec5", "score": "0.6347476", "text": "function cancel()\n\t{\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\n\t\t$id\t\t= JRequest::getVar( 'id', 0, '', 'int' );\n\t\t$db\t\t=& JFactory::getDBO();\n\t\t$row\t=& JTable::getInstance('poll', 'Table');\n\n\t\t$row->checkin( $id );\n\t\t$this->setRedirect( 'index.php?option=com_poll' );\n\t}", "title": "" }, { "docid": "7062e074b6b2f491bcb1107cc44b5c07", "score": "0.6339985", "text": "function cancelar(){\n \n $respuesta = new xajaxResponse();\n $respuesta->addRemove(\"tbDetalle\"); //vuelve a crear la tabla vacia\n $respuesta->addCreate(\"tblDetalle\", \"tbody\", \"tbDetalle\");\n $respuesta->addAssign(\"num_campos\", \"value\", \"0\");\n\t$respuesta->addAssign(\"cant_campos\", \"value\", \"0\");\n return $respuesta;\n}", "title": "" }, { "docid": "a43c5df246909ee54df21ffde0a352c8", "score": "0.633667", "text": "function cancelar_cambios()\r\n {\r\n if($this->acceso(12)){\r\n //**************** inicio contenido ***************\r\n \r\n \r\n $usuario_id = $this->session_data['usuario_id'];\r\n $sql = \"delete from detalle_venta_aux where usuario_id = \".$usuario_id;\r\n $this->Venta_model->ejecutar($sql);\r\n \r\n redirect('venta');\r\n \t\t\r\n //**************** fin contenido ***************\r\n }\r\n \t\t\t\r\n \r\n }", "title": "" }, { "docid": "ac7a5fda6d4a7266fb2d5a691c9513a9", "score": "0.6326887", "text": "function cancel() {\n\t\t// Checkin the detail\n\t\t$model = $this->getModel ( 'qrcode_detail' );\n\t\t$model->checkin ();\n\t\t$this->setRedirect ( 'index.php?option=com_ijoomer&view=qrcode' );\n\t}", "title": "" }, { "docid": "a64b9b48759de82595a682ada3c366d9", "score": "0.6318477", "text": "public function cancelled()\n {\n\n $this->alert('info', 'Understood');\n }", "title": "" }, { "docid": "b73cf84f7ba3b345482ae34145bf1e9e", "score": "0.63018787", "text": "public function cancelEdit(){\n $this->menuOpen = false;\n $this->emptyData();\n }", "title": "" }, { "docid": "07e552eb9009afad3ba81ed23bc2fc40", "score": "0.6298323", "text": "function cancel()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\tcheck_access($this, 'cancel_retirement_application');\n\t\t$this->load->model('_job');\n\t\t\n\t\tif(!empty($data['submit']))\n\t\t{\n\t\t\t$result = $this->_retirement->cancel();\n\t\t\t$data['msg'] = $result? 'The retirement application has been cancelled.': 'ERROR: The retirement application could not be cancelled.';\n\t\t\t$data['area'] = 'basic_msg';\n\t\t\t$this->load->view('addons/basic_addons', $data); \n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['application'] = $this->_retirement->get_application();\n\t\t\n\t\t\t$data['area'] = 'cancel_retirement_application';\n\t\t\t$data['job'] = $this->_job->populate_session();\n\t\t\t$this->load->view('job/my_profile', $data); \n\t\t}\n\t}", "title": "" }, { "docid": "016863c37bdc678101130fe8f4b33187", "score": "0.62961227", "text": "public function action_cancel_edits()\n\t{\n\t\tcgi::redirect('contracts/edit/default');\n\t}", "title": "" }, { "docid": "b3ee3b8e9f6b35445ee2af14380722e5", "score": "0.629581", "text": "function cancelRes($resID){\n\n $stmnts[] = \"set @res = ?;\";\n $params[] = [$resID]; \n\n $stmnts[] = \"DELETE FROM reservation_has_customer\n WHERE reservation_has_customer.reservation_id = @res;\";\n $params[] = []; \n\n $stmnts[] = \"DELETE FROM room_has_reservation\n WHERE room_has_reservation.res_id= @res;\";\n $params[] = []; \n\n $stmnts[] = \"DELETE FROM reservation \n WHERE reservation.res_id = @res;\";\n $params[] = []; \n \n return $this->inTransaction($stmnts, $params);\n }", "title": "" }, { "docid": "c666bf3805680fae1a8ca3111f0271bf", "score": "0.62720287", "text": "function cancel() {\n\t\t$task = $this->appendChild(SyndNodeLib::factory('task'));\n\t\t$content = $task->getContent();\n\t\t$content->setContent(SyndLib::translate('Issue has been cancelled'));\n\t\t$task->save();\n\n\t\t$this->setStatus(self::CLOSED);\n\t\t$this->fireEvent(SyndType::factory('oncancel', $this));\n\t}", "title": "" }, { "docid": "e1ff8155cbbef58035787e42d8897c59", "score": "0.62641215", "text": "public function cancel()\r\n\t{\r\n\t\tJRequest::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\r\n\r\n\t\t// Initialise variables.\r\n\t\t$app\t\t= JFactory::getApplication();\r\n\t\t$context\t= 'com_workforce.editcss';\r\n\r\n\t\t// Clean the session data and redirect.\r\n\t\t$app->setUserState($context.'.data',\tnull);\r\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_workforce&view=departments', false));\r\n\t}", "title": "" }, { "docid": "be74e46f6db54b0d516a17bba4a958b8", "score": "0.62522095", "text": "public function cancelAction()\r\n {\r\n /**\r\n * check license key\r\n */\r\n Mage::helper('marketplace')->checkMarketplaceKey();\r\n $this->chekcingForMarketplaceSellerOrNot();\r\n\r\n $orderId = $this->getRequest()->getParam('id');\r\n $itemId = $this->getRequest()->getParam('item');\r\n $produtId = $this->getRequest()->getParam('product_id');\r\n $sellerId = Mage::getSingleton('customer/session')->getId();\r\n\r\n $cancel = $this->getRequest()->getParam('cancel');\r\n $cancel = $cancel + 1;\r\n $can = 0;\r\n\r\n /**\r\n * Prepare product collection for cancel\r\n */\r\n $products = Mage::getModel('marketplace/commission')->getCollection();\r\n $products->addFieldToSelect('*');\r\n $products->addFieldToFilter('seller_id', $sellerId);\r\n $products->addFieldToFilter('order_id', $orderId);\r\n $products->addFieldToFilter('product_id', $produtId);\r\n $commission = $products->getFirstItem();\r\n $collectionId = $products->getFirstItem()->getId();\r\n\r\n $orderStatusFlag = Mage::getStoreConfig('marketplace/admin_approval_seller_registration/order_manage');\r\n\r\n if (!empty($collectionId) && $orderStatusFlag == 1) {\r\n try {\r\n $commission->setItemOrderStatus(\"canceled\");\r\n $commission->save();\r\n\r\n $OrderItemsSeller = Mage::getModel('marketplace/commission')->getCollection();\r\n $OrderItemsSeller->addFieldToSelect('*');\r\n $OrderItemsSeller->addFieldToFilter('seller_id', $sellerId);\r\n $OrderItemsSeller->addFieldToFilter('order_id', $orderId);\r\n $OrderItemsSellerTotal = $OrderItemsSeller->getSize();\r\n $cnt = 0;\r\n foreach ($OrderItemsSeller as $item) {\r\n if ($item->getItemOrderStatus() == \"canceled\") {\r\n $cnt++;\r\n }\r\n }\r\n\r\n if ($OrderItemsSellerTotal == $cnt) {\r\n $commission->setOrderStatus(\"canceled\");\r\n $commission->save();\r\n }\r\n\r\n $_order = Mage::getModel('sales/order')->load($orderId);\r\n $allMageOrders = count($_order->getAllVisibleItems());\r\n\r\n // $_order->getAllItems();\r\n foreach ($_order->getAllVisibleItems() as $item) {\r\n if ($produtId == $item->getProductId()) {\r\n $item->setQtyCanceled($item->getQtyOrdered());\r\n $item->save();\r\n }\r\n }\r\n\r\n $cnt = 0;\r\n foreach ($_order->getAllVisibleItems() as $item) {\r\n if ($item->getQtyCanceled()) {\r\n $cnt++;\r\n }\r\n }\r\n\r\n\r\n if ($allMageOrders == $cnt) {\r\n $_order->setStatus(\"canceled\");\r\n $_order->setState(\"canceled\");\r\n $_order->save();\r\n }\r\n\r\n /**\r\n * Redirect to order view page\r\n */\r\n Mage::getSingleton('core/session')->addSuccess($this->__($this->__('The item has been cancelled.')));\r\n $this->_redirect('marketplace/order/vieworder/orderid/' . $orderId);\r\n } catch (Exception $e) {\r\n Mage::getSingleton('core/session')->addError($this->__($e->getMessage()));\r\n $this->_redirect('marketplace/order/vieworder/orderid/' . $orderId);\r\n }\r\n } else {\r\n /**\r\n * Return to order manage page\r\n */\r\n Mage::getSingleton('core/session')->addError($this->__('You do not have permission to access this page'));\r\n $this->_redirect('marketplace/order/manage');\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "b70955f6124f5a2c43fa1d78d2e99e7f", "score": "0.6248687", "text": "function cancel($data = NULL)\n\t{\n\t\trequire_once str_replace('drivers', 'base', dirname(__FILE__)).'/Model/CancelRequest.php';\n\t\t\n\t\t$service = new Amazon_FPS_Client($this->_ci->config->item('aws_access_key_id'), $this->_ci->config->item('aws_secret_access_key'), NULL, $this->_ci->config->item('sandbox'));\n\t\n\t\t$request =\tnew Amazon_FPS_Model_CancelRequest();\n\t\t$request->setTransactionId($data['TransactionId']);\n\t\t\n\t\treturn $service->cancel($request);\n\t}", "title": "" }, { "docid": "de2a8e69528cf03ff8ec09fa0423cbe6", "score": "0.6247316", "text": "public function cancel()\n\t{\n\t\tJRequest::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\n\n\t\t// Initialise variables.\n\t\t$app\t\t= JFactory::getApplication();\n\t\t$model\t\t= $this->getModel();\n\t\t$table\t\t= $model->getTable();\n\t\t$checkin\t= property_exists($table, 'checked_out');\n\t\t$context\t= $this->option.'.edit.'.$this->context;\n\t\t$key\t\t= $table->getKeyName();\n\t\t$recordId\t= JRequest::getInt($key);\n\n\t\t// Attempt to check-in the current record.\n\t\tif ($recordId)\n\t\t{\n\t\t\t// Check we are holding the id in the edit list.\n\t\t\tif (!$this->checkEditId($context, $recordId)) {\n\t\t\t\t// Somehow the person just went to the form - we don't allow that.\n\t\t\t\t$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $recordId));\n\t\t\t\t$this->setMessage($this->getError(), 'error');\n\t\t\t\t$this->setRedirect(JRoute::_('index.php?option='.$this->option.'&controller='.$this->controller_list, false));\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($checkin && $model->checkin($recordId) === false) {\n\t\t\t\t// Check-in failed, go back to the record and display a notice.\n\t\t\t\t$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_CHECKIN_FAILED', $model->getError()));\n\t\t\t\t$this->setMessage($this->getError(), 'error');\n\t\t\t\treturn $this->display();\n\t\t\t}\n\t\t}\n\n\t\t// Clean the session data and redirect.\n\t\t$app->setUserState($context.'.data', null);\n\t\t$this->setRedirect(JRoute::_('index.php?option='.$this->option.'&controller='.$this->controller_list, false));\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "cbd2628a1b631d6d8171a59eb12c4aa8", "score": "0.62213624", "text": "function cancel() {\n redirect('staff/index/', 'refresh');\n }", "title": "" }, { "docid": "70e323943692ac49eec7dfb9a37cb73c", "score": "0.6216572", "text": "public function cancelled()\n {\n \n $this->alert('info', 'Understood');\n }", "title": "" }, { "docid": "00036060683ae204bb3777e3478cb58c", "score": "0.62104315", "text": "public function cancelAction() {\r\n $data = $this->getRequest()->getPost();\r\n $usuario = $this->dbh()->selectAllById(array('usuarioId' => $data['identif']), '\\Login\\Model\\Entity\\Usuario');\r\n if (sizeof($usuario) > 0) {\r\n if ($this->dbh()->deleteObj($usuario[0])) {\r\n return new JsonModel(array('res' => 'OK'));\r\n } else {\r\n return new JsonModel(array('res' => 'NOD'));\r\n }\r\n } else {\r\n return new JsonModel(array('res' => 'NOE'));\r\n }\r\n }", "title": "" }, { "docid": "804ad4e3791a6ad7a3e4c4affb9df284", "score": "0.6206997", "text": "public function cancel() {\n\n\t\t$args = array(\n\t\t\t'status' => 'cancelled'\n\t\t);\n\n\t\tif( $this->subs_db->update( $this->id, $args ) ) {\n\n\t\t\tif( is_user_logged_in() ) {\n\n\t\t\t\t$userdata = get_userdata( get_current_user_id() );\n\t\t\t\t$user = $userdata->user_login;\n\n\t\t\t} else {\n\n\t\t\t\t$user = __( 'gateway', 'edd-recurring' );\n\n\t\t\t}\n\n\t\t\t$note = sprintf( __( 'Subscription #%d cancelled by %s', 'edd-recurring' ), $this->id, $user );\n\t\t\t$this->customer->add_note( $note );\n\n\t\t\tdo_action( 'edd_subscription_cancelled', $this->id, $this );\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "766c7178984f3a241ff1ee7d50d5c5df", "score": "0.6181857", "text": "function cancelar(){\n if(isset($_POST[\"cancelar\"]) ){\n if(isset($_SESSION['queries'])) {\n unset($_SESSION['queries']);\n }\n \n if(isset($_SESSION['folio'])) {\n unset($_SESSION['folio']);\n } \n \n }\n \n }", "title": "" }, { "docid": "b93007f2c12aa6e747ead826508e379c", "score": "0.617866", "text": "private function cancel($id)\n {\n }", "title": "" }, { "docid": "730328dac6e1493fba56b84c8939bf02", "score": "0.6171737", "text": "public function cancel(): bool\n {\n }", "title": "" }, { "docid": "3a44d53cdb61ddb3aabf1ac312312509", "score": "0.6166255", "text": "public function cancelAction() {\r\n\r\n\r\n Mage::getSingleton('core/session')->unsHyperRedirectUrl();\r\n Mage::getSingleton('core/session')->unsHyperReviewRedirect();\r\n $this->_redirect('checkout/onepage/failure');\r\n }", "title": "" }, { "docid": "1b47363da737a4f087d0bec0fd2e49df", "score": "0.61651266", "text": "public function cancellastaffAction(){\n $id = intval($this->_request->getParam('id'));\n\n if ($id !== 0) {\n $this->_adminModel->deleteUser($id);\n }\n \n }", "title": "" }, { "docid": "13b853ee0beb38d16e8590babee743e3", "score": "0.61591166", "text": "public function cancelAction()\n {\n $session = Mage::getSingleton('checkout/session');\n $session->setQuoteId($session->getEpayStandardQuoteId(true));\n\t\t\n\t\t$lastQuoteId = $session->getLastQuoteId();\n\t $lastOrderId = $session->getLastOrderId();\n\t\t\n\t\tif($lastQuoteId && $lastOrderId)\n\t\t{\n\t\t\t$orderModel = Mage::getModel('sales/order')->load($lastOrderId);\n\t\t\tif($orderModel->canCancel())\n\t\t\t{\n\t\t\t\t$quote = Mage::getModel('sales/quote')->load($lastQuoteId);\n\t\t\t\t$quote->setIsActive(true)->save();\n\t\t\t\t$orderModel->cancel();\n\t\t\t\t$orderModel->setStatus('canceled');\n\t\t\t\t$orderModel->save();\n\t\t\t\tMage::getSingleton('core/session')->setFailureMsg('order_failed');\n\t\t\t\tMage::getSingleton('checkout/session')->setFirstTimeChk('0');\n\t\t\t}\n\t\t}\n\t\t\n $this->_redirect('checkout/cart');\n return;\n }", "title": "" }, { "docid": "bd7b3d3a0bb43fac90529ad22611c78c", "score": "0.61585337", "text": "function cancel_sale_ticket($handle, $bus, $dates, $place, $hour, $us_name)\n{\n\t// efectuamos la consulta a la base de datos\n\t$handle->query(\"DELETE FROM buses_temp WHERE id_bus='$bus' AND dates='$dates' AND place='$place' AND hour='$hour' AND status='p' AND user_name='$us_name'\");\n}", "title": "" }, { "docid": "0fd57fb212fa514e14f13cc18681fab5", "score": "0.6137045", "text": "function cancel()\n {\n $msg = JText::_('Operation Cancelled');\n $this->setRedirect('index.php?option=com_dewplayer', $msg);\n }", "title": "" }, { "docid": "8ef8cb4a42d6f4024d29d3dba8a7c1af", "score": "0.6132454", "text": "function pp_cancel() {\n\t\t//make sure they're logged in if the config file requires it\n\t\tif ($this->config->item ( 'require_login' )) {\n\t\t\t$this->Customer_model->is_logged_in ();\n\t\t}\n\t\t\n\t\t// User canceled using paypal, send them back to the payment page\n\t\t$cart = $this->session->userdata ( 'cart' );\n\t\t$this->session->set_flashdata ( 'message', \"<div>Transaction Paypal annulée, sélectionnez un autre mode de paiement</div>\" );\n\t\tredirect ( 'checkout' );\n\t}", "title": "" }, { "docid": "1aa05d539c5628a3e4e30d2467c4a2fa", "score": "0.6130886", "text": "public function requestaCanceladmin()\n\t{\n\t\t$datas = self::$data;\n\t\t$this->create_history($this->input->post('contract_id'), 7, 'BY ADMIN : ' . html_escape($this->input->post('messagetoBuyer', true)), '');\n\t\t$this->change_contract_status($this->input->post('contract_id'), 7);\n\t\t$invoice_id \t= $this->database->_get_single_data('tbl_contracts', array('contract_id' => $contract_id), 'invoice_id');\n\t\t$this->_change_invoice_status($invoice_id, 3);\n\t\t$this->database->_update_to_table('tbl_disputes', array('status' => 1), array('contract_id' => $this->input->post('contract_id')));\n\t\tif ($datas['settings'][0]['email_notifications'] === '1') {\n\t\t\t$this->email_op->_user_email_notification('accept-cancel', $this->input->post('contract_id'));\n\t\t}\n\t\t// redirect($this->session->userdata('url'));\n\t\tredirect(base_url() . 'admin');\n\t\treturn;\n\t}", "title": "" }, { "docid": "0c85bb0055aa33bdf7e78c7db8e9e5a9", "score": "0.61138445", "text": "function cancelEvent() {\n\t$eventId = Slim::getInstance()->request()->post('eventId');\n\n\ttry {\n\t\t$db = getConnection();\n\t\t\n\t\t$sql = \"UPDATE Events SET Cancel=1 WHERE EventId=:eventId\";\n\t\t$stmt = $db->prepare($sql);\n\t\t$stmt->bindParam('eventId', $eventId);\n\t\t$stmt->execute();\n\t\t$db = null;\n\t} catch(PDOException $e) {\n \techo '{\"error\":{\"text\":' . $e->getMessage() . '}}'; \n \t}\n}", "title": "" }, { "docid": "ca3dd7d21238ed348dedbb9a5ad5149d", "score": "0.6091704", "text": "function cancelPrepaidSpend()\n {\n if (!$this->checkPost() || !$this->checkAuth(true) || !$this->checkCart()) {\n return;\n }\n\n $tx = $this->getOrRecoverCurrentTransaction();\n if (!$tx) {\n return $this->transactionRecoverFailure();\n }\n\n $tx->cancelSpendingPrepaid();\n $this->saveCurrentTransaction($tx);\n\n $this->redirectBack();\n }", "title": "" }, { "docid": "45a8dc3d174db9785992fe32486ef422", "score": "0.60876215", "text": "public function formCancelled() {\n\t\t$id = $this->getParameter(\"id\");\n\t\t$this->redirect(\"detail\", $id);\n\t}", "title": "" }, { "docid": "26f65e1f2c4add7c37ae6d3244fc783e", "score": "0.6081333", "text": "public function cancelAction() {\n $session = Mage::getSingleton('checkout/session');\n $session->setQuoteId($session->getPay4laterStandardQuoteId(true));\n\n\n $order_history_comment = '';\n // cancel order\n if ($session->getLastRealOrderId()) {\n $order = Mage::getModel('sales/order')->loadByIncrementId($session->getLastRealOrderId());\n if ($order->getId()) {\n\n $order_history_comments = $this->getCheckout()->getPay4laterErrorMessage();\n foreach ($order_history_comments as $order_history_comment) {\n if ($order_history_comment != '')\n $order->addStatusHistoryComment($order_history_comment, true);\n }\n $order->cancel()->save();\n }\n }\n\n /* we are calling getPay4laterStandardQuoteId with true parameter, the session object will reset the session if parameter is true.\n so we don't need to manually unset the session */\n Mage::getSingleton('checkout/session')->addError(\"Pay4later Payment has been cancelled and the transaction has been declined.\");\n if ($order_history_comment != '')\n Mage::getSingleton('checkout/session')->addError($order_history_comment);\n $this->_redirect('checkout/cart');\n }", "title": "" }, { "docid": "c8bba4b4ba71a7b6a43fc056e05652ec", "score": "0.607817", "text": "public function handleEquipmentCancelReservation(){\n $this->requireParam('reservationID');\n\n $body = $this->requestBody;\n $reservationID = $body['reservationID'];\n\n $reservation = $this->EquipmentReservationDao->getReservation($reservationID);\n if (empty($reservation)){\n $this->respond(new Response(Response::INTERNAL_SERVER_ERROR, 'Unable to obtain reservation from ID'));\n }\n\n $reservation->setIsActive(FALSE);\n\n $ok = $this->EquipmentReservationDao->updateReservation($reservation);\n if (!$ok) {\n $this->respond(new Response(Response::INTERNAL_SERVER_ERROR, 'Failed to cancel reservation'));\n }\n\n $this->respond(new Response(\n Response::OK,\n 'Successfully cancelled reservation'\n ));\n \n }", "title": "" }, { "docid": "7a828825966d4ecb285219d5552d2486", "score": "0.6070422", "text": "public abstract function cancelOrder($order_id);", "title": "" }, { "docid": "7f0610a5da19cbc2a987580edf7c7b6d", "score": "0.60669255", "text": "function cancel($by) {\n db_begin_work();\n \n $save = $this->save();\n if($save && !is_error($save)) {\n InvoicePayments::deleteByInvoice($this);\n db_commit();\n } else {\n db_rollback();\n return $save;\n } // if\n }", "title": "" }, { "docid": "b1d62de2b145700e8999ebc0dde840d1", "score": "0.60627824", "text": "public function cancelShipment($request);", "title": "" }, { "docid": "88c6573db6ac02e7b7793944f69b8e97", "score": "0.6060461", "text": "function cancel()\r\n\t{\r\n\t\t// Check for request forgeries\r\n\t\tJRequest::checkToken() or die( 'Invalid Token' );\r\n\t\t\r\n\t\t$venue = & JTable::getInstance('eventlist_venues', '');\r\n\t\t$venue->bind(JRequest::get('post'));\r\n\t\t$venue->checkin();\r\n\r\n\t\t$this->setRedirect( 'index.php?option=com_eventlist&view=venues' );\r\n\t}", "title": "" }, { "docid": "1c2d6675f50259b46d3a3eda88d33bb9", "score": "0.6039863", "text": "public function actionCancelByAdmin() {\n\n $mission = Mission::loadModel(248);\n\n $result = $mission->cancelByAdmin();\n\n var_dump($result);\n }", "title": "" }, { "docid": "c64d297ca7b11ce4b232086495b8b08a", "score": "0.6039178", "text": "function cancelNewsFeed($option) {\r\n\tglobal $database;\r\n\tjosSpoofCheck();\r\n\r\n\t$row = new mosNewsFeed($database);\r\n\t$row->bind($_POST);\r\n\t$row->checkin();\r\n\tmosRedirect('index2.php?option='.$option);\r\n}", "title": "" }, { "docid": "5f171ef8b5c75063d53a18cd98857c35", "score": "0.60352075", "text": "function processCancel($id) {\r\n\t$sql = \"SELECT status FROM appeal WHERE id=$id LIMIT 1\";\r\n\t$result = mysql_query($sql);\r\n\tif(!$result || mysql_num_rows($result) == 0) {\r\n\t return \"There was a problem processing your request. If this continues, please contact a member of staff.\";\r\n\t}\r\n\t\r\n\tswitch(mysql_result($result, 0)) {\r\n\t case 'u':\r\n\t case 'p':\r\n\t\t\tmysql_query(\"UPDATE appeal SET status='c' WHERE id=$id\");\r\n\t\t\treturn \"Your request has been successfully canceled.\";\r\n\t\tcase 'a':\r\n\t\t return \"Your request has already been processed and approved. If you would like to change your name back, please submit a new request.\";\r\n\t\tcase 'd':\r\n\t\t return \"Your request has already been processed and denied. There is no further action required.\";\r\n\t}\r\n}", "title": "" }, { "docid": "a81a9804d99a3f7c33cd70b7a5e97f60", "score": "0.6032228", "text": "function cancelarAlertaAction()\r\n {\r\n $this->_helper->layout->setLayout('clear');\r\n if ($this->_request->isXMLHttpRequest()) {\r\n if (!isset($this->identity->ID_USR)) {\r\n $this->session->requiereLoginUrl = $this->session->avisoUrl;\r\n $this->json(\r\n array(\r\n 'code' => 1,\r\n 'msg' => 'Ud. debe Iniciar sessión para colocar el aviso en seguimiento.'\r\n ) \r\n );\r\n }\r\n require_once 'Compras.php';\r\n $compras = new Compras();\r\n $idAviso = $this->_request->getParam('id');\r\n $compras->delComprasSeguimiento($idAviso, $this->identity->ID_USR);\r\n $this->json(array('code' => 0, 'msg' => 'Ahora Ud. ha cancelado este aviso en seguimiento.'));\r\n }\r\n }", "title": "" }, { "docid": "dab2707c19f797561ed761af309456f7", "score": "0.60308194", "text": "function express_cancel ($aData) {\r\n $this->setData('express_cancel', $aData);\r\n if ($aRet = $this->transaction()) {\r\n return $aRet;\r\n } else {\r\n $this->setError('unable to process cancel_express');\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "f6c6b6c7c1959c23ed850c0c7b45289c", "score": "0.60259366", "text": "public function cancelTransaction() {\n\t\treturn $this->db->rollBack();\n\t}", "title": "" }, { "docid": "3069fdf1f1406bbc4659dff7de2093b8", "score": "0.6021195", "text": "public function cancel(Request $request)\n {\n }", "title": "" }, { "docid": "851cdcbe780ee2fdf584a09f4518d220", "score": "0.60155374", "text": "public function stopQuery()\n {\n \n }", "title": "" }, { "docid": "e2e5a6e269c6cbf5fe3a1f3bc8ac29cd", "score": "0.60030955", "text": "protected function cancelCharge()\n {\n $planCharge = $this->shop->planCharge();\n if ($planCharge && !$planCharge->isDeclined() && !$planCharge->isCancelled()) {\n $planCharge->cancel();\n }\n }", "title": "" }, { "docid": "9442eadebdfccdbc116c7ad4e962760f", "score": "0.5999476", "text": "public function CancelTerminateExecution()\n {\n }", "title": "" }, { "docid": "e73642fa84afb5fe2c36b58fdd36ed67", "score": "0.5997598", "text": "public function cancel(){\n\t\t\t$reserve = Reserve::find(Input::get('id'));\n\n\t\t\tif(empty($reserve)){\n\t\t\t\treturn View::make('cancelBooking');\n\t\t\t}\n\t\t\telse{\n\n\t\t\t\t$reserve->delete();\n\t\t\n\t\t\t\treturn View::make('fincancel');\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "65c2104a9e1579acdc552c4e76bb0e5c", "score": "0.59622294", "text": "public function cancelar($acao) {\r\n\t\tif ($acao == 'cancelar') {\r\n\t\t\tunset($_POST);\r\n\t\t\t$this->index('cancelar', array(), array('status' => 'alerta', 'mensagem' => 'Operação Cancelada'));\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "e44369524ca00a9505dae83a14f0f99d", "score": "0.594375", "text": "public function cancelOrder() {\n\t\t\tif (!$this->validCSRFToken()) $this->error(\"Invalid Request\");\n\n\t\t\t$order = new \\Sales\\Order();\n\t\t\tif ($GLOBALS['_SESSION_']->customer->can('edit sales order') || $GLOBALS['_SESSION_']->customer->id == $order->customer_id) {\n\t\t\t\t# OK To Update\n $order = new \\Sales\\Order();\n if (! $order->get($_REQUEST['code'])) $this->error(\"Order not found\");\n if (in_array($order->status,array('CANCELLED','COMPLETE'))) $this->error($order->status.\" order not ready for cancellation\");\n if (! $order->cancel()) $this->error($order->error());\n\t\t\t}\n else $this->error(\"Permission denied\");\n\n\t\t\t$response = new \\HTTP\\Response();\n\t\t\t$response->success = 1;\n\t\t\t$response->order = $order;\n\n\t\t\tprint $this->formatOutput($response);\n\t\t}", "title": "" }, { "docid": "b6681e62ab0ecc0b316887e2349fff09", "score": "0.5941376", "text": "function module_cancel_article(){\r\n\tif(isset($_REQUEST[\"cancelarticle\"])){\r\n\t\tunset_form_article();\r\n\t\techo \"Alle data midlertidig lagret i forbindelse med oppretting/redigering av artikkel er fjernet.\";\r\n\t}\r\n}", "title": "" }, { "docid": "e15d6b7677cb2ae62ea3d0015fcc1a86", "score": "0.59146947", "text": "public function cancel($message = '');", "title": "" }, { "docid": "091ab3589e26284c9bdba32a992cdc88", "score": "0.5910935", "text": "public function cancelled_url(){\n\t\t$this->loadModel('Booking');\n\t\t$this->Booking->updateAll(array('Booking.status' => 5),array('Booking.session_id'=>$this->Session->id(),'Booking.status' =>4));\n\t\t//for cancel page\n\t\t$this->redirect(array('plugin'=>'content_manager','controller'=>'pages','action'=>'view',17));\n\t}", "title": "" }, { "docid": "e61c99eaf42c0dd504b7029299c0dbb2", "score": "0.5897789", "text": "public function testUncancel()\n {\n }", "title": "" }, { "docid": "1044ca88ed5b7b5828d766a092ab99ba", "score": "0.5884378", "text": "function cancel_transaction()\n{\n\tglobal $transaction_level;\n\n\tif ($transaction_level) {\n\t\tdb_query(\"ROLLBACK\", \"could not cancel a transaction\");\t\n\t}\n}", "title": "" }, { "docid": "2d94953f75db87f0f178b7ed19fa9dd1", "score": "0.5878116", "text": "public function declineAction()\n\t{\n\t\t//decline the order\n\t\t$e = new WMG_CyberSource_Model_Service_Sop_Exception('An unknown error has occurred.', WMG_CyberSource_Model_Service_Sop_Exception::EXCEPTION_CODE_UNKNOWN);\n\t\tMage::register('wmgcybersource_error', $e);\n\t\t\n\t\t//decline the order\n\t\t$this->_getService()->decline($e);\n\t\t\n\t\t//and output the appropriate action\n $this->loadLayout();\n $this->renderLayout();\n return $this;\n\t}", "title": "" }, { "docid": "a09863b9f6f3cf8f753b893796057dd0", "score": "0.58675337", "text": "function _doCancel($template, $input) {\n\t\t$template->set( 'message', 'entries cancelled' );\n\t\t$template->clearAllDisplayFields( );\n\t\t$template->setAllowEditing( false );\n\t\t$template->setAllowExiting( true );\n\t\treturn false;\n\t}", "title": "" }, { "docid": "f983d7db3080dfce0f14b297d188f084", "score": "0.5865707", "text": "function &cancel() {\r\n\t// Given version is for test purposes only!\r\n\t\r\n\tmysql_query('DELETE FROM users WHERE id=\"'. get_SESSION(\"userid\") . '\"');\r\n\t\r\n\tsession_destroy();\r\n\tset_header('login'); \r\n\texit();\r\n}", "title": "" }, { "docid": "9d6a6c90c17aa7a8b390431647770286", "score": "0.58654624", "text": "function petitionPaymentCancel()\n\t\t{\t\t\t\t\t\t\t\t\n\t\t\tglobal $_CONF;\t\t\t\n\t\t\t$article_id = trim($_REQUEST[\"article_id\"]);\n\t\t\t$visitor_id = base64_decode(trim($_REQUEST[\"visitor_id\"]));\t\t\t\n\t\t\t$rs = $this->oModel->setUserTypeOneTimeSubscriber($visitor_id);\t\t\t\n\t\t\theader(\"location:./index.php?stage=visitor&mode=EmailMessage&message=Sign up completed but error in petition payment.\");\t\t\t\n\t\t\tdie();\t\t\t\t\n\t\t}", "title": "" }, { "docid": "d6f8f0dce567cb7add8b7e6ed0ae2b53", "score": "0.5862979", "text": "public function cancelRequest()\n\t{\n\t\t// Check for request forgeries\n\t\tFoundry::checkToken();\n\n\t\t// Guests shouldn't be here.\n\t\tFoundry::requireLogin();\n\n\t\t// Get the current logged in user.\n\t\t$my \t= Foundry::user();\n\n\t\t// Get the current view.\n\t\t$view \t= Foundry::view( 'Friends' , false );\n\n\t\t// Get the friend id.\n\t\t$id \t= JRequest::getInt( 'id' );\n\n\t\t// Get the model\n\t\t$friends\t= Foundry::model( 'Friends' );\n\n\t\t$table \t\t= Foundry::table( 'Friend' );\n\t\t$table->load( $id );\n\n\t\tif( !$id || !$table->id )\n\t\t{\n\t\t\t$view->setMessage( JText::_( 'COM_EASYSOCIAL_FRIENDS_INVALID_ID_PROVIDED' ) , SOCIAL_MSG_ERROR );\n\t\t\treturn $view->call( __FUNCTION__ );\n\t\t}\n\n\t\t// Check if the user is allowed to cancel the request.\n\t\tif( !$table->isInitiator() )\n\t\t{\n\t\t\t$view->setMessage( JText::_( 'COM_EASYSOCIAL_FRIENDS_NOT_ALLOWED_TO_CANCEL_REQUEST' ) , SOCIAL_MSG_ERROR );\n\t\t\treturn $view->call( __FUNCTION__ );\n\t\t}\n\n\t\t// Try to cancel the request.\n\t\t$state \t\t= $friends->cancel( $id );\n\n\t\tif( !$state )\n\t\t{\n\t\t\t$view->setMessage( $friends->getError() , SOCIAL_MSG_ERROR );\n\t\t\treturn $view->call( __FUNCTION__ );\n\t\t}\n\n\t\t// Prepare the dispatcher\n\t\tFoundry::apps()->load( SOCIAL_TYPE_USER );\n\t\t$dispatcher\t\t= Foundry::dispatcher();\n\t\t$args \t\t\t= array( &$table );\n\t\t\n\t\t// @trigger: onFriendCancelRequest\n\t\t$dispatcher->trigger( SOCIAL_TYPE_USER , 'onFriendCancelRequest' , $args );\n\n\t\treturn $view->call( __FUNCTION__ , $id );\n\t}", "title": "" }, { "docid": "4b61b7d50aa16cf61a2bdce22f5c730b", "score": "0.5862647", "text": "public function cancelUpdateFeedBlock()\n\t{\n\t\tglobal $ilCtrl;\n\n\t\t$ilCtrl->returnToParent($this);\n\t}", "title": "" }, { "docid": "c6632fd20692f3bd60b3684fe8604e68", "score": "0.5860363", "text": "public function cancelAction() {\n $plugin = $this->Plugin();\n $config = $plugin->Config();\n $plugin->logAction(\"CANCEL\");\n //return $this->redirect(array('controller' => 'checkout'));\n Shopware()->Session()->nfxErrorMessage = Shopware()->Snippets()->getNamespace('HyperchargePaymentWpf/Views/common/frontend/hypercharge/payment_hyperchargewpf/failed')->get(\"CancelledTransaction\", \"The transaction was cancelled by the user!\");\n if ($config->hypercharge_layout == \"Redirect\") {\n $this->redirect(array(\n 'action' => 'failed',\n 'forceSecure' => true));\n } else {\n $return_failure_url = $this->Front()->Router()->assemble(\n array('action' => 'failed', 'forceSecure' => true));\n $this->redirect(array(\n 'action' => 'return',\n 'nfxTarget' => urlencode($return_failure_url),\n 'forceSecure' => true));\n }\n }", "title": "" }, { "docid": "5222f99f1d0bdcb49839ac83bb9cbcee", "score": "0.5859436", "text": "public function action_cancel_group() {\n\t\t// add a notice to be displayed\n\t\tMessage::message('cl4admin', 'action_cancelled', NULL, Message::$notice);\n\t\t// redirect to the index\n\t\t$this->redirect_to_group_list();\n\t}", "title": "" }, { "docid": "2a8ec89882aa04377f19d00bca6bd525", "score": "0.5848401", "text": "public function cancel_report_return()\n {\n $data = $this->twisto->requestJson('POST', 'invoice/' . urlencode($this->invoice_id) . '/report_return/cancel/');\n $this->deserialize($data);\n }", "title": "" } ]
ab65a529545b8bf6a136bb80c6b618e5
Execute Redirect to Mollie after placing order
[ { "docid": "71dab81d1a6c2ba9e16f397648e19dfa", "score": "0.0", "text": "public function execute()\n {\n try {\n $orderInfo = $this->parseOrderInfo();\n if ($orderInfo['status'] === true) {\n $orderInfo = $orderInfo['order_info'];\n $this->wechatPay->processTransaction($orderInfo);\n }\n $result = $this->resultFactory->create(ResultFactory::TYPE_RAW);\n $result->setHeader('content-type', 'text/plain');\n $result->setContents('OK', true);\n return $result;\n } catch (\\Exception $e) {\n $this->messageManager->addExceptionMessage(\n $e, __($e->getMessage())\n );\n $this->yaBandWechatPayHelper->addTolog('error', $e->getMessage());\n $this->checkoutSession->restoreQuote();\n $this->_redirect('checkout/cart');\n }\n }", "title": "" } ]
[ { "docid": "4381d9161a91c288a19369dfa2e0c8e3", "score": "0.7087733", "text": "public function redirectToOrder()\n {\n $order = $this->Order();\n if ($order) {\n Controller::curr()->redirect($order->Link());\n } else {\n user_error('No order found with this payment: '.$this->ID, E_USER_NOTICE);\n }\n\n return;\n }", "title": "" }, { "docid": "9de89c3e26ca50cbd0b7531b770be4e7", "score": "0.69444805", "text": "public function redirectAction() {\r\n\t\t$session = Mage::getSingleton('checkout/session');\r\n\t\tif($session->getLastOrderId()){\r\n\t\t\t$session->setBancomerStandardQuoteId($session->getQuoteId());\r\n\t\t\t$state\t=\tMage::getModel('bancomer/paymentMethod')->getConfigData('redirect_status');\r\n\t\t\t$order\t=\tMage::getModel('sales/order')->load($session->getLastOrderId());\r\n\t\t\t/*\r\n\t\t\tPROTECCION DE PEDIDOS YA REALIZADOS\r\n\t\t\t*/\r\n\t\t\tif($order->bancomer_status=='SUCCESS'){\r\n\t\t\t\t$this->_redirect('checkout/onepage/success');\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t$order->setState($state,$state,Mage::helper('bancomer')->__('Entring to TPV'),false);\r\n\t\t\t$order->save();\r\n\t\t\t$this->loadLayout();\r\n\t\t\t$block = $this->getLayout()->createBlock('bancomer/standard_redirect');\r\n\t\t\t$this->getLayout()->getBlock('content')->append($block);\r\n\t\t\t$this->renderLayout();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "2f96bb60f10bcc89e3da421f4ec804d5", "score": "0.68446773", "text": "public function redirectAction()\r\n\t\t{\r\n\t\t\t// Load /app/code/community/Mage/Idealcheckoutcartebleue/Model/Idealcheckoutcartebleue.php\r\n\t\t\t$oIdealcheckoutcartebleueModel = Mage::getSingleton('idealcheckoutcartebleue/idealcheckoutcartebleue');\r\n\r\n\r\n\t\t\t// Create transaction record and get URL to /idealcheckoutcartebleue/setup.php\r\n\t\t\t$sIdealcheckoutcartebleueUrl = $oIdealcheckoutcartebleueModel->setupPayment();\r\n\r\n\r\n\t\t\t// redirect\r\n\t\t\theader('Location: ' . $sIdealcheckoutcartebleueUrl);\r\n\t\t\texit();\r\n\t\t}", "title": "" }, { "docid": "d90e20d198ade117c56cd7444f6189bc", "score": "0.6821917", "text": "public function redirectAction()\n {\n $client = $this->_getApi()->buildClient();\n $orderId = $this->_getCheckoutSession()->getLastRealOrderId();\n $postParams = $this->_getApi()->buildRequestParams($orderId, $orderId);\n $client->setParameterPost('order', $postParams);\n\n $errorMessage = \"\";\n\n try{\n $response = $client->request();\n if ($response->isSuccessful()) {\n $responseBody = $response->getBody();\n $responseJson = Mage::helper('core')->jsonDecode($responseBody);\n\n $uuid = $responseJson[\"order\"][\"uuid\"];\n $this->_getCheckoutSession()->setData('orderUuid', $uuid);\n $url = $this->_getConfig()->getCoinjarOrderUrl() . '/' . $uuid;\n\n Mage::getSingleton('core/cookie')->set('coinjarOrder', $url . '||' . (time()+900), 900, '/', null, null, false);\n\n // Redirect to CoinJar\n $this->_redirectUrl($url);\n } else {\n $errorMessage = 'CoinJar Server returned error with code ' . $response->getStatus();\n if ($response->isSuccessful()) {\n $errorMessage .= ', ' . $response.getRawBody();\n }\n throw new Exception($errorMessage);\n }\n } catch (Exception $e) {\n $errorMessage = 'Exception: ' . $e->getMessage();\n Mage::helper('cjcheckout')->log('Error occurred while accessing the CoinJar Order API: ' . $errorMessage);\n Mage::getSingleton('checkout/session')->addError('An unrecoverable error occurred while processing your payment information. Please contact the site administrator. ' . $errorMessage);\n\n $this->_redirect('checkout/cart');\n }\n }", "title": "" }, { "docid": "2d5884d1eb3a2a183b122ba810e26a66", "score": "0.6695251", "text": "public function redirectAction()\n {\n $session = Mage::getSingleton('checkout/session');\n $session->setEcomPaymentStandardQuoteId($session->getQuoteId());\n $this->getResponse()->setBody($this->getLayout()->createBlock('ecompayment/standard_redirect')->toHtml());\n $session->unsQuoteId();\n $session->unsRedirectUrl();\n }", "title": "" }, { "docid": "e95d2fb2a9db82d53e4246b419a4ac62", "score": "0.6667894", "text": "public function redirectAction()\n {\n $this->saveCheckoutSession();\n $this->loadLayout();\n $this->renderLayout();\n }", "title": "" }, { "docid": "d77f0382009b417f0779f24692166ae1", "score": "0.65714866", "text": "public function execute()\n {\n /** @var \\Magento\\Framework\\Controller\\Result\\Redirect $resultRedirect */\n $resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);\n\n if ($this->getRequest()->getParam('retry_authorization') == 'true'\n && is_array($this->_getCheckoutSession()->getPaypalTransactionData())\n ) {\n $this->_forward('placeOrder');\n return;\n }\n try {\n $this->_getCheckoutSession()->unsPaypalTransactionData();\n $this->_initCheckout();\n $this->_checkout->returnFromPaypal($this->_initToken());\n if ($this->_checkout->canSkipOrderReviewStep()) {\n $this->_forward('placeOrder');\n } else {\n $this->_redirect('*/*/review');\n }\n return;\n } catch (\\Magento\\Framework\\Exception\\LocalizedException $e) {\n $this->messageManager->addExceptionMessage(\n $e,\n $e->getMessage()\n );\n } catch (\\Exception $e) {\n $this->messageManager->addExceptionMessage(\n $e,\n __('We can\\'t process Express Checkout approval.')\n );\n }\n\n return $resultRedirect->setPath('checkout/cart');\n }", "title": "" }, { "docid": "0c37f36149c46bb9f0252144cb791d59", "score": "0.65637475", "text": "function performRedirect() {\n if($this->action == 'add' && !empty($this->request->data['CoEnrollmentFlowWedge']['plugin'])) {\n // Redirect to the appropriate plugin to set up whatever it wants\n\n $pluginName = filter_var($this->request->data['CoEnrollmentFlowWedge']['plugin'],FILTER_SANITIZE_SPECIAL_CHARS);\n $modelName = $pluginName;\n\n $target = array();\n $target['plugin'] = Inflector::underscore($pluginName);\n $target['controller'] = Inflector::tableize($modelName);\n $target['action'] = 'edit';\n $target[] = $this->CoEnrollmentFlowWedge->_targetid;\n\n $this->redirect($target);\n }\n \n if(!empty($this->request->data['CoEnrollmentFlowWedge']['co_enrollment_flow_id'])) {\n // Redirect to the widget index\n \n $target = array();\n $target['plugin'] = null;\n $target['controller'] = 'co_enrollment_flow_wedges';\n $target['action'] = 'index';\n $target['coef'] = filter_var($this->request->data['CoEnrollmentFlowWedge']['co_enrollment_flow_id'],FILTER_SANITIZE_SPECIAL_CHARS);\n\n $this->redirect($target);\n } else {\n // This was probably a delete, redirect to the enrollment flow index as\n // a lazy but minimal default\n \n $target = array();\n $target['plugin'] = null;\n $target['controller'] = 'co_enrollment_flows';\n $target['action'] = 'index';\n $target['co'] = $this->cur_co['Co']['id'];\n \n $this->redirect($target);\n }\n \n parent::performRedirect();\n }", "title": "" }, { "docid": "3199b9aa020918bbaf425a9c8b5b29cc", "score": "0.64796", "text": "public function execute()\n {\n $result = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);\n\n try {\n $this->quoteManagement->placeOrder();\n $url = $this->urlRegistry->get();\n\n if ($url) {\n return $result->setUrl($url);\n }\n } catch (\\Exception $e) {\n }\n\n $this->messageManager->addErrorMessage('Something went wrong!');\n return $result->setRefererUrl();\n }", "title": "" }, { "docid": "a00fbda532ceba10d5db37d2479c65a2", "score": "0.6475444", "text": "public function redirectAction()\n {\n\t\t// $ip = Mage::helper('core/http')->getRemoteAddr();\n\t\t// var_dump($ip);die();\n \t$session = Mage::getSingleton('checkout/session');\n $session->setOnepayQuoteId($session->getQuoteId());\n $this->getResponse()->setBody($this->getLayout()->createBlock('onepay/redirect')->toHtml());\n $session->unsQuoteId();\n\t\t\n }", "title": "" }, { "docid": "771289b5d0138d16ccacaeb86827b667", "score": "0.6329774", "text": "public function execute()\n {\n $redirectParams = $this->getRequest()->getParams();\n $params = [];\n if (!empty($redirectParams['success'])\n && isset($redirectParams['x_invoice_num'])\n && isset($redirectParams['controller_action_name'])\n ) {\n $params['redirect_parent'] = $this->helper->getSuccessOrderUrl($redirectParams);\n $directpostSession = $this->_objectManager->get(\\Magento\\Authorizenet\\Model\\Directpost\\Session::class);\n $directpostSession->unsetData('quote_id');\n //cancel old order\n $oldOrder = $this->_getOrderCreateModel()->getSession()->getOrder();\n if ($oldOrder->getId()) {\n /* @var $order \\Magento\\Sales\\Model\\Order */\n $order = $this->_objectManager->create(\\Magento\\Sales\\Model\\Order::class)\n ->loadByIncrementId($redirectParams['x_invoice_num']);\n\n if ($order->getId()) {\n $oldOrder->cancel()->save();\n $order->save();\n $this->_getOrderCreateModel()->getSession()->unsOrderId();\n }\n }\n //clear sessions\n $this->_getSession()->clearStorage();\n $directpostSession->removeCheckoutOrderIncrementId($redirectParams['x_invoice_num']);\n $this->_objectManager->get(\\Magento\\Backend\\Model\\Session::class)->clearStorage();\n $this->messageManager->addSuccess(__('You created the order.'));\n }\n\n if (!empty($redirectParams['error_msg'])) {\n $cancelOrder = empty($redirectParams['x_invoice_num']);\n $this->_returnQuote($cancelOrder, $redirectParams['error_msg']);\n }\n\n $this->_coreRegistry->register(Iframe::REGISTRY_KEY, array_merge($params, $redirectParams));\n return $this->resultLayoutFactory->create();\n }", "title": "" }, { "docid": "a4d0f4f2d693ed5a7ed79b5dde1d4b84", "score": "0.6308193", "text": "public function orderAction()\n\t{\n\t\t$request = $this->getRequest();\n\n\t\t$order = $this->_sessionModel->setPresentationOrder(\n\t\t\t$request->getParam('session_id'),\n\t\t\t$request->getParam('order')\n\t\t);\n\n\t\t$this->view->messages = '';\n\t\treturn;\n\t}", "title": "" }, { "docid": "4e27a933e96b86e65eb3078080dd12b5", "score": "0.6286297", "text": "public function execute()\n {\n $orderId = $this->getRequest()->getParam('order_id');\n $packageDO = $this->packageRepository->getByOrderId((int)$orderId);\n /** @var RegisteredParcel $package */\n $package = $this->dpdService->preparePackage($packageDO);\n $packageDO->setPackageId($package->getId());\n $packageDO->setTrackingNumber($package->getWaybill());\n $this->dataObjectHelper->populateWithArray(\n $packageDO,\n $packageDO->getData(),\n PackageInterface::class\n );\n $this->packageRepository->save($packageDO);\n $this->_redirect('*/*/', ['manifest_id' => $packageDO->getManifestId()]);\n }", "title": "" }, { "docid": "365fabad6e9617b55be302f983522b7d", "score": "0.62663454", "text": "public function execute()\r\n {\r\n $session = ObjectManager::getInstance()->get('Magento\\Checkout\\Model\\Session');\r\n $session->setQuoteId($session->getPdcptbQuoteId(true));\r\n \r\n // Set the quote as inactive after returning from Pdcptb\r\n ObjectManager::getInstance()->get('Magento\\Checkout\\Model\\Session')->getQuote()->setIsActive(false)->save();\r\n\t\t\r\n $order = $this->_modelOrderFactory->create();\r\n $order->load(ObjectManager::getInstance()->get('Magento\\Checkout\\Model\\Session')->getLastOrderId());\r\n \t\r\n //Either datafeed or this successAction will set the state from Pending to Processing\r\n //$order->setState(Order::STATE_PROCESSING, true);\t\r\n\t //$order->save();\r\n \r\n\t // Send a confirmation email to customer\r\n //if($order->getId()){\r\n //$order->sendNewOrderEmail();\r\n //}\r\n\r\n ObjectManager::getInstance()->get('Magento\\Checkout\\Model\\Session')->unsQuoteId();\r\n\t\t\r\n \t\r\n $this->_redirect('checkout/onepage/success');\r\n }", "title": "" }, { "docid": "4ec18fb8f60a5b6f94d58b2cb1101843", "score": "0.6248519", "text": "public function execute()\n {\n if ($creditmemo = $this->_initCreditmemo()) {\n /** @var \\Magento\\Framework\\View\\Result\\Page $resultPage */\n $resultPage = $this->resultPageFactory->create();\n $resultPage->getConfig()->getTitle()->set(__('Order #%1', $creditmemo->getOrder()->getRealOrderId()));\n return $resultPage;\n }else{\n return $this->resultRedirectFactory->create()->setPath('marketplace/order/history', ['_secure'=>$this->getRequest()->isSecure()]);\n }\n }", "title": "" }, { "docid": "60e2b6906056e61f6e5f61c50e728da6", "score": "0.6243792", "text": "private function __goCart()\n {\n redirect('site/cart');\n }", "title": "" }, { "docid": "dab5ed2160b3278fb27cd8ff9b3f037c", "score": "0.6222161", "text": "protected function redirect()\n {\n Tools::redirectLink($this->redirect_after);\n }", "title": "" }, { "docid": "6250be5c6c49050fe45a9e92b712db76", "score": "0.622095", "text": "public function redirectAction()\n {\n $this->getResponse()->setBody($this->getLayout()->createBlock('payzippy/redirect', 'payzippy', array(\n 'template' => 'payzippy/redirect.phtml'\n ))->toHtml());\n ;\n }", "title": "" }, { "docid": "44af3ec43eaebd1089c6208fd80debdf", "score": "0.62089974", "text": "public function orderup() {\n JRequest::checkToken() or jexit( 'Invalid Token' );\n \n $cids = JRequest::getVar( 'cid', array(), 'post', 'array' );\n JArrayHelper::toInteger($cids);\n \n ## Get model\n $model = $this->getModel('tickets');\n $model->move($cids[0],-1);\n\n ## Redirecting\n $this->setRedirect('index.php?option=com_ticketmaster&controller=tickets');\n }", "title": "" }, { "docid": "8bf2a41f57fc7fd5bed1306f551f7f86", "score": "0.62031275", "text": "function orderup()\r\n {\r\n JRequest::checkToken() or jexit('Invalid Token');\r\n\r\n $model = $this->getModel('attribute');\r\n $model->move(-1);\r\n\r\n $this->setRedirect('index.php?option=com_webmapplus&view=markers');\r\n }", "title": "" }, { "docid": "0d84290b35bca02fd79a6542b3e7611e", "score": "0.60544515", "text": "public function execute()\n {\n $orderId = $this->getRequest()->getParam('order_id');\n /** @var Order $order */\n $order = $this->orderRepository->get($orderId);\n\n try {\n $this->approveChallengedPayment->process($order);\n // phpcs:ignore SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly.ReferenceViaFallbackGlobalName\n $this->messageManager->addSuccessMessage(__('Approved the payment online.'));\n // phpcs:ignore SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly.ReferenceViaFullyQualifiedName\n } catch (\\Exception $e) {\n throw $e;\n // phpcs:ignore SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly.ReferenceViaFallbackGlobalName\n $this->messageManager->addErrorMessage(__('Unable to approve the order.'));\n $this->logger->error($e->getMessage());\n }\n\n $this->orderRepository->save($order);\n\n return $this->redirect();\n }", "title": "" }, { "docid": "05334ec50d47372d101cb8e411c5821d", "score": "0.60489863", "text": "private function _redirectToApproveView() {\n\n\t\tif ($this->Order->validates()) {\n\t\t\t$this->redirect(array(\n\t\t\t\t'controller' => 'payments',\n\t\t\t\t'action'\t => 'processing'));\n\t\t} else {\n\t\t\t$time = time();\n\t\t\t$this->Session->destroy();\n\t\t\tthrow new Exception(__('Sorry something whent wrong. You may try ordering again<br/> Error Number:' . $time), 500);\n\t\t}\n\t}", "title": "" }, { "docid": "611b42d594f7d3e34094afaea0d28b39", "score": "0.6047158", "text": "function orderup()\n\t{\n\t\tJRequest::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\n\n\t\t$model = $this->getModel('newsfeed');\n\t\t$model->move(-1);\n\n\t\t$this->setRedirect('index.php?option=com_newsfeeds');\n\t}", "title": "" }, { "docid": "e90cfa23faf4fc70cb9a0095b28cca7a", "score": "0.6042887", "text": "abstract protected function redirectTo();", "title": "" }, { "docid": "29d7bdba5185940679e627059dcb6102", "score": "0.60420316", "text": "public function execute()\n {\n if (!$this->state->getCompleteStep(State::STEP_OVERVIEW)) {\n $this->_redirect('*/*/addresses');\n return;\n }\n\n $this->_view->loadLayout();\n $ids = $this->multishipping->getOrderIds();\n $this->_eventManager->dispatch('multishipping_checkout_controller_success_action', ['order_ids' => $ids]);\n $this->_view->renderLayout();\n }", "title": "" }, { "docid": "41d3edb9f81b418a1f09271084cdf04d", "score": "0.6041397", "text": "function Redirect() {\n\t\t$lRedirUrl = $this->GetRedirUrl($this->m_currentAction);\n\n\t\t$this->LogDebugMsg('Redirecting to: <a href=\"' . $lRedirUrl . '\">' . $lRedirUrl . '</a>');\n\t\tif($this->m_debug){\n\t\t\texit();\n\t\t}\n\n\t\t$lRedirUrl = \"Location: \" . $lRedirUrl;\n\n\t\tHeader($lRedirUrl);\n\t\texit();\n\t}", "title": "" }, { "docid": "03561aaef97fb1933c49f332fbbe576c", "score": "0.603122", "text": "public function execute() {\r\n\r\n // Retrieve the request parameters\r\n $resultRedirect = $this->getResultRedirect();\r\n $cardToken = $this->getRequest()->getParam('cko-card-token');\r\n $email = $this->getRequest()->getParam('cko-context-id');\r\n $agreement = array_keys($this->getRequest()->getPostValue('agreement', []));\r\n $quote = $this->session->getQuote();\r\n\r\n // Perform quote and order validation\r\n try {\r\n\r\n // Create an order from the quote\r\n $this->validateQuote($quote);\r\n $this->orderService->execute($quote, $cardToken, $agreement);\r\n\r\n // 3D Secure redirection if needed\r\n if($this->gatewayConfig->isVerify3DSecure()) {\r\n $this->place3DSecureRedirectUrl();\r\n exit();\r\n }\r\n\r\n return $resultRedirect->setPath('checkout/onepage/success', ['_secure' => true]);\r\n\r\n } catch (\\Exception $e) {\r\n $this->messageManager->addExceptionMessage($e, $e->getMessage());\r\n }\r\n\r\n return $resultRedirect->setPath('checkout/cart', ['_secure' => true]);\r\n }", "title": "" }, { "docid": "062a2e07de53a917b6a627baf88c3d53", "score": "0.60097027", "text": "public function finishOrder()\n {\n return redirect()->route('filter.toko')->with('status', 'Order Berhasil');\n }", "title": "" }, { "docid": "e19d1bb21ec1dc0eadce9cf88369a86f", "score": "0.59997237", "text": "public function getOrderPlaceRedirectUrl()\r\n {\r\n return Mage::getUrl('checkout/onepage/success');\r\n }", "title": "" }, { "docid": "f4233c76265f900976a4412e10d5ab8b", "score": "0.59722805", "text": "public function run()\n {\n $this->checkoutOnepage->getPaymentBlock()->getSelectedPaymentMethodBlock()->clickPlaceOrder();\n }", "title": "" }, { "docid": "93b783cc47fdfcc596bd0411d9fd5b87", "score": "0.59587914", "text": "public function getOrderPlaceRedirectUrl()\n {\n //when you click on place order you will be redirected on this url, if you don't want this action remove this method\n return Mage::getUrl('first/standard/redirect', array('_secure' => true));\n }", "title": "" }, { "docid": "c9451bf72f7304611199aecc9a39b968", "score": "0.5950626", "text": "public function execute()\n\t{\n\t\t$order = $this->_getOrder();\n\t\t$payURL = $this->_paymentMethod->getPaymentUrl($order);\n\t\treturn $this->_resultRedirectFactory->create()->setUrl($payURL);\n\t}", "title": "" }, { "docid": "62f097b80a2f33815911d4b816a62684", "score": "0.59493095", "text": "function hs_do_redirect() {\n\t\tif ($qs = $_SERVER['REQUEST_URI']) {\n\t\t\t$pos = strpos($qs, 'hs_redirect');\n\t\t\tif (!(false === $pos)) { \n\t\t\t\t$link = substr($qs, $pos);\n\t\t\t\t$link = str_replace('hs_redirect=', '', $link);\n\t\n\t\t\t\t// Extract the ID and get the link\n\t\t\t\t$pattern = '/hs_redirect_(\\d+?)\\=/';\n\t\t\t\tpreg_match($pattern, $link, $matches);\n\t\t\t\t$link = preg_replace($pattern, '', $link);\n\t\n\t\t\t\t// Save click!\n\t\t\t\t//if (get_option('administer_statistics') == 'true') { \n\t\t\t\t\t$id = $matches[1];\n\t\t\t\t\tif(!$this->is_bot($_SERVER['HTTP_USER_AGENT'])){\n\t\t\t\t\t\t$this->hs_register_click($id);\n\t\t\t\t\t}\n\t\t\t\t//}\n\t\n\t\t\t\t// Redirect\n\t\t\t\theader(\"HTTP/1.1 302 Temporary Redirect\");\n\t\t\t\theader(\"Location:\" . $link);\n\t\t\t\t// I'm outta here!\n\t\t\t\texit(1);\n\t\t\t}\n\t\t} \n\t}", "title": "" }, { "docid": "a97ef7dbff8e6bdf19159f2766db1095", "score": "0.59407574", "text": "public function norouteAction()\r\n {\r\n $this->_redirect('/');\r\n }", "title": "" }, { "docid": "6e1d34a868fb05ba66dd3656d1c1033a", "score": "0.5922906", "text": "public function successAction()\n {\n $orderId = $this->getRequest()->getParam('order_id');\n if (Mage::helper('wallee_payment')->hash($orderId) != $this->getRequest()->getParam('secret')) {\n Mage::throwException('Invalid secret.');\n }\n\n /* @var Mage_Sales_Model_Order $order */\n $order = Mage::getModel('sales/order')->load($orderId);\n\n /* @var Mage_Checkout_Model_Session $checkoutSession */\n $checkoutSession = Mage::getSingleton('checkout/session');\n $checkoutSession->getQuote()\n ->setIsActive(false)\n ->save();\n $checkoutSession->setLastSuccessQuoteId($order->getQuoteId());\n\n /* @var Wallee_Payment_Model_Service_Transaction $transactionService */\n $transactionService = Mage::getSingleton('wallee_payment/service_transaction');\n $transactionService->waitForTransactionState(\n $order, array(\n \\Wallee\\Sdk\\Model\\TransactionState::CONFIRMED,\n \\Wallee\\Sdk\\Model\\TransactionState::PENDING,\n \\Wallee\\Sdk\\Model\\TransactionState::PROCESSING\n ), 3\n );\n\n $this->_redirectUrl($this->getSuccessUrl($order));\n }", "title": "" }, { "docid": "64fc164eab83f9b27aa56287c48fffc5", "score": "0.59151894", "text": "function redirect( ) {\r\n ob_start();\r\n header('Location: /~dgilm1/app/model/modify_customer_detail.php');\r\n ob_end_flush();\r\n die();\r\n}", "title": "" }, { "docid": "cf59b708c3e670ff5671ba3169402074", "score": "0.5914198", "text": "function orderFailed(){\n header(\"Location: failed.php\");\n die();\n}", "title": "" }, { "docid": "1c2b9df75f10f54708d880c61073446a", "score": "0.5909631", "text": "public function execute()\n {\n $this->_forward('edit');\n }", "title": "" }, { "docid": "2c2da36f96aecdbf1cf3ba803f6bd17b", "score": "0.5898228", "text": "public function testSuccessRedirect()\n\t{\n\n\t\t// make module list not apply\n\t\t$this->mollie->expects($this->atLeastOnce())\n\t\t\t->method('getConfigValue')\n\t\t\t->will($this->returnValue(Mollie::ISSUERS_PAYMENT_PAGE));\n\n\t\t// needs a method\n\t\t$_GET['method'] = 'ideal';\n\n\t\t// set payment data\n\t\t$this->controller->expects($this->once())\n\t\t\t->method('_getPaymentData')\n\t\t\t->will($this->returnValue(array()));\n\n\t\t// create payment\n\t\t$this->controller->expects($this->once())\n\t\t\t->method('_createPayment')\n\t\t\t->will($this->returnValue($this->mollie_payment));\n\n\t\t// consider successful if getPaymentUrl gets called\n\t\t$this->mollie_payment->expects($this->once())\n\t\t\t->method('getPaymentUrl');\n\n\t\t// execute\n\t\t$this->controller->initContent();\n\t}", "title": "" }, { "docid": "226fcd77fe71d8e1393c8e34c009906c", "score": "0.58969444", "text": "function _jr_order_redirect_user( $order, $plan, $attach = '' ) {\n\n\t$args = array (\n\t\t'order' => $order->get_id(),\n\t);\n\n\tif ( $attach && APP_POST_TYPE == $attach->post_type ) {\n\t\t$args['job_id'] = $attach->ID;\t\t\t// order with job attached\n\t} else {\n\t\t$args['plan_type'] = $plan->post_type;\t// order with no jobs attached\n\t}\n\n\t// is the job being relisted?\n\tif ( !empty($_POST['relist']) ) {\n\t\t$args['job_relist'] = $attach->ID;\n\t}\n\n\t// move form to next step\n\tif ( !empty($_POST['step']) ) {\n\t\t$args['step'] = intval($_POST['step'])+1;\n\t}\n\n\t// set the previous page URl if the user decides to chooses a different plan while selecting the gateway\n\t$args['referer'] = urlencode($_SERVER['REDIRECT_URL']);\n\n\t$redirect_to = add_query_arg(\n\t\t$args,\n\t\t$order->get_return_url()\n\t);\n\n\t$redirect_to = esc_url_raw( $redirect_to );\n\n\twp_redirect( $redirect_to );\n\texit();\n}", "title": "" }, { "docid": "df61a74eb692919a3f194682675c44b8", "score": "0.58905476", "text": "function forwardWidget()\n {\n if( $this->_request->hasParameter( 'surl' ) )\n $scrapeUrl = $this->_request->getParameter( 'surl' );\n \n // in case the regular url is used\n else if( $this->_request->hasParameter( 'url' ) )\n $scrapeUrl = $this->_request->getParameter( 'url' );\n \n else if( isset( $_SERVER[ 'HTTP_REFERER' ] ) )\n $scrapeUrl = $_SERVER[ 'HTTP_REFERER' ];\n else\n $scrapeUrl = null;\n \n if( $scrapeUrl )\n $scrapeUrl = rawurlencode( $scrapeUrl );\n \n $extcmp = $this->_request->getParameter( 'extcmp' );\n \n $redirect = $this->_controller->genUrl( \n array( 'module' => 'OpenLocker', \n 'action' => 'ExternalMobilize' ) );\n \n $redirect .= $extcmp ? '?extcmp=' . $extcmp . '&' : '?';\n\n $redirect .= 'sUrl=' . $scrapeUrl;\n \n header( 'location: ' . $redirect );\n exit();\n }", "title": "" }, { "docid": "10d5ad4780d48dac93db9d78a124b4d5", "score": "0.5886485", "text": "public function order()\n {\n $cid = JRequest::getVar('cid', array(), 'post', 'array');\n\n // Direction\n $dir = 1;\n $task = JRequest::getCmd('task');\n if($task == 'orderup')\n {\n $dir = -1;\n }\n\n if(isset($cid[0]))\n {\n $row = JTable::getInstance('joomgalleryconfig', 'Table');\n $row->load((int)$cid[0]);\n $row->move($dir);\n //$row->reorder();\n }\n\n $this->setRedirect($this->_ambit->getRedirectUrl());\n }", "title": "" }, { "docid": "c7ef1ebc11dce0c740e4316474791c48", "score": "0.58853096", "text": "function onAction()\n {\n global $_POST;\n /** Check prerequisites for the next step.\n * If they are performed, set the required step number.\n * Perform all extra required actions.\n * After that can be mapped a new checkout step.\n */\n global $application;\n\n $lastPlacedOrderID = modApiFunc(\"Checkout\", \"getLastPlacedOrderID\");\n // ConfirmOrder\n if(empty($lastPlacedOrderID))\n {\n\t $CHECKOUT_CZ_BLOWFISH_KEY_WAS_LOST = modApiFunc(\"Checkout\", \"getPerRequestVariable\", \"CHECKOUT_CZ_BLOWFISH_KEY_WAS_LOST\");\n\t if($CHECKOUT_CZ_BLOWFISH_KEY_WAS_LOST === true)\n\t {\n\t // ,\n\t // , .\n\t // Credit Card Info.\n\t //: , redirect\n\t // estimateLostEncryptedData , step_id GET ,\n\t // step_id, ,\n\t // estimateLostEncryptedData.\n\t // estimateLostEncryptedData step_id GET ,\n\t // (2007 dec) .\n\t modApiFunc(\"Checkout\", \"estimateLostEncryptedData\");\n\t }\n }\n\n $request = $application->getInstance('Request');\n\n $step_id = $request->getValueByKey( 'step_id' );\n $previous_step_id = $request->getValueByKey( 'previous_step_id' );\n\n// $SessionPost_PreviousStep_Name = 'SessionPost'.$previous_step_id;\n// $$SessionPost_PreviousStep_Name = array();\n// $SessionPost_PreviousStep = &$$SessionPost_PreviousStep_Name;\n\n // is next check correct? Consider both \"success\" e.g. 1=>2 and \"error\" e.g. 3=>2\n// if(modApiFunc('Session', 'is_Set', '$SessionPost_PreviousStep_Name'))\n// {\n// _fatal(__CLASS__ .'::'. __FUNCTION__ . \" session[\" . $SessionPost_PreviousStep_Name . \"] is already set.\");\n// }\n\n// $SessionPost_PreviousStep = $_POST;\n\n // move initialization into init section\n// $SessionPost_PreviousStep[\"ViewState\"] = array();\n //END\n\n// $SessionPost_PreviousStep[\"ViewState\"][\"ErrorsArray\"] = array();\n\n modApiFunc(\"Checkout\", \"ProcessNewStepID\", $step_id);\n\n modApiFunc(\"Checkout\", \"clearNotMetPrerequisitesValidationResultsDataForAllPosteriorSteps\", $step_id);\n\n $step_id_to_redirect_to = modApiFunc(\"Checkout\", \"getCurrentStepID\");\n $request = new Request();\n $request->setView('CheckoutView');\n $request->setAction(\"SetCurrStep\");\n $request->setKey ( 'step_id', $step_id_to_redirect_to);\n $request = modApiFunc(\"Checkout\", \"appendCheckoutCZGETParameters\", $request);\n\n modApiFunc(\"Checkout\", \"saveState\");\n\n if(empty($_POST))\n {\n // action view: view\n }\n else\n {\n // action \" \",\n // view\n $application->redirect($request);\n }\n }", "title": "" }, { "docid": "f400de6d9c84435d8d7b30c3be8d9a55", "score": "0.5884507", "text": "public function testOrder()\n\t{\n\t\t\t/*and you must edit code in ordercontroller line32 from $nameshop to your email address*/\n\t\t\t/*after you run this code you will receive your email inbox */\n\t\t\t$nameshop = 'Narashop'; //define name shop that already created in website\n\t\t\t \n\t\t\t$response = $this->action('POST', 'OrderController@postOrder', array('name' => 'test','lastname' => 'test','phonenumber' => '082','description' => 'testserv','address' => '878987'));\n\t\t\t\n\t\t\t$this->assertRedirectedToRoute('shop-user','{name}');\n\t\t\t \n\t\t\n\t}", "title": "" }, { "docid": "a9a26716e9b10f3aef1c321793eb6463", "score": "0.58790874", "text": "public function onAfterInstall()\n {\n craft()->request->redirect(UrlHelper::getCpUrl('/casper/thanks/'));\n }", "title": "" }, { "docid": "8a02e04a082cb8f4993a0e83aaf42b03", "score": "0.58621967", "text": "private function redirect() {\n\t\t$args_to_remove = array( 'feedback_ids', 'bulk_action', 'bulk_action2' );\n\t\t$url = set_url_scheme( 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );\n\t\t$url = remove_query_arg( $args_to_remove, $url );\n\t\t$this->wp_api->wp_safe_redirect( $url );\n\t}", "title": "" }, { "docid": "824be18a6205406a627078838474c667", "score": "0.5861583", "text": "public function redirectProxyAction()\n {\n $session = Mage::getSingleton('adminhtml/session');\n if ($session !== null) {\n $type = $this->getRequest()->getParam('message_type');\n $code = $this->getRequest()->getParam('message_code');\n $text = $this->getRequest()->getParam('message_text');\n if ($type !== null && $code !== null) {\n $session->setData('nosto_message', array(\n 'type' => $type,\n 'code' => $code,\n 'text' => $text,\n ));\n }\n }\n $params = array();\n if (($storeId = (int)$this->getRequest()->getParam('store')) !== 0) {\n $params['store'] = $storeId;\n }\n $this->_redirect('*/*/index', $params);\n }", "title": "" }, { "docid": "2202bbe7af496dcea516184576faaf13", "score": "0.58613795", "text": "function orderdown()\r\n {\r\n JRequest::checkToken() or jexit('Invalid Token');\r\n\r\n $model = $this->getModel('attribute');\r\n $model->move(1);\r\n\r\n $this->setRedirect('index.php?option=com_webmapplus&view=markers');\r\n }", "title": "" }, { "docid": "f796d1cc3395ccc152e3f176d4f26253", "score": "0.58600456", "text": "public function forward()\r\n\t{\r\n\t\t$this->redirect($this->build());\t\t\r\n\t}", "title": "" }, { "docid": "459eff67b13ea0d8674877b7ae432c07", "score": "0.5857364", "text": "public function afterSale()\n {\n // unset session\n $this->billingService->unsetSessionSale();\n $this->billingService->unsetSessionBackUrl();\n\n $backUrl = !empty($_POST['redirect']) ? $_POST['redirect'] : OW::getRouter()->getBaseUrl();\n\n // check success\n if (!empty($_POST['status']) && $_POST['status'] === 'success')\n {\n OW::getFeedback()->info($this->lang->text('base', 'billing_order_completed_successfully'));\n $this->redirect($backUrl);\n }\n\n // check error\n if (!empty($_POST['status']) && $_POST['status'] === 'error')\n {\n // get error message\n $errorMessage = !empty($_POST['message'])\n ? $_POST['message']\n : $this->lang->text('base', 'billing_order_canceled');\n\n OW::getFeedback()->error($errorMessage);\n $this->redirect($this->billingService->getOrderFailedPageUrl());\n }\n\n $this->redirect($backUrl);\n }", "title": "" }, { "docid": "a95e3c50ba64ac16aa2970b60aa281a6", "score": "0.5854003", "text": "public function saveorder()\n\t{\n\t\tJSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\n\n\t\t// Get the input\n\t\t$pks = JRequest::getVar('cid', null, 'post', 'array');\n\t\t$order = JRequest::getVar('order', null, 'post', 'array');\n\n\t\t// Sanitize the input\n\t\tJArrayHelper::toInteger($pks);\n\t\tJArrayHelper::toInteger($order);\n\n\t\t// Get the model\n\t\t$model = $this->getModel('Gateway');\n\t\tif (!$model->saveorder($pks, $order)) {\n\t\t\t$msg = JText::sprintf('JLIB_APPLICATION_ERROR_REORDER_FAILED', $model->getError());\n\t\t} else {\n\t\t\t$msg = JText::_('JLIB_APPLICATION_SUCCESS_ORDERING_SAVED');\n\t\t}\n\n $this->setRedirect(FactoryRoute::view('gateways'), $msg);\n\t}", "title": "" }, { "docid": "7553717a40a86f8003aa0f5fa8abe851", "score": "0.5851025", "text": "public function delivery(){\n\t\t\t$id = isset($_GET[\"id\"]) ? $_GET[\"id\"] : 0;\n\t\t\t//goi ham tu model de thuc hien\n\t\t\t$this->modelDelivery($id);\n\t\t\t//di chuyen den trang danh sach cac ban ghi\n\t\t\techo \"<script>location.href='index.php?controller=orders';</script>\";\n\t\t}", "title": "" }, { "docid": "08d4a5f048ea78cf2b216c07598c5a7c", "score": "0.5844244", "text": "public function placeOrderAction() {\n\n $directPayment = 0;\n $isPaymentToSiteEnable = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitecrowdfunding.payment.to.siteadmin', 0);\n if (empty($isPaymentToSiteEnable)) {\n $directPayment = 1;\n }\n try {\n\n\n $data = $this->_getParam('data', null);\n $paymentGatewayId = $this->_getParam('payment_gateway');\n if (empty($data)) {\n $this->respondWithError('unauthorized', \"Back amount not found\");\n }\n $data = preg_replace('/\\\\\\\"/', \"\\\"\", $data);\n if (!empty($data))\n $data = Zend_Json::decode($data);\n\n // GET VIEWER\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n $project_id = $this->_getParam('project_id', null);\n\n $backer_table = Engine_Api::_()->getDbtable('backers', 'sitecrowdfunding');\n } catch (Exception $ex) {\n $this->respondWithValidationError('internal_server_error', $ex->getMessage());\n }\n // PROCESS\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n // GET IP ADDRESS\n $ipObj = new Engine_IP();\n $ipExpr = new Zend_Db_Expr($db->quoteInto('UNHEX(?)', bin2hex($ipObj->toBinary())));\n try {\n //check if value of grandtotal is 0\n if (empty($data['pledge_amount'])) {\n $this->respondWithError('unauthorized', \"Back amount not found\");\n }\n //SAVE Backers DETAILS IN Backer TABLE.\n $shippingDetail = $_REQUEST;\n $table = Engine_Api::_()->getDbtable('backers', 'sitecrowdfunding');\n $backer = $table->createRow();\n $backer->user_id = $viewer_id;\n $backer->project_id = $project_id;\n $backer->order_status = 1;\n $backer->payment_status = 'initial';\n $backer->creation_date = date('Y-m-d H:i:s');\n $backer->gateway_id = $paymentGatewayId;\n $backer->ip_address = $ipExpr;\n $backer->gateway_type = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitecrowdfunding.payment.method', 'normal');\n $backer->amount = $data['pledge_amount'];\n $backer->direct_payment = $directPayment;\n $reward = Engine_Api::_()->getItem('sitecrowdfunding_reward', $data['reward_id']);\n //CHECKING FOR REWARD SHIPPING ADDRESS\n if (!empty($reward)) {\n $backer->shipping_country = $regionId = $data['region_id'];\n $backer->shipping_address1 = $shippingDetail['address1'];\n $backer->shipping_address2 = $shippingDetail['address2'];\n $backer->shipping_city = $shippingDetail['city'];\n $backer->shipping_zip = $shippingDetail['postal_code'];\n\n //FIND SHIPPING LOCATION\n if (!empty($regionId)) {\n $shippingLocation = Engine_Api::_()->getDbTable('rewardshippinglocations', 'sitecrowdfunding')->findShippingLocation($reward->reward_id, $regionId);\n if ($shippingLocation) {\n // $this->respondWithError('unauthorized', \"Shipping location is not found\");\n $backer->shipping_price = $shippingLocation['amount'];\n }\n }\n //Set shipping price\n //$backer->shipping_price = $shippingLocation['amount'];\n }\n\n $backer->is_private_backing = empty($_POST['isPrivateBacking']) ? 0 : 1;\n\n if (!empty($reward)) {\n $backer->delivery_date = $reward->delivery_date;\n }\n //COMMISSION WORK\n $commission = Engine_Api::_()->sitecrowdfunding()->getCommission($project_id);\n $commission_type = $commission[0];\n $commission_rate = $commission[1];\n // IF COMMISSION VALUE IS FIX.\n if ($commission_type == 0)\n $commission_value = $commission_rate;\n else\n $commission_value = (@round($data['pledge_amount'], 2) * $commission_rate) / 100;\n $backer->commission_type = $commission_type;\n $backer->commission_value = $commission_value;\n $backer->commission_rate = $commission_rate;\n $backer->save();\n // COMMIT\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n $this->respondWithValidationError('internal_server_error', $e->getMessage());\n }\n\n $backer_id = Engine_Api::_()->sitecrowdfunding()->getDecodeToEncode($backer->backer_id);\n\n $gateway_id = $paymentGatewayId;\n\n $getHost = Engine_Api::_()->getApi('core', 'siteapi')->getHost();\n $baseUrl = Zend_Controller_Front::getInstance()->getBaseUrl();\n $baseUrl = @trim($baseUrl, \"/\");\n $getOauthToken = Engine_Api::_()->getApi('oauth', 'siteapi')->getAccessOauthToken($viewer);\n $slug_plural = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitecrowdfunding.slugplural', 'projects');\n\n $url = $getHost . '/' . $baseUrl . '/' . $slug_plural . '/backer/payment';\n\n $url .= \"?project_id=\" . $project_id . \"&gateway_id=\" . $paymentGatewayId . \"&backer_id=\" . $backer_id;\n $this->respondWithSuccess(array('payment_url' => $url), false);\n }", "title": "" }, { "docid": "14c39d2af4af8b1dd016ad3708c9a376", "score": "0.58358246", "text": "public function suggestionsTask()\n\t{\n\t\tApp::redirect(\n\t\t\tRoute::url('index.php?option=com_wishlist')\n\t\t);\n\t}", "title": "" }, { "docid": "57c25d5d254ed45d4d8cb49ccfafb7b4", "score": "0.58302176", "text": "public function execute()\n {\n try {\n $orderInfo = $this->parseOrderInfo();\n if ($orderInfo['status'] === false) {\n $this->messageManager->addErrorMessage($orderInfo['msg']);\n $this->_redirect('checkout/cart');\n } else {\n if ($orderInfo['status'] === true\n && $orderInfo['order_info']['state'] === General::PAY_PAID\n ) {\n $orderInfo = $orderInfo['order_info'];\n $this->wechatPay->processTransaction($orderInfo);\n $this->_redirect(\n 'checkout/onepage/success?utm_nooverride=1'\n );\n } else {\n $this->_redirect('checkout/onepage/error?utm_nooverride=1');\n }\n }\n } catch (\\Exception $e) {\n $this->messageManager->addExceptionMessage(\n $e, __($e->getMessage())\n );\n $this->yaBandWechatPayHelper->addTolog('error', $e->getMessage());\n $this->_redirect('checkout/cart');\n }\n }", "title": "" }, { "docid": "db3111b0c388c4c4cbae8d67d4687635", "score": "0.58300084", "text": "public function callbackSuccess()\n {\n $this->redirectTo();\n }", "title": "" }, { "docid": "2b3a4c635866f1f50ed147961c896386", "score": "0.58248353", "text": "public function execute()\n {\n $resultRedirect = $this->resultRedirectFactory->create(); \n $resultPage = $this->resultPageFactory->create(); \n $navigationBlock = $resultPage->getLayout()->getBlock('customer_account_navigation');\n if ($navigationBlock) {\n $navigationBlock->setActive('advertisement/purchased/index');\n } \n if(!$this->_customerSession->isLoggedIn() || !$this->adHelper->isModuleEnable()){\n $this->messageManager->addError(__('You are not allowed to perform this action.')); \n $resultRedirect->setPath('/');\n return $resultRedirect;\n } \n $this->_view->loadLayout();\n\n if ($block = $this->_view->getLayout()->getBlock('advertisement_purchased')) {\n $block->setRefererUrl($this->_redirect->getRefererUrl());\n }\n $this->_view->getPage()->getConfig()->getTitle()->set(__('Purchased Plans'));\n $this->_view->renderLayout();\n }", "title": "" }, { "docid": "3b6f1d3377bb5ae6ba81c7aa9ca25312", "score": "0.58152604", "text": "function BeforeProcessList(&$pageObject)\n{\n\n\t\theader(\"location: surat_view_list.php\");\nexit;\n;\t\t\n}", "title": "" }, { "docid": "e028d28f40621aacd9a9b293c1f66ba6", "score": "0.58087164", "text": "public function reorder()\n\t{\n\t\tJSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\n\n\t\t// Initialise variables.\n\t\t$ids = JRequest::getVar('cid', null, 'post', 'array');\n\t\t$inc = ($this->getTask() == 'orderup') ? -1 : +1;\n\n\t\t$model = $this->getModel('Gateway');\n\t\tif (!$model->reorder($ids, $inc)) {\n\t\t\t$msg = JText::sprintf('JLIB_APPLICATION_ERROR_REORDER_FAILED', $model->getError());\n\t\t} else {\n\t\t\t$msg = JText::_('JLIB_APPLICATION_SUCCESS_ITEM_REORDERED');\n\t\t}\n\n $this->setRedirect(FactoryRoute::view('gateways'), $msg);\n\t}", "title": "" }, { "docid": "60c601a3ea99451eb17b913b3bdd43ba", "score": "0.58075714", "text": "public function successAction()\n {\n Mage::helper('cjcheckout')->log('Controller load: cjcheckout/standard/success');\n\n if ($this->_getQuote()->getIsActive()) {\n $this->_getQuote()->setTotalsCollectedFlag(false);\n $this->_getQuote()->collectTotals();\n $order = $this->_getOnepage()->saveOrder();\n }\n \n Mage::getSingleton('core/cookie')->delete('coinjarOrder', '/', null, null, false);\n Mage::getSingleton('checkout/session')->getQuote()->setIsActive(false)->save();\n $this->_redirect('checkout/onepage/success', array('_secure'=>true));\n }", "title": "" }, { "docid": "aa97093a62b8af81626ce855ff9bfa17", "score": "0.58042145", "text": "protected function Admin_DoActions() {\n\t$oPage = $this->PageObject();\n\t$oPath = $oPage->PathObj();\n\t$sDo = $oPath->GetText('do');\n\n\t$this->Option_DoFetch(FALSE);\n\t$this->Option_DoReplace(FALSE);\n\n\t$arPage = array(\n\t 'do'\t\t=> FALSE,\n\t 'edit'\t=> FALSE,\n\t );\n\tswitch($sDo) {\n\t case 'void':\t\t// void this package\n\t $this->DoVoid();\n\t $this->SelfRedirect($arPage);\n\t break;\n\t case 'pack':\t\t\t// get (more) items from stock\n\t $this->Option_DoFetch(TRUE);\t// trigger stock-fetch form\n\t break;\n\t case 'charge':\t// create transactions for package contents\n\t $this->AdminDoCharge();\n\t $this->SelfRedirect();\n\t break;\n\t case 'uncharge':\t// remove transactions for this package\n\t $this->AdminUnCharge();\n\t $this->SelfRedirect();\n\t break;\n\t case 'replace':\t// put items back in stock\n\t $this->Option_DoReplace(TRUE);\t// trigger stock-replace form\n\t break;\n\t case 'check-in':\n\t $oPage = $this->PageObject();\n\t if ($oPage->PathArg_exists('ship.id')) {\n\t\t$idShip = $oPage->PathArg('ship.id');\n\t\t$this->CheckInShipment($idShip);\n\t\t$this->SelfRedirect();\n\t\tdie();\n\t }\n\t $this->Option_DoCheckIn(TRUE);\n\t break;\n\t}\n }", "title": "" }, { "docid": "b2fabdb4c99cba4f97f93e1a07bd26cb", "score": "0.57964236", "text": "public function redirectAction()\n {\n // based on referrer (did it come from a live site - which live site?)\n // are these redirects that are defined in the database for campaigns?\n }", "title": "" }, { "docid": "6561752c9ae8333d3d95c480a249a87c", "score": "0.5777264", "text": "public function maybe_redirect_after_activation() {\n\n\t\tif ( ! get_transient( 'crocoblock_wizard_redirect' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( wp_doing_ajax() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdelete_transient( 'crocoblock_wizard_redirect' );\n\n\t\tif ( is_network_admin() || isset( $_GET['activate-multi'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( $this->is_dashboard_page() ) {\n\t\t\treturn;\n\t\t}\n\n\t\twp_safe_redirect( $this->page_url( $this->get_initial_page() ) );\n\t\tdie();\n\n\t}", "title": "" }, { "docid": "19a837506060f7fb5150a8d96b74e53c", "score": "0.57709277", "text": "public function redirect();", "title": "" }, { "docid": "19a837506060f7fb5150a8d96b74e53c", "score": "0.57709277", "text": "public function redirect();", "title": "" }, { "docid": "d3256ceb37a83cd046e6ade9f07cbb69", "score": "0.5766591", "text": "public function getOrderPlaceRedirectUrl()\n {\n return Mage::getUrl('eximbay/processing/payment');\n }", "title": "" }, { "docid": "0a0b5d039472abc87f06f11d0d09422f", "score": "0.5763212", "text": "public function actionPlaceOrder() {\n Yii::app()->user->SiteSessions;\n $cart = Cart::model()->getCartLists();\n $criteria = new CDbCriteria;\n $criteria->order = \"id DESC\";\n $criteria->addCondition(\"user_id = \" . Yii::app()->user->id);\n $userShipping = UserOrderShipping::model()->find($criteria);\n $creditCardModel = new CreditCardForm;\n\n if (isset($_POST['UserOrderShipping'])) {\n $userShipping->attributes = $_POST['UserOrderShipping'];\n $is_valid = $this->validateCreditCard($userShipping, $creditCardModel);\n if ($is_valid) {\n\n $creditCardModel->payment_method = $userShipping->payment_method;\n\n switch ($userShipping->payment_method) {\n case \"Credit Card\": // credit card\n\n $this->processCreditCard($userShipping, $creditCardModel);\n break;\n case \"Cash On Delievery\": // manual\n $this->processManual($creditCardModel);\n break;\n case \"Pay Pal\": //paypal\n\n $this->redirect($this->createUrl(\"/web/paypal/buy\"));\n break;\n }\n }\n }\n\n\n\n\n $this->render('//payment/place_order', array(\n 'cart' => $cart,\n 'userShipping' => $userShipping,\n 'creditCardModel' => $creditCardModel,\n ));\n }", "title": "" }, { "docid": "531dd34e950fb941b95d913553b9f84d", "score": "0.57551426", "text": "public function execute()\n\t{\n\t\thttp_response_code($this->getStatusCode());\n\t\theader(\"Location: {$this->getLocation()}\");\n\t}", "title": "" }, { "docid": "103c4c35ba0bca71e0462baa6a79daa2", "score": "0.5748539", "text": "public function handleRedirects(Varien_Event_Observer $observer)\n {\n $this->_handleCampaignRedirect();\n $this->_redirectToProductIfSingleResult();\n }", "title": "" }, { "docid": "597e4181fe6b67984d4359af14d7f868", "score": "0.5733104", "text": "function next_step()\r\n{\r\n global $app, $step, $order_status, $payment_controller;\r\n $order_status['step']++;\r\n header('Location: ' . payment_controller_url());\r\n exit;\r\n}", "title": "" }, { "docid": "e13ee117a52d89470886647f1e1153d1", "score": "0.5728981", "text": "public function salesHistoryAction(){\n\t\t// pass orders to view\n\t}", "title": "" }, { "docid": "54dfb84066ee5b7012512884befd3807", "score": "0.5725845", "text": "public function ship() {\n redirect('/assembly');\n }", "title": "" }, { "docid": "90fad7ece538e26640c31fafeb34674c", "score": "0.5723794", "text": "protected function redirectToAdminComments()\n {\n $this->redirectTo($this->generateUrl('comment_management_comments'));\n }", "title": "" }, { "docid": "d0dc0d4f9d78caad4fd2a0a2a909eb8d", "score": "0.5723277", "text": "public function startAction()\n {\n /**\n * Clear old values for invoice qty's\n */\n $this->_getSession()->getInvoiceItemQtys(true);\n $this->_redirect('*/*/new', array('order_id'=>$this->getRequest()->getParam('order_id')));\n }", "title": "" }, { "docid": "dd4cd4063b77f459050e33043dbba544", "score": "0.5716785", "text": "public function execute()\n {\n $this->_view->loadLayout(false);\n $gotoSection = $this->_cancelPayment();\n $redirectBlock = $this->_view->getLayout()->getBlock($this->_redirectBlockName);\n $redirectBlock->setGotoSection($gotoSection);\n $this->_view->renderLayout();\n }", "title": "" }, { "docid": "7c27dd382160aa4bd22d23869b2453f4", "score": "0.570143", "text": "function redirect() {\n\t\theader('Location: admin.php');\n\t\texit();\n\t}", "title": "" }, { "docid": "31b2ab0f04265edde2650efd61eaa80b", "score": "0.5698809", "text": "public function afterProcessing () {\r\n\t\t\r\n\t\tif (empty($this->redirect)) {\r\n\t\t\t$this->redirect = array('action' => $this->controller->params['action']);\r\n\t\t}\r\n\t\t\r\n\t\t$this->controller->redirect($this->redirect);\r\n\t\t\r\n\t\treturn true;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "451b036bac8cc5d89be194dbdc0e455f", "score": "0.5696158", "text": "public function getOrderPlaceRedirectUrl()\n {\n return Mage::getUrl('dhpay/processing/payment');\n }", "title": "" }, { "docid": "ee5d9b399c55c62528cc339c31aecbd9", "score": "0.56955224", "text": "function uc_ups_fulfill_order_submit($form, &$form_state) {\n $form_state['redirect'] = 'admin/store/orders/'. $form_state['values']['order_id'] .'/shipments/ups';\n}", "title": "" }, { "docid": "1a46a8ee4343ce7ef0497133c6a63367", "score": "0.5693119", "text": "public function redirectToPartInstanceAdmin()\r\n\t{\r\n\t\t$piId = $this->Request['id'];\r\n\t\t$searchstring = $this->Request['searchstring'];\r\n\t\t$this->Response->redirect('/partinstances/details/'.$piId.'/'.$searchstring);\t\t\r\n\t}", "title": "" }, { "docid": "ac9a3fdc00fd9d2b50aeda0866df2eff", "score": "0.5681", "text": "public function proceed()\n\t{\n\t\tob_end_clean();\n\t\tif(strpos(MODULE_PAYMENT_INSTALLED, 'paypal3') === false)\n\t\t{\n\t\t\tob_start();\n\t\t\tparent::proceed();\n\t\t\treturn;\n\t\t}\n\t\t$orders_id = (int)$this->v_data_array['GET']['oID'];\n\t\t$order = new order($orders_id);\n\t\t$this->paypalConfigStorage = MainFactory::create('PayPalConfigurationStorage');\n\t\t$this->paypalText = MainFactory::create('PayPalText');\n\n\t\tif($_SERVER['REQUEST_METHOD'] == 'POST')\n\t\t{\n\t\t\tif(isset($_POST['pp3paylink']))\n\t\t\t{\n\t\t\t\tisset($_SESSION['coo_page_token']) === false || $_SESSION['coo_page_token']->is_valid($_POST['page_token']) or die('invalid page token');\n\n\n\t\t\t\tif(isset($_POST['pp3paylink']['delete']))\n\t\t\t\t{\n\t\t\t\t\t$this->deletePaycode($orders_id);\n\t\t\t\t\t$_SESSION[self::MESSAGES_NS][] = $this->paypalText->get_text('paylink_deleted');\n\t\t\t\t}\n\t\t\t\telseif(isset($_POST['pp3paylink']['amount']))\n\t\t\t\t{\n\t\t\t\t\t$paycode = $this->makePaycode($orders_id, $_POST['pp3paylink']['amount']);\n\t\t\t\t\t$_SESSION[self::MESSAGES_NS][] = $this->paypalText->get_text('paylink_created') . ' ('.$paycode.')';\n\t\t\t\t}\n\n\t\t\t\txtc_redirect(xtc_href_link('orders.php', 'oID='.(int)$_GET['oID']).'&action=edit');\n\t\t\t}\n\t\t\tob_start();\n\t\t\tparent::proceed();\n\t\t\treturn;\n\t\t}\n\n\t\t$t_messages = is_array($_SESSION[self::MESSAGES_NS]) ? $_SESSION[self::MESSAGES_NS] : array();\n\t\t$_SESSION[self::MESSAGES_NS] = array();\n\t\t$pp3paylink_page_token = isset($_SESSION['coo_page_token']) ? $_SESSION['coo_page_token']->generate_token() : '';\n\t\t$pp3_paylink_action = xtc_href_link('orders.php', http_build_query($_GET));\n\t\t$pp3_paylink_amount = $this->getOrderTotal($orders_id);\n\t\t$pp3_paycode = $this->findPaycode($orders_id);\n\t\tif($pp3_paycode !== false)\n\t\t{\n\t\t\t$pp3_paylink_url = xtc_catalog_href_link('shop.php', 'do=PayPal/Paylink&code='.$pp3_paycode->paycode, 'SSL');\n\t\t\t$pp3_paylink_amount = number_format($pp3_paycode->amount, 2, '.', '');\n\t\t}\n\t\tob_start();\n\t\tinclude DIR_FS_ADMIN.'html/content/paypal3/orders_paypal3_paylink.php';\n\t\techo $this->paypalText->replaceLanguagePlaceholders(ob_get_clean());\n\n\t\tob_start();\n\t\t$this->addContent();\n\t\tparent::proceed();\n\t}", "title": "" }, { "docid": "f83aa6b601cd09ae233c1f0fddc96be8", "score": "0.56802076", "text": "public function execute($request)\n {\n $this->redirect(\"@camp.friendfinder\", 301);\n\n }", "title": "" }, { "docid": "2fd7781948a11ee0607e283eb5e50cf4", "score": "0.5679855", "text": "public function main()\n {\n\t\t$this->redirect(ModUtil::url('PostCalendar', 'admin', 'listevents'));\n }", "title": "" }, { "docid": "8c6fa51263d98d907df83cd71f7b567b", "score": "0.5678332", "text": "public function redirectToPublisher()\n {\n return Redirect::to(handles('orchestra::publisher/ftp'));\n }", "title": "" }, { "docid": "b78676546ebbca4db0d3282913411ed1", "score": "0.56736374", "text": "function orderdown()\n\t{\n\t\tJRequest::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\n\n\t\t$model = $this->getModel('newsfeed');\n\t\t$model->move(1);\n\n\t\t$this->setRedirect('index.php?option=com_newsfeeds');\n\t}", "title": "" }, { "docid": "91e863bb4903dc699c06ae7db2f53077", "score": "0.5668601", "text": "protected function perform_redirect()\n\t{\n\t\tglobal $phpbb_root_path, $phpEx;\n\t\t$url = append_sid($phpbb_root_path . 'index.' . $phpEx);\n\t\tredirect($url);\n\t}", "title": "" }, { "docid": "e6263a33b7a652159b9825235cb8f8fd", "score": "0.56598103", "text": "public function afterExecuteRoute() {\n if ($this->dispatcher->isFinished() && $this->dispatcher->wasForwarded())\n return;\n\n parent::afterExecuteRoute();\n }", "title": "" }, { "docid": "cd31e6fb0a41b9cbfed180c8299bb966", "score": "0.56468976", "text": "protected function redirect() {\n\t\t@ob_clean();\n\n\t\t$url = $this->get_current_page();\n\t\t$url = apply_filters( 'front_end_form_redirect_' . $this->id, add_query_arg( 'success', '1', $url ) );\n\n\t\twp_redirect( $url, 303 );\n\n\t\texit;\n\t}", "title": "" }, { "docid": "49abfbce103db08c200c62c219edabfd", "score": "0.56362545", "text": "public function send(): void {\n header(\"Location: \" . $this->location);\n }", "title": "" }, { "docid": "c631c04950680daee99a94a892d48dc5", "score": "0.562887", "text": "protected function _redirect($url) {\n\t\t\n Mage::app()->getFrontController()->getResponse()->setRedirect($url);\n Mage::app()->getResponse()->sendResponse();\n exit;\n\n\t}", "title": "" }, { "docid": "dd14655da651320ca82a39f8c49000db", "score": "0.562324", "text": "public function redirectToList()\n {\n // It should be saved to the db. Redirect back to the entity list\n return $this->redirect()->toRoute('major');\n }", "title": "" }, { "docid": "cc7bfde274957e61ae94ca23b872d72e", "score": "0.5620231", "text": "protected function ask(): RedirectResponse\n {\n return Redirect::route(getShopifyConfig('route_names.itp.ask'));\n }", "title": "" }, { "docid": "79992fe187f47e400ec71ff9fa106e3b", "score": "0.5614613", "text": "public function doRedirect( ){\n\n\t\t$this->resolveNameSpace();\n\n\t\t$page = ucfirst( $this->page ) . 'Page' ;\n\t\t$page = new $page();\n\t\t$page->process( );\n\n\t\tob_get_clean();\n\n\t\t$this->renderPage( $page );\n\t}", "title": "" }, { "docid": "8dbc394093ccf9f918c8091060a9f8d8", "score": "0.56128836", "text": "public function hookDisplayOrderConfirmation()\n {\n }", "title": "" }, { "docid": "8e901512a0a02f1458a43aa0cffde2f4", "score": "0.56072694", "text": "public function away()\n\t{\n\t\t\n\t\theader(\"Location: \" . $this->getGateWayUrl() . $this->getRequestParameters(), 302);exit();\n\t}", "title": "" }, { "docid": "051280f0bd477494c87c3230902d8451", "score": "0.5606169", "text": "public function acceptOnlineOrder()\n {\n }", "title": "" }, { "docid": "e0b6b00d574ebff70b70cc4cec3670bf", "score": "0.56045616", "text": "function index()\n\t{\n\t\t// Redirect\n\t\tredirect('reports/orders_summary');\n\t}", "title": "" }, { "docid": "933cdffc51a164d47d246d1595a97ebd", "score": "0.5602028", "text": "public function priority() {\n\t\t\tif($this->id) {\n\t\t\t\ttry {\n\t\t\t\t\t$move = $this->model->priority($this->id);\n\t\t\t\t\tif($move) {\n\t\t\t\t\t\t$this->session->add('message', 'Item moved.');\n\t\t\t\t\t}\n\t\t\t\t} catch(\\exception $e) {\n\t\t\t\t\t$this->session->add('message', $e->getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t\texit(header('Location: '.$_SERVER['HTTP_REFERER']));\n\t\t}", "title": "" }, { "docid": "5e6506c37dd7923a1fcf7c9b92bf581e", "score": "0.5602014", "text": "public function returnPart() {\n redirect('/assembly');\n }", "title": "" }, { "docid": "d6b0503fb939071f207749b9c7004e3b", "score": "0.55997705", "text": "public function getOrderPlaceRedirectUrl()\n {\n return Mage::getUrl('pagofacilchile/payment/redirect', array('_secure' => true));\n }", "title": "" }, { "docid": "5c42f668e2417c475d8faaaf73a79761", "score": "0.5592487", "text": "function add_to_cart_checkout_redirect()\n{\n wp_safe_redirect(get_permalink(get_option('woocommerce_checkout_page_id')));\n die();\n}", "title": "" } ]
d689bae5c8ee5ad1b6525dbcdb46346d
Check the float input and throw an exception if it does not match the condition.
[ { "docid": "36e6a58425899d667bd83f7ee1872e1b", "score": "0.5741642", "text": "public function validate($value) {\n if (!is_numeric($value)) {\n throw new PapayaFilterExceptionNotFloat($value);\n }\n if (!is_null($this->_min) && $value < $this->_min) {\n throw new PapayaFilterExceptionRangeMinimum($this->_min, $value);\n }\n if (!is_null($this->_max) && $value > $this->_max) {\n throw new PapayaFilterExceptionRangeMaximum($this->_max, $value);\n }\n return TRUE;\n }", "title": "" } ]
[ { "docid": "c374c3ae2cc22df6a65ec484a2f22183", "score": "0.69810206", "text": "function checkVarFloat($float) {\r\n $validation = filter_var($float, FILTER_VALIDATE_FLOAT);\r\n return $validation;\r\n}", "title": "" }, { "docid": "24a80216c3a55b8d0e578270d37f7dd5", "score": "0.6799582", "text": "static public function validateFloat($number, $msg, $property = NULL){\n\t\tif(!is_float($number))\n\t\t\tthrow new ValidateException($msg . ' Valor debe ser numerico.', $property);\n\t}", "title": "" }, { "docid": "91be6a07380f7f257f8d913933355eec", "score": "0.6765102", "text": "function validate_is_float($field_input, array &$field): bool\n{\n if (!is_float($field_input)) {\n $field['error'] = 'Įveskite float tipo skaičių !';\n\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "192987efe449cb1ec1f75a335216a47e", "score": "0.6633928", "text": "public function checkIfAccountHasFloat()\n {\n try\n {\n if( $this->getBillingType() != 'postpaid')\n {\n if ( $this->getBillingRate() >= OrganizationsFloat::where('org_id', '=', $this->getOrganizationID($this->request))->value('available_balance') )\n {\n Log::info(\"Insufficient Account Float For Request: \" . json_encode($this->request));\n\n exit(\"Insufficient Account Float\");\n }\n }\n }\n catch(Exception $exc)\n {\n Log::error($exc);\n } \n\n }", "title": "" }, { "docid": "003ea46405daf6fea8dc620605889025", "score": "0.66031927", "text": "static public function validatePositiveFloat($number, $msg, $property = NULL){\n\t\tif(!is_float($number) || $number < 1)\n\t\t\tthrow new ValidateException($msg . ' Valor no debe ser menor que cero.', $property);\n\t}", "title": "" }, { "docid": "1cb27889246e9f3778704cd0c278c7ab", "score": "0.6588192", "text": "public function validate_float($data, $param=null, $error='', $success=''){\n if (filter_var($data, FILTER_VALIDATE_FLOAT)===true) {\n $this->_success = $success;\n return true;\n }else{\n $this->_error = $error;\n return false;\n }\n }", "title": "" }, { "docid": "ad0183bddd62010ad2a25f4b15c34058", "score": "0.658648", "text": "function testFloat($key)\n\t{\n\t\tif (!$this->keyExists($key)) {\n\t\t\treturn false;\n\t\t}\n\t\tif (Inspekt::isFloat($this->_getValue($key))) {\n\t\t\treturn $this->_getValue($key);\n\t\t}\n\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "3e02759cb5a7b1865a846c718bd88d84", "score": "0.6578255", "text": "function is_float_problem()\n{\n\t$num1 = 2009010200.01;\n\t$num2 = 2009010200.02;\n\n\tif((string)$num1 === (string)$num2 || $num1 === $num2 || $num2 <= (string)$num1)\n\t\treturn 'Detected unexpected problem in handling of PHP float numbers.';\n\n\treturn null;\n}", "title": "" }, { "docid": "04fb451a88d6145939449ffee41ffb86", "score": "0.65670055", "text": "public static function validateFloat(TextBase $control)\n\t{\n\t\tforeach ($control->getValue() as $tag) {\n\t\t\tif (!Strings::match($tag, '/^-?[0-9]*[.,]?[0-9]+$/')) {\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "20b9fb3bb2e5aacf2753735ba863758f", "score": "0.6556055", "text": "public function testAssertIsFloat() {\n\t\tself::assertIsFloat( 1.2 );\n\t}", "title": "" }, { "docid": "c8c12647a670b9b8ca0118533d8de1af", "score": "0.655477", "text": "private static function isValidFloat($value) {\n return (bool) preg_match(self::REGEX_FLOAT, $value);\n }", "title": "" }, { "docid": "29e9237dcbda0c60fadfd4fab885d3c2", "score": "0.6489163", "text": "function is_float ($var) {}", "title": "" }, { "docid": "70402a58b28bcc7d3f7f60d09ad0606d", "score": "0.64708954", "text": "function isFloat(&$float){\n\t\tif(filter_var($float, FILTER_VALIDATE_FLOAT) === false) {\n \t\treturn false;\n\t\t} else {\n\t\t\t$float = (float) $float;\n\t\t return true;\n\t\t}\n\t}", "title": "" }, { "docid": "e1bfaeb5c8d8ec99286cec59806a529a", "score": "0.64650625", "text": "public function isFloat(): bool\n {\n return false;\n }", "title": "" }, { "docid": "ed4bebed414436409291e71c9e534fe0", "score": "0.6437734", "text": "public static function check_float($num)\n {\n //should be numeric and should have decimal point\n if(is_numeric($num) && strpos($num,'.'))\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "title": "" }, { "docid": "6834846fe845432d322679d37f0ae520", "score": "0.6437436", "text": "public function validateFloat($value)\n {\n if ($this->objManager->validateBlank($value)) {\n return ! $this->objManager->getRequire();\n }\n\n if (is_float($value)) {\n return true;\n }\n\n // otherwise, must be numeric, and must be same as when cast to float \n return is_numeric($value) && $value == (float) $value;\n }", "title": "" }, { "docid": "9b21658dfb268ed87d808f9adae118f9", "score": "0.6437075", "text": "public function testFilterFloat()\n {\n $dirtyVal = 'This will 4 be casted to 0';\n $expectedResult = 0;\n $filterInstance = new Filter();\n $cleanVal = $filterInstance->filterFloat($dirtyVal);\n $this->assertEquals($expectedResult, $cleanVal);\n $dirtyTrueFloat = '-5.9e-10abcder';\n $expectedTrueFloatResult = -5.9e-10;\n $cleanFalse = $filterInstance->filterFloat($dirtyTrueFloat);\n $this->assertEquals($expectedTrueFloatResult, $cleanFalse);\n $trueFloat = 132.22;\n $expectedTrueFloatResult2 = 132.22;\n $cleanFalse = $filterInstance->filterFloat($trueFloat);\n $this->assertEquals($expectedTrueFloatResult2, $cleanFalse);\n }", "title": "" }, { "docid": "a485c63ccfa2afbcca2894d9b11e1f59", "score": "0.64115554", "text": "function isFloat($var)\n{\n filter_var($var,FILTER_VALIDATE_FLOAT); \n}", "title": "" }, { "docid": "7a370599deebf5a4d908fcd54e52b3e1", "score": "0.63891333", "text": "public static function isFloat($parameter) {\r\n\r\n\t\treturn is_float($parameter) && !self::isEmpty($parameter);\r\n\t}", "title": "" }, { "docid": "47d3583926a4a91422fe2b06efc9657d", "score": "0.6366231", "text": "private function isFloat($value, $name)\r\n {\r\n $value = preg_replace('/[^A-Za-z0-9\\-.,]/', '', $value);\r\n if (is_numeric($value)) {\r\n if ($value !== 0 and $value !== '0') {\r\n if (!is_float((float)$value)) {\r\n throw new HttpException(400, \"Parameter $name is not Float!\");\r\n }\r\n } else {\r\n return (float)0;\r\n }\r\n return (float)$value;\r\n } else if ($value == '') {\r\n return NULL;\r\n } else {\r\n throw new HttpException(400, \"Parameter $name is not Numeric!\");\r\n }\r\n }", "title": "" }, { "docid": "8724d273c8fe47d0ca90769ed85de007", "score": "0.6338276", "text": "function isFloat($field, $msg)\n\t{\n\t\t$value = $this->_getValue($field);\n\t\tif(!is_float($value))\n\t\t{\n\t\t\t$this->_errorList[] = array(\"field\" => $field, \"value\" => $value, \"msg\" => $msg);\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "bb6c93426ccffdf6d261b65224ef3e0c", "score": "0.6315921", "text": "private static function isFloat($value)\n {\n return is_numeric($value);\n }", "title": "" }, { "docid": "e1d764a2f7ace4e2c7b76d36894730be", "score": "0.631449", "text": "public static function validateFloat(IControl $control): bool\n\t{\n\t\t$value = str_replace([' ', ','], ['', '.'], $control->getValue());\n\t\tif (Validators::isNumeric($value)) {\n\t\t\t$control->setValue((float) $value);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "2a2c9ee4cab49975429e0a9277dcc599", "score": "0.6274646", "text": "public function testFloatWithZero(): void\n {\n $this->assertSame(\n 0.0,\n $this->prepareAssert()->process(0.0)\n );\n }", "title": "" }, { "docid": "7400d97d8293d292f88f43499df805dc", "score": "0.6256064", "text": "public function testAssertIsNotFloat() {\n\t\t$this->assertIsNotFloat( false );\n\t}", "title": "" }, { "docid": "466e3535822b12d97717fd9ed3815ac9", "score": "0.6168909", "text": "function clean_float($float)\n{\n\t$float += 0;\n\tif (!is_float($float)) return false;\n\tif ($float < 0) return false;\n\treturn $float;\n}", "title": "" }, { "docid": "c3394520ab3d0948a833616e20048aed", "score": "0.61635387", "text": "public function checkFloat($attribute, $value)\n {\n if ( ! empty($value) && ! is_float($value)) {\n return sprintf('%s must be a float.', $attribute);\n }\n\n return true;\n }", "title": "" }, { "docid": "45d3540c9625707b7616f2072242e5b1", "score": "0.6162487", "text": "public static function ensureFloat($value)\r\n {\r\n\r\n $filtered_number = 0;\r\n if (preg_match('~^\\s*(?P<sign>-|\\+|)(?P<digit>\\d{1,3}(?:(\\D?)\\d{3})?(?:\\3\\d{3})*)(?:\\D(?P<part>\\d{1,2}))?\\s*$~', $value, $numberpart)) {\r\n $filtered_number = preg_replace('~\\D~', '', $numberpart['digit']);\r\n\r\n if (isset($numberpart['part'])) { //Nachkommastellen vorhanden?\r\n if (strlen($numberpart['part']) === 2) { //zwei Nachkommastellen\r\n $filtered_number += $numberpart['part'] / 100;\r\n } else { //eine Nachkommastelle\r\n $filtered_number += $numberpart['part'] / 10;\r\n }\r\n }\r\n\r\n if ($numberpart['sign'] === '-') { //evl. negatives Vorzeichen wieder dazu\r\n $filtered_number = -$filtered_number;\r\n }\r\n\r\n }\r\n\r\n return (float)$filtered_number;\r\n\r\n }", "title": "" }, { "docid": "7f69934e89f9457288d91181e6b30266", "score": "0.61290663", "text": "static public function validateUnsignedFloat($number, $msg, $property = NULL){\n\t\tif(!is_float($number) || $number < 0)\n\t\t\tthrow new ValidateException($msg . ' Valor no debe ser menor que cero.', $property);\n\t}", "title": "" }, { "docid": "8b9b57846872ffafbf8e9ad28b1fdfd0", "score": "0.6104353", "text": "private function isFloat($float){\n\t\tif (strlen(trim($float)) > 14) $float = substr(trim($float), 0, 14);\n\t\treturn ($float == (string)(float)$float || (is_numeric($float) && (string)(float)$float != 0));\n\t}", "title": "" }, { "docid": "26b2107f5a84a5c871f153cf4899a325", "score": "0.6040014", "text": "public function isFloat(): Validate\n {\n if (!is_float(self::$var)) {\n throw new InvalidTypeException(\n gettype(self::$var) . ' given. The variable must be a float.'\n );\n }\n\n return new Validate();\n }", "title": "" }, { "docid": "fda62bfb160dcf9729f64513e2fd845d", "score": "0.6018159", "text": "private function isFloat($number)\n {\n return !!strpos($number, '.');\n }", "title": "" }, { "docid": "146cd3410df6282a80a600bf2e339fe3", "score": "0.5955668", "text": "public function isFloat()\n {\n return is_float($this->storedValue);\n }", "title": "" }, { "docid": "2bf7eab1cadb6ed775f76948af1883eb", "score": "0.59372413", "text": "public static function ensureFloat($value)\n\t{\n\t\treturn (float)$value;\n\t}", "title": "" }, { "docid": "f47675b8c6cbadfee3f45c8aeed0ef59", "score": "0.59359497", "text": "function testFloatDataType() {\n $data = array(\n 'id' => 1,\n 'floatfield' => 10.35,\n );\n $this->insertValues($data);\n $this->selectAndCheck($data);\n }", "title": "" }, { "docid": "efe8e2a5ff0c04e3d1ea4db5dedf5339", "score": "0.5916475", "text": "public function allowFloats() {\n return $this->allowFloat;\n }", "title": "" }, { "docid": "e04c59ced990f49b799382e3d401ff87", "score": "0.5873525", "text": "public final function float(): Validation\n {\n return $this->customValidator(\n new FloatingPoint(),\n 'Value must be floating point number'\n );\n }", "title": "" }, { "docid": "e2a2075fb4f29d80b186b6c69504658d", "score": "0.58624196", "text": "public function testInvalidFloatDecimalsRange()\n {\n $this->expectExceptionMessage('Decimals are out of available range.');\n\n $numberToWords = new NumberToWords;\n $numberToWords->convertNumber(3.1415);\n }", "title": "" }, { "docid": "59de783610fd1b8f44530980ca48934e", "score": "0.5847401", "text": "function number_check($num) {\n // Sanitize or takes everything but a number out.\n $num = filter_var($num, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);\n // Validate or makes sure it is a number.\n $num = filter_var($num, FILTER_VALIDATE_FLOAT);\n return $num;\n}", "title": "" }, { "docid": "a09b9f8b5e5149034c1ef33b6eb4ecf6", "score": "0.5801538", "text": "public static function isFloat($value)\n {\n return is_float($value);\n }", "title": "" }, { "docid": "87fa5a93396d24f64bb317f5b5ff1c87", "score": "0.57289976", "text": "public static function floatValue()\n {\n return Hamcrest_Type_IsDouble::doubleValue();\n }", "title": "" }, { "docid": "c62feb2b9f50e0369c973035f524bbc5", "score": "0.57243735", "text": "public static function tryGetFloat(string $path, ?float &$value): bool\n {\n self::validateConfigurationSources();\n\n try {\n $value = self::getFloat($path);\n\n return true;\n } catch (MissingConfigurationValueException $ex) {\n $value = null;\n\n return false;\n }\n }", "title": "" }, { "docid": "e0e8e9fc62b860bec624a3f3371049f2", "score": "0.5637999", "text": "public function isFinite();", "title": "" }, { "docid": "bb8a38eac4538fdae9dd6956981eb838", "score": "0.5605511", "text": "private function assertOperand($operand)\n {\n if (!is_int($operand) && !is_float($operand)) {\n throw new Exception\\InvalidArgumentException(\n 'Operand should be an integer or a float'\n );\n }\n }", "title": "" }, { "docid": "030ec64b8e47057c2859ebdba4ae900d", "score": "0.5592656", "text": "private function check(): void\n {\n if ($this->ratingStruct->score < 0 || $this->ratingStruct->score > 40) {\n throw new InvalidArgumentException('Invalid score. It must be between 0.0 and 40.0.');\n }\n }", "title": "" }, { "docid": "bc48389614348cbddb507451cc4039de", "score": "0.5590222", "text": "public function isFloat($var): bool\n {\n $return = is_float($var);\n\n return $return;\n }", "title": "" }, { "docid": "cce6aef60e37dca848a336ce98277a75", "score": "0.5576984", "text": "final public static function is($value):bool\n {\n return is_float($value);\n }", "title": "" }, { "docid": "164f34085509ccecc39112131b496fee", "score": "0.55527925", "text": "public static function isFloat($value)\n {\n return is_numeric($value) ? floatval($value) == $value : false;\n }", "title": "" }, { "docid": "413b6e8468157e4bd540bfae0e307788", "score": "0.5535003", "text": "protected static function _isFloat($value)\r\n\t{\r\n\t\t$isFloat = false;\r\n\t\tif (is_float($value))\r\n\t\t{\r\n\t\t\t$isFloat = true;\r\n\t\t}\r\n\t\telse if (is_numeric($value))\r\n\t\t{\r\n\t\t\tif (strval(floatval($value)) == $value)\r\n\t\t\t\t$isFloat = true;\r\n\t\t\telse if ( preg_match('/^\\s*\\d*(\\.\\d*)?\\s*$/', $value)===1 )\r\n\t\t\t\t$isFloat = true;\r\n\t\t}\r\n\t\treturn $isFloat;\r\n\t}", "title": "" }, { "docid": "25ab790c0b629d83d6dfceddd5a7d3cd", "score": "0.5525179", "text": "function isNumber($input) {\n if (preg_match(\"#^[+-]?[0-9]+(\\.[0-9]+)?([eE][+-]?[0-9]*)?$#\", $input)){\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "1c2417aaa33735a9e6f8807c0dcd4d63", "score": "0.551827", "text": "public function floatValue($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "title": "" }, { "docid": "919b14a736bed288c33f6068ec24555b", "score": "0.54724365", "text": "public function testRangeFloats() {\n $values = [11, 13, 4.3, 15.5, 14];\n $result = Stats::range($values);\n $expected = 11.2;\n ok($expected, $result);\n }", "title": "" }, { "docid": "2be1a1e569694b370d7a151051627595", "score": "0.5470142", "text": "function is_finite ($val) {}", "title": "" }, { "docid": "94c6dd7439e5d65f32dc04cf2c030988", "score": "0.5469724", "text": "public function validatePrice(&$var)\n {\n $var = is_numeric($var)? floatval($var) : floatval(0);\n }", "title": "" }, { "docid": "ab8e1bbb7771138a297f8121b6e01110", "score": "0.54532135", "text": "public function __invoke($float)\n {\n return (float)$float;\n }", "title": "" }, { "docid": "53f14aef259822323e407940eece29f6", "score": "0.5442989", "text": "function checkNum($number) {\n if($number>1) {\n throw new Exception(\"Value must be 1 or below\");\n }\n return true;\n }", "title": "" }, { "docid": "a61e05687d6a135f1731aa1dfb2a973e", "score": "0.5407802", "text": "public function testInvokeThrowsExceptionIfXIsNotANumber()\n {\n $this->setExpectedException('InvalidArgumentException');\n \n (new Quadratic(1, 1, 1))('foo');\n \n return;\n }", "title": "" }, { "docid": "801bfd2c57c3ef29374d84e3bd1e3bf4", "score": "0.54033417", "text": "final protected function valueIsValid($value)\n {\n return (is_int($value) || is_float($value));\n }", "title": "" }, { "docid": "f7547c6b136fc292f50b938cb71e36d6", "score": "0.53760487", "text": "public static function isFloat(mixed $float): bool\n {\n if (!is_scalar($float)) {\n return false;\n }\n\n return (string)((float)$float) === (string)$float;\n }", "title": "" }, { "docid": "0eeb85f7c05ef0daf074159521b3817a", "score": "0.5274458", "text": "public static function isValueValid($value) : bool\n {\n if (! is_float($value)) {\n return false;\n }\n \n return $value >= -273.15;\n }", "title": "" }, { "docid": "51f5b313ed39ed06b1f78d7484d6fc5f", "score": "0.527103", "text": "private function check_value($val = null) {\n if (!empty($val)) {\n if (is_float($val) || is_numeric($val)) {\n return true; \n }\n }\n \n return false;\n }", "title": "" }, { "docid": "bdce60afeba745a45e71b459df77878d", "score": "0.5243392", "text": "public function check($value) {\n if(func_num_args() < 2) {\n throw new \\Exception('expects two values for checking');\n }\n $min = func_get_arg(1);\n $max = func_get_arg(2);\n if($value > $min && $value < $max) {\n $value = $this->format($value);\n throw new \\Exception(\"should be between '$min' and '$max' but instead saw '$value'\");\n }\n }", "title": "" }, { "docid": "d5b6249dc5897722e828855219bba4b1", "score": "0.52332276", "text": "private function _checkDiscount(&$discount)\n {\n if (!isset($discount)) {\n throw new Klarna_ArgumentNotSetException(\"Discount\");\n }\n if (is_numeric($discount)\n && (!is_int($discount) || !is_float($discount))\n ) {\n $discount = floatval($discount);\n }\n\n if (!is_numeric($discount)\n || (!is_int($discount) && !is_float($discount))\n ) {\n throw new Klarna_InvalidTypeException(\"Discount\", \"integer or float\");\n }\n }", "title": "" }, { "docid": "eecd8935f605ca64161c0df683f859c5", "score": "0.52267593", "text": "function checkNum($number)\n {\n if ($number > 1) {\n throw new Exception(\"Value must be 1 or below\");\n }\n return true;\n }", "title": "" }, { "docid": "f5158332020e313c2f7d42f508ca5ac0", "score": "0.5203293", "text": "function validate_fare($fare){\r\n\t\t$validation = False;\r\n\t\t$fare_string = strval($fare);\r\n\t\t// check to see that it's entirely numbers\r\n\t\tif( preg_match('~[0-9\\.]~', $fare_string)==1 && $fare>0 && $fare<1000){\r\n\t\t\t//echo \"Validate phone within database. <br>\";\r\n\t\t\t$validation = True;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$error = \"Error: Incorrect fare format. Must be a number greater than zero. <br>\";\r\n\t\t}\r\n\r\n\t\treturn $validation;\r\n\t}", "title": "" }, { "docid": "a05e644500c4726776c7ee3c4f5edefe", "score": "0.52011555", "text": "public static function floatOrNull($value)\n\t{\n\t\treturn is_numeric($value) ? (float) $value : null;\n\t}", "title": "" }, { "docid": "a8b11f8bb3bf5ff82938165815b115ce", "score": "0.519972", "text": "final public function float(): self\n {\n return $this->constraint($this->constraintFactory()->type(IsType::TYPE_FLOAT));\n }", "title": "" }, { "docid": "11f3a75c261e7c1a979b774f39062498", "score": "0.51839006", "text": "function fun_esfloat($num){\n\t\t$numero=true;\n\t\n\t\t$num=(string)$num;\n\t\t\n\t\tfor($i=0;$i<strlen($num) and $numero;$i++){\n\t\t\n\t\t\tif(ctype_digit($num[$i]) || $num[$i]==\".\" || $num[$i]==\"-\"){\n\t\t\t\t$numero=true;\n\t\t\t}else{\n\t\t\t\t$numero=false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $numero;\n\t}", "title": "" }, { "docid": "327566c88dfcb03ce20ca6fcce8bcb70", "score": "0.5178842", "text": "public function testInvalidInputType()\n {\n $this->expectExceptionMessage('Input type must be integer or float.');\n\n $numberToWords = new NumberToWords;\n $numberToWords->convertNumber('jedna');\n }", "title": "" }, { "docid": "0f568e6553a2564f14f3800935c18072", "score": "0.5177745", "text": "function is_whole_number($var){\n return (is_numeric($var)&&(intval($var)==floatval($var)));\n}", "title": "" }, { "docid": "a312fd92e6f373f783527b5e4d25d0aa", "score": "0.5167279", "text": "public static function isRangedFloat($parameter, $minimum = null, $maximum = null) {\r\n\r\n\t\treturn self::isFloat($parameter)\r\n\t\t\t&& (self::isFloat($minimum) ? $parameter >= $minimum : true)\r\n\t\t\t&& (self::isFloat($maximum) ? $parameter <= $maximum : true);\r\n\t}", "title": "" }, { "docid": "5f69420f94ecbcb155d9ed892e60f54d", "score": "0.51553845", "text": "public function __invoke()\n {\n\n return (float)$this->floatValue;\n\n }", "title": "" }, { "docid": "bc93c71d87c179f760245dbd9109094b", "score": "0.5136486", "text": "public function testAmountException(): void\n {\n $this->expectException(Exception::class);\n\n new PercentageFee(-10);\n }", "title": "" }, { "docid": "bbad7e3eebd01a4f24d373afb9a26e03", "score": "0.5134021", "text": "public function testPriceBoundaries() {\n $this->assertfalse($this->validator->validate($input = Lexical_SpecialPrice::$MIN_N - 0.01));\n $this->assertfalse($this->validator->validate($input = Lexical_SpecialPrice::$MAX_N + 0.01));\n }", "title": "" }, { "docid": "63bb9a9dbb8afe290b03b7bd404dac3f", "score": "0.51330894", "text": "public static function isFloat($number) {\r\n if(is_int($number)) {\r\n // It's a PHP integer.\r\n return true;\r\n }\r\n if(is_float($number)) {\r\n // NAN if conversion to string includes pound.\r\n return (bool)(is_nan($number) || false !== strpos(strval($number), '#'));\r\n }\r\n if(!is_string($number)) {\r\n // NAN - non-string.\r\n return false;\r\n }\r\n $number = trim($number);\r\n if(ctype_digit($number) && strlen($number) < 308) {\r\n // It's a string of digits.\r\n return true;\r\n }\r\n if(false !== strpos(strtolower($number), \"e\") && preg_match('/[0-9\\.]+e[\\s]*[0-9\\+\\-]+$/i', $number)) {\r\n $f = floatval($number);\r\n if(!$f) {\r\n // NAN\r\n return false;\r\n }\r\n return (false === strpos(strval($f), '#')) ? true : false;\r\n }\r\n $parser = new NumberParser($number);\r\n // Return result from the number parser class.\r\n return $parser->isValidNumber();\r\n }", "title": "" }, { "docid": "5edf20f36b530d7fe9b8aad5705eddb6", "score": "0.5115653", "text": "function royal_sanitize_number( $input ) {\n\t\t\treturn floatval( $input );\n\t\t}", "title": "" }, { "docid": "7a98e0d7092c471ee77a942cbece113c", "score": "0.51156384", "text": "public function testValueValid(): void {\n $transform = $this->getTransform('calculate_divide', [\n 'factors' => [\n [ 'source' => 'source', 'field' => 'example_source_field1' ],\n [ 'source' => 'source', 'field' => 'example_source_field2' ],\n 1.2345,\n ],\n 'precision' => 2,\n ]);\n $result = $transform->transform([\n 'example_source_field1' => 5.4321,\n 'example_source_field2' => 1.2345,\n ]);\n // Make sure it stays an array\n $this->assertEquals(bcdiv(bcdiv(5.4321, 1.2345, 2), 1.2345, 2), $result);\n }", "title": "" }, { "docid": "f3b0367e3844fe12aa26b415824c1ab6", "score": "0.5113492", "text": "function floatval ($var) {}", "title": "" }, { "docid": "dc45c64b97a343def27dee997aa87e5f", "score": "0.51105505", "text": "function positiveVibrationalFequencies($array) {\n if(!empty($array)) {\n $error = 0;\n foreach($array as $line) {\n $num = floatval(substr($line, 0, -7));\n if($num < 0) {\n $error = 1;\n }\n }\n if($error == 0) {\n return TRUE;\n } else {\n return FALSE;\n }\n } else {\n return null;\n }\n}", "title": "" }, { "docid": "04bdee0d101605c6d5574bf89a17e73b", "score": "0.5098151", "text": "public function testInvokeThrowsExceptionIfXIsNotANumber()\n {\n $this->setExpectedException('InvalidArgumentException');\n \n (new Exponential(1))('foo');\n \n return;\n }", "title": "" }, { "docid": "d821b80f84f936925eaa9c7233a71653", "score": "0.5056484", "text": "public function isNumber($value)\n {\n// return is_numeric($value);\n// if(!is_numeric($value)){\n// throw new \\Exception(\"The given value is not a number\");\n// }\n// return true;\n\n// option 2 :use gettype to check type of value;\n if(gettype($value) === 'integer' || gettype($value) === 'double'){\n return true;\n }else {\n throw new \\Exception(\"The given value is not a number\");\n }\n }", "title": "" }, { "docid": "dced312b708ca01e41bfd86153af7956", "score": "0.50550205", "text": "private function getCasesForCanBeFloat(): array\n {\n return [\n 0 => ['number' => '9987987', 'expected' => true],\n 1 => ['number' => '165465', 'expected' => true],\n 2 => ['number' => '9', 'expected' => true],\n 3 => ['number' => '1', 'expected' => true],\n 4 => ['number' => '0', 'expected' => true],\n 5 => ['number' => '0.', 'expected' => true],\n 6 => ['number' => '0,', 'expected' => false],\n 7 => ['number' => '0.0', 'expected' => true],\n 8 => ['number' => '0,0', 'expected' => false],\n 9 => ['number' => '.0', 'expected' => true],\n 10 => ['number' => ',0', 'expected' => false],\n 11 => ['number' => '0.0000', 'expected' => true],\n 12 => ['number' => '00.00', 'expected' => true],\n 13 => ['number' => '.1', 'expected' => true],\n 14 => ['number' => ',1', 'expected' => false],\n 15 => ['number' => '0.1', 'expected' => true],\n 16 => ['number' => '.01', 'expected' => true],\n 17 => ['number' => '0.01', 'expected' => true],\n 18 => ['number' => '.000000000000000009', 'expected' => true],\n 19 => ['number' => '0.000000000000000009', 'expected' => true],\n 20 => ['number' => '.000004776546546465', 'expected' => true],\n 21 => ['number' => '0.9890', 'expected' => true],\n 22 => ['number' => '0,9890', 'expected' => false],\n 23 => ['number' => '1.1', 'expected' => true],\n 24 => ['number' => '1.0554', 'expected' => true],\n 25 => ['number' => '1.05100', 'expected' => true],\n 26 => ['number' => '0001.0013800', 'expected' => true],\n 27 => ['number' => '15,567.10', 'expected' => false],\n 28 => ['number' => '15,567', 'expected' => false],\n 29 => ['number' => '15,56', 'expected' => false],\n 30 => ['number' => '415,56', 'expected' => false],\n 31 => ['number' => '0415,56', 'expected' => false],\n ];\n }", "title": "" }, { "docid": "212f91adc934fb9cd34dc1a69fa3e9b1", "score": "0.5043878", "text": "function notAValidNumber(& $incomingData)\n{\n $out_message = \"Debe colocar digitos numericos\";\n $amount1 = $incomingData['student_amount'];\n $amount2 = $incomingData['hours_amount'];\n if(!is_numeric($amount1))\n {\n $incomingData['student_amountError'] = $out_message;\n return true;\n }\n else {\n if ($incomingData['student_amount'] <= 0) {\n $incomingData['student_amountError'] = \"La cantidad de estudiantes debe ser mayor a 1\";\n return true;\n }\n elseif ($incomingData['student_amount'] >= 50) {\n $incomingData['student_amountError'] = \"La cantidad de estudiantes debe ser menor a 50\";\n return true;\n }\n }\n if(!is_numeric($amount2))\n {\n $incomingData['hours_amountError'] = $out_message;\n return true;\n }\n else {\n if ($incomingData['hours_amount'] <= 0) {\n $incomingData['hours_amountError'] = \"La cantidad de horas debe ser mayor a 1\";\n return true;\n }\n elseif ($incomingData['hours_amount'] >= 1000) {\n $incomingData['hours_amountError'] = \"La cantidad de horas debe ser menor a 1000\";\n return true;\n }\n }\n return false;\n}", "title": "" }, { "docid": "0300775d1a4c3cf9885466fd6fba23a9", "score": "0.50414926", "text": "public function test_it_truncate_float()\n {\n $intValue = $this->getMockForAbstractClass(IntValue::class, [1.9]);\n $this->assertInstanceOf(IntValue::class, $intValue);\n $this->assertIsInt($intValue->value());\n $this->assertEquals(1, $intValue->value());\n }", "title": "" }, { "docid": "2ad01d16f3c393b927fca49f69067a6e", "score": "0.5031167", "text": "function testFloatParsing() {\n\t\t$model = new Model(array('ds' => 'test_suite', 'table' => 'datatypes', 'name' => 'Datatype'));\n\t\t$result = $this->db->describe($model);\n\t\t$this->assertEqual((string)$result['float_field']['length'], '5,2');\n\t}", "title": "" }, { "docid": "adb0c4c153a3466568810532cf6522c8", "score": "0.50278777", "text": "public static function parseFloat ($x) {\n\t\t#/opt/haxe/std/php/_std/Std.hx:73: characters 3-35\n\t\t$result = floatval($x);\n\t\t#/opt/haxe/std/php/_std/Std.hx:74: lines 74-75\n\t\tif (!Boot::equal($result, 0)) {\n\t\t\t#/opt/haxe/std/php/_std/Std.hx:75: characters 4-17\n\t\t\treturn $result;\n\t\t}\n\t\t#/opt/haxe/std/php/_std/Std.hx:77: characters 3-22\n\t\t$x = ltrim($x);\n\t\t#/opt/haxe/std/php/_std/Std.hx:78: characters 3-53\n\t\t$firstCharIndex = (mb_substr($x, 0, 1) === \"-\" ? 1 : 0);\n\t\t#/opt/haxe/std/php/_std/Std.hx:79: characters 3-47\n\t\t$charCode = HxString::charCodeAt($x, $firstCharIndex);\n\t\t#/opt/haxe/std/php/_std/Std.hx:81: lines 81-83\n\t\tif ($charCode === 46) {\n\t\t\t#/opt/haxe/std/php/_std/Std.hx:82: characters 4-47\n\t\t\t$charCode = HxString::charCodeAt($x, $firstCharIndex + 1);\n\t\t}\n\t\t#/opt/haxe/std/php/_std/Std.hx:85: lines 85-89\n\t\tif (($charCode !== null) && ($charCode >= 48) && ($charCode <= 57)) {\n\t\t\t#/opt/haxe/std/php/_std/Std.hx:86: characters 4-14\n\t\t\treturn 0.0;\n\t\t} else {\n\t\t\t#/opt/haxe/std/php/_std/Std.hx:88: characters 4-20\n\t\t\treturn NAN;\n\t\t}\n\t}", "title": "" }, { "docid": "fdedf56f54f25c4f0da58b47bc07c82e", "score": "0.5026627", "text": "public function check()\n {\n if ($this->transaction->amount <= 0 && $this->transaction->fee <= 0) {\n throw new InvalidTransactionException();\n }\n if ($this->transaction->amount < 0 || $this->transaction->fee < 0) {\n throw new InvalidTransactionException();\n }\n\n if ($this->user->balance() < ($this->transaction->amount+$this->transaction->fee)) {\n throw new LowBalanceException($this->user);\n }\n }", "title": "" }, { "docid": "addce927f5b9c36befae03f15c8042c0", "score": "0.50233984", "text": "function checkNum($number){\n\tif ($number > 1) {\n\t\tthrow new Exception('Nilai Harus 1 atau dibawahnya');\n\t}\n\n\treturn true;\n}", "title": "" }, { "docid": "4d5606c718da724936d909fc17bfdcca", "score": "0.5013015", "text": "public function testConstructThrowsExceptionIfCIsNotANumber()\n {\n $this->setExpectedException('InvalidArgumentException');\n \n new Quadratic(1, 1, 'foo');\n \n return;\n }", "title": "" }, { "docid": "6f314b7312d08bc9aa2282f1a2f2e791", "score": "0.501287", "text": "private function assertCloseEnough(float $expected, float $actual) {\n $this->assertEquals(round($expected, 2), $actual);\n }", "title": "" }, { "docid": "89c03ffb1e615e5aeadab853b0bd436a", "score": "0.5012168", "text": "public function asFloat(): float\n {\n throw new UnsupportedOperationException(\\sprintf('This method \"asFloat\" is not supported on \"%s\"', static::class));\n }", "title": "" }, { "docid": "34216ec131dfd0e8a417a740fbc454a6", "score": "0.5006537", "text": "public function testConstructThrowsExceptionIfAIsNotANumber()\n {\n $this->setExpectedException('InvalidArgumentException');\n \n new Quadratic('foo', 1, 1);\n \n return;\n }", "title": "" }, { "docid": "589e39679dfaf836b7a7ff0da2323265", "score": "0.5005694", "text": "function check_real($price) {\n\t// make sure there is only one decimal point\n\t$num_dec_points = substr_count($price,\".\");\n\tif( $num_dec_points > 1 )\n\t\treturn false;\n\t\n\tif( $num_dec_points == 1 ) {\n\t\t// get the left and right part of the number\n\t\tlist($left_part,$right_part) = explode(\".\",$price);\n\t} else {\n\t\t$left_part = $price;\n\t\t$right_part = \"\";\n\t}\n\t\n\t// check the left part to make sure that it is all number\n\tif( !check_number($left_part) )\n\t\treturn false;\n\t\t\n\t// make sure that the decimal part is only 5 decimal places for proper accounting\n\tif( strlen($right_part) > 5 )\n\t\treturn false;\n\t// check the right part to make sure that it is all number\n\tif( !check_number($right_part) )\n\t\treturn false;\n\t\t\n\t// otherwise return that it is a valid price\n\treturn true;\n}", "title": "" }, { "docid": "0859358dd80771c8e53522bb45c5f19a", "score": "0.5002985", "text": "function validaValorBase($valorBase){\n\tif(empty($valorBase)){\n\t\t$_SESSION['message'] = 'O campo \"Valor base\" precisa ser preenchido';\n\t\t$_SESSION['type'] = 'danger';\n\t\treturn false;\n\t}\n\n /** Verifica se o é numerico */\n\tif(!is_float($valorBase)){\n\t\t$_SESSION['message'] = 'O campo \"Valor base\" está inválido';\n\t\t$_SESSION['type'] = 'danger';\n\t\treturn false;\n }\n \n /** Verifica se o campo tem no maximo 12 caracteres */\n\tif(mb_strlen($valorBase)> 12) {\n\t\t$_SESSION['message'] = 'O campo \"Valor base\" não pode ter mais de 12 caracteres';\n\t\t$_SESSION['type'] = 'danger';\n\t\treturn false;\n\t}\n \n return true;\n}", "title": "" }, { "docid": "b23975ac449d16c577f00067617e2fb7", "score": "0.5002757", "text": "public function floatValue(): float { return (float)$this->num; }", "title": "" }, { "docid": "b7f59f1c456357df100e55dd9ef8e2d4", "score": "0.4996437", "text": "function castToFloat($value)\n {\n if (is_string($value) && (float)'1.1' != 1.1\n && ($test = (string)1.1) != '1.1' && strlen($test) == 3) {\n return (float)str_replace('.', $test{1}, $value);\n }\n return (float)$value;\n }", "title": "" }, { "docid": "e3b609b44a7daddf58af62c2fa70962d", "score": "0.49873307", "text": "protected static function checkPositive($input)\n {\n if ($input < 0) {\n throw new \\InvalidArgumentException(\"Given value must be above 0\");\n }\n }", "title": "" }, { "docid": "e6a9277306931184145ae4bd8c756409", "score": "0.49831405", "text": "public function toFloat(): float\n {\n if (is_scalar($this->var)) {\n $sanitize = new Sanitize($this->var);\n return (float)$sanitize->data();\n }\n\n return 0.0;\n }", "title": "" }, { "docid": "1556fe67406e3e29814918fcf5e047a8", "score": "0.4981615", "text": "public function filter($value) {\n $value = (float)$value;\n try {\n $this->validate($value);\n return $value;\n } catch (PapayaFilterException $e) {\n }\n return NULL;\n }", "title": "" }, { "docid": "f71d536f9b60ff6427039f0c55fb563b", "score": "0.49779394", "text": "public function isf($x)\r\n {\r\n\treturn $this->calculator->getIsf($x, $this->df);\r\n }", "title": "" } ]
a974f01e267b08ae5bd78f882176b3a0
Get the value from a column
[ { "docid": "7634ac1f82bee29f1df4d662be3a682c", "score": "0.0", "text": "public function getColumnContent($record, $column) {\n\t\t// Build the column dispatch\n\t\tif(!$this->columnDispatch) {\n\t\t\t$this->buildColumnDispatch();\n\t\t}\n\t\t\n\t\tif(!empty($this->columnDispatch[$column])) {\n\t\t\t$handler = $this->columnDispatch[$column];\n\t\t\treturn $handler->getColumnContent($this, $record, $column);\n\t\t} else {\n\t\t\tthrow new InvalidArgumentException(\"Bad column '$column'\");\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "707ed358894d0a6efc420871b02b7bab", "score": "0.8135916", "text": "public function value($column)\n {\n if ($result = $this->select($column)->first()) {\n return $result->{$column};\n }\n }", "title": "" }, { "docid": "88fc919392fb4baf3c17e537eb43bb7e", "score": "0.80554587", "text": "public function value($column)\n {\n if ($result = $this->first([$column])) {\n return $result->{$column};\n }\n }", "title": "" }, { "docid": "6d66e2ff8b3be6fd9cec2299ae86f724", "score": "0.8031957", "text": "public function getColumnValue()\n {\n return $this->column_value;\n }", "title": "" }, { "docid": "731f09766431dfc96315f3ed56527749", "score": "0.775285", "text": "public function get_column_value()\n {\n if ( isset( $this->properties['admin-column']['callback'] ) )\n {\n $id = \"{$this->namespace}-{$this->properties['slug']}\";\n $value = call_user_func( $this->properties['admin-column']['callback'], $id, $this->get_value() );\n }\n else\n {\n $value = $this->get_value();\n }\n return $value;\n }", "title": "" }, { "docid": "3303e85bdc6d4789edbb75a1e6b4e331", "score": "0.7593855", "text": "public function getColumnValue($table, $column) {\n $query = \"SELECT * FROM $table WHERE $column = '0'\";\n return DBManager::executeQuery($query, array(), true);\n }", "title": "" }, { "docid": "260443012bc5ce24cb247bd150d0ea7f", "score": "0.7583658", "text": "protected function getColumnValue($row,$column)\r\n {\r\n if($this->columnKeyCheck($column, 'value'))\r\n {\r\n $value = $this->columns[$column]['value'];\r\n }\r\n else\r\n {\r\n $value = $row->getPropertyValue($column,false);\r\n }\r\n\r\n\r\n if($this->columnKeyCheck($column,'method') && \\method_exists($row, $this->columns[$column]['method']))\r\n {\r\n $method_name= $this->columns[$column]['method'];\r\n\r\n $value = isset($value) ? $row->{$method_name}($value) : $row->{$method_name}();\r\n }\r\n\r\n\r\n if($this->columnKeyCheck($column,'format'))\r\n {\r\n $value = $this->formatValue($this->columns[$column]['format'], $value);\r\n }\r\n\r\n return $value;\r\n\r\n }", "title": "" }, { "docid": "f4a958fb3a57e8f4ee5324f808d8fcbb", "score": "0.7404286", "text": "public function value($column)\n {\n $result = (array) $this->first([$column]);\n\n return count($result) > 0 ? reset($result) : null;\n }", "title": "" }, { "docid": "88a3f5a0659a9f2c354e578a8b02779f", "score": "0.73891246", "text": "function getColumnValue($column_name)\r\n {\r\n return isset($this->last_row[$column_name]) ? $this->last_row[$column_name] : null;\r\n }", "title": "" }, { "docid": "7b766b3f47183be4a1f05ad1a1dbc035", "score": "0.7374964", "text": "public function getValue ()\n {\n if (!isset($this->column_value))\n {\n $this->column_value = $this->jsonResponse[\"value\"][\"index\"];\n }\n\n return $this->column_value;\n }", "title": "" }, { "docid": "569c66c7169b16749cf66ecb76113311", "score": "0.72800434", "text": "public function __get($column) {\n return $this->_data[$column];\n }", "title": "" }, { "docid": "ab4722aea0bf7b7049884cca7e737e24", "score": "0.72360253", "text": "protected function getValue($column, $tableName, $column_check, $column_value) {\r\n\t\t$sqlQuery = \"SELECT $column FROM $tableName WHERE $column_check = \\\"$column_value\\\" LIMIT 1 \";\r\n\t\t$sqlQuery = $this->processArray ( $sqlQuery );\r\n\t\tif ($sqlQuery)\r\n\t\t\treturn $sqlQuery [0];\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "e9d5127a9567fa1f8a1d4937492bd1d7", "score": "0.71808195", "text": "public function getValue(\n string|TableColumnInterface $column,\n ?string $format = null\n ): mixed;", "title": "" }, { "docid": "d73cb6f80c1bd38e93857f0f35495fbe", "score": "0.71246386", "text": "public function get($col) {\n //if (!$this->csv->columnExists($col)) {\n // throw new \\InvalidArgumentException(\"Invalid/unknown column '$col'\\n\");\n //}\n\n $v = isset($this->data[$col]) ? $this->data[$col] : '';\n\n if ($f = $this->csv->getFormatter($col)) {\n return $f($v);\n }\n\n return $v;\n }", "title": "" }, { "docid": "59d94d3eb5e7a1cd4dea24c7eb21608b", "score": "0.70542", "text": "public function column(): string;", "title": "" }, { "docid": "94287aa9486f19b438215bcf4de33409", "score": "0.7049015", "text": "public function value() {\n\t\t$result = $this->stmt->fetchColumn();\n\t\tif($result === false) return null;\n\t\t$this->close();\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "ede40d90ad04eba65ab762fc16c62ed7", "score": "0.7047533", "text": "public function getValue($row, $column)\n {\n $this->loadData();\n\n return parent::getValue($row, $column);\n }", "title": "" }, { "docid": "f7be33970de909c9328565462fc2ae0d", "score": "0.7023101", "text": "public function column()\n {\n $sql = $this->buildSelectQuery();\n $this->reset();\n $column = $this->db->fetchColumn($sql, $this->ttl);\n\n if (isset($this->castFields[\"int\"])) {\n $column = array_map(fn ($c) => intval($c), $column);\n } else if (isset($this->castFields[\"float\"])) {\n $column = array_map(fn ($c) => floatval($c), $column);\n } else if (isset($this->castFields[\"bool\"])) {\n $column = array_map(fn ($c) => !!$c, $column);\n }\n\n return $column;\n }", "title": "" }, { "docid": "975cc08617b8cba56323e4e9c8cdf1cb", "score": "0.6998253", "text": "function getValue($id, $column, $type, $mysqli) {\r\n\t\r\n\t$value = 0;\r\n\r\n\t$sql = \"SELECT `$column` FROM `$type` WHERE `id` = '$id'\";\r\n\t\r\n\t$row = query_one($sql, $mysqli);\r\n\t\r\n\t$value = $row[$column];\r\n\t\r\n\treturn $value;\r\n}", "title": "" }, { "docid": "894b847b36c692e9f24c626e93f495e7", "score": "0.6935572", "text": "public function queryColumn()\n {\n return $this->queryInternal(static::FETCH_COLUMN);\n }", "title": "" }, { "docid": "d286bb9827e389a9eef941530fb58738", "score": "0.6934022", "text": "function column_value($column_name, $id) {\n\t\tif ($column_name == 'ridwpaid') echo $id;\n\t}", "title": "" }, { "docid": "e6f860430ccbb9319aa3402e20d22fc9", "score": "0.6921974", "text": "public function column(string $column): mixed\n {\n return count($result = (array)$this->first($column))\n ? reset($result)\n : null;\n }", "title": "" }, { "docid": "6a1dbb161bfdf196e04ff1e3828a2163", "score": "0.69061124", "text": "public function getCellValue($row, $column)\r\n {\r\n return isset($this->_data[$row][$column]) ? $this->_data[$row][$column] : null;\r\n }", "title": "" }, { "docid": "a61c680010f353095e596ef4513851e6", "score": "0.68657476", "text": "function getValue($cell)\n\t{\n\t \treturn ($cell != null) ? $cell->getValue() : null;\n\t}", "title": "" }, { "docid": "2e7af3bf5d43996b0605bcacb2cc184c", "score": "0.6859396", "text": "public function getColumn()\n {\n return $this->column;\n }", "title": "" }, { "docid": "2e7af3bf5d43996b0605bcacb2cc184c", "score": "0.6859396", "text": "public function getColumn()\n {\n return $this->column;\n }", "title": "" }, { "docid": "55625c4ce3b560835bd094f0f46d9e04", "score": "0.685724", "text": "public function fetchColumn($column = 0);", "title": "" }, { "docid": "a243684f771f80c7a0a9369b42dbd812", "score": "0.6852442", "text": "public function getColumn(): string;", "title": "" }, { "docid": "11f2ab22bd54b172958f36803c870f8f", "score": "0.6787738", "text": "public function getData()\n\t{\n\t\t$column = self::COL_DATA;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (string)$v;\n\t\t}\n\n\t\treturn $v;\n\t}", "title": "" }, { "docid": "11f2ab22bd54b172958f36803c870f8f", "score": "0.6787738", "text": "public function getData()\n\t{\n\t\t$column = self::COL_DATA;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (string)$v;\n\t\t}\n\n\t\treturn $v;\n\t}", "title": "" }, { "docid": "71dbe34a04e9ff078ed4c4cdc2743d4a", "score": "0.6782703", "text": "public function fetch_field() {\n return $this->_queryResult->fetchColumn ();\n }", "title": "" }, { "docid": "8cb1fec02291d46baf2f637d5501c16d", "score": "0.67687535", "text": "public function getValue($arg = null) {\n $result = $this->resulter($arg);\n return $this->hasRows($result) ? $result->fetchColumn() : false;\n }", "title": "" }, { "docid": "6399bdc976c09261deef4b94d63a30f5", "score": "0.674847", "text": "function column_return_value($value, $column_name, $id) {\n\t\tif ($column_name == 'ridwpaid') $value = $id;\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "ab380ec6a35964afea1f6fb8fd3f7467", "score": "0.67447317", "text": "public function getColumn(): string\n {\n return $this->sColumn;\n }", "title": "" }, { "docid": "280442885535058fe0b973d06732ccc5", "score": "0.6727503", "text": "public function getSQLValueByColumn($column)\n {\n if($column === 'created_at' || $column === 'updated_at'){\n $value = $this->{sprintf(\"get%s\", ucfirst($this::metadata()[\"columns\"][$column][\"property\"]))}();\n return $value?->format(\"Y-m-d H:i:s\");\n }\n $value = $this->{sprintf(\"get%s\", ucfirst($this::metadata()[\"columns\"][$column][\"property\"]))}();\n return $value;\n }", "title": "" }, { "docid": "341e76368c8456328a44d875fd260ba6", "score": "0.6725772", "text": "public function fetchColumn()\n {\n $result = mysql_fetch_assoc($this->result);\n if($result){\n return reset($result);\n }\n return false;\n }", "title": "" }, { "docid": "9984e27e3d371f35cdc91e15ce18b45d", "score": "0.6715541", "text": "public function getField($column) {\n\t\t$field = false;\n\t\tif ($this->result) $field = @mysql_fetch_field($this->result, $column);\n\t\treturn ($field !== false) ? $field : 0;\n\t}", "title": "" }, { "docid": "8180d1c12968b3770ede5ac325fe8497", "score": "0.6692908", "text": "public function fetch_single_column($tablename,$col,$where){\n $this->db->select($col);\n $data = $this->db->get_where($tablename,$where)->row()->$col;\n return $data;\n }", "title": "" }, { "docid": "707333f0cdda383818c43c6dc7c0803e", "score": "0.6689365", "text": "public function get_value_at($rowNo, $colNo )\n {\n if( !$this->column_exists($colNo) || ! $this->row_exists($rowNo))\n return null;\n \n return $this->data[$rowNo][$colNo];\n }", "title": "" }, { "docid": "ce3e115c69bc477f503a0d575ba583d7", "score": "0.668844", "text": "public function getOneBy($column, $value)\n {\n $this->ci->db->select('*');\n $this->ci->db->from($this->table);\n $this->ci->db->where(array(\n $column => $value\n ));\n $query = $this->ci->db->get();\n if ($query->num_rows() > 0) {\n $result = $query->result_array();\n return $result[0];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "4d61698d8247a3e3accf8454504c4981", "score": "0.66839415", "text": "protected function getColumnValue($columnName)\n {\n return parent::__get($columnName);\n }", "title": "" }, { "docid": "31f6b24b78abb2bcd65f72ce4b918cec", "score": "0.6605776", "text": "public function getColumnVal($dataField)\n\t{\n\t\t$value = null;\n\n\t\tif(array_key_exists($dataField, $this->values))\n\t\t{\n\t\t\t$value = $this->values[$dataField]->value;\n\t\t}\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "584ca1555e5739f1e6987b95246aebcc", "score": "0.65589625", "text": "public function get($row_key, $column_key){}", "title": "" }, { "docid": "fe202a6c9f4c3f5990167d5e4ca120af", "score": "0.6545088", "text": "public function getColumn();", "title": "" }, { "docid": "55711edca7a799354715eeb151ea2cb3", "score": "0.65279996", "text": "public function value($data, $column = null) {\r\n\t\tif (is_array($data) && !empty($data)) {\r\n\t\t\treturn array_map(\r\n\t\t\t\tarray(&$this, 'value'),\r\n\t\t\t\t$data, array_fill(0, count($data), $column)\r\n\t\t\t);\r\n\t\t} elseif (is_object($data) && isset($data->type, $data->value)) {\r\n\t\t\tif ($data->type == 'identifier') {\r\n\t\t\t\treturn $this->name($data->value);\r\n\t\t\t} elseif ($data->type == 'expression') {\r\n\t\t\t\treturn $data->value;\r\n\t\t\t}\r\n\t\t} elseif (in_array($data, array('{$__cakeID__$}', '{$__cakeForeignKey__$}'), true)) {\r\n\t\t\treturn $data;\r\n\t\t}\r\n\r\n\t\tif ($data === null || (is_array($data) && empty($data))) {\r\n\t\t\treturn 'NULL';\r\n\t\t}\r\n\r\n\t\tif (empty($column)) {\r\n\t\t\t$column = $this->introspectType($data);\r\n\t\t}\r\n\r\n\t\tswitch ($column) {\r\n\t\t\tcase 'binary':\r\n\t\t\tcase 'string':\r\n\t\t\tcase 'text':\r\n\t\t\t\treturn $data;\r\n\t\t\tcase 'boolean':\r\n\t\t\t\treturn !empty($data);\r\n\t\t\tdefault:\r\n\t\t\t\tif ($data === '') {\r\n\t\t\t\t\treturn 'NULL';\r\n\t\t\t\t}\r\n\t\t\t\tif (is_float($data)) {\r\n\t\t\t\t\treturn str_replace(',', '.', strval($data));\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn $data;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "1aa3254aba82d11ffb02bd2807efece2", "score": "0.65177166", "text": "protected function field($row, $column)\n {\n return is_object($row) && !$row instanceof \\ArrayAccess ? $row->$column : $row[$column];\n }", "title": "" }, { "docid": "b3f051c97e97586372fdde63b3ee2a42", "score": "0.65039206", "text": "function getValue($database, $ifs, $primary, $table,$column)\n{\n\t//retrieve the client_company details \n\tmysql_select_db($database, $ifs);\n\t$query_retInfo = \"\n\tSELECT \n\t\t\".$table.\".\".$column.\" AS Value\n\t\t\n\tFROM\n\t\t\".$table.\"\n\tWHERE\n\t\t\".$table.\".id=$primary \n\n\t\";\n\t$retInfo = mysql_query($query_retInfo, $ifs) or die(mysql_error());\n\t$row_retInfo = mysql_fetch_assoc($retInfo);\n\t$totalRows_retInfo = mysql_num_rows($retInfo);\n\t\n\t$value= $row_retInfo['Value'];\n\t\n\treturn $value;\t\t\n}", "title": "" }, { "docid": "7299c738f188893c46a35bfd8547a1b2", "score": "0.64917195", "text": "public function column($sql,$param = array()){\n \n $result = $this->query($sql,$param);\n \n return $result->fetchColumn();\n \n }", "title": "" }, { "docid": "797de3131f85e40a6419ecf63b9631a9", "score": "0.64898217", "text": "public function getBy($column, $value)\n {\n $this->ci->db->select('*');\n $this->ci->db->from($this->table);\n $this->ci->db->where(array(\n $column => $value\n ));\n $query = $this->ci->db->get();\n if ($query->num_rows() > 0) {\n return $query->result_array();\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "059e211c28a12d46261746433aaff725", "score": "0.6486012", "text": "public function getColumn() {\n return $this->current_column;\n }", "title": "" }, { "docid": "2018b69396fd23fbf0414e9def238f53", "score": "0.64808315", "text": "public static function get_single_column( $column, $table_type ) {\n\t\tself::set_table( $table_type );\n\t\t$data_query = \"SELECT `$column` FROM {table_name}\";\n\n\t\treturn self::$data_store->get_results( $data_query );\n\t}", "title": "" }, { "docid": "842cb5421a4e38e3a997845324f90946", "score": "0.6470212", "text": "function get_column_data($column_id, $sheet_id) {\n \n }", "title": "" }, { "docid": "1e7f6009a9d3bc88c34d46ff78438fe9", "score": "0.646531", "text": "function get_where_column($wheres,$column){\n $query=$this->db->get_where($this->table, $wheres);\n $value =$query->row();\n return (isset($value->$column))? $value->$column : \"\";\n }", "title": "" }, { "docid": "d56229a7023b2603edb02db655c5e492", "score": "0.6455469", "text": "public function fetchCellValue($_cellName)\n {\n $record = mysql_fetch_assoc($this->result);\n return $record !== false ? $record[$_cellName] : null;\n }", "title": "" }, { "docid": "8f11b8ebc88855931ca2a21bde513567", "score": "0.6444199", "text": "public function getCellValue($columnKey)\n\t{\n\t\t$ret = null;\n\t\t$td = $this->getCell($columnKey);\n\t\tif ($td instanceof HtmlElement) {\n\t\t\t$ret = $td->getInnerHtml();\n\t\t}\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "4f872c3881b3b094a73961f3c56654a5", "score": "0.64392436", "text": "function get_where_column($wheres,$column){\n $query=$this->db->get_where($this->table, $wheres);\n $value =$query->row();\n if(isset($value->$column)){\n return $value->$column;\n }else{\n return \"\";\n }\n }", "title": "" }, { "docid": "e2b04dcf1b99d35411177fd47dc835f2", "score": "0.6434264", "text": "public function __get($columnName)\r\n {\r\n return $this->_row->$columnName;\r\n }", "title": "" }, { "docid": "39bb059999b69a613237d99883e38110", "score": "0.64206433", "text": "public function getCurrentValue()\n {\n $func = $this->getValueCalculator();\n $currentDataRow = $this->getGrid()->getCurrentRow();\n if ($func !== null) {\n return call_user_func($func, $currentDataRow);\n } else {\n return mp\\getValue($currentDataRow, $this->getDataFieldName());\n }\n }", "title": "" }, { "docid": "fae8357a503bf784a9edd333de548535", "score": "0.64160967", "text": "protected function getCellValue()\n {\n $value = $this->cell->getValue();\n\n return $this->encode($value);\n }", "title": "" }, { "docid": "280b665616de78b6a25502fc9fd6f686", "score": "0.6415944", "text": "public function get($key)\n {\n if (is_null($this->data)) {\n $this->data = $this->table->getColumn($this->name)->toArray();\n }\n\n return $this->data[$key];\n }", "title": "" }, { "docid": "286865fd1529b1c382403fbc6fa8286c", "score": "0.6407403", "text": "public function selectColumn($table, $id, $column) {\n $query = \"SELECT `$column` FROM `$table` WHERE id = '$id'\";\n $r = $this->runQuery($query);\n\n if ($r) {\n $row = mysql_fetch_assoc($r);\n }\n\n return $row[$column];\n }", "title": "" }, { "docid": "a15ea82c37cfcfbc5425b059e65f2395", "score": "0.6401336", "text": "public function fetchColumn($columnIndex = 0);", "title": "" }, { "docid": "3f77f99fe7c2f3637a0b479da0971560", "score": "0.6399141", "text": "public function getData($column, $dataType = 0);", "title": "" }, { "docid": "1a329e18c4bf1e071b883e350d8e56dc", "score": "0.63849306", "text": "public function getValue($table,$column,$order_by = null,$where = null)\n {\n if($where === null)\n $where = '';\n else\n $where = ' WHERE '.$where;\n\n if($order_by === null)\n $order_by = '';\n else\n $order_by = ' ORDER BY '.$order_by;\n\n $sql = 'SELECT DISTINCT `'.$column.'` FROM `'._DB_PREFIX_.$table.'`'.$where.$order_by;\n\n //Debug\n //echo (db::getInstance())->getValue($sql);\n\n return (db::getInstance())->getValue($sql);\n }", "title": "" }, { "docid": "5c638934ef16ae456d571e4d6ddd7735", "score": "0.6384728", "text": "public static function colValue(&$row, $colName, $startIndex = 0)\n {\n return $row[self::columnAlphabetToNumber($colName, $startIndex)];\n }", "title": "" }, { "docid": "87cd55a6914beca149d196efc059bb1c", "score": "0.638368", "text": "function __get ( $col ) {\n $original = $col;\n if (! isset( $this->$col ) && $this->_colprefix )\n $col = $this->_colprefix . $col;\n if ( isset( $this->$col ) ) return $this->$col;\n $col = $original . '_id';\n if ( $this->has_column( $col ) ) {\n $id = (int) $this->$col;\n $obj = $this->pado()->model( $original )->load( $id );\n return is_object( $obj ) && $obj->id ? $obj : null;\n }\n }", "title": "" }, { "docid": "613adfa77598a60c3467dfafdd28fb95", "score": "0.63804966", "text": "function get_col($query = null , $x = 0) {\n if ( $query )\n $this->query($query);\n\n $new_array = array();\n // Extract the column values\n for ( $i=0; $i < count($this->last_result); $i++ ) {\n $new_array[$i] = $this->get_var(null, $x, $i);\n }\n return $new_array;\n }", "title": "" }, { "docid": "a9c672f6c59d0f9ea89b0032478b34b7", "score": "0.63679475", "text": "public function fetchColumn(int $columnIndex = 0);", "title": "" }, { "docid": "949daeb516bae63e897781aef2dd33f2", "score": "0.63653797", "text": "public function getValue()\n {\n if (isset($this->values)) {\n return $this->values;\n }\n\n $class = $this->class;\n $this->values = $class::findAll([\n $this->column => $this->owner->definition->getTable()->getIdentifier()->getValue()\n ]);\n\n return $this->values;\n }", "title": "" }, { "docid": "7091a1f14376bcb7fd4707de2182fe7e", "score": "0.634518", "text": "public function getCol($dataField)\n\t{\n\t\tif(array_key_exists($dataField, $this->values))\n\t\t{\n\t\t\t$col = $this->values[$dataField];\n\t\t}\n\t\treturn $col;\n\t}", "title": "" }, { "docid": "971701438f19e95d06450b191d46aca1", "score": "0.6343056", "text": "public function get_table_value($table = '', $column_name = '', $primary_key = '', $pk_id = 0, $is_unsafe = true)\n\t{\n\t\t/**\n\t\t * When considering unsafe entries, make them integers by adding zero.\n\t\t * For safe columns, pass it as <false> to keep as it is. Especially, working with unique keys and varchar type columns.\n\t\t */\n\t\tif($is_unsafe == true)\n\t\t{\n\t\t\t$pk_id += 0;\n\t\t}\n\n\t\t$sql = \"\n\t\t\t\tSELECT\n\t\t\t\t\t{$column_name} v\n\t\t\t\tFROM {$table} t\n\t\t\t\tWHERE\n\t\t\t\t\tt.{$primary_key}='{$pk_id}' -- Quoted? Case Based.\n\t\t\t\t;\";\n\t\t$value = $this->row($sql);\n\t\tif(!isset($value['v']))\n\t\t{\n\t\t\t$value = array(\n\t\t\t\t'v' => null\n\t\t\t);\n\t\t}\n\n\t\treturn $value['v'];\n\t}", "title": "" }, { "docid": "1ca724cdf0267b033950a5b455087a09", "score": "0.6337368", "text": "public function getReferencedColumn();", "title": "" }, { "docid": "beca2e7bae9c3ecb58c5990a248613a2", "score": "0.6334377", "text": "function fetch_column($sql, $parameters = array()) {\n\n\t\tglobal $dbh;\n\t\t\n\t\t$sth = $dbh->prepare($sql);\n\t\t$sth->execute($parameters);\n\n\t\treturn $sth->fetchColumn();\n\n\t}", "title": "" }, { "docid": "5a6fc1a085b079ab88af9c3bf9ea43bd", "score": "0.6331844", "text": "public function value(){\n\t\t$sql = $this->overloaded_get_sql(1,func_get_args());\n\t\t#function implies only 1 retured row\n\t\t$sql = self::applyLimitOne($sql);\n\n\t\treturn $this->as_value($this->query($sql));\n\t}", "title": "" }, { "docid": "e077e1e8a59a91c74c7289f8cc2ef937", "score": "0.6321658", "text": "static public function get_field( $col, $id, $identifier = \"id\" ) \r\n\t\t{ \r\n\t\t\treturn Database::fetch_cell( self::TABLE, self::PREFIX . $col, self::PREFIX . $identifier . \" = '\" . $id . \"'\" ); \r\n\t\t}", "title": "" }, { "docid": "c590a7647ba419f22f53bde37101116d", "score": "0.6313355", "text": "final public function fetchColumn($column = 0)\n\t{\n\t\treturn $this->stmt->fetchColumn($column);\n\t}", "title": "" }, { "docid": "d11d2f990f7fb9ab61827f35b0a7d253", "score": "0.63116604", "text": "public function getRef()\n\t{\n\t\t$column = self::COL_REF;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (string)$v;\n\t\t}\n\n\t\treturn $v;\n\t}", "title": "" }, { "docid": "b94de75b121b43f6becef5f9ef3841a3", "score": "0.63072944", "text": "function get_column_value($columname, $fldvalue, $fieldname, $uitype, $datatype = '') {\n\t\tif ($columname == 'salesorderid') {\n\t\t\tif ($fldvalue == '') return null;\n\t\t}\n\t\treturn parent::get_column_value($columname, $fldvalue, $fieldname, $uitype, $datatype);\n\t}", "title": "" }, { "docid": "9561fd5e1dae32d57dbf011435a14057", "score": "0.63046646", "text": "public function getValue()\n {\n return $this->_hasChanged? $this->_value: $this->getDbValue();\n }", "title": "" }, { "docid": "a82cb6d69d709b2f80e53cdf6c965f00", "score": "0.6300556", "text": "public static function get_valor_query($sql, $columna) {\n\n if (!self::es_string($sql, $columna))\n exit();\n\n $db = DataBase::getInstancia();\n $mysqli = $db->getConnection();\n\n $resultado = $mysqli->query($sql);\n\n // Si hay un error en el SQL, este es el error de MySQL\n if (!$resultado) {\n return \"class.Database.class: error \" . $mysqli->error;\n }\n\n $Valor = NULL;\n //Trae el primer valor del arreglo\n if ($row = $resultado->fetch_assoc()) {\n // $Valor = array_values($row)[0];\n $Valor = $row[$columna];\n }\n\n return $Valor;\n }", "title": "" }, { "docid": "b98fc107e5359f8a380d654d26433486", "score": "0.6295071", "text": "public function fetchBy($column, $value)\n {\n \t$select = $this->select();\n \t$select->where($column . ' = ?', $value);\n \t$row = $this->fetchRow($select);\n \treturn $row;\n }", "title": "" }, { "docid": "84a6994228daf0e5016d4b0d58c820b6", "score": "0.6284648", "text": "function get_col( $query = null , $x = 0 ) {\n\t\tif ( $query )\n\t\t\t$this->query( $query );\n\n\t\t$new_array = array();\n\t\t// Extract the column values\n\t\tfor ( $i = 0, $j = count( $this->last_result ); $i < $j; $i++ ) {\n\t\t\t$new_array[$i] = $this->get_var( null, $x, $i );\n\t\t}\n\t\treturn $new_array;\n\t}", "title": "" }, { "docid": "bf6e30030e56f254dba3c5eaef494f8d", "score": "0.6273387", "text": "function get_col($query=null,$x=0)\n\t{\n\t\t// If there is a query then perform it if not then use cached results..\n\t\tif ( $query )\n\t\t{\n\t\t\t$this->query($query);\n\t\t}\n\n\t\t// Extract the column values\n\t\tfor ( $i=0; $i < count($this->last_result); $i++ )\n\t\t{\n\t\t\t$new_array[$i] = $this->get_var(null,$x,$i);\n\t\t}\n\n\t\treturn $new_array;\n\t}", "title": "" }, { "docid": "082505a87a5222ee807dd5742dfa74e7", "score": "0.62723064", "text": "public function originalValue ($column)\n {\n return $this->getOriginal($column);\n }", "title": "" }, { "docid": "8b178a217653f760b183c11011e3a0c7", "score": "0.62532717", "text": "function fetch_col() {\n list($return) = mysqli_fetch_row($this->sh);\n return $return;\n }", "title": "" }, { "docid": "6f11ebc4dd27154aedfb639b34391cd6", "score": "0.6245022", "text": "public function fetch_value() {\n if ($this->adapter && $row = $this->adapter->fetch()) {\n $this->close();\n return current($row);\n } else\n return null;\n }", "title": "" }, { "docid": "d82555bcd79b508f4fa3aebc786d2bdd", "score": "0.62314975", "text": "public static function getByColumn($column, $value)\n {\n\n if (empty($value)) {\n return [];\n }\n\n $queryString =\n 'SELECT * from `users` ' .\n 'WHERE `' . $column . '` = :' . $column . ' ' .\n 'LIMIT 1';\n $paramsArray = array(\n $column => $value,\n );\n\n // query\n $dbh = new \\Components\\Db();\n $result = $dbh->getResult($queryString, $paramsArray);\n \n return (empty($result) ? [] : $result[0]);\n\n }", "title": "" }, { "docid": "bb23aa5b9bec9ec0d589243ca2d2d568", "score": "0.62246215", "text": "public function getColumnName(): string {\n return $this->data->get('column');\n }", "title": "" }, { "docid": "efa111f00761d070e60f323eaaa2e11d", "score": "0.62233806", "text": "function get_col($query = null , $x = 0) {\n $new_array = array();\n if ( $query )\n $this->query($query);\n\n // Extract the column values\n for ( $i=0; $i < count($this->last_result); $i++ ) {\n $new_array[$i] = $this->get_var(null, $x, $i);\n }\n return $new_array;\n }", "title": "" }, { "docid": "99e2cc09d41ddd0f69656de00b510c86", "score": "0.6221553", "text": "function getvalfield($table,$field,$where)\n{\n\t$sql = \"select $field from $table where $where\";\n\t//echo $sql;die;\n\t$getvalue = mysql_query($sql);\n\t$getval = mysql_fetch_row($getvalue);\n\n\treturn $getval[0];\n}", "title": "" }, { "docid": "219a1e86ae800310b849b180b58982d8", "score": "0.6221323", "text": "public function fetchColumn ($column_number = null) {}", "title": "" }, { "docid": "30d9bb5a24825c09db76a52d372395bd", "score": "0.62164575", "text": "function get_col( $query = null , $x = 0 )\n\t{\n\t\tif( $query )\n\t\t\t$this->query( $query );\n\n\t\t$new_array = array();\n\t\t// Extract the column values\n\t\tfor ( $i = 0, $j = count( $this->last_result ); $i < $j; $i++ )\n\t\t{\n\t\t\t$new_array[$i] = $this->get_var( null, $x, $i );\n\t\t}\n\t\treturn $new_array;\n\t}", "title": "" }, { "docid": "fbd3d29a8a0879a941281891ee20d3db", "score": "0.61981183", "text": "public function getColumnValue($columnName)\n {\n if (!isset($this->rawColumnMap[$columnName]))\n {\n throw new gosException_InvalidArgument('Column is not set in column/value mapping: \"'. $this->tableName . $this->getRowLabel() .'.'. $columnName .'\".', get_defined_vars());\n }\n return $this->rawColumnMap[$columnName];\n }", "title": "" }, { "docid": "5e6224cd7892566c0a5a6bc8bcc5bebb", "score": "0.61979014", "text": "public function fetchValue($field = 0);", "title": "" }, { "docid": "d41bf1508ee3569e30c28061b382ead7", "score": "0.6195196", "text": "public function column($sql){\n\t\t$sql = $this->overloaded_get_sql(1,func_get_args());\n\t\treturn $this->as_column($this->query($sql));\n\t}", "title": "" }, { "docid": "06e28c882b2a24cb84f0724dd5536899", "score": "0.6186829", "text": "public function getColumn($get)\n\t{\n\t\tif (isset($this->__extraColumns[$get]))\n\t\t\treturn $this->__extraColumns[$get];\n\t\tif (!in_array($get, $this->__columns))\n\t\t\tthrow new InternalException(\"row '\". $get .\"' doesn't exist\");\n\t\treturn $this->$get;\n\t}", "title": "" }, { "docid": "3352bc7cdb713022e3de1e37883a4a34", "score": "0.6180437", "text": "static function selectOneValue($sql){\n $Data=EasyQuery($sql);\n \n $Value=$Data[0];\n \n foreach($Value as $key => $value)\n return $value;\n }", "title": "" }, { "docid": "60e76b43a847e384d5ea3c5812f3fd2d", "score": "0.61626023", "text": "public function get_info ($table, $column, $value)\n {\n // Kalau bukan int diselipkan tanda kutip sebelum mnjalankan kuery\n if(!is_int($value))\n {\n $value = \"'\". $value .\"'\";\n // die($value);\n $query = \"SELECT * FROM $table WHERE $column = $value\";\n $result = $this->mysqli->query($query);\n\n while($row = $result->fetch_assoc())\n {\n return $row;\n }\n }\n }", "title": "" }, { "docid": "2a8d4ee89bfa189881f9f4c5f0d7b304", "score": "0.6160514", "text": "public function getCell($query)\n\t{\n\t\treturn $this -> query($query) -> fetchColumn();\n\t}", "title": "" }, { "docid": "1012b5a4ed1995c571543ec320febd55", "score": "0.61445844", "text": "function dataContentValueOfColumn($id, $Column)\n{\n if (App\\contentschools::where('school', '=', $id)->count() !== 0) {\n // return 1;\n $data = contentschools::where('school', $id)->first();\n return $data->$Column;\n } else {\n }\n}", "title": "" }, { "docid": "4016ea75c08877ea9ae4a67bb9ba2a5c", "score": "0.6125383", "text": "public function getSingleColumnResult()\n {\n return $this->execute(null, self::HYDRATE_SCALAR_COLUMN);\n }", "title": "" }, { "docid": "9ae220e49a9ebca7ff8de634c160d8af", "score": "0.6122886", "text": "public function getValue(DBItem $item){\n\t\treturn $item->getRealValue($this);\n\t}", "title": "" } ]
eb25b181bce9db5ccdbc812fea3fe072
get max id from the databse
[ { "docid": "16537f58b454b63d9387c6d950c10d6a", "score": "0.7614219", "text": "public function getMaxID(){\n\t\t try{\n\t\t\t$conn = DBConnection::GetConnection();\t\n\t\t\t$queryForGetMaxId=\"SELECT MAX(member_id) AS max_value FROM one_direction_member\";\n\t\t\t$max_result=$conn->prepare($queryForGetMaxId);\n\t\t\t$max_result->execute();\n\t\t\t$maxId = $max_result->fetch(PDO::FETCH_ASSOC); \n\t\t\t$pId=$maxId['max_value']; \n\t\t\t$incrementPid=$pId+1;\n\t\t\treturn $incrementPid;\n\t\t}catch(PDOException $e){\n\t\t\techo 'Fail to connect';\n\t\t\techo $e->getMessage();\n\t\t}\t\n }", "title": "" } ]
[ { "docid": "ae0ebbdf1a84abfcfeb78405826035ba", "score": "0.8867266", "text": "public static function maxid(){\n\t\t\t$sql = \"SELECT id FROM \".self::$tablename.\" ORDER BY id DESC LIMIT 1\";\n\t\t\t$query = Executor::doit($sql);\n\t\t\treturn Model::one($query[0],new SueloData());\n\t\t}", "title": "" }, { "docid": "1bbb597e790e3259461726ba126a821a", "score": "0.86014056", "text": "public function getMaxId() {\n try{ \n $query = $this->con->prepare(\"SELECT max(id) FROM notes;\");\n $query->execute();\n return $query->fetch()[0];\n } catch (PDOException $e) {\n echo $e->getMessage();\n }\n }", "title": "" }, { "docid": "01804a878d3315fb7c5ad1f8ade1fcf3", "score": "0.85720044", "text": "private function getLastId(){\n\t\t\t$sql = \"SELECT max(id) as max FROM produto\";\n\t\t\t$result = self::$conn->query($sql); //executa o select e retorna os dados em $result\n\t\t\t$data = $result->fetch(PDO::FETCH_OBJ);\n\t\t\treturn $data->max;\n\t\t}", "title": "" }, { "docid": "29d4d66841d992064ed2616719ab80f7", "score": "0.8379712", "text": "public function getLastId(){\n $this->curQuery = \"SELECT MAX(id) AS max FROM $this->curTable\";\n return $this->executeQuery(false, true);\n }", "title": "" }, { "docid": "3521f0f2475c198ed312982fbb7e193e", "score": "0.8370671", "text": "public static function getMaxId(){\n\t \t$maxid= AssignmentRepository::orderBy('ID', 'DESC')->first();\n\t\t\tif(!isset($maxid)){\n\t\t\t\treturn \"0\";\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\t$maxid= AssignmentRepository::orderBy('ID', 'DESC')->first();\n\t\t\t\t\treturn $maxid->ID;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "41514ecc32a153a4adaf9a62b6f6b33f", "score": "0.8359311", "text": "function getMaxId($db)\n {\n\t $info['table'] = \"orders\";\n\t $info['fields'] = array(\"max(id) as maxid\"); \t \n\t $info['where'] = \"1=1\";\n\t \n\t $resmax = $db->select($info);\n\t if(count($resmax)>0)\n\t {\n\t\t $max = $resmax[0]['maxid']+1;\n\t }\n\t else\n\t {\n\t\t$max=0;\n\t }\t \n\t return $max;\n }", "title": "" }, { "docid": "1fc66ed63afe1df9e5011070e036792f", "score": "0.83082765", "text": "function get_max_id( $table ){\n return DB::connection( $this->get_db())->table($table)->max('id');\n }", "title": "" }, { "docid": "4c9899aee1776bbdb8311d1abaa33120", "score": "0.8294559", "text": "function maxId()\n {\n $sql = \"SELECT max(PDU_ID) as id FROM mco_productos \";\n $this->consult = $this->connection->Execute($sql);\n $max=$this->consult->fields;\n return $max['id']+1;\n\n }", "title": "" }, { "docid": "3eddcc78f185ad50ac1dfa8657e6c377", "score": "0.8272376", "text": "function getMaxId($db)\n{\n $info['table'] = \"head\";\n $info['fields'] = array(\n \"max(id) as maxid\"\n );\n $info['where'] = \"1=1\";\n\n $resmax = $db->select($info);\n if (count($resmax) > 0) {\n $max = $resmax[0]['maxid'] + 1;\n } else {\n $max = 0;\n }\n return $max;\n}", "title": "" }, { "docid": "bb7045240bac232a118d86fc01029cdc", "score": "0.8271021", "text": "public static function find_max_id() {\n $max_id = static::find_by_sql(\"SELECT MAX(id) AS id FROM \" . static::$table_name);\n $id = $max_id[0]->id + 1;\n return $id;\n }", "title": "" }, { "docid": "307e186b33604e1b646f0c2a502263cc", "score": "0.82629657", "text": "public static function getMaxId(){\n\t \t$maxid= AbsentLetterRepository::orderBy('ID', 'DESC')->first();\n\t\t\tif(!isset($maxid)){\n\t\t\t\treturn \"0\";\n\t\t\t}\n\t\t\telse{\n\t\t\t\t\t$maxid= AbsentLetterRepository::orderBy('ID', 'DESC')->first();\n\t\t\t\t\treturn $maxid->ID;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "a04ac5d2e5c5f84a04bfb84f1ef96872", "score": "0.8250411", "text": "public function getMaxId()\n {\n return $this->db->getMaxColumn(\"pelanggan\", \"id_pelanggan\");\n }", "title": "" }, { "docid": "87f823ec01d906fa491c23d1308e0893", "score": "0.8227422", "text": "function getMaxId($db)\n {\n\t $info['table'] = \"projectinfo\";\n\t $info['fields'] = array(\"max(id) as maxid\"); \t \n\t $info['where'] = \"1=1\";\n\t \n\t $resmax = $db->select($info);\n\t if(count($resmax)>0)\n\t {\n\t\t $max = $resmax[0]['maxid']+1;\n\t }\n\t else\n\t {\n\t\t$max=0;\n\t }\t \n\t return $max;\n }", "title": "" }, { "docid": "d86dcdf44b16ac4620bb38510c9e8347", "score": "0.8210772", "text": "public static function getMaxId(){\n\t\t\t$maxid= ContactRepository::orderBy('ID', 'DESC')->first();\n\t\t\tif(!isset($maxid)){\n\t\t\t\treturn \"0\";\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn $maxid->ID;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "cf273126cd9bba1417ac15da6dface4d", "score": "0.8193573", "text": "function getMaxId($db)\n {\n\t $info['table'] = \"registration\";\n\t $info['fields'] = array(\"max(id) as maxid\"); \t \n\t $info['where'] = \"1=1\";\n\t \n\t $resmax = $db->select($info);\n\t if(count($resmax)>0)\n\t {\n\t\t $max = $resmax[0]['maxid']+1;\n\t }\n\t else\n\t {\n\t\t$max=0;\n\t }\t \n\t return $max;\n }", "title": "" }, { "docid": "db3002a330fd9023000d5ef32c5536d0", "score": "0.81526005", "text": "public static function maxID(){\n $sql = \"select MAX(idTraitement) from traitement\";\n $res = DBConnex::getInstance()->query($sql);\n $resultat = $res->fetch();\n return $resultat[0];\n }", "title": "" }, { "docid": "a2a4719879334187b0d98d7cc6e7e0d7", "score": "0.80368805", "text": "public function get_last_id()\n {\n //now just try to get the last\n $row = $this->db->order_by('id','desc')->get($this->_table)->row();\n return ($row)? $row->id : 0 ;\n\n }", "title": "" }, { "docid": "6f2be90edecc3d5eb3faa78b618ab032", "score": "0.8036524", "text": "public function get_last_id(){\n\t$sql = $this->db->query(\"SELECT MAX(id)+1 AS id FROM lit_tab_jabatan\")->row_array();\n\t$idnya = $sql['id'];\n\treturn $idnya;\n\t}", "title": "" }, { "docid": "412621e2ddc047ab157d24895bcb22cc", "score": "0.802128", "text": "public function get_idmax(){\n $this->db->select_max('id_buku');\n $this->db->from('buku');\n $query = $this->db->get()->row_array();\n return $query['id_buku']; \n }", "title": "" }, { "docid": "6de08d6f2d93dac1a48cfb75ff0822a7", "score": "0.796815", "text": "public function getIdMax() {\n $maxId = myPDO()->query('SELECT MAX(song_id) FROM songs');\n return $maxId->fetch()[0];\n }", "title": "" }, { "docid": "526627a8fcbc271446d3956186087af4", "score": "0.79373664", "text": "public function maxId($db) {\n\n $data = $this ->select()\n ->from($db, array(new Zend_Db_Expr('max(id) as maxId')))\n ;\n\n return $data->query()->fetch();\n\n }", "title": "" }, { "docid": "2a6c66d5f243eb893c5d18ca7ff6555a", "score": "0.7913747", "text": "public function get_max_id(){\n $this->db->select('max(i.id) as max_item_id');\n $this->db->from('items i');\n $result = $this->db->get()->result();\n $max_item_id = $result[0]->max_item_id;\n\n $this->db->select('max(i.id) as max_a_item_id');\n $this->db->from('assembled_items i');\n $result = $this->db->get()->result();\n $max_a_item_id = $result[0]->max_a_item_id;\n\n //return whichever is larger\n if($max_item_id > $max_a_item_id){\n return $max_item_id;\n } else {\n return $max_a_item_id;\n }\n }", "title": "" }, { "docid": "2a6c66d5f243eb893c5d18ca7ff6555a", "score": "0.7913747", "text": "public function get_max_id(){\n $this->db->select('max(i.id) as max_item_id');\n $this->db->from('items i');\n $result = $this->db->get()->result();\n $max_item_id = $result[0]->max_item_id;\n\n $this->db->select('max(i.id) as max_a_item_id');\n $this->db->from('assembled_items i');\n $result = $this->db->get()->result();\n $max_a_item_id = $result[0]->max_a_item_id;\n\n //return whichever is larger\n if($max_item_id > $max_a_item_id){\n return $max_item_id;\n } else {\n return $max_a_item_id;\n }\n }", "title": "" }, { "docid": "8c7f2aad0354736a73d9250f2c95a683", "score": "0.79111046", "text": "private function prismGetLatestId() {\n\t\treturn $this->prismDatabase->get_field(\"SELECT `id` FROM `prism_data` ORDER BY `id` DESC LIMIT 1\");\n\t}", "title": "" }, { "docid": "8de00583a9e0e00ef30a0ac464786b82", "score": "0.78957963", "text": "function maximoAutoId1() {\n\t\t\tglobal $res;\n\t\t\t$cnx = conectar_postgres();\n\t\t\t$cons = \"SELECT MAX(AutoId) AS maximoautoid FROM ContratacionSalud.PlanesTarifas \";\n\t\t\t$res = pg_query($cnx, $cons);\n\t\t\t$fila = pg_fetch_array($res);\n\t\t\t$res = $fila[\"maximoautoid\"];\n\t\t\treturn $res; \n\t\t\n\t\t}", "title": "" }, { "docid": "fdcc6de0b0bd4581389d0d0c5d738321", "score": "0.78721935", "text": "public function maxId($id){\n return $this->find()->where(['app_idApp'=>$id])->max('id');\n }", "title": "" }, { "docid": "ab1ea070b04ffc6e5da6539befd2966a", "score": "0.787016", "text": "public function getMaxExternalId()\n {\n return $this->model->select(DB::raw(' MAX(CONVERT(externalId, SIGNED INTEGER)) as externalId'))->get('externalId');\n }", "title": "" }, { "docid": "077b8a4c27df96f9df600bbf0a981605", "score": "0.7822701", "text": "function getMaxId($db)\n {\t \n $sql = \"SHOW TABLE STATUS LIKE 'loans_request'\";\n\t$result = $db->execQuery($sql);\n\t$row = $db->resultArray();\n\treturn $row[0]['Auto_increment'];\t \n }", "title": "" }, { "docid": "3ba97aad7c970b40b6877c1e07a43092", "score": "0.78038967", "text": "static function getLastID()\r\n {\r\n $tableProofTalks = DatabaseManager::getNameTable('TABLE_PROFF_TALKS');\r\n\r\n $query = \"SELECT MAX(id) AS Max FROM $tableProofTalks\";\r\n\r\n return DatabaseManager::singleFetchAsoc($query)[\"Max\"];\r\n }", "title": "" }, { "docid": "1fdd2da83e80fee2851bbd0f909cafb7", "score": "0.7803132", "text": "function getMaxId($db)\n {\t \n $sql = \"SHOW TABLE STATUS LIKE 'equipment'\";\n\t$result = $db->execQuery($sql);\n\t$row = $db->resultArray();\n\treturn $row[0]['Auto_increment'];\t \n }", "title": "" }, { "docid": "a98f3183fc2297b818b8815581b6f9f4", "score": "0.7776158", "text": "function _getLastID()\n \t{\n \t\t$this->db->select('SUBSTRING(max(id),3,4) as id', FALSE)->from('breeder');\n \t\t$query = $this->db->get();\n \t\treturn $query->row();\n \t}", "title": "" }, { "docid": "aa1fa5402b3e85e8fd20de134c30faa7", "score": "0.777475", "text": "function getMaxId($db)\n {\t \n $sql = \"SHOW TABLE STATUS LIKE 'plan'\";\n\t$result = $db->execQuery($sql);\n\t$row = $db->resultArray();\n\treturn $row[0]['Auto_increment'];\t \n }", "title": "" }, { "docid": "ae093448085c2c3ad65a632bf00124f2", "score": "0.7747688", "text": "function getMaxId($db)\n {\t \n $sql = \"SHOW TABLE STATUS LIKE 'company'\";\n\t$result = $db->execQuery($sql);\n\t$row = $db->resultArray();\n\treturn $row[0]['Auto_increment'];\t \n }", "title": "" }, { "docid": "cee97229a13771339dfe9a1634f9991c", "score": "0.77331173", "text": "protected function _getLastId()\n\t{\n\t\t$query = 'SELECT MAX(id)'\n\t\t\t. ' FROM #__' . $this->records_dbtbl;\n\t\t$this->_db->setQuery($query);\n\t\t$lastid = $this->_db->loadResult();\n\n\t\treturn (int) $lastid;\n\t}", "title": "" }, { "docid": "0feb34685332c49288a1505901407514", "score": "0.77293706", "text": "public function fetchLastId();", "title": "" }, { "docid": "29506a0999805fc87b9341c56944b85d", "score": "0.7727656", "text": "public function last_id(){\n $this->db->query(\"SELECT max(id_answer) AS id FROM tbl_answers\");\n\n // devolvemos los registros\n return $this->db->register();\n }", "title": "" }, { "docid": "1c5a52d17f092cfe03db46a399ad3168", "score": "0.7723385", "text": "public function getMaxId() : ?int\n {\n $sql = \"SELECT MAX(id) from $this->TABLE_NAME;\";\n $statement = $this->dbHandler->prepare($sql);\n $statement->execute();\n // cursed\n return (int) $statement->fetchAll()[0][0] ?? null;\n }", "title": "" }, { "docid": "8cc2989938c9678b1a142df88bd389ab", "score": "0.7721821", "text": "function getMaxId($db)\n {\t \n $sql = \"SHOW TABLE STATUS LIKE 'products'\";\n\t$result = $db->execQuery($sql);\n\t$row = $db->resultArray();\n\treturn $row[0]['Auto_increment'];\t \n }", "title": "" }, { "docid": "c942d4ef3a9835322263887db44cc893", "score": "0.7711468", "text": "public function fetchLastId()\r\n {\r\n return $this->fetchId('DESC');\r\n }", "title": "" }, { "docid": "0ce1f454db9776fb5bc66c637a5464e1", "score": "0.77066237", "text": "public function getMaxId($tbl,$id){\n$q=$this->db->query(\"select max($id) as id from $tbl\");\n$r=$q->result_array();\nreturn ($r[0]['id']==NULL)?\"0\":$r[0]['id'];\n}", "title": "" }, { "docid": "9e9014a72d16151016fde1bd8fdcb6b7", "score": "0.77038807", "text": "function selectMaxID(){\n $query = $this->db->query(\"SELECT MAX(ID_PND) AS ID_PND FROM pendaftaran\");\n $hasil = $query->row();\n return $hasil->ID_PND; \n }", "title": "" }, { "docid": "c837cc406e43397d86e348228eb1be70", "score": "0.7703397", "text": "public function getLastId()\n {\n $new_id = array(200);\n $query = \"SELECT MAX(id) FROM comments\";\n if($result = $this->connection->query($query)) {\n $new_id = $result->fetch(\\PDO::FETCH_NUM);\n }\n return $new_id[0];\n }", "title": "" }, { "docid": "6dae4fd15a7ea10e79c1de80fc98ed1c", "score": "0.7697291", "text": "function maxSampleId()\n {\n $out = DB::select(\"select COALESCE(max(id), 0) + 1 as max_id from sample_master\");\n $result = json_decode(json_encode($out), true);\n foreach ($result as $key => $value) \n {\n return $value['max_id'];\n }\n }", "title": "" }, { "docid": "29598eb49ccd2a258bfe3ad65b6394f5", "score": "0.76796097", "text": "function get_id_detail_sk_pmk(){\n\t$sql = \"SELECT MAX(id_detail) as 'max' FROM tbl_sk_pmk_detail\";\n\t$query = mysql_query($sql) or die(mysql_error());\n\t$fetch = mysql_fetch_array($query);\n\t$id = \"\";\n\tif($fetch['max'] <= 0){\n\t\t$id = 1;\n\t}else{\n\t\t$id = ($fetch['max'] + 1);\n\t}\n\treturn $id;\n}", "title": "" }, { "docid": "d0d9ab551d3da9d993aa85d08aeacdfd", "score": "0.7668584", "text": "public function queryNewId()\n {\n return \"SELECT MAX(\".$this->_primaryKey().\") + 1 as maxId FROM \".$this->_table().\" \" ;\n }", "title": "" }, { "docid": "17bf753df185f2996c171ce1c01da35a", "score": "0.7663353", "text": "function getid()\n {\n\t require \"database.php\";\n $q=\"select max(id) from buy\";\n $r=$db->query($q);\n $p=$r->fetch();\n $id=$p['max(id)'];\n $id=$id+1;\n return $id;\n }", "title": "" }, { "docid": "bc22f7bf814201f2c9e420fd663ab44d", "score": "0.7658634", "text": "function get_id_max_agr() {\n /* $kode = \"AGR\";\n $sql \t= \"SELECT max(id_anggaran_wkt) as max_id FROM tb_anggaran_waktu\";\n $row \t= $this->db->query($sql)->row();\n $max_id = $row->max_id;\n $max_no = substr($max_id,3);\n $new_no = $max_no + 5;\n $id \t\t= $kode.$new_no;\n return $id; */\n\n return \"AGR_\" . date(\"dmYHis\") . \"_\" . round(microtime(true) * 1000);\n }", "title": "" }, { "docid": "9bb63b91fb88f48b384c45a06d419831", "score": "0.7632693", "text": "function getMaxId($db)\n {\t \n $sql = \"SHOW TABLE STATUS LIKE 'transactions'\";\n\t$result = $db->execQuery($sql);\n\t$row = $db->resultArray();\n\treturn $row[0]['Auto_increment'];\t \n }", "title": "" }, { "docid": "aee98d912fedd824366d46d3b0a30fc9", "score": "0.7626955", "text": "public function getMaxAnswer_id()\n {\n $max=$this->fetchRow($this->select()\n ->from($this, array('maxId'=>'max(answer_id)')));\n return (int)$max['maxId'];\n\n }", "title": "" }, { "docid": "4804c69e9350369136fb4f4983255313", "score": "0.7624286", "text": "function getMaxId($db)\n {\t \n $sql = \"SHOW TABLE STATUS LIKE 'subscription'\";\n\t$result = $db->execQuery($sql);\n\t$row = $db->resultArray();\n\treturn $row[0]['Auto_increment'];\t \n }", "title": "" }, { "docid": "2da2540c03ddf0164489f5edbd517942", "score": "0.7616771", "text": "public function getLastId()\n {\n return DB::table($this->tableName)->latest('id')->first()->id;\n }", "title": "" }, { "docid": "93f6d2de0cd606956ae0b1d01e7402aa", "score": "0.7612548", "text": "function GetMaxID()\n {\n $query = \"SELECT PostId FROM lph_post ORDER BY PostId DESC LIMIT 1\";\n $result = $this->mysql->query($query);\n $data = [];\n while ($row = mysqli_fetch_array($result)) {\n array_push($data, [$row[0]]);\n }\n // $maxID = $data[0];\n // return $maxID;\n return $data;\n }", "title": "" }, { "docid": "fd7336034e40ba59788d914714851e55", "score": "0.759493", "text": "function getActualId(){\n $db = ConnectBDD()->prepare(\"select max(id) from ROBOT\");\n $db->execute();\n $sectionTab = $db->fetchAll(PDO::FETCH_ASSOC);\n return $sectionTab[0]['id'];\n}", "title": "" }, { "docid": "d685435e4cfc9db290b56f953cf26bdb", "score": "0.75917864", "text": "public function max()\n\t{\n\t\t//Chargement d'une requete SELECT.\n\t\t$query = $this->getPDO()->query('SELECT MAX(id) FROM post');\n\t\t$data = $query->fetch(PDO::FETCH_ASSOC);\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "35aae1d568dad6efa5d4a15c03ec62cc", "score": "0.75683486", "text": "public function getLastId()\n {\n $query = new Query();\n\n $result = $query->select(['Max(id) as ProjectID'])\n ->from('project_pii')\n ->where(['status' => 1])\n ->one();\n\n if(count($result) > 0) {\n return $result['ProjectID'] + 1;\n\n }else{\n return 0;\n\n }\n\n }", "title": "" }, { "docid": "b240e91ca95fba103d78622d7399824f", "score": "0.75545686", "text": "function getMax() {\n $sql = \"SELECT MAX(checkup_id) as id FROM checkup\";\n $res = $this->_mysqli->query($sql);\n\n if($res === FALSE) {\n return 1;\n }\n \n $m = $res->fetch_row();\n $max_id = $m[0] + 1;\n\n return $max_id;\n }", "title": "" }, { "docid": "68182a640a7c82d121356d9332b68551", "score": "0.7547777", "text": "function GetMaxProductId(){\r\n global $db;\r\n $stmt = $db->prepare(\"SELECT MAX(u.Id) as maxid FROM products u\");\r\n $stmt->execute();\r\n $test = $stmt->fetch(PDO::FETCH_ASSOC);\r\n return $test['maxid'];\r\n}", "title": "" }, { "docid": "37367b4ad295081f6ad4f50584bd3699", "score": "0.75056726", "text": "public function getLast()\r\n\t{\r\n\t\t$sqlQuery= \"SELECT MAX(questionid) as maxid FROM medicalrecords;\";\r\n\t\t$result = $this ->getDbManager()->executeSelectQuery($sqlQuery);\r\n\t\treturn ($result[0][\"maxid\"]) ? $result[0][\"maxid\"] : -1 ;\r\n\t}", "title": "" }, { "docid": "99fa2ef380dbcecc9d25d52287399e86", "score": "0.7502282", "text": "private static function _getMaxRootId()\n {\n return self::query(sprintf('SELECT '.'MAX(t.id_right) as id_right from %s as t', self::$tableName));\n }", "title": "" }, { "docid": "ab861d80a843a84f5d00b6ba93f802a3", "score": "0.7474466", "text": "public static function getMaxIDLineaPedido(){\n $conexion = conectarBD();\n $sql = \"SELECT MAX(id) as id FROM linea_pedido\";\n $resul = $conexion->query($sql);\n\n $max = mysqli_fetch_assoc($resul);\n\n return $max['id'];\n\n\n }", "title": "" }, { "docid": "cca716367e54633db90132c3242f5ce2", "score": "0.7455807", "text": "function lastId() {\n $r=$this->f([\":sort\" => \"-_id\", \":limit\" => 1], \"_id\");\n if (! $r)\n return 0;\n return key($r);\n }", "title": "" }, { "docid": "4ddd928b2f2b15517e4038dc8c83c7cf", "score": "0.7448818", "text": "public function getMaxResourceIdQuery()\n { \n\t\t$sql = $this->getQueryContent('maxResourceIdQuery');\n\t\treturn $this->db->fireSqlQueryFetchObject($sql,'maxResourceIdQuery')->MAX_ID;\n\t}", "title": "" }, { "docid": "e51d68a15acf97ca47eae071e48ec421", "score": "0.7433108", "text": "function getLastID()\n{\n\t$sql= \"select max(tank_mix) as id from tank_mix\";\n\t$rs = dbcall($sql,\"2015_crop\");\n\t$id = $rs->fields[\"id\"];\n\tif($id==null)\n\t{\n\t\t$id = 1;\n\t}\n\treturn $id+1;\n}", "title": "" }, { "docid": "cc3c82b990ae48fb206b2a8d78946346", "score": "0.74267447", "text": "public function get_highest_id($table_name) {\n\t $id_name = substr($table_name, 0, -1).'_id';\n $result = $this->db->exec('SELECT '.$id_name.' FROM '.$table_name.' ORDER BY '.$id_name.' DESC LIMIT 1');\n\n // check if any results were in the database already\n if (!empty($result)) {\n return (int)$result[0][$id_name];\n }\n return 0;\n }", "title": "" }, { "docid": "b8994c5d3f7f041afb4244fdbd473451", "score": "0.7425814", "text": "function getMaxId($pdo, $table)\n{\n $stmt = $pdo->prepare(\"SELECT max(id) FROM $table\");\n $stmt->execute();\n $item = $stmt->fetch();\n if (is_array($item) && @$item[0] > 0) {\n return @$item[0];\n } else {\n return 0;\n }\n}", "title": "" }, { "docid": "1a2cbc1c5ab5ff454a0ec5ec3b850e35", "score": "0.7423924", "text": "public function getLastId()\n {\n return $this->mapMapper->getMaxId();\n }", "title": "" }, { "docid": "2ffffd60de594e499e2c7e6104e7b252", "score": "0.74073535", "text": "public function recupereMaxId()\n {\n return $this->getGreaterId('membre_equipe');\n }", "title": "" }, { "docid": "d52185b1b30ed85fc9c12965f6f2820a", "score": "0.7375818", "text": "function getmaxid_new($table,$col_id,$con=\"\")\r\n{\r\n $sql=\"select max($col_id) from $table $con\";\r\n $rs=mysql_query($sql) or die(mysql_error());\r\n if(mysql_num_rows($rs))\r\n {\r\n\t$data=mysql_fetch_assoc($rs);\r\n\t\r\n\t$max=$data[\"max($col_id)\"];\r\n\treturn ++$max;\r\n }\r\n else\r\n {\r\n return \"1\";\r\n }\r\n}", "title": "" }, { "docid": "9a919273ba297b4a1899242a7a202f08", "score": "0.737445", "text": "private function getLastId()\n {\n $last = Convoy::withTrashed()->orderBy('id', 'desc')->first();\n\n return $last ? $last->id : 0;\n }", "title": "" }, { "docid": "751dd1284eb1ed0ed84dae7d81a4256e", "score": "0.7367269", "text": "public function getMaxIdOfVisit() {\n\t\t$query = \" SELECT MAX(`id_visit`) AS `latestId`\n\t\t\t\t\tFROM `VISIT`\";\n\t\t$data = mysql::select($query);\n\n\t\treturn $data[0]['latestId'];\n\t}", "title": "" }, { "docid": "f1165856e01edbb673ab3e3fc4de545b", "score": "0.73437285", "text": "public function get_maxJobID(){\n $this->db->select_max('JobID');\n $query = $this->db->get('Job');\n return $query->row_array();\n }", "title": "" }, { "docid": "e770c7b547f14152f83ace6773b3a978", "score": "0.7343111", "text": "public function latestPayrollId(){\n\t\t$payroll_period_id = null;\n\t foreach ($this->controller->select(\n\t \t\"SELECT MAX(id) AS highest FROM payroll_period_tbl WHERE admin_id = ?\",\n\t \t[\n\t \t\t'admin_id' => $_SESSION['adminID']\n\t \t]\n\t ) as $key => $value) {\n\t \t$payroll_period_id = $value->highest;\n\t }\n\t return $payroll_period_id;\n\t}", "title": "" }, { "docid": "ad57dc9764aef580810ef9bdd2493c1d", "score": "0.7334381", "text": "public function get_last_id(): int {\r\n\t\treturn $this->id;\r\n\t}", "title": "" }, { "docid": "036b142b0e5087509776b96c953ddea1", "score": "0.7334157", "text": "function getMaxID($maxField, $table){\n$sql=mysqli_query($con,\"SELECT MAX(\".$maxField.\") as maxID FROM \".$table);\n$result=mysqli_fetch_array($con,$sql);\nreturn $result['maxID'];\n}", "title": "" }, { "docid": "cb22d2fbb44a908f44dc4e181ca6cf70", "score": "0.7313122", "text": "public function getLastId()\n\t{\n\t\t$sql = 'select scope_identity() as n';\n\t\t$res = $this->query( $sql );\n\t\t\n\t\treturn $res[0]['n'];\n\t}", "title": "" }, { "docid": "d2c1ec5f4287d391fbf1c0ccf3a63b4f", "score": "0.73124665", "text": "public static function getLastArticleID(){\n $row = getDatabase()->queryFirstRow(\"SELECT `id` FROM `articles` ORDER BY `id` DESC\");\n $lastID = $row['id'];\n return $lastID;\n }", "title": "" }, { "docid": "9bed8e7073ad3928783d80677a89c822", "score": "0.7307767", "text": "public function getLastId(){\n\t\t\t$query = \"SELECT * FROM message ORDER BY id DESC LIMIT 0,1\";\n\n\t\t\t$stmt = $this->conn->prepare($query);\n\t\t\t\n\t\t\t$stmt->execute();\n\n\n\t\t\tif($stmt){\n\t\t\t\t$row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n\t\t\t\treturn $row['id'];\n\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "c2d7f0d35f54af24e7b9b9a2028d210b", "score": "0.7295716", "text": "public function get_new_id()\n {\n $query = \"select MAX(id) as id from prediction\";\n $res = $this->db->query($query);\n $res->result_array();\n $last_id = ($res->result()[0]->id)+1;\n return $last_id;\n }", "title": "" }, { "docid": "8c83b08c46d19cc21ccbd0c75fd2c8ac", "score": "0.72831404", "text": "private function getID() {\n $last_id = DB::table('asset_contract')\n ->select('id')->orderBy('id', 'desc')\n ->take(1)->get();\n\n if($last_id->count()) $last_id = $last_id[0]->id + 1;\n else $last_id = 1;\n \n return $last_id;\n }", "title": "" }, { "docid": "f4c19fcf27f43c3cfd45780c68b82dab", "score": "0.72815776", "text": "public function getLastId();", "title": "" }, { "docid": "f4c19fcf27f43c3cfd45780c68b82dab", "score": "0.72815776", "text": "public function getLastId();", "title": "" }, { "docid": "15ef5f425616458717b8ca663472e0a6", "score": "0.72795", "text": "public function maxid($table, $column){\n\n $sql = \"select MAX(`$column`)+1 As `MaxId` from `$table`;\";\n $result = $this->SqlQueryOutputResult($sql, array(0));\n if($row = $result->fetch()){\n if($row[\"MaxId\"] == 0)\treturn 1;\n else return $row[\"MaxId\"];\n }\n }", "title": "" }, { "docid": "e4e4dc6a7e5d3d6b622fb5435b084185", "score": "0.72793144", "text": "public function maxid($table, $column){\n\t\t$dbObj = new classDb();\n\t\t$sql = \"select MAX(`$column`)+1 As `MaxId` from `$table`;\";\n\t\t$result = $dbObj->SqlQueryOutputResult($sql, array(0));\n\t\tif($row = $result->fetch()){\n\t\t\tif($row[\"MaxId\"] == 0)\treturn 1;\n\t\t\telse return $row[\"MaxId\"];\n\t\t}\n\t}", "title": "" }, { "docid": "de47f782582b45803459de647eab9275", "score": "0.7278991", "text": "protected function getLatestId(){\n $sql = \"SELECT tweet_id FROM %s ORDER BY tweet_id DESC LIMIT 1\";\n if($res = TwitterDBWrapper::fetch($sql)){\n $res = $res->fetch_array();\n return $res[0];\n }\n return 0;\n }", "title": "" }, { "docid": "da60ac140bd026513ad561acc6fd8803", "score": "0.7275171", "text": "protected function loadMaxAssignmentId() {\n\t\t// -------------- collect max assignment ID\n\t\t$table = ASSIGN_TABLE;\n\t\t$sql = \"select id from {$table} order by id desc limit 1\";\n\t\t$this->max_assign_id = NULL;\n\t\tforeach ($this->mysql_api->get($sql) as $row) {\n\t\t\t$this->max_assign_id = $row['id'];\n\t\t\tbreak;\n\t\t}\n\t\tif (is_null($this->max_assign_id)) {\n\t\t\techo \"max id is null\\n\";\n\t\t\texit;\n\t\t}\n\t\techo \"max assignment ID is {$this->max_assign_id}\\n\";\n\t}", "title": "" }, { "docid": "ebad6876a6df23d6af0fd67aa67e7148", "score": "0.7269172", "text": "function lastIdVenta() {\n//SELECT MAX(idiventa) FROM venta\n include './conexion.php';\n $sql = \"SELECT MAX(idiventa) FROM venta\";\n $result = $conn->query($sql);\n $rows = null;\n if ($result->num_rows > 0) {\n// output data of each row\n while ($row = $result->fetch_assoc()) {\n $rows = $row[\"MAX(idiventa)\"];\n }\n return $rows;\n } else {\n return $row + 1;\n }\n $conn->close();\n }", "title": "" }, { "docid": "76d87f29d9c8a0004f384cdca13bc9b9", "score": "0.726543", "text": "function lastID() {\n $sql = \"SELECT AUTO_INCREMENT\n FROM information_schema.tables\n WHERE table_name = 'course'\";\n $query = $this->conn->query($sql);\n $lastid = $query->fetch()['AUTO_INCREMENT'] - 1;\n return $lastid;\n }", "title": "" }, { "docid": "dd835e142b1226eb14b30403569243eb", "score": "0.72605634", "text": "public function get_last_id( $table_name ){\n\t\t$last_id = $this->db->get_var(\"SELECT MAX(id) FROM \" . $table_name );\n\t\treturn $last_id;\n\t}", "title": "" }, { "docid": "ac7fd7c2a42c2fb70dea3c3e73852249", "score": "0.725645", "text": "public function getLastId()\n {\n return $this->db->getLastId();\n }", "title": "" }, { "docid": "82e6ac043e524136e34ebacd9a7937a4", "score": "0.72441214", "text": "function getLatestPropertyID($conn){\n $sql= mysqli_query( $conn,\"SELECT MAX( propertyID ) AS max FROM properties;\" );\n $res = mysqli_fetch_assoc( $sql);\n $maxID = $res['max'];\n return $maxID; \n}", "title": "" }, { "docid": "063441224180f1d903bacf8dd5cef57f", "score": "0.72331625", "text": "public function get_last_personnel_id(){\n\t$query = $this->db->query(\"SELECT SUBSTR(MAX(personnel_id),-8) AS id FROM human_pa_md_app_personal\");\n\n\treturn $query;\n\t}", "title": "" }, { "docid": "c61dd5198cc5a83b1d26ea00683a2d0d", "score": "0.7228793", "text": "public function maxid($table, $field)\n {\n $maxid2 = mysql_query(\"SELECT MAX($field) as maxid FROM $table\") or die(mysql_error());\n $maxid3 = mysql_fetch_array($maxid2);\n\n return $maxid3['maxid'];\n }", "title": "" }, { "docid": "a810237a30a7fb1de6e5e8497b8ee35e", "score": "0.7191545", "text": "public function get_last_personnel_id(){\n\t$query = $this->db->query(\"SELECT SUBSTR(MAX(personnel_id),-8) AS id FROM human_pa_md_emp_personal\");\n\n\treturn $query;\n\t}", "title": "" }, { "docid": "b316f551b06b1f6f5908dc9e2349d422", "score": "0.7180867", "text": "function getMaxID($conn ,$dbname ,$tblname ,$tblkey){ \n\t$haveTable = $conn->query(\"SELECT table_name FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='\".$dbname.\"' and TABLE_NAME='\".$tblname.\"';\");\n\t$numrow =$conn->num_rows($haveTable);\n\t//echo \"Found Table Rows = \".$numrow.\"<br>\";\n\tif ($numrow = 0 ) {\n\t\treturn 0;\n\t}else{\n\t\t$selectID = $conn->query(\"SELECT IFNULL(max(\".$tblkey.\"), 0)+1 maxID FROM \".$tblname.\" ;\");\n\t\t//$getMax = $selectID[0];\n\t\t$maxID=mysqli_fetch_array($selectID);\n\t\t\n\t\treturn $maxID['maxID'];\t\t\t\n\t}\t\n\treturn 0;\n}", "title": "" }, { "docid": "235101bfe66e72bc34dceda3e5f23d47", "score": "0.7177286", "text": "function getNextID($table){\r\n\r\n global $database;\r\n\r\n $q = \"SELECT MAX(id) as MaximumID FROM $table\";\r\n $result = $database -> conn -> query($q);\r\n\r\n //verifica che ci siano elementi\r\n if(!$result)\r\n return false;\r\n \r\n while ($res = mysqli_fetch_assoc($result)) {\r\n\r\n return $res['MaximumID'] + 1;\r\n }\r\n \r\n}", "title": "" }, { "docid": "2a57de4e92f455c8dfce772c6e13c911", "score": "0.71679175", "text": "public function getidtransaksi(){\n\t\t$query = $this->db->query(\"SELECT MAX(id_transaksibeli) AS id FROM transaksibeli\");\n\t\treturn $query->row()->id;\n\t}", "title": "" }, { "docid": "d8b9feade6aaf2329cde4ec9ee7216e4", "score": "0.71670276", "text": "public function findLastBatchId()\n {\n $qb = $this->createQueryBuilder('i')\n ->select('i, MAX(i.batchId) AS maxId')\n ;\n\n return (int) $qb->getQuery()->getSingleResult()['maxId'];\n }", "title": "" }, { "docid": "78cda7b4c639d07af2fa8426c584aa64", "score": "0.71592355", "text": "public function getLatestId()\n {\n return $this->_id;\n }", "title": "" }, { "docid": "f05fc025e2b8bf4121ca9fb3c8834864", "score": "0.7159004", "text": "function extrae_ultimo_id($tabla){\r\n $mysqli = conectar_db();\r\n selecciona_db($mysqli);\r\n\r\n $Consulta = \"SELECT id FROM $tabla ORDER BY id DESC LIMIT 1\";\r\n $pConsulta = consulta_tb($mysqli, $Consulta);\r\n if (!$pConsulta) {\r\n return 0;\r\n }else{\r\n $row=mysqli_fetch_array($pConsulta);\r\n return $row[0];\r\n }\r\n cerrar_db($mysqli);\r\n }", "title": "" }, { "docid": "2b59f3354cb036ce768a98971437db5a", "score": "0.71522796", "text": "function recuperer_nb_dai(){\n global $db;\n $sql = \"SELECT MAX(id) FROM dai \";\n $req = $db->prepare($sql);\n $req-> execute();\n $results = array();\n while($rows = $req->fetchObject()){\n $results[] = $rows;\n }\n return $results;\n}", "title": "" } ]
a96421db7c06d7e290f32d8781716b29
email stuff (change data below)
[ { "docid": "2e6644dd4ee1930486cc2e2fd780427e", "score": "0.0", "text": "public function SendCustomerMail($customerInfo, $tickets)\n {\n $to = $customerInfo[5]; \n $from = \"[email protected]\"; \n $subject = \"Your Invoice of Haarlem Festival\"; \n $message = \"<p>Thank you for purchesing the tickets.</p>\";\n \n // a random hash will be necessary to send mixed content\n $separator = md5(time());\n \n // carriage return type (we use a PHP end of line constant)\n $eol = PHP_EOL;\n \n // attachment name\n $filename = \"Invoice_Haarlem_Festival.pdf\";\n \n // encode data (puts attachment in proper format)\n \n $PDF = new PDFInvoiceMaker;\n $pdfdoc = $PDF->MakePDF($customerInfo, $tickets);\n $attachment = chunk_split(base64_encode($pdfdoc));\n \n // main header\n $headers = \"From: \".$from.$eol;\n $headers .= \"MIME-Version: 1.0\".$eol; \n $headers .= \"Content-Type: multipart/mixed; boundary=\\\"\".$separator.\"\\\"\";\n \n // no more headers after this, we start the body! //\n \n // message\n $body = \"\";\n $body .= \"Content-Type: text/html; charset=\\\"iso-8859-1\\\"\".$eol;\n $body .= \"Content-Transfer-Encoding: 8bit\".$eol.$eol;\n $body .= $message.$eol;\n \n // attachment\n $body .= \"--\".$separator.$eol;\n $body .= \"Content-Type: application/octet-stream; name=\\\"\".$filename.\"\\\"\".$eol; \n $body .= \"Content-Transfer-Encoding: base64\".$eol;\n $body .= \"Content-Disposition: attachment\".$eol.$eol;\n $body .= $attachment.$eol;\n $body .= \"--\".$separator.\"--\";\n \n // send message\n mail($to, $subject, $body, $headers);\n \n }", "title": "" } ]
[ { "docid": "0da021509cf75739fa40d9eab8cfbcdf", "score": "0.7080995", "text": "public function emailSender();", "title": "" }, { "docid": "c623bd884d7c06452a64a40092585252", "score": "0.70287573", "text": "private function sendEmails()\n {\n $adminBody = 'Hi,<br>A new comment was added to the following article:';\n $adminBody .= '<a href=\"http://'.$this->httpRequest->getBaseUrl().'/id_article/'.$this->viewVar['article']['id_article'].'\">'.$this->config->getModuleVar('article','title').'</a>';\n\n if($this->config->getModuleVar('article','default_comment_status') == 1)\n {\n $adminBody .= '<br><br>You have to validate new comments!';\n }\n\n $_tmp_error = array();\n $user_text_body = strip_tags($adminBody);\n\n $this->model->action( 'common', 'mailSendTo',\n array('charset' => $this->viewVar['charset'],\n 'bodyHtml' => & $adminBody,\n 'bodyText' => & $user_text_body,\n 'to' => array(array('email' => '[email protected]',\n 'name' => 'your name')),\n 'subject' => \"New Blog Entry\",\n 'fromEmail' => '[email protected]',\n 'error' => & $_tmp_error\n ));\n }", "title": "" }, { "docid": "66502ac20618950dc40d525e87d51ccd", "score": "0.7012956", "text": "function send_email()\n\t{\n\t\tglobal $db;\n\n\t\tif (!count($this->info) || !count($this->email))\n\t\t{\n\t\t\t$this->pg->error('Unable to send email - values missing');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$to = $this->info['cus_email'];\n\t\t\t$from = \"{$_SESSION['store_info']['sto_name']} <{$_SESSION['store_info']['sto_email']}>\";\n\t\t\t$subject = $this->email['subject'];\n\t\t\t$body = $this->email['body'];\n\n\t\t\t$sent = NO; //@mail($to,$subject,$body,\"From: $from\");\n\n\t\t\tif (!$sent) { $this->pg->error(\"Unable to send email to {$this->info['cus_email']}\"); }\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->pg->status(\"Email successfully sent to {$this->info['cus_email']}\");\n\t\t\t\t$sql = \"UPDATE wishlist_items SET wli_emailsent=\" . YES . \" WHERE wli_wishlistID=$this->wishlistID AND wli_itemID IN (\".implode(',',$_SESSION['wishlist_itemIDs']).\")\";\n\t\t\t\tmysql_query($sql,$db);\n\t\t\t\t$this->error->mysql(__FILE__,__LINE__);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "ae037a56468843917fffac8b096e1cbd", "score": "0.70100176", "text": "function wpmq_mail() {\n\t}", "title": "" }, { "docid": "e33703923ccd1cb08fb4a78eb6d4c8bf", "score": "0.69162035", "text": "function HandleEmails()\n {\n $where=array();\n $fixedvars=$where;\n \n echo \n $this->HandleSendEmails\n (\n array\n (\n ),\n array(\"Friend\"),\n $fixedvars\n ).\n \"\";\n }", "title": "" }, { "docid": "cf9e8ca5c9b3e02f914ce735bd0be9ab", "score": "0.69114655", "text": "function snapSendFalconEmail($emailtype,$toemailaddress,$emaildata=array()) {\r\n\t\tglobal $APPCONFIG;\r\n\t\t$emailDet = $APPCONFIG['EMAIL'];\r\n\t\t$fromemail = $emailDet['emailfrom'];\r\n\t\t$apiurl = $emailDet['apiurl'];\r\n\t\t$apikey = $emailDet['apikey'];\r\n\t\t$fromname = $emailDet['fromname'];\r\n\t\t$bccemail = $emailDet['CCEMAILADDRESS'];\r\n\t\t$templateurl = $emailDet[$emailtype]['template'];\r\n\t\t$subject = $emailDet[$emailtype]['subject'];\r\n\t\t$to = $toemailaddress;\r\n\t\t$content = file_get_contents($templateurl);\r\n\t\tforeach($emaildata as $key => $val) $content = str_replace(\"[$key]\", $val, $content);\r\n\t\t$data=array();\r\n\t\t$data['subject'] = \trawurlencode($subject); \r\n\t\t$data['fromname'] = \trawurlencode($fromname); \r\n\t\t$data['api_key'] = \t$apikey;\r\n\t\t$data['from'] = \t$fromemail;\r\n\t\t$data['content'] = \trawurlencode($content);\r\n\t\t$data['recipients'] = $to;\r\n\t\t$data['bcc'] = $bccemail;\r\n\t\t$result = http_post_form($apiurl, $data);\r\n\t\t//file_put_contents('/tmp/res',$result);\r\n\t}", "title": "" }, { "docid": "846d47267eafb9e816b04c6c6949812e", "score": "0.68823236", "text": "protected function write_email ()\n {\n $this->optimal_click(Yii::app()->params['test_mappings']['icons']['mail']);\n $this->optimal_click(\"xpath=(//*[contains(text(),'новое письмо')])\");\n }", "title": "" }, { "docid": "4051fc61d8e905bf0268c438fe5a6a42", "score": "0.6869361", "text": "function __emailer($email = '', $vars = array())\n {\n\n //password reminder - admin----------------------------------------------\n if ($email == 'password_reset_admin') {\n\n //get message template from database\n $template = $this->settings_emailtemplates_model->getEmailTemplate('password_reset_admin');\n \n\n //exit if email is not enabled\n if ($template['status'] != 'enabled') {\n return;\n }\n\n //dynamic vars\n $vars['url_dashboard'] = $this->data['vars']['site_url_client'];\n\n //parse email\n $email_message = parse_email_template($template['message'], $vars);\n\n //send email\n email_default_settings(); //defaults (from emailer helper)\n $this->email->to($vars['to_email']);\n $this->email->subject($template['subject']);\n $this->email->message($email_message);\n $this->email->send();\n //log this\n $this->__emailLog($vars['to_email'], $template['subject'], $email_message);\n\n }\n }", "title": "" }, { "docid": "31d13fcffe6535c03bd2c70ce4bbe618", "score": "0.68213034", "text": "function __emailer($email = '', $vars = array())\n {\n\n //specific passed variables\n foreach ($vars as $key => $value) {\n $this->data['email_vars'][$key] = $value;\n }\n\n //-------------send out email-------------------------------\n if ($email == 'new_payment') {\n\n //get message template from database\n $template = $this->settings_emailtemplates_model->getEmailTemplate('new_payment_admin');\n $this->data['debug'][] = $this->settings_emailtemplates_model->debug_data;\n\n //parse email\n $email_message = parse_email_template($template['message'], $this->data['email_vars']);\n //send email to multiple admins\n foreach ($this->data['vars']['mailinglist_admins'] as $email_address) {\n email_default_settings(); //defaults (from emailer helper)\n $this->email->to($email_address);\n $this->email->subject($this->data['lang']['lang_new_payment']);\n $this->email->message($email_message);\n $this->email->send();\n }\n }\n\n }", "title": "" }, { "docid": "8a4243b7f93cb45a50d5de1378d3b94b", "score": "0.67554164", "text": "public function email_body()\n {\n return <<<BODY\nHi {firstname} {lastname}, we just thought you should know someone logged in to your account with username {username}.\nIF this is you, ignore this message otherwise contact us immediately via [email protected]\nBODY;\n }", "title": "" }, { "docid": "be1c9a5e2b0d5c9b409a66b9ca2b6f4a", "score": "0.67329663", "text": "function sendmail_handler(&$pm) {\r\n\r\n\t}", "title": "" }, { "docid": "2c3f5e5d4b60c6351326669a9c436598", "score": "0.67255694", "text": "private function _emailformat(){\n $content = read_file($this->monitor);\n preg_match('/set from=(?<content>[\\s\\S]*?)\"/', $content,$address);\n preg_match('/set smtp=(?<content>[\\s\\S]*?)\"/', $content,$stmp);\n preg_match('/set smtp-auth-user=(?<content>[\\s\\S]*?)\"/', $content,$user);\n preg_match('/set smtp-auth-password=(?<content>[\\s\\S]*?)\"/', $content,$pwd);\n \n $data['address'] = '';\n $data['user'] = '';\n $data['stmp'] = '';\n $data['pwd'] = '';\n \n if($address){\n $data['address'] = $address[1];\n }\n if($stmp){\n $data['stmp'] = $stmp[1];\n }\n if($user){\n $data['user'] = $user[1];\n }\n if($pwd){\n $data['pwd'] = $pwd[1];\n }\n return $data;\n }", "title": "" }, { "docid": "ffd966948472c838657f83a2ed26e70c", "score": "0.67166245", "text": "public function sendEmailapi(){\n if(isset($this->attachment)&&!empty($this->attachment))\n {\n $json = json_encode(array(\n\t 'From' => \"$this->from\",\n\t 'To' => \"$this->to\",\n\t 'Subject' => \"$this->subject\",\n\t 'HtmlBody' => \"$this->body\",\n\t 'TextBody' => \"This will be shown to plain-text mail clients\",\n 'Attachments'=>$this->attachment\n\t ));\n \n \n }else{\n $json = json_encode(array(\n\t 'From' => \"$this->from\",\n\t 'To' => \"$this->to\",\n\t 'Subject' => \"$this->subject\",\n\t 'HtmlBody' => \"$this->body\",\n\t 'TextBody' => \"This will be shown to plain-text mail clients\"\n\t ));\n }\n\t $ch = curl_init();\n\t curl_setopt($ch, CURLOPT_URL, 'http://api.postmarkapp.com/email');\n\t curl_setopt($ch, CURLOPT_POST, true);\n\t curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n\t 'Accept: application/json',\n\t 'Content-Type: application/json',\n\t 'X-Postmark-Server-Token: ' . POSTMARK_API_KEY\n\t ));\n\t curl_setopt($ch, CURLOPT_POSTFIELDS, $json);\n\t $response = json_decode(curl_exec($ch), true);\n\t $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n\t curl_close($ch);\n if($http_code!==200)\n {\n $this->failure_message = $response['Message'];\n }\n return $http_code;\n }", "title": "" }, { "docid": "3eec7ee9517ca4fc9b6bd252ad3d2dc2", "score": "0.6708384", "text": "private function send_email($data)\n {\n $_PM_ = &$this->_PM_;\n $tpl = new phlyTemplate($this->mailtpl[$data['lang']]);\n\n $data['to'] = Format_Parse_Email::parse_email_address($data['to'], 0, true, true);\n $data['from'] = Format_Parse_Email::parse_email_address($data['from'], 0, true, true);\n\n if ($data['reminder']) {\n $tpl->fill_block('reminder', 'reminder', $data['reminder']);\n }\n if ($data['reminder_html']) {\n $tpl->fill_block('reminder_html', 'reminder_html', $data['reminder_html']);\n }\n\n foreach (array('from', 'to', 'subject', 'subject_html', 'title', 'location', 'start', 'end'\n ,'desc', 'desc_html', 'msgid', 'time') as $token) {\n $tpl->assign($token, (isset($data[$token]) ? $data[$token] : ''));\n }\n\n if ($_PM_['core']['send_method'] == 'sendmail') {\n $sendmail = str_replace('$1', $data['from'], trim($_PM_['core']['sendmail']));\n $sm = new Protocol_Client_Sendmail($sendmail);\n $moep = $sm->get_last_error();\n if ($moep) {\n vecho($moep);\n $sm = false;\n }\n } elseif ($_PM_['core']['send_method'] == 'smtp') {\n if (!empty($_PM_['core']['fix_smtp_host'])) {\n $smtp_host = $_PM_['core']['fix_smtp_host'];\n $smtp_port = ($_PM_['core']['fix_smtp_port']) ? $_PM_['core']['fix_smtp_port'] : 587;\n $smtp_user = (isset($_PM_['core']['fix_smtp_user'])) ? $_PM_['core']['fix_smtp_user'] : false;\n $smtp_pass = (isset($_PM_['core']['fix_smtp_pass'])) ? $_PM_['core']['fix_smtp_pass'] : false;\n $smtpsecurity = isset($_PM_['core']['fix_smtp_security']) ? $_PM_['core']['fix_smtp_security'] : 'AUTO';\n $smtpselfsigned = isset($_PM_['core']['fix_smtp_allowselfsigned']) ? $_PM_['core']['fix_smtp_allowselfsigned'] : false;\n }\n $settings = $this->DB->get_usr_choices($data['uid']);\n $Acnt = new DB_Controller_Account();\n $email = $Acnt->getDefaultEmail($data['uid'], $settings);\n if (!empty($email)) {\n list($account_id, $alias_id) = $Acnt->getProfileFromEmail($data['uid'], $email);\n }\n if (!empty($account_id)) {\n $connect = $Acnt->getAccount($data['uid'], $account_id);\n // If we have SMTP connection data for this account, use it, else try to use the default\n // connection data\n if (!empty($connect['smtpserver'])) {\n $smtp_host = $connect['smtpserver'];\n $smtp_port = ($connect['smtpport']) ? $connect['smtpport'] : 587;\n $smtp_user = $connect['smtpuser'];\n $smtp_pass = $connect['smtppass'];\n $smtpsecurity = $connect['smtpsec'];\n $smtpselfsigned = $connect['smtpallowselfsigned'];\n }\n }\n // Pull data from system's default SMTP account\n $sm = new Protocol_Client_SMTP($smtp_host, $smtp_port, $smtp_user, $smtp_pass, $smtpsecurity, $smtpselfsigned);\n $server_open = $sm->open_server($data['from'], array($data['to']));\n if (!$server_open) {\n vecho(str_replace('<br />', '\\n', str_replace(LF, '', $sm->get_last_error())).'\\n');\n $sm = false;\n }\n }\n if (!$sm) {\n return false;\n }\n $sm->put_data_to_stream($tpl->get_content());\n $sm->finish_transfer();\n if ($_PM_['core']['send_method'] == 'sendmail') {\n if (!$sm->close()) {\n vecho('No mail sent ('.$sm->get_last_error().')\\n');\n $success = false;\n } else {\n $success = true;\n }\n }\n if ($_PM_['core']['send_method'] == 'smtp') {\n if ($sm->check_success()) {\n $success = true;\n } else {\n vecho('No mail sent ('.$sm->get_last_error().')\\n');\n $success = false;\n }\n $sm->close();\n }\n if ($success) {\n vecho('Sent mail... '.print_r($data, true));\n }\n return $success;\n }", "title": "" }, { "docid": "7b6cfc2442b5e2cd8f264721049752af", "score": "0.6703543", "text": "abstract public function get_email_body();", "title": "" }, { "docid": "fc924485cc0abbb93f73cccb3e8856aa", "score": "0.669656", "text": "function feedback_email($obj){ \n\t\n\t\t$this->email->from($obj->to_adm[0], 'Hay Kamine'); \n\t\t$this->email->to($obj->from_book); \n\t\t \n\t\t \n\t\t$email_msg\t\t =\t\"<p>Dear \".$obj->name.\",</p><br />\"; \n\t\t$email_msg\t\t.=\t\"System auto send mail from Hay Kamine to comfirm for your booking meeting room on:<br />\"; \n\t\t$email_msg\t\t.=\t\"Date :\".$obj->dates.\" <br />\";\n\t\t$email_msg\t\t.=\t\"Time : \".$obj->s_time.\" - \".$obj->e_time.\" <br />\";\n\t\t$email_msg\t\t.=\t\"Description :\".$obj->descript.\"<br /><br /><br />\";\n\t\t\n\t\t$email_msg\t\t.=\t\"Regarding,<br />\";\n\t\t$email_msg\t\t.=\t$obj->name.\"<br />\"; \n\t\t \n\t\t\n\t\t$this->email->subject($obj->title);\n\t\t$this->email->message($email_msg); \n\t\t$this->email->send();\n\t}", "title": "" }, { "docid": "9daa23cc8046b67e7f9a85a38d642843", "score": "0.66869", "text": "function send_fixed_email_info($emailto,$subject,$body,$link,$title,$description) {\n global $link, $message, $message_error;\n $conid=$_SESSION['conid'];\n\n $query = <<<EOD\nSELECT\n email\n FROM\n ConRoles\n JOIN UserHasConRole USING (conroleid)\n JOIN Participants USING (badgeid)\n WHERE\n conrolename like '%ZambiaCoord%' AND\n conid=$conid\nEOD;\n\n list($rows,$header_array,$emailfrom_array)=queryreport($query,$link,$title,$description,0);\n for ($i=1; $i<=$rows; $i++) {\n $emailfromlong.=$emailfrom_array[$i]['email'].\",\";\n }\n $emailfrom=rtrim($emailfromlong,\",\");\n\n // Check to see if it is just an email address, or the permrole to be expanded\n if (!strpos($emailto,\"@\")) {\n $newemailaddress=get_emailto_from_permrole($emailto,$link,$title,$description);\n $newemailto=\"$emailto <$newemailaddress>\";\n $emailto=$newemailto;\n }\n\n // Insert into queue, the Zambia Coordinator is the from address, no cc address, status 1 to send\n $element_array=array('emailto','emailfrom','emailcc','emailsubject','body','status');\n $value_array=array($emailto, $emailfrom, '',\n\t\t htmlspecialchars_decode($subject),\n\t\t htmlspecialchars_decode($body),\n\t\t 1);\n $message.=submit_table_element($link, $title, \"EmailQueue\", $element_array, $value_array);\n}", "title": "" }, { "docid": "133c73202daaab9ea2901a457f9015ae", "score": "0.6666511", "text": "public function prepareEmail()\n\t{\n\t\n\t\t// Get email body\n\t\t$body = $this->getBody();\n\t\t\n\t\t// Replace tags\n\t\t$body = $this->replaceTags($body, $this->_data);\n\t\t\n\t\t// Build headers\n\t\t$headers = $this->generateHeaders();\n\t\t\n\t\t// Build Recipients\n\t\tif(count($this->_recipients) > 0)\n\t\t{\n\t\t\t$recipients = implode(\",\", $this->_recipients);\n\t\t}\n\t\t\n\t\treturn $this->sendEmail($recipients, $this->_subject, $body, $headers);\n\t\t\n\t}", "title": "" }, { "docid": "cc2d9392fa839b1006dba2e2b4a161e4", "score": "0.6649237", "text": "function admin_email($obj){ \n\t\t\n\t\t//$obj->from_book\n\t\t$this->email->from($obj->from_book, $obj->name); \n\t\t$this->email->to($obj->to_adm[0]); \n\t\t$this->email->cc($obj->to_adm[1]); \n\t\t\n\t\t \n\t\t$email_msg\t\t =\t\"<p>Dear Mr. Hay Kamine,</p><br />\"; \n\t\t$email_msg\t\t.=\t\"I would like to request a meeting room, the detail of the meeting as below:<br />\"; \n\t\t$email_msg\t\t.=\t\"Date :\".$obj->dates.\" <br />\";\n\t\t$email_msg\t\t.=\t\"Time : \".$obj->s_time.\" - \".$obj->e_time.\" <br />\";\n\t\t$email_msg\t\t.=\t\"Description :\".$obj->descript.\"<br />\";\n\t\t$email_msg\t\t.=\t\"Room number :\".$obj->room_number.\"<br />\";\n\t\t$email_msg\t\t.=\t\"Participants :\".$obj->member.\"<br />\";\n\t\t$email_msg\t\t.=\t\"Requirement :\".$obj->other_requirement.\"<br /><br /><br />\";\n\t\t\n\t\t$email_msg\t\t.=\t\"Regarding,<br />\";\n\t\t$email_msg\t\t.=\t$obj->name.\"<br />\";\n\t\t \n\t\t\n\t\t$this->email->subject($obj->title);\n\t\t$this->email->message($email_msg); \n\t\t$this->email->send(); \n\t\t\t\t \n\t}", "title": "" }, { "docid": "0c642fbb46e57f867bc86ccf9e3096d3", "score": "0.66257817", "text": "function email_free_account_details($member_id) {\n \n $member = db_get_single_row(\"select * from member_user where id =\" . $member_id);\n \n $emailaddress = $member['email'];\n //$site_address = SITE_ADDRESS . (substr(SITE_ADDRESS, -1) == '/') ? '' : '/';\n $link = $site_address; \n \n $body = '<p>Welcome to ProDentalCPD.</p><p>Thank you for signing up to your account.</p>' .\n '<p>Your username is: ' . $member['username'] . '</p>' .\n '<p>Please keep this in a safe place so you can always access your account. If you ever forget your password then this can be retrieved at any point from the website as long as you have your username and this email address.</p>' .\n \"<p>Thank you, the ProDentalCPD team</p><p><a href=\\\"$link\\\">$link</a></p>\" ;\n \n $body_text = strip_tags(str_replace('</p>', \"\\r\\n\", $body));\n $from_email_address = '[email protected]';\n $this->send_mail($emailaddress, SITE_NAME, $from_email_address, 'Your Account Activation', $body, $body_text);\n }", "title": "" }, { "docid": "524adab08efb60edb7ba4a5438835cca", "score": "0.6608013", "text": "function done_email($obj){\n\t\t \n\t\t$this->email->from($obj->from, $obj->name); \n\t\t$this->email->to($obj->to);\n\t\t//$this->email->cc($from);\n\t\t//$this->email->bcc('[email protected]');\n\t\t\n\t\t \n\t\t$email_msg\t\t =\t\"<p>Have been fixed, Please kindly checking.<br />\"; \n\t\t$email_msg\t\t.=\t\"Open Date: \".$obj->open_date.\"</p>\"; \n\t\t$email_msg\t\t.=\t\"Ticket No #\".$obj->ticket_number.\" <br />\";\n\t\t$email_msg\t\t.=\t\"Subject \".$obj->title.\" <br />\";\n\t\t$email_msg\t\t.=\t\"Description :\".$obj->ticket_detail.\"<br />\";\n\t\t\n\t\t$email_msg\t\t.=\t\"Regarding,<br />\";\n\t\t$email_msg\t\t.=\t$obj->name.\"<br />\";\n\t\t \n\t\t\n\t\t$this->email->subject(\"Ticket: \".$obj->title);\n\t\t$this->email->message($email_msg);\n\t\t$this->email->send(); \n\t}", "title": "" }, { "docid": "6f0995d377bd904f7125357937d2ae7b", "score": "0.65968084", "text": "public function sendMail();", "title": "" }, { "docid": "06c3e85d39689ed43a508f171d15cf6c", "score": "0.65690196", "text": "public static function sendEmail($data) { \r\n // Get the User data to see if we add in the SOR info\r\n // First, Parse out who its going to based on request type\r\n $user = Auth::getUser();\r\n\r\n switch ($data['requestType']){\r\n case 'saleable':\r\n case 'supplies':\r\n // Live address\r\n $to = '[email protected]';\r\n \r\n // Testing address\r\n //$to = '[email protected]';\r\n break;\r\n case 'parts':\r\n // Live addresses\r\n \t$to = '[email protected]';\r\n \t$cc[] = '[email protected]';\r\n \r\n //Testing addresses\r\n //$to = '[email protected]';\r\n \t//$cc[] = '[email protected]';\r\n \tbreak;\r\n default :\r\n // Live address\r\n $to = '[email protected]';\r\n \r\n // Testing address\r\n //$to = '[email protected]';\r\n // $cc[] = NULL;\r\n }\r\n \r\n // Now add the email addresses of the store\r\n // Get all stores from the database\r\n $allStores = Helpers::getStores();\r\n // parse the store from the data array\r\n $storeForm = ucfirst(preg_replace( \"/[^a-z]/i\", \"\", $data['fromStore']));\r\n foreach ($allStores as $store) {\r\n if ($store['storeName'] == $storeForm) {\r\n $cc[] = $store['storeEmail'];\r\n $storeAddress = $store['storeAddress'];\r\n }\r\n } \r\n // Build the HTML version of the email\r\n $partCount = count($data['partNum']);\r\n if ($data['return'] == '1'){\r\n $msgHeader = '<h1 style=\"color:red;\">THIS IS A RETURN</h1><br />';\r\n }\r\n else{\r\n $msgHeader = '';\r\n }\r\n $msgHeader .= '<b>Store: &emsp;</b>' . $storeForm . '<br />';\r\n $msgHeader .= '<b>Store address: &emsp;</b>' . 'Chet&#39;s Rent All - ' . $storeAddress . '<br />';\r\n $msgHeader .= '<b>Requestor: &emsp;</b>' . $data['requestor'] .'<br />';\r\n $msgHeader .= '<b>Work Order Number: &emsp;</b>' . $data['workOrder'] . '<br />';\r\n $msgHeader .= '<b>Cat-Item: &emsp;</b>' . $data['machineCat'] .'-'. $data['machineItem'] . '<br />';\r\n $msgHeader .= '<b>Item Description: &emsp;</b>' . $data['machineDesc'] . '<br />';\r\n $msgHeader .= '<b>Requested Vendor: &emsp;</b>' . $data['vendor'] . '<br />';\r\n $msgHeader .= '<b>Date Needed: &emsp;</b>' . $data['date'] . '<br />';\r\n $msgHeader .= '<b>Date Ordered: &emsp;</b>' . date(DATE_RFC2822) . '<br />';\r\n $msgHeader .= \"<b>Request Type: &emsp;</b>\" . $data['requestType'] . '<br />';\r\n if ($data['return'] == '1'){\r\n $msgHeader .= \"<b>Original P.O.: &emsp;</b>\" . $data['oldPO'] . '<br />';\r\n $msgHeader .= '<h1 style=\"color:red;\">THIS IS A RETURN</h1><br />';\r\n }\r\n\r\n\r\n\r\n // added on 07-12-2017 for Suggested Order Report\r\n if ($user->is_storeManager and ($data['requestType'] == 'parts' or $data['requestType']== 'saleable')){\r\n if ($data['add_SOR'] == '1'){\r\n $msgHeader .= '<b>Add to Suggested Order Report: &emsp;</b>' . \"Yes\" . \"\\r\\n\";\r\n }\r\n }\r\n\r\n\r\n $msgFooter = '<b>Comments: </b><br />' . $data['comments'] . '<br />';\r\n \r\n $msg = '<table border=\"1\"><tr><b><td>Part Number</td><td>Cat #</td><td>Item #</td><td>Description</td><td>Quantity</td><td>Unit Of Measure</td></b></tr>';\r\n for ($i = 0; $i<$partCount; $i++){\r\n\t$msg.= \"<tr>\";\r\n\t$msg.= \"<td>\". strtoupper($data['partNum'][$i]) . \"</td>\";\r\n\t$msg.= \"<td>\". strtoupper($data['catNum'][$i]) . \"</td>\";\r\n\t$msg.= \"<td>\". strtoupper($data['itemNum'][$i]) . \"</td>\";\r\n\t$msg.= \"<td>\". strtoupper($data['desc'][$i]) . \"</td>\";\r\n\t$msg.= \"<td>\". strtoupper($data['quantity'][$i]) . \"</td>\";\r\n\t$msg.= \"<td>\". strtoupper($data['unit'][$i]) . \"</td>\";\r\n\t$msg.= \"</tr>\";\r\n }\r\n $msg.=\"</table>\";\r\n \r\n // Build the text version of the email incase HTML is blocked\r\n $textHeader = \"This message looks better if you enable HTML emails \\r\\n\";\r\n if ($data['return'] == \"1\"){\r\n $textHeader .= \"!!! THIS IS A RETURN !!! \\r\\n\";\r\n }\r\n $textHeader .= \"Store: \" . $storeForm . \"\\r\\n\";\r\n $textHeader .= 'Store address: Chet\\'s Rent All - ' . $storeAddress. \"\\r\\n\";\r\n $textHeader .= 'Requestor: ' . $data['requestor'] . \"\\r\\n\";\r\n $textHeader .= 'Work order number: ' . $data['workOrder'] . \"\\r\\n\";\r\n $textHeader .= 'Cat - Item: ' . $data['machineCat'] . '-' . $data['machineItem'] . \"\\r\\n\";\r\n $textHeader .= 'Item description: ' . $data['machineDesc'] . \"\\r\\n\";\r\n $textHeader .= 'Requested vendor: ' . $data['vendor'] . \"\\r\\n\";\r\n $textHeader .= 'Date ordered: ' . date(DATE_RFC2822) . \"\\r\\n\";\r\n $textHeader .= 'Date needed: ' . $data['date'] . \"\\r\\n\";\r\n $textHeader .= 'Request Type: ' . $data['requestType'] . \"\\r\\n\";\r\n if ($data['return'] == '1'){\r\n $textHeader .= \"Original P.O.: \" . $data['oldPO'] . \"\\r\\n\";\r\n $textHeader .= \"!! THIS IS A RETURN !!! \\r\\n\";\r\n }\r\n\r\n //Added on 07-12-2017 for the Suggested Order Report\r\n if ($user->is_storeManager and ($data['requestType'] == 'parts' or $data['requestType']== 'saleable')){\r\n if ($data['add_SOR'] == '1'){\r\n $textHeader .= 'Add to Suggested Order Report: ' . \"Yes\" . \"\\r\\n\";\r\n }\r\n }\r\n $textHeader .= \"!!! THIS IS A RETURN !!! \\r\\n\";\r\n\r\n\r\n $textFooter = 'Comments: ' . $data['comments'] . \"\\r\\n\";\r\n \r\n $textBody = \"Part Number Cat # Item # Description Quantity Unit Of Measure \\r\\n\";\r\n \r\n for ($i = 0; $i<$partCount; $i++){\r\n $textBody.= strtoupper($data['partNum'][$i]) . ' ';\r\n $textBody.= strtoupper($data['catNum'][$i]) . ' ';\r\n $textBody.= strtoupper($data['itemNum'][$i]) . ' ';\r\n $textBody.= strtoupper($data['desc'][$i]) . ' ';\r\n $textBody.= strtoupper($data['quantity'][$i]) . ' ';\r\n $textBody.= strtoupper($data['unit'][$i]) . ' ';\r\n }\r\n if ($data['return'] == '1'){\r\n $subject = 'RETURN Request';\r\n }\r\n else {\r\n $subject = 'New Purchase Request';\r\n }\r\n $text = $textHeader . $textBody . $textFooter;\r\n $html = $msgHeader . $msg . $msgFooter;\r\n\r\n \r\n Mail::send($to, $subject, $text, $html, $cc); \r\n \r\n }", "title": "" }, { "docid": "f0d43438c34da6ded3632e8cc92bd35e", "score": "0.6563686", "text": "function queMail($to,$cc,$subject,$message,$html) {\n\tglobal $trailSessionUser,$datetime;\n\tmysqlquery(\"insert into vl_daemon_email \n\t\t\t\t\t(fromName,fromAddress,toAddress,ccAddress,subject,message,html,created,createdby) \n\t\t\t\t\tvalues \n\t\t\t\t\t('Issue Tracker','[email protected]','$to','$cc','\".ereg_replace(\"'\",\"\\'\",$subject).\"','\".ereg_replace(\"'\",\"\\'\",$message).\"','$html','$datetime','$trailSessionUser')\");\n}", "title": "" }, { "docid": "c0899acb936338227549f13f0a20ac35", "score": "0.6536705", "text": "function Manual_Mailer($owner, $srq_user, $srq_user_email){\n\t//check to make sure admin is logged in\n\tsession_start();\n\tif (!isset($_SESSION[\"admin\"])) {\n\t header(\"Location: /itsrq/login.php?url=\" . urlencode($_SERVER[\"SCRIPT_NAME\"]) . \"?action=\" . urlencode($_REQUEST['action']) . \"&post_ID=\" . urlencode($_REQUEST['post_ID']));\n\t}\n\tsrqheader($owner);//create logo banner at top of page\n\t//setup menu under logo banner\n\tdiv_beg(\"id_menu\");\n anchor(\"it_srq.php?action=Admin\", \"Back To Admin Panel\", \"clamenuitem\");\n anchor(\"http://pcsfamily.org/index.php?section=160\", \"Back To $owner&#39;s Request System Home\", \"clamenuitem\");\n div_end();\n br();\n hr();\n//set the php.ini file to be able to send emails\n// -to do this you HAVE to change the SMTP setting\n// the smtp_port's default is \"25\"\nini_set(\"SMTP\", \"exchange.peoriachristian.org\");\nini_set(\"smtp_port\", \"25\");\n\n//Creates the list of people to send the email to as designated in users.php\n// !!! - WILL EVENTUALLY CHANGE TO CONFIG.PHP, BE SURE TO CHANGE THIS - !!!\n//foreach ($srq_user_email as $key => $value) {\n// $MailTo .= \"[email protected], \";\n//}\n\n\n$MailTo = $_REQUEST['MailTo'];\n//for debug and echo confirmation...\necho $MailTo;\n\n$MailSubject = $_REQUEST['MailSubject'];\n$MailBody = $_REQUEST['MailBody'];\n$MailHeader = 'From: [email protected]';\n$SuccessMsg = 'Your message has been forwarded to the requested party.';\n$FailureMsg = 'There has been a problem forwarding your message to the requested party.\n\t\t\tPlease resend your message. We apologize for this\n\t\t\tinconvenience.';\n$IncompleteMsg = 'You left out some required data. <strong>Please click the Back button\n\t\t\ton your browser to return to the \n\t\t\tInformation Request Form.</strong> Then complete all required data and resubmit the form.\n\t\t\tIt seems you did not complete the following: ';\n\n$Data = '###############Start of Record##################'. \"\\n\\n\";\n\n##############This small function tests to make sure data is ok and returns errors where appropriate.\nfunction ListAll($aVal, $aKey, &$List)\n{\n\tglobal $Incomplete;\tif(($aVal == '') && (stristr($_POST['Required'],$aKey)))\n\t{\n\t\t$Incomplete = $Incomplete.$aKey.', ';\n\t}\n\t$List = $List.$aKey.' = '.$aVal.\"\\n\";\n}//endfunction\n##############\n$Success = array_walk($_POST, 'ListAll', &$Data);\nif($Success)\n{\n\tif($Incomplete == '')\n\t{\n\t\t//#####This actually sends the message after it passes all the tests.\n\t\tif(mail($MailTo,$MailSubject,$MailBody,$MailHeader))\n\t\t{\n\t\t\techo \"<p>$SuccessMsg</p>\";\n\t\t\techo $Incomplete;\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo \"<p>$FailureMsg (mail failure)</p>\";\n\t\t}//endif\n\t}\n\telse\n\t{\n\t\techo \"<p>$IncompleteMsg <br><br> $Incomplete</p>\";\n\t}//endif\n}\nelse\n{\t\n\techo \"<p>$FailureMsg (array_walk failure)</p>\";\n}//endif\n\n//end body and html tags\n\tbody_end();\n\thtml_end();\n\n}", "title": "" }, { "docid": "4eb8ce4b59e7b250f43be7d095379ad9", "score": "0.6535128", "text": "function change_email()\r\n\t{\r\n\t\t\r\n\t}", "title": "" }, { "docid": "7b058875efe55d4245e9eba5a3b222b1", "score": "0.65326107", "text": "function email_admin($id='',$content,$extra=''){\r\n\t$admin = mysql_fetch_array(mysql_query(\"select * from `tblAdmin` Where `AdminID`='1'\"));\r\n\t$admin_user = md5($admin[\"AdminUser\"]);\r\n\t$admin_pass = md5($admin[\"AdminPass\"]);\r\n\tif($extra != \"\") $extra .= \": \";\r\n /* subject */\r\n\t $subject = $extra.\"New Icident - Incident ID \".$id;\r\n /* message */\r\n\t$message = '<html><head></head><body><font face=arial size=2>\r\n\tThis is your new Incident ID: '.$id.'<br><br>\r\n\t'.stripslashes($content).'<br><br>\r\n\tClick here to reply&nbsp;&nbsp;<a href=\"'.SITEURL.'admin/edit_ticket.php?idticket='.$id.'&user='.$admin_user.'&pass='.$admin_pass.'\">'.SITEURL.'admin/edit_ticket.php?idticket='.$id.'</a>\r\n\t<br><br></font></body></html>';\r\n\t// To send HTML mail, the Content-type header must be set\r\n\t\t$headers = \"MIME-Version: 1.0\\n\" .\r\n\t\t \"Content-type: text/html; charset=iso-8859-1\\n\" .\r\n\t\t \"From: \".SITEEMAIL.\" <\".SITEEMAIL.\"> \\n\";\r\n\t// Mail it\r\n\tif(mail(ADMINEMAIL, $subject, $message, $headers)){\r\n\t\treturn true;\r\n\t}else{\r\n\t\treturn false;\r\n\t}\r\n}", "title": "" }, { "docid": "444778e50ee5c7e41451143f0b41413c", "score": "0.6516905", "text": "function send_email($goingto, $toname, $sbj, $messg) \n{\n\tglobal $Config;\n\tdefine('DISPLAY_XPM4_ERRORS', true); // display XPM4 errors\n\t$core_em = $Config->get('site_email');\n\t\t\n\t// If email type \"0\" (SMTP)\n\tif($Config->get('email_type') == 0) \n\t{ \n\t\trequire_once 'core/mail/SMTP.php'; // path to 'SMTP.php' file from XPM4 package\n\n\t\t$f = ''.$core_em.''; // from mail address\n\t\t$t = ''.$goingto.''; // to mail address\n\n\t\t// standard mail message RFC2822\n\t\t$m = 'From: '.$f.\"\\r\\n\".\n\t\t\t'To: '.$t.\"\\r\\n\".\n\t\t\t'Subject: '.$sbj.\"\\r\\n\".\n\t\t\t'Content-Type: text/plain'.\"\\r\\n\\r\\n\".\n\t\t\t''.$messg.'';\n\n\t\t$h = explode('@', $t); // get client hostname\n\t\t$c = SMTP::MXconnect($h[1]); // connect to SMTP server (direct) from MX hosts list\n\t\t$s = SMTP::Send($c, array($t), $m, $f); // send mail\n\t\t// print result\n\t\tif ($s) output_message('success', 'Mail Sent!');\n\t\telse output_message('error', print_r($_RESULT));\n\t\tSMTP::Disconnect($c); // disconnect\n\t}\n\telseif($Config->get('email_type') == 1) \t// If email type \"1\" (MIME)\n\t{\n\t\trequire_once 'core/mail/MIME.php'; // path to 'MIME.php' file from XPM4 package\n\n\t\t// compose message in MIME format\n\t\t$mess = MIME::compose($messg);\n\t\t// send mail\n\t\t$send = mail($goingto, $sbj, $mess['content'], 'From: '.$core_em.''.\"\\n\".$mess['header']);\n\t\t// print result\n\t\techo $send ? output_message('success', 'Mail Sent!') : output_message('error', 'Error!');\n\t}\n\telseif($Config->get('email_type') == 2)\t// If email type \"2\" (MTA Relay)\n\t{\n\t\trequire_once 'core/mail/MAIL.php'; // path to 'MAIL.php' file from XPM4 package\n\n\t\t$m = new MAIL; // initialize MAIL class\n\t\t$m->From($core_em); // set from address\n\t\t$m->AddTo($goingto); // add to address\n\t\t$m->Subject($sbj); // set subject \n\t\t$m->Html($messg); // set html message\n\n\t\t// connect to MTA server 'smtp.hostname.net' port '25' with authentication: 'username'/'password'\n\t\tif($Config->get('email_use_secure') == 1) \n\t\t{\n\t\t\t$c = $m->Connect($Config->get('email_smtp_host'), $Config->get('email_smtp_port'), $Config->get('email_smtp_user'), $Config->get('email_smtp_pass'), $Config->get('email_smtp_secure')) \n\t\t\t\tor die(print_r($m->Result));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$c = $m->Connect($Config->get('email_smtp_host'), $Config->get('email_smtp_port'), $Config->get('email_smtp_user'), $Config->get('email_smtp_pass')) \n\t\t\t\tor die(print_r($m->Result));\n\t\t}\n\n\t\t// send mail relay using the '$c' resource connection\n\t\techo $m->Send($c) ? output_message('success', 'Mail Sent!') : output_message('error', 'Error! Please check your config and make sure you inserted your MTA info correctly.');\n\n\t\t$m->Disconnect(); // disconnect from server\n\t\t// print_r($m->History); // optional, for debugging\n\t}\n}", "title": "" }, { "docid": "c8aa92539a92ef63eeef77e315bf74e7", "score": "0.65150577", "text": "public function sendemailToforwarder(){\n\n\t if(isset($this->getData['forwarder_notify']) && $this->getData['forwarder_notify']==1 && !empty($this->getData['forwarder_email'])){\n\n\t $parceldetails = $this->parceldetails(false);\n\n\t $parcel_number = $parceldetails[TRACENR_BARCODE];\n\n\t $mailOBj = new Zend_Custom_MailManager();\n\n\t $email_text = $this->getData['description'];\n\n\t $email_text .= '<br>Parcel number : '.$parcel_number;\n\n\t $mailOBj->emailData['SenderEmail'] = '[email protected]';\n\n\t $mailOBj->emailData['SenderName'] = 'NOREPLY';\n\n\t $mailOBj->emailData['Subject'] = 'Help';\n\n\t $mailOBj->emailData['MailBody'] = $email_text;\n\n\t $mailOBj->emailData['ReceiverEmail'] = commonfunction::trimString($this->getData['forwarder_email']);\n\n\t $mailOBj->emailData['ReceiverName'] = '';\n\n $mailOBj->emailData['user_id'] = $this->Useconfig['user_id'];\n\n\t $mailOBj->emailData['notification_id'] = 0;\n\n $mailOBj->Send();\n\n\t }\n\n\t return true;\n\n\t}", "title": "" }, { "docid": "a4988c53a0b1b6736158033bbfae7fed", "score": "0.6500253", "text": "function __emailer($email = '', $vars = array())\n {\n\n profiling(__function__, __line__, \"emailer started - vars: \" . json_encode($vars), '');\n\n //general vars\n $vars['todays_date'] = $this->data['vars']['todays_date'];\n $vars['email_signature'] = $this->data['settings_company']['company_email_signature'];\n\n //new client welcom email-------------------------------\n if ($email == 'new_client_welcome_client') {\n\n //get message template from database\n $template = $this->settings_emailtemplates_model->getEmailTemplate('new_client_welcome_client');\n \n\n //exit if email is not enabled\n if ($template['status'] != 'enabled') {\n return;\n }\n\n //additional vars\n $vars['to_name'] = $this->input->post('client_users_full_name');\n $vars['to_email'] = $this->input->post('client_users_email');\n $vars['username'] = $this->input->post('client_users_email');\n $vars['password'] = $this->input->post('client_users_password');\n $vars['url_dashboard'] = $this->data['vars']['site_url_client'];\n $vars['email_signature'] = $this->data['settings_company']['company_email_signature'];\n\n //parse email\n $email_message = parse_email_template($template['message'], $vars);\n\n //debug\n $this->data['email_vars'] = $vars;\n profiling(__function__, __line__, \"emailer - client email: \" . json_encode($vars), '');\n\n //send email now\n email_default_settings(); //defaults (from emailer helper)\n $this->email->to($vars['to_email']);\n $this->email->subject($template['subject']);\n $this->email->message($email_message);\n $this->email->send();\n //log this\n $this->__emailLog($vars['to_email'], $template['subject'], $email_message);\n }\n\n //new client welcom email-------------------------------\n if ($email == 'new_client_admin') {\n\n //get message template from database\n $template = $this->settings_emailtemplates_model->getEmailTemplate('new_client_admin');\n \n\n //exit if email is not enabled\n if ($template['status'] != 'enabled') {\n return;\n }\n\n //send email to multiple admins\n for ($i = 0; $i < count($this->data['vars']['mailinglist_admins_full']); $i++) {\n\n //additional vars\n $vars['to_name'] = $this->data['vars']['mailinglist_admins_full'][$i]['name'];\n $vars['to_email'] = $this->data['vars']['mailinglist_admins_full'][$i]['email'];\n $vars['url_dashboard'] = $this->data['vars']['site_url_admin'];\n $vars['clients_email'] = $this->input->post('client_users_email');\n $vars['clients_full_name'] = $this->input->post('client_users_full_name');\n $vars['clients_company_name'] = $this->input->post('clients_company_name');\n\n //parse email\n $email_message = parse_email_template($template['message'], $vars);\n\n //debug\n $this->data['email_vars'] = $vars;\n profiling(__function__, __line__, \"emailer - admin email: \" . json_encode($vars), '');\n\n //send email now\n email_default_settings(); //defaults (from emailer helper)\n $this->email->to($vars['to_email']);\n $this->email->subject($template['subject']);\n $this->email->message($email_message);\n $this->email->send();\n //log this\n $this->__emailLog($vars['to_email'], $template['subject'], $email_message);\n }\n }\n\n }", "title": "" }, { "docid": "f75b89a3900c7b80f90c930ed5d89dd6", "score": "0.6496006", "text": "public function emailRecipient();", "title": "" }, { "docid": "e472dfaf15ea2c2f3a1027afb6092887", "score": "0.64901745", "text": "public function sendMailToAdmins(){\n $emails = getDataCodeBySql('setting_register_email', 'db_setting', '', '');\n// debug($emails);\n $email_array = explode(',', $emails);\n// foreach\n $htmlBody = \"<p>\n {$this->partner_last_name} {$this->partner_first_name} from {$this->partner_company_name} have registered for an account. <br>Please <a href = '\".webroot.\"admin/partner.php'>login<a/> to approve registration.\n </p><br><i>This is an auto-generated mail from www.hydraulic-engineer.net</i>\";\n sendEmail(array(\n 'to'=> $email_array,\n 'body'=>$htmlBody,\n 'html'=> true,\n 'noreply'=>true\n ));\n }", "title": "" }, { "docid": "6f97fc389b95510dfc6f71f706d8eec2", "score": "0.64870495", "text": "function preregister_email($to, $from)\n {\n $headers = 'From: ' . $from . \"\\r\\n\" .\n 'Reply-To: [email protected]' . \"\\r\\n\" .\n 'X-Mailer: PHP/' . phpversion();\n $headers .= 'MIME-Version: 1.0' . \"\\r\\n\";\n $headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\n $message = \"<!DOCTYPE html>\n<!DOCTYPE html>\n<html xmlns='http://www.w3.org/1999/xhtml'>\n<head>\n <meta http-equiv='Content-Type' content='text/html; charset=utf-8'>\n <meta name='viewport' content='width=320; initial-scale=.55; user-scalable=no;'>\n <title>Welcome to Urlinq</title>\n <style type='text/css'>\n body {\n margin: 0;\n padding: 0;\n min-width: 100% !important;\n }\n\n .content {\n width: 100%;\n max-width: 600px;\n padding-left: 10px;\n padding-right: 10px;\n }\n\n .header {\n padding: 0 20px 20px 0;\n }\n\n @media (max-width: 500px) {\n .emailLogo {\n height: 50px !important;\n }\n\n .mobileGetBigP {\n font-size: 25.5px !important;\n }\n\n .mobileGetBigA {\n font-size: 30.5px !important;\n }\n }\n\n\n </style>\n</head>\n<body bgcolor='#fff'>\n<table width='100%' bgcolor='#fff' border='0' cellpadding='0' cellspacing='0'>\n <tbody>\n <tr>\n <td>\n <table class='content' align='center' cellpadding='0' cellspacing='0' border='0'\n style='border-bottom:1px solid #e9e9e9;'>\n <tbody>\n <tr>\n <td width='600' height='70' style=' height: auto; padding: 20px 0 9px;'>\n <img class='emailLogo' src='http://urlinq.com/beta/emailImg/grayLogo.png' height='36'\n style='margin-left:5px;' border='0' alt=''>\n </td>\n </tr>\n </tbody>\n </table>\n <table class='content' align='center'\n style='border-spacing:0; vertical-align:top; text-align:left;width:100%;padding:36px 0 0; margin:0 auto;'>\n <tbody>\n <tr style='vertical-align:top;text-align:left;padding:0' align='center'>\n <td style='border-collapse:collapse!important;vertical-align:top;text-align:left;padding:0'\n align='center' valign='top'>\n <img src='http://urlinq.com/beta/emailImg/squareLogo.png'\n style='border-radius:0px; display:block;margin:0 auto;border:0'\n alt='Navigate the Universiy.' align='center' width='105' height='105'>\n </td>\n </tr>\n </tbody>\n </table>\n <table class='content' align='center'\n style='border-spacing:0;vertical-align:top;text-align:inherit;margin:0 auto;padding:24px 35px 10px;width:570px!important'>\n <tbody>\n <tr style='vertical-align:top;text-align:left;padding:0;' align='center'>\n <td style='border-collapse:collapse!important;vertical-align:top;text-align:left;padding:0'\n align='center' valign='top'>\n <p class='mobileGetBigP'\n style='color:#2a2a2a;display:block;font-family: Lucida Grande,Lucida Sans,Lucida Sans Unicode,Arial,Helvetica,Verdana,sans-serif;font-weight:normal;text-align:left;line-height:1.714em;font-size: 16.5px;margin:0 auto;padding: 0 0 10px;'\n align='center'>\n <span style='margin-top:10px;display:block;'>\n Welcome to Urlinq! Thank you for joining our pre-registration list. We will keep you updated over the next few weeks as the Urlinq academic network is released. In the meantime, feel free to read up on what we've been creating on our blog.\n </span>\n </p>\n </td>\n\n </tr>\n <tr style='vertical-align:top;text-align:left;padding:0;' align='center'>\n <td style='border-collapse:collapse!important;vertical-align:top;text-align:left;padding:0'\n align='center' valign='top'>\n <a href='https://urlinq.com/blog' class='mobileGetBigA' style='font-family: Lucida Grande,Lucida Sans,Lucida Sans Unicode,Arial,Helvetica,Verdana,sans-serif;border:1px solid;display:block;padding:14px 16px;text-decoration:none;border-radius: 2px;text-align:center;color:white!important;font-weight:bold;font-size:18.5px;white-space:nowrap;\n margin:0 auto;margin-top:.25em;cursor:pointer;background-color: rgb(0,217,160); border-bottom: 3px solid rgb(8, 184, 138);'>\n View Our Blog\n </a>\n </td>\n </tr>\n <tr style='vertical-align:top;text-align:left;padding:0;' align='center'>\n <td style='border-collapse:collapse!important;vertical-align:top;text-align:left;padding:0;padding-top: 16px;'\n align='center' valign='top'>\n <p class='mobileGetBigP' style='\n color: #2a2a2a; display: block; font-family: Lucida Grande,Lucida Sans,Lucida Sans Unicode,Arial,Helvetica,Verdana,sans-serif; font-weight: normal; text-align: left; line-height: 1.714em; font-size: 16.5px; margin: 0 auto; padding: 0 0 10px;\n '>If you don't see the button above, <a href='https://urlinq.com/blog' style='\n color: rgb(0,217,160);\n cursor: pointer;\n '>click here</a></p>\n </td>\n </tr>\n <tr style='vertical-align:top;text-align:left;padding:0;' align='center'>\n <td style='border-collapse:collapse!important;vertical-align:top;text-align:left;padding:0'\n align='center' valign='top'>\n <p class='mobileGetBigP'\n style='color:#2a2a2a;display:block;font-family: Lucida Grande,Lucida Sans,Lucida Sans Unicode,Arial,Helvetica,Verdana,sans-serif;font-weight:normal;text-align:left;line-height:1.714em;font-size: 16.5px;margin:0 auto;margin-top: .25em;padding: 0 0 10px;'\n align='center'>\n Thanks,\n <span style='margin-top:5px;display:block;'>\n The Urlinq Family\n </span>\n </p>\n </td>\n\n </tr>\n </tbody>\n </table>\n <table width='600' class='content' align='center' cellpadding='0' cellspacing='0' border='0'\n style='padding-top:0px;vertical-align:top;margin:0 auto; border-top:1px solid #e9e9e9'>\n <tbody>\n <tr style='margin:0;padding:0;display: block;width: 84px;margin: 0 auto;padding-top: 12px;'>\n <td style='max-width: 30px; margin:0;padding:5px;white-space: nowrap;'>\n <a title='Facebook' href='https://facebook.com/joinurlinq'\n style='margin:0;text-decoration:none;color:#999999;padding:0;'>\n <img alt='Facebook' height='18' width='18' style='' 'margin:0;padding:0;border:0;'=''\n src='http://urlinq.com/beta/emailImg/fb_email_icon.png'>\n </a>\n </td>\n <td style='width:30px; margin:0;padding:5px;'>\n <a title='Google Plus' href='https://plus.google.com/+urlinq'\n style='margin:0;text-decoration:none;color:#999999;padding:0;'>\n <img alt='Google Plus' height='17' width='17' style='' 'margin:0;padding:0;border:0;'=''\n src='http://urlinq.com/beta/emailImg/plus_email_icon.png'>\n </a>\n </td>\n <td style='width:30px; margin:0;padding:5px;'>\n <a title='Twitter' href='https://twitter.com/urlinq'\n style='margin:0;text-decoration:none;color:#999999;padding:0;'>\n <img alt='Twitter' height='17' width='17' style='' 'margin:0;padding:0;border:0;'=''\n src='http://urlinq.com/beta/emailImg/twitter_email_icon.png'>\n </a>\n </td>\n </tr>\n <tr style='vertical-align:top;text-align:left;padding:0;'>\n <td height='70'\n style='border-collapse: collapse!important; vertical-align:top; text-align:left; height: auto; padding: 0px; padding-top: 0px;'>\n <p style='color:#999999;font-size:9px;width:340px;text-align:center;font-family:Lucida Grande,Lucida Sans,Lucida Sans Unicode,Arial,Helvetica,Verdana,sans-serif;font-weight:normal;line-height:1.714em;margin:0 auto;padding:12px 0 10px;'\n align='center'>\n This email was sent to <span>$to</span>.\n <br>\n <br>\n TM and copyright © 2014 Urlinq LLC. New York City.\n\n </p>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n</table>\n\n\n</body>\n</html>\";\n $subject = \"Welcome to Urlinq\";\n mail($to, $subject, $message, $headers);\n }", "title": "" }, { "docid": "31af76c76a04eeb1fd6d66dcf3f20e49", "score": "0.647853", "text": "function sendInfoMail()\t{\n\t\tif ($this->conf['infomail'] && $this->conf['email.']['field'])\t{\n\t\t\t$fetch = $this->feUserData['fetch'];\n\n\t\t\tif (isset($fetch))\t{\n\t\t\t\t$pidLock=' AND pid IN ('.$this->thePid.') ';\n\n\t\t\t\t\t// Getting records\n\t\t\t\tif ( $this->theTable == 'fe_users' && t3lib_div::testInt($fetch) )\t{\n\t\t\t\t\t$DBrows = $GLOBALS['TSFE']->sys_page->getRecordsByField($this->theTable,'uid',$fetch,$pidLock,'','','1');\n\t\t\t\t} elseif ($fetch) {\t// $this->conf['email.']['field'] must be a valid field in the table!\n\t\t\t\t\t$DBrows = $GLOBALS['TSFE']->sys_page->getRecordsByField($this->theTable,$this->conf['email.']['field'],$fetch,$pidLock,'','','100');\n\t\t\t\t}\n\t\t\t\t\t// Processing records\n\t\t\t\tif (is_array($DBrows))\t{\n\t\t\t\t\t$recipient = $DBrows[0][$this->conf['email.']['field']];\n\t\t\t\t\t$this->compileMail('INFOMAIL', $DBrows, trim($recipient), $this->conf['setfixed.']);\n\t\t\t\t} elseif ($this->cObj->checkEmail($fetch)) {\n\t\t\t\t\t$fetchArray = array( '0' => array( 'email' => $fetch));\n\t\t\t\t\t$this->compileMail('INFOMAIL_NORECORD', $fetchArray, $fetch);\n\t\t\t\t}\n\n\t\t\t\t$content = $this->getPlainTemplate('###TEMPLATE_'.$this->infomailPrefix.'SENT###', (is_array($DBrows)?$DBrows[0]:''));\n\t\t\t} else {\n\t\t\t\t$content = $this->getPlainTemplate('###TEMPLATE_INFOMAIL###');\n\t\t\t}\n\t\t} else {\n\t\t\t$content='Configuration error: infomail option is not available or emailField is not setup in TypoScript';\n\t\t}\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "f18b5413f4fcdaccc5ef50f7893cc9b8", "score": "0.6478244", "text": "public function _sendMail()\n { }", "title": "" }, { "docid": "7d47c086bbc11f06ed7c92a9b7d3f8b6", "score": "0.64764297", "text": "public function onEmail();", "title": "" }, { "docid": "e0732998517348d57a8c7265a9e3af4d", "score": "0.6461963", "text": "function welcomeMail ($toMail, $eveID, $auth)\n{\n\t$subject = getMailForm(1, true);\n\t\n\t$headers = \"From: Diving 2000 <[email protected]>\\r\\n\";\n\t$headers .= \"Reply-To: [email protected]\\r\\n\";\n\t//$headers .= \"CC: [email protected]\\r\\n\";\n\t$headers .= \"MIME-Version: 1.0\\r\\n\";\n\t$headers .= \"Content-Type: text/html; charset=ISO-8859-1\\r\\n\";\n\n\n\t$message = '<html><body>';\n\t\n\t$besked = getMailForm(1, false);\n\t$replace = '<a href=\"http://kalender.diving2000.dk/confirm.php?eID=' . $eveID . '&auth=' . $auth . '\">http://kalender.diving2000.dk/confirm.php?eID=' . $eveID . '&auth=' . $auth . '</a>';\n\t$besked = str_replace(\"%system-data%\", $replace, $besked);\n\t\n\t$message .= $besked;\n\t$message .= '</body></html>';\n\n\tmail($toMail, $subject, $message, $headers);\n\t\t\n}", "title": "" }, { "docid": "d77c57bf76a7173e8d485a119a572e29", "score": "0.6460627", "text": "function email()\n\t{\n\t\tif (isset($this->params['email']))\n\t\t{\n\t\t\tif ((strlen($this->params['email']) > 0) && (strlen($this->params['email']) <= 255))\n\t\t\t{\n\t\t\t\treturn \"<email>\" . $this->params['email'] . \"</email>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->error_messages[] .= 'Email must be up to 255 characters in length';\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "8e89b028fd633d292bed41709a12e616", "score": "0.6455265", "text": "function build_rsvp_confirmation_email ($user_to, $post_title, $event_date, $event_time, $post_url, $rsvp_event, $upcoming_events) {\n\t\n\t\t$slug = $this->slug_rsvp_conf_post; // TODO: Move this into settings.\n\t\t\t\n\t\t$my_post = get_page_by_path($slug, OBJECT, 'post');\n\t\n\t\tif( !isset ($my_post) ) {\n\t\t\terror_log ('Cannot get_page_by_path for slug \\''. $slug .'\\'.');\n\t\t\treturn null;\n\t\t}\n\t\n\t\t$email_content = apply_filters('the_content', get_post_field('post_content', $my_post->ID));\n\t\t\t\n\t\t// Replace fields.\n\t\t$email_content = str_replace ('[name]', $user_to, $email_content);\n\t\t$email_content = str_replace ('[event_title]', $post_title, $email_content);\n\t\t$email_content = str_replace ('[event_date]', $event_date, $email_content);\n\t\t$email_content = str_replace ('[event_time]', $event_time, $email_content);\n\t\t$email_content = str_replace ('__EVENT_URL__', $post_url, $email_content);\n\t\n\t\t$email_content = str_replace ('<p>[rsvp_events_list]</p>', $this->build_event_bullets($rsvp_event, true), $email_content);\n\t\n\t\t// Add up-coming events to the email.\n\t\tif (isset ($upcoming_events)) {\n\t\n\t\t\t$email_content = str_replace ('<p>[upcoming_events_list]</p>', $this->build_event_bullets($upcoming_events), $email_content);\n\t\t}\n\t\n\t\t$email_content = str_replace ('<p>', $this->p_style, $email_content);\n\t\n\t\t// Work around the UTC bug...\n\t\tdate_default_timezone_set('Australia/Brisbane');\n\t\t\n\t\t$head_lines = '<meta name=\"bimbler-generated\" content=\"' . date(\"Y-m-d H:i:s\") . '\">' . PHP_EOL;\n\t\t$head_lines .= '<meta name=\"bimbler-generated-by\" content=\"' . $_SERVER[\"REMOTE_ADDR\"] . '\">' . PHP_EOL;\n\t\n\t\treturn $this->email_html_head . PHP_EOL . $head_lines . PHP_EOL . $this->email_end_head . PHP_EOL .$this->email_style . PHP_EOL . $email_content . $this->email_html_foot;\n\t}", "title": "" }, { "docid": "6e0359b124f49cb2d5ce438fc5fa28b7", "score": "0.6452293", "text": "public function enviaEmailComAcao($titulo, $texto, $usuario_destino, $id_acao, $email_id){\n \n $acao = $this->atas_model->getPlanoByIdAndEmpresa($id_acao); \n $empresa_acao = $acao->empresa;\n $projeto_acao = $acao->projeto;\n $sequencial_acao = $acao->sequencial;\n \n \n \n $empresa_dados = $this->owner_model->getEmpresaById($empresa_acao);\n $nome_empresa = $empresa_dados->razaoSocial;\n \n $dados_projeto = $this->projetos_model->getProjetoByIdAndByEmpresa($projeto_acao, $empresa_acao);\n $projeto_acao = $dados_projeto->projeto;\n \n $users_destino = $this->site->geUserByIDSemEmpresa($usuario_destino); \n $email = $users_destino->email;\n \n $nome_usuario = $users_destino->first_name;\n \n \n $this->load->library('parser');\n $parse_data = array(\n 'usuario' => $nome_usuario,\n 'site_link' => site_url(),\n 'acao' => $id_acao,\n 'projeto' => $projeto_acao, \n 'titulo' => $titulo,\n 'texto' => $texto,\n 'empresa' => $nome_empresa,\n 'logo' => '<img src=\"' . base_url() . 'assets/uploads/logos/' . $this->Settings->logo . '\" alt=\"' . $this->Settings->site_name . '\"/>'\n );\n \n $msg = file_get_contents('./themes/' . $this->theme . 'email_templates/sig_envio_usuario_com_acao.php');\n $message = $this->parser->parse_string($msg, $parse_data);\n $subject = $this->lang->line('SIGPLUS - '.$titulo);\n \n\n $from = '[email protected]';\n $from_name = \"SigPlus\";\n \n \n //$this->sma->send_email_credencial($email, $subject, $message, $from, $from_name,null,$cc); \n //$this->sma->send_email_credencial($email, $subject, $message, $from, $from_name,null,$cc);\n $this->sma->send_email_credencial($email, $subject, $message, $from, $from_name,null,$cc);\n \n }", "title": "" }, { "docid": "b52e97452d086c7a9197ff5826515b62", "score": "0.64441895", "text": "function formatMail ($body,$width=800){\n\tglobal $config;\n\tob_start();\n?>\n<table width=\"<?=$width?>\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\" style=\"font-family:'Lucida Grande',Tahoma,Verdana,Arial,Sans-Serif;\">\n\t<tr>\n\t\t<td style=\"text-align:right;font-size:10px;padding-bottom:5px;\">\n\t\t\t<a href=\"<?=$config->main_server?>\" style=\"padding-left:5px;text-decoration:none;color:#2d2d2d;\" target=\"_blank\"><?=EMAILCONTACTNUMBER.EMAILCONTACTLETTER?></a>\n\t\t\t<span style=\"padding-left:5px;\">|</span>\n\t\t\t<a href=\"<?=$config->main_server?>signup\" style=\"padding-left:5px;text-decoration:none;color:#2d2d2d;\" target=\"_blank\"><?=EMAIL_APP?><br>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td align=\"center\">\n\t\t\t<table background=\"<?=$config->main_server?>css/smt/email/body_bgn2.png\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%;border:2px #ccc solid;border-radius:5px;\">\n\t\t\t\t<tr>\n\t\t\t\t\t<td></td>\n\t\t\t\t\t<td background=\"<?=$config->main_server?>css/tbum/email/bg_logo.png\" id=\"head-logo\" style=\"text-align:right;padding-top:15px;padding-right:15px;\">\n\t\t\t\t\t\t<table style=\"width: 100%;\"><tr>\n\t\t\t\t\t\t\t<td align=\"left\"><a href=\"<?=$config->main_server?>\" target=\"blank\"><img src=\"<?=$config->main_server?>css/tbum/email/tagbumlogo_1.png\" style=\"border:none; margin: 40px;height:100px;width:85px;\" alt=\"tagbum.com\"></a></td>\n\t\t\t\t\t\t\t<td align=\"right\"><a href=\"<?=$config->main_server?>\" target=\"blank\"><img src=\"<?=$config->main_server?>css/tbum/email/tagbumlogo_2.png\" style=\"border:none;margin:40px;height:100px;width:180px\" alt=\"tagbum.com\"></a></td>\n\t\t\t\t\t\t</tr></table>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td></td>\n\t\t\t\t\t<td style=\"width:100%;height:25px;text-align:center;\">\n\t\t\t\t\t\t<img src=\"<?=$config->main_server?>css/smt/horizontal_separator.png\">\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr><td></td>\n\t\t\t\t\t<td id=\"publicity\" style=\"text-align:center;font-size:11px;padding:5px;color:#999999;\">\n\t\t\t\t\t\t<?=$body?>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr><td></td><td style=\"width:100%;border-top:1px #f4f4f4 solid;\"></td></tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td></td><td style=\"width:100%;border:1px #f4f4f4 solid;text-align:center;height:40px;\"><?=ucfirst(USERS_DNOTRECEIVEEMAILS)?> <a href=\"<?=$config->main_server.'setting?sc=1'?>\" target=\"_blank\" style=\"color:#ff8a28;\"><?=SIGNUP_H5TITLE1?></a></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td></td>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t<center>\n\t\t\t\t\t\t\t<table cellspacing=\"0\" cellpadding=\"0\" style=\" width:390px;\">\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t<table style=\"text-align:center;\">\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<center><table>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td background=\"<?=$config->main_server?>css/smt/email/yellowbutton_for_points.png\" style=\"background-repeat:no-repeat;color:#ff8a28;font-size:11px;height:50px;\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"<?=$config->main_server?>\" style=\"padding:38px 27px 10px 24px;\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img src=\"<?=$config->main_server?>css/smt/email/green1000points.png\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</table></center>\n\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td style=\"width:190px;color:#ff8a28;font-size:11px;\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<h2 style=\"-webkit-margin-before:0.23em;-webkit-margin-after:0.23em;\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"color:#b7b900;\">$</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"color:#ff8a28;\"><?=EMAIL_REDEEMPOINTS?></span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"color:#b7b900;\">$</span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</h2>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span style=\"color:#000\"><?=EMAIL_POINTSCollect?></span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<?=EMAIL_POINTS?>\n\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t<td >\n\t\t\t\t\t\t\t\t\t\t<table background=\"<?=$config->main_server?>css/smt/email/gray_dotter_line.png\" style=\"background-repeat:no-repeat;padding:12px 33px 31px 49px;\">\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td background=\"<?=$config->main_server?>css/smt/email/yellowbutton_get_started.png\" style=\"background-repeat:no-repeat;width:90px;padding:10px;\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"<?=$config->main_server?>\" style=\"color:#2d2d2d;font-size:12px;text-decoration:none;padding:8px 26px 8px 10px;\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<strong ><?=EMAIL_INI?></strong>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t</center>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td style=\"text-align:center;\">\n\t\t\t\t\t\t<img src=\"<?=$config->main_server?>css/smt/email/background_buildings.png\" style=\"text-align:center;\">\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr style=\"border-buttom:1px #ccc solid;border-radius:2px;\">\n\t\t\t\t\t<td></td>\n\t\t\t\t\t<td style=\"text-align:center;font-size:11px;\">\n\t\t\t\t\t\t<center>\n\t\t\t\t\t\t\t<table cellpadding=\"0\" cellspacing=\"25\" class=\"font-b\" style=\"color:rgb(255,138,40);font-size:11px;\">\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td style=\"text-align:center;\">\n\t\t\t\t\t\t\t\t\t\t<a href=\"<?=$config->main_server?>\" target=\"_blank\">\n\t\t\t\t\t\t\t\t\t\t\t<img src=\"<?=$config->main_server?>css/smt/email/creat_tag_icon.png\" style=\" padding:11px 23px 7px 23px;border:2px #ccc solid;border-radius:5px;\"><br>\n\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t<strong><?=EMAILCREATETAGS?></strong>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t<td style=\"text-align:center;\">\n\t\t\t\t\t\t\t\t\t\t<a href=\"<?=$config->main_server?>\" target=\"_blank\">\n\t\t\t\t\t\t\t\t\t\t\t<img src=\"<?=$config->main_server?>css/smt/email/share_tag_icon.png\" style=\"padding:11px 23px 7px 23px;border:2px #ccc solid;border-radius:5px;\"><br>\n\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t<strong><?=EMAILSTAGS?></strong>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t<td style=\"text-align:center;\">\n\t\t\t\t\t\t\t\t\t\t<a href=\"<?=$config->main_server?>\" target=\"_blank\">\n\t\t\t\t\t\t\t\t\t\t\t<img src=\"<?=$config->main_server?>css/smt/email/redistribute_tags_icon.png\" style=\"padding:12px 16px 11px 15px;border:2px #ccc solid;border-radius:5px;\"><br>\n\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t<strong><?=EMAILRTAGS?></strong>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t<td style=\"text-align:center;\">\n\t\t\t\t\t\t\t\t\t\t<a href=\"<?=$config->main_server?>\" target=\"_blank\">\n\t\t\t\t\t\t\t\t\t\t\t<img src=\"<?=$config->main_server?>css/smt/email/sponsor_tags_icon.png\" style=\"padding:11px 27px 7px 27px;border:2px #ccc solid;border-radius:5px;\"><br>\n\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t<strong><?=EMAILSPTAGS?></strong>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t</center>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr><td></td><td style=\"border-bottom:1px #ccc solid;\"></td></tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td></td>\n\t\t\t\t\t<td style=\"font-size:12px;text-align:center;padding:10px;\">\n\t\t\t\t\t\t\t<?=EMAIL_OPTIONTAGS?> <span style=\"color:rgb(255,138,40)\"><?=EMAIL_OPTIONTag?></span>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td style=\"padding-top:5px;\">\n\t\t\t<table style=\"width:100%;\">\n\t\t\t\t<td id=\"email-socialMedia\">\n\t\t\t\t\t<a href=\"https://www.facebook.com/pages/Tagbum/182709268463153?ref=ts&fref=ts\" target=\"_blank\"><img src=\"<?=$config->main_server?>css/smt/email/facebook.png\" style=\"text-align:left;border:none;\"></a>\n\t\t\t\t\t<a href=\"https://twitter.com/tag_bum\" target=\"_blank\"><img src=\"<?=$config->main_server?>css/smt/email/twitter.png\" style=\"text-align:left;border:none;\"></a>\n\t\t\t\t\t<a href=\"http://www.linkedin.com/in/tagbum/\" target=\"_blank\"><img src=\"<?=$config->main_server?>css/smt/email/likedIn.png\" style=\"text-align:left;border:none;\"></a>\n\t\t\t\t\t<a href=\"https://plus.google.com/u/0/105016519974283790958\" target=\"_blank\"><img src=\"<?=$config->main_server?>css/smt/email/google.png\" style=\"text-align:left;border:none;\"></a>\n\t\t\t\t</td>\n\t\t\t\t<td id=\"email-pie_terms\" style=\"font-size:10px;text-align:right;\">\n\t\t\t\t\t<a href=\"<?=$config->main_server?>terms\" style=\"padding-right:5px;text-decoration:none;color:#2d2d2d;\" target=\"_blank\"><?=EMAIL_TERMS?></a>\n\t\t\t\t</td>\n\t\t\t</table>\n\t\t</td>\n\t</tr>\n\t<tr>\n\t\t<td style=\"width:100%;font-size:11px;color:#cccccc\"><center><?=EMAIL_ENDNOTE?></center></td>\n\t</tr>\n</table>\n<?php\n\t$contenido = ob_get_contents();\n\tob_end_clean();\n\treturn $contenido;\n}", "title": "" }, { "docid": "66bc262092ac3f41a63833a0b527bda8", "score": "0.641913", "text": "function Fromsendbymail($data){\r\r\n\r\r\n\t\t\t\t\t$mids =$data['groups']['emailids'];\r\r\n\t\t\t\t\t$expmids = explode(',',$mids);\r\r\n\t\t\t\t\t\r\r\n\t\t\t\t\t\t$gname = $data['groups']['hiddname'];\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t$pdfname = $data['groups']['hiddpdfname'];\r\r\n\t\t\t\t\t\t$description = nl2br($data['groups']['description']);\r\r\n\t\t\t\t\t $httppath ='http://'.$_SERVER['HTTP_HOST'].'/freeformpdf/'.$pdfname;\r\r\n\t\t\t\t\t\t$to='';\r\r\n\t\t\t\t\t\t$messagecontent='';\r\r\n\t\t\t\t\t\t$subject='';\r\r\n\t\t\t\t\tfor($i=0;$i < count($expmids);$i++){\r\r\n\t\t\t\t\t\t//echo $i.'<br>';\r\r\n\t\r\r\n\t\t\t\t\t\t\t\t$messagecontent = \"Ad Book Form<br><br>\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\".SITENAME.\" sent you this adbook form on behalf of <strong>$gname</strong>. Here is the invitation from <strong>$gname:</strong><br>\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$description\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<br><br>\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<a href='$httppath'>Click here to get your adbook form </a><br><br>\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tOr copy and past the link below to your browser<br>\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$httppath\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\";\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$subject = \"Ad book Free Form - adbookonline\";\r\r\n\t\t\t \r\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$from = SITE_EMAIL;\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$to = \"$expmids[$i]\";\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif($to){\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif($this->sendMailContent($to,$from,$subject,$messagecontent)){\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ok = 'ok';\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}else{\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$ok = '';\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t\t//exit;\r\r\n\t\t\t\t\tif($ok=='ok'){\r\r\n\t\t\t\t\t\t\treturn 'send';\r\r\n\t\t\t\t\t}else{\r\r\n\t\t\t\t\t\t\treturn 'notsend';\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t\t\r\r\n\t\t\t\t\t\r\r\n\t\t\t\t\r\r\n\t\t\t\t\t\r\r\n\t\t}", "title": "" }, { "docid": "34163b8b1f50c2d8d824172e851a35d2", "score": "0.64187694", "text": "function build_rsvp_notification_email ($user_to, $post_title, $event_date, $event_time, $post_url, $rsvp_event, $upcoming_events) {\n\n\t\t$slug = $this->slug_rsvp_post; // TODO: Move this into settings.\n\t\t\t\n\t\t$my_post = get_page_by_path($slug, OBJECT, 'post');\n\t\t\n\t\tif( !isset ($my_post) ) {\n\t\t\terror_log ('Cannot get_page_by_path for slug \\''. $slug .'\\'.');\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t$email_content = apply_filters('the_content', get_post_field('post_content', $my_post->ID));\n\t\t\t\n\t\t// Replace fields.\n\t\t$email_content = str_replace ('[name]', $user_to, $email_content);\n\t\t$email_content = str_replace ('[event_title]', $post_title, $email_content);\n\t\t$email_content = str_replace ('[event_date]', $event_date, $email_content);\n\t\t$email_content = str_replace ('[event_time]', $event_time, $email_content);\n\t\t$email_content = str_replace ('__EVENT_URL__', $post_url, $email_content);\n\n\t\t$email_content = str_replace ('<p>[rsvp_events_list]</p>', $this->build_event_bullets($rsvp_event, true), $email_content);\n\t\t\n\t\t// Add up-coming events to the email.\n\t\tif (isset ($upcoming_events)) {\n\n\t\t\t$email_content = str_replace ('<p>[upcoming_events_list]</p>', $this->build_event_bullets($upcoming_events), $email_content);\n\t\t}\n\n\t\t$email_content = str_replace ('<p>', $this->p_style, $email_content);\n\t\t\n\t\t// Work around the UTC bug...\n\t\tdate_default_timezone_set('Australia/Brisbane');\n\t\t\n\t\t$head_lines = '<meta name=\"bimbler-generated\" content=\"' . date(\"Y-m-d H:i:s\") . '\">' . PHP_EOL;\n\t\t$head_lines .= '<meta name=\"bimbler-generated-by\" content=\"' . $_SERVER[\"REMOTE_ADDR\"] . '\">' . PHP_EOL;\n\t\t\n\t\treturn $this->email_html_head . PHP_EOL . $head_lines . PHP_EOL . $this->email_end_head . PHP_EOL .$this->email_style . PHP_EOL . $email_content . $this->email_html_foot;\n\t}", "title": "" }, { "docid": "d4298155ec9c95ed6d237e6918338a83", "score": "0.6418584", "text": "function mail_message($data_array, $template_file, $deadline_str,$myemail) \n{\n\t\t#\t $email_message = file_get_contents($template_file);\n\t\t#\t $email_message = str_replace(\"#chair_style#\", $data_array['chair_style'], $email_message);\n\t\t#\t $email_message = str_replace(\"#EMAIL#\", $data_array['registration_email_address'], $myemail, $email_message);\n\t\t#\t $email_message = str_replace(\"#quantity_of_chairs#\", $data_array['quantity_of_chairs'], $email_message);\t \n\t\t#\t $email_message = str_replace(\"#CONTACT#\", $contact, $email_message);\n \t\t$chair_total = $_GET[\"chair_total\"] ;\n \t \n\t \t$email_message = \"The quantity is: $chair_total \";\n\t \n\t #construct the email headers\n\t $to = \"[email protected]\"; //for testing purposes, this should be YOUR email address.\n\t $from = $data_array['email'];\n\t $email_subject = \"CONTACT #\".time().\": \".$data_array['quantity_of_chairs'];\n\t\n\t #now mail\n\t mail($to, $email_subject, $email_message, \"From: \".$from); \n}", "title": "" }, { "docid": "655d826b97d67c505e1c5cae96b205c2", "score": "0.64154005", "text": "public function email($values){\n $destinataire = '[email protected]';\n function Rec($text)\n {\n $text = htmlspecialchars(trim($text), ENT_QUOTES);\n if (1 === get_magic_quotes_gpc())\n {\n $text = stripslashes($text);\n }\n\n $text = nl2br($text);\n return $text;\n };\n\n /*\n * Cette fonction sert à vérifier la syntaxe d'un email\n */\n function IsEmail($email)\n {\n $value = preg_match('/^(?:[\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\`\\{\\|\\}\\~]+\\.)*[\\w\\!\\#\\$\\%\\&\\'\\*\\+\\-\\/\\=\\?\\^\\`\\{\\|\\}\\~]+@(?:(?:(?:[a-zA-Z0-9_](?:[a-zA-Z0-9_\\-](?!\\.)){0,61}[a-zA-Z0-9_-]?\\.)+[a-zA-Z0-9_](?:[a-zA-Z0-9_\\-](?!$)){0,61}[a-zA-Z0-9_]?)|(?:\\[(?:(?:[01]?\\d{1,2}|2[0-4]\\d|25[0-5])\\.){3}(?:[01]?\\d{1,2}|2[0-4]\\d|25[0-5])\\]))$/', $email);\n return (($value === 0) || ($value === false)) ? false : true;\n }\n\n // formulaire envoyé, on récupère tous les champs.\n $nom = (isset($values['nom'])) ? Rec($values['nom']) : '';\n $email = (isset($values['email'])) ? Rec($values['email']) : '';\n $objet = (isset($values['objet'])) ? Rec($values['objet']) : '';\n $message = (isset($values['message'])) ? Rec($values['message']) : '';\n\n // On va vérifier les variables et l'email ...\n $email = (IsEmail($email)) ? $email : ''; // soit l'email est vide si erroné, soit il vaut l'email entré\n\n if (($nom != '') && ($email != '') && ($objet != '') && ($message != '')) {\n // les 4 variables sont remplies, on génère puis envoie le mail\n $headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n $headers .= 'From:' . $nom . ' <' . $email . '>' . \"\\r\\n\" .\n 'Reply-To:' . $email . \"\\r\\n\" .\n 'Content-Type: text/plain; charset=\"utf-8\"; DelSp=\"Yes\"; format=flowed ' . \"\\r\\n\" .\n 'Content-Disposition: inline' . \"\\r\\n\" .\n 'Content-Transfer-Encoding: 7bit' . \" \\r\\n\" .\n 'X-Mailer:PHP/' . phpversion();\n\n // Remplacement de certains caractères spéciaux\n $message = str_replace(\"&#039;\", \"'\", $message);\n $message = str_replace(\"&#8217;\", \"'\", $message);\n $message = str_replace(\"&quot;\", '\"', $message);\n $message = str_replace('<br>', '', $message);\n $message = str_replace('<br />', '', $message);\n $message = str_replace(\"&lt;\", \"<\", $message);\n $message = str_replace(\"&gt;\", \">\", $message);\n $message = str_replace(\"&amp;\", \"&\", $message);\n\n $success = @mail($destinataire, $objet, $message, $headers);\n echo\"<script language='javascript'>\";\n echo\"alert('Votre message a bien été envoyé')\";\n echo\"</script>\";\n }\n echo\"<script language='javascript'>\";\n echo\"alert('Votre message n'a pas pu être envoyé, merci de réessayer ultérieurement')\";\n echo\"</script>\";\n }", "title": "" }, { "docid": "5bce2c4bec7b1d2fbd81007fffc6a64f", "score": "0.64131504", "text": "function mail_ToRaters($db_object,$common,$post_var,$user_id,$error_msg)\n\t{\n\t\twhile(list($kk,$vv)=@each($post_var))\n\t\t{\n\t\t$$kk=$vv;\n\t\t\n\t\tif(ereg(\"^email_\",$kk))\n\t\t\t\t{\n\t\t\t\t$e_qid=ereg_replace(\"email_\",\"\",$kk);\t\n\t\t\t\t$email_array[$e_qid] = $vv;\n\t\t\t\t}\n\t\t}\n\t\t\n\n\t$config=$common->prefix_table(\"config\");\n\t$appraisal_table=$common->prefix_table(\"multirater_appraisal\");\n \t$otherraters_table = $common->prefix_table(\"other_raters\");\n\t$user_table=$common->prefix_table(\"user_table\");\n\t$ratergroup_table = $common->prefix_table(\"rater_group\");\n\t$position_table = $common->prefix_table(\"position\");\n\n\t\n//groups to be sent mail...\n\t\n\t$mysql = \"select rater_group_name from $ratergroup_table\";\n\t$group_arr = $db_object->get_single_column($mysql);\n\t//print_r($group_arr);\n\t\n\tfor($i=0;$i<count($group_arr);$i++)\n\t{\n\t\t$group_var = $group_arr[$i];\n\t\t\n\t\t$name=$group_var;\n\n\t\t$$name=1;\n\t}\n\t \n\t\n\t$email = @implode(\"','\",$email_array);\n \n\t\n\t//emails of those selected in the OTHERS category\n\t\n\t\n\t$mysql = \"select user_id from $user_table where email in ('$email')\";\n \n\t$userid_arr = $db_object->get_single_column($mysql);\n\t\n\t\n//codings to send mail...\n\t$mysql=\"select masubject,mamessage from $config\";\n\t\n\t$rslt_arr=$db_object->get_a_line($mysql);\n\n\t$masubject=$rslt_arr[\"masubject\"];\n\t$mamessage=$rslt_arr[\"mamessage\"];\n\n//sender email details...\n\t$mysql = \"select username,email from $user_table where user_id = '$user_id'\";\n\n\t$sender_arr = $db_object->get_a_line($mysql);\n\t$user = $sender_arr[\"username\"]; \n\t$from = $sender_arr[\"email\"]; \n\t\n\twhile (list($kk,$vv) = @each($userid_arr))\n\t{\n\t\t$useridToMail = $userid_arr[$kk];\n\t\t\n\t\tif($useridToMail != 0)\n\t\t{\n\t\t\t\n\t\t$mysql = \"select email,username,password from $user_table where user_id = '$useridToMail'\";\n\n\t\t$email_arr = $db_object->get_a_line($mysql);\n\t\t$email = $email_arr[\"email\"];\n\t\t$username = $email_arr[\"username\"];\t\n\t\t$login_password = $email_arr['password'];\n\n\t\t$to = $email;\n\t\t$values[\"username\"]=$username;\n\t\t\n\t\t$values['login_username'] = $username;\n\t\t$values['login_password'] = $login_password;\n\t\t\n\t\t$values[\"user\"] = $user;\n\t\t$values[\"url\"]=$common->http_path.\"/index.php\";\n\n\t\t$message=$common->direct_replace($db_object,$mamessage,$values);\n\n\t\t$sent=$common->send_mail($to,$masubject,$message,$from);\n\n\t\t\n\t\t}\n\t\t\n\t\tif($sent)\n\t\t{\n\t\t\n\t\t\techo $error_msg[\"cMultiraterAppraisalMail_sent\"];\n\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo $error_msg[\"cMultiraterAppraisalMail_fail\"];\n\t\t}\n\t\t\n\t}\n\n\n\n}", "title": "" }, { "docid": "c862392f85f96a53a261333d57f4546f", "score": "0.641119", "text": "function sendMailToContribs($art_id)\n {\n $delivery_obj = new Ep_Delivery_Delivery();\n $article_obj = new EP_Delivery_Article();\n $user_obj = new Ep_User_User();\n $automail=new Ep_Message_AutoEmails();\n $participate_obj = new EP_Participation_Participation();\n $partcrt_obj = new Ep_Participation_CorrectorParticipation();\n $ao_id = $delivery_obj->getDeliveryID($art_id);\n $aoDetails=$delivery_obj->getPrAoDetails($ao_id);\n $getpartusers = $participate_obj->getParticipationsUserIds($art_id);\n if($getpartusers != 'NO')\n {\n foreach($getpartusers as $notsendmail)\n {\n $nomailsendlist[] = $notsendmail['user_id'];\n }\n }\n $getpartcrts = $partcrt_obj->getNotRefusedCrtParticipationsUserIds($art_id);\n if($getpartcrts != 'NO')\n {\n foreach($getpartcrts as $notsendmailcrts)\n {\n $nomailsendlist[] = $notsendmailcrts['corrector_id'];\n }\n }\n /* Sending mail to client when publish **/\n $delartdetails = $delivery_obj->getArticlesOfDel($ao_id);\n $expires=time()+(60*$delartdetails[0]['participation_time']);\n $aoDetails=$delivery_obj->getPrAoDetailsWithArtid($art_id);\n $autoEmails=new Ep_Message_AutoEmails();\n $parameters['AO_title']=$aoDetails[0]['title'];\n $parameters['AO_end_date']=$aoDetails[0]['delivery_date'];\n //$parameters['submitdate_bo']=$aoDetails[0]['submitdate_bo'];\n $parameters['submitdate_bo']=date('d/m/Y H:i', $expires);\n\n $parameters['noofarts']=$aoDetails[0]['noofarts'];\n if($aoDetails[0]['deli_anonymous']=='0')\n $parameters['article_link']=\"/contrib/aosearch?client_contact=\".$aoDetails[0]['user_id'];\n else\n $parameters['article_link']=\"/contrib/aosearch?client_contact=anonymous\";\n $parameters['aoname_link'] = \"/contrib/aosearch\";\n $parameters['clientartname_link'] = \"/client/quotes?id=\".$aoDetails[0]['articleid'];\n $object = $aoDetails[0]['republish_object'];\n $message = ($aoDetails[0]['republish_mail']);\n if($aoDetails[0]['mail_send_contrib']=='yes')\n {\n //Priority contributors mail\n if($aoDetails[0]['priority_contributors']!=\"\")\n {\n $prior_contribs=explode(\",\",$aoDetails[0]['priority_contributors']);\n $prior_parameters['poll_link']='<a href=\"/contrib/aosearch\">Cliquant-ici</a>';\n $prior_parameters['hours']=$aoDetails[0]['priority_hours'];\n foreach($prior_contribs as $pcontrib)\n {\n $contrib_poll=$delivery_obj->getPollcontribDetails($aoDetails[0]['poll_id'],$pcontrib);\n $prior_parameters['poll']=$contrib_poll[0]['title'];\n $prior_parameters['date']=$contrib_poll[0]['poll_date'];\n $prior_parameters['price']=$contrib_poll[0]['price_user'];\n if(!in_array($pcontrib,$nomailsendlist)) ///sending to only non participants\n //$automail->messageToEPMail($pcontrib,15,$prior_parameters);///\n $automail->sendMailEpMailBox($pcontrib,$object,$message);\n }\n }\n //Only for poll not linked AOs\n if($aoDetails[0]['poll_id']==\"\")\n {\n if($aoDetails[0]['AOtype']=='private')\n {\n $contributors=array_unique(explode(\",\",$aoDetails[0]['article_contribs']));\n if(is_array($contributors) && count($contributors)>0)\n {\n foreach($contributors as $contributor)\n {\n if(!in_array($contributor,$nomailsendlist)) ///sending to only non participants\n $automail->sendMailEpMailBox($contributor,$object,$message);\n }\n }\n }\n elseif($aoDetails[0]['AOtype']=='public')\n {\n if($aoDetails[0]['created_by'] != 'BO')\n {\n $contributors=$user_obj->getSeniorContributors();\n if(is_array($contributors) && count($contributors)>0)\n {\n $sclimit=$this->configval['sc_limit'];\n foreach($contributors as $contributor)\n {\n $countofparts=$participate_obj->getCountOnStatus($contributor['identifier']);\n if($sclimit > $countofparts[0]['partscount'])\n {\n if(!in_array($contributor['identifier'],$nomailsendlist)) ///sending to only non participants\n $automail->sendMailEpMailBox($contributor['identifier'],$object,$message);\n }\n }\n }\n }\n else\n {\n $delviews = $delivery_obj->getDeliveryDetails($ao_id);\n $profiles = explode(\",\", $delviews[0]['view_to']);\n\n $profiles = implode(\",\", $profiles);\n $contributors=$delivery_obj->getContributorsAO('public',$aoDetails[0]['fav_category'], $profiles);\n if(is_array($contributors) && count($contributors)>0)\n {\n $jclimit=$this->configval['jc_limit'];\n $sclimit=$this->configval['sc_limit'];\n\n foreach($contributors as $contributor)\n {\n if($contributor['profile_type'] == 'junior' || $contributor['profile_type'] == 'sub-junior')\n {\n $countofparts=$participate_obj->getCountOnStatus($contributor['identifier']);\n if($jclimit > $countofparts[0]['partscount'])\n {\n if(!in_array($contributor['identifier'],$nomailsendlist)) ///sending to only non participants\n $automail->sendMailEpMailBox($contributor['identifier'],$object,$message);\n }\n }\n else\n {\n $countofparts=$participate_obj->getCountOnStatus($contributor['identifier']);\n\n if($sclimit > $countofparts[0]['partscount'])\n {\n if(!in_array($contributor['identifier'],$nomailsendlist)) ///sending to only non participants\n $automail->sendMailEpMailBox($contributor['identifier'],$object,$message);\n }\n }\n }\n }\n }\n }\n }\n }\n }", "title": "" }, { "docid": "9e239de4ba9346c78f1e096599153546", "score": "0.64076227", "text": "public function emailTemplate();", "title": "" }, { "docid": "d296c97920f4cb76e551e530d5700342", "score": "0.64054835", "text": "public function send_email() {\n Mail::send('emails.accept', ['name' => 'Gabriel', 'question' => 'What is the largest planet'], function ($message) use ($email)\n {\n $message->from('[email protected]');\n $message->to('[email protected]');\n $message->subject(\"I need your help!\");\n\n });\n }", "title": "" }, { "docid": "0ed8cc7b35c2e23d1632bfff3fe3e8b8", "score": "0.64053756", "text": "function pmproec_pmpro_email_body($body, $email)\n{\n\t//must be a confirmation email and checkout template\n\tif(pmproec_isEmailConfirmationLevel($email->data['membership_id']) && strpos($email->template, \"checkout\") !== false)\n\t{\n\t\t//get user\n\t\t$user = get_user_by(\"login\", $email->data['user_login']);\n\t\t\n\t\t//need validation?\n\t\t$validated = $user->pmpro_email_confirmation_key;\n\t\tif(empty($validated) || $validated != \"validated\")\n\t\t{\t\t\n\t\t\t$url = home_url(\"?ui=\" . $user->ID . \"&validate=\" . $validated);\n\t\t\t$body = \"<p><strong>IMPORTANT! You must follow this link to confirm your email addredss before your membership is fully activated:<br /><a href='\" . $url . \"'>\" . $url . \"</a></strong></p><hr />\" . $body;\n\t\t\t$body = str_replace(\"Your membership account is now active.\", \"\", $body);\n\t\t}\n\t}\n\t\n\treturn $body;\n}", "title": "" }, { "docid": "0288d1d18aa58fc4d8aa33d3e9b2772b", "score": "0.64041483", "text": "function Admin_email($email,$firstname,$lastname) {\n\t$protocol_content = (Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://';\n\t$link=$protocol_content.$_SERVER['HTTP_HOST'];\n\t$sub=\"New User Registration\";\n\t$msg=\"New User Registered to your site\";\n\t$vars = array(\n\t\t\t'{email}' => $email,\n\t\t\t'{message}'=> $msg\n\t);\n\t$db = Db::getInstance()->ExecuteS(\"SELECT * FROM \".pSQL(_DB_PREFIX_).\"employee WHERE id_profile=1 \");\n\t$id_lang = (int)Configuration::get('PS_LANG_DEFAULT');\n\tforeach ($db as $row)\n\t{\n\t\t$find_id=$row['id_employee'];\n\t\t$find_email=$row['email'];\n\t\tMail::Send($id_lang, 'contact',$sub, $vars, $find_email);\n\t}\n}", "title": "" }, { "docid": "e29833cf14aa5c2609c083a1a8629dcb", "score": "0.64016134", "text": "function send_mail($data,$bdata,$pdetail,$amount){\n\t\t\t\t$to = $data['email'];\n\t\t\t\t$message = \"<img src='http://forkbomb.azurewebsites.net/images/headmail.png'/><br/><br/>Dear \".$data['username'].\",<br/><br/> An item you listed in Trading in your hand has been sold to \".$bdata['username'].\".<br/><br/><table cellspacing='4' width='420'>\n\t\t<tbody>\n\t\t<tr>\n\t\t <td width='200'><div align='right'><b>\".$pdetail['name'].\"&nbsp;&nbsp;</b></div></td>\n\t\t <td width='202'>\".$pdetail['price'].\"&nbsp;THB</td>\n\t\t</tr>\n\t\t<tr>\n\t\t <td width='200'><div align='right'><b>Amount&nbsp;&nbsp;</b></div></td>\n\t\t <td width='202'>\".$amount.\"&nbsp;Units</td>\n\t\t</tr>\n\t\t<tr>\n\t\t <td width='200'><div align='right'><b>&nbsp;</b></div></td>\n\t\t <td width='202'><hr align='left' color='#cccccc' noshade='' size='1' width='180'></td>\n\t\t</tr>\n\t\t<tr>\n\t\t <td width='200'><div style='font-size:18px' align='right'><b>Total&nbsp;&nbsp;</b></div></td>\n\t\t <td width='202'><span style='font-size:18px'>\".$pdetail['price']*$amount.\"&nbsp;THB</span></td>\n\t\t</tr> \n\t </tbody>\n\t</table>\n\t\t\t\t<br/>The Trading in your hand team<br/>Admin : [email protected]<br/>Co-Admin : [email protected]\";\t// Set message to send\n\t\t\t\t$config = Array(\t// Config value to send email\n\t\t\t\t\t\t'protocol' => 'smtp',\n\t\t\t\t\t\t'smtp_host' => 'mx1.hostinger.in.th',\n\t\t\t\t\t\t'smtp_port' => 2525,\n\t\t\t\t\t\t'smtp_user' => '[email protected]',\n\t\t\t\t\t\t'smtp_pass' => 'pae123456',\n\t\t\t\t\t\t'mailtype' => 'html', \n\t\t\t\t\t\t'charset' => 'iso-8859-1'\n\t\t\t\t);\n\t\t\t\t$this->load->library('email', $config);\n\t\t\t\t$this->email->set_newline(\"\\r\\n\");\n\t\t\t\t$this->email->from('[email protected]');\n\t\t\t\t$this->email->to($to);\n\t\t\t\t$this->email->subject('You have sold an item on Trading in your hand');\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\t// Send email\n\t\t}", "title": "" }, { "docid": "9dbeb52a7eb7b086585415b7cf41111b", "score": "0.6395186", "text": "function sendPlainEmail($to,$cc,$subject,$message) {\n\tglobal $home_url;\n\tglobal $mail;\n\tglobal $trailSessionUser;\n\tqueMail($to,$cc,$subject,$message,0);\n}", "title": "" }, { "docid": "7b755b178606dc1f2c3b4424c9a46e48", "score": "0.63923794", "text": "function __emailer($email = '', $vars = array())\n {\n\n //common variables\n $this->data['email_vars']['clients_company_name'] = $this->data['fields']['client']['clients_company_name'];\n $this->data['email_vars']['todays_date'] = $this->data['vars']['todays_date'];\n $this->data['email_vars']['company_email_signature'] = $this->data['settings_company']['company_email_signature'];\n $this->data['email_vars']['client_dashboard_url'] = $this->data['vars']['site_url_client'];\n $this->data['email_vars']['admin_dashboard_url'] = $this->data['vars']['site_url_admin'];\n\n //new client welcom email-------------------------------\n if ($email == 'new_user') {\n\n //get message template from database\n $template = $this->settings_emailtemplates_model->getEmailTemplate('new_user_client');\n $this->data['debug'][] = $this->settings_emailtemplates_model->debug_data;\n\n //specific data\n $this->data['email_vars']['client_users_full_name'] = $this->input->post('client_users_full_name');\n $this->data['email_vars']['client_users_email'] = $this->input->post('client_users_email');\n $this->data['email_vars']['client_users_password'] = $this->input->post('client_users_password');\n\n //parse email\n $email_message = parse_email_template($template['message'], $this->data['email_vars']);\n\n //send email\n email_default_settings(); //defaults (from emailer helper)\n $this->email->to($this->data['email_vars']['client_users_email']);\n $this->email->subject($template['subject']);\n $this->email->message($email_message);\n $this->email->send();\n\n }\n\n //admin notification - new client user-------------------------------\n if ($email == 'admin_notification_new_user') {\n\n //get message template from database\n $template = $this->settings_emailtemplates_model->getEmailTemplate('new_user_admin');\n $this->data['debug'][] = $this->settings_emailtemplates_model->debug_data;\n\n //specific data\n $this->data['email_vars']['client_users_full_name'] = $this->input->post('client_users_full_name');\n $this->data['email_vars']['client_users_email'] = $this->input->post('client_users_email');\n $this->data['email_vars']['clients_company_name'] = $this->client['clients_company_name'];\n\n //parse email\n $email_message = parse_email_template($template['message'], $this->data['email_vars']);\n //send email to multiple admins\n foreach ($this->data['vars']['mailinglist_admins'] as $email_address) {\n email_default_settings(); //defaults (from emailer helper)\n $this->email->to($email_address);\n $this->email->subject($template['subject']);\n $this->email->message($email_message);\n $this->email->send();\n }\n\n }\n\n }", "title": "" }, { "docid": "c05a80b99be6ee8c77b41fe0d8d6fc06", "score": "0.6382867", "text": "public function testemail() {\n\n\t\t$emaildet = array(\n\t\t\t'email' => '[email protected]',\n\t\t\t'subject' => 'this is a test'\n\t\t);\n\n\t\t$this->emailnotify($emaildet);\n\n\t}", "title": "" }, { "docid": "cad9ee600b20a2a93c832ea3057493bf", "score": "0.6380199", "text": "function SentEmail($type,$userId, $delev)\n{\n\tswitch ($type) {\n\t\tcase 1:\n\t\t\t$code=file_get_contents(\"email_themes/welcome.html\");\n\t\t\t$subject = \"Welcome to GetModu\";\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\t$code=file_get_contents(\"email_themes/confirm_email.html\");\n\t\t\t$subject = \"Confirm Email\";\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\t$code=file_get_contents(\"email_themes/retrieve_password.html\");\n\t\t\t$subject = \"Retrieve Password\";\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\t$code=file_get_contents(\"email_themes/confirm_password_change.html\");\n\t\t\t$subject = \"Password Changed\";\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\t$code=file_get_contents(\"email_themes/download_html.html\");\n\t\t\t$subject = \"Download\";\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\t$code=file_get_contents(\"email_themes/published_project.html\");\n\t\t\t$subject = \"Project Published\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t# code...\n\t\t\tbreak;\n\t}\n\n\t// O\n\t$params = [\n 'TableName' => \"bexi_prod_users\",\n \"KeyConditionExpression\"=> \"id = :id\",\n \"ExpressionAttributeValues\"=> [\n \":id\" => [\"S\" => $userId],\n ]\n ];\n\n $result = $dynamodb->query($params);\n\n $user_email = $marshaler->unmarshalValue($result['Items'][0][\"username\"]);\n\n\t// Replace [email protected] with your \"From\" address.\n\t// This address must be verified with Amazon SES.\n\t$sender = EMAIL_FROM;\n\t$senderName = EMAIL_FROM_NAME;\n\n\t// Replace [email protected] with a \"To\" address. If your account\n\t// is still in the sandbox, this address must be verified.\n\t$recipient = $user_email;\n\n\t// Replace smtp_username with your Amazon SES SMTP user name.\n\t$usernameSmtp = SMTP_USER;\n\n\t// Replace smtp_password with your Amazon SES SMTP password.\n\t$passwordSmtp = SMTP_PASS;\n\n\t// Specify a configuration set. If you do not want to use a configuration\n\t// set, comment or remove the next line.\n\t//$configurationSet = 'ConfigSet';\n\n\t// If you're using Amazon SES in a region other than US West (Oregon),\n\t// replace email-smtp.us-west-2.amazonaws.com with the Amazon SES SMTP\n\t// endpoint in the appropriate region.\n\t$host = 'email-smtp.'.AWS_REGION.'.amazonaws.com';\n\t$port = 587;\n\n\t// The subject line of the email\n\t//$subject = 'Amazon SES test (SMTP interface accessed using PHP)';\n\n\t// The HTML-formatted body of the email\n\t$bodyHtml = '<h1>Email Test</h1>\n\t <p>This email was sent through the\n\t <a href=\"https://aws.amazon.com/ses\">Amazon SES</a> SMTP\n\t interface using the <a href=\"https://github.com/PHPMailer/PHPMailer\">\n\t PHPMailer</a> class.</p>';\n\n\t$mail = new PHPMailer(true);\n\n\ttry {\n\t // Specify the SMTP settings.\n\t $mail->isSMTP();\n\t $mail->setFrom($sender, $senderName);\n\t $mail->Username = $usernameSmtp;\n\t $mail->Password = $passwordSmtp;\n\t $mail->Host = $host;\n\t $mail->Port = $port;\n\t $mail->SMTPAuth = true;\n\t $mail->SMTPSecure = 'tls';\n\t $mail->addCustomHeader('X-SES-CONFIGURATION-SET', $configurationSet);\n\n\t // Specify the message recipients.\n\t $mail->addAddress($recipient);\n\t // You can also add CC, BCC, and additional To recipients here.\n\n\t // Specify the content of the message.\n\t $mail->isHTML(true);\n\t $mail->Subject = $subject;\n\t $mail->Body = $bodyHtml;\n\t //$mail->AltBody = $bodyText;\n\t $mail->Send();\n\t echo \"Email sent!\" , PHP_EOL;\n\t} catch (phpmailerException $e) {\n\t echo \"An error occurred. {$e->errorMessage()}\", PHP_EOL; //Catch errors from PHPMailer.\n\t} catch (Exception $e) {\n\t echo \"Email not sent. {$mail->ErrorInfo}\", PHP_EOL; //Catch errors from Amazon SES.\n\t}\n}", "title": "" }, { "docid": "aee555aaf68803698558b4c5f0dd623e", "score": "0.637529", "text": "public function res_mail() {\n\n $userid = $this->session->userdata('aileenuser');\n $userdata = $this->common->select_data_by_id('user', 'user_id', $userid, $data = '*', $join_str = array());\n\n $email = $userdata[0]['user_email'];\n $username = $userdata[0]['user_name'];\n $firstname = $userdata[0]['first_name'];\n $lastname = $userdata[0]['last_name'];\n $gender = $userdata[0]['user_gender'];\n\n $data = array(\n 'user_verify' => '2',\n 'verify_date' => date('Y-m-d', time())\n );\n\n $updatdata = $this->common->update_data($data, 'user', 'user_id', $userid);\n\n\n $to_email = $email;\n //echo $toemail; die();\n\n\n $msg = '<tr>\n <td style=\"text-align:center; padding-top:15px;\">';\n if ($userdata[0]['user_image']) {\n $msg .= '<img src=\"' . base_url($this->config->item('user_thumb_upload_path') . $userdata[0]['user_image']) . '\">';\n } else {\n\n if ($gender == 'F') {\n $msg .= '<img src=\"' . base_url(FNOIMAGE) . '\">';\n } else {\n $msg .= '<img src=\"' . base_url(MNOIMAGE) . '\">';\n }\n }\n $msg .= '</td>\n </tr>\n <tr>\n <td style=\"text-align:center; padding:10px 0 30px; font-size:15px;\">';\n $msg .= '<p style=\"margin:0;\">Hi,' . ucwords($firstname) . ucwords($lastname) . '</p>\n <p style=\"padding:25px 0 ; margin:0;\">Aileensoul has send you verification mail for verify your account successfully.</p>\n <p><a class=\"btn\" href=\"' . base_url() . 'registration/verify/' . $userid . '\">verify account</a></p>\n </td>\n </tr>';\n\n // $msg = \"Hey !\" . $username .\"<br/>\"; \n // $msg .= \" \" . $firstname . \" \" . $lastname . \",\";\n // $msg .= \"Click hear to verify your account\";\n // $msg .= \"<br>\"; \n // $msg .= \"<a href='\".base_url().\"/registration/verify/\" . $userid . \"'>click here</a>\"; \n // echo $msg; die();\n $subject = \"Aileensoul account verification link\";\n\n $mail = $this->email_model->sendEmail($app_name = '', $app_email = '', $to_email, $subject, $msg);\n\n $allowedgmail = 'gmail.com';\n $allowedyahoo = 'yahoo.com';\n $hotmail = 'hotmail.com';\n $outlook = 'outlook.com';\n $rediff = 'rediffmail.com';\n $zoho = 'zoho.com';\n $mail = 'mail.com';\n $gmx = 'gmx.com';\n $gmx1 = 'gmx.us';\n $mailchimp = 'mailchimp.com';\n\n\n\n // $comapremaill[] = $email; \n // foreach($comapremaill as $key => $value) { \n if (strpos($to_email, $allowedgmail) !== false) {\n\n $usermail = 'https://accounts.google.com/';\n } elseif (strpos($toemail, $allowedyahoo) !== false) {\n $usermail = 'https://login.yahoo.com/';\n } elseif (strpos($toemail, $hotmail) !== false) {\n $usermail = 'https://outlook.live.com/';\n } elseif (strpos($toemail, $outlook) !== false) {\n $usermail = 'https://outlook.live.com/';\n } elseif (strpos($toemail, $rediff) !== false) {\n $usermail = 'https://mypage.rediff.com/login/';\n } elseif (strpos($toemail, $zoho) !== false) {\n $usermail = 'https://www.zoho.com/mail/login.html';\n } elseif (strpos($toemail, $mail) !== false) {\n $usermail = 'https://www.mail.com/int/';\n } elseif (strpos($toemail, $gmx) !== false || strpos($value, $gmx1) !== false) {\n $usermail = 'https://www.gmx.com/';\n } elseif (strpos($toemail, $mailchimp) !== false) {\n $usermail = 'https://login.mailchimp.com/';\n }\n\n // }\n echo $usermail;\n }", "title": "" }, { "docid": "a3c58137559b9de0066a62c121bab1ea", "score": "0.6371065", "text": "function sendMailToCorrectors($art_id)\n {\n $delivery_obj = new Ep_Delivery_Delivery();\n $article_obj = new EP_Delivery_Article();\n $user_obj = new Ep_User_User();\n $autoEmails = new Ep_Message_AutoEmails();\n $participate_obj = new Ep_Participation_CorrectorParticipation();\n $part_obj = new EP_Participation_Participation();\n $ao_id = $delivery_obj->getDeliveryID($art_id);\n $getpartcrts = $participate_obj->getCrtParticipationsUserIdsAll($art_id);\n $getpartwrts = $part_obj->getNotRefusedParticipationsUserIds($art_id);\n foreach($getpartcrts as $notsendmail)\n {\n $nomailsendlist[] = $notsendmail['corrector_id'];\n }\n foreach($getpartwrts as $notsendmailwrts)\n {\n $nomailsendlist[] = $notsendmailwrts['user_id'];\n }\n /* Sending mail to client when publish **/\n $delartdetails = $delivery_obj->getArticlesOfDel($ao_id);\n $expires=time()+(60*$delartdetails[0]['correction_participation']);\n $aoDetails=$delivery_obj->getPrAoDetailsWithArtid($art_id);\n $autoEmails=new Ep_Message_AutoEmails();\n $parameters['AO_title']=$aoDetails[0]['title'];\n $parameters['article_title'] = $aoDetails[0]['artname'];\n $parameters['AO_end_date']=$aoDetails[0]['delivery_date'];\n //$parameters['submitdate_bo']=$aoDetails[0]['submitdate_bo'];\n $parameters['submitdate_bo']=date('d/m/Y', $expires).\" &agrave; \".date('H:i', $expires);\n\n $parameters['noofarts']=$aoDetails[0]['noofarts'];\n if($aoDetails[0]['deli_anonymous']=='0')\n $parameters['article_link']=\"/contrib/aosearch?client_contact=\".$aoDetails[0]['user_id'];\n else\n $parameters['article_link']=\"/contrib/aosearch?client_contact=anonymous\";\n $parameters['aoname_link'] = \"/contrib/aosearch\";\n $parameters['clientartname_link'] = \"/client/quotes?id=\".$aoDetails[0]['articleid'];\n\t\t\n\t\t////if the mission is for test then///\n if($aoDetails[0]['missiontest'] == 'yes')\n $mailId = 104;\n else\n $mailId = 21;\n\n if($aoDetails[0]['corrector_privatelist']!= NULL)\n {\n $correctors=array_unique(explode(\",\",$aoDetails[0]['corrector_privatelist']));\n\t\t\t\n if(is_array($correctors) && count($correctors)>0)\n {\n foreach($correctors as $corrector)\n {\n if(!in_array($corrector,$nomailsendlist)) ///sending to only non participants\n $autoEmails->messageToEPMail($corrector,$mailId,$parameters);\n }\n }\n }\n elseif($aoDetails[0]['corrector_privatelist']== NULL)\n {\n $delviews = $delivery_obj->getDeliveryDetails($ao_id);\n $profiles = explode(\",\", $delviews[0]['corrector_list']);\n $profiles = implode(\",\", $profiles);\n // $contributors=$delivery_obj->getContributorsAO($profiles);\n /*added by naseer on 03.12.2015*/\n // check if the delivery is writer or translation//\n if($delviews[0]['product'] === 'translation'){\n //call this new function if the product is translation//\n $correctorswriters=$delivery_obj->getCorrectorsWritersAOTranslation($profiles, $aoDetails[0]['artLanguage']);\n $articleDetails = $article_obj->getArticleDetails($art_id);\n if($articleDetails[0]['sourcelang_nocheck_correction'] != 'yes'){\n $ao=0;\n $i = 0;\n foreach($correctorswriters as $correctorswriter) {\n $flag = true;//default value at begining\n //checking if source laug is compulsury to check, if source laung is compulsary to check then unserialize launge_more and check if the laung fluence is above 50%//\n $language_more = unserialize($correctorswriter['language_more']);\n $flag = fasle;\n foreach ($language_more as $key => $value) {\n if ($key === $articleDetails[0]['language_source'] && (int)$value >= 50) {\n $flag = true;//false true if the source launge is in lang more of contributor\n }\n }\n if($flag === true) {\n $correctorswriters_temp[$i++] = $correctorswriters[$ao];// initailizing recent offerts to temp variable//\n }\n $ao++;\n }\n $correctorswriters = $correctorswriters_temp;//inititailze temp array to original array after filtering the array//\n }\n }\n else{\n // if procut is redarection then call the old function //\n $correctorswriters=$delivery_obj->getCorrectorsWritersAO($profiles, $aoDetails[0]['artLanguage']);\n }\n //echo \"<pre>\";print_r($correctorswriters); exit;\n if(is_array($correctorswriters) && count($correctorswriters)>0)\n {\n foreach($correctorswriters as $correctorswriter)\n {\n if(!in_array($correctorswriter['identifier'],$nomailsendlist)) ///sending to only non participants\n {\n $autoEmails->messageToEPMail($correctorswriter['identifier'],$mailId,$parameters);///\n $arrayuser[] = $correctorswriter['identifier'];\n }\n\n }\n\n }\n }\n }", "title": "" }, { "docid": "7b38ea65cf9587021ba25058829b011e", "score": "0.6357757", "text": "function user_notification_email($email,$user) {\n\t$protocol_content = (Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://';\n\t$link=$protocol_content.$_SERVER['HTTP_HOST'];\n\t$sub=\"Thank You For Registration\";\n\t$vars = array(\n\t '{firstname}' => $user['fname'], \n\t\t\t'{lastname}' => $user['lname'], \n\t\t\t'{email}' => $email,\n\t\t\t'{passwd}'=> $user['pass']\n\t);\n $id_lang = (int)Configuration::get('PS_LANG_DEFAULT');\n\t\tMail::Send($id_lang, 'account',$sub, $vars, $email);\n}", "title": "" }, { "docid": "abf2f77df693d5edcf31e2f9b48968b8", "score": "0.63568026", "text": "function send_email()\n{\n\t$recipients = array(\"pres\" => \"[email protected]\", \"fac\" => \"[email protected]\", \"web\" => \"[email protected]\");\n\t$email_to = array_key_exists($_REQUEST['email_to'], $recipients) ? $recipients[$_REQUEST['email_to']] : \"[email protected]\";\n\t\n $message = $_REQUEST['msg'] . \"\\n\\n$_REQUEST[name]\\n$_REQUEST[email_from]\";\n\n $message = wordwrap($message,70);\n\t \n\t $headers = \"From: $_REQUEST[name] <$_REQUEST[email_from]>\";\n\n $output = mail($email_to,\"Comment from SIAM website\", $message, $headers);\n\t \n\t if($_REQUEST['bcc'] == \"1\")\n\t {\n\t\tmail($_REQUEST[\"email_from\"],\"Comment from SIAM website\", $message, $headers);\n\t }\n\t \n\t if($output)\n\t {\n\t\tprint(\"1\");\n\t }\n\t else\n\t {\n\t\tprint(\"0\");\n\t }\n}", "title": "" }, { "docid": "ca463c79d957c1300eaead11398b8b50", "score": "0.6356179", "text": "function tsEmail($tsEmailData,$tsEmailRef){\n\t\t$this->email_info = array(\n\t\t\t'ref' => $tsEmailRef,\n\t\t\t'data' => $tsEmailData\n\t\t\t);\n\t}", "title": "" }, { "docid": "c1ec06044f0e9fa6b2efebd5bba4cddd", "score": "0.63475347", "text": "function EHS_introductory_email(){\n\n\t\t$replace = array();\n \n /* code for show telespine menu on list */\n $replace['showmenu']=\"no\";\n if($this->clinicInfo('clinic_id')==$this->config['telespineid']){\n $replace['showmenu']=\"yes\";\n }\n /* code end */\n\t\t\t$replace['message'] =\"\";\n\t\t\t$replace['color']='';\n\t\tif($_REQUEST['save_introductory_email']=='submit'){\n\t\t $query = \" select * from clinic_ehs_mail_template where clinic_id = '{$this->clinicInfo(\"clinic_id\")}' \";\n\t\t $result = @mysql_query($query);\n\t\t if(trim($_REQUEST['subject']) ==''){\n\t\t \t$replace['message'] =\"Please enter subject for EHS Email Template\";\n\t\t \t$replace['color']='red;';\n\t\t }\n\t\t else\n\t\t {\n\t\t \t$data['clinic_id']=$this->clinicInfo(\"clinic_id\");\n\t\t \t$data['mailcontent']=$_REQUEST['subs_description'];\n\t\t \t$data['subject']=$_REQUEST['subject'];\n\t\t \t$data['status']='1';\n\t\t \t$data['accountadmin_id']=$this->userInfo('user_id');\n\t\t \tif($this->num_rows($result)>0){\n\t\t \t\t$this->update('clinic_ehs_mail_template', $data, 'clinic_id ='.$this->clinicInfo(\"clinic_id\"));\n\t\t \t}else{\n\t\t \t\t$this->insert( 'clinic_ehs_mail_template', $data);\n\t\t \t}\n\t\t \t$replace['message'] =\"EHS Mail Template saved successfully\";\n\t\t\t$replace['color']='green;';\n\t\t }\n\n\t\t}\n\n\t\t$userInfo = $this->userInfo();\n\t\t$cli_type=$this->getClinicDetails($this->userInfo('user_id'));\n\t\t// Make links for show and remove logo.\n\t\t//print_r($cli_type);\n\t\t$query = \" select * from clinic_ehs_mail_template where clinic_id = '{$this->clinicInfo(\"clinic_id\")}' \";\n\t\t$result = @mysql_query($query);\n\t\tif($this->num_rows($result)>0){\n\t\t\t$row=$this->fetch_object($result);\n\t\t}\n\t\t// set template variables\n\n\t\t$replace['browser_title'] = 'Tx Xchange: EHS Intro Email';\n\t\t$tab_array = $this->tab_url();\n\t\t//print_r($tab_array);\n\t\tif($_REQUEST['save_introductory_email']==\"submit\"){\n\t\t\t$replace['subject']=$_REQUEST['subject'];\n\t\t\t$replace['subs_description']=$_REQUEST['subs_description'] ;\n\t\t}else{\n\t\t\t$replace['subs_description']=$row->mailcontent ;\n\t\t\t$replace['subject']=$row->subject ;\n\t\t}\n\t\t$replace['navigationTab'] = $this->build_template($this->get_template(\"tabNavigationHead\"),$tab_array);\n\t\t$replace['footer'] = $this->build_template($this->get_template(\"footer\"));\n\t\t$replace['header'] = $this->build_template($this->get_template(\"header\"));\n\t\t$replace['sidebar'] = $this->sidebar();\n\t\tif($this->is_corporate($clinicId)==1){\n $replace['body'] = $this->build_template($this->get_template(\"corporate\"),$replace);\n }else{\n $replace['body'] = $this->build_template($this->get_template(\"website\"),$replace);\n }\n \n \n\t\t$this->output = $this->build_template($this->get_template(\"main\"),$replace);\n \n\t}", "title": "" }, { "docid": "265e92dc34fb0bae751161d07db91a28", "score": "0.63439494", "text": "private function emailErrorLog($email,$data) {\n\t\t\n\t}", "title": "" }, { "docid": "71ac4bd3acadaa6a092570b40c7245e8", "score": "0.63411176", "text": "function forumanonymous_make_mail_html($course, $cm, $forumanonymous, $discussion, $post, $userfrom, $userto) {\n global $CFG;\n\n if ($userto->mailformat != 1) { // Needs to be HTML\n return '';\n }\n\n if (!isset($userto->canpost[$discussion->id])) {\n $canreply = forumanonymous_user_can_post($forumanonymous, $discussion, $userto, $cm, $course);\n } else {\n $canreply = $userto->canpost[$discussion->id];\n }\n\n $strforumanonymouss = get_string('forumanonymouss', 'forumanonymous');\n $canunsubscribe = ! forumanonymous_is_forcesubscribed($forumanonymous);\n $shortname = format_string($course->shortname, true, array('context' => context_course::instance($course->id)));\n\n $posthtml = '<head>';\n/* foreach ($CFG->stylesheets as $stylesheet) {\n //TODO: MDL-21120\n $posthtml .= '<link rel=\"stylesheet\" type=\"text/css\" href=\"'.$stylesheet.'\" />'.\"\\n\";\n }*/\n $posthtml .= '</head>';\n $posthtml .= \"\\n<body id=\\\"email\\\">\\n\\n\";\n\n $posthtml .= '<div class=\"navbar\">'.\n '<a target=\"_blank\" href=\"'.$CFG->wwwroot.'/course/view.php?id='.$course->id.'\">'.$shortname.'</a> &raquo; '.\n '<a target=\"_blank\" href=\"'.$CFG->wwwroot.'/mod/forumanonymous/index.php?id='.$course->id.'\">'.$strforumanonymouss.'</a> &raquo; '.\n '<a target=\"_blank\" href=\"'.$CFG->wwwroot.'/mod/forumanonymous/view.php?f='.$forumanonymous->id.'\">'.format_string($forumanonymous->name,true).'</a>';\n if ($discussion->name == $forumanonymous->name) {\n $posthtml .= '</div>';\n } else {\n $posthtml .= ' &raquo; <a target=\"_blank\" href=\"'.$CFG->wwwroot.'/mod/forumanonymous/discuss.php?d='.$discussion->id.'\">'.\n format_string($discussion->name,true).'</a></div>';\n }\n $posthtml .= forumanonymous_make_mail_post($course, $cm, $forumanonymous, $discussion, $post, $userfrom, $userto, false, $canreply, true, false);\n\n if ($canunsubscribe) {\n $posthtml .= '<hr /><div class=\"mdl-align unsubscribelink\">\n <a href=\"'.$CFG->wwwroot.'/mod/forumanonymous/subscribe.php?id='.$forumanonymous->id.'\">'.get_string('unsubscribe', 'forumanonymous').'</a>&nbsp;\n <a href=\"'.$CFG->wwwroot.'/mod/forumanonymous/unsubscribeall.php\">'.get_string('unsubscribeall', 'forumanonymous').'</a></div>';\n }\n\n $posthtml .= '</body>';\n\n return $posthtml;\n}", "title": "" }, { "docid": "477bfb17b616a4bea544d366bce4091e", "score": "0.6322485", "text": "function getMail();", "title": "" }, { "docid": "637d649564fd9cab77c91d854f81d28d", "score": "0.6322279", "text": "function send_mail($data){\n#like storing into database or sending email to admin\n}", "title": "" }, { "docid": "aec152e69cc65a2c0df51125c0580d37", "score": "0.6321158", "text": "public function _sendMail()\n {\n $filter = new FriendlyUrl();\n $subject = $filter->filter($this->_mail->getSubject());\n $directory = APPLICATION_PATH . '/../var/debug-mail/';\n $fullPath = $directory . 'mail-' . $subject. '.html';\n $file = File::create($fullPath);\n if ($this->_mail->getBodyHtml()) {\n $content = quoted_printable_decode(\n $this->_mail->getBodyHtml()->getContent()\n );\n } else {\n $content = quoted_printable_decode(\n $this->_mail->getBodyText()->getContent()\n );\n }\n $file->write($content);\n }", "title": "" }, { "docid": "0d71aa432724642d965dcb59fb1d3c85", "score": "0.6321112", "text": "function tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address) {\n\t\t$from_email_address = trim(implode('', array_map('trim', explode(\"\\n\", $from_email_address))));\n\t\t$from_email_name = trim(implode('', array_map('trim', explode(\"\\n\", $from_email_name))));\n\t\t$email_text = tep_html_entity_decode($email_text);\n\t\t$recipients = explode(',', $to_email_address);\n\t\treset($recipients);\n\t\twhile (list(, $to_email_address) = each($recipients)) {\n\t\t $to_email_address = trim($to_email_address);\n\t\t if (tep_not_null($to_email_address)) {\n\t\n\t\t \t// Instantiate a new PHPMailer object\n\t\t \t$mail = new PHPMailer();\n\t\t \t$mail->CharSet = 'windows-1251';\n\t\t \t\n\t\t \t// Build the text version\n\t $text = strip_tags($email_text);\n\t \n\t $mail->SetFrom($from_email_address, $from_email_name);\n\t \n\t $mail->AddAddress($to_email_address, $to_name);\n\t \n\t $mail->Subject = $email_subject;\n\t \n\t $mail->AddReplyTo($from_email_address, $from_email_name);\n\t\t\t\n\t\t\t if (EMAIL_USE_HTML == 'true' && $from_email_address==STORE_OWNER_EMAIL_ADDRESS) {\n\t\t\t ob_start();\n\t\t\t include(DIR_FS_CATALOG . 'images/mail/email_header.php');\n\t\t\t echo preg_replace('~[\\n\\r][\\n\\r]+~', '<br/><br/>', $email_text);\n\t\t\t include(DIR_FS_CATALOG . 'images/mail/email_footer.php');\n\t\t\t $email_text_html = ob_get_clean();\n\t\t\t $email_text_html = str_replace('<title></title>', '<title>' . $email_subject . '</title>', $email_text_html);\n\t\t\t $mail->MsgHTML($email_text_html);\n\t\t\t } else {\n\t\t\t $mail->Body = $text;\n\t\t\t }\n\t\t\t \n\t\t\t $mail->IsSMTP();\n $mail->SMTPAuth = true; // enable SMTP authentication\n //$mail->SMTPSecure = \"ssl\"; // sets the prefix to the servier\n //$mail->Host = \"ex.setbook.ru\"; // sets the SMTP server\n $mail->Host = \"mail.setbook.ru\"; // sets the SMTP server\n $mail->Port = 587; // set the SMTP port\n\t//$mail->Port = 25; // set the SMTP port\n\n //$mail->Username = \"[email protected]\"; // username\n\t$mail->Username = \"shop\"; // username\n $mail->Password = \"Alexander2010\"; // password\n\n\ttep_email_log('Sending');\t\t\t \n if(!$mail->Send()) {\n\t\ttep_email_log(\"Mailer Error: \" . $mail->ErrorInfo);\n\t\t\t \ttep_log(\"Mailer Error: \" . $mail->ErrorInfo, $mail, 'mail.errors');\n\t }\n\ttep_email_log('Sent');\n\n\t\t }\n\t\t}\n }", "title": "" }, { "docid": "072a3402a2e3a1c11af5a0cc1d0f7802", "score": "0.6316548", "text": "function send_next_task_email($schedule_task_id){\r\n\t$arr_project = get_project_info_by_schedule_task($schedule_task_id);\r\n\t$project_id = $arr_project[0][\"project_id\"];\r\n\t$project_name = $arr_project[0][\"project_name\"];\r\n\t$project_code = $arr_project[0][\"project_code\"];\r\n\t$project_manager_name = $arr_project[0][\"pm_fname\"] . \" \" . $arr_project[0][\"pm_lname\"];\r\n\t$schedule_id = $arr_project[0][\"schedule_id\"];\r\n\t$schedule_name = $arr_project[0][\"schedule_name\"];\r\n\t$task_name = $arr_project[0][\"task_name\"];\r\n\t$approved_by = $arr_project[0][\"approved_by\"];\r\n\t$approval_date = $arr_project[0][\"approval_date\"];\r\n\t$approver_name = $arr_project[0][\"a_fname\"] . \" \" . $arr_project[0][\"a_lname\"];\r\n\t$body = \"\";\r\n\t$arr_assignee_list = get_assignees_by_stid($schedule_task_id);\r\n\tif (!empty($arr_assignee_list)){\r\n\t\tforeach ($arr_assignee_list as $user_row){\r\n\t\t\t$checked = \"\";\r\n\t\t\t$initials = $user_row[\"initials\"];\r\n\t\t\t$user_full_name = $user_row[\"first_name\"] . \" \" . $user_row[\"last_name\"];\r\n\t\t\t$user_email = $user_row[\"email\"];\r\n\t\t\t$recipient_user_id = $user_row[\"user_id\"];\r\n\t\t\t$altbody .= \"Project: \" . $project_name . \"(\" . $project_code . \")\\n\";\r\n\t\t\t$altbody .= \"Task: \" . $task_name . \"\\n\";\r\n\t\t\t$altbody .= \"Project Manager: \" . $project_manager_name . \"\\n\\n\";\r\n\t\t\t$altbody .= \"Hi \" . $user_full_name . \",\\n\\n\";\r\n\t\t\t$altbody .= \"You're up. Please complete \" . $task_name . \" for project \" . $project_code . \":\\n\\n\";\r\n\t\t\t$altbody .= \"Project Info: http://ac-00019162.apollogrp.edu/pm/manage_project.php?p=\" . $project_id . \"\\n\\n\";\r\n\t\t\t$altbody .= \"When you are finished, please click this link to complete the task:\\n\";\r\n\t\t\t$altbody .= \" http://ac-00019162.apollogrp.edu/pm/fast_track_complete.php?stid=\" . $schedule_task_id. \"\\n\\n\";\r\n\t\t\t$altbody .= \"Thank you,\\n\\n\";\r\n\t\t\t$altbody .= $project_manager_name;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$body .= \"<font style=\\\"font-family:Arial, Helvetica, sans-serif;line-height:18px; font-size:13px; color:#333333;text-align:left\\\">\";\r\n\t\t\t$body .= \"<b>Project: <a href = \\\"http://ac-00019162.apollogrp.edu/pm/manage_project.php?p=\" . $project_id . \"\\\">\" . $project_name . \"(\" . $project_code . \")</a><br>\";\r\n\t\t\t$body .= \"Task: \" . $task_name . \"<br>\";\r\n\t\t\t$body .= \"Project Manager: \" . $project_manager_name . \"</b><br><br>\";\r\n\t\t\t$body .= \"Hi \" . $user_full_name . \",<br><br>\";\r\n\t\t\t$body .= \"You're up. Please complete \" . $task_name . \" for project \" . $project_code . \":<br><br>\";\r\n\t\t\t$body .= \"When you are finished, please <br><a href = \\\"http://ac-00019162.apollogrp.edu/pm/fast_track_complete.php?stid=\" . $schedule_task_id . \"\\\">CLICK HERE TO COMPLETE THE TASK</a><br><br>\";\r\n\t\t\t$body .= \"Thank you,<br><br>\";\r\n\t\t\t$body .= $project_manager_name;\r\n\t\t\t$body .= \"</font>\";\r\n\r\n\t\t\t$to = $user_email;\r\n\t\t\t//print $to;\r\n\t\t\t$subject = \"Project \" . $project_code . \" - Your turn\";\r\n\t\t\t$send_success = smtpmailer($to, $subject, $body, $altbody);\r\n\t\t\tif ($send_success == 1){\r\n\t\t\t\t$send_success = \"Success\";\r\n\t\t\t}else{\r\n\t\t\t\t$send_success = \"Fail\";\r\n\t\t\t}\r\n\t\t\t$email_send = insert_email_send(\"Fast Track\", $project_id, $schedule_task_id, $recipient_user_id, $send_success);\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "688d56dd24707afeafead9f1763221bf", "score": "0.6316415", "text": "function mailMe($saddress,$scaption,$stitle) {\n//variables\n\t$eaddress= \"\";\n\t$sdomain= \"\";\n\t$aextra = \"\";\n\n\t//begin parsing\n\tlist($eaddress, $sdomain)= explode('@', $saddress);\n\tlist($sdomain, $aextra) = explode('\\?', $sdomain);\n\t$sdomain = ereg_replace('\\.', '#', $sdomain);\n\n\t//create the js address\n\t$smailme = \"mom('\".urlencode( $sdomain );\n\tif($aextra != \"\" ) {\n\t\t$smailme .= \"?\" . $aextra;\n\t}\n\t$smailme .= \"','\" . urlencode( $eaddress ) . \"')\";\n\n\t//build the js events\n\t$sbuild =\" onmouseover=\\\"javascript:this.href=$smailme;\\\"\";\n\t$sbuild.=\" onfocus=\\\"javascript:this.href=$smailme;\\\"\";\n\n\t//return\n\treturn \"<a href=\\\"/contact/\\\"$sbuild title=\\\"$stitle\\\">$scaption</a>\";\n}", "title": "" }, { "docid": "473aad88b3d762212f36ecc281ea0a24", "score": "0.63161904", "text": "function admin_email_send() {\n\t\t$this->data['Reminder']['company_id'] = $this->Auth->user('company_id');\n\t\t\n\t\t$time = $this->get_service_dates($this->data);\n\t\t\n\t\t$this->data['Reminder']['service_date_from'] = $time['from'];\n\t\t$this->data['Reminder']['service_date_to'] = $time['to'];;\n\t\t\n\t\t// create the reminder\n\t\tif(!$this->data['Reminder']['id']) {\n\t\t\t$this->Reminder->create($this->data);\n\t\t}\n\t\t\n\t\tif($this->data['Reminder']['technician_id'] == '') {\n\t\t\t$this->data['Reminder']['technician_id'] = 0;\n\t\t}\n\t\t\n\t\t// generate the image (file based)\n\t\t$image_name = $this->generate_image($this->data, 'FILE');\n\t\t\n\t\t// set the image before sending email\n\t\t$this->data['Reminder']['image_path'] = $image_name;\n\n\t\t// now do the email!\n\t\t$this->send_email($this->data);\n\t\t\n\t\t$this->data['Reminder']['sent'] = 1;\n\t\t$this->Reminder->save($this->data);\n\n\t\t// save cookie of last selected technician and theme\n $this->Cookie->write('tech_id', $this->data['Reminder']['technician_id'], false, '+4 weeks');\n\t\t$this->Cookie->write('theme', $this->data['Reminder']['theme'], false, '+4 weeks');\n\t\t\n\t\t$this->Session->setFlash('Your reminder has been sent!', 'default', array('class' => 'flash-success'));\n\t\t$this->redirect(array('action' => 'index'));\n\t}", "title": "" }, { "docid": "0d67b44537dbab8723b6a2f7014fe546", "score": "0.6315032", "text": "function sendemail($type,$detail1,$detail2)\n{\n\n\t# create new phpmailer instance\n\n\t$mail = new phpmailer();\n\n\t# send via SMTP\n\t$mail->IsSendmail()\t;\n\t$mail->Host \t\t= \t\"texaco.rsmsecure.com\"\t\t\t\t\t; // SMTP servers\n\n\t$mail->FromName\t= 'WEOU Server'; // text for \"From\" shown to recipient e.g. RSM Admin\n\t$mail->From\t= '[email protected]'; // email address for \"From\" shown to recipient\n\t$mail->AddReplyTo('[email protected]', 'Peter Seymour'); // the reply to mail address and name\n\t$mail->Sender =\t'[email protected]'; // the envelope sender(server) of the email for undeliverable mail\n\n\t$mail->WordWrap = 50\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t; // set word wrap\n\t$mail->IsHTML(true)\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t; // set mail as html\n\n\n\tswitch ($type)\n\t{\n\n\t\tcase 'IssuesListNewItem':\n\n\t\t\t#\tFor this case $detail1 contains the issue number so lets go and retrieve some details\n\n\t\t\t$sql = \"select * from Issues where IssueNo = $detail1\";\n\t\t\t$Results = DBQueryExitOnFailure( $sql );\n\t\t\t$row = mysql_fetch_assoc( $Results );\n\n\t\t\t$mail->AddAddress(\"[email protected]\",\"Peter Seymour\")\t; // mail recipient\n\t\t\t$mail->AddAddress(\"[email protected]\",\"Jon Boardman\")\t; // mail recipient\n//\t\t\t$mail->AddAddress(\"[email protected]\",\"Hannah Fitzgerald\")\t; // mail recipient\n//\t\t\t$mail->AddAddress(\"[email protected]\",\"Ed Wilson\")\t; // mail recipient\n//\t\t\t$mail->AddAddress(\"[email protected]\",\"Patricia Vogelenzang\")\t; // mail recipient\n\n\t\t\t#\t$mail->AddAttachment(\"$filepath$attachment\", \"$attachment\")\t\t\t\t\t\t\t\t; // add attachment file names and descriptions\n\n\t\t\t$mail->Subject = \"New Issue Created - $row[ShortDescription]\" ; // set mail subject\n\n\t\t\t$mail->Body = \"<p>\n\t\t\t\t\t\t <font color=\\\"#004080\\\" size=\\\"-1\\\" face=\\\"Trebuchet MS, Tahoma, Verdana, Arial\\\">\n<BR><strong>Issue Details</strong>\n<table class=\\\"table2\\\" width=\\\"50%\\\" >\n<tr>\n\t<td>Creation Date</td><td> = $row[CreationDate]</td>\n</tr>\n<tr>\n\t<td>Created By</td><td> = $row[CreatedBy]</td>\n</tr>\n<tr>\n\t<td>Priority</td><td> = $row[PriorityGrp]</td>\n</tr>\n<tr>\n\t<td>Responsibility</td><td> = $row[Responsablity]</td>\n</tr>\n<tr>\n\t<td valign=top>Description</td><td> = $row[Description]</td>\n</tr>\n</table>\n<br></font>\";\n\n\t\tbreak;\n\n\n\n\n\n\t\tcase 'IssuesListItemEdit':\n\n\t\t\t#\tFor this case $detail1 contains the issue number and $detail2\n\t\t\t#\tcontains the changed item details so lets go and retrieve some details\n\n\t\t\t$sql = \"select * from Issues where IssueNo = $detail1\";\n\t\t\t$Results = DBQueryExitOnFailure( $sql );\n\t\t\t$row = mysql_fetch_assoc( $Results );\n\n\t\t\t$mail->AddAddress(\"[email protected]\",\"Peter Seymour\")\t; // mail recipient\n//\t\t\t$mail->AddAddress(\"[email protected]\",\"Nick Meanley\")\t; // mail recipient\n\t\t\t$mail->AddAddress(\"[email protected]\",\"Jon Boardman\")\t; // mail recipient\n//\t\t\t$mail->AddAddress(\"[email protected]\",\"Hannah Fitzgerald\")\t; // mail recipient\n//\t\t\t$mail->AddAddress(\"[email protected]\",\"Matt Slade\")\t; // mail recipient\n//\t\t\t$mail->AddAddress(\"[email protected]\",\"Ed Wilson\")\t; // mail recipient\n//\t\t\t$mail->AddAddress(\"[email protected]\",\"Patricia Vogelenzang\")\t; // mail recipient\n\n\t\t\t#\t$mail->AddAttachment(\"$filepath$attachment\", \"$attachment\")\t\t\t\t\t\t\t\t; // add attachment file names and descriptions\n\n\t\t\t$mail->Subject = \"Issue Edited - $row[ShortDescription]\" ; // set mail subject\n\n\t\t\t$mail->Body = \"<p>\n\t\t\t\t\t\t <font color=\\\"#004080\\\" size=\\\"-1\\\" face=\\\"Trebuchet MS, Tahoma, Verdana, Arial\\\">\n<BR><strong>Issue Details</strong>\n<table class=\\\"table2\\\" width=\\\"50%\\\" >\n<tr>\n\t<td>Creation Date</td><td> = $row[CreationDate]</td>\n</tr>\n<tr>\n\t<td>Created By</td><td> = $row[CreatedBy]</td>\n</tr>\n<tr>\n\t<td>Priority</td><td> = $row[PriorityGrp]</td>\n</tr>\n<tr>\n\t<td>Responsibility</td><td> = $row[Responsablity]</td>\n</tr>\n<tr>\n\t<td valign=top>Description</td><td> = $row[Description]</td>\n</tr>\n<tr>\n\t<td>Change</td><td> = $detail2</td>\n</tr>\n</table>\n<br></font>\";\n\n\t\tbreak;\n\n\n\n\n\n\n\n\n\n\t}\n\t\t\t\t\t\t\t\t\t;\n\n\n\t/*\n\n\t report back on whether the mail send was successful or not....\n\n\t*/\n\n\n\tif(!$mail->Send())\n\t\t{\n\t\t\t$dbMailSent = \"Mail Send - fail\"\t\t\t\t\t\t\t\t;\n\t\t}\n\n\telse\n\n\t\t{\n\t\t\t$dbMailSent = \"Mail Send - pass\"\t\t\t\t\t\t\t\t;\n\t\t}\n\n\t# echo \"$dbMailSent<br />\"\t\t\t\t\t\t\t\t\t\t\t\t;\n\n}", "title": "" }, { "docid": "37d7d3012fb1bfd4a608af24b6c7bb81", "score": "0.6311924", "text": "function send_email_to_patron() {\n $headers = \"\";\n $headers .= \"MIME-Version: 1.0\\r\\n\";\n $headers .= \"Content-Type: text/html; charset=UTF-8\\r\\n\";\n\n $body = read_template(\"patron_email_body.php\");\n\n mail($_POST['email'],\n 'Skeen Library Course Item Reservation',\n $body,\n $headers);\n}", "title": "" }, { "docid": "d218bcbf6a2cd594e95e62c0844b1dcf", "score": "0.6308901", "text": "function email($cust_email,$message,$from,$subject,$name)\n\n{\n$from = preg_replace(\"([\\r\\n])\", \"\", $from);\n$subject = preg_replace(\"([\\r\\n])\", \"\", $subject);\n$cust_email = preg_replace(\"([\\r\\n])\", \"\", $cust_email);\n\n$match = \"/(bcc:|cc:|content\\-type:)/i\";\nif (preg_match($match, $from) ||\n preg_match($match, $subject) ||\n preg_match($match, $message)) {\n die(\"Header injection / Spam Attempt detected.. Cannot continue \");\n}\n\n\n\t\t$http_host = 'safedataxchange.com'; // Web address where email is being sent \n\t\t$sEmail=\"$cust_email\"; // To \n//\t\t$strSenderEmail = \"no-reply@$http_host\"; // From\n\t\t$strSenderEmail = $from; // From\n\t\t$strSenderName =\"$name\"; \n\t\t$subject=$subject;\n//\t\t$subject=\"Your Refund Request Approved\";\n\t\t$delimiter = \"\\n\";\n\t\t// ------------------- Email Headers [Dont Change it] ---------------------------\n\t\t$headers = 'From: '. $strSenderName .' <' . $strSenderEmail . '>' . $delimiter;\n\t\t$headers .= 'Reply-To: ' . $strSenderEmail . $delimiter;\n\t\t$headers .= 'Return-Path: ' . $strSenderEmail . $delimiter;\n\t\t$headers .= 'MIME-Version: 1.0' . $delimiter;\n\t\t$msgid = '<' . gmdate('YmdHs') . '.' . substr(md5($message . microtime()), 0, 6) . rand(100000, 999999) . '@' . $http_host . '>';\n\t\t$headers .= 'Message-ID: ' . $msgid . $delimiter;\n\t\t$headers .= 'X-Priority: 3' . $delimiter;\n\t\t$headers .= 'X-Mailer: Private Mailer' . $delimiter;\n\t\t$headers .= 'Content-Type: text/html; charset=\\\"iso-8859-1\\\"' . $delimiter;\n\t\t$headers .= \"Content-Transfer-Encoding: 8bit\" . $delimiter;\n\t\t// ---------------------- End Email Headers ------------------------------------ \n\t\t// ---------------------- HTML EMAIL MESSAGE ---------------------------------------\n/*$message = \"<html>\n<head>\n<title>Refund Request Approved</title>\n</head>\n<body>\n<p>Dear Valued Customer,</p>\n<p>Your Refund request has been approved and your account will be credited with $\".$inv_info['totalamt'].\" within two weeks. Thank you for being with us</p>\n</body>\n</html>\n\";*/\n\t\t// ---------------------- END HTML EMAIL MESSAGE ---------------------------------------\n\n\t\tif(!mail($sEmail, $subject, $message, $headers))\n\t\t{\n\t\t\tprint \"failed\";\n\t\t}\n\n\n}", "title": "" }, { "docid": "fe760ccd034354cc3c2063b6c1523eaf", "score": "0.6304157", "text": "public function email()\n {\n }", "title": "" }, { "docid": "9b9070844cf87c99d4efedffa67bea17", "score": "0.6302846", "text": "protected function _sendEmail($msg) {\n\t\tMage::getModel('hawksearch_datafeed/email')->setData('msg', $msg)->send();\n\t}", "title": "" }, { "docid": "3035390e9b0e56517ba6f9ebbc4eb67b", "score": "0.63027394", "text": "function mail2Approver($to,$rq_id){\n\t\t\t\n\t\t\t\n\t\t$subject = 'UFOs:Please to approve UFOs Request:'.displayID($rq_id);\n\t\t$message = 'Please to approve UFOs Request:'.displayID($rq_id).\" \\r\\n\" .\n\t\t\t\t 'You can to approve via link => http://ufos.cpf.co.th/data_request_update_detail.php?id='.$rq_id;\n\t\t$headers = 'From: [email protected]' . \"\\r\\n\" .\n\t\t\t\t'X-Mailer: PHP/' . phpversion();\n\n\t\tmail($to, $subject, $message, $headers);\n\t\n\t}", "title": "" }, { "docid": "97c7aff1f844801fe2402eb38d34204d", "score": "0.6295723", "text": "function email($message,$subj,$email_to,$optional_email_to,$email_from,$sender_name) \n\t{ \n\t\t$client = new SoapClient('https://api.jangomail.com/api.asmx?WSDL');\n\t\t$parameters = array\n\t\t(\n\t\t\t'Username' => (string) 'athoody',\n\t\t\t'Password' => (string) 'projecthoodie',\n\t\t\t'FromEmail' => $email_from,\n\t\t\t'FromName' => $sender_name,\n\t\t\t'ToEmailAddress' => $email_to,\n\t\t\t'Subject' => $subj,\n\t\t\t//'MessagePlain' => $message,\n\t\t\t'MessageHTML' => $message,\n\t\t\t'Options' => (string) 'CC=' . $optional_email_to . ',[email protected]'\n\t\t);\n\t\n\t\t//email\n\t\ttry\n\t\t{\n\t\t\t$response = $client->SendTransactionalEmail($parameters);\n\t\t}\n\t\tcatch(SoapFault $e)\n\t\t{\n\t\t\techo $client->__getLastRequest();\n\t\t}\n\t}", "title": "" }, { "docid": "551184a4087144ddf90366410814ac53", "score": "0.6294703", "text": "function mail_message($data_array, $template_file, $deadline_str) {\n $email_message = file_get_contents($template_file);\n $email_message = str_replace(\"#DATE#\", date(\"F d, Y h:i a\"), $email_message);\n $email_message = str_replace(\"#NAME#\", $data_array['name'], $email_message);\n $email_message = str_replace(\"#EMAIL#\", $data_array['email'], $email_message);\n \n \n #construct the email headers\n $to = \"[email protected]\"; //for testing purposes, this should be YOUR email address.\n $from = $data_array['email'];\n $email_subject = \"CONTACT #\".time().\": \".$data_array['subject'];\n\n #now mail\n mail($to, $email_subject, $email_message, \"From: \".$from);\n \n}", "title": "" }, { "docid": "51b148f067f053883f9c87c679d5b8be", "score": "0.6294248", "text": "public function send_email($name,$email,$content,$link,$title,$button_title){\n\n $body = '\n\n <!doctype html>\n <html xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:o=\"urn:schemas-microsoft-com:office:office\">\n <head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"><meta name=\"ROBOTS\" content=\"NOINDEX, NOFOLLOW\"><meta name=\"referrer\" content=\"no-referrer\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n <style type=\"text/css\">\n\n .maintable {\n border-collapse: collapse;\n width: 100%;\n}\n\nth, td {\n text-align: left;\n padding: 8px;\n}\n\n.maintable tr:nth-child(even){background-color: #f2f2f2}\n\nth {\n background-color: #4CAF50;\n color: white;\n}\n</style>\n</head>\n<body>\n<div style=\"background-color: #ccc;\">\n<table width=\"830\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-family:Calibri,Candara,Segoe,&quot;Segoe UI&quot;,Optima,Arial,sans-serif;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration:none;margin:0px auto;background-color:rgb(255,255,255)\">\n<tbody>\n<tr style=\"background-color: #f22f2f2; height: 30px;\"> </tr>\n\n<tr style=\"background-color: #f2f2f2;\">\n<td>\n<table>\n<tbody>\n<tr>\n<td width=\"610\">&nbsp;</td>\n<td width=\"130\" style=\"padding: 15px;\" align=\"left\" valign=\"bottom\"><img src=\"http://www.primeramfbank.com/sites/default/files/primera.png\" alt=\"Primera Logo\" width=\"278\" class=\"CToWUd\"></td>\n<td width=\"610\">&nbsp;</td>\n</tr>\n</tbody>\n</table>\n</td>\n</tr>\n\n<tr style=\"background-color: #f22f2f2; height: 30px;\"> </tr>\n\n<tr>\n<td style=\"padding:50px 40px 10px;font-size:20px\">Dear '.$name.',</td>\n</tr>\n<tr>\n<td style=\"padding:10px 40px;color:#093263;font-size:36px;letter-spacing:-1px;font-weight:bold\"><span style=\"text-decoration:underline; text-align: center;\">'.$title.' </span><span class=\"m_4920298691540864634Apple-converted-space\">&nbsp;</span></td>\n</tr>\n<tr>\n<td style=\"padding:10px 40px 20px; font-size:17px\"><br> '.$content.' </td>\n\n</tr>\n\n\n\n<tr><td style=\"padding:10px 40px 20px\">Please click Button Below to proceed <br> <br></tr><tr>\n<td style=\"padding:10px 40px 20px\"> <a href=\"'.$link.'\"> <button style=\"background-color: #093263; color: #fff;font-size: 20px;border-radius: 8px; padding: 10px; cursor: pointer;\"> '.$button_title.' </button></a></td>\n</tr><tr>\n<td style=\"padding:20px 40px 40px\"><br><br>For further enquiries, please send an email to<span class=\"m_4920298691540864634Apple-converted-space\">&nbsp;</span><a href=\"mailto:[email protected]\" target=\"_blank\">[email protected]</a><span class=\"m_4920298691540864634Apple-converted-space\">&nbsp;</span>\n<br><br>Your partner for growth.<br><br>Regards,<br><br><br><span style=\"font-weight:bold\">Primera Internal Resource Stream.</span></td>\n</tr><tr>\n<td style=\"padding:10px 40px;background-color:rgb(238,238,238)\">\n<table width=\"300\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n</table>\n</td>\n</tr>\n<br><br>\n<tr style=\"background-color: #f22f2f2; height: 30px;\"> </tr>\n\n<tr style=\"background-color: #f1f1f1;\">\n<td>\n<table border=\"0\" cellspacing=\"8\" cellpadding=\"8\" style=\"text-align: center;\"> <br><br>\n<tbody>\n<tr valign=\"top\" align=\"center\">\n\n<td width=\"220\" height=\"50\"> <center><a href=\"http://www.primeramfbank.com\" style=\"color:rgb(62,70,81);text-decoration:none;font-weight:bold\" target=\"_blank\"><span style=\"color:rgb(62,70,81);text-decoration:none\">IRS LOGIN</span></a><br><a href=\"http://irs.primeramfbank.com/\" style=\"color:rgb(62,70,81);text-decoration:none\" target=\"_blank\" ><span style=\"color:rgb(62,70,81);text-decoration:none;font-size:10px\">irs.primeramfbank.com</span></a></center></td>\n<td width=\"230\" height=\"50\"><center><a href=\"mailto:[email protected]\" style=\"color:rgb(62,70,81);text-decoration:none;font-weight:bold\" target=\"_blank\"><span style=\"color:rgb(62,70,81);text-decoration:none\">Email</span></a><br><a href=\"mailto:[email protected]\" style=\"color:rgb(62,70,81);text-decoration:none\" target=\"_blank\"><span style=\"color:rgb(62,70,81);text-decoration:none;font-size:10px\">[email protected]</span></a><br></center></td>\n<td width=\"230\" height=\"50\"><center><a href=\"http://www.primeramfbank.com\" style=\"color:rgb(62,70,81);text-decoration:none;font-weight:bold\" target=\"_blank\"><span style=\"color:rgb(62,70,81);text-decoration:none\">Website</span></a><br><a href=\"http://www.primeramfbank.com/\" style=\"color:rgb(62,70,81);text-decoration:none\" target=\"_blank\"><span style=\"color:rgb(62,70,81);text-decoration:none;font-size:10px\">www.primeramfbank.com</span></a></center></td>\n</tr>\n</tbody>\n</table>\n</td>\n</tr>\n<tr style=\"background-color: #f22f2f2; height: 30px;\"> </tr>\n\n<tr style=\"background-color: #f1f1f1;\">\n<td style=\"height:50px\">&nbsp;</td>\n</tr>\n</tbody>\n</table>\n</div>\n</body>\n</html>\n\n';\n\n\n\n$subject = ''.$title.'';\n\n\n //$headers = array('[email protected],From: Primera MFB');\n$headers = 'From: Primera Microfinance Bank <[email protected]>' . \"\\r\\n\";\n // $headers = \"Bcc: [email protected]\";\n$headers = \"MIME-Version: 1.0\\r\\n\";\n$headers = \"Content-Type: text/html; charset=UTF-8\\r\\n\";\n\n // $headers[] = 'Cc: [email protected]';\n //$headers[] = 'Cc: [email protected]';\n\n\n//$headers[] = 'Bcc: [email protected]';\n\n //Send the email\n //add_filter('wp_mail_content_type', create_function('', 'return \"text/html\"; '));\nwp_mail(''.$email.'', $subject, $body, $headers);\n //remove_filter('wp_mail_content_type', 'set_html_content_type');\n\n\n\n}", "title": "" }, { "docid": "a1bf216ac5247b6ba258f668917c3a24", "score": "0.62914956", "text": "public function mwEmail( $atts ) {\n\n\t\t// address\n\t\t$defaultEmail = get_bloginfo( \"email\" );\n\t\t$customEmail = get_option( \"e-mail_address\" );\n\t\t\n\t\tif ( $customEmail ) {\n\n\t\t\t$email = $customEmail;\n\n\t\t} else { \n\n\t\t\t$email = $defaultEmail;\n\n\t\t}\n\n\t\t$html = ' ';\n\t\t$html .= '<a class=\"email\" href=\"mailto:'.$email.'\" title=\"E-Mail Us\" id=\"'.$atts[\"id\"].'-email\">'.$email.'</a>';\n\t\treturn $html;\n\t\t\n\t}", "title": "" }, { "docid": "f7c976802500d602d111230990b2ea82", "score": "0.6290011", "text": "function sendmail( $emailaddress , $emailsubject , $body , $attachments=false)\n\t\t{ \n\t\t\t\t$headers = \"MIME-Version: 1.0\\r\\n\"; \n\t\t\t\t$headers .= \"Content-type: text/plain; charset=iso-8859-1\\r\\n\";\n\t\t\t\t/* additional headers */ \n\t\t\t\t$headers .= \"From: EventsListed <[email protected]>\\r\";\n\t\t\t\t\t\t\t \n\t\t\t \t$body = preg_replace (\"'<br[^>]*?>'si\" , \"\\n\" , $body ) ;\n\t\t\t\t$body = strip_tags($body) ;\n\t\t\t\t#### mail template ####\n\t\t\t\t\n\t\t\t\t/*if( file_exists( \"mail.html\" ) )\n\t\t\t\t\t$templateFile = \"mail.html\" ;\n\t\t\t\telseif( file_exists( \"../mail.html\" ) )\n\t\t\t\t\t$templateFile = \"../mail.html\" ;\n\t\t\t\telseif( file_exists( \"../../mail.html\" ) )\n\t\t\t\t\t$templateFile = \"../../mail.html\" ;\n\t\t\t\telseif( file_exists( \"../../../mail.html\" ) )\n\t\t\t\t\t$templateFile = \"../../../mail.html\" ;\n\n\t\t\t\t$fp = fopen( $templateFile , \"r\" ) or die( \"file opening error............\" ) ;\n\t\t\t\t$template = fread( $fp , filesize($templateFile) ) ;\n\t\t\t\tfclose( $fp ) ;\n\n\t\t\t\t$template = str_replace( \"[MAIL_TITLE]\" , $emailsubject , $template ) ;\n\t\t\t\t$templateBody = str_replace( \"[MAIL_BODY]\" , $body , $template ) ;*/\n\n\t\t\t ##### end mail template #####\n\n\t\t\t $body = str_replace( \"{unsubscribe_me}\" , base64_encode($emailaddress) , $body ) ;\n\t\t\t \n\t\t\t //@mail($emailaddress, $emailsubject, $templateBody , $headers);\n\t\t\t @mail($emailaddress, stripslashes($emailsubject), stripslashes($body) , $headers);\n\t\t}", "title": "" }, { "docid": "941154b4a3c62378d17dccc782a47b64", "score": "0.62875545", "text": "public function send_email($name,$email,$content,$link,$title,$button_title){\n\n\t$body = '\n\n\t<!doctype html>\n\t<html xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:o=\"urn:schemas-microsoft-com:office:office\">\n\t<head>\n\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"><meta name=\"ROBOTS\" content=\"NOINDEX, NOFOLLOW\"><meta name=\"referrer\" content=\"no-referrer\">\n\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\t<style type=\"text/css\">\n\n\t.maintable {\n\t\tborder-collapse: collapse;\n\t\twidth: 100%;\n\t}\n\n\tth, td {\n\t\ttext-align: left;\n\t\tpadding: 8px;\n\t}\n\n\t.maintable tr:nth-child(even){background-color: #f2f2f2}\n\n\tth {\n\t\tbackground-color: #4CAF50;\n\t\tcolor: white;\n\t}\n\t</style>\n\t</head>\n\t<body>\n\t<div style=\"background-color: #ccc;\">\n\t<table width=\"830\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-family:Calibri,Candara,Segoe,&quot;Segoe UI&quot;,Optima,Arial,sans-serif;letter-spacing:normal;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration:none;margin:0px auto;background-color:rgb(255,255,255)\">\n\t<tbody>\n\t<tr style=\"background-color: #f22f2f2; height: 30px;\"> </tr>\n\n\t<tr style=\"background-color: #f2f2f2;\">\n\t<td>\n\t<table>\n\t<tbody>\n\t<tr>\n\t<td width=\"610\">&nbsp;</td>\n\t<td width=\"130\" style=\"padding: 15px;\" align=\"left\" valign=\"bottom\"><img src=\"http://www.primeramfbank.com/sites/default/files/primera.png\" alt=\"Primera Logo\" width=\"278\" class=\"CToWUd\"></td>\n\t<td width=\"610\">&nbsp;</td>\n\t</tr>\n\t</tbody>\n\t</table>\n\t</td>\n\t</tr>\n\n\t<tr style=\"background-color: #f22f2f2; height: 30px;\"> </tr>\n\n\t<tr>\n\t<td style=\"padding:50px 40px 10px;font-size:20px\">Dear '.$name.',</td>\n\t</tr>\n\t<tr>\n\t<td style=\"padding:10px 40px;color:#093263;font-size:36px;letter-spacing:-1px;font-weight:bold\"><span style=\"text-decoration:underline; text-align: center;\">'.$title.' </span><span class=\"m_4920298691540864634Apple-converted-space\">&nbsp;</span></td>\n\t</tr>\n\t<tr>\n\t<td style=\"padding:10px 40px 20px; font-size:17px\"><br> '.$content.' </td>\n\n\t</tr>\n\n\n\n\t<tr><td style=\"padding:10px 40px 20px\">Please click Button Below to proceed <br> <br></tr><tr>\n\t<td style=\"padding:10px 40px 20px\"> <a href=\"'.$link.'\"> <button style=\"background-color: #093263; color: #fff;font-size: 20px;border-radius: 8px; padding: 10px; cursor: pointer;\"> '.$button_title.' </button></a></td>\n\t</tr><tr>\n\t<td style=\"padding:20px 40px 40px\"><br><br>For further enquiries, please send an email to<span class=\"m_4920298691540864634Apple-converted-space\">&nbsp;</span><a href=\"mailto:[email protected]\" target=\"_blank\">[email protected]</a><span class=\"m_4920298691540864634Apple-converted-space\">&nbsp;</span>\n\t<br><br>Your partner for growth.<br><br>Regards,<br><br><br><span style=\"font-weight:bold\">Primera Internal Resource Stream.</span></td>\n\t</tr><tr>\n\t<td style=\"padding:10px 40px;background-color:rgb(238,238,238)\">\n\t<table width=\"300\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n\t</table>\n\t</td>\n\t</tr>\n\t<br><br>\n\t<tr style=\"background-color: #f22f2f2; height: 30px;\"> </tr>\n\n\t<tr style=\"background-color: #f1f1f1;\">\n\t<td>\n\t<table border=\"0\" cellspacing=\"8\" cellpadding=\"8\" style=\"text-align: center;\"> <br><br>\n\t<tbody>\n\t<tr valign=\"top\" align=\"center\">\n\n\t<td width=\"220\" height=\"50\"> <center><a href=\"http://www.primeramfbank.com\" style=\"color:rgb(62,70,81);text-decoration:none;font-weight:bold\" target=\"_blank\"><span style=\"color:rgb(62,70,81);text-decoration:none\">IRS LOGIN</span></a><br><a href=\"http://irs.primeramfbank.com/\" style=\"color:rgb(62,70,81);text-decoration:none\" target=\"_blank\" ><span style=\"color:rgb(62,70,81);text-decoration:none;font-size:10px\">irs.primeramfbank.com</span></a></center></td>\n\t<td width=\"230\" height=\"50\"><center><a href=\"mailto:[email protected]\" style=\"color:rgb(62,70,81);text-decoration:none;font-weight:bold\" target=\"_blank\"><span style=\"color:rgb(62,70,81);text-decoration:none\">Email</span></a><br><a href=\"mailto:[email protected]\" style=\"color:rgb(62,70,81);text-decoration:none\" target=\"_blank\"><span style=\"color:rgb(62,70,81);text-decoration:none;font-size:10px\">[email protected]</span></a><br></center></td>\n\t<td width=\"230\" height=\"50\"><center><a href=\"http://www.primeramfbank.com\" style=\"color:rgb(62,70,81);text-decoration:none;font-weight:bold\" target=\"_blank\"><span style=\"color:rgb(62,70,81);text-decoration:none\">Website</span></a><br><a href=\"http://www.primeramfbank.com/\" style=\"color:rgb(62,70,81);text-decoration:none\" target=\"_blank\"><span style=\"color:rgb(62,70,81);text-decoration:none;font-size:10px\">www.primeramfbank.com</span></a></center></td>\n\t</tr>\n\t</tbody>\n\t</table>\n\t</td>\n\t</tr>\n\t<tr style=\"background-color: #f22f2f2; height: 30px;\"> </tr>\n\n\t<tr style=\"background-color: #f1f1f1;\">\n\t<td style=\"height:50px\">&nbsp;</td>\n\t</tr>\n\t</tbody>\n\t</table>\n\t</div>\n\t</body>\n\t</html>\n\n\t';\n\n\n\n\t$subject = ''.$title.'';\n\n\n //$headers = array('[email protected],From: Primera MFB');\n\t$headers = 'From: Primera Microfinance Bank <[email protected]>' . \"\\r\\n\";\n // $headers = \"Bcc: [email protected]\";\n\t$headers = \"MIME-Version: 1.0\\r\\n\";\n\t$headers = \"Content-Type: text/html; charset=UTF-8\\r\\n\";\n\n // $headers[] = 'Cc: [email protected]';\n\t //$headers[] = 'Cc: [email protected]';\n\n\n//$headers[] = 'Bcc: [email protected]';\n\n //Send the email\n //add_filter('wp_mail_content_type', create_function('', 'return \"text/html\"; '));\n\twp_mail(''.$email.'', $subject, $body, $headers);\n //remove_filter('wp_mail_content_type', 'set_html_content_type');\n\n\n\n}", "title": "" }, { "docid": "0f262917553128c3a7d6a5fc835afa84", "score": "0.6286337", "text": "public function _email_message()\n\t{\n\t\t$email = event::$data;\n\n\t\t$this->handle_messages($email, 'email', url::base(). 'admin/messages');\n\t}", "title": "" }, { "docid": "0ab2e78f1e8a3705727f29d8afdbc130", "score": "0.6281438", "text": "function sendWelComeEmail($nationType) {\r\n\r\n \t\tif($nationType == '') return ;\r\n \t\tif(!in_array($nationType,array(0,1))) return ;\r\n\r\n \t\t$subject = \"Action required: Welcome to ETAS!\";\r\n \t\t// Is the OS Windows or Mac or Linux\r\n\t\tif (strtoupper(substr(PHP_OS,0,3)=='WIN')) {\r\n\t\t $eol=\"\\r\\n\";\r\n\t\t} elseif (strtoupper(substr(PHP_OS,0,3)=='MAC')) {\r\n\t\t $eol=\"\\r\";\r\n\t\t} else {\r\n\t\t $eol=\"\\n\";\r\n\t\t}\r\n\t\t$org_configData = $this->getConfigData();\r\n\t\t$configData = $org_configData[$nationType];\r\n\r\n//\t\t$schoolEmailsArr = $this->getSchoolEmails();\r\n//\t\t$salesEmailArr = $this->getSalesTeamEmails();\r\n\t\t//print_r($salesEmailArr);\r\n\r\n\t\t$headers_start = 'From: ASSET ETAS <[email protected]>'.$eol;\r\n\t//\t$headers_start .= \"Bcc:[email protected],[email protected]\".$eol;\r\n\t\t$headers_start .= \"Reply-To: <[email protected]>\".$eol;\r\n\t\t$headers_start .= \"MIME-Version: 1.0 $eol\";\r\n\t\t$headers_start .= \"Content-type: text/html; charset=iso-8859-1\\r\\n\"; \t\t\r\n\r\n \t\t$message_start =\"Dear Coordinator, <br/><br/>\";\r\n \t\t$message_start .=\"We welcome you and your institution to undertake the ETAS initiative in a quest towards assessment excellence! <br/>\";\r\n \t\t$message_start .=\"In this email, is a unique 8-digit access code. This access code will help you and your teachers create logins in order to take the ETAS. <br/><br/>\";\r\n \t\t\r\n \t\t$message_end =\"\";\r\n \t\t$message_end.=\"Please do not hesitate to get in touch with us at [email protected] for any questions/clarifications. We would be glad to help. <br/><br/>\";\r\n \t\t$message_end.=\"Regards, <br/>\";\r\n \t\t$message_end.=\"Team EI <br/>\"; \t\t\r\n\r\n \t\t$message='';\r\n\r\n \t\t$cond ='';\r\n \t\tif($nationType == 0 )\r\n \t\t\t$cond = \" AND schools.country = 'India'\";\r\n \t\telse \r\n \t\t\t$cond = \"AND schools.country != 'India'\";\r\n\r\n \t\t$query = \"SELECT asset_etaPasscodes.id, asset_etaPasscodes.schoolCode, asset_etaPasscodes.passcode, asset_etaPasscodes.principal_mail, \r\n \t\t\t\t\tasset_etaPasscodes.coordinator_mail,schools.schoolname, schools.city FROM asset_etaPasscodes INNER JOIN schools\r\n \t\t\t\t\tON asset_etaPasscodes.schoolCode = schools.schoolno\r\n \t\t\t\t\tWHERE round ='$this->current_round' AND welcomeEmail_sent =0 $cond \";\r\n \t\t//echo \"$query <br/>\";\r\n \t\t$dbquery = new dbquery($query,$this->connid);\r\n \t\t$index =0;\r\n \t\twhile($row=$dbquery->getrowarray()) {\r\n \t\t\t$index++;\r\n \t\t\t$sent =0;\r\n \t\t\t$ccList ='';\r\n\r\n \t\t\t$toemails = $row['coordinator_mail'];\r\n \t\t\t// un comment on Live \r\n \t\t\t//$toemails = $schoolEmailsArr[$row['schoolCode']]['coordinator'];\r\n \t\t\t\r\n \t\t\tif($toemails == \"\") { \t\t\t\r\n \t\t\t\t$toemails = $row['principal_mail'];\r\n \t\t\t// uncomment after dry run \r\n \t\t\t//\t$toemails = $schoolEmailsArr[$row['schoolCode']]['principal'];\r\n \t\t\t}\t\r\n\r\n \t\t\tif($toemails !=\"\" ) {\r\n\t \t\t\t$message=$message_start;\r\n\t \t\t\t$message.=\"<b>School Name:</b> \".$this->schoolNameCorrection($row['schoolname']).\" (\".$row['city'].\") <br/>\";\r\n\t \t\t\t$message.=\"<b>Access Code: \".$row['passcode'].\"</b> <br/><br/>\";\r\n\t\t \t\t$message.=\"Please forward this email to your teachers so that they can conveniently copy paste the access code in the sign-up page. <br/><br/>\";\r\n\t \t\t\t$message.=\"<a href='http://educationalinitiatives.com/asset_etas/login.php'>ASSET ETAS</a> <br/><br/>\";\r\n\t \t\t\t$message.=\"ETAS will be open for teachers to record their responses on \".date('d-m-Y',strtotime($configData['start_date'])).\" till \".date('d-m-Y',strtotime($configData['end_date'])).\". $eol We recommend that you and your teachers create logins before the start date. In this login, you will be able to track the progress and status of ETAS in your school. <br/>\";\r\n\t \t\t\t$message.=$message_end;\r\n\r\n\t \t\t\tif($row['principal_mail'] != \"\")\r\n\t \t\t\t\t$headers =$headers_start. \"Bcc: \".$row['principal_mail'].\", [email protected],[email protected] \".$eol;\r\n\t \t\t\telse {\r\n\t \t\t\t\t$headers = $headers_start;\r\n\t \t\t\t}\r\n\t\t\t\t\r\n\r\n\t \t\t// uncomment after the DRY Run\r\n/*\r\n\t \t\t\tif($schoolEmailsArr[$row['schoolCode']]['principal'] != \"\")\r\n\t \t\t\t\t$headers =$headers_start. \"Bcc: \". $schoolEmailsArr[$row['schoolCode']]['principal'].\", [email protected],[email protected] \".$eol;\r\n\t \t\t\telse {\r\n\t \t\t\t\t$headers = $headers_start .\"Bcc:[email protected],[email protected]\".$eol;\r\n\t \t\t\t}\r\n\r\n\r\n\r\n\t \t\t\tif(isset($salesEmailArr[$row['schoolCode']])) {\r\n\t \t\t\t\t$ccList = $salesEmailArr[$row['schoolCode']]['rm_mail'] .\",\". $salesEmailArr[$row['schoolCode']]['asm_mail'];\r\n\t \t\t\t\t$ccList =ltrim($ccList,',');\r\n\t \t\t\t\t$ccList =rtrim($ccList,',');\r\n\t \t\t\t}\t\r\n\r\n\t \t\t\tif($ccList != '')\r\n\t \t\t\t\t$headers .= \"cc: $ccList $eol\";\r\n*/\r\n\t// \t\t\t$message=wordwrap($message,70,$eol);\r\n\r\n\t \t\t\tif($toemails !=\"\")\r\n\t \t\t\t\t$sent = mail($toemails, $subject, $message, $headers);\r\n\r\n\t \t\t\tif($sent == 1) {\r\n\t \t\t\t\t$upd_query = \"UPDATE asset_etaPasscodes set welcomeEmail_sent =1 WHERE id= '\".$row['id'].\"' \";\r\n\t \t\t\t\t$upd_dbquery = new dbquery($upd_query,$this->connid);\r\n\t \t\t\t}\r\n\t \t\t/*\techo \"---------------------------- <br>\";\r\n\t \t\t\techo \"$index <br>\";\techo nl2br($message);\techo nl2br($headers); echo \" <br> TO EMAILS | $toemails | <br/>\";\r\n\t \t\t\techo \"---------------------------- <br>\";\r\n\t \t\t*/\r\n\t \t\t}\r\n\r\n\t\t}\r\n\t\t\r\n \t}", "title": "" }, { "docid": "d10b317bcb7961b0693673d259f4cf3d", "score": "0.62785375", "text": "function mf_schedule_mailto( $meta ) {\n\t\tif ( isset( $meta['mfei_record'][0] ) ) {\n\t\t\t$linked_post = get_post( $meta['mfei_record'][0] );\n\t\t\t$json = json_decode( $linked_post->post_content );\n\t\t\t$loc = get_the_terms( $linked_post->ID, 'location' );\n\t\t\t$email = esc_url( 'mailto:' . $json->email );\n\t\t\t$subject = '?&subject=Event+Scheduled: ' . esc_attr( $linked_post->post_title );\n\t\t\t$body = rawurlencode(\n\t\t\t\t\"Event: \" . esc_attr( $linked_post->post_title ) . \"\\n\" .\n\t\t\t\t\"Start Time: \" . esc_attr( $meta['mfei_start'][0] ) . \"\\n\" .\n\t\t\t\t\"End Time: \" . esc_attr( $meta['mfei_stop'][0] ) . \"\\n\" .\n\t\t\t\t\"Location: \" . esc_attr( $loc[0]->name ) . \"\\n\" );\n\t\t\t$url = add_query_arg( array( 'subject' => $subject ), $email );\n\t\t\t$url = add_query_arg( array( 'body' => $body ), $url );\n\t\t\techo '<p><a href=\"' . $url . '\" class=\"button\" target=\"_blank\">' . __( 'Email Presenter Schedule', 'make-mini-mf' ) . '</a></p>';\n\t\t}\n\t}", "title": "" }, { "docid": "e8c424b015c839c0ffafa132f9c6cc62", "score": "0.62765145", "text": "public function sendEmail($x1)\n {\n }", "title": "" }, { "docid": "6eb955a7dcc6048baaa39a8f06327e7b", "score": "0.6276449", "text": "function emailBlaster($email, $subject, $body) {\n\tif (empty($email)) {\n\t\treturn false;\n\t}\n\treturn mail($email,$subject,$body);\n}", "title": "" }, { "docid": "3f7805f1826ea8165250f81f87a1d911", "score": "0.62761706", "text": "function create_mmail($matches) {\nglobal $emailaddress;\n\t$removers = array('\"','\\\\'); // in case they add quotes\n\t$mashed_address = str_replace($removers,'',$matches[1]);\n\t$mashed_address = bbmashed_mail($emailaddress.'?subject='.$mashed_address);\n\t$mashed_address = str_replace(' ', '%20', $mashed_address); // hmmm\n\treturn '<a class=\"cb-mail\" title=\"mail me!\" href=\"'.$mashed_address.'\\\">'.$matches[2].'<!--mail--></a>';\n}", "title": "" }, { "docid": "6503fd55525c25079b8595f599cbe376", "score": "0.62756723", "text": "public function sendContact($data,$email);", "title": "" }, { "docid": "e75ca4f676d19d886aa4ec9d9638d7de", "score": "0.6274643", "text": "function setEmailText(&$oMail, $regKey, $htmlemail) {\n\n\t/* Connect to a MySQL server */ \n\t$dbHandle = mysql_connect(MYSQL_SERVER, MYSQL_USERNAME, MYSQL_PASSWORD)\n\t or die('Could not connect: ' . mysql_error());\n\n\tmysql_select_db(MYSQL_DATABASE) or die('Could not select database');\t\n\t\n\t\t\n\tif (strToUpper($htmlemail) == 'YES') {\n\t\t$oMail->IsHTML(True);\t\t\t\t\t\t\t// Sets message body type to text/html\t\t\n\t}\n\telse {\n\t\t$oMail->IsHTML(False);\t\t\t\t\t\t\t// Sets message body type to text\t\t\n\t}\n\t\t\n\t$rset = mysql_query(\"SELECT ipaddress FROM sysconf\");\t\n\t$row = mysql_fetch_assoc($rset);\n\n\t\n\tif (strToUpper($htmlemail) == 'YES') {\n\t\t$oMail->AltBody = getEmailText($regKey,$localIP);\t// if html is true then this contains plain text for use by email clients\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// that don't understand html \n\t\t$oMail->Body = getEmailHTML($regKey,$localIP);\t// HTML text\t\t\n\t}\n\telse {\n\t\t$oMail->Body = getEmailText($regKey,$localIP);\t\t// Send Plain Text\n\t}\n\t\n\techo \"<pre>\\n\";\n\t\tprint_r($htmlemail);\n\t\tprint_r($regKey);\n\t\tprint_r($localIP);\t\t\t\t\n\t\tprint_r($oMail->AltBody);\n\t\tprint_r($oMail->Body);\n\techo \"</pre>\\n\";\n\t\n\tmysql_free_result($rset);\n\t\n}", "title": "" }, { "docid": "0654c7cdaf9e1f91eaa0762a3f51d605", "score": "0.62744063", "text": "public function email()\n\t{\n\t\tAuth::instance()->login_required();\n\t\t$user = Auth::instance()->get_user();\n\n\t\tif (isset($_POST['action_change_email'])) {\n\t\t\tif ($user->change_email($_POST)) {\n\t\t\t\turl::redirect(url::site('verify?from=email', 'http'));\n\t\t\t} else {\n\t\t\t\tclient::messageSendKohana($_POST->errors());\n\t\t\t}\n\t\t}\n\n\t\t$this->template->title = 'Change your Email Address';\n\t\t$this->template->content = new View('email');\n\t\t$this->template->content->current_email = $user->email;\n\t\t$this->template->content->form_url = url::site('email', 'http');\n\t}", "title": "" }, { "docid": "1931f96b7321c424f7b560503e9dd217", "score": "0.6266601", "text": "function send_enquiry_mail($enquiry_id, $email_id, $name, $tour_name, $enquiry_specification)\n{\n global $app_name;\n global $mail_em_style, $mail_em_style1, $mail_font_family, $mail_strong_style, $mail_color;\n\n $content = '\n <table style=\"padding:0 30px\">\n <tr>\n <td colspan=\"2\">\n <p>Hello '.$name.'</p> \n <p>We Would like to Thank you for your inquiry and showing interest with '.$app_name.'.</p>\n <p>We’re very happy to answer your question, you may have and aim to respond within 24 hours to make your holiday evergreen.</p>\n <p>\n In the meantime, should you require any further information please don’t hesitate to contact us.\n </p> \n </td>\n </tr>\n <tr>\n <td>\n <table style=\"width:100%\">\n <tr><td><strong>Please Find below inquiry details:-</strong></td></tr>\n <tr>\n <td>\n <span style=\"padding:5px 0; border-bottom:1px dotted #ccc; float: left\">\n <span style=\"color:'.$mail_color.'\">Enquiry No</span> : <span>'.$enquiry_id.'</span>\n </span> \n </td>\n </tr>\n <tr>\n <td>\n <span style=\"padding:5px 0; border-bottom:1px dotted #ccc; float: left\">\n <span style=\"color:'.$mail_color.'\">Specification</span> : <span>'.$enquiry_specification.'</span> \n </span> \n </td>\n </tr>\n <tr>\n <td>\n <p>We hope that this email helps you to progress your inquiry.<br>\n Thanks again for getting in touch.\n </p>\n </td>\n </tr>\n </table>\n </td>\n <td>\n <img src=\"'.BASE_URL.'/images/email/vacation.png\" style=\"width:175px; height:auto; margin-bottom: -10px;\" alt=\"\">\n </td>\n </tr>\n </table>\n ';\n\n $subject = \"Inquiry Acknowledgment\";\n\n global $model,$backoffice_email_id;\n\n $model->app_email_master($email_id, $content, $subject);\n $model->app_email_master($backoffice_email_id, $content, $subject);\n\n}", "title": "" }, { "docid": "e70af05bce10e0d02cf286764efdde0c", "score": "0.6266131", "text": "function sendmailtotempuser($postarray){\r\r\n\t\t//echo \"<pre>\";\r\r\n\t//\tprint_r($postarray); exit;\r\r\n\t\t\r\r\n\r\r\n\t\t\t$message = \" &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src='http://\".$_SERVER['HTTP_HOST'].\"/img/logo.gif' /><br/>\";\r\r\n\t\t\t$message.= \"Hello \". ucwords($postarray['groups']['group_name']).','.\"<br><br>\";\r\r\n\t\t\t$message .= \"<strong>You have send us request to get Free Form </strong><br/><br/>\";\r\r\n\t\t\t$message .= \"This message is a response to get Free Form from adbookonline<a href='\".$_SERVER['HTTP_HOST'].\"'> Ad book online.</a> <br/>\";\r\r\n\t\t\t\r\r\n\t\t\t$message .= \"Below are the detail you have entered:<br/><br/>\";\r\r\n\t\t\t$message .= \"Group Name : <b>\\\"\".$postarray['Freeform']['group_name'] . \"\\\"</b><br/>\";\r\r\n\t\t\t$message .= \"Event Name : <b>\\\"\".$postarray['Freeform']['eventname'] . \"\\\"</b><br/>\";\r\r\n\t\t\t$message .= \"Address : <b>\\\"\".$postarray['Freeform']['address'] . \"\\\"</b><br/>\";\r\r\n\t\t\t$message .= \"City : <b>\\\"\".$postarray['Freeform']['city'] . \"\\\"</b><br/>\";\r\r\n\t\t\t$message .= \"State : <b>\\\"\".$postarray['Freeform']['state'] . \"\\\"</b><br/>\";\r\r\n\t\t\t$message .= \"Zipcode : <b>\\\"\".$postarray['Freeform']['zipcode'] . \"\\\"</b><br/>\";\r\r\n\t\t\t$message .= \"Phone : <b>\\\"\".$postarray['Freeform']['phone'] . \"\\\"</b><br/>\";\r\r\n\t\t\tif($postarray['Freeform']['fax']){\r\r\n\t\t\t$message .= \"Fax : <b>\\\"\".$postarray['Freeform']['fax'] . \"\\\"</b><br/>\";\r\r\n\t\t\t}\r\r\n\t\t\t$message .= \"Email : <b>\\\"\".$postarray['Freeform']['email'] . \"\\\"</b><br/>\";\r\r\n\t\t\tif($postarray['Freeform']['groupnote']){\r\r\n\t\t\t$message .= \"Group Note : <b>\\\"\".$postarray['Freeform']['groupnote'] . \"\\\"</b><br/>\";\r\r\n\t\t\t}\r\r\n\t\t\t$message .= \"Fund Goal: <b>\\\"\".$postarray['Freeform']['fundgoal'] . \"\\\"</b><br/>\";\r\r\n\t\t\t$message .= \"Group pricing : <b>\\\"\".$postarray['Freeform']['grouppprice'] . \"\\\"</b><br/>\";\r\r\n\t\t\tif($postarray['Freeform']['gold']){\r\r\n\t\t\t$message .= \"Gold : <b>\\\"\".$postarray['Freeform']['gold'] . \"\\\"</b><br/>\";\r\r\n\t\t\t}\r\r\n\t\t\tif($postarray['Freeform']['silver']){\r\r\n\t\t\t$message .= \"Silver : <b>\\\"\".$postarray['Freeform']['silver'] . \"\\\"</b><br/>\";\r\r\n\t\t\t}\r\r\n\t\t\tif($postarray['Freeform']['paper']){\r\r\n\t\t\t$message .= \"Paper : <b>\\\"\".$postarray['Freeform']['paper'] . \"\\\"</b><br/>\";\r\r\n\t\t\t}\r\r\n\t\t\tif($postarray['Freeform']['half']){\r\r\n\t\t\t$message .= \"Half : <b>\\\"\".$postarray['Freeform']['half'] . \"\\\"</b><br/>\";\r\r\n\t\t\t}\r\r\n\t\t\tif($postarray['Freeform']['biz']){\r\r\n\t\t\t$message .= \"Business card Name : <b>\\\"\".$postarray['Freeform']['biz'] . \"\\\"</b><br/>\";\r\r\n\t\t\t}\r\r\n\t\t\tif($postarray['Freeform']['quarter']){\r\r\n\t\t\t$message .= \"Quarter area : <b>\\\"\".$postarray['Freeform']['quarter'] . \"\\\"</b><br/>\";\r\r\n\t\t\t}\r\r\n\t\t\tif($postarray['Freeform']['listfield']){\r\r\n\t\t\t$message .= \"List area : <b>\\\"\".$postarray['Freeform']['listfield'] . \"\\\"</b><br/>\";\r\r\n\t\t\t}\r\r\n\t\t\tif($postarray['Freeform']['messagefield']){\r\r\n\t\t\t$message .= \"Message area : <b>\\\"\".$postarray['Freeform']['messagefield'] . \"\\\"</b><br/>\";\r\r\n\t\t\t}\r\r\n\t\t\tif($postarray['Freeform']['anonymousamount']){\r\r\n\t\t\t$message .= \"Anonymous Amount Name : <b>\\\"\".$postarray['Freeform']['anonymousamount'] . \"\\\"</b><br/>\";\r\r\n\t\t\t}\r\r\n\t\t\t\r\r\n\t\t\t\r\r\n\t\t\t$message .=\"<br/><br/>The Terms The User Aggreed to by Submitting this Form: Notice & Agreement: <br/>\r\r\n\t\t\t\t\t\tBy filling out this form and proceeding to view our demo, you understand and <br/>\r\r\n\t\t\t\t\t\tagree to be bound by this agreement that the information contained is confidential<br/>\r\r\n\t\t\t\t\t\tand proprietary. You will not disclose or use this information without the expressed<br/>\r\r\n\t\t\t\t\t\t written permission You are allowed to view our site demo in order to consider a business<br/>\r\r\n\t\t\t\t\t\t opportunity with us and that this opportunity is good and valuable consideration in acceptance <br/>\r\r\n\t\t\t\t\t\t with the terms of this confidentiality agreement. You also represent that the information in this<br/>\r\r\n\t\t\t\t\t\t form is materially true and correct. By submitting this form you indicate your acceptance.<br/>\r\r\n\t\t\t\t\t\t (c) 2000 - 2008 All Rights Reserved!\";\r\r\n\t\t\t\r\r\n\t\t\t$message .= \"<br/><br/><br/>Sincerely,<br/> \";\r\r\n$message .= \"The Adbook online team <br>\";\r\r\n$message .= \"<a href='\".$_SERVER['HTTP_HOST'].\"'>www.\".SITENAME.\"</a> <br/>\";\r\r\n$message .= \"<br/><br/>\";\r\r\n\r\r\n$message .=\"<br /><br/>\";\r\r\n\r\r\n\r\r\n\t\t\t$message .='</body></html>';\r\r\n\t\t\t\r\r\n\t\t\t\r\r\n\t\t\t\r\r\n\t\t\t$subject = \"Get Free Form - adbookonline\";\r\r\n\t\t\t \r\r\n\t\t\t$from = SITE_EMAIL;\r\r\n\t\t\t$to = $postarray['Freeform']['email'];\r\r\n\t\t\t\r\r\n\t\t\t$headers = \"From: \" .$from . \"\\r\\n\";\r\r\n\t\t\t$headers .= \"Reply-To: \". $from . \"\\r\\n\";\r\r\n\t\t\t$headers .= 'MIME-Version: 1.0' . \"\\r\\n\";\r\r\n\t\t\t$headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\r\r\n\t\t\t\r\r\n\t\t\t$ifsend = $this->sendMailContent($to,$from,$subject,$message);\t\r\r\n\r\r\n\t\t\t//$ifsend = $this->sendMailContent($to,$from,$subject,$message);\r\r\n\t\t\t \r\r\n\t\t\tif($ifsend == true){\r\r\n\t\t\t return true;\r\r\n\t\t\t}else{\r\r\n\t\t\t\r\r\n\t\t\t return false;\r\r\n\t\t\t}\r\r\n\t\t}", "title": "" }, { "docid": "5bca5e003d9c45313892e848b0971290", "score": "0.6257549", "text": "function email($suggestors_email,$feedback_text,$suggestors_name){\r\n\r\n\r\nrequire_once 'swiftmailer/lib/swift_required.php';\r\n\r\n// Create the mail transport configuration\r\n$transport = Swift_SmtpTransport::newInstance('smtpout.secureserver.net',80)\r\n ->setUsername('[email protected]')\r\n ->setPassword('feedbackZofler6991')\r\n ;\r\n\r\n\r\n// Create the message\r\n$message = Swift_Message::newInstance(Subject);\r\n$message->setTo(array(\r\n \"[email protected]\"\r\n));\r\n\r\n\r\n$message->setSubject($suggestors_email);\r\n$message->setBody($feedback_text,'text/html');\r\n$message->setFrom(\"[email protected]\",$suggestors_name);\r\n\r\n// Send the email\r\n$mailer = Swift_Mailer::newInstance($transport);\r\n$mailer->send($message);\r\n\r\n}", "title": "" }, { "docid": "8578f1d3df7c747c81f07742c718e103", "score": "0.62538487", "text": "function buildEMail ( $params ) {\n\t\t\n\t\t$keysWanted = array( // build an intersector\n\t\t\tself::email_substitutions => 1\n\t\t\t,self::email_subject => 1\t\n\t\t\t,self::email_body => 1\n\t\t);\n\n\t\t// take only what we want from the given params\n\t\t$this->data = array_merge(array_intersect_key($params,$keysWanted),$this->data);\n\t\t\n\t\t// make some standards, if they were not passed in already\n\t\tif (empty($this->data[self::email_subject])) { $this->data[self::email_subject] = \" \"; }\n\t\tif (empty($this->data[self::email_body])) { $this->data[self::email_body] = \" \"; }\n\t\t\n\t\t// if we have any requested substitutions\n\t\tif (!empty($this->data[self::email_substitutions])) {\n\t\t\t\n\t\t\t// loop the list of requested substitutions\n\t\t\tforeach (array_keys($this->data[self::email_substitutions]) as $key) {\n\t\t\t\t\n\t\t\t\t// apply each key => value as a substitution to both the body and the subject\n\t\t\t\t$this->data[self::email_subject] = str_replace($key,$this->data[self::email_substitutions][$key],$this->data[self::email_subject]);\n\t\t\t\t$this->data[self::email_body] = str_replace($key,$this->data[self::email_substitutions][$key],$this->data[self::email_body]);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn \"subj:\".self::eol. $this->data[self::email_subject] .self::eol.self::eol.\"body:\".self::eol. $this->data[self::email_body];\n\t}", "title": "" }, { "docid": "e050d27fc97eacc1addc0b2830a5a260", "score": "0.62532985", "text": "function envelope_mail($userClass){\n if(empty($userClass->email)){ return false; }\n if(filter_var($userClass->email, FILTER_VALIDATE_EMAIL) === false){ return false; }\n\n $giftList = envelopes_gifts();\n if(!isset($userClass->gift_id) || !isset($giftList[$userClass->gift_id])){\n return false;\n }\n $userClass->full_name = ucwords($userClass->full_name); // viet hoa cac ky tu dau cua ten\n if($userClass->gift_id == 1 || $userClass->gift_id == 2){ /* Noi dung trung non dien thoai */\n $title = 'Chúc mừng bạn nhận lì xì lớn từ Mobiistar - Trúng 01 '.$giftList[$userClass->gift_id].'!';\n $mainContent = 'Mobiistar chúc bạn một năm mới Mậu Tuất tràn tài lộc và đầy niềm vui nhé! Cảm ơn bạn đã tham gia hái lì xì từ Mobiistar và chúc mừng bạn đã may mắn trúng 01 điện thoại Zumbo S2 Dual trong chương trình \"Nhận Lộc Tết Đông Đủ Đẹp\".';\n $mainContent.='<br>';\n $mainContent.='Máy sẽ được giao hàng đến tận nhà theo địa chỉ bạn cung cấp.';\n $mainContent.='<br>';\n $mainContent.='<br>';\n $mainContent.='Lưu ý:';\n $mainContent.='<br>';\n $mainContent.='- Toàn bộ chi phí giao hàng và vận chuyển đều do Mobiistar chịu trách nhiệm.';\n $mainContent.='<br>';\n $mainContent.='- Khách hàng phải xuất trình đầy đủ các giấy tờ theo quy định mới có thể nhận máy.';\n } elseif ($userClass->gift_id == 3){ /* Noi dung trung non bao hiem */\n $carrierList = carrier_list_arr();\n $title = 'Chúc mừng bạn nhận được lì xì từ Mobiistar - Trúng 01 '.$giftList[$userClass->gift_id].'.';\n $mainContent = 'Mobiistar chúc mừng bạn đã may mắn trúng 01 nón bảo hiểm thời trang. Với phần quà này, Mobiistar thân chúc bạn một năm mới nhiều bình an và may mắn nhé!';\n $mainContent.='<br>';\n $mainContent .= 'Nón sẽ được giao hàng đến tận nhà theo địa chỉ bạn cung cấp.';\n } elseif ($userClass->gift_id > 3 && $userClass->gift_id < 10){ /* Noi dung trung non the cao */\n// $carrierList = carrier_list_arr();\n $title = 'Chúc mừng bạn nhận được lì xì từ Mobiistar - Trúng 01 '.$giftList[$userClass->gift_id].'.';\n $mainContent = 'Thẻ cào của bạn có mã thẻ là: '.(isset($userClass->code) ? $userClass->code : 'Liên hệ BTC');\n $mainContent.='<br>';\n $mainContent .= 'Nhà mạng bạn đã chọn: '.(isset($userClass->carrier_name) ? $userClass->carrier_name : 'N/A');\n } elseif ($userClass->gift_id == 10){ /* Noi dung trung code free-shipping */\n $title = 'Chúc mừng bạn nhận được lì xì từ Mobiistar - Trúng 01 '.$giftList[$userClass->gift_id].'.';\n $mainContent = 'Mobiistar chúc mừng bạn đã may mắn trúng 01 mã giao hàng miễn phí free-shipping. Với phần quà nay, Mobiistar chúc bạn một năm mới thuận buồm xuôi gió như thời gian ship cực nhanh mà lại miễn phí từ dịch vụ free-shipping của Mobiistar vậy!';\n $mainContent.='<br>';\n $mainContent .= 'Mã được áp dụng khi bạn mua hàng online cho bất kì sản phẩm nào của Mobiistar tại website http://muahang.mobiistar.vn theo 3 bước sau:';\n $mainContent.='<br>';\n $mainContent.='- Bước 1: Vào website http://muahang.mobiistar.vn/ chọn mua sản phẩm như bình thường';\n $mainContent.='<br>';\n $mainContent.='- Bước 2: Nhận cuộc gọi xác nhận đơn hàng và ưu đãi từ nhân viên Mobiistar';\n $mainContent.='<br>';\n $mainContent.='- Bước 3: Nhận hàng và thanh toán đúng với số tiền ưu đãi mà nhân viên xác nhận cho bạn';\n $mainContent.='<br>';\n $mainContent.='Lưu ý: Mã giao hàng miễn phí chỉ áp dụng với những trường hợp vận chuyển dưới 100K.';\n $mainContent.='<br>';\n $mainContent.='<br>';\n $mainContent.='Năm mới đến rồi, còn chờ gì mà chưa sắm ngay điện thoại mới với mã giao hàng miễn phí đặc biệt từ Mobiistar để đón Tết Đông Đủ Đẹp!';\n } else{\n return false;\n }\n $content = file_get_contents(MEDIAPATH.'files/envelopes.html'); /* Noi dung se de trong file html o thu muc media/files */\n\n /* Thay the nhung thong tin can thiet tu noi dung trong file */\n $content = str_replace('VAR_NAME', $userClass->full_name, $content);\n $content = str_replace('VAR_BODY', $mainContent, $content);\n\n //\trequire_once(APPPATH.'third_party/mail/class.phpmailer.php');\n require_once(APPPATH.'third_party/mail/PHPMailerAutoload.php');\n $mail = new PHPMailer();\n $mail->IsSMTP();\n $mail->SMTPAuth = true;\n $mail->Host = \"email-smtp.us-east-1.amazonaws.com\";\n $mail->Port = \"587\";\n $mail->SMTPSecure = \"tls\";\n $mail->Username = \"AKIAJEDEGEVJAFFXEVTA\";\n $mail->Password = \"AgK8XPx2MLj2uVc5sQHLAzGeY5QGIDipvxZfB8m7lUkU\";\n $mail->SetFrom('[email protected]', 'Mobiistar');\n $mail->CharSet = 'UTF-8';\n\n $mail->Subject = $title;\n $body = $content;\n $mail->MsgHTML($body);\n $mail->AddAddress($userClass->email, addslashes($userClass->full_name));\n $mail->AddBCC('[email protected]', \"Leon\");\n return $mail->Send();\n}", "title": "" }, { "docid": "106d00765666c52bb22d18fb85f30b5b", "score": "0.6248552", "text": "function send_email($email, $sub, $data)\n\t{\n\t error_reporting(2);\n ini_set('display_errors', 1);\n set_error_handler(\"var_dump\");\n\t \n\t $to = $email;\n\t\t $subject = $sub;\n\t\t \n\t\t $url = \"192.168.0.54:8093/emailer/emailer-tech.html\";\n\t\t $ch = curl_init();\n\t\t curl_setopt ($ch, CURLOPT_URL, $url);\n\t\t curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 5);\n\t\t curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t $entire_contents = curl_exec($ch);\n\t\t if (curl_errno($ch)) {\n\t\t\t $entire_contents = '';\n\t\t } else {\n\t\t\t curl_close($ch);\n\t\t }\n\n\t\t if (!is_string($entire_contents) || !strlen($entire_contents)) {\n\t\t\t $entire_contents = '';\n\t\t }\n\t \n\t\t $entire_message = $entire_contents;\n\t \n\t\t $entire_message = str_replace(\"_@entire_feeds@_\",$data, $entire_message);\n\t\t $entire_message = str_replace(\"_@name@_\",'Tech', $entire_message);\n\t\t $entire_message = str_replace(\"_@year@_\",date('Y'), $entire_message);\n\t\t \n\t\t $msgHeaders = \"\";\n\t\t $msgHeaders .= \"From:Alert Eye <[email protected]>\\r\\n\";\n\t\t $msgHeaders .= \"MIME-Version: 1.0\\r\\n\";\n\t\t $msgHeaders .= \"Content-Type: text/html; charset=utf-8\\r\\n\";\n\t\t \n\t\t if(mail($to, $subject, $entire_message, $msgHeaders))\n\t\t {\n\t\t echo 1;\n\t\t }\n\t\t else\n\t\t {\n\t\t echo 0;\n\t\t }\n\t}", "title": "" }, { "docid": "12a8399f97bf3c86d6e3974280fc2cd1", "score": "0.62482905", "text": "function exchange_mail2($userClass){\n if(empty($userClass->email)){ return false; }\n if(filter_var($userClass->email, FILTER_VALIDATE_EMAIL) === false){ return false; }\n\n $userClass->full_name = ucwords($userClass->full_name); // viet hoa cac ky tu dau cua ten\n $title = 'Đăng kí thành công Mã Đông Đủ Đẹp sắm PRIME X Max và Zumbo S2 Dual với mức giá cực sướng.';\n $content = file_get_contents(MEDIAPATH.'files/exchange_test.html'); /* Noi dung se de trong file html o thu muc media/files */\n\n /* Thay the nhung thong tin can thiet tu noi dung trong file */\n $content = str_replace('VAR_NAME', $userClass->full_name, $content);\n $content = str_replace('VAR_CODE', $userClass->voucher_code, $content);\n\n //\trequire_once(APPPATH.'third_party/mail/class.phpmailer.php');\n require_once(APPPATH.'third_party/mail/PHPMailerAutoload.php');\n// require_once(APPPATH.'third_party/mail/class.smtp.php');\n\n $mail = new PHPMailer();\n// $mail->IsSMTP();\n// $mail->SMTPAuth = true;\n// $mail->Host = \"ssl://email-smtp.us-east-1.amazonaws.com\";\n// $mail->Port = \"443\";\n// $mail->SMTPSecure = \"ssl\";\n// $mail->Username = \"AKIAJEDEGEVJAFFXEVTA\";\n// $mail->Password = \"AgK8XPx2MLj2uVc5sQHLAzGeY5QGIDipvxZfB8m7lUkU\";\n// $mail->SetFrom('[email protected]', 'Mobiistar');\n// $mail->CharSet = 'UTF-8';\n// $mail->SMTPDebug = 2;\n//\n//// $mail->AltBody = 'Đăng kí thành công Mã Đông Đủ Đẹp sắm PRIME X Max và Zumbo S2 Dual với mức giá cực sướng.';\n//// $mail->Body = '<a href=\"'.base_url().'\">sdajs</a>';\n//// $mail->isHTML(true);\n//// $mail->AddAddress($userClass->email, addslashes($userClass->full_name));\n// $mail->AddAddress('[email protected]', \"Leon\");\n//// $mail->AddBCC('[email protected]', \"Leon\");\n//\n// $mail->Subject = $title;\n// $mail->MsgHTML($content);\n//\n// $emailed = $mail->Send();\n// if(!$emailed) {\n// echo 'Message could not be sent.';\n// echo 'Mailer Error: ' . $mail->ErrorInfo;\n// }\n $mail->SMTPDebug = 3;\n $mail->CharSet = 'UTF-8';\n // Tell PHPMailer to use SMTP\n $mail->isSMTP();\n\n// Replace [email protected] with your \"From\" address.\n// This address must be verified with Amazon SES.\n $mail->setFrom('[email protected]', 'Mobiistar');\n\n// Replace [email protected] with a \"To\" address. If your account\n// is still in the sandbox, this address must be verified.\n// Also note that you can include several addAddress() lines to send\n// email to multiple recipients.\n $mail->addAddress('[email protected]', 'Tran Cong Linh');\n\n// Replace smtp_username with your Amazon SES SMTP user name.\n $mail->Username = 'AKIAJEDEGEVJAFFXEVTA';\n\n// Replace smtp_password with your Amazon SES SMTP password.\n $mail->Password = 'AgK8XPx2MLj2uVc5sQHLAzGeY5QGIDipvxZfB8m7lUkU';\n\n// Specify a configuration set. If you do not want to use a configuration\n// set, comment or remove the next line.\n// $mail->addCustomHeader('X-SES-CONFIGURATION-SET', 'ConfigSet');\n\n// If you're using Amazon SES in a region other than US West (Oregon),\n// replace email-smtp.us-west-2.amazonaws.com with the Amazon SES SMTP\n// endpoint in the appropriate region.\n $mail->Host = 'email-smtp.us-east-1.amazonaws.com';\n\n// The subject line of the email\n $mail->Subject = 'Amazon SES test (SMTP interface accessed using PHP)';\n\n// The HTML-formatted body of the email\n// $mail->Body = '<h1>Email Test</h1>\n// <p>This email was sent through the\n// <a href=\"https://aws.amazon.com/ses\">Amazon SES</a> SMTP\n// interface using the <a href=\"https://github.com/PHPMailer/PHPMailer\">\n// PHPMailer</a> class.</p>';\n$mail->Body = $content;\n// Tells PHPMailer to use SMTP authentication\n $mail->SMTPAuth = true;\n\n// Enable TLS encryption over port 587\n $mail->SMTPSecure = 'ssl';\n $mail->Port = 465;\n\n// Tells PHPMailer to send HTML-formatted email\n $mail->isHTML(true);\n\n// The alternative email body; this is only displayed when a recipient\n// opens the email in a non-HTML email client. The \\r\\n represents a\n// line break.\n $mail->AltBody = \"Email Test\\r\\nThis email was sent through the \n Amazon SES SMTP interface using the PHPMailer class.\";\n$emailed = $mail->send();\n if(!$emailed) {\n echo \"Email not sent. \" , $mail->ErrorInfo , PHP_EOL;\n } else {\n echo \"Email sent!\" , PHP_EOL;\n }\n\n return $emailed;\n}", "title": "" }, { "docid": "5347dc7223dc7b95ee42bdcd85f7f534", "score": "0.6247654", "text": "function emailuserx_email(){\r\n \r\n if ($_POST[\"confirm\"] == 1){\r\n if (!wp_verify_nonce($_POST[\"_wpnonce\"])){ die('Security check'); } \r\n\r\n require_once(ABSPATH . $this->pluginBase . DIRECTORY_SEPARATOR . 'class.phpmailer.php'); \r\n $mail = new PHPMailer(); \r\n $mail->From = get_option('admin_email');\r\n $mail->FromName = get_option('blogname') . \" Mailer\"; \r\n $mail->AddReplyTo(get_option('admin_email'), get_option('blogname') . \" Mailer\"); \r\n $mail->IsHTML(true); \r\n \r\n $mail->Subject = $_POST[\"subject\"];\r\n if ($_POST[\"format\"] == \"html\"){ $mail->MsgHTML($_POST[\"message\"]); }\r\n $mail->AltBody = strip_tags(str_replace(\"<br>\", '\\r\\n', $_POST[\"message\"])); \r\n \r\n $list = explode(\",\", $_POST[\"memberList\"]);\r\n foreach($list as $id){\r\n $mail->addAddress($id); \r\n $mail->Send();\r\n $mail->ClearAddresses(); \r\n }\r\n $status = \"Email(s) Sent\";\r\n \r\n \r\n \r\n \r\n \r\n \r\n }\r\n $text = \"<script type=\\\"text/javascript\\\" src=\\\"../wp-content/plugins/emailuserx/javascript/transfer.js\\\"></script>\"; \r\n $text .= \"<div class=\\\"wrap\\\">\";\r\n $text .= \"<h2>EmailUserX</h2>\";\r\n $text .= \"<span style=\\\"font-weight: bold; color: #FF0000;\\\">$status</span>\"; \r\n \r\n $text .= \"<div id=\\\"poststuff\\\" class=\\\"metabox-holder\\\">\";\r\n $text .= \"<div id=\\\"post-body\\\" class=\\\"has-sidebar\\\">\";\r\n $text .= \"<div id=\\\"post-body-content\\\" class=\\\"has-sidebar-content\\\">\";\r\n $text .= \"<div class=\\\"inside\\\">\";\r\n $text .= \"<form method=\\\"post\\\" action=\\\"tools.php?page=emailuserx/emailuserx_functions.php\\\" id=\\\"myForm\\\" name=\\\"myForm\\\">\";\r\n $text .= \"<input type=\\\"hidden\\\" name=\\\"_wpnonce\\\" value=\\\"\" . wp_create_nonce() . \"\\\" />\";\r\n $text .= \"<input type=\\\"hidden\\\" name=\\\"confirm\\\" value=\\\"1\\\" />\";\r\n\r\n $text .= \"<table class=\\\"form-table\\\">\";\r\n $text .= \"<tr class=\\\"form-field\\\">\"; \r\n $text .= \"<td><strong>Select Users:</strong></td>\";\r\n $text .= \"<td>\";\r\n $text .= \"<input type=\\\"hidden\\\" name=\\\"members\\\" value=\\\"\\\" />\"; \r\n $results = $this->wpdb->get_results(\"select ID, user_login, user_email from \" . $this->wpdb->prefix . \"users order by user_login\");\r\n \r\n $text .= \"<select style=\\\"height: auto;\\\" name=\\\"userList\\\" size=\\\"10\\\" multiple onDblClick=\\\"moveSelectedOptions(this.form.userList, this.form.memberList, this.form.members);\\\">\";\r\n foreach($results as $row){\r\n $text .= \"<option value=\\\"\" . $row->user_email . \"\\\">\" . $row->user_login . \"</option>\";\r\n }\r\n $text .= \"</select>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\";\r\n $text .= \"<select style=\\\"height: auto;\\\" name=\\\"memberList\\\" size=\\\"10\\\" multiple onDblClick=\\\"moveSelectedOptions(this.form.memberList, this.form.userList, this.form.members, false);\\\">\";\r\n $text .= \"</select>\";\r\n \r\n \r\n //$text .= \"<script language=\\\"javascript\\\">selectAllOptions(document.myForm.memberList); document.myForm.members.value = getSelectedValues(document.myForm.memberList); </script>\";\r\n $text .= \"</td></tr>\"; \r\n $text .= \"<tr class=\\\"form-field\\\">\"; \r\n $text .= \"<td><strong>Subject:</strong></td>\";\r\n $text .= \"<td><input type=\\\"text\\\" id=\\\"subject\\\" name=\\\"subject\\\" value=\\\"\\\" />\";\r\n $text .= \"</td></tr>\"; \r\n \r\n $text .= \"<tr class=\\\"form-field\\\">\"; \r\n $text .= \"<td><strong>Message:</strong></td>\";\r\n $text .= \"<td><textarea name=\\\"message\\\" id=\\\"message\\\" style=\\\"height: 150px;\\\" ></textarea>\";\r\n $text .= \"</td></tr>\"; \r\n \r\n $text .= \"<tr class=\\\"form-field\\\">\"; \r\n $text .= \"<td><strong>Format:</strong></td><td>\";\r\n $text .= \"<input type=\\\"radio\\\" name=\\\"format\\\" id=\\\"format\\\" value=\\\"html\\\" checked style=\\\"width: 15px;\\\" />HTML &nbsp;&nbsp;\";\r\n $text .= \"<input type=\\\"radio\\\" name=\\\"format\\\" id=\\\"format\\\" value=\\\"plain\\\" style=\\\"width: 15px;\\\" />Plain Text \";\r\n $text .= \"</td></tr>\"; \r\n \r\n \r\n $text .= \"</table>\"; \r\n $text .= \"</div></div>\";\r\n $text .= \"<p class=\\\"submit\\\"><input type=\\\"submit\\\" name=\\\"Submit\\\" value=\\\"Save Changes\\\" />\";\r\n $text .= \"</div></div></div>\";\r\n print($text);\r\n \r\n \r\n \r\n \r\n \r\n }", "title": "" }, { "docid": "62e88d2e2e4b2797a31bc2d1686e5cfe", "score": "0.6246366", "text": "public function cron_send_feedback_email()\r\n\t{\r\n// instead we call cron_send_email/send_customer_review_email\r\n\t\t$this->skype_ebay_model->get_skype_ebay_service()->send_feedback_email();\r\n\t}", "title": "" } ]
3132900058e0b095e2656b19a21b4be7
getIndexFilter / Flter out all erotic spots on the indx page
[ { "docid": "924629a114353ccc872fdf30a55a4d86", "score": "0.0", "text": "public function setEroticIndexFilter($userId)\n {\n $this->setIndexFilter(\n $userId,\n ['valuelist' => [],\n 'title' => 'Index filter',\n 'torder' => 999,\n 'tparent' => 0,\n 'children' => [],\n 'filtertype' => 'index_filter',\n 'sorton' => '',\n 'sortorder' => '',\n 'enablenotify' => false,\n 'icon' => 'spotweb.png',\n 'tree' => '~cat0_z3', ]\n );\n }", "title": "" } ]
[ { "docid": "9add851ceeaf0ddce280b74630f06c41", "score": "0.6194925", "text": "function culturefeed_search_ui_set_noindex_metatag() {\n\n // Default noindex should be shown.\n $noindex = TRUE;\n\n $query = drupal_get_query_parameters(NULL, array('q'));\n // Start page should be indexed.\n if (empty($query)) {\n $noindex = FALSE;\n }\n else {\n\n // No index is FALSE, if user is filtering on entity type actor.\n if (isset($query['facet']['type'])) {\n\n $facets = $query['facet'];\n if ($query['facet']['type'][0] == 'actor') {\n unset($facets['type']);\n if (isset($query['facet']['category_flandersregion_id'])) {\n if (count($query['facet']['category_flandersregion_id']) <= 1) {\n unset($facets['category_flandersregion_id']);\n }\n }\n }\n\n // If type=actor is the only parameter with flandersregion, set noindex to false.\n if (count($facets) == 0) {\n $noindex = FALSE;\n }\n\n }\n\n // No index is FALSE, if user is filtering on actor type.\n if (isset($query['facet']['category_actortype_id'])) {\n\n $facets = $query['facet'];\n unset($facets['category_actortype_id']);\n unset($facets['type']);\n\n if (isset($query['facet']['category_flandersregion_id'])) {\n if (count($query['facet']['category_flandersregion_id']) <= 1) {\n unset($facets['category_flandersregion_id']);\n }\n }\n\n unset($query['location']);\n unset($query['regId']);\n unset($query['actors']);\n unset($query['facet']);\n\n // If type, flandersregion, location and/or regId was the only extra facet / parameters, set noindex to false.\n if (count($facets) == 0 && count($query) == 0) {\n $noindex = FALSE;\n }\n\n }\n\n // No index is FALSE, if user is filtering on event type.\n elseif (isset($query['facet']['category_eventtype_id'])) {\n\n if (count($query['facet']['category_eventtype_id']) == 1) {\n\n $facets = $query['facet'];\n unset($facets['category_eventtype_id']);\n\n if (isset($query['facet']['category_theme_id'])) {\n if (count($query['facet']['category_theme_id']) <= 1) {\n unset($facets['category_theme_id']);\n }\n }\n\n if (isset($query['facet']['category_flandersregion_id'])) {\n if (count($query['facet']['category_flandersregion_id']) <= 1) {\n unset($facets['category_flandersregion_id']);\n }\n }\n\n unset($query['location']);\n unset($query['regId']);\n unset($query['facet']);\n unset($query['voor-kinderen']);\n\n // If theme_id, flandersregion and/or regId was the only extra facet / parameters, set noindex to false.\n if (count($facets) == 0 && count($query) == 0) {\n $noindex = FALSE;\n }\n\n }\n\n }\n\n // No index is FALSE, if user is filtering on umv category and/or region.\n elseif (isset($query['facet']['category_umv_id'])) {\n\n if (count($query['facet']['category_umv_id']) == 1) {\n\n $facets = $query['facet'];\n unset($facets['category_umv_id']);\n\n if (isset($query['facet']['category_flandersregion_id'])) {\n if (count($query['facet']['category_flandersregion_id']) <= 1) {\n unset($facets['category_flandersregion_id']);\n }\n }\n\n unset($query['location']);\n unset($query['regId']);\n unset($query['facet']);\n\n // If flandersregion or regId was the only extra facet / parameters, set noindex to false.\n if (count($facets) == 0 && count($query) == 0) {\n $noindex = FALSE;\n }\n\n }\n\n }\n\n // No index is FALSE, if user is filtering on datetype today and max 1 flandersregion Id.\n elseif (isset($query['facet']['datetype'])) {\n\n if ($query['facet']['datetype'][0] == 'today') {\n\n $facets = $query['facet'];\n unset($facets['datetype']);\n\n if (isset($query['facet']['category_flandersregion_id'])) {\n\n if(count($query['facet']['category_flandersregion_id']) == 1) {\n unset($facets['category_flandersregion_id']);\n }\n\n }\n \n unset($query['facet']);\n\n // If datetype today was the only filter with max 1 flandersregion Id set noindex to false.\n if (count($facets) == 0 && count($query) == 0) {\n $noindex = FALSE;\n }\n\n }\n\n }\n\n // No index is FALSE, if user is filtering on flandersregion Id.\n elseif (isset($query['facet']['category_flandersregion_id'])) {\n\n if (count($query['facet']['category_flandersregion_id']) == 1) {\n\n $facets = $query['facet'];\n unset($facets['category_flandersregion_id']);\n unset($query['facet']);\n\n // If flandersregion Id was the only filter set noindex to false.\n if (count($facets) == 0 && count($query) == 0) {\n $noindex = FALSE;\n }\n\n }\n\n }\n\n // No index is FALSE, if user is filtering on location or region Id without additional facets.\n elseif (isset($query['regId']) || isset($query['location'])) {\n\n unset($query['location']);\n unset($query['regId']);\n\n // If location or regId was the only filter set noindex to false.\n if (count($query) == 0) {\n $noindex = FALSE;\n }\n\n }\n\n }\n\n // Add the \"noindex, follow\" meta tag if needed.\n if ($noindex) {\n culturefeed_search_set_noindex_metatag();\n }\n\n}", "title": "" }, { "docid": "ab07755b1d8067b7466bc7c03a11c864", "score": "0.61630565", "text": "public function indexToSearchIndex();", "title": "" }, { "docid": "53148d7cb72beb0d6abab87bb567e451", "score": "0.61278754", "text": "public function getIndex();", "title": "" }, { "docid": "53148d7cb72beb0d6abab87bb567e451", "score": "0.61278754", "text": "public function getIndex();", "title": "" }, { "docid": "bb7f11780cc2116cc3bc75652f042946", "score": "0.60588014", "text": "public function takeIndex()\n\t\t{\n\t\t\t$this->csv->takeIndexCSV();\n\t\t\t$this->txt->takeIndexTXT();\n\t\t}", "title": "" }, { "docid": "9b5173aa2738123e467ecf7b1a839c22", "score": "0.60509264", "text": "public function getIndex() {}", "title": "" }, { "docid": "9b5173aa2738123e467ecf7b1a839c22", "score": "0.60509264", "text": "public function getIndex() {}", "title": "" }, { "docid": "9b5173aa2738123e467ecf7b1a839c22", "score": "0.6049767", "text": "public function getIndex() {}", "title": "" }, { "docid": "9b5173aa2738123e467ecf7b1a839c22", "score": "0.6049767", "text": "public function getIndex() {}", "title": "" }, { "docid": "9b5173aa2738123e467ecf7b1a839c22", "score": "0.60493237", "text": "public function getIndex() {}", "title": "" }, { "docid": "9b5173aa2738123e467ecf7b1a839c22", "score": "0.60493237", "text": "public function getIndex() {}", "title": "" }, { "docid": "9b5173aa2738123e467ecf7b1a839c22", "score": "0.60493237", "text": "public function getIndex() {}", "title": "" }, { "docid": "9b5173aa2738123e467ecf7b1a839c22", "score": "0.60493237", "text": "public function getIndex() {}", "title": "" }, { "docid": "9b5173aa2738123e467ecf7b1a839c22", "score": "0.60493237", "text": "public function getIndex() {}", "title": "" }, { "docid": "a1fda0a4ef0b38ed4caf0d06416e79ad", "score": "0.60439247", "text": "public function indexes();", "title": "" }, { "docid": "f6bc4757d6a0854c09171b17d112effe", "score": "0.5899103", "text": "public function index() {\n\t\t$this->post_indexation->index();\n\t\t$this->term_indexation->index();\n\t\t$this->general_indexation->index();\n\t\t$this->post_type_archive_indexation->index();\n\t\t$this->post_link_indexing_action->index();\n\t\t$this->term_link_indexing_action->index();\n\t\t$this->complete_indexation_action->complete();\n\t}", "title": "" }, { "docid": "133c9eee93d219314e7477d9f166177d", "score": "0.5898595", "text": "function getIndex() ;", "title": "" }, { "docid": "cb0742838e6bf36d7b291cf242b855a2", "score": "0.5879183", "text": "function _index() {\n\t\t$index = array();\n\t\t$data = $this->model->data[$this->model->name];\n\t\tforeach ($data as $key => $value) {\n\t\t\tif (is_string($value)) {\n\t\t\t\t$columns = $this->model->getColumnTypes();\n\t\t\t\tif ($key != $this->model->primaryKey && isset($columns[$key]) && in_array($columns[$key],array('text','varchar','char','string'))) {\n\t\t\t\t\t$index []= strip_tags(html_entity_decode($value,ENT_COMPAT,'UTF-8'));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// This is the custom part\n\t\t$tag_results = $this->find('all', array(\n\t\t\t'conditions' => array('Article.id' => $this->id),\n\t\t\t'fields' => array('Article.id'),\n\t\t\t'contain' => array('Tag')\n\t\t));\n\t\techo '<pre>'.print_r($tag_results, true).'</pre>';\n\t\t\n\t\t$index = join('. ',$index);\n\t\t$index = iconv('UTF-8', 'ASCII//TRANSLIT', $index);\n\t\t$index = preg_replace('/[\\ ]+/',' ',$index);\n\t\treturn $index;\n\t}", "title": "" }, { "docid": "429dc556699d23db5de96136f0685bb2", "score": "0.5818083", "text": "abstract function index();", "title": "" }, { "docid": "429dc556699d23db5de96136f0685bb2", "score": "0.5818083", "text": "abstract function index();", "title": "" }, { "docid": "429dc556699d23db5de96136f0685bb2", "score": "0.5818083", "text": "abstract function index();", "title": "" }, { "docid": "bd42917a83f2b9cec797445d9eb39fc3", "score": "0.5772252", "text": "public function showIndex()\n\t{\n\n\t\t//var_dump(Parser::GetRazdely());\n\n\t\t//var_dump(Parser::getCarPost('prodam-mikroavtobus-26483298'));\n\n\t\t//var_dump(Parser::getPosts('realty/sell_flats', 5));\n\n\t\t//var_dump(Parser::getPosts('auto/sale', 5, 5));\n\n\t\tvar_dump(Parser::getPosts('free', 4, 1, 10));\n\t}", "title": "" }, { "docid": "f532609c6fb083f2e6b35d25a8e0eb23", "score": "0.57507604", "text": "public function fullIndexAction() {}", "title": "" }, { "docid": "7fd745b6000ac6d88fe68acbca5b4f4f", "score": "0.5746197", "text": "public function page_uri_index()\n {\n }", "title": "" }, { "docid": "db783c05d1de8a4b48969bf6d8f53a51", "score": "0.57089055", "text": "public function getIndex()\n {\n //\n }", "title": "" }, { "docid": "21d1d8a98dacdb35406c14d807e25a3f", "score": "0.5682003", "text": "public function indexAction()\n {\n $this->autofilterParameters = $this->autofilterParameters + $this->_autofilterExtraParameters;\n if (! isset($this->indexParameters['contentTitle'])) {\n $this->indexParameters['contentTitle'] = $this->getIndexTitle();\n }\n\n return parent::indexAction();\n }", "title": "" }, { "docid": "59b4a9c3fb028aed4cf495bfa168b71a", "score": "0.5643779", "text": "function getElasticSearchIndexes() {\n\n return 'pdb'.',' . 'geo'.',' . 'dbgap' .','. 'lincs' .','. 'arrayexpress'.','. 'gemma'.',' . 'sra'.','.'bioproject' .','.'clinicaltrials'.',' . 'dryad' .','\n .'cvrg'.','.'dataverse' .','.'neuromorpho'.','.'peptideatlas'.','.'ctn'.','.'cia'.','.'mpd'.','.'niddkcr'.','.'physiobank'.','.'proteomexchange'.','.'openfmri'.','.'nursadatasets'.','\n .'yped'.','.'cil'.','.'icpsr'.','.'gdc'.','.'bmrb'.','.'swissprot'.','.'clinvar'.','.'retina'.','.'emdb'.','.'epigenomics'.','.'nitrcir'.','.'neurovaultatlases'.','.'neurovaultcols'.','\n .'neurovaultnidm'.','.'rgd'.','.'datacitebgi'.','.'datacitemorphobank'.','.'vectorbase'.','.'datacitegnd'.','.'datacitepeerj'.','.'datacitezenodo'.','.'omicsdi'.','.'datacitesbgrid'\n .','.'simtk'.','.'datacitecxidb'.','.'datacitebils'.','.'dataciteada'.','.'dataciteukda'.','.'dataciteadaptive'.','.'datacitemit'.','.'datacitectsi'.','.'datacitefdz'\n .','.'datacitembf'.','.'datacitenimh'.','.'datacitejhu'.','.'datacitecandi'.','.'datacitelshtm'.','.'datacitedatabrary'.','.'immport'.','.'datacitesdscsg'.','.'datacitecrcns'\n .','.'nsrr'.','.'lsdb'.','.'naturedata'.','.'genenetwork'.','.'ndarpapers'.','.'datacitethieme'.','.'datacitefigshare'.','.'dataciteccdc'.','.'wormbase'.','.'gtexldacc'.','.'metabolomics';\n\n}", "title": "" }, { "docid": "b83b4409e7d7d87bde9cf665fc76864c", "score": "0.5615107", "text": "public function indexFields();", "title": "" }, { "docid": "659cff99719178b0478d661a3432fe43", "score": "0.5595368", "text": "function getIndex() {\n\t\tglobal $_zp_current_search, $_zp_current_album;\n\t\tif ($this->index == NULL) {\n\t\t\t$album = $this->getAlbum();\n\t\t\tif (!is_null($_zp_current_search) && !in_context(ZP_ALBUM_LINKED) || $album->isDynamic()) {\n\t\t\t\tif ($album->isDynamic()) {\n\t\t\t\t\t$images = $album->getImages();\n\t\t\t\t\tfor ($i=0; $i < count($images); $i++) {\n\t\t\t\t\t\t$image = $images[$i];\n\t\t\t\t\t\tif ($this->filename == $image['filename']) {\n\t\t\t\t\t\t\t$this->index = $i;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->index = $_zp_current_search->getImageIndex($this->album->name, $this->filename);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$images = $this->album->getImages(0);\n\t\t\t\tfor ($i=0; $i < count($images); $i++) {\n\t\t\t\t\t$image = $images[$i];\n\t\t\t\t\tif ($this->filename == $image) {\n\t\t\t\t\t\t$this->index = $i;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this->index;\n\t}", "title": "" }, { "docid": "bc52b814f03da00542467539549f4884", "score": "0.5567348", "text": "function getIndexes();", "title": "" }, { "docid": "b00056f11d7bfbd0f6fae8f58953b358", "score": "0.55498004", "text": "public function indexPerLevelAction() {\n\n }", "title": "" }, { "docid": "49f677d2c2dbc30479d2df323b27f183", "score": "0.55470455", "text": "public function getIndex()\n {\n \n }", "title": "" }, { "docid": "e3d36eaa79506607d8cba49ee2bb037d", "score": "0.55094606", "text": "abstract public function action_index();", "title": "" }, { "docid": "b4081b994fe6ff7a7ec75012fb61ddf1", "score": "0.55043495", "text": "public function getIndexInfo() {\n\n }", "title": "" }, { "docid": "f3db39ef20f7176338607a9ce51b64b8", "score": "0.5489442", "text": "function index()\n\t{\n\t\t$this->redirect(array('controller'=>\"{$this->thing}_page_indices\"));\n\t}", "title": "" }, { "docid": "b698366ba5d29e90625b286249da5396", "score": "0.5479416", "text": "public function getIndex()\n\t{\n\t\treturn $this->hit['_index'];\n\t}", "title": "" }, { "docid": "5b50cf08b4a7b91cb7b377685923c23f", "score": "0.54738253", "text": "public function getTagIndex()\n {\n $tags = $this->tags->findAllWithTrickCount();\n //$page = $this->tags->BuscaTodosPaginado();\n\n $this->view('browse.pags', compact('tags'));\n }", "title": "" }, { "docid": "405a25fdf41893770ac6a1f6a83f3a9c", "score": "0.5467536", "text": "public function getIndexStart();", "title": "" }, { "docid": "2770a91bdf0825b9275c29c6ac2dc0a4", "score": "0.5467324", "text": "public function index() {\n if ($this->_m_index !== null)\n return $this->_m_index;\n $this->_m_index = ($this->isIndexSeparate() ? $this->indexSeparate() : $this->indexInTag());\n return $this->_m_index;\n }", "title": "" }, { "docid": "de72d2ff0eb3412b180f9b1d52c2074d", "score": "0.54652417", "text": "public function index()\n {\n parent::GetPageData(); \n return $this->showIndex();\n }", "title": "" }, { "docid": "f398f81c8a3967d2e524b6a4f9b4aa16", "score": "0.5452435", "text": "protected function indexAction() {}", "title": "" }, { "docid": "691c61341597d73884ff03a4372d3b93", "score": "0.5449623", "text": "abstract public function index();", "title": "" }, { "docid": "691c61341597d73884ff03a4372d3b93", "score": "0.5449623", "text": "abstract public function index();", "title": "" }, { "docid": "691c61341597d73884ff03a4372d3b93", "score": "0.5449623", "text": "abstract public function index();", "title": "" }, { "docid": "12b5ce1415ebafe58e92bc0fbae42757", "score": "0.54348016", "text": "public function using_index_permalinks()\n {\n }", "title": "" }, { "docid": "429115ffb72db297ce39c645c8d78ccf", "score": "0.54287976", "text": "public function actionIndex()\n {\n $finder = new Finder();\n\n $iterator = $finder\n ->files()\n ->name('*.jpg')\n ->name('*.jpeg')\n ->name('*.png')\n ->size('>= 10K')\n ->size('<= 1M')\n ->in(realpath($this->directory));\n\n $i = 1;\n foreach ($iterator as $file) {\n /** @var Image $image */\n $image = ImageManager::importImage($file->getRealpath());\n if ($image) {\n printf(\"[%d/%d] %s %s\\n\", $i, $iterator->count(), $file->getRealpath(), $image->phash);\n } else {\n printf(\"[%d/%d] Skipped\\n\", $i, $iterator->count());\n }\n $i++;\n }\n }", "title": "" }, { "docid": "de41211bcbe96a62e06fc9bc6ef5d447", "score": "0.542301", "text": "public function getIndex()\n {\n return \"jfaiojwefjaiowef\";\n \n }", "title": "" }, { "docid": "7cedd9d97167b81c50b1312a2201316a", "score": "0.5419906", "text": "abstract protected function getIndexSearchName();", "title": "" }, { "docid": "5485403fa050cce19530ac208f29f9f7", "score": "0.5412884", "text": "public function actionIndex()\n {\n $tags = Tag::findHotTags(8);\n $keyword = SearchHistory::findSearchHistory(5);\n return $this->render('index',['tags' => $tags,'keyword' => $keyword]);\n }", "title": "" }, { "docid": "9f7fe63e54161d3f54323a20c144f725", "score": "0.5409793", "text": "public function postIndex()\n {\n $request = request()->except('_token');\n\n $validator = Validator::make($request,\n [\n 'filters.index' => 'required',\n 'filters.type' => 'required',\n ]);\n\n if ($validator->fails()) {\n return back()->with('error_message', 'Spiacenti, dovete selezionare almeno un indice ed una tipologia sulla quale effettuare l\\'operazione');\n }\n\n $index = trim($request['filters']['index']);\n $type = trim($request['filters']['type']);\n\n\n if ((!request()->has('id')) AND (request()->has('operation') AND request()->get('operation') !== \"create\")) {\n\n $page =1;\n if(request()->has('pagehit')) $page = (request()->input('pagehit') / (config('elasticquent.max_result','20')));\n\n\n $model = new GenericEntity($type, $index);\n\n $input = ['metadata'=>[]];\n if(request()->has('metadata'))$input = request()->only('metadata');\n\n\n try {\n\n $purgedInput = array_map('array_filter', $input);\n\n $results = $model->get($purgedInput['metadata'], [], $page);\n } catch (CouldNotConnectToHost $e) {\n return back()->with('error_message', 'Spiacenti, il servizio non è disponibile');\n } catch (EntityNotFoundException $e) {\n return back()->with('error_message', 'Spiacenti, nessun risultato trovato');\n }\n\n\n $finalResults = [];\n $element = [];\n $tableHead = ['id'];\n\n foreach ($results['hits']['hits'] as $result) {\n $finalResult = $result['_source'];\n foreach ($finalResult as $key => $item) {\n\n\n $element[$key] = $item;\n if (!in_array($key, $tableHead) and !is_array($item) and !(strpos($key, 'id'))) $tableHead[] = $key;\n\n }\n $element['id'] = $result['_id'];\n $finalResults[] = $element;\n }\n\n\n\n return view('admin.manage_entity.global_search', [\n 'indices' => $indices = $this->client->indices()->getMapping(),\n 'filters' => $request['filters'],\n 'results' => $finalResults,\n 'hits' => $results['hits']['total'],\n 'pagehit' => $page,\n 'tableHead' => $tableHead,\n 'type' => $type\n ]);\n\n } elseif (request()->has('operation') AND request()->get('operation') !== \"create\") {\n\n if (request()->has('id')) {\n if (request()->has('operation') AND request()->get('operation') === \"edit\") {\n return redirect()->to('/entity/edit/' . $index . '/' . $type . '/' . trim(request()->get('id')));\n }\n if (request()->has('operation') AND request()->get('operation') === \"delete\") {\n return redirect()->to('/entity/delete/' . $index . '/' . $type . '/' . trim(request()->get('id')));\n } else return redirect()->to('/entity/show/' . $index . '/' . $type . '/' . trim(request()->get('id')));\n }\n } else {\n return redirect()->to('/entity/create/' . $index . '/' . $type);\n }\n }", "title": "" }, { "docid": "d4f7095bf0596ff3bbf8eee6a31ab8ac", "score": "0.54041034", "text": "public function index()\n {\n return ApertureLuoghiInteresse::get();\n }", "title": "" }, { "docid": "d6af04da02a79ef6b5fb6c924c596ee7", "score": "0.5373315", "text": "function sportal_index()\n{\n\tglobal $smcFunc, $context, $scripturl, $modSettings, $txt;\n\n\t$context['sub_template'] = 'portal_index';\n\n\tif (empty($modSettings['sp_articles_index']))\n\t\treturn;\n\n\t$request = $smcFunc['db_query']('','\n\t\tSELECT COUNT(*)\n\t\tFROM {db_prefix}sp_articles AS spa\n\t\t\tINNER JOIN {db_prefix}sp_categories AS spc ON (spc.id_category = spa.id_category)\n\t\tWHERE spa.status = {int:article_status}\n\t\t\tAND spc.status = {int:category_status}\n\t\t\tAND {raw:article_permissions}\n\t\t\tAND {raw:category_permissions}\n\t\tLIMIT {int:limit}',\n\t\tarray(\n\t\t\t'article_status' => 1,\n\t\t\t'category_status' => 1,\n\t\t\t'article_permissions' => sprintf($context['SPortal']['permissions']['query'], 'spa.permissions'),\n\t\t\t'category_permissions' => sprintf($context['SPortal']['permissions']['query'], 'spc.permissions'),\n\t\t\t'limit' => 1,\n\t\t)\n\t);\n\tlist ($total_articles) = $smcFunc['db_fetch_row']($request);\n\t$smcFunc['db_free_result']($request);\n\n\t$total = min($total_articles, !empty($modSettings['sp_articles_index_total']) ? $modSettings['sp_articles_index_total'] : 20);\n\t$per_page = min($total, !empty($modSettings['sp_articles_index_per_page']) ? $modSettings['sp_articles_index_per_page'] : 5);\n\t$start = !empty($_REQUEST['articles']) ? (int) $_REQUEST['articles'] : 0;\n\t$total_pages = $per_page > 0 ? ceil($total / $per_page) : 0;\n\t$current_page = $per_page > 0 ? ceil($start / $per_page) : 0;\n\n\tif ($total > $per_page)\n\t{\n\t\t$context['page_index'] = constructPageIndex($context['portal_url'] . '?articles=%1$d', $start, $total, $per_page, true);\n\n\t\tif ($current_page > 0)\n\t\t\t$context['previous_start'] = ($current_page - 1) * $per_page;\n\t\tif ($current_page < $total_pages - 1)\n\t\t\t$context['next_start'] = ($current_page + 1) * $per_page;\n\t}\n\n\t$context['articles'] = sportal_get_articles(0, true, true, 'spa.id_article DESC', 0, $per_page, $start);\n\n\tforeach ($context['articles'] as $article)\n\t{\n\t\tif (($cutoff = $smcFunc['strpos']($article['body'], '[cutoff]')) !== false)\n\t\t\t$article['body'] = $smcFunc['substr']($article['body'], 0, $cutoff);\n\n\t\t$context['articles'][$article['id']]['preview'] = parse_bbc($article['body']);\n\t\t$context['articles'][$article['id']]['date'] = timeformat($article['date']);\n\t}\n}", "title": "" }, { "docid": "4323d6d9523e36082acbd705cf094f2f", "score": "0.53480357", "text": "function index(){\n\t\t\n\t}", "title": "" }, { "docid": "018ce1aec45a8f726983a7d533aad346", "score": "0.53462476", "text": "public function indexAction() \n {\n\t\tif (!isset($this->view->flagFailedSearch)) {\n\t\t\t$this->view->flagFailedSearch = FALSE;\n\t\t}\n }", "title": "" }, { "docid": "39d444b42e74de070f98a58310efb417", "score": "0.5340741", "text": "function indexAction(){}", "title": "" }, { "docid": "c32a84ee278fa475d143866d1afb8c71", "score": "0.5340657", "text": "function ajs_spb_front_page_index_grid($grid_item) {\n\t$index_grid_title = get_theme_mod( 'ajs_spb_index_grid_title' );\n\t?>\n\t<h2 class=\"index-grid-title\"><?php echo $index_grid_title ?></h2>\n\t<section id=\"index-grid\">\n\t<?php\n\t\tfor( $i = 1 ; $i < count($grid_item); $i++) { ?>\n\t\t\t<div class=\"index-grid\">\n\t\t\t\t<a href=\"<?php echo $grid_item[$i]['guid'] ?>\">\n\t\t\t\t\t<?php echo get_the_post_thumbnail( $grid_item[$i]['ID'], 'thumbnail' )?>\n\t\t\t\t</a>\n\t\t\t</div>\n\t\t<?php }\n\t?>\n\t</section><!-- #index-grid -->\n\t<?php\n}", "title": "" }, { "docid": "a7c44aff1908d439640f8bc809adb022", "score": "0.53387505", "text": "public function gene_index()\n {\n $filterArr = [\"0\"=>\"id\", \"1\"=>\"name\"];\n if(!empty(Input::get('filter')))\n $filter = $filterArr[Input::get('filter')];\n else\n $filter = \"id\";\n\n // $gene = Gene::all();\n\n $gene = \\DB::table('gene') /*select semua, studbiru utk pggl model*/\n ->selectRaw(\"id, name\")\n ->orderBy($filter)\n ->get();\n \n return View::make('admin.gene_index', array('gene' => $gene)); /*klau lvar lbih dr 1 (a->a, b->b)*/\n }", "title": "" }, { "docid": "58acc286747245b592c9f568ccd2ee7b", "score": "0.5321498", "text": "public function actionIndex(){\n\n $hits = Product::find()->where(['hit'=>'1'])->limit(4)->all();\nreturn $this->render('index', compact('hits'));\n\n}", "title": "" }, { "docid": "19b018a8c2368ebeb93d6ce8dc42fb3f", "score": "0.5319031", "text": "public abstract function index();", "title": "" }, { "docid": "19b018a8c2368ebeb93d6ce8dc42fb3f", "score": "0.5319031", "text": "public abstract function index();", "title": "" }, { "docid": "22d41043a5b8d8a78d8dcd9b412dab58", "score": "0.5317074", "text": "public function getIndex()\n {\n Session::forget('page_step_1_data');\n Session::forget('pages-data-add');\n Session::forget('page_step_2_data');\n Session::forget('sorted');\n Session::forget('preview-step-input-all');\n\n\n $pages = Page::PreparepagesForIndex(Page::all());\n return view('pages.index')\n ->with('layout',$this->layout)\n ->with('pages',$pages);\n }", "title": "" }, { "docid": "1e0ac6d0648ba65343473e7775703eb0", "score": "0.53139746", "text": "function index()\n {\n\t\tenhancedmap_helper::json_index($this);\n }", "title": "" }, { "docid": "853b38ac22cfde1580d76c4752fdf11a", "score": "0.530963", "text": "public function getIndex() {\n return $this->index();\n }", "title": "" }, { "docid": "db7eadfda57155bf6dfc510bc4b4b72a", "score": "0.53090155", "text": "public function getIndexEnd();", "title": "" }, { "docid": "64436c2263d16783cbe549d8cad1f924", "score": "0.53051853", "text": "private function fetch_yoast_noindex_posts(): array {\n $query = new \\WP_Query([\n 'post_type' => 'any',\n 'meta_key' => '_yoast_wpseo_meta-robots-noindex',\n 'meta_value_num' => 1,\n 'posts_per_page' => -1,\n ]);\n return f\\map(f\\compose('get_permalink', f\\prop('ID')), $query->posts);\n }", "title": "" }, { "docid": "6f834d2976051f057ea9a3aeb934eb24", "score": "0.5274876", "text": "public function getIndices();", "title": "" }, { "docid": "9c17187e2b34ed32715e8195e92cd8c3", "score": "0.52714646", "text": "public function getIndex()\n {\n $arrIndex = array(); \n \n $arrIndex['Damage'] = $this->Damage;\n $arrIndex['Defence'] = $this->Defence;\n $arrIndex['Critical'] = $this->Critical;\n $arrIndex['Vitality'] = $this->Vitality;\n\n return $arrIndex;\n }", "title": "" }, { "docid": "974765cb4bc700284087cd37fe0c71a4", "score": "0.5252235", "text": "abstract public function getIndexes();", "title": "" }, { "docid": "e5752efc97ffe8f8f5989c841001c537", "score": "0.5248298", "text": "public function admin_index() {}", "title": "" }, { "docid": "87cb2f4669a9ac365d4d476f337c9f3f", "score": "0.52408206", "text": "function bandhead_index()\r\n {\r\n\r\n $conditions = array();\r\n $this->paginate = array(\r\n 'recursive' => 0,\r\n 'limit' => LIMIT,\r\n 'conditions' => $conditions,\r\n //'group' => array('product_size_id', 'product_style_id'),\r\n 'order' => array(\r\n 'ProductColor.updated' => 'DESC'\r\n )\r\n );\r\n $result = $this->paginate('ProductColor');\r\n //pr($result); die; \r\n $this->set('result', $result);\r\n }", "title": "" }, { "docid": "098576123e3a57672cb5f9ea36453f43", "score": "0.5236628", "text": "protected function index() {}", "title": "" }, { "docid": "4a09a3b549e87700e60da8b8451c2b4e", "score": "0.52186704", "text": "public function index()\n {\n $images=Image::all();\n\n return $this->showAll('system.image.index',$images);\n }", "title": "" }, { "docid": "997d70e9a74a4080a5da027aff11432a", "score": "0.5216845", "text": "public function index() {\n return $this->handleNotFound(function () {\n $list = [];\n\n foreach ($this->researchService->findAll($this->userId) as $research) {\n $list[] = $this->service->findAll($this->userId, $research->getResearchIndex());\n }\n\n return $list;\n });\n }", "title": "" }, { "docid": "24a0a250e814a136a8a5d9b7e5d2a2b4", "score": "0.5213341", "text": "public function index()\n\t{\n\t\t/*\n\t\t|\tnot a logical function since GramStainResult\n\t\t|\tshould be specific to a particular result\n\t\t*/\n\t}", "title": "" }, { "docid": "4809f8b23d3cfc8ad55b28951ca63c67", "score": "0.5206583", "text": "private function _index_tags() {\n $s = $nix = $ix = self::$_ar_;\n $ids = $this->ids;\n foreach($this->tags as $id => $n) {\n if(!isset($ix[$n])) $ix[$n] = array();\n $ix[$n][$id] = $ids[$id];\n }\n foreach($ix as $n => $v) {\n foreach($v as $id => $e) $this->tags[$id] = $n;\n if(isset($nix[$n])) continue;\n $_n = strtolower($n);\n if(!isset($nix[$_n])) $nix[$_n] = $v;\n else {\n foreach($v as $id => $e) $nix[$_n][$id] = $e;\n $s[] = $_n;\n }\n }\n foreach($s as $_n) asort($nix[$_n]);\n return $this->tag_idx = $nix;\n }", "title": "" }, { "docid": "4122e23c3bf1521f0f19b23c2c995e57", "score": "0.52057576", "text": "function admin_index()\n\t{\n\t \n\t}", "title": "" }, { "docid": "e89c9b6b8629187fc61068b7fcf01e0b", "score": "0.5195498", "text": "abstract protected function getIndexName();", "title": "" }, { "docid": "700515e4a791395f469eeabcfe3ccc48", "score": "0.5193831", "text": "function note_sidebar_being_rendered($index)\n {\n }", "title": "" }, { "docid": "5376ad174d10274178727c628d499637", "score": "0.51926863", "text": "public function actionIndex() {}", "title": "" }, { "docid": "5376ad174d10274178727c628d499637", "score": "0.51926863", "text": "public function actionIndex() {}", "title": "" }, { "docid": "29625dd0049b5abf1a9796bd4d01736e", "score": "0.5184262", "text": "function extractByIndex($p_index)\n {\n }", "title": "" }, { "docid": "6d01f802659e7cafc1c1c6e425b6b736", "score": "0.51835257", "text": "public function index2Action()\n {\n $em = $this->getDoctrine()->getManager();\n $animals = $em->getRepository('FicheDeSoinBundle:animal')->findAll();\n// $queryBuilder =$em->getRepository('FicheDeSoinBundle:animal')->createQueryBuilder('animal');\n// if ( $request->query->getAlnum('filter')){\n// $queryBuilder\n// ->where('animal.nom LIKE :nom')\n// ->setParameter('nom', '%' . $request->query->getAlnum('filter'). '%');\n// }\n//\n// $query =$queryBuilder->getQuery();\n return $this->render('animal/indexall.html.twig', [\n 'animals' => $animals,\n ]);\n }", "title": "" }, { "docid": "415c3a7bc1084bd9dcb4d87512abfbe1", "score": "0.5171514", "text": "public function filter() {\n $ads = Ad::filter_with_params($this->params);\n $this->set_game_and_acccessory_ads($ads);\n $this->render('ads/index');\n }", "title": "" }, { "docid": "85f4bb726b3d534acf9dbee1f4fbf413", "score": "0.5168468", "text": "public function index()\n\t{\n\t\t$data['result']=NULL;\n\t\t$data['show']=NULL;\n\t\t$data['card_id']='';\n\t\t$this->setIndex($data);\n\t}", "title": "" }, { "docid": "ebbe18d1ff58c627ed109412fbbf9d4a", "score": "0.51678145", "text": "public function singleIndexAction() {}", "title": "" }, { "docid": "aaf2ed70a44d3d843f23b0cc8348ac6b", "score": "0.5167057", "text": "public function indexAction()\n { \n if(!$this->_rParams->id) {\n // we want all items\n }\n }", "title": "" }, { "docid": "049def587828694905f7c01359b2d1b8", "score": "0.5166216", "text": "public static function index()\n {\n if (!empty(static::$index)) {\n return static::$index;\n }\n return static::$index = static::all();\n }", "title": "" }, { "docid": "ea8375a67767b5c2b50d41d737ce4c09", "score": "0.5165571", "text": "public function index()\n\t{\n\t\t$this->fire('before.index');\n\n\t\t$input = $this->getInput($this->indexInputFilter);\n\n\t\t$cleanInput = Epi::getCleanInput($input);\n\n\t\t$validator = $this->getIndexValidator($cleanInput);\n\t\tif($validator->fails())\n\t\t{\n\t\t\t$errors = $validator->messages()\n\t\t\t\t->getMessages();\n\n\t\t\treturn $this->respond(array(\n\t\t\t\t'message' => 'Validation failed',\n\t\t\t\t'errors' => $errors\n\t\t\t), 422);\n\t\t}\n\n\t\t$results = $this->makeEpi($input)\n\t\t\t->get();\n\n\t\t$this->fire('after.index', array($results));\n\n\t\treturn $this->respond($results);\n\t}", "title": "" }, { "docid": "982db5a0382ed2ac8509a3c8e26f2c68", "score": "0.5163266", "text": "public function getServer($index = null, $filter = null);", "title": "" }, { "docid": "5292c57fb5105176d1da619eae3462b4", "score": "0.5158973", "text": "function p($offset = 0){\n\t\t$this->index();\n\t}", "title": "" }, { "docid": "0125f564553c9549d7119b75f48d4ce4", "score": "0.5155063", "text": "function view_all() {\n\t\t$this->index();\n\t}", "title": "" }, { "docid": "3bb264250d7c4ce80af1566bab17fcd8", "score": "0.5150701", "text": "function bandhead_index()\r\n {\r\n $conditions = array();\r\n\r\n $this->paginate = array(\r\n\r\n 'recursive' => 0,\r\n\r\n 'limit' => LIMIT,\r\n\r\n 'conditions' => $conditions,\r\n\r\n 'group' => array('product_size_id', 'product_style_id'),\r\n\r\n 'order' => array(\r\n\r\n 'Order.updated' => 'DESC'\r\n\r\n )\r\n\r\n );\r\n\r\n $result = $this->paginate('Order');\r\n\r\n //pr($result);\r\n\r\n $this->set('result', $result);\r\n\r\n }", "title": "" }, { "docid": "5f0dcd599be9947bce2dab5f8e2b3599", "score": "0.514412", "text": "public function indexAction() {}", "title": "" }, { "docid": "da06a3754a16b20973ca8af99bf6b33c", "score": "0.51438653", "text": "function putIndex(){\n\n }", "title": "" }, { "docid": "ec515954937578ee56acc5c2de03808f", "score": "0.51429623", "text": "public function actionIndex()\n {\n \t$query = Dict::find()->where(['parent_id'=>0]);\n \t\n \t$locals = LuLu::getPagedRows($query);\n \t \n \treturn $this->render('index', $locals);\n }", "title": "" }, { "docid": "5f0dcd599be9947bce2dab5f8e2b3599", "score": "0.51424617", "text": "public function indexAction() {}", "title": "" }, { "docid": "5f0dcd599be9947bce2dab5f8e2b3599", "score": "0.51424617", "text": "public function indexAction() {}", "title": "" }, { "docid": "5f0dcd599be9947bce2dab5f8e2b3599", "score": "0.51424617", "text": "public function indexAction() {}", "title": "" }, { "docid": "5f0dcd599be9947bce2dab5f8e2b3599", "score": "0.51424617", "text": "public function indexAction() {}", "title": "" }, { "docid": "5f0dcd599be9947bce2dab5f8e2b3599", "score": "0.51424617", "text": "public function indexAction() {}", "title": "" }, { "docid": "5f0dcd599be9947bce2dab5f8e2b3599", "score": "0.51424617", "text": "public function indexAction() {}", "title": "" } ]
29439229ea220378cb84c6857f4c7640
Ad list to home.
[ { "docid": "0b379ec37082b0ea4f7979dcebc366dc", "score": "0.57715666", "text": "public function homeAds()\n {\n $reference = Carbon::now()->startOfMonth()->format('Y-m-d');\n\n // Check for ads stored on redis\n $home_ads = json_decode(\\Redis::get('home_ads'));\n\n if(!$home_ads){\n\n $this->updateRedisAdList();\n\n $home_ads = json_decode(\\Redis::get('home_ads'));\n }\n\n // get the first ad on list\n $first_ad = array_first($home_ads);\n\n //remove first ad from list\n $home_ads = array_except($home_ads, [0]);\n\n //set the first ad to last\n array_push($home_ads, $first_ad);\n\n // store the new list on redis\n \\Redis::set('home_ads', json_encode(array_flatten($home_ads)));\n\n // get the ad on DB\n $serviceAd = $this->repository->find($first_ad);\n\n //update tracking exhibitions\n $tracking = $this->adTrackingRepository\n ->firstOrCreate([\n 'ad_id' => $serviceAd->id,\n 'ad_type' => get_class($serviceAd),\n 'reference' => $reference\n ]);\n\n $tracking->increment('exhibitions');\n\n return response()->json($serviceAd->load('advertiser', 'photos'));\n\n }", "title": "" } ]
[ { "docid": "8d1f4ad58c6e732c2c9760b4b7e08268", "score": "0.72526413", "text": "protected function listing_ad() {}", "title": "" }, { "docid": "e65bd26c718035e92abcb926cd6538d8", "score": "0.72173864", "text": "function ads_list(){\n\t\tglobal $tpl, $config, $meta, $_r, $_l, $_u;\n\t\t\n\t\t$ad_list = mysql_q(\"SELECT * FROM ad ORDER BY created DESC\");\n\t\t$tpl->assign(\"ad_list\", $ad_list);\n\t\t\n\t\t$main['content'] = $tpl->fetch(\"admin_ads_list.tpl\");\n\t\tdisplay($main);\n\t}", "title": "" }, { "docid": "a078c13f7f41fd953ce29c04f937cea9", "score": "0.67030436", "text": "public function list_ads(){\n\n\t\t$ad_list = Ads::get_list_ads();\n\t\treturn View::make('admin/ads/list_ads',array('ad_list'=>$ad_list));\n\t}", "title": "" }, { "docid": "c72ddbe4283fe8d28a198836a20283ca", "score": "0.649446", "text": "public function listAction()\n {\n $this->_forward('index');\n }", "title": "" }, { "docid": "df8ec265ccb8c27eb6515dd328770e2c", "score": "0.6489666", "text": "public function action_list() {\n $this->page = 'home';\n require_once './app/views/table/list.php';\n }", "title": "" }, { "docid": "6bcdfec0867dafc8b42448cdcf9d2175", "score": "0.6489046", "text": "public function index(){\n $this->show_list();\n }", "title": "" }, { "docid": "94eb33a8dc9192b76cda156b58de92e8", "score": "0.6479561", "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": "174e07a1688ac732f0e66ae6d8398d84", "score": "0.64684886", "text": "public function index()\n {\n // list\n }", "title": "" }, { "docid": "49997a85055ad2a4c5ace13000c1e3d8", "score": "0.6442523", "text": "function index()\n\t{\n\t\t// Lay danh sach\n\t\t$list = $this->ads_location_model->get_list();\n\t\t$actions = array('edit', 'del');\n\t\t$list = admin_url_create_option($list, strtolower(__CLASS__), 'id', $actions);\n\t\tforeach ($list as $row)\n\t\t{\n\t\t\tforeach ($actions as $action)\n\t\t\t{\n\t\t\t\t$row->{'_can_'.$action} = ($this->_mod()->can_do($row, $action) && admin_permission_url($row->{'_url_'.$action})) ? TRUE : FALSE;\n\t\t\t}\n\t\t}\n\t\t$this->data['list'] = $list;\n\t\t\n\t\t// Breadcrumbs\n\t\t$breadcrumbs = array();\n\t\t$breadcrumbs[] = array(admin_url('ads_location'), lang('mod_ads_location'));\n\t\t$breadcrumbs[] = array('', lang('list'));\n\t\t$this->data['breadcrumbs'] = $breadcrumbs;\n\t\t\n\t\t// Hien thi view\n\t\t$this->_display();\n\t}", "title": "" }, { "docid": "720fa44f82097ad862a1223667f1a4ae", "score": "0.6422441", "text": "public function list()\n {\n $this->vars = array('items' => ['Patrick', 'Claude', 'Pierre', 'André']);\n $this->render('list.php');\n }", "title": "" }, { "docid": "e6a4c98ba5c74f530846a0e2799e83cd", "score": "0.6413208", "text": "public function indexAction() {\n\t\t$this->_forward('list');\n\t}", "title": "" }, { "docid": "d3ad3b02c0c1eab25296908f0d56340f", "score": "0.63973725", "text": "public function index()\n\t{\n\n\n\t\tif ($this->isAdmin() == TRUE) {\n\t\t\t$this->loadThis();\n\t\t} else {\n\n\t\t\t$this->global['pageTitle'] = 'Finecore : Homepage Listing';\n\t\t\t$this->loadViews(\"admin/gallery/listGallery\", $this->global, Null, NULL);\n\t\t}\n\t}", "title": "" }, { "docid": "905f7fbfbb2fff73099979bdf45d3db6", "score": "0.63895816", "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": "4f1ff86134bada237469629501bec79f", "score": "0.6386464", "text": "public function index() {\n $list_ad=Ad::getList(['paixu'=>'sort'],['st'=>1]);\n\n return json(['code'=>0,'msg'=>'ad list from \"ad/index\"','data'=>$list_ad]);\n\n }", "title": "" }, { "docid": "1000878621d8efea0b5b43f2c2599027", "score": "0.6374855", "text": "public function owaeslist() { \n\t\t\t// \n\t\t}", "title": "" }, { "docid": "9574404dd05ce3c2611ce508bd896204", "score": "0.63707995", "text": "public function indexAction() {\n $this->_forward('list');\n }", "title": "" }, { "docid": "bdc24cd93e0c2a8ab3caadc9968708bd", "score": "0.6363501", "text": "public function index()\n {\n //Lista os leads\n }", "title": "" }, { "docid": "64416093918935fab537f02cbaf6e4bd", "score": "0.6347722", "text": "public function index()\n\t{\n\t\tredirect(base_url('backend/ads'));\n\n\t}", "title": "" }, { "docid": "8e1405e673259d437abd8823232c8855", "score": "0.63415223", "text": "protected function getAdList()\n {\n $result = Ad::where('is_show', '=', '1')\n ->orderBy('sort_order','asc')\n ->get();\n $this->result['fangjian'] = Request::input('room_id');\n $this->result['ads'] = $result;\n }", "title": "" }, { "docid": "0cfc4663300d21f5b0e90285019bc71a", "score": "0.63252544", "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": "1632f74e581286fce11b428cee004b2f", "score": "0.63227785", "text": "public function actionlist()\n {\n $this->render('list',array(\n\n ));\n }", "title": "" }, { "docid": "5a039fff999eafa9f635351031760592", "score": "0.63098204", "text": "public function indexAction()\n\t{\n\t\t$this->_forward('list');\n\t}", "title": "" }, { "docid": "6da96e35fad3db959cf294e4a99a01f4", "score": "0.6269525", "text": "public function list();", "title": "" }, { "docid": "6da96e35fad3db959cf294e4a99a01f4", "score": "0.6269525", "text": "public function list();", "title": "" }, { "docid": "2e42503d55824f0e5ba1fe3b836c57d4", "score": "0.62628585", "text": "public function indexAction()\n {\n $this->_forward('list');\n }", "title": "" }, { "docid": "649c3fe6537e7cb54df3d01c2e8b8b9a", "score": "0.6262032", "text": "private function showList()\n {\n try\n {\n $res = Main::$db->query('SELECT * FROM gallery');\n $list = $res->fetchAll(PDO::FETCH_ASSOC);\n }\n catch(PDOException $e)\n {\n echo 'ShowList error '.$e->getMessage();\n }\n Main::$smarty->assign('list', $list);\n Main::$smarty->assign('context', 'admin/admin-lista-galerii.html');\n }", "title": "" }, { "docid": "5d4e963a8d7919c8e89993bd060a7615", "score": "0.62572545", "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": "90e25e9ea7bd894d4445885486308419", "score": "0.6247393", "text": "public function index()\n\t{\n\t\t$this->masterlist();\n\t}", "title": "" }, { "docid": "d30c6180099f7dd3b33628d897022777", "score": "0.62397623", "text": "public function show_list() {\n }", "title": "" }, { "docid": "48bbe5fbf485677b861392039bc47418", "score": "0.62355113", "text": "public function listview() {\n\n $houseModel = new house();\n $house_list = $houseModel->getList();\n\n $data['applicant_list'] = $house_list;\n $data['view_name'] = \"house_list_view\";\n\n $this->load->view(\"admin/common/template\", $data);\n }", "title": "" }, { "docid": "07362c5ae7e016d5baf6bf3f76e0e81c", "score": "0.6229728", "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": "221cee52eb0850b671832164d9811aa5", "score": "0.6177013", "text": "public function listAction() {\n }", "title": "" }, { "docid": "03690e7a09f22de0d26d268d13653dd8", "score": "0.61746156", "text": "function index(){\n\t\t$this->listar();\n\t}", "title": "" }, { "docid": "2c5fd7a21ba15397c26085c7af063a16", "score": "0.6174564", "text": "public function lists()\t{\n\t\tCheckAdminLoginSession();\n\t\t$per_page = 20;\n if($this->uri->segment(4)){\n \t$page = ($this->uri->segment(4)) ;\n }\n else {\n \t$page = 1;\n }\n $start = ($page-1)*$per_page;\n $limit = $per_page;\n $totalCount = $this->admin_model->totalRecord($this->accessories);\n\t\t$data[\"dataCollection\"] = $this->admin_model->getDataCollection($this->accessories,$limit,$start);\n $totalResult = count($data['dataCollection']);\n\t\t$data[\"pagination\"] = Jpagination($totalCount,$limit,$start);\n\t\t$url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? \"https\" : \"http\") . \"://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}\";\n\t\t$explodedURL = parse_url($url);\n\t\t$data[\"current_link\"] = $explodedURL['scheme'].'://'.$explodedURL['host'].$explodedURL['path'];\n\t\t$this->load->view('admin/include/head');\n\t\t$this->load->view('admin/include/header');\n\t\t$this->load->view('admin/include/sidebar');\n\t\t$this->load->view('admin/accessories/list',$data);\n\t\t$this->load->view('admin/include/footer');\n\t\t$this->load->view('admin/include/foot');\n\t}", "title": "" }, { "docid": "b68a844963a7a3ffbb71a98bc43a4e3c", "score": "0.61723155", "text": "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_holiday->get_all();\n\t\t$this->template->set('title', 'Holiday List');\n\t\t$this->template->load('template', 'contents', 'holiday/list', $data);\n\t}", "title": "" }, { "docid": "7838a31d6fe70c03f60727a53169ee4e", "score": "0.61588657", "text": "public function index()\n\t\t{\n\t\t\t$data['breadcrumb1'] = 'Website managements';\n\t\t\t$data['pageHeader'] = $data['breadcrumb2'] = 'Manage walking tour';\n\t\t\t$data['title'] = 'plus-ed.com | Manage walking tour';\n\t\t\t$this->ltelayout->view('frontweb/walking_tour_list' , $data);\n\t\t}", "title": "" }, { "docid": "6c4ff3ad46f00c0f81df4aef17aa7926", "score": "0.6152288", "text": "public function homePage() {\n $manager = new AdLostManager();\n $adLost = $manager->recentAdLost();\n $manager = new AdFindManager();\n $adFind = $manager->recentAdFind();\n $manager = new ContentIndexManager();\n $content = $manager->getContents();\n\n $this->return(\"homeView\", \"Anim'Nord : Accueil\", ['recentLost' => $adLost, 'recentFind' => $adFind, 'content' => $content]);\n }", "title": "" }, { "docid": "e8b936bcbc3c7cd4f66fc62525379e0b", "score": "0.61144876", "text": "public function mylist() {\n $this->render();\n }", "title": "" }, { "docid": "02dc685fb05fdd06b6ad7c4c3085321d", "score": "0.6107275", "text": "public function listar()\n {\n $itens = $this->model->get_itens();\n $data['listagem'] = $this->_inicia_listagem($itens);\n $this->layout\n ->set_includes('js/script.js')\n ->set_includes('js/script.js')\n ->set_view('add_listagem', $data);\n\n }", "title": "" }, { "docid": "ea152b7eb666bedbe40ba718383a57e0", "score": "0.6105528", "text": "public function listAction()\n {\n\n $em = $this->getDoctrine()->getManager();\n\n $adverts = $em->getRepository('AdvertBundle:Advert')->findAll();\n\n return $this->render('AdvertBundle:Advert:list.html.twig',array(\n 'adverts'=> $adverts,\n ));\n }", "title": "" }, { "docid": "a8073549d697653019630bfd5b2ce4f4", "score": "0.610366", "text": "public function listAction() {\n\t\t$this->view->liste = Category::getInstance()->fetch();\n\t}", "title": "" }, { "docid": "81a9d2c3f66799032c4d7ddc8ee3e2ef", "score": "0.60686564", "text": "public function list() {\n include '../templates/driver/list.html.php';\n }", "title": "" }, { "docid": "7ad7cd134a878adb8d6e50502e77cf50", "score": "0.6057178", "text": "public function index():void{\n $household = $this->session->get('user')->getCurrHousehold();\n $recipeCount = $this->recipeRepository->countForHousehold($household);\n $meals = $this->mealRepository->incompleteForHousehold($household);\n\n // TODO Need to figure out how to toggle between entire list and not completed list\n // $meals = $this->mealRepository->allForHousehold($household);\n\n $this->view('meal/index', compact('meals', 'recipeCount'));\n }", "title": "" }, { "docid": "4c0de59bf5a5be78f58c17b874210381", "score": "0.60511065", "text": "public function index() {\n\t\t$friend_list = $this->getFriends();\n\t\t$friend_count = $this->countFriends($friend_list);\n\t\t\n\t\t$this->carabiner->css('dashboard/patient/friends/list.css');\n\t\t$this->carabiner->js('dashboard/patient/friends/list.js');\n\t\t$this->render('dashboard/patient/friends/list',array(\n\t\t\t'friends' => $friend_list['list']->data,\n\t\t\t'friend_count' => $friend_count,\n\t\t\t'topnav' => 'top_patient_friends',\n\t\t), \"col3\");\n\t}", "title": "" }, { "docid": "bc61607b7973a96af644a943e09c1e49", "score": "0.6037384", "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": "b0d8886ea0204e478f3d51e3207c0c42", "score": "0.6017242", "text": "function administration_list()\n\t{\n\t\t\t$data['title'] = 'Admin List | Raisingbd24';\n\n\t\t\tif(!$this->session->userdata('userAccessMail')) redirect(\"admin\");\n\t\t\t\t$data['title']=\"Admin List | Raisingbd24\";\n\t\t\t\t$data['admin_list'] = $this->Index_model->getAllItemTable('admin_users','','','','','id','desc');\n\t\t\t\t\n\t\t\t\t$data['main_content']=\"admin/administration/admin_list\";\n\t\t\t\t$this->load->view('admin_template',$data);\n\t}", "title": "" }, { "docid": "305b769f9f0af950157e5a1d02ba1edc", "score": "0.601271", "text": "public function action_list()\n {\n if(Helper_User::getUserRole($this->logget_user) != 'sadmin') return $this->request->redirect('');\n $data['admins'] = ORM::factory('user')->select('dg_admns.name', 'dg_admns.fathername', 'dg_admns.grfathername')->join('dg_admns')->on('user.id', '=', 'dg_admns.admin_id')->order_by('status')->find_all();\n Helper_Output::factory()->link_css('bootstrap');\n $this->setTitle('Admins')\n ->view('admins/list', $data)\n ->render();\n }", "title": "" }, { "docid": "119e6b625f2fa7caf41e9c23be8c51ce", "score": "0.6009088", "text": "public function index(): void\n {\n if ($this->getPsrRequest()->getMethod() === 'POST') {\n $this->assertIsXmlHttpRequest();\n\n $createdResponse = $this->getListCreator()->createEmptyList();\n $this->setSuccessJsonResponse($createdResponse, 201);\n\n return;\n }\n\n tao_helpers_Scriptloader::addCssFile(Template::css('lists.css', 'tao'));\n $this->defaultData();\n\n $this->setData('lists', $this->getListData());\n $this->setData('maxItems', $this->getListService()->getMaxItems());\n $this->setView('Lists/index.tpl');\n }", "title": "" }, { "docid": "0c65b48984d745b2a5920297d6fce816", "score": "0.59930414", "text": "public function index()\n\t{\n\t\t$this->redirect('lista');\n\t}", "title": "" }, { "docid": "59d7e0b4a3d69485f2357e1352cc26c9", "score": "0.59883964", "text": "public function index() {\n\t\t$this->set('title_for_layout','Etapa - Lista');\n\n\t\t// Carrega dados do BD\n\t\t$Etapas = $this->Etapa->find('all');\n\t\t$this->set('Etapas',$Etapas);\n\n\t}", "title": "" }, { "docid": "3ffc6c19697b33b83b9c85a62f0c580e", "score": "0.59658414", "text": "function &home()\n\t{\n\t\t// set the defaults for the home-page\n\t\t$this->__construct(array(\n\t\t\t'date' => $this->bo->date2string($this->bo->now_su),\n\t\t\t'cat_id' => 0,\n\t\t\t'filter' => 'all',\n\t\t\t'owner' => $this->user,\n\t\t\t'multiple' => 0,\n\t\t\t'view' => $this->bo->cal_prefs['defaultcalendar'],\n\t\t));\n\t\tegw_session::appsession('calendar_list','calendar','');\t// in case there's already something set\n\n\t\treturn $this->listview(null,'',true);\n\t}", "title": "" }, { "docid": "b5fe4127d762d4d8ceb966cf7692a3cf", "score": "0.59590334", "text": "function doIndex() {\r\n\t\t$select = new Select(\"tasks\");\r\n\t\t$list = DB::query($select);\r\n\t\t$_REQUEST[\"list\"] = $list; \r\n\t\tApu::dispatch(\"/todo/faces/task/task_list.php\");\r\n\t}", "title": "" }, { "docid": "fb56645c022f8b4ee60bad747c7c629b", "score": "0.5935778", "text": "public function actionList() {\n $rows = Bul::model()->findAll();\n $this->render('list', array('rows'=>$rows));\n }", "title": "" }, { "docid": "3e658e5f5bd147596a13a9399bebb4f6", "score": "0.5935347", "text": "function listContent()\n {\n }", "title": "" }, { "docid": "84bc90ec8d13b02ccd51e8d04e4fffe5", "score": "0.59174967", "text": "public function index()\n\t{\n\t\t//par défaut on affiche la liste des utilisateurs\n\t\t$this->liste();\n\t}", "title": "" }, { "docid": "1048e426e21f96edca4b1ef657723d47", "score": "0.59148484", "text": "public function testListRouting()\n {\n $this->getBrowser()->getAndCheck('up2gBlogDefault', 'list', '/blog/programme');\n $this->getBrowser()->getAndCheck('up2gBlogDefault', 'list', '/blog/organisme');\n $this->getBrowser()->getAndCheck('up2gBlogDefault', 'list', '/blog/article');\n $this->getBrowser()->getAndCheck('up2gBlogDefault', 'list', '/blog/partenaire');\n }", "title": "" }, { "docid": "e380f866d68f96813c5f36acbfe9542e", "score": "0.59071237", "text": "public function indexAction() {\n\t\t$redirector = Zend_Controller_Action_HelperBroker::getStaticHelper ( 'redirector' );\n\t\t$redirector->gotoUrl ( '/default/services/list' );\n\t}", "title": "" }, { "docid": "5fc2cbaa57895f367e3994638939768f", "score": "0.5905558", "text": "public function fetchlistAction(){}", "title": "" }, { "docid": "626774f0cb5b1be60be2c6a661bcc11a", "score": "0.59006006", "text": "public function listAction()\n {\n $this->view->headTitle('Vehicle Listing ', 'PREPEND');\n $this->view->vehicles = $this->vehicleService->listService();\n }", "title": "" }, { "docid": "6e1ac93b92661bcbd085a1e109ff06af", "score": "0.5889035", "text": "function listall( ) {\r\n\t\t$this->set( 'ctrapp_menu', array() );\r\n\r\n\t\t// set FORM variable, for HELPER call on VIEW\r\n\t\t$this->set( 'ctrapp_form', $this->Forms->getFormArray('drugs') );\r\n\r\n\t\t// set SUMMARY variable from plugin's COMPONENTS\r\n\t\t$this->set( 'ctrapp_summary', $this->Summaries->build( ) );\r\n\r\n\t\t// set SIDEBAR variable, for HELPER call on VIEW\r\n\t\t// use PLUGIN_CONTROLLER_ACTION by default, but any ALIAS string that matches in the SIDEBARS datatable will do...\r\n\t\t$this->set( 'ctrapp_sidebar', $this->Sidebars->getColsArray( $this->params['plugin'].'_'.$this->params['controller'].'_'.$this->params['action'] ) );\r\n\r\n\t\t// set FORM variable, for HELPER call on VIEW\r\n\r\n\t\t$criteria = array();\r\n\t\t$criteria = array_filter($criteria);\r\n\r\n\t\tlist( $order, $limit, $page ) = $this->Pagination->init( $criteria );\r\n\t\t$this->set( 'drugs', $this->Drug->findAll( $criteria, NULL, $order, $limit, $page ) );\r\n\r\n\t}", "title": "" }, { "docid": "26d7f4e1f3bb89b5eb937923a37c98ed", "score": "0.5888113", "text": "public function start() {\n $listArchives = $this->model->getArchives();\n $this->view->displayHome($listArchives);\n }", "title": "" }, { "docid": "ff9e968842a28553e228f4c56165420c", "score": "0.588348", "text": "public function index()\n\t{\n\t\tredirect('publisher/suggestions/suggestion_list');\n\t}", "title": "" }, { "docid": "522149591ee3265655832cf55b68a969", "score": "0.5876763", "text": "public function index()\n {\n //$homepages = $this->Homepages->find('all');\n //$this->set('homepages', $homepages);\n }", "title": "" }, { "docid": "1245fb24a322cc71ebb17d14cbec0d53", "score": "0.5876102", "text": "public function listView()\r\n {\r\n $data['page'] = lang('blogs');\r\n $data['menu'] = 'blogs';\r\n $this->load->view('admin/layout/header', $data);\r\n $this->load->view('admin/blogs/listing');\r\n }", "title": "" }, { "docid": "f17f15ebc33359d5e99228e5e824402c", "score": "0.58686125", "text": "public function index()\n\t{\n $this->load->model('admin/banners');\n $this->load->library(array('input', 'pagination', 'form_validation'));\n\n $data = array(\n 'title' => $this->title,\n 'current_url' => $this->base_url,\n 'base_url' => $this->config->item('base_url')\n );\n\n $data['banners'] = $this->banners->get_banners();\n\n $this->template_admin->show('advert_index', $data);\n\t}", "title": "" }, { "docid": "999fdfb6ef125de78defe8fdb28eed9e", "score": "0.5868569", "text": "function home() {\r\n\t\t\r\n\t\tif (!$this->Auth->user('id')){\r\n\t\t\tif (!empty($_GET['khuyenmai'])&&!$this->Cookie->read('referral')){\r\n\t\t\t\t$this->Cookie->write('referral',$_GET['khuyenmai'],false,36000);\r\n\t\t\t\t$this->Cookie->write('registered','0',false,36000);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(!empty($this->appConfigurations['homeFeaturedAuction'])) {\r\n\t\t\t\r\n\t\t\t// Get the featured auctions\r\n\t\t\t// *** Upcoming auctions\r\n\t\t\t$upcoming = $this->Auction->getAuctions(array(\r\n\t\t\t\t\t\t'Auction.active' => 1,\r\n\t\t\t\t\t\t'Auction.closed' => 0, \r\n\t\t\t\t\t\t'Auction.special' => 'apple'), \r\n\t\t\t\t\t\t4, \r\n\t\t\t\t\t\t'Auction.end_time ASC');\r\n\r\n\t\t\t$this->set('upcoming', $upcoming);\r\n\t\t\t\r\n\t\t\t//*** Auctions ending soon\r\n\t\t\t$endSoon = $this->Auction->getAuctions(array(\t'Auction.end_time > '=> date(\"Y-m-d h:i:\"), \r\n\t\t\t\t\t\t\t\t\t'Auction.active' => 1), \r\n\t\t\t\t\t\t\t\t$this->appConfigurations['homeEndingLimit'], \r\n\t\t\t\t\t\t\t\t'Auction.end_time ASC'\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\tif(!empty($featured)) {\r\n\t\t\t\t$combine_featured[] = $featured;\r\n\t\t\t\t$exclude = array_merge($endSoon, $combine_featured);\r\n\t\t\t} else {\r\n\t\t\t\t$exclude = $endSoon;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$endSoon = $this->Auction->getAuctions(array(\t'Auction.end_time > '=> date(\"Y-m-d h:i:\"), \r\n\t\t\t\t\t\t\t\t\t'Auction.active' => 1), \r\n\t\t\t\t\t\t\t\t$this->appConfigurations['homeEndingLimit'], \r\n\t\t\t\t\t\t\t\t'Auction.end_time ASC');\r\n\t\t\t$exclude = $endSoon;\r\n\t\t}\r\n\t\t$this->set('auctions_end_soon', $endSoon);\r\n\t}", "title": "" }, { "docid": "d3708a38680b59bc16eca3c31b86b78d", "score": "0.5865965", "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": "a461b5c5c946bb11a6156639b2a5c060", "score": "0.58648795", "text": "public function index_listitAction()\n {\n $em = $this->getDoctrine()->getManager();\n $listits = $em->getRepository('FrontMenuBundle:Listit')->findAll();\n\n return $this->render('admin/index_listit.html.php', array(\n 'listits' => $listits,\n ));\n }", "title": "" }, { "docid": "fa042ab407d47d92a786a2153749de47", "score": "0.58643097", "text": "public function index() {\n\t\t$this->Trsurelist->recursive = 0;\n\t\t$this->set('trsurelists', $this->paginate());\n\t}", "title": "" }, { "docid": "da22775020b20fb2029855720315e484", "score": "0.58449554", "text": "function page_list()\n\n\t{\n\n\t\t# Get the passed details into the url data array if any\n\n\t\t$urldata = $this->uri->uri_to_assoc(3, array('m', 's'));\n\n\t\t# Pick all assigned data\n\n\t\t$data = assign_to_data($urldata);\n\n\t\t\t\n\n\t\t$data = paginate_list($this, $data, 'get_page_list', array('searchstring'=>''));\n\n\t\t$data = add_msg_if_any($this, $data);\n\n\t\t$this->load->view('wiki/page_list_view', $data);\n\n\t}", "title": "" }, { "docid": "9bdab0f2a8efb1c03ba60d4794160450", "score": "0.58436406", "text": "public function index()\n\t\t{\n\t\t\t$data['breadcrumb1'] = 'Website managements';\n\t\t\t$data['pageHeader'] = $data['breadcrumb2'] = 'Manage junior mini stay';\n\t\t\t$data['title'] = 'plus-ed.com | Manage junior mini stay';\n\t\t\t$this->ltelayout->view('frontweb/junior_ministay_list' , $data);\n\t\t}", "title": "" }, { "docid": "80ffd5d91db5feaa3f59fd2157958887", "score": "0.58431786", "text": "function _adverts_manage_list( $atts ) {\n \n wp_enqueue_style( 'adverts-frontend' );\n wp_enqueue_style( 'adverts-icons' );\n wp_enqueue_style( 'adverts-icons-animate' );\n\n wp_enqueue_script( 'adverts-frontend' );\n wp_enqueue_script( 'adverts-frontend-manage' );\n\n extract(shortcode_atts(array(\n 'name' => 'default',\n 'paged' => adverts_request(\"pg\", 1),\n 'posts_per_page' => 20,\n ), $atts));\n \n // Load ONLY current user data\n $loop = new WP_Query( array( \n 'post_type' => 'advert', \n 'post_status' => apply_filters(\"adverts_sh_manage_list_statuses\", array('publish', 'advert-pending', 'expired') ),\n 'posts_per_page' => $posts_per_page, \n 'paged' => $paged,\n 'author' => get_current_user_id()\n ) );\n\n $baseurl = apply_filters( \"adverts_manage_baseurl\", get_the_permalink() );\n $paginate_base = $baseurl . '%_%';\n $paginate_format = stripos( $paginate_base, '?' ) ? '&pg=%#%' : '?pg=%#%';\n $edit_format = stripos( $baseurl, '?' ) ? '&advert_id=%#%' : '?advert_id=%#%';\n\n // adverts/templates/manage.php\n include apply_filters( \"adverts_template_load\", ADVERTS_PATH . 'templates/manage.php' );\n}", "title": "" }, { "docid": "d0b640d683bbe4c8d4ac9a752eefacbb", "score": "0.58404005", "text": "public function list()\n {\n //réservée à l'admin\n new SessionVerify();\n $posts = Post::getMany();\n $categorys = Category::getMany();\n $this->renderView('admin/list_news', [\n 'posts' => $posts,\n 'categorys' => $categorys\n ]);\n }", "title": "" }, { "docid": "dc3e7ae25312c8a547ec75c7792a5739", "score": "0.5832978", "text": "public function adv_index()\n {\n // TO DO: codice per selezionare tutte le sponsorizzate dell'UPRA\n\n // $userAccomodations = Accomodation::where('id', Auth::id())->get;\n // $accomodationsSponsored=[];\n // foreach ($userAccomodations as $userAccomodation) {\n // }\n // return view('UPRA.Advs.index', compact('accomodation'));\n\n }", "title": "" }, { "docid": "1def2d5de56e1ff4b12425d7acb5ce12", "score": "0.5829948", "text": "function index(){\n\t\t$data['w_list'] = $this->Web_model->getWebId()->result();\n\t\t$this->template->load('media/template','id_web/web_list', $data);\n\t}", "title": "" }, { "docid": "43082cf323199de775bac103e0b9dce2", "score": "0.58237576", "text": "function displayList(){\r\n $success = _var('success');\r\n if( $success ){\r\n $this->displayMessage('Dati salvati con successo','success');\r\n }\r\n $list = PopupHome::prepareQuery()\r\n ->get();\r\n $this->setVar('list',$list);\r\n\t\t$this->output('popups/list.htm');\r\n }", "title": "" }, { "docid": "ec248753d9f7d43a0344ce632d20f722", "score": "0.5823657", "text": "public function indexAction(){\n\t\t$this->_redirect('Mae/list');\n\t}", "title": "" }, { "docid": "060db1359f44b0c54d55a3b1bf66f6ec", "score": "0.5823594", "text": "public function index()\n {\n if(auth()->user()->role == 'Admin'){\n $ads = Ads::latest()->paginate(5);\n return view('admin.ads',compact('ads'));\n }\n }", "title": "" }, { "docid": "b1be0976e7a50e85b9aeb7254f94fbff", "score": "0.58172816", "text": "function list_action()\n\t{\n\t\t$model=new PostModel();\n\t$posts=$model->get_all_posts();\t\n\n\t$html=render_template('View/Templates/list.php', array ('posts'=>$posts));\n\treturn $html;\n\t\t\n\t\t// reguire \"View/Templates/list.php\";\n\t\t//jesli ne vypolnitsja budet oshibka. Zagruzajet list.php\t\t\n\t}", "title": "" }, { "docid": "963eb243c02bf3032b8c45f588facf27", "score": "0.58130074", "text": "function index() {\n $this->addBreadcrumb(lang('List'));\n \n $page = $this->getPaginationPage();\n $per_page = 30; // discussions per page\n\n if(!$this->active_category->isNew()) {\n list($discussions, $pagination) = Discussions::paginateByCategory($this->active_category, $page, $per_page, STATE_VISIBLE, $this->logged_user->getVisibility());\n } else {\n list($discussions, $pagination) = Discussions::paginateByProject($this->active_project, $page, $per_page, STATE_VISIBLE, $this->logged_user->getVisibility());\n } // if\n \n $this->smarty->assign(array(\n 'discussions' => $discussions,\n 'pagination' => $pagination,\n 'categories' => Categories::findByModuleSection($this->active_project, 'discussions', 'discussions'),\n 'pagination_url' => assemble_url('mobile_access_view_discussions', array('project_id' => $this->active_project->getId())),\n 'page_back_url' => assemble_url('mobile_access_view_project', array('project_id' => $this->active_project->getId())),\n ));\n }", "title": "" }, { "docid": "25bad175bd1017d30ca090857b51c36c", "score": "0.58067775", "text": "public function listing(){\n\n\t\t$data = array();\n\n\t\t$data['num_rows'] = $this->url_model->get_url_num_rows();\n\n\t\t$data['query'] = $this->url_model->get_top_url(); \n\n\t\t$data['page_url'] = \"url_listing\";\n\n\t\t$this->load->view('includes/template',$data);\n\t}", "title": "" }, { "docid": "202dfd8bfa65b3da55d91252d09788d3", "score": "0.5805176", "text": "public function listAllAction(){\r\n\t\t$Model = new homeModel();\t\t\t\t\r\n\t\t$mesInfo=array();\r\n\t\t$mesInfo['nains']=$Model->getAllNains();\r\n\t\t$mesInfo['villes']=$Model->getAllVilles();\r\n\t\t$mesInfo['tavernes']=$Model->getAllTavernes();\r\n\t\t$mesInfo['groupes']=$Model->getAllGroupes();\r\n\t\tinclude('Views/Home/homeView.php');\t\t\t\t\r\n\t}", "title": "" }, { "docid": "217f9bd8abdb61e61deb0673a75519ee", "score": "0.5787672", "text": "public function index()\n {\n $AuthLevel = $this->userModel->checkAuth($_SESSION['UID']);\n if ($AuthLevel[0][\"AuthLevel\"] < 1) {\n header('location: /phageTool');\n }\n \n $adminList = $this->userModel->getAdmin();\n $clusterList = $this->clusterModel->getClusterList();\n $userList = $this->userModel->getUserList();\n $genusList = $this->genusModel->getGenusList();\n $phageList = $this->phageModel->getPhageNamesAndID();\n\n //Helper::outputArray($userList);\n \trequire APP . 'view/_templates/header.php';\n require APP . 'view/_templates/nav.php';\n require APP . 'view/dashboard/dashboard.php';\n require APP . 'view/_templates/footer.php';\n }", "title": "" }, { "docid": "615a7e6261e99439e0f7e829561e455e", "score": "0.57778984", "text": "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t\t\t\n\t\tlist($total, $groups) = Advertiser_Service_GroupModel::getList($page, $this->perpage);\n\t\t$this->assign('groups', $groups);\n\t\t$this->assign('pager', Common::getPages($total, $page, $this->perpage, $this->actions['listUrl'] . '/?'));\n }", "title": "" }, { "docid": "1baa77d24a4e560227eb16406e556cc3", "score": "0.5776281", "text": "public function action_index()\n {\n if (!Rogubukku::isAdmin()) {\n $this->request->redirect('404');\n }\n\n $announcements = $this->_announcements->where(\n 'announced_by',\n '=',\n $this->_user_id\n )->order_by(\n 'from_date', 'desc'\n )->limit(5)->find_all();\n\n $this->template->body = View::factory('admin/announcements/index')->bind('announcements', $announcements);\n }", "title": "" }, { "docid": "124b377470fdc70e44d6cd980ebc05ae", "score": "0.57742596", "text": "function home(){\n\t\t\t\n\t\t}", "title": "" }, { "docid": "6a0faed07c22083595dc604526ef770e", "score": "0.57667446", "text": "public function index() {\n\t\t$obj=HomeController::runQuery(HomeController::topQuery());\n\t\t$spotList=(HomeController::parse($obj));\n\t\t$this->set('spotList',$spotList);\n\n\t\t//categoryQueryに文字列として指定カテゴリを渡せばそのカテゴリの全スポットを取得します\n\t\t$eat = HomeController::runQuery(HomeController::categoryQuery('食べる'));\n\t\t$eatList=(HomeController::parse($eat));\n\t\t$this->set('eatList',$eatList);\n\t\t\n\t\t$view = HomeController::runQuery(HomeController::categoryQuery('見る'));\n\t\t$viewList=(HomeController::parse($view));\n\t\t$this->set('viewList',$viewList);\n\t\t\n\t\t$play = HomeController::runQuery(HomeController::categoryQuery('遊ぶ'));\n\t\t$playList=(HomeController::parse($play));\n\t\t$this->set('playList',$playList);\n\t\t\n\t\t$shop = HomeController::runQuery(HomeController::categoryQuery('買う'));\n\t\t$shopList=(HomeController::parse($shop));\n\t\t$this->set('shopList',$shopList);\n\t\t//サンプルここまで\n\t}", "title": "" }, { "docid": "4bf8732a2cbbc93226ab693c2168f660", "score": "0.5763944", "text": "function render_list_pertanyaan() {}", "title": "" }, { "docid": "d185f907b9383cc076282c55d5636241", "score": "0.5760605", "text": "function getAllianceList() {\n\t\tJRequest::checkToken() or jexit(JText::_('JInvalid_Token'));\n\t\t// Set default redirect\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_eve&view=alliances', false));\n\t\t// Get application\n\t\t$app = JFactory::getApplication();\n\n\t\t$model = $this->getModel('Alliance', 'EveModel');\n\t\t$result = $model->apiGetAllianceList();\n\n\t\tforeach ($model->getErrors() as $error) {\n\t\t\t$app->enqueueMessage($error, 'error');\n\t\t}\n\t\tif ($result) {\n\t\t\t$app->enqueueMessage(JText::_('ALLIANCES SUCCESSFULLY IMPORTED'));\n\t\t}\n\t}", "title": "" }, { "docid": "c192cad1748d0fe11000b8d2063a908e", "score": "0.5758523", "text": "public function index()\n {\n return $this->view('lists');\n }", "title": "" }, { "docid": "faf6471442e7551017e817ba88343e28", "score": "0.5758436", "text": "function index()\n\t{\n\t\t\n\t\t$this->listado();\n\t}", "title": "" }, { "docid": "02238e091811b36db05defd353293bf0", "score": "0.5738925", "text": "protected function _build_list(){\n\t\t$lists = array('posts_per_page'=>5, 'ignore_sticky_posts' => 1);\n\t\t\n\t\techo '<div class=\"container-narrow\">';\n\t\t\n\t\t$this->_query_post($lists, true);\n\t\t\n\t\techo '</div>';\n\t}", "title": "" }, { "docid": "65014abef3ddc549b94fd35f7f941443", "score": "0.5731298", "text": "public function indexAction() { \n \n\t\t//INCREASE THE MEMORY ALLOCATION SIZE AND INFINITE SET TIME OUT\n ini_set('memory_limit', '2048M');\n set_time_limit(0);\n\n //GET NAVIGATION\n $this->view->navigation = Engine_Api::_()->getApi('menus', 'core')\n ->getNavigation('list_admin_main', array(), 'list_admin_main_import');\n\t}", "title": "" }, { "docid": "816005588c3eb3765dcf06ef20fe32fb", "score": "0.5730149", "text": "public function indexAction() {\n\t\t\n\t\t//子标签\n\t\t$childs = Gc_Service_GoodsLabel::getChildList();\t\n\t\t$list = $this->_cookParent($this->parents, $childs);\n\t\t$this->assign('list', $list);\n\t\t$this->assign('parents', $this->parents);\n\t\t$this->assign('childs', $childs);\t\n\t}", "title": "" }, { "docid": "9bada897627131703b3dd6c93364edab", "score": "0.57280374", "text": "public function indexAction() {\n\t\t$this->_helper->redirector ( 'list', 'categories', 'default' );\n\t}", "title": "" }, { "docid": "da9f49fdcd4b44dfa0a0cd85e97fb7fb", "score": "0.5723562", "text": "public function listView()\r\n {\r\n $data['page'] = lang('departments');\r\n $data['menu'] = 'departments';\r\n $this->load->view('admin/layout/header', $data);\r\n $this->load->view('admin/departments/list');\r\n }", "title": "" }, { "docid": "b5b0940dbadd1ad04c1ea77707bd23f8", "score": "0.57234246", "text": "public function on_list()\n\t{\n\t\t// replace treeview with iconview\n\t\t$child = $this->scroll->get_child();\n\t\t$this->scroll->remove($child);\n\t\t$this->scroll->add($this->photolist->get_treeview());\n\t\t$config = CC_Config::instance();\n\t\t$config->photo->list_style = $this->list_style = 'detail';\n\t\t$this->show_all();\n\t}", "title": "" }, { "docid": "047dd066d50b83a910c106ac084d6d75", "score": "0.5722327", "text": "public function listings();", "title": "" }, { "docid": "cae0f2a9889416998a119c9607e4a955", "score": "0.57221776", "text": "public function home() {\n\t\t\n\t}", "title": "" }, { "docid": "1b4b57d12817385502fbe22ec5382814", "score": "0.5710816", "text": "public function index() {\n $this->load->view($this->vendors_url . \"header\");\n $this->load->view($this->vendors_url . \"home\", [\"leads\" => $this->leads_model->get_todays_leads()]);\n $this->load->view($this->vendors_url . \"endfooter\");\n }", "title": "" } ]
d03b388b5c2bcd743860d5a3096e1c5d
Execute the console command.
[ { "docid": "cdabfe1dcf82efabdd70e33fb88157b0", "score": "0.61023414", "text": "public function handle()\n {\n if ($this->option('clearall')) {\n Locale::truncate();\n }\n $locale = Locale::where('code', '=', $this->argument('code'))->first();\n if (!$locale) {\n $locale = new Locale();\n }\n $locale->code = $this->argument('code');\n $locale->name = ($this->argument('name') ? $this->argument('name') : $this->argument('code'));\n $locale->is_default = ($this->option('default') ? true : false);\n $locale->is_enabled = true;\n $locale->save();\n\n $this->output->writeln('Added locale \"'.$locale->code.'\", \"'.$locale->name.'\".'.($locale->is_default ? ' Set as default.' : ''));\n }", "title": "" } ]
[ { "docid": "f4d55248275d43ecfdd6bb7f6df512d0", "score": "0.6384607", "text": "public function handle()\r\n {\r\n $extension = $this->input->getArgument('extension');\r\n $dir = $this->input->getOption('dir');\r\n $subdirectory = $this->input->getOption('subdirectory');\r\n if (realpath($dir)) {\r\n $dir = realpath($dir);\r\n } else {\r\n $dir = getcwd(). DIRECTORY_SEPARATOR . $dir;\r\n }\r\n\r\n if ($subdirectory) {\r\n $dir .= DIRECTORY_SEPARATOR . $extension;\r\n }\r\n\r\n $print = $this->input->getOption('print');\r\n if ($print) {\r\n $this->dumperPrintScreen($extension);\r\n } else {\r\n $this->dumperFiles($extension, $dir);\r\n }\r\n }", "title": "" }, { "docid": "11a70b2fd3233af1df35c0ddaf483056", "score": "0.63700306", "text": "public function handle()\n {\n $filename = $this->argument('file');\n\n $contents = file_get_contents($filename);\n\n $dom = new Dom;\n $dom->load($contents);\n dd($dom);\n }", "title": "" }, { "docid": "7b03f5ce6c6618865e72ce203aac89dc", "score": "0.6331039", "text": "public function handle()\n {\n $email = $this->argument('email');\n $paypal = new PayPalService;\n $member = $paypal->findMember($email);\n\n echo json_encode($member);\n }", "title": "" }, { "docid": "8e5fbafbe94aaac7e217233269c362ee", "score": "0.628703", "text": "public function handle()\n {\n $users = $this->argument('users')\n ? \\App\\Models\\User::findOrFail($this->argument('users'))\n : \\App\\Models\\User::all()\n ;\n\n $subject = $this->option('subject');\n\n if ($this->option('class')) {\n $subject = Str::studly($subject);\n }\n\n $users->map->notify(new \\App\\Notifications\\SayHello($subject));\n }", "title": "" }, { "docid": "8dccad4233b42c81acf726d465c3954d", "score": "0.6284107", "text": "public function handle()\n {\n $this->loadDefinitionFile();\n\n $lang = $this->definition->getLang();\n \n $lang->output();\n \n }", "title": "" }, { "docid": "6c5f5dd3afd6cfceafee0346aee0c26d", "score": "0.62772816", "text": "public function handle()\n {\n $benchmark = new CodeBenchmark();\n $benchmark->start();\n $lc = new LogContext();\n\n $activeUsers = UserMedia::whereDate('created_at', '>', now()->subDays(7))\n ->with('user')\n ->groupBy('user_id')\n ->get('user_id');\n\n $lc->info('found active users', ['count' => $activeUsers->count(), 'users' => $activeUsers]);\n\n $dailyMixService = new DailyMixService();\n foreach($activeUsers as $user) {\n $dailyMixService->generateDailyMix($user->user);\n }\n\n $lc->info('finished hydrating daily mix cache', ['exec_time' => $benchmark->end()]);\n\n return Command::SUCCESS;\n }", "title": "" }, { "docid": "0bab008037156314f9e9ceac997b886f", "score": "0.62764233", "text": "public function handle() {\n\n\t\t$name = $this->argument('name'); // SINGULAR\n\n\t\t$this->prepare($name);\n\n\t\t$this->exportMigrations();\n\n\t\t$this->exportConfig();\n\n\t\t$this->runMigrations();\n\n\t\t$this->runCache();\n\t}", "title": "" }, { "docid": "6ed313f86869f59c4e9611ce0a549bf0", "score": "0.6275025", "text": "public function handle()\n {\n if ($this->option('debug')) {\n app()->bind('measurement.store', function () {\n return new ConsoleStore($this->output);\n });\n }\n\n $manager = app('measurement');\n $manager->run();\n }", "title": "" }, { "docid": "e6f70557dc9189a12ee889ad32c17f6f", "score": "0.624275", "text": "public function fire()\n {\n $story_name = $this->argument('story');\n if(is_file(storage_path(\"app/$story_name.json\"))) {\n $file_path = storage_path(\"app/$story_name.json\");\n if (is_readable($file_path)) {\n $json = file_get_contents($file_path);\n $this->story = new TweeStory($json);\n } else {\n throw new \\RuntimeException(\"The story is NOT readable!\");\n }\n } else {\n throw new \\RuntimeException(\"The story does NOT exist!\");\n }\n\n $this->textadventure = new TextAdventure($this->story);\n $current = TRUE;\n while($current) {\n $current = $this->textadventure->getCurrent();\n $this->line($current->text);\n if(!empty($current->links) && is_array($current->links)) {\n\n $this->line('You can do:');\n $this->printLinks();\n\n $answer = $this->ask('What do you do?');\n\n $this->textadventure->processAnswer($answer);\n } else {\n // The End\n $current = FALSE;\n }\n }\n }", "title": "" }, { "docid": "1c9f1a047c623d72188a9ba310616ee1", "score": "0.624248", "text": "public function handle()\n {\n $this->package = $this->argument('PackageName');\n $this->generateFiles();\n }", "title": "" }, { "docid": "587fd26ae2d4ac5a287ddb2a93de55f7", "score": "0.6240354", "text": "public function handle()\n {\n $data = collect($this->arguments())\n ->merge($this->options())\n ->filter(\n function ($value) {\n return ! empty($value);\n }\n )\n ->except(['command']);\n $link = new Link();\n $link->fill($data->toArray())->save();\n\n $this->info(\"Short Url successfully created {$link->shortURL}\");\n $this->info($link);\n }", "title": "" }, { "docid": "fd64397ca878d6338279066b1c0f10b0", "score": "0.6217554", "text": "public function handle()\n {\n $this->createPermissionEntities();\n $this->info('Permissions synced');\n\n $this->syncRoles();\n $this->info('Roles synced');\n\n $this->entityManager->flush();\n }", "title": "" }, { "docid": "cede65a372614b0c905af573bda7ff3c", "score": "0.621317", "text": "public function handle()\n {\n $this->callSilent('package:any', [\n 'name' => $this->argument('name'),\n '--type' => 'trait',\n '--category' => $this->type,\n ]);\n }", "title": "" }, { "docid": "2f06ba2c6854d9b3b6a7bfe9511052f8", "score": "0.62012625", "text": "public function handle()\n {\n if ($this->option('refresh')) {\n $this->Info('test_database.sqlite is rebuilding...');\n Storage::disk('test')->put('test_database.sqlite', '');\n $this->info(\"test_database.sqlite has been built.\\r\\n\");\n }\n\n $this->info('phpunit testing...');\n\n exec('phpunit', $output);\n\n foreach ($output as $line) {\n $this->line($line);\n }\n }", "title": "" }, { "docid": "614abf12033efc252788d708c7c5d16e", "score": "0.6193943", "text": "public function handle()\n {\n $inputFrames = $this->argument('frames');\n\n try {\n\n $inputFrames = json_decode($inputFrames);\n\n $bowling = new BowlingGame;\n $scoreHistory = $bowling->setInputFrames($inputFrames)->getScoreHistory();\n \n $scoreHistory = json_encode($scoreHistory);\n $this->info($scoreHistory);\n\n } catch (Exception $e) {\n\n $exceptionClass = get_class($e);\n $this->warn(\"{$exceptionClass}: {$e->getMessage()}\"); \n $this->info('Please fix your values and run the command again.');\n\n }\n\n }", "title": "" }, { "docid": "9d8a930d9c40b5df46304ac3f43cf050", "score": "0.61810154", "text": "public function handle()\n {\n $validator = Validator::make($this->arguments(), [\n 'name' => 'required|max:50|exists:App\\Entities\\Users',\n 'info' => 'required'\n ]);\n\n if ($validator->fails()){\n $errMsg = '';\n foreach ($validator->errors()->all() as $error) {\n $errMsg .= $error . \"\\r\";\n }\n\n $this->error($errMsg);\n } else {\n $name = $this->argument('name');\n $info = $this->argument('info');\n\n $user = EntityManager::getRepository('App\\Entities\\Users')->findOneBy(['name' => $name]);\n $user->setInfo($info);\n EntityManager::persist($user);\n EntityManager::flush();\n\n $this->info('Done');\n }\n }", "title": "" }, { "docid": "a209a9bb4ecda1c3767ef433676a7ce2", "score": "0.6176677", "text": "public function handle()\n {\n $query = $this->argument('query');\n\n \\Event::fire(new Search([\n 'gameApiId' => $query\n ]));\n\n $this->info('Game ' . $model->title . ' saved to the database!');\n }", "title": "" }, { "docid": "b6bd2bc7c7f901dcb517299eb37bc912", "score": "0.6160816", "text": "public function handle()\n {\n $language = $this->argument('language');\n\n if ($this->option('list')) {\n $this->showNamespaceList($language);\n\n return;\n }\n }", "title": "" }, { "docid": "c967ed4a511b7ccbb45581ed629f07d3", "score": "0.61529034", "text": "public function handle() {\n $this->info('The command was started');\n \n Auth::login(User::firstOrFail());\n \n if (Configuration::firstOrFail()->cron) {\n $date = Carbon::now()->subDay()->format('Y-m-d');\n \n $documents = Summary::query()\n ->where([\n 'soap_type_id' => Company::firstOrFail()->active()->soap_type_id,\n 'summary_status_type_id' => '1',\n 'date_of_reference' => $date,\n 'state_type_id' => '03',\n ])\n ->get();\n \n if ($documents->count() > 0) {\n foreach ($documents as $document) $this->query($document->id);\n }\n else {\n $this->info('No data to process');\n }\n }\n else {\n $this->info('The cron is disabled');\n }\n \n $this->info('The command is finished');\n }", "title": "" }, { "docid": "335576c80d7b4c420e16a9cd31e3dc92", "score": "0.61510557", "text": "public function handle()\n {\n $ok = false;\n $usuario = (int) $this->argument('usuario');\n if ($usuario = Usuario::find($usuario)) {\n \\Event::fire(new TarefaRealizada($this->argument('tarefa'), $usuario->id));\n $ok = true;\n $this->comment('Tarefa adiciona na fila!');\n }\n\n if (!$ok) {\n $this->comment('Nao foi possivel encontrar a tarefa ou usuario!');\n }\n }", "title": "" }, { "docid": "aeb80ebb2663e05060238407128343bb", "score": "0.6146718", "text": "public function handle()\n {\n $this->getArguments();\n $this->copyViews();\n }", "title": "" }, { "docid": "ae9d959b7f6efdf469ae7323872bfd6f", "score": "0.61385095", "text": "public function handle()\n {\n // Gather arguments...\n $publish = $this->option('y') ?: false;\n $force = $this->option('force') ?: false;\n\n if (! $publish) {\n $publish = $this->confirm('Publish Canvas core translation files?');\n }\n\n // Publish translations...\n if ($publish) {\n $exitCode = Artisan::call('vendor:publish', [\n '--provider' => 'Canvas\\CanvasServiceProvider',\n '--tag' => 'translations',\n '--force' => $force,\n ]);\n $this->line('<info>✔</info> Success! Canvas core translation files have been published.'.PHP_EOL);\n }\n }", "title": "" }, { "docid": "1d4200bf493df6fe60a95bf85de8afd0", "score": "0.6138096", "text": "public function handle()\n {\n $merchant = Merchant::find($this->argument('merchant_id'));\n\n $products = new CsvGenerator($merchant, 'update');\n $products->generate();\n }", "title": "" }, { "docid": "b29254439d2818a9679c4f51c5ef7b72", "score": "0.6134498", "text": "public function handle()\n {\n $exchangeName = $this->argument('exchange');\n\n $class = 'App\\Models\\Exchange\\\\'.ucfirst($exchangeName);\n if (class_exists($class)) {\n $updater = new $class();\n\n if (!$updater->updateCurrencies()) {\n echo $updater->getApiError();\n }\n\n if (!$updater->updateMarkets()) {\n echo $updater->getApiError();\n }\n }\n }", "title": "" }, { "docid": "2afded3628945b61de96c95373f76182", "score": "0.61250114", "text": "public function handle()\n {\n $tenantId = $this->argument('tenantId');\n $tenant = Tenant::find($tenantId);\n\n if (!$tenant) {\n throw new RuntimeException('Tenant with ID = '.$tenantId.' does not exist.');\n }\n\n $this->tenantManager->setTenant($tenant);\n \\DB::purge('tenant');\n\n $seeder = new \\RolesAndPermissionsSeeder('tenant');\n $seeder->run(null);\n\n $this->info('Data have been seeded for tenant with subdomain \\''.$tenant->subdomain.'\\'.');\n }", "title": "" }, { "docid": "f34e8d01e224349d05f0cbb1742244d3", "score": "0.61218715", "text": "public function handle()\n {\n $updater = $this->manager->getUpdater();\n\n $result = $updater->update();\n\n if($result === true) {\n $this->info('Statistics updated successfully');\n\n } else {\n $this->error('Something went wrong while updating statistics.');\n }\n }", "title": "" }, { "docid": "233b6da5fecb0746d16b89c9ba2f3d4a", "score": "0.61209875", "text": "public function handle()\n {\n $this->checkFile();\n $this->updateArray();\n $this->putComposer();\n if ($this->argument('composer_run') == 1) {\n $this->runComposer();\n }\n }", "title": "" }, { "docid": "ca77aaa07d8eb77870b07d1421ed70e5", "score": "0.61204565", "text": "public function handle()\n {\n \tif($this->option('source')) {\t\t\n\t $this->info('Regenerating docs');\n\t Generator::generateDocs($this->option('source'), $this->option('output'));\n \t} else {\n \t\t$this->error('--source option is required');\n \t}\n }", "title": "" }, { "docid": "96d81b9fa731ca55363c0d23e7b72dd6", "score": "0.61188143", "text": "public function handle()\n {\n\n PodcastController::parseRssFeed($this->argument('rssFeed'));\n\n return Command::SUCCESS;\n }", "title": "" }, { "docid": "e62541dbb2f5a1f0dcb1f0361bef7a83", "score": "0.61166304", "text": "public function handle()\n {\n $email = $this->validateEmail();\n\n $this->info('Running invitation registrar...', 'vvv');\n $invitation = $this->registrar->invite($email, $this->makeOptions());\n $this->displayOutput($invitation);\n }", "title": "" }, { "docid": "d7d8017e16a28e9a69076ac4657289c1", "score": "0.6114923", "text": "public function handle()\n {\n $deviceId = $this->argument('deviceId');\n\n /** @var Device $device */\n $device = Device::findOrFail($deviceId);\n\n $cloudFlare = new CloudFlareService($this->output);\n\n // does this device have a domain yet?\n if (!$device->domain) {\n $domainName = $device->generateDomainName();\n\n $device->domain = $domainName;\n $device->save();\n }\n\n $this->output->writeln('Updating records for: <info>' . $device->domain . '</info>');\n $result = $cloudFlare->setDnsRecord('A', $device->domain, $device->ip);\n\n if ($device->needsRefreshCertificate()) {\n $this->output->writeln('Updating certificate');\n $this->updateSslCertificate($device, $cloudFlare);\n } else {\n $this->output->writeln('Not updating certificate, valid until: <info>' . $device->getLastCertificate()->expires . '</info>');\n }\n }", "title": "" }, { "docid": "d8245fb4959996063716d56aebb4b654", "score": "0.6112937", "text": "public function handle()\n {\n $file = 'base';\n $currentVersion = Manifest::latestVersion();\n do {\n $path = storage_path('app/manifests')\n . DIRECTORY_SEPARATOR\n . $currentVersion--\n . DIRECTORY_SEPARATOR\n . 'patches'\n . DIRECTORY_SEPARATOR\n . $file\n . '.json';\n } while ($currentVersion > 0 && !File::exists($path));\n\n if (!$currentVersion) {\n echo 'Failed to find ' . $file . '.json';\n }\n\n $json = File::get($path);\n $this->converter->convert($json, 'swcdata');\n }", "title": "" }, { "docid": "822230f2481dd9a6d541e3b92f8cf054", "score": "0.61101764", "text": "public function handle()\n {\n $type = $this->argument('type');\n\n switch($type){\n case \"sync_id\" :\n $this->syncID();\n break;\n\n default :\n throw new Exception('Empty type commaand.');\n break;\n }\n }", "title": "" }, { "docid": "27ac2c6b7db29439b452ed7d1fdd0e22", "score": "0.6103144", "text": "public function handle()\n {\n $this->drip->send(User::find($this->argument('user')));\n }", "title": "" }, { "docid": "5c03a37491a99a77c5767b7619f99796", "score": "0.6099725", "text": "public function handle()\n {\n $word = $this->argument('word');\n\n $result = \"The word '$word' is\";\n $result .= (\\App\\Domain\\Palindrome::isPalindrome($word)) ? \"\" : \" not\";\n $result .= \" a palindrome\";\n\n $this->info($result);\n\n }", "title": "" }, { "docid": "13fc2c4b62f69317e8569e907ec3846c", "score": "0.609825", "text": "public function handle()\n {\n $type = $this->argument('type');\n\n switch($type){\n case \"sync\" :\n $this->sync();\n break;\n default :\n throw new Exception('Empty type commaand.');\n break;\n }\n }", "title": "" }, { "docid": "846628b6764f43bacfab16009c68f8ee", "score": "0.609586", "text": "public function handle()\n {\n if($this->option('clean')) {\n $filesystem = new Filesystem();\n $filesystem->deleteDirectory(public_path('vendor/eav-dashboard/'));\n }\n\n $this->call('vendor:publish', [\n '--tag' => 'eav-dashboard-assets',\n '--force' => true,\n ]);\n }", "title": "" }, { "docid": "17edf4e5dfe571c0b1a48891219585c1", "score": "0.60934675", "text": "public function handle()\n {\n \n \n $process = new Process('node ./app/Console/Commands/Cambiu/SyncRates.js');\n $process->run();\n \n // executes after the command finishes\n if (!$process->isSuccessful()) {\n throw new ProcessFailedException($process);\n }\n \n echo $process->getOutput();\n \n }", "title": "" }, { "docid": "4bec50c8cd0dcba36a9377656630dbad", "score": "0.6088706", "text": "public function handle()\n {\n $app = $this->argument('app');\n $inputFilename = base_path('schema/' . $app . '/utterances_input.txt');\n $outputFilename = base_path('schema/' . $app . '/utterances.txt');\n\n if (!file_exists($inputFilename)) {\n throw new InvalidArgumentException('Can\\'t find input utterance file for app: ' . $app);\n }\n\n $this->buildUtterances($inputFilename, $outputFilename);\n }", "title": "" }, { "docid": "f628656dc2f74c78336781bd2be5c4a7", "score": "0.6087791", "text": "public function handle()\n {\n $this->info('Schedule for NBA matches created');\n $this->fixture->scheduleMatches();\n }", "title": "" }, { "docid": "0136ec4e81368b650631b11c67c655b4", "score": "0.6084942", "text": "public function handle()\n\t{\n\t\t$modules = [];\n\n\t\tif ($this->argument('module-name') !== null) {\n\t\t\t$modules[] = ModuleFacade::find($this->argument('module-name'));\n\t\t} else {\n\t\t\t$modules = ModuleFacade::all();\n\t\t}\n\n\t\tforeach ($modules as $module) {\n\t\t\tif ($this->canExecuteCmd($module)) {\n\t\t\t\t$this->symlinkDirectory(__DIR__.'/../../../../'.$module->getManifest('media-path'), public_path('modules/'.$module->getManifest('name').'/media'));\n\t\t\t}\n\t\t}\n\n\t\treturn;\n\t}", "title": "" }, { "docid": "54b5f2ac233f08ffc86e479feb064531", "score": "0.6082032", "text": "public function handle()\n {\n $target = $this->argument('target');\n \n if ('self' == $target) {\n $target = $this->player;\n }\n \n $checkPlayerEffectsJob = (new CheckPlayerEffectsJob($target))->onQueue('effects');\n\n $this->dispatch($checkPlayerEffectsJob);\n }", "title": "" }, { "docid": "fb9f84a690914fa7b8e0de7cad1614a2", "score": "0.6081462", "text": "public function handle()\n {\n $amount = $this->option('amount');\n $from = $this->option('from');\n $to = $this->option('to');\n $prod = $this->option('live');\n\n $this->sendPayload($amount, $from, $to, $prod);\n }", "title": "" }, { "docid": "f672ed9d4424313cfa37235ea13b584d", "score": "0.6078752", "text": "public function handle()\n {\n $user = User::find($this->argument('identifier'));\n\n if (!$user)\n {\n $user = User::where('username', $this->argument('identifier'))->first();\n }\n\n if (!$user)\n {\n $this->error('Couldn\\'t find user.');\n return;\n }\n\n $mod = Moderator::firstOrCreate([\n 'user_id' => $user->id,\n 'channel' => $this->argument('channel')\n ]);\n\n $mod->approved = 1;\n\n $mod->save();\n\n $this->info('Moderator power given to ' . $user->username . '.');\n }", "title": "" }, { "docid": "c8788b5db7dd28aa7dedbd8df903e1e8", "score": "0.6078362", "text": "public function handle()\n {\n $arguments = $this->argument('options');\n $options = implode(\" \", $arguments);\n $cmd = $this->dockerCompose . ' build '.$options;\n $this->info('Running: '.$cmd);\n $this->line($this->runCommand($cmd));\n }", "title": "" }, { "docid": "52c37a11492f930c320f8c1ebc09fce1", "score": "0.6075524", "text": "public function handle()\n {\n switch ($this->argument('command_site')) {\n case 'pizdato':\n echo 'Remove MODX REVO and install Evolution CMS' . \"\\n\";\n $this->startUpdate();\n break;\n case 'update':\n $this->startUpdate();\n break;\n }\n }", "title": "" }, { "docid": "bbaf790da1ce65ac33b39244699ae36d", "score": "0.6073531", "text": "public function handle()\n {\n $this->resource_name = strtolower($this->argument('resource'));\n\n $this->createDirectory(str_plural($this->resource_name));\n\n foreach ($this->viewStubs as $key => $value) {\n\n file_put_contents(\n resource_path('views/' . str_plural($this->resource_name) . '/' . $value),\n $this->compileStub($key)\n );\n }\n\n $this->info('View scaffolding generated successfully.');\n }", "title": "" }, { "docid": "aa268c3883f91f6b28eeaed84f9fd08a", "score": "0.6071917", "text": "public function handle()\n {\n $start = $this->option('start-date') ? $this->option('start-date') : date(\"Y-m-d\", strtotime(\"-1 day\"));\n $end = $this->option('end-date') ? $this->option('end-date') : date(\"Y-m-d\", strtotime(\"-1 day\"));\n $this->updateYoukuData($start, $end);\n }", "title": "" }, { "docid": "1bd0d619300f02e582afb8ba6af9968d", "score": "0.6069798", "text": "public function handle()\n {\n $teams = collect($this->options('team')['team']);\n\n if ($teams->count() == 0) {\n $teams = Team::all()->pluck('id');\n }\n\n $teams->each(function ($team) {\n // TODO validate\n $this->recalculateTeamStats($team);\n });\n }", "title": "" }, { "docid": "4b318b60803d141e9c261abf2f8a933b", "score": "0.60680443", "text": "public function handle() {\n $dumper = new Dumper( $this->argument( 'url' ), $this->argument( 'dest' ), $this->option( 'threads' ) );\n $dumper->setCommand( $this );\n $dumper->dump();\n }", "title": "" }, { "docid": "72fad40d289c6e0aec01e52abd777228", "score": "0.6065904", "text": "public function handle()\n {\n $users = User::orderBy('name')->get();\n\n foreach($users as $user) {\n Log::info($this->option('message'));\n }\n }", "title": "" }, { "docid": "5fe23ae751f81c30f3021af9bb0ca77e", "score": "0.6063816", "text": "public function handle() {\n $this->info(\"Welcome to the Lyra package updater.\");\n\n if (config('lyra.authenticator') !== Lyra::MODE_ADVANCED) {\n $this->error('This command is only available using the Advanced mode!');\n exit(1);\n }\n\n $this->info(\"Advanced mode detected, updating the migrations...\");\n $this->call(\"vendor:publish\", [\"--provider\" => LyraServiceProvider::class, \"--tag\" => \"lyra-migrations\", \"--force\" => true]);\n $this->call('migrate', ['--path' => 'database/migrations/lyra']);\n\n $this->info('Successfully updated! Enjoy creating awesome things with Lyra.');\n }", "title": "" }, { "docid": "bc0ab61d53a71a319cd6b9946df71663", "score": "0.60628897", "text": "public function handle()\n {\n $subscriptionHistoriesId = $this->argument('subscriptionHistoriesId');\n $userId = $this->argument('userId');\n $user = User::find($userId);\n Mail::to($user->email)->send(new SendInvoiceMail($subscriptionHistoriesId));\n }", "title": "" }, { "docid": "874d3f104bd19949c6bffc159aab4ba8", "score": "0.60621536", "text": "public function handle() {\n\t\t$command = $this->argument( 'arg' );\n\n\t\tswitch ( $command ) {\n\n\t\t\tcase 'sources':\n\t\t\t\tArtisan::call(\n\t\t\t\t\t'db:seed',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'--class' => 'SourcesSeeder',\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\tbreak;\n\n\t\t\tcase 'news':\n\t\t\t\t// pull news\n\t\t\t\t$count = $this->sources_fetcher();\n\t\t\t\tif ( 0 === $count ) {\n\t\t\t\t\t$this->logger->writeln( 'No news imported. Did you run <info>php artisan fetch sources</info> first?' );\n\t\t\t\t} else {\n\t\t\t\t\t$this->logger->writeln( \"<info>[SUCCESS]</info> Processed {$count} news.\" );\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t$this->logger->writeln( '<error>Unknown Command. Available commands:</error>' );\n\t\t\t\t$this->logger->writeln( '<info>php artisan fetch sources</info> - Fetch Sources.' );\n\t\t\t\t$this->logger->writeln( '<info>php artisan fetch news</info> - Fetch News.' );\n\t\t\t\t$this->logger->writeln( '<comment>Make sure to fetch sources first!</comment>' );\n\t\t}\n\t}", "title": "" }, { "docid": "56b0ae240e0c0313f84f93be95683306", "score": "0.6061886", "text": "public function handle()\n {\n $this->companyId = 284; //Christian Roofing\n\n $this->attachPhones();\n $this->attachAddresses();\n $this->info('Customer solr sync' . PHP_EOL);\n $this->call('command:solr_customer_sync');\n }", "title": "" }, { "docid": "14f0e7079f58531204fa43e8a3bb5e60", "score": "0.6061181", "text": "public function handle()\n {\n\n $resource = strtolower($this->argument('resource'));\n\n $path = base_path('tests/Feature');\n $this->replaceTest($path, $resource);\n\n $this->info($resource . ' test created successfully!');\n }", "title": "" }, { "docid": "74cf57f7ddec64c0f5cfa939c909ee91", "score": "0.60578257", "text": "public function handle()\n {\n $projects = Project::all();\n $toolController = new ToolController();\n\n foreach($projects as $project) {\n echo 'Taking DB snapshot for ' . $project['project_name'] . PHP_EOL;\n $toolController->dbSnapshot($project, 'live');\n echo 'Taking media snapshot for ' . $project['project_name'] . PHP_EOL;\n $toolController->mediaSnapshot($project, 'live');\n }\n }", "title": "" }, { "docid": "5ee27a949bfc6bed7a044ff224f74fbf", "score": "0.6056608", "text": "public function handle()\n {\n if ($this->option('list')) {\n $this->list();\n } elseif ($this->option('reload')) {\n $this->reload();\n } else {\n return $this->error(\"Not enough arguments\");\n }\n }", "title": "" }, { "docid": "381484b882cc8a1eb472ed866e2dd39d", "score": "0.6053808", "text": "public function handle()\n {\n $this->output->writeln('Setting attribute '.$this->argument('attribute_name'));\n $this->setAttribute(\n $this->argument('model'),\n $this->argument('attribute_name'),\n $this->argument('attribute_value'),\n $this->argument('ids')\n );\n $this->output->writeln('Setting completed successfully');\n }", "title": "" }, { "docid": "ca9dbea5282d4d6d7e7ede9050594a96", "score": "0.6053466", "text": "public function handle()\n {\n $this->info('building new web notification...');\n $notification_stub = file_get_contents(app_path('Notifications/Templates/web-notification.stub'));\n\n $notification_name = ucwords($this->argument('name')).'Notification';\n\n $notification_stub = str_replace(\"{{CLASS}}\", $notification_name, $notification_stub);\n file_put_contents(app_path('Notifications/'.$notification_name . '.php'), $notification_stub);\n $this->info('done.');\n }", "title": "" }, { "docid": "52647a815a20edc12b3b8b05612f84ee", "score": "0.60488266", "text": "public function handle()\n {\n if ($this->resolveUser()) {\n $this->updateRoles();\n $this->updateOrganizationalUnits();\n }\n }", "title": "" }, { "docid": "270110158877d446e4aed934f080d6c1", "score": "0.604796", "text": "public function handle()\n {\n $action = $this->argument('action');\n $version = $this->argument('version');\n switch ($action) {\n case 'install' :\n $this->installDujiao();\n break;\n case 'update' :\n $this->updateDujiao($version);\n break;\n }\n }", "title": "" }, { "docid": "7f9aeaf467a4f65dff4c7fc4e2b68aa5", "score": "0.6046221", "text": "public function handle()\n {\n $key = $this->argument('key');\n $res = Antsearch::searchIndex($key);\n }", "title": "" }, { "docid": "3062d4aee0fde441ac5219215c4a3320", "score": "0.6045359", "text": "public function handle()\n {\n $this->info('Generating slug for menu items...');\n foreach (MenuItem::all() as $menuItem)\n if (empty($menuItem->ru_slug))\n $menuItem->generateSlug();\n $this->info('Done!');\n }", "title": "" }, { "docid": "30be3e8ca2ac2dc0da6d73c396ed13ce", "score": "0.6040044", "text": "public function handle()\n {\n if ($this->hasArgument('user'))\n $username = $this->argument('user');\n if (isset($username))\n {\n $user = User::where('name', $username)->first();\n if (isset($user))\n {\n Mail::send(new UserNoticed($user));\n $this->info(\"Notice sent to a user!\");\n }\n else\n {\n $this->error(\"User with username {$username} not found.\");\n }\n }\n else \n {\n $users = User::all();\n if (count($users) > 0)\n {\n $bar = $this->output->createProgressBar(count($users));\n foreach ($users as $user)\n {\n Mail::queue(new UserNoticed($user));\n $bar->advance();\n }\n $bar->finish();\n $this->info(\"Notice sent to all user!\");\n }\n else \n {\n $this->info(\"Sorry. There is no user in database.\");\n }\n }\n }", "title": "" }, { "docid": "1adee31bd36e7338174c69ec7d118153", "score": "0.6036696", "text": "public function handle()\n {\n $this->url = $this->option('url');\n\n if (!file_exists($this->mediaPath)) {\n \\File::makeDirectory($this->mediaPath);\n }\n $youtube = new YoutubeDownloader($this->url);\n $youtube->setPath($this->mediaPath);\n\n $youtube->download();\n }", "title": "" }, { "docid": "e3a3b7ba9387c2277652e1065bb53327", "score": "0.6036072", "text": "public function handle()\n {\n\n $text = $this->argument('text');\n\n Notification::plainText($text)->broadcast();\n\n $this->comment('done');\n }", "title": "" }, { "docid": "aea1e165932d63cff14e8748dae49cba", "score": "0.60356784", "text": "public function handle()\n {\n\t \t$userID = $this->argument('userid');\n\t \t\n\t \tif ($userID == 'all') {\n\t\t \t$users = User::all();\n\t \t} else {\n\t\t \t$users = User::where('id', '=', $userID)->get();\n\t \t}\n \n if (!$users) {\n\t $this->error(\"Invalid user specified.\");\n\t return;\n }\n \n foreach ($users as $user) {\n\t $this->info('User: ' . $user->email);\n\t foreach ($user->characters as $character) {\n\t\t $character->quest_import_token = null;\n\t\t $character->quests_imported = null;\n\t\t $character->save();\n\t\t \n\t\t $job = (new ImportCharacterQuestItems($character->id))->onQueue('low');\n\t\t\t $this->dispatch($job);\n\t\t\t $this->line('Character quests reset and queued: ' . $character->name . ' - ' . $character->realm->name);\n\t }\n }\n }", "title": "" }, { "docid": "f9ecffa8921d776b176ee181884db327", "score": "0.60312265", "text": "public function handle()\n {\n $wallets = new Wallets();\n\n $addresses = $wallets->getAddresses();\n\n foreach ($addresses as $address) {\n\n\n\n $this->info($address);\n }\n }", "title": "" }, { "docid": "b114b0b69377022e318db6d9f419e36a", "score": "0.60290843", "text": "public function handle()\n {\n $filePath = $this->argument('file');\n\n if ($this->readData($filePath)) {\n\n foreach ($this->data as $item) {\n if ($item[\"operation\"] == \"cash_out\") {\n $result = $this->cashOutCommissions($item);\n } else {\n $result = $this->cashInCommissions($item[\"amount\"], $item[\"currency\"]);\n }\n\n $result = $this->formatCurrencyFotOutput($result, $item[\"currency\"]);\n $this->info($result);\n }\n } else {\n $this->error(\"The provided file was not found!\");\n }\n }", "title": "" }, { "docid": "999f9a9c171fc35559e7ce6d3663b9b4", "score": "0.60266197", "text": "public function handle()\n {\n $cmd = $this->argument('cmd');\n $params = $this->argument('params');\n $this->$cmd($params);\n }", "title": "" }, { "docid": "be80cbc233b274238fff47ea2a395f46", "score": "0.60175", "text": "public function handle()\n {\n $startId = $this->argument('start');\n $endId = $this->argument('end');\n $image = new ImageController();\n $image->test($startId,$endId);\n }", "title": "" }, { "docid": "7e59ebdff4818faa1d2d118c6e1fc876", "score": "0.6017334", "text": "public function handle()\n {\n ini_set(\"memory_limit\", \"4096M\");\n $projectId = $this->argument(\"projectId\");\n $convertFileAction = new ConvertFileAction();\n File::where('project_id', $projectId)\n ->whereNull('deleted_at')\n ->whereNull('dataset_id')\n ->where('mime_type', '<>', 'directory')\n ->chunk(100, function ($files) use ($convertFileAction) {\n foreach ($files as $file) {\n if ($file->shouldBeConverted()) {\n echo \"Converting file {$file->name} with uuid {$file->uuid}\\n\";\n $convertFileAction->execute($file);\n }\n }\n });\n }", "title": "" }, { "docid": "2c8609404771ef81682ccd429b0c03f1", "score": "0.60125583", "text": "public function handle()\n {\n $this->sortTags();\n\n $this->info('Tags have been sorted!');\n }", "title": "" }, { "docid": "c02bec24555adf7b106d6c7ba713d35d", "score": "0.60114497", "text": "public function handle()\n\t{\n\t\t$scraper = new MainScraper();\n\t\t$scraper->scrape($this->option('useDbList'), $this->option('saveGameItems'), $this->option('scrapeSupply'));\n\t}", "title": "" }, { "docid": "697dce4a603f04826f3b50ee53d5163f", "score": "0.6007624", "text": "public function handle()\n {\n $action = $this->argument('action');\n switch ($action) {\n case 'install' :\n $this->installDujiao();\n break;\n }\n }", "title": "" }, { "docid": "43e85493b68b1baeb4df1c6c642013b5", "score": "0.6006543", "text": "public function handle()\n {\n // setup\n\t $this->setSettings();\n\t $this->setResourceName(str_replace($this->settings['postfix'], '', $this->getArgumentNameOnly()));\n\n // check the path where to create and save file\n\t $path = $this->getPath('');\n\t if ($this->files->exists($path) && $this->optionForce() === false) {\n\t\t $this->error(ucfirst($this->getType()) . ' already exists!');\n\n\t\t return;\n\t }\n\n\t // make all the directories\n\t $this->makeDirectory($path);\n\n\t // build file and save it at location\n\t $this->files->put($path, $this->buildClass());\n\n\t // output to console\n\t $this->info(ucfirst($this->getType()) . ' created successfully.');\n\t $this->info('- ' . $path);\n\n\t // if we need to run \"composer dump-autoload\"\n\t if ($this->settings['dump_autoload'] === true) {\n\t\t $this->composer->dumpAutoloads();\n\t }\n }", "title": "" }, { "docid": "5f6fd861d9939774d95015f7746ca357", "score": "0.6000222", "text": "public function handle()\n {\n $language = $this->argument('language');\n\n $this->logout($language);\n\n if ($this->option('logout')) {\n exit;\n }\n\n if ($result = $this->login($language)) {\n $url = $this->project->getApiUrls()[$language];\n $url = parse_url($url, PHP_URL_HOST);\n\n $username = $this->project->getApiUsernames()[$language];\n\n $this->info(sprintf('Logged in on %s as %s', $url, $username));\n }\n }", "title": "" }, { "docid": "ba9a78433187eccfe6cea0e9de64233e", "score": "0.5999525", "text": "public function handle()\n\t{\n\t\t$mode = $this->argument('mode');\n\n\t\t$this->info(\"ESI Universe Mode: {$mode}\");\n\n\t\tswitch($mode)\n\t\t{\n\t\t\tcase \"jumps\":\n\t\t\t\t$this->doJumps();\n\t\t\t\tbreak;\n\t\t\tcase \"kills\":\n\t\t\t\t$this->doKills();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->error(\"No mode given\");\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "079631aecbd090ee181b8719ea989ef9", "score": "0.5999238", "text": "public function handle()\n {\n $odlFetcher = getOdlFetcher();\n\n $odlFetcher->updateLocations();\n }", "title": "" }, { "docid": "a7b1521b011746d2ebf22287af11e0ba", "score": "0.5995405", "text": "public function handle()\n {\n $model = studly_case($this->argument('resource'));\n\n $repository = $model . 'Repository';\n\n $files = $this->setFiles($model, $repository);\n\n if ( $this->notAll() )\n $this->checkOptions($files, $model, $repository);\n\n $this->removeFiles($files, $model);\n }", "title": "" }, { "docid": "d98cc6ad385ea608610535377d8c6eea", "score": "0.5995369", "text": "public function handle()\n {\n $this->generateEnv();\n $this->generateAppKey();\n $this->handleAssets();\n $this->discover();\n\n $this->info('Finished!');\n }", "title": "" }, { "docid": "bdf80cc9b2c72aacc1d4d05e19b9f238", "score": "0.5993247", "text": "public function handle()\n {\n if ($this->option('clear-db')) {\n $this->clearDB();\n }\n\n $configPath = $this->argument('config');\n\n $this->import($configPath);\n\n $this->scan();\n\n if ($this->option('clear-db')) {\n $this->clearDB();\n }\n }", "title": "" }, { "docid": "a1b81da5ea8f773975dafd1c0040a280", "score": "0.59926677", "text": "public function handle()\n {\n $name = $this->argument('name');\n $email = $this->argument('email');\n $role = $this->option('role') ?? 'user';\n\n if ($this->userExists($email)) {\n $this->error(\"A user with email '{$email}' already exists.\");\n\n return;\n }\n\n if (! $this->roleExists($role)) {\n $this->error(\"A role with name '{$role}' could not be found.\");\n\n return;\n }\n\n $password = str_random();\n\n $user = $this->addUser($name, $email, $password, $role);\n $user->markEmailAsVerified();\n $user->notify(new UserCreated);\n\n $this->info(\"{$role} {$email} can log in using password {$password}\");\n }", "title": "" }, { "docid": "efa13925653988620b3b9e292fddc71a", "score": "0.59915984", "text": "public function handle()\n {\n $calcResult = $this->calc->getCalcResult($this->argument('input'));\n\n echo 'status: ' . $calcResult->getStatus() . \"\\n\";\n echo 'message: ' . $calcResult->getMessage() . \"\\n\";\n }", "title": "" }, { "docid": "d38cdafca0b507f8ddbcb10d508888e3", "score": "0.59893626", "text": "public function handle()\n {\n\n $source = Source::find($this->argument('source'));\n\n $path = $this->argument('path');\n $format = $source->format;\n $locale = $source->locale;\n \n $loader = Factory::make($format, $locale);\n \n $loader->setSource($source);\n $output = $loader->read($path);\n \n dd($output);\n \n }", "title": "" }, { "docid": "77e175be586e2bdddcd74384a305fb1f", "score": "0.5988053", "text": "public function handle()\n {\n if (!$this->confirmToProceed()) {\n return;\n }\n\n $this->prepareDatabase();\n\n $path = $this->getMappingPath();\n\n $this->mapper->run($path, [\n 'step' => $this->option('step'),\n 'index' => $this->option('index'),\n ]);\n\n // Once the mapper has run we will grab the note output and send it out to\n // the console screen, since the mapper itself functions without having\n // any instances of the OutputInterface contract passed into the class.\n foreach ($this->mapper->getNotes() as $note) {\n $this->output->writeln($note);\n }\n }", "title": "" }, { "docid": "62877cf48e91e29231cfaad5c14ae90a", "score": "0.5987264", "text": "public function handle()\n {\n $repo = app(WargaRepository::class);\n $wargas = $repo->get();\n\n foreach ($wargas as $warga) {\n if ($repo->potongPoint($warga)) \n $this->info(\"Biaya admin 10% \".$warga->name);\n }\n }", "title": "" }, { "docid": "faa87184a112f97c3b607d8ad7af0313", "score": "0.59859186", "text": "public function handle()\n {\n $domain = $this->argument('domain');\n $this->call('project:certificate', ['domain'=>$domain]);\n $this->call('project:config', ['domain'=>$domain]);\n $this->call('project:docker', ['domain'=>$domain]);\n $this->call('project:nginx', ['domain'=>$domain]);\n //setup domains\n //setup lets encrypt\n\n //update\n }", "title": "" }, { "docid": "851bc04c788c20d676e90b9aff91b91a", "score": "0.5985831", "text": "public function handle()\n {\n $token = User::find($this->argument('userId'))->createToken('Temp')->accessToken;\n $this->info($token);\n }", "title": "" }, { "docid": "8d366f8af1cc5dec176eaedc177a89ff", "score": "0.5985372", "text": "public function handle()\n {\n $remove = $this->option('remove');\n\n if ($remove) {\n $this->remove();\n } else {\n $this->setup();\n }\n\n $this->info('Finished!');\n }", "title": "" }, { "docid": "f7ad41b8a18f8191205367f820dbddd1", "score": "0.59853566", "text": "public function handle()\n {\n if (empty($this->option(\"branch\"))) {\n return;\n }\n\n $branch = $this->option(\"branch\");\n\n exec(\"git fetch origin {$branch}\");\n $this->info(\"Branch {$branch} fetched\");\n\n exec(\"git pull origin {$branch}\");\n $this->info(\"Branch {$branch} merged\");\n\n Artisan::call(\"optimize:clear\");\n exec(\"composer dump-autoload\");\n $this->info(\"Files refreshed\");\n }", "title": "" }, { "docid": "4736cced92817ccc628aaa37743635ac", "score": "0.5982377", "text": "public function handle()\n {\n if ($name = $this->argument('theme')) {\n $this->publish($name);\n\n return;\n }\n\n $this->publishAll();\n }", "title": "" }, { "docid": "3704e193910aea3aaa9cbd09c92a8e9c", "score": "0.59820414", "text": "public function handle()\n {\n $this->info('Using repository: '.config('documentation.git.repository').' with branch \\''.config('documentation.git.branch').'\\' and depth '.config('documentation.git.depth'),\n 'vv');\n $action = $this->processOptions();\n\n if ($action === 'install') {\n $this->info('change directory to \\''.config('documentation.path').'\\'');\n $this->maintainer->install();\n } elseif ($action === 'update') {\n $this->maintainer->update();\n }\n }", "title": "" }, { "docid": "dd6aced14899bf1c11999ec1e39a93f7", "score": "0.5981982", "text": "public function handle()\n {\n try {\n $name = $this->argument('name');\n $relative_input_path = $this->argument('relative_input_path');\n $relative_output_path = $this->argument('relative_output_path');\n \n\n $crud = $this->refresh_class_interface->run(\n $name,\n $relative_input_path,\n $relative_output_path\n );\n \n\n $this->info($name.'Interface updated successfully!');\n \n } catch (\\Exception $ex) {\n $this->error($ex->getMessage() . ' on line ' . $ex->getLine() . ' in ' . $ex->getFile());\n }\n }", "title": "" }, { "docid": "84466b270c12652832692ad27a9d07cd", "score": "0.59748095", "text": "public function handle()\n {\n $account = \\app\\common\\models\\AccountWechats::getAccountByUniacid($this->argument('uniacid'));\n\n \\YunShop::app()->uniacid = $this->argument('uniacid');\n \\YunShop::app()->weid = $this->argument('uniacid');\n \\YunShop::app()->acid = $this->argument('uniacid');\n \\YunShop::app()->account = $account ? $account->toArray() : '';\n\n $this->info('=========start=========');\n $this->process();\n $this->info('=========end=========');\n }", "title": "" }, { "docid": "4323a0e12ea10fab02f18e144ba761f1", "score": "0.59727", "text": "public function handle()\n {\n\n $fileName = str_replace(\"app/Console/Commands\", \"\", trim(dirname(__FILE__))).\"public/data/pollen.data\";\n if (file_exists($fileName)) {\n $data = file_get_contents($fileName);\n if (!empty($data)) {\n $allergy = str_replace([\"#\"], \"\\n\", $data);\n }\n\n if (!empty($allergy)) {\n $app = app('wechat.official_account');\n\n $app->broadcasting->previewText($allergy, 'oD5CP0vCCbDNx1dAdfWEA-yYU7MQ');\n\n $app->broadcasting->previewText($allergy, 'oD5CP0k-zzGQ8eLNQrlcaWCZP-n0');\n\n @unlink($fileName);\n }\n }\n }", "title": "" }, { "docid": "0f86c5431b1967194b2b28cd8c5e7418", "score": "0.5970668", "text": "public function handle()\n {\n\n $group = Str::slug($this->argument('group'));\n\n File::copyDir($this->getOriginDir(), Path::make($group, 'stub'));\n\n $this->info('New stub group ' . $group . ' created.');\n }", "title": "" }, { "docid": "40e995557344ed0ba23a24e8ffef40a6", "score": "0.59684265", "text": "public function handle()\n {\n if (!app()->isLocal()) {\n $this->error('This command is only available on the local environment.');\n return;\n }\n\n $name = $this->argument('name');\n $fqdn = ($name==\"home\"?'':$name.'.').config('app.url_base');\n\n $this->deleteTenant($fqdn);\n }", "title": "" }, { "docid": "b7c97eadf4b9e06cc376e07fd1c557fb", "score": "0.5965284", "text": "public function handle()\n {\n $speakers = Talk::select('user_id')->distinct()->pluck('user_id')->toArray();\n\n $users = User::whereNotIn('id', $speakers)->where('role', 'user')->get();\n\n $bar = $this->output->createProgressBar(count($users));\n\n $this->info(sprintf('Reminder(s) passing to queue for %d users.', count($users)));\n\n foreach ($users as $user) {\n $user->notify(new RemindLastSubmissionDate($user->name));\n\n $bar->advance();\n }\n\n $bar->finish();\n }", "title": "" } ]
f5149515b5ca0c054f6f23f89441ea81
Get content of template
[ { "docid": "3178b5776a383066fb00a9ed16706909", "score": "0.0", "text": "function include_template($template, $vars)\n{\n $result = \"\";\n\n if (file_exists($template)) {\n if (is_array($vars)) {\n extract($vars);\n }\n\n ob_start();\n require $template;\n $result = ob_get_clean();\n }\n\n return $result;\n}", "title": "" } ]
[ { "docid": "93a3284d5cf21ad55ec32c3279cc66b2", "score": "0.83599275", "text": "public function getContent()\r\n {\r\n return $this->template;\r\n }", "title": "" }, { "docid": "12ce5e110d587df70b39d661167b079f", "score": "0.77437526", "text": "public function getGathercontentTemplate();", "title": "" }, { "docid": "e5adeff31203aed54decae2762f9f0ab", "score": "0.7634828", "text": "public function getTemplate();", "title": "" }, { "docid": "e5adeff31203aed54decae2762f9f0ab", "score": "0.7634828", "text": "public function getTemplate();", "title": "" }, { "docid": "e5adeff31203aed54decae2762f9f0ab", "score": "0.7634828", "text": "public function getTemplate();", "title": "" }, { "docid": "e5adeff31203aed54decae2762f9f0ab", "score": "0.7634828", "text": "public function getTemplate();", "title": "" }, { "docid": "e5adeff31203aed54decae2762f9f0ab", "score": "0.7634828", "text": "public function getTemplate();", "title": "" }, { "docid": "e5adeff31203aed54decae2762f9f0ab", "score": "0.7634828", "text": "public function getTemplate();", "title": "" }, { "docid": "2561d91c0a97582df31a1e9434eea709", "score": "0.76006716", "text": "public function getTemplate() {}", "title": "" }, { "docid": "390d2e230e69783cf8bf81045fb3c883", "score": "0.75207114", "text": "private function _getCurrentTemplateContent() {\n $page = Application_Model_Mappers_PageMapper::getInstance()->find($this->_toasterData['id']);\n $tempate = Application_Model_Mappers_TemplateMapper::getInstance()->find($page->getTemplateId());\n if(!$tempate instanceof Application_Model_Models_Template) {\n return false;\n }\n return $tempate->getContent();\n }", "title": "" }, { "docid": "fa73703626a56f99e31effe86b692bdc", "score": "0.7440162", "text": "protected function content_template() {}", "title": "" }, { "docid": "fa73703626a56f99e31effe86b692bdc", "score": "0.7440162", "text": "protected function content_template() {}", "title": "" }, { "docid": "432f7b8014b9af9feabb8a3fb213c116", "score": "0.73381305", "text": "function getTemplate(){\n\t\treturn $this->html_result;\n\t}", "title": "" }, { "docid": "47daedce95e3a64a359aba57a3d396d8", "score": "0.7289675", "text": "public function get_template()\n {\n }", "title": "" }, { "docid": "47daedce95e3a64a359aba57a3d396d8", "score": "0.72892076", "text": "public function get_template()\n {\n }", "title": "" }, { "docid": "52f7ad904ff6b5f885207c209a36435d", "score": "0.728628", "text": "abstract public function getTemplate();", "title": "" }, { "docid": "37ee7be190f8483365462c7905c0852f", "score": "0.7254381", "text": "function getTemplate();", "title": "" }, { "docid": "d54fff0e085bf71ef0489991644c3820", "score": "0.7253179", "text": "public function getContent()\n {\n if ($this->timestamp) {\n return '';\n }\n throw new Smarty_Exception(\"Unable to read template {$this->type} '{$this->name}'\");\n }", "title": "" }, { "docid": "6df919052fe006585886ac833b7908b8", "score": "0.7234798", "text": "public function getHtmlTemplate() {}", "title": "" }, { "docid": "8c8eb0d5e919360aeec72f32becf9bb4", "score": "0.7213131", "text": "public function get_content_html()\n {\n\n ob_start();\n RP_SUB_Help::include_template($this->template_html, array_merge($this->template_variables, array('plain_text' => false)));\n return ob_get_clean();\n }", "title": "" }, { "docid": "c1fd49614377ec685d7d75eee9736bbc", "score": "0.72127414", "text": "public function getParsedContent()\n {\n return oxUtilsView::getInstance()->parseThroughSmarty( $this->getContent()->oxcontents__oxcontent->value, $this->getContent()->getId() );\n }", "title": "" }, { "docid": "d0d000e2a9a10abc4f4c52dc1a618f50", "score": "0.7208875", "text": "public function processaTemplate() {\n return $this->fetch('ricerca_'.$this->_layout.'.tpl');\n }", "title": "" }, { "docid": "7251cb7f9a6add5a8531ad6743d3e18d", "score": "0.71740913", "text": "public function actionGetTemplate(){\n $post = Yii::$app->getRequest()->post();\n echo file_get_contents(dirname(\\Yii::getAlias('@webroot')).'/frontend/views/templates/'.$post['template']);\n }", "title": "" }, { "docid": "f3a27eea3c0ceab01273b0aee79cf984", "score": "0.7120679", "text": "protected function _content_template() {\n \n }", "title": "" }, { "docid": "8856a6ad9c8bef095c2e3ce986f55591", "score": "0.711447", "text": "function get_template()\n {\n }", "title": "" }, { "docid": "96fa2ac0a694e854a9e7d45c6316965c", "score": "0.7108538", "text": "public function getParsedContent()\n {\n /** @var oxUtilsView $oUtilsView */\n $oUtilsView = oxRegistry::get(\"oxUtilsView\");\n return $oUtilsView->parseThroughSmarty($this->getContent()->oxcontents__oxcontent->value, $this->getContent()->getId(), null, true);\n }", "title": "" }, { "docid": "8060a6427516f74726c7262d5eaf5322", "score": "0.7101155", "text": "public function generateContents()\n {\n ob_start();\n include $this->getTemplateFile();\n $output = ob_get_contents();\n ob_end_clean();\n return $output;\n }", "title": "" }, { "docid": "36d07bf6879de7275a3ef9e9e729a4fc", "score": "0.7076856", "text": "public function content_template()\n {\n }", "title": "" }, { "docid": "36d07bf6879de7275a3ef9e9e729a4fc", "score": "0.7076856", "text": "public function content_template()\n {\n }", "title": "" }, { "docid": "36d07bf6879de7275a3ef9e9e729a4fc", "score": "0.7076856", "text": "public function content_template()\n {\n }", "title": "" }, { "docid": "36d07bf6879de7275a3ef9e9e729a4fc", "score": "0.7076856", "text": "public function content_template()\n {\n }", "title": "" }, { "docid": "36d07bf6879de7275a3ef9e9e729a4fc", "score": "0.7076856", "text": "public function content_template()\n {\n }", "title": "" }, { "docid": "36d07bf6879de7275a3ef9e9e729a4fc", "score": "0.7076856", "text": "public function content_template()\n {\n }", "title": "" }, { "docid": "36d07bf6879de7275a3ef9e9e729a4fc", "score": "0.7076856", "text": "public function content_template()\n {\n }", "title": "" }, { "docid": "36d07bf6879de7275a3ef9e9e729a4fc", "score": "0.7076856", "text": "public function content_template()\n {\n }", "title": "" }, { "docid": "36d07bf6879de7275a3ef9e9e729a4fc", "score": "0.7076856", "text": "public function content_template()\n {\n }", "title": "" }, { "docid": "36d07bf6879de7275a3ef9e9e729a4fc", "score": "0.7076856", "text": "public function content_template()\n {\n }", "title": "" }, { "docid": "01e46e0e1d1d60fe9e6d92b0f822d402", "score": "0.70669174", "text": "public function loadTemplate()\n {\n return json_decode(file_get_contents(app_path(self::BASE_TEMPLATE_PATH)), true);\n }", "title": "" }, { "docid": "1e3a84491184ef57915fc61aa4944752", "score": "0.7047691", "text": "public function processaTemplate() {\n return $this->fetch('partita_'.$this->_layout.'.tpl');\n }", "title": "" }, { "docid": "0c2271782559c388a8b85ac936d07a69", "score": "0.7045147", "text": "protected function content_template()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "68905e05a95e2da0cce0df2ff2972d46", "score": "0.7040192", "text": "protected function content_template() {\n\t}", "title": "" }, { "docid": "dc68b5e54e12ce50a2d9e220f126b984", "score": "0.7026963", "text": "public function getContentPageTpl()\n {\n $aTemplate = array();\n $sContentId = $this->getContent()->oxcontents__oxloadid->value;\n $myConfig = $this->getConfig();\n if ($sContentId == $myConfig->getConfigParam('sRDFaBusinessEntityLoc')) {\n $aTemplate[] = $this->_sBusinessTemplate;\n }\n if ($sContentId == $myConfig->getConfigParam('sRDFaDeliveryChargeSpecLoc')) {\n $aTemplate[] = $this->_sDeliveryTemplate;\n }\n if ($sContentId == $myConfig->getConfigParam('sRDFaPaymentChargeSpecLoc')) {\n $aTemplate[] = $this->_sPaymentTemplate;\n }\n\n return $aTemplate;\n }", "title": "" }, { "docid": "5de0203771483dc376ec4e201d16c88f", "score": "0.7012999", "text": "protected function content_template()\n {\n }", "title": "" }, { "docid": "5de0203771483dc376ec4e201d16c88f", "score": "0.7012999", "text": "protected function content_template()\n {\n }", "title": "" }, { "docid": "5de0203771483dc376ec4e201d16c88f", "score": "0.7012999", "text": "protected function content_template()\n {\n }", "title": "" }, { "docid": "5de0203771483dc376ec4e201d16c88f", "score": "0.7012999", "text": "protected function content_template()\n {\n }", "title": "" }, { "docid": "5de0203771483dc376ec4e201d16c88f", "score": "0.7012999", "text": "protected function content_template()\n {\n }", "title": "" }, { "docid": "5de0203771483dc376ec4e201d16c88f", "score": "0.7012999", "text": "protected function content_template()\n {\n }", "title": "" }, { "docid": "37e1b04cc1e9cd6b93ccbf5e752a9eae", "score": "0.6990214", "text": "public function get_content_plain()\n {\n\n ob_start();\n RP_SUB_Help::include_template($this->template_plain, array_merge($this->template_variables, array('plain_text' => true)));\n return ob_get_clean();\n }", "title": "" }, { "docid": "dd7f12727c162b7a39c3fc48b4d2b2bc", "score": "0.69362754", "text": "protected function _content_template() {\n\t}", "title": "" }, { "docid": "1491bae0fff23e8153c9e5af6cccf43e", "score": "0.6928831", "text": "protected function _content_template()\n {\n\n }", "title": "" }, { "docid": "e259001c823b4c88da90bd1ee2da8e7e", "score": "0.69251746", "text": "private function __content()\n {\n $layoutContent = $this->__layoutContent();\n\n $content = str_replace('{{ content }}', $fileContent, $layoutContent);\n\n return $content;\n }", "title": "" }, { "docid": "abefa3aac70e181670f5feb88c65a4e5", "score": "0.6921668", "text": "protected function _content_template() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore\n\t\t$this->content_template();\n\t}", "title": "" }, { "docid": "805838102f17d5b7474569f498996f76", "score": "0.69210887", "text": "public function getTemplate(): string;", "title": "" }, { "docid": "805838102f17d5b7474569f498996f76", "score": "0.69210887", "text": "public function getTemplate(): string;", "title": "" }, { "docid": "805838102f17d5b7474569f498996f76", "score": "0.69210887", "text": "public function getTemplate(): string;", "title": "" }, { "docid": "805838102f17d5b7474569f498996f76", "score": "0.69210887", "text": "public function getTemplate(): string;", "title": "" }, { "docid": "04fce2205d6acb1ccf33d02e6139d08a", "score": "0.6919167", "text": "function get_content() {\r\n\t\treturn $this->content;\r\n\t}", "title": "" }, { "docid": "4ca09ad54fd45ac027524de96aa86b6b", "score": "0.68985605", "text": "protected function _content_template() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore \n\t\t$this->content_template();\n\t}", "title": "" }, { "docid": "7910366205f9ff509bec1120d412b843", "score": "0.68969995", "text": "public function getContents($noWrapper=0){\n\t\t$res=\"\";\n\t\t$content=$this->smarty->fetch($this->templateFile);\n\t\tif ($noWrapper) {\n\t\t\t$res=$content;\n\t\t} else {\n\t\t\tif ($this->_wrapperDir){\n\t\t\t\t$wrapper=$this->_wrapperDir . \"/\" . $this->_wrapper . \".html\";\n\t\t\t} else {\n\t\t\t\t$wrapper=$this->smarty->template_dir . \"/\" . $this->_wrapper . \".html\";\n\t\t\t}\n\t\t\t$this->smarty->clearCache($wrapper);\n\t\t\t$this->set(\"content\", $content);\n\t\t\t$res=$this->smarty->fetch($wrapper);\n\t\t\t//$this->renderInWrapper();\n\t\t}\n\t\treturn $res;\n\t\t\n\t}", "title": "" }, { "docid": "58fa7c123d1ec8aa77d197c25e294fc7", "score": "0.6868645", "text": "public function renderTemplate();", "title": "" }, { "docid": "d4449df9709b09a6c80a6032b3b7c246", "score": "0.6864847", "text": "public function getContent(){\n return $this->getPage();\n }", "title": "" }, { "docid": "41a4badf3cd02608ccfe84057e66931c", "score": "0.68615186", "text": "public function get_content()\n\t\t{\n\t\t\tif (!$this->is_cached()) {\n\t\t\t\t$this->load();\n\t\t\t}\n\n\t\t\treturn $this->content;\n\t\t}", "title": "" }, { "docid": "3ed5c2fdbb567361c788991e6912b855", "score": "0.6853494", "text": "public function get_content() {\n $event = Event::factory('response.get_content', array('content' => $this->_content))->notify_all();\n $data = $event->get_data();\n return $data['content'];\n }", "title": "" }, { "docid": "43bd18a167eeb3cc481a3b64ce8816c2", "score": "0.6844684", "text": "public function content()\n {\n return $this->cache->get('content');\n }", "title": "" }, { "docid": "04404e4eb0efe91e7ccd31ee41c6823e", "score": "0.68398154", "text": "public function getContent()\n {\n return $this->get(self::_CONTENT);\n }", "title": "" }, { "docid": "04404e4eb0efe91e7ccd31ee41c6823e", "score": "0.68398154", "text": "public function getContent()\n {\n return $this->get(self::_CONTENT);\n }", "title": "" }, { "docid": "04404e4eb0efe91e7ccd31ee41c6823e", "score": "0.68398154", "text": "public function getContent()\n {\n return $this->get(self::_CONTENT);\n }", "title": "" }, { "docid": "c9d0f1cf45d8644cbc0ad62cd24e2dd7", "score": "0.6808413", "text": "public function getTemplateContent($model){\n\t\t$templateContent = '';\n\t\t//$io->streamClose();\n\t\t\n\t\t$fields = $this->getModel('MGS\\Acm\\Model\\Field')\n\t\t\t->getCollection()\n\t\t\t->addFieldToFilter('acm_type_id', $model->getId())\t\n\t\t\t->addFieldToFilter('type', ['nin'=>['store', 'image', 'file']])\n\t\t\t->setOrder('position', 'ASC');\n\t\t\t\n\t\t$content = '';\n\t\tif(count($fields)>0){\n\t\t\tforeach($fields as $field){\n\t\t\t\t$templateContent .= '<p>{{trans \"'.$field->getTitle().': %'.$field->getIdentifier().'\" '.$field->getIdentifier().'=$data.'.$field->getIdentifier().'}}</p>'.\"\\n\";\n\t\t\t}\n\t\t}\n\t\t//$templateContent = str_replace('{{template_email_content}}', $content, $templateContent);\n\t\treturn $templateContent;\n\t}", "title": "" }, { "docid": "d3a3a2c3143a2d4dec79cd06e84332f3", "score": "0.68079704", "text": "public function getTemplate(){\n\t\treturn $this->template;\n\t}", "title": "" }, { "docid": "52791173baedb4fa7249909d4a72a767", "score": "0.679882", "text": "public function get_content() {\n if ($this->content !== null) {\n return $this->content;\n }\n\n $this->content = new stdClass;\n\n // get configured text if available\n if (! empty($this->config->text)) {\n $this->content->text = $this->config->text;\n }\n\n //$this->content->text = 'The content of our SimpleHTML block!';\n $this->content->footer = 'Goodbye for now...';\n\n return $this->content;\n\n }", "title": "" }, { "docid": "5e4e7b764c4430f85d2ed1ba01cae2cf", "score": "0.6789778", "text": "public function get_content_html() {\n\t\tob_start();\n\t\twc_get_template(\n\t\t\t$this->template_html,\n\t\t\tarray(\n\t\t\t\t'order' => $this->object,\n\t\t\t\t'email_heading' => $this->get_heading(),\n\t\t\t\t'voucher_count' => $this->object['voucher_count'],\n\t\t\t\t'message' => $this->message,\n\t\t\t\t'recipient_name' => $this->recipient_name,\n\t\t\t),\n\t\t\t'',\n\t\t\t$this->template_base\n\t\t);\n\t\treturn ob_get_clean();\n\t}", "title": "" }, { "docid": "0371ca7ac1755cf5e82ea084b0bb5a01", "score": "0.6779673", "text": "public function returnTemplate() {\n\t\treturn $this->template;\n\t}", "title": "" }, { "docid": "77c3d70173183c2b9bee71e429a17803", "score": "0.6763401", "text": "public function fetch($templateFile='',$content='',$prefix='') {\n if(empty($content)) {\n // Template file parsing tags\n tag('view_template',$templateFile);\n // Template file does not exist return directly\n if(!is_file($templateFile)) return NULL;\n }\n // Page cache\n ob_start();\n ob_implicit_flush(0);\n if('php' == strtolower(C('TMPL_ENGINE_TYPE'))) { // Using native PHP template\n // Template array variable decomposed into independent variable\n extract($this->tVar, EXTR_OVERWRITE);\n // PHP template loaded directly\n empty($content)?include $templateFile:eval('?>'.$content);\n }else{\n // View Resolution tab\n $params = array('var'=>$this->tVar,'file'=>$templateFile,'content'=>$content,'prefix'=>$prefix);\n tag('view_parse',$params);\n }\n // Obtain and empty the cache\n $content = ob_get_clean();\n // Content Filtering tab\n tag('view_filter',$content);\n // Output template file\n return $content;\n }", "title": "" }, { "docid": "7eeff713e4e4c800f01ece6e3cb66ecf", "score": "0.6734728", "text": "public function getTemplateData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "685527eef2a9d45433ee3dd5caa0acfd", "score": "0.6732333", "text": "protected function getDocumentTemplate() {}", "title": "" }, { "docid": "685527eef2a9d45433ee3dd5caa0acfd", "score": "0.6732333", "text": "protected function getDocumentTemplate() {}", "title": "" }, { "docid": "685527eef2a9d45433ee3dd5caa0acfd", "score": "0.6731877", "text": "protected function getDocumentTemplate() {}", "title": "" }, { "docid": "685527eef2a9d45433ee3dd5caa0acfd", "score": "0.6731734", "text": "protected function getDocumentTemplate() {}", "title": "" }, { "docid": "685527eef2a9d45433ee3dd5caa0acfd", "score": "0.6731734", "text": "protected function getDocumentTemplate() {}", "title": "" }, { "docid": "685527eef2a9d45433ee3dd5caa0acfd", "score": "0.6731734", "text": "protected function getDocumentTemplate() {}", "title": "" }, { "docid": "685527eef2a9d45433ee3dd5caa0acfd", "score": "0.6731734", "text": "protected function getDocumentTemplate() {}", "title": "" }, { "docid": "36d7243dc0cae60f98052a47a102a4c5", "score": "0.67305803", "text": "public function get_template() {\n return $this->_template;\n }", "title": "" }, { "docid": "685527eef2a9d45433ee3dd5caa0acfd", "score": "0.6729226", "text": "protected function getDocumentTemplate() {}", "title": "" }, { "docid": "685527eef2a9d45433ee3dd5caa0acfd", "score": "0.6729226", "text": "protected function getDocumentTemplate() {}", "title": "" }, { "docid": "f9ab6b422789742853dc87b59f4ff368", "score": "0.66953725", "text": "public function get_content() {\n return $this->content;\n }", "title": "" }, { "docid": "dad113c0c403ec6dfb23c9ab0dfb452f", "score": "0.668183", "text": "function Get($template)\r\n\t{\r\n\t\t$this->template = $template;\r\n\t\t$this->out = \"\";\r\n\t\tif (!file_exists($template)) { trigger_error(\"Template not found (\" . $template . \")\", E_USER_ERROR); return NULL; }\r\n\t\t$parser = xml_parser_create_ns();\r\n\t\t$data = array();\r\n\t\t$index = array();\r\n\t\txml_set_object($parser, $this);\r\n\t\txml_set_element_handler($parser, \"Start_Tag\", \"End_Tag\");\r\n\t\txml_set_character_data_handler($parser, \"CData\");\r\n \t\txml_set_default_handler($parser, \"CData\");\r\n \t\txml_set_processing_instruction_handler($parser, \"Process\");\r\n\r\n\t\t$lines = file($template);\r\n\t\tforeach ($lines as $line)\r\n\t\t{\r\n\t\t\tif (!xml_parse($parser, $line))\r\n\t\t\t{\r\n\t\t\t\techo \"XML Error: \" . xml_error_string(xml_get_error_code($parser)) .\r\n\t\t\t\t\" on line \" . xml_get_current_line_number($parser) .\r\n\t\t\t\t\" of file \" . $template . \"<br/>\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\t\txml_parser_free($parser);\r\n\t\treturn preg_replace_callback(\"/\\{{([^}]+)\\}}/\", array($this, \"parse_vars\"), $this->out);\r\n\t}", "title": "" }, { "docid": "87d6f5f7652381457f90e601e21ca314", "score": "0.6660196", "text": "public function getTemplate()\n {\n return $this->template;\n }", "title": "" }, { "docid": "87d6f5f7652381457f90e601e21ca314", "score": "0.6660196", "text": "public function getTemplate()\n {\n return $this->template;\n }", "title": "" }, { "docid": "87d6f5f7652381457f90e601e21ca314", "score": "0.6660196", "text": "public function getTemplate()\n {\n return $this->template;\n }", "title": "" }, { "docid": "87d6f5f7652381457f90e601e21ca314", "score": "0.6660196", "text": "public function getTemplate()\n {\n return $this->template;\n }", "title": "" }, { "docid": "87d6f5f7652381457f90e601e21ca314", "score": "0.6660196", "text": "public function getTemplate()\n {\n return $this->template;\n }", "title": "" }, { "docid": "87d6f5f7652381457f90e601e21ca314", "score": "0.6660196", "text": "public function getTemplate()\n {\n return $this->template;\n }", "title": "" }, { "docid": "87d6f5f7652381457f90e601e21ca314", "score": "0.6660196", "text": "public function getTemplate()\n {\n return $this->template;\n }", "title": "" }, { "docid": "87d6f5f7652381457f90e601e21ca314", "score": "0.6660196", "text": "public function getTemplate()\n {\n return $this->template;\n }", "title": "" }, { "docid": "87d6f5f7652381457f90e601e21ca314", "score": "0.6660196", "text": "public function getTemplate()\n {\n return $this->template;\n }", "title": "" }, { "docid": "87d6f5f7652381457f90e601e21ca314", "score": "0.6660196", "text": "public function getTemplate()\n {\n return $this->template;\n }", "title": "" }, { "docid": "87d6f5f7652381457f90e601e21ca314", "score": "0.6660196", "text": "public function getTemplate()\n {\n return $this->template;\n }", "title": "" }, { "docid": "87d6f5f7652381457f90e601e21ca314", "score": "0.6660196", "text": "public function getTemplate()\n {\n return $this->template;\n }", "title": "" }, { "docid": "87d6f5f7652381457f90e601e21ca314", "score": "0.6660196", "text": "public function getTemplate()\n {\n return $this->template;\n }", "title": "" }, { "docid": "bae68cf9898eeaecac61d0a0f833b406", "score": "0.6657593", "text": "function getTemplate( $page ) \n {\n $contents = '';\n \n $fileName = $page->getBLTemplateName();\n \n $pathToTemplates = $this->values[ ModuleCreator::KEY_PATH_RAD_ROOT ];\n $pathToTemplates .= 'data/'.ModuleCreator::PATH_OBJECT_BL;\n \n $contents = file_get_contents( $pathToTemplates.$fileName );\n \n return $contents;\n }", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "cc5a3b813240fa26c9ca94a77af443cf", "score": "0.0", "text": "public function show($id)\n {\n $data = Workplace::find($id);\n return response()->json([\n 'code' => 200,\n 'data' => $data\n ]);\n }", "title": "" } ]
[ { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.8190437", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.8190437", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "4a213f970d44ae570e7f216941006306", "score": "0.7264416", "text": "public function setting_show_resource($resource,$resourceFile)\n {\n echo $this->_template_url . '/'.$resource.'/'.$resourceFile;\n }", "title": "" }, { "docid": "fb1ffd800184a0a42701459345c41281", "score": "0.6991857", "text": "public function show(Resource $resource)\n {\n Gate::authorize('view', $resource);\n\n return $resource;\n }", "title": "" }, { "docid": "8e9fe6c0081f8ce768620060cccb65f3", "score": "0.68753964", "text": "public function show($param)\n {\n $resource = Resource::with('tags', 'likesCount', 'user', 'category')\n ->where('id', $param)\n ->orWhere('slug', $param)\n ->firstOrFail();\n\n $initialState = [\n 'resource' => $resource,\n 'currentUser' => Auth::user()\n ];\n\n return response()->view('public.resource', [\n 'appName' => 'resource',\n 'pageName' => $resource->title,\n 'initialState' => $initialState\n ]);\n }", "title": "" }, { "docid": "48b397ea8942d2fa9785a3e43388943e", "score": "0.6725769", "text": "public function show($id)\n\t{\n\t\t$resource = Resource::with('UserResourceLink')->find($id);\n\t\treturn View::make('resources.show')->with('resource', $resource);\n\t}", "title": "" }, { "docid": "2c30b4b167b469c3db298602e7ead28d", "score": "0.6711636", "text": "private function display_item($resource, $item) {\n\t\t$db = $this->db($resource);\n\t\t$item = $db->get($item);\n\n\t\tif ($item) {\n\t\t\t echo json_encode($item);\n\t\t} else {\n\t header('HTTP/1.1 404 Not Found');\n\t }\n\t}", "title": "" }, { "docid": "95bf452408be21abf4a83c19b8bbd6fb", "score": "0.667411", "text": "public function show(string $resource, $id)\n {\n return Jory::byUri($resource)->find($id);\n }", "title": "" }, { "docid": "cd76a0fc79013f2dbdd01b09770768ec", "score": "0.6580917", "text": "public function show($id)\n {\n // $resource = Resource ::find($id);\n // return view('Resource.resource')->with('resource',$resource);\n }", "title": "" }, { "docid": "39dabc4dde3ba3c708fb3782a17fde5c", "score": "0.6434556", "text": "function show( $resource ){\n $product = get( 'products', $resource );\n\n return view( 'admin/product/view_product', compact( 'product' ) );\n}", "title": "" }, { "docid": "0d9d138ae5e21142d7d77d5c45711a1c", "score": "0.6386195", "text": "public function displayAction()\r\n\t{\r\n\t\t// set filters and validators for GET input\r\n\t\t$filters = array(\r\n 'id' => array('HtmlEntities', 'StripTags', 'StringTrim')\r\n\t\t);\r\n\t\t$validators = array(\r\n 'id' => array('NotEmpty', 'Int')\r\n\t\t);\r\n\t\t$input = new Zend_Filter_Input($filters, $validators);\r\n\t\t$input->setData($this->getRequest()->getParams());\r\n\r\n\t\t// test if input is valid\r\n\t\t// retrieve requested record\r\n\t\t// attach to view\r\n\t\tif ($input->isValid()) {\r\n\t\t\t$q = Doctrine_Query::create()\r\n\t\t\t->from('Webteam_Model_Video i')\r\n\t\t\t->where('i.VideoID = ?', $input->id);\r\n\t\t\t$result = $q->fetchArray();\r\n\t\t\tif (count($result) == 1) {\r\n\t\t\t\t$this->view->item = $result[0];\r\n\t\t\t} else {\r\n\t\t\t\tthrow new Zend_Controller_Action_Exception('Page not found', 404);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tthrow new Zend_Controller_Action_Exception('Invalid input');\r\n\t\t}\r\n\r\n\r\n\r\n\r\n\t}", "title": "" }, { "docid": "43c7d44dab00c2107caa033394e76a4e", "score": "0.6370414", "text": "public function display($spec = null)\n {\n $response = $this->fetch($spec);\n $response->display();\n }", "title": "" }, { "docid": "2c8806a4c1933c4361ab0e84ba707311", "score": "0.6274676", "text": "public function show()\n {\n $this->beginAction('show');\n $this->getResource();\n $this->applyHooks(AuthorizeResource::class);\n $this->formatResource();\n\n return $this->makeResponse();\n }", "title": "" }, { "docid": "f99807bc50ee366a325d9c40a162d254", "score": "0.62724066", "text": "public function actionGetInfoResource()\n\t{\n\t\t//die (print_r($_POST));\n\t\t$resource = Yii::app()->db->createCommand()->select('*')->from('ki_resource')\n\t\t\t\t\t\t\t\t->where('lang=:lang AND id=:id', array(':lang' => 'ru_ru', ':id' => $_POST['id']))\n\t\t\t\t\t\t\t\t->queryRow();\n\t\t\n\t\techo $this->renderPartial('_resourceInfo', array('resource' => $resource), true);\n\t}", "title": "" }, { "docid": "c8d2320b9dba46b7850ea9a25da02fad", "score": "0.61858386", "text": "public function viewResource($id)\n {\n $resource = carrierResource::where('resource_id',$id)->get();\n $carrierDetailUserID = carrierResource::where('resource_id',$id)->value('user_id');\n $carrierDetail = carrierDetail::where('user_id',$carrierDetailUserID)->get();\n return view ('resources.resourceDetails', ['resource'=>$resource, 'carrierDetail'=>$carrierDetail]);\n }", "title": "" }, { "docid": "d2e2e944df863de5f56668d68b5f0002", "score": "0.6169535", "text": "public function singleResource(Resource $resource)\n {\n if($resource->resource_status !== 'published')\n abort(404);\n $resource->increment('views');\n \n if (Auth::user()) {\n $userRourceVisit = UserRourceVisit::where('resource_id', $resource->id)->where('user_id', Auth::user()->id)->whereDate('created_at', Carbon::today())->first();\n if (blank($userRourceVisit)) {\n UserRourceVisit::create(['resource_id' => $resource->id, 'user_id' => Auth::user()->id]);\n }\n }\n\n $relatedResources = $this->resourceModel->relatedResources($resource);\n $resources = $this->resourceModel->getResourceByUserId($resource->user_id);\n\n return view('single-resource')\n ->withResource($resource)\n ->withRelated($relatedResources)\n ->withResources($resources);\n }", "title": "" }, { "docid": "f54a56f5688812ff54db4ce8c7ee9e8a", "score": "0.6088493", "text": "public function showAction($id)\n {\n $requestParameterHandler = $this->getRequestParameterHandler();\n $singleResourceRequestHandler = $this->get(self::SINGLE_RESOURCE_HANDLER);\n // TODO ADD Check if the user have authorisation before proceeding from the request.\n\n $resource = $singleResourceRequestHandler->process($id);\n\n if (null !== $resource) {\n $deleteFormView = $this->createDeleteForm(\n $requestParameterHandler\n );\n\n return $this->render(\n $requestParameterHandler->getThemePath(),\n array(\n $requestParameterHandler->getResourceViewName() => $resource,\n 'delete_form' => $deleteFormView,\n )\n );\n }\n // Add a message if the does't not exist.\n throw $this->createNotFoundException(sprintf('The %s %d %s', $requestParameterHandler->getResourceName(), $id, self::NOT_FOUND));\n }", "title": "" }, { "docid": "eb5ce2e515c2c4b1d34c71d116115e47", "score": "0.60823214", "text": "public function getResource($resource);", "title": "" }, { "docid": "ed3d20317cbecdf072f7b882feb64335", "score": "0.6073599", "text": "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Rack ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found',null,true);\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "title": "" }, { "docid": "1f19b3abcb62dd0bf36e4cc2e2e9a4b3", "score": "0.60681057", "text": "public function details($request, $response, $args) {\n $resource_id = $args['id'];\n $resource_details = $this->resource_gateway->get_resource_details($resource_id);\n\n return $this->view->render($response, 'resource/details.html.twig', [\n 'id' => $resource_id,\n 'resource_details' => $resource_details,\n ]);\n }", "title": "" }, { "docid": "c09849a3051e163c36ba622c042416dd", "score": "0.60172373", "text": "public function show($id)\n {\n $resource = $this->model::findOrFail($id);\n\n if (view()->exists($this->basicViewFolder . '.show')) {\n if (request()->ajax()) {\n return view($this->basicViewFolder . '.show', compact('resource'))->render();\n } else {\n return view($this->basicViewFolder . '.show', compact('resource'));\n }\n }\n\n return \" the view \" . $this->basicViewFolder . \".show not found\";\n }", "title": "" }, { "docid": "886db488fd45282953d62e88f2c58889", "score": "0.60164165", "text": "public function showAction($id) {\r\n\r\n $remote = $this->getDoctrine()\r\n ->getRepository('RemotePadMainBundle:Remote')\r\n ->find($id);\r\n\r\n if (!$remote) {\r\n return new Response(\"No Remote found. id: \" . $id, 404);\r\n }\r\n\r\n return $this->render('RemotePadMainBundle:Remote:show.html.twig', array('remote' => $remote));\r\n }", "title": "" }, { "docid": "df63d689055cf5765df52fd5165e28e7", "score": "0.5990083", "text": "abstract function show($identifier);", "title": "" }, { "docid": "ddc28327288006b3d29c6bdc8761ca44", "score": "0.598783", "text": "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "title": "" }, { "docid": "599b6dc077c4d34a9b3b0b168003b106", "score": "0.5974851", "text": "public function viewResource($resourceController, $id) {\n $values = self::getData($resourceController->wrapper($id));\n $function = __FUNCTION__;\n drupal_alter('restws_response', $values, $function, $this->formatName);\n\n return $this->serialize($values);\n }", "title": "" }, { "docid": "e8033cfc300396ea61f2cce5539e61f9", "score": "0.5959599", "text": "public function show() {\n\t\t$this->getOutput()->disable();\n\n\t\ttry {\n\t\t\techo $this->ampRenderer->render( $this->getArticle() );\n\t\t}\n\t\tcatch ( RevisionNotFound $e ) {\n\t\t\t$response = $this->getRequest()->response();\n\t\t\t$response->statusHeader( 302 );\n\t\t\t$response->header( 'Location: ' . $this->getTitle()->getFullURL() );\n\t\t}\n\t}", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "9f057a9bec094dea20c158d2ab8094d7", "score": "0.5936922", "text": "public function show(HrmAssetInformation $asset)\n {\n //\n }", "title": "" }, { "docid": "bb2e29f5f05ab065358c99c7225d6dc0", "score": "0.59295714", "text": "public function show(rc $rc)\n {\n //\n }", "title": "" }, { "docid": "9f2521adfd0849eebb7acbb6e94d94a0", "score": "0.592653", "text": "public function show($id) // show a single record\n {\n //\n }", "title": "" }, { "docid": "c356495b91bbab48f9b27e5a5ce7089e", "score": "0.59247625", "text": "public function display()\n {\n if (!current_user_can($this->capability)) {\n wp_die(__('You do not have sufficient permissions to access this page.', $this->textDomain));\n }\n\n $this->view->render();\n }", "title": "" }, { "docid": "151fea634645ed45ca7e8eb127afba25", "score": "0.59127665", "text": "public function show(Resource $resource)\n {\n $now = new \\DateTime('now');\n $reservations = $resource->reservationsIn($now->format('m'));\n\n\n $event_list = [];\n foreach ($reservations as $key => $reservation) {\n $event_list[] = Calendar::event(\n $reservation->user->name,\n false,\n new \\DateTime($reservation->start_time),\n new \\DateTime($reservation->end_time),\n null\n );\n }\n\n $calendar_details = Calendar::addEvents($event_list);\n\n return view('GeneralViews.ResourcesViews.Calendar.view', compact('calendar_details'));\n }", "title": "" }, { "docid": "301defef90a746cf93478d6f4bfc5091", "score": "0.5905301", "text": "public function show($id)\n {\n $model = $this->resourceModel;\n return $model::find($id);\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "447c87b0b6a3806d4bab38780df02aa1", "score": "0.5881883", "text": "public function displayTask($rid=null, $version=null)\n\t{\n\t\t$this->view->setLayout('display');\n\n\t\t// Incoming\n\t\tif (!$rid)\n\t\t{\n\t\t\t$rid = Request::getInt('rid', 0);\n\t\t}\n\t\tif (!$version)\n\t\t{\n\t\t\t$version = Request::getString('version', 'dev');\n\t\t}\n\n\t\t// Ensure we have an ID to work with\n\t\tif (!$rid)\n\t\t{\n\t\t\tApp::abort(500, Lang::txt('COM_TOOLS_CONTRIBUTE_NO_ID'));\n\t\t\treturn;\n\t\t}\n\t\t// Get resource information\n\t\t$resource = Entry::oneOrFail($rid);\n\n\t\t// Get version id\n\t\t$objV = new \\Components\\Tools\\Tables\\Version($this->database);\n\t\t$vid = $objV->getVersionIdFromResource($rid, $version);\n\n\t\t// Do we have a published tool?\n\t\t$this->view->published = $objV->getCurrentVersionProperty($resource->alias, 'id');\n\n\t\t// Get screenshot information for this resource\n\t\t$this->view->shots = $resource->screenshots()\n\t\t\t->whereEquals('versionid', $vid)\n\t\t\t->ordered()\n\t\t\t->rows();\n\n\t\t// Build paths\n\t\t$path = $resource->relativepath();\n\t\t$this->view->upath = PATH_APP . DS . trim($this->rconfig->get('uploadpath'), DS) . $path;\n\t\t$this->view->wpath = DS . trim($this->rconfig->get('uploadpath'), DS) . $path;\n\t\tif ($vid)\n\t\t{\n\t\t\t$this->view->upath .= DS . $vid;\n\t\t\t$this->view->wpath .= DS . $vid;\n\t\t}\n\n\t\t// Make sure wpath is preceded by app\n\t\tif (substr($this->view->wpath, 0, 4) != DS . 'app')\n\t\t{\n\t\t\t$this->view->wpath = DS . 'app' . $this->view->wpath;\n\t\t}\n\n\t\t// get config\n\t\t$this->view->cparams = Component::params('com_resources');\n\t\t$this->view->version = $version;\n\t\t$this->view->rid = $rid;\n\n\t\tforeach ($this->getErrors() as $error)\n\t\t{\n\t\t\t$this->view->setError($error);\n\t\t}\n\n\t\t// Output HTML\n\t\t$this->view->display();\n\t}", "title": "" }, { "docid": "2d9ba0bfae0a8169414d51cb94341bff", "score": "0.58672357", "text": "public function displayDoc($resource_name, $cache_id=null, $compile_id=null, $parent = null)\n {\n $this->_smarty_vars['template'] = $resource_name; // Added so that the template name would be accessible within the outputfilter\n $this->fetchDoc($resource_name, $cache_id, $compile_id, $parent);\n }", "title": "" }, { "docid": "313cd42e65f168efe8cb0ed49ea30ce1", "score": "0.58634895", "text": "public function displayAction(){\n \n // set filters and validators for GET input\n $filters = array(\n 'id' => array(\n 'HtmlEntities', \n 'StripTags', \n 'StringTrim'\n )\n );\n \n $validators = array(\n 'id' => array(\n 'NotEmpty', \n 'Int'\n )\n );\n \n // Zend_Filter_Input can validate, filter and escape input.\n // retrieve requested record\n // attach to view\n $input = new Zend_Filter_Input($filters, $validators);\n \n $input->setData($this->getRequest()\n ->getParams());\n \n if($input->isValid()) {\n \n // create service\n $service = new Catalog_Service_ItemService();\n \n $stamp_item = $service->getDisplayableItemIfNotExpired($input->id);\n \n if(isset($stamp_item)) {\n \n $this->view->stamp_item = $stamp_item; // store the StampItem in\n // the view.\n \n } else { // entity not found\n \n throw new Zend_Controller_Action_Exception('Page not found', 404);\n }\n \n } else { // not valid input\n \n throw new Zend_Controller_Action_Exception('Invalid input');\n \n } // endif\n }", "title": "" }, { "docid": "18b1a953d7b4f38d94ba36d78e007c30", "score": "0.5862241", "text": "public function display() {\n require $this->layout;\n }", "title": "" }, { "docid": "f1c47ce6af2faf1f1d79c5449022ee8c", "score": "0.58610433", "text": "public function show($id) {\n return Resource::find($id);\n }", "title": "" }, { "docid": "5dc30ed0a3c41d7bf4354e7bfd2d3260", "score": "0.58572257", "text": "protected function addResourceShow($name, $base, $controller)\n\t{\n\t\t$uri = $this->getResourceUri($name).'/{'.$base.'}';\n\n\t\treturn $this->get($uri, $this->getResourceAction($name, $controller, 'show'));\n\t}", "title": "" }, { "docid": "a57eaaa12abdbabb675c82237206d780", "score": "0.58206403", "text": "public function displayResourceUsing(string $resource, callable $displayResourceCallback)\n {\n $this->displayResourceCallback[$resource] = $displayResourceCallback;\n\n return $this;\n }", "title": "" }, { "docid": "3133b3b1b52a90fd561fc5996432c0e7", "score": "0.58170664", "text": "public function show($id)\n {\n return $this->responseItem(['title' => 'Đây là resource show ' . $id]);\n }", "title": "" }, { "docid": "1b6934d948dba93be88f01d4f4cde49a", "score": "0.58158535", "text": "public function display($context);", "title": "" }, { "docid": "935c4042b3fe02e20c14c171b86ae1d7", "score": "0.5801874", "text": "public function shouldDisplayResource($resource)\n {\n return $this->metaValue('resources.'.$resource::uriKey());\n }", "title": "" }, { "docid": "0c7f3ae23b93225868fde0e649f535aa", "score": "0.57749224", "text": "public function show(ShowResourceRequest $request, $id)\n {\n }", "title": "" }, { "docid": "b5b132820f922eef4e644b41ff67adde", "score": "0.57740575", "text": "public function show($id)\n\t{\n\t\t// unneeded for this project\n\t}", "title": "" }, { "docid": "cdbe9eb27e47a619361449d5953ad429", "score": "0.57726145", "text": "public function display()\n {\n\n $this->component->display();\n }", "title": "" }, { "docid": "fbea10219f07495b19ed6548d4ede1a4", "score": "0.5764195", "text": "public function show($id)\n\t{\n\t\t// not supported\n\t}", "title": "" }, { "docid": "cb35029e70932874ca4a7420e41f6917", "score": "0.5749518", "text": "public function discoverAction()\n {\n $this->view->title .= ' - Avaliable Resource';\n\n $data = array_values($this->_findResource());\n\n $this->view->data = $data;\n }", "title": "" }, { "docid": "7aa11579ff48f6202a3402f35980a6d7", "score": "0.574863", "text": "public function show(RestRequestInterface $request, $identifier);", "title": "" }, { "docid": "7fb606c6d980259fc7bc2be7fb3892f7", "score": "0.57364357", "text": "public function display()\n \t{\n \t\techo $this->render();\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": "b5e7179ea7c94add1c1af50e9f9b7fdd", "score": "0.57208323", "text": "public function show($id)\n\t{\n\t\n\t}", "title": "" }, { "docid": "7b33ab8280dac7d9e7f301bb46885ef2", "score": "0.57203656", "text": "public function display($action, $status);", "title": "" }, { "docid": "7eca9a150b08650a78b0cbe2467767e8", "score": "0.5714993", "text": "public function show()\n {\n return view('redistask::show');\n }", "title": "" }, { "docid": "a4bb0929797f59b1f372c0ea97423933", "score": "0.5714916", "text": "public function show()\n {\n $product = $this->model('IndexModel')->get($this->getParam()['id']);\n\n $this->template('show', $product);\n }", "title": "" }, { "docid": "91b6c2566d39e03a0eef7bad0aebcd5a", "score": "0.5707991", "text": "public function detailsAction()\n {\n // Get id from url params and check if record exist\n $params = $this->router->getParams();\n if (isset($params[0]) && $device = Devices::findFirst($params[0])) {\n $this->tag->setTitle(__('Devices') . ' / ' . __('Details'));\n $this->view->setVars([\n 'device' => $device,\n ]);\n } else {\n parent::notFoundAction();\n }\n }", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.57057405", "text": "public abstract function display();", "title": "" }, { "docid": "95c8e483ffde08b500f0a18be5d683d2", "score": "0.5704582", "text": "public function display() {\n\t$this->getRenderer()->dispatch($this);\n\n }", "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": "d49f4e51972ac93263ce45277638f862", "score": "0.56985086", "text": "public function show($id) {\n\t\t\t\n\t}", "title": "" }, { "docid": "7b283ba1c0546a155efc95a44dd0f9cf", "score": "0.56981397", "text": "public function show(Response $response)\n {\n //\n }", "title": "" }, { "docid": "2204f8d554d9525d60e0aba235700bfd", "score": "0.56858474", "text": "public function locate($resource);", "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": "" }, { "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": "" } ]
af8737c5051da7e101a9d34cbb58eed4
Check if role is admin
[ { "docid": "33733a493ed18f28174411752cf901e7", "score": "0.7862258", "text": "public static function checkRole()\n\t{\n\t\treturn Role::getAdminRole();\n\t}", "title": "" } ]
[ { "docid": "ba1386d287042fc7751fa8dad6981002", "score": "0.86470884", "text": "public function isAdmin()\n {\n return $this->role === 'admin';\n }", "title": "" }, { "docid": "ba1386d287042fc7751fa8dad6981002", "score": "0.86470884", "text": "public function isAdmin()\n {\n return $this->role === 'admin';\n }", "title": "" }, { "docid": "ba1386d287042fc7751fa8dad6981002", "score": "0.86470884", "text": "public function isAdmin()\n {\n return $this->role === 'admin';\n }", "title": "" }, { "docid": "01eb598ef288fc50a87471f882baa0a3", "score": "0.8636493", "text": "public function isAdmin()\n {\n return $this->role->description == 'Administrator';\n }", "title": "" }, { "docid": "3d0ac149f7fceaf8bc9898cfc2df3ce1", "score": "0.8611121", "text": "public function isAdmin() {\n \n return $this->role == 'admin';\n }", "title": "" }, { "docid": "5e0bcc9025e3cebacef782b0dc6a3e16", "score": "0.86006117", "text": "public function isAdmin()\n {\n return $this->role == 'admin';\n }", "title": "" }, { "docid": "54c116d81d96982a868e3249e0165252", "score": "0.85616046", "text": "private function checkAdmin()\n {\n return $this->session->get('role') === 'admin' ? 1 : 0;\n }", "title": "" }, { "docid": "08dc646f177e252cea0fd5a9cc9ae6c8", "score": "0.8555619", "text": "public function isAdmin()\n {\n return strtolower($this->role->title) === strtolower('Admin');\n }", "title": "" }, { "docid": "28cfa9311e1e514fc480f0b69746ca94", "score": "0.8539563", "text": "function isAdmin() {\n if ($this->getUserField('role') == 'admin')\n return true;\n else\n return false;\n }", "title": "" }, { "docid": "492541645cda8065f25b1eaf3611e52c", "score": "0.8538342", "text": "public function is_admin()\n {\n $role = $this->role;\n if ($role == 'admin') {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "68cab700fa76bf6de3103fc125d8fa74", "score": "0.85258985", "text": "public function IsAdmin(){\n if ($this->userrole->id == '1') {\n return true;\n }\n return false;\n\n }", "title": "" }, { "docid": "f61ab05088140d845784802feb188c7b", "score": "0.8472719", "text": "public function isAdmin(){\n if($this->roles()->first()->name === \"Admin\"){\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "e1d3ba1f22ee9e1a837530424256b858", "score": "0.8409644", "text": "public function is_admin()\r\n {\r\n if (strtolower($this->role) == ADMIN_ROLE) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }", "title": "" }, { "docid": "26c6eac02cd283d6d98368eaf87660d8", "score": "0.83974004", "text": "function isAdmin() {\n\t\tif ($this->role == 1) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "e7a82825a94c4d351d8c17cf2b10387e", "score": "0.8395818", "text": "public function isAdmin()\n {\n return $this->role === self::ROLE_ADMIN;\n }", "title": "" }, { "docid": "8626c0c7cc8458b2cf33c7a409bf95a3", "score": "0.8386215", "text": "public function isAdmin(): bool\n {\n return $this->name === Urp::ROLE_ADMIN;\n }", "title": "" }, { "docid": "156bd2536762659ba140c52154930bdf", "score": "0.8380307", "text": "function is_admin() {\n return is_role('admin');\n}", "title": "" }, { "docid": "b74a57ea6e5decf5b9b162a9fe64abde", "score": "0.83556837", "text": "public function isAdmin()\n {\n if ($this->role === 1) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "a353a016711bc32c9b7b5093d3c589fc", "score": "0.8352888", "text": "function isAdmin(){\n global $ep_user;\n if(isAuthenticated()) return \"ROLE_ADMIN\" !== $ep_user[\"role\"];\n return false;\n}", "title": "" }, { "docid": "44ae213611ce0575dbb675f53dc00036", "score": "0.83347076", "text": "function isAdmin() {\n $user = $this->loadUser(Yii::app()->user->id);\n return intval($user->role) == 0;\n }", "title": "" }, { "docid": "47037af7ba308048875b97465f27b6b7", "score": "0.83311397", "text": "public function admin(){\n\n return $this->hasRole('admin');\n\n }", "title": "" }, { "docid": "20727e8a5e9babe72d6f6eb854dc53e1", "score": "0.8289698", "text": "function isAdmin()\n {\n if($this->role != ROLE_ADMIN) { return true; }\n else {return false; }\n }", "title": "" }, { "docid": "cec126a88f13ec7413d1337f179201c1", "score": "0.8272625", "text": "public function isAdmin(): bool\n {\n return $this->role === Role::ADMIN;\n }", "title": "" }, { "docid": "0894d26df4242529526ab26f8d8e49b6", "score": "0.8268703", "text": "function isAdmin(){\r\n\t\t$user = $this->loadUser();\r\n\t\tif ($user)\r\n\t\t\treturn $user->role_id==1;\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "29f33d81b148fbc5ecae653bab14dacb", "score": "0.8261558", "text": "public function isAdmin()\n {\n return $this->role == self::ROLE_ADMIN ? true : false;\n }", "title": "" }, { "docid": "5c7262e3501897f2590352bc9ee72e35", "score": "0.8202545", "text": "private function isAdmin()\n {\n return (auth()->user()->roles->first()['name'] == 'admin')? true : false;\n }", "title": "" }, { "docid": "7193736b6fb13c0b103870bb466f2c37", "score": "0.8199705", "text": "public function isAdmin() {\n\t\treturn $this->role->isAdmin();\n\t}", "title": "" }, { "docid": "ee61d76bcaae5d419937c14f00eac335", "score": "0.81779", "text": "public function isAdmin()\n {\n return $this->hasRole('admin');\n }", "title": "" }, { "docid": "76494e35011e9e15fe3d962f6a017cff", "score": "0.8162648", "text": "function auth_is_admin() {\n $role = auth_role();\n return ($role && in_array($role,config('permission.admin_roles',[])));\n }", "title": "" }, { "docid": "690177cdb94f64974783b1cf7dcce3a3", "score": "0.81450295", "text": "public function adminAccess()\n {\n if($this->isLogin())\n {\n //$user = User::find(\\Auth::user()->id)->roles()->with('roles')->get();\n $user = User::find(\\Auth::user()->id)->roles()->get();\n $admin = \"admin\";\n $super = \"super admin\";\n \n foreach($user as $role)\n {\n $temp = $role->name;\n if($temp == $admin || $temp == $super)\n {\n return true;\n }\n }\n }\n \n return false;\n }", "title": "" }, { "docid": "1ae8eee52d4702ce561b59b467852ef0", "score": "0.81290483", "text": "public function isAdmin()\n {\n return ($this->role == Role::ADMIN);\n }", "title": "" }, { "docid": "d67bbad3717f484f055bcaf77479a329", "score": "0.81207544", "text": "public function is_admin()\r\n\t{\r\n\t\tif( $this->ci->session->userdata('account')->role_id == 1 )\r\n\t\t\treturn true;\r\n\t}", "title": "" }, { "docid": "aaaa48e3e0cd5184ec0c8ab71105daed", "score": "0.8106831", "text": "function isAdmin()\n {\n $user = $this->getCurrentUser();\n if ($user != null) {\n return intval($user->role) == Constants::ROLE_ADMIN;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "4bb5bbaa9e420fff5785cce5e55a3231", "score": "0.8093688", "text": "public function isAnAdmin(): bool\n {\n // return $this->userable_type === Student::class;\n return $this->roles->first()->name === 'admin';\n }", "title": "" }, { "docid": "04595f0d6814b72af9e4e351b094c3b8", "score": "0.80930495", "text": "public function isAdmin()\n {\n if ($this->role == self::ROLE_ADMIN) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "5669ff90a7a4ab2604e2bae47b204285", "score": "0.80739963", "text": "public static function isAdmin() {\n if( !Auth::check() )\n return false;\n\n return Auth::user()[ 'role' ] == 'admin';\n }", "title": "" }, { "docid": "54a69c4d61be86b3f07d6e778b300f40", "score": "0.805605", "text": "public function isAdmin()\n {\n return in_array('admin', $this->getRoles());\n }", "title": "" }, { "docid": "3f8ccb4ebd395e2b776b1982e1ccd963", "score": "0.80530894", "text": "public function isAdmin()\n {\n return $this->hasRole(static::ROLE_ADMIN);\n }", "title": "" }, { "docid": "ec8c614520cd3fe3f810b1ed8aa84e14", "score": "0.80310786", "text": "public function isAdmin();", "title": "" }, { "docid": "ec8c614520cd3fe3f810b1ed8aa84e14", "score": "0.80310786", "text": "public function isAdmin();", "title": "" }, { "docid": "ec8c614520cd3fe3f810b1ed8aa84e14", "score": "0.80310786", "text": "public function isAdmin();", "title": "" }, { "docid": "167d4ac0a01272b9eaeb935787520b65", "score": "0.80114686", "text": "function isAdmin(){\n\t\t$user = $this->loadUser();\n\t\tif ($user!==null)\n\t\t\treturn $user->role == User::ROLE_ADMIN;\n\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "0ec52f7be39e9371b13d100652061f9a", "score": "0.7992808", "text": "public function isAdmin()\n {\n $key = sha1(sprintf(\"%s_roles\", $this->uid));\n\n if (Cache::has($key)) {\n $roles = Cache::get($key);\n } else {\n $roles = $this->roles()->with('role')->get();\n Cache::put($key, $roles, 60);\n }\n foreach ($roles as &$role) {\n if ($role->role->name === \"admin\") {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "70bc66be400a93a75f71a6b66f4a99f8", "score": "0.79581356", "text": "public function isAdmin() {\n\t\treturn $this->hasRole(array_values(User::adminRoles()));\n\t}", "title": "" }, { "docid": "12006fec48b265fcbc5fc18e1b7aff58", "score": "0.7956193", "text": "public function isAdmin()\n {\n return $this->isSuperAdmin() || $this->role_id == Role::ADMIN;\n }", "title": "" }, { "docid": "cdf3c19ea4712c1a23283cb09250eaac", "score": "0.79504573", "text": "public function is_admin() : bool\n\t{\n\t\treturn $this->has_role(ADMIN_ROLE_ID);\n\t}", "title": "" }, { "docid": "cc2263d0617b4bd9d3e8a11fa8694aef", "score": "0.79411197", "text": "public function isAdmin()\r\n {\r\n return $this->status==\"admin\";\r\n }", "title": "" }, { "docid": "4345a9f3ed823ae6da6def0526d8d3d4", "score": "0.7928114", "text": "public function isAdmin()\n {\n return ($this->username === \"admin\");\n }", "title": "" }, { "docid": "acc99c079fea5c8887309ab5cdfc7e91", "score": "0.7894043", "text": "public function isAdmin(): bool\n {\n return $this->AccessLevel->label === \"admin\";\n }", "title": "" }, { "docid": "332f648b0b6e5228960bf1bf7c27e2af", "score": "0.78668624", "text": "function isAdmin() {\n\t\tglobal $hyphaUser;\n\t\treturn $hyphaUser->getAttribute('rights') === 'admin';\n\t}", "title": "" }, { "docid": "abc45cf7f3bcd034d4508e00c695bde2", "score": "0.78660375", "text": "function isAdmin()\r\n\t\t{\r\n\t\t\tif( isset($_SESSION['role'] ) )\r\n\t\t\t{\t\r\n\t\t\t\tif( $_SESSION['role'] == 'admin' )\r\n\t\t\t\t\treturn TRUE;\r\n\t\t\t\telse\r\n\t\t\t\t\treturn FALSE;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\treturn FALSE;\r\n\t\t\t\t\r\n\t\t}", "title": "" }, { "docid": "e3a842492d2ff61ad7f95fbdb1eb6b0d", "score": "0.7864677", "text": "public function isAdmin(): bool;", "title": "" }, { "docid": "e3a842492d2ff61ad7f95fbdb1eb6b0d", "score": "0.7864677", "text": "public function isAdmin(): bool;", "title": "" }, { "docid": "3522b9d7b1b4811bce20b7bfaf6290b1", "score": "0.7829352", "text": "public function is_admin();", "title": "" }, { "docid": "c60fb055e68dae18f4bce89cf9b2d265", "score": "0.78270984", "text": "public function isAdmin(){\r\n return $this->hasPermission('is_admin');\r\n }", "title": "" }, { "docid": "f31093ab8a1a000e5bbf2226b5d2efff", "score": "0.7814979", "text": "private function isAdmin()\r\n {\r\n # code...\r\n if(isset($_SESSION[\"user\"]) && in_array(\"ROLE_ADMIN\" , $_SESSION[\"user\"][\"roles\"])) {\r\n\r\n return true;\r\n\r\n } else{\r\n \r\n header(\"Location: /\");\r\n exit;\r\n\r\n }\r\n }", "title": "" }, { "docid": "45fa395118cef4c32e96aeecfd020042", "score": "0.7803424", "text": "public function isAdmin(): bool\n {\n return $this->has_cap('administrator');\n }", "title": "" }, { "docid": "ee645db85a16f6296554c2876d42476d", "score": "0.7800618", "text": "public function isAdmin() {\n\t\treturn $this->hasPermission('admin');\n\t}", "title": "" }, { "docid": "1e7fe2ac78ae4a590e875090c579e57e", "score": "0.77963257", "text": "public function isAdmin()\n {\n return $this->hasRole('root');\n }", "title": "" }, { "docid": "8b6b24249e02af5904b07c832148a8ed", "score": "0.7790188", "text": "function isAdmin() {\n return ($this->userType == 'admin');\n }", "title": "" }, { "docid": "72ae77acaced96c913ff83e8e735942b", "score": "0.77862924", "text": "public function check_admin_rights()\n {\n if ($this->session->userdata('role') == M_ADMIN)\n {\n return TRUE;\n } else\n {\n AuthTool::unauthorized();\n return FALSE;\n }\n }", "title": "" }, { "docid": "72229036c638dd4b76316d49427e3a4b", "score": "0.7752659", "text": "public function isAdmin()\n {\n return $this->type == 'admin';\n }", "title": "" }, { "docid": "8adc97fdd7b0f8d2e45720700bc5ee51", "score": "0.7730443", "text": "public static function admin()\n {\n return static::getRole(static::ADMIN);\n }", "title": "" }, { "docid": "d61c21f04e7f01c77a342080cd100695", "score": "0.77120674", "text": "public function is_admin(){\n if ($this->admin) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "c4c2129a6fd703a5b4bbb018eb2a6ce5", "score": "0.77069", "text": "protected function _checkAdmin()\n\t{\n\t\tif($this->_user)\n\t\t{\n\t\t\t$user_roles = DB::select()\n\t\t\t\t\t\t ->from('roles_users')\n\t\t\t\t\t\t ->where('user_id','=',$this->_user->id)\n\t\t\t\t\t\t ->as_object()\n\t\t\t\t\t\t ->execute();\n\t\t\t$flag = FALSE;\n\t\t\tforeach ($user_roles as $role)\n\t\t\t{\n\t\t\t\tif ($role->role_id == 2)\n\t\t\t\t\t$flag = TRUE;\n\t\t\t}\n\t\t\treturn $flag;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "299829a648308301f9b0c41b38ba55e7", "score": "0.7694798", "text": "public function isAdmin()\n\t{\n\t\t$user = $this->getUser();\n\t\treturn ($user && $user->admin);\n\t}", "title": "" }, { "docid": "a332daf1d3d0f9786bfa62c8f9f858fb", "score": "0.7672095", "text": "public function isAdmin()\n {\n return $this->admin == User::ADMIN_USER;\n }", "title": "" }, { "docid": "371afe3247e32ed0933b0294b1c0a729", "score": "0.7655071", "text": "public function isAdmin() {\n\t\t$isAdmin = false;\n\t\t$auth = Zend_Auth::getInstance();\n\t\t$auth->setStorage(new Zend_Auth_Storage_Session('vazneyStorage'));\n\t\tif( $auth->getIdentity() )\n\t\t{\n\t\t\t$userid = $auth->getIdentity()->id;\n\t\t\t$roleId = $auth->getIdentity()->roleId;\n\t\t\t$role = new Role_Model_Role();\n\t\t\t$roleData = $role->findById( $roleId );\n\t\t\t$isAdmin = $roleData->getName()=='admin'?true:false;\n\t\t}\n\t\treturn $isAdmin;\n\t}", "title": "" }, { "docid": "826e56e3998be02ed1d8e19623163f26", "score": "0.76468694", "text": "public function isAdmin()\n {\n return ($this->isLoggedIn() && $_SESSION['user_type'] && $_SESSION['user_type'] === 'admin');\n }", "title": "" }, { "docid": "38bcdcdab226a9ea120368f63abcf360", "score": "0.7645221", "text": "public function admin() {\n\t\treturn $this->type === 'admin';\n\t}", "title": "" }, { "docid": "aaeca1a27f806585bbd5d8735bf7e088", "score": "0.76405543", "text": "function isAdmin()\n\t{\n\t\t$CI \t=& get_instance();\n\t\treturn $CI->session->userdata ('admin_role') == 'admin'? TRUE: FALSE;\n\t}", "title": "" }, { "docid": "44851138dc94ccb4cbd1b1ad13fc64c9", "score": "0.7640007", "text": "public function isAdministrator();", "title": "" }, { "docid": "a71aaef8bff3c3f1f491c313f351f1aa", "score": "0.7637477", "text": "public function admin()\n\t{\n\t\treturn $this->role('administrator');\n\t}", "title": "" }, { "docid": "4e44d5f0ca0b6240142aaeedd2d139ee", "score": "0.7634323", "text": "public function isAdmin() {\n return $this->data['is_admin'] == 1;\n }", "title": "" }, { "docid": "7a4de43d557084522f56d2b32e9edb5d", "score": "0.7632148", "text": "public static function isAdmin():bool{\n \t return self::$identificado && self::$identificado->administrador;\n \t}", "title": "" }, { "docid": "0e30cde992ae7b0c87598e16ab05c7be", "score": "0.7629734", "text": "function isAdmin() {\r\n $currentUser = getCurrentUser();\r\n if ($currentUser['user_type'] !== \"admin\") {\r\n exitWithResponse(403);\r\n }\r\n}", "title": "" }, { "docid": "83cf912acb6493f0ea3b488e8bd2295c", "score": "0.76117665", "text": "public function isAdmin() {\n\n if($this->isAuthenticated() == false) {\n\n return false;\n\n }\n\n\n if ($_SESSION['user']['Admin'] == 2) {\n\n return true;\n\n } else {\n\n return false;\n\n }\n\n }", "title": "" }, { "docid": "52d4efcd7287bd8ebd1ec8680c4a03c6", "score": "0.76040184", "text": "public function isAdmin()\n {\n if (!$this->di->session->has(\"username\")) {\n $this->di->response->redirect('login');\n } elseif (!$this->di->session->has(\"admin\")) {\n $this->di->response->redirect(\"user\");\n }\n }", "title": "" }, { "docid": "b239518c1db66e3c4db4e2b536a3cbed", "score": "0.75741935", "text": "public function isAdmin()\n {\n return true;\n }", "title": "" }, { "docid": "58b7d24e12c0ca681c2ea8aa180ac560", "score": "0.75668985", "text": "public function isAdmin()\n {\n return $this->admin;\n // we will return the admin column value that will help us later \n // define if this user is an admin or no \n // and then we will proceede with creating a middleware \n // via the command pa make:middleware Admin\n // check that new middleware file created and then we are going to change things \n // In the kernel.php under the app folder \n // and finally we need to go to the web.php and to check things and\n // that's all \n }", "title": "" }, { "docid": "0d5a93593917cf10a1b9445f2fd2bd72", "score": "0.7557818", "text": "public function hasRoleOrgAdmin()\n {\n return in_array($this->roleName, [User::ROLE_PA_ADMIN, User::ROLE_PROF_ADMIN]);\n }", "title": "" }, { "docid": "4f4296938ad8d004c94f45552508b8bd", "score": "0.7555972", "text": "public function isAdmin()\n {\n return (bool) $this->sql->getValue('admin');\n }", "title": "" }, { "docid": "ab6a0f6463033e515dc7de0f6b71c7e2", "score": "0.7545703", "text": "function is_admin()\n {\n $ci =& get_instance();\n $user = $ci->users->get_user();\n return ($user['auth_type'] == 'admin');\n }", "title": "" }, { "docid": "e3e1dde2aee67290bad8af1216f5e7df", "score": "0.75401074", "text": "public function isAdmin()\n {\n return $this->fieldPrivilege == 'admin' ? true : false;\n }", "title": "" }, { "docid": "8bc4406b753da8820323b607291dac9c", "score": "0.75245994", "text": "public function adminAccess()\n {\n session_start();\n $superglobals = $this->getSuperglobals()->get_SESSION();\n if (isset($superglobals['id']) && $superglobals['role'] == \"administrateur\") {\n return true;\n }\n else {\n header('Location:/forbidden');\n }\n }", "title": "" }, { "docid": "a4b0b2a1b0363f3eb4823392880f51af", "score": "0.75228304", "text": "function isAdmin(){\n\n\tglobal $dbh;\n\n\t\t$accessQuery = $dbh->prepare(\"SELECT role_id FROM USER WHERE email = :email\");\n\t\t$accessQuery->bindParam(\":email\", $_SESSION[\"user\"]); \n\t\t$accessQuery->execute();\n\t\t$accessRow = $accessQuery->fetch();\n\n\t\treturn $accessRow[\"role_id\"] == '1'? true : false;\n}", "title": "" }, { "docid": "c2319920c69a73f20720eb84bbd27e8b", "score": "0.7520016", "text": "public function isAdmin() {\n return $this->isFlagSet(User::ADMIN_FLAG);\n }", "title": "" }, { "docid": "a00a215a32a2df9b9b5a0383c6494693", "score": "0.75177807", "text": "public function isAdmin(): bool\n {\n return $this->getValueByKey($this->response, 'is_admin');\n }", "title": "" }, { "docid": "f445ea7884208538ce400e277bc7b834", "score": "0.75101906", "text": "public function isAdministrator()\n {\n return $this->haveRol(Role::administrator());\n }", "title": "" }, { "docid": "00d918867c17ce8149bccb763fb41cd0", "score": "0.75037307", "text": "public function isAdmin() \n {\n return $this->admin;\n }", "title": "" }, { "docid": "33614a00ef02bef67a9e74a4bcd80766", "score": "0.7490252", "text": "function isAdmin(){\n \t$user = Users::model()->findByPk(Yii::app()->user->id);\n \tif(isset($user)){\n \t\treturn $user->type== Users::USER_TYPE_ADMIN;\n \t}else return false;\n \t\n }", "title": "" }, { "docid": "f01a6fbade57c2ea4ded5d79d2b9df83", "score": "0.7487233", "text": "public function adminOnly()\n {\n if (!Session::exists('role')) {\n $this->notFound();\n } elseif (Session::get('role') != 'admin') {\n $this->forbidden();\n }\n }", "title": "" }, { "docid": "1d56f12eb097140e4d65d5c540b40582", "score": "0.74853826", "text": "public function isAdmin () {\n\t\tif ($this->admin == 1)\n\t\t\treturn true;\n\t\treturn false;\n\t}", "title": "" }, { "docid": "2fc7c5ea97b4115bb847e5c71bf3ffd0", "score": "0.7472483", "text": "public function isAdmin()\n {\n if ($this->getId() === 1) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "5ab05021ff4c69d73a7a92d04332e595", "score": "0.74706274", "text": "public function isAdmin() \n\t{\n\t\treturn $this->admin;\n\t}", "title": "" }, { "docid": "7fd395f56b424f1748a4f839ebbe4ce2", "score": "0.7466029", "text": "function adminLoggedIn () {\n return ((userLoggedIn()) && ($_SESSION['user']->role === 'Admin')) ? true : false;\n}", "title": "" }, { "docid": "438553543b56ea330052ca8a5a8ec025", "score": "0.74643344", "text": "function isAdmin(){\n if( $this->id == 0 ) return false;\n if( $this->Fields->IsAdmin->value ) return true;\n return false;\n }", "title": "" }, { "docid": "915ff8af79e3af47b39073d427fd18f8", "score": "0.74633175", "text": "public function isAdministrator() : bool\n {\n return $this->isRole('administrator');\n }", "title": "" }, { "docid": "09266372fe8bd5221b018df3c86642fd", "score": "0.7455874", "text": "protected function isAdmin()\n\t{\n\t\tif(! $this->user) return false;\n\t\treturn $this->user->group->id == 1;\n\t}", "title": "" }, { "docid": "d23c085a81788ff71d8715c65eac3375", "score": "0.745488", "text": "public function isAdmin()\n {\n return dev() or $this->isAnyOf(role()->adminRoles());\n }", "title": "" } ]
abc270598dc6e8fca2a971afea2b3f69
Methods of the class Order.
[ { "docid": "b56e579f09eaf892e0243b8351cec906", "score": "0.0", "text": "function Order($iid,$itoken,$icomment,$idue_date)\n\t\t{\n\t\t\t$this->order_id = $iid;\n\t\t\t$this->token = $itoken;\n\t\t\t$this->comment = $icomment;\n\t\t\t$this->due_date = $idue_date;\n\t\t}", "title": "" } ]
[ { "docid": "983ca1bbfff134b23dfddff23997ab3a", "score": "0.7850188", "text": "public function getOrder() {\n }", "title": "" }, { "docid": "a87277565937550aa3a6e63f0e225258", "score": "0.784403", "text": "protected function order()\n {\n }", "title": "" }, { "docid": "3e050506240295dd7483010214eb3bd0", "score": "0.78029686", "text": "abstract function getOrder();", "title": "" }, { "docid": "6277da2c7d5dcb83a86127448d1355bf", "score": "0.7758978", "text": "public function order(){}", "title": "" }, { "docid": "5ed94f532b1fd6cf0d1e9338855fb3e4", "score": "0.7601577", "text": "public function getOrder();", "title": "" }, { "docid": "5ed94f532b1fd6cf0d1e9338855fb3e4", "score": "0.7601577", "text": "public function getOrder();", "title": "" }, { "docid": "9c089cd0677ae431f56c5f94f9f82635", "score": "0.75933224", "text": "public abstract function order();", "title": "" }, { "docid": "c6c049a323dad3c7c41e253f2228ed7c", "score": "0.7533444", "text": "public function BuatOrder()\n {\n \n }", "title": "" }, { "docid": "60d24709e2a937e9ee457e1a781532ed", "score": "0.7255711", "text": "function processOrder()\r\n{\r\n}", "title": "" }, { "docid": "0d47d38f487d8d4c6e15cc27b843d82a", "score": "0.72528464", "text": "public function testUpdateOrder()\n {\n }", "title": "" }, { "docid": "84d079da6ab381c4e8e218cd3c634f9b", "score": "0.70964515", "text": "public function startOrder()\n {\n //\n }", "title": "" }, { "docid": "1c76931d8f4758046c18cf03c08d990e", "score": "0.69914645", "text": "public function insertOrder() {\n }", "title": "" }, { "docid": "96a9a6cb17d1c4ba3ca65bc34b620dfa", "score": "0.6937436", "text": "public function getOrder(){\n return 1;\n }", "title": "" }, { "docid": "2c63c10ecc9474428aec99496265a24e", "score": "0.69202065", "text": "public function getOrder()\n {\n return 21;\n }", "title": "" }, { "docid": "1411d50ddd1b8f8d1903998ea66b65d2", "score": "0.6901919", "text": "public function getOrder()\r\n {\r\n return 100;\r\n }", "title": "" }, { "docid": "ab76d9a80fa784dae8e35224f9f97f97", "score": "0.68683606", "text": "function getOrder()\n {\n return 3; // TODO: Implement getOrder() method.\n }", "title": "" }, { "docid": "7b82515ada2d880c28e89ca6bfd3d0c7", "score": "0.6838885", "text": "function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "7b82515ada2d880c28e89ca6bfd3d0c7", "score": "0.6838885", "text": "function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "7b82515ada2d880c28e89ca6bfd3d0c7", "score": "0.6838885", "text": "function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "7b82515ada2d880c28e89ca6bfd3d0c7", "score": "0.6838885", "text": "function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "7b82515ada2d880c28e89ca6bfd3d0c7", "score": "0.6838885", "text": "function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "7b82515ada2d880c28e89ca6bfd3d0c7", "score": "0.6838885", "text": "function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "7b82515ada2d880c28e89ca6bfd3d0c7", "score": "0.6838885", "text": "function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "78a422db056d4d9249d323c4c1a8bafd", "score": "0.68092424", "text": "function getOrder()\n {\n return 2;\n }", "title": "" }, { "docid": "78a422db056d4d9249d323c4c1a8bafd", "score": "0.68092424", "text": "function getOrder()\n {\n return 2;\n }", "title": "" }, { "docid": "12ac5f0afa7a2354ded6d86ccb0a7681", "score": "0.68058884", "text": "public function createOrder() : array {\n\n }", "title": "" }, { "docid": "4cbae300b8af9a66656cab84e143159c", "score": "0.6804343", "text": "public function getOrder()\n {\n // TODO: Implement getOrder() method.\n return 2;\n }", "title": "" }, { "docid": "3d0f124a6e7077f7361916e6f30a113b", "score": "0.67984146", "text": "public function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "66053c8babf351204518a4430bb0da06", "score": "0.67973375", "text": "public function __construct() {\n $this->order = Array();\n }", "title": "" }, { "docid": "66053c8babf351204518a4430bb0da06", "score": "0.67973375", "text": "public function __construct() {\n $this->order = Array();\n }", "title": "" }, { "docid": "9295183fc6734860ecd5f446af12da90", "score": "0.67964464", "text": "public function getOrder()\n {\n return 2;\n }", "title": "" }, { "docid": "9295183fc6734860ecd5f446af12da90", "score": "0.67964464", "text": "public function getOrder()\n {\n return 2;\n }", "title": "" }, { "docid": "9295183fc6734860ecd5f446af12da90", "score": "0.67964464", "text": "public function getOrder()\n {\n return 2;\n }", "title": "" }, { "docid": "9295183fc6734860ecd5f446af12da90", "score": "0.67964464", "text": "public function getOrder()\n {\n return 2;\n }", "title": "" }, { "docid": "9295183fc6734860ecd5f446af12da90", "score": "0.67964464", "text": "public function getOrder()\n {\n return 2;\n }", "title": "" }, { "docid": "9295183fc6734860ecd5f446af12da90", "score": "0.67964464", "text": "public function getOrder()\n {\n return 2;\n }", "title": "" }, { "docid": "9295183fc6734860ecd5f446af12da90", "score": "0.67964464", "text": "public function getOrder()\n {\n return 2;\n }", "title": "" }, { "docid": "9295183fc6734860ecd5f446af12da90", "score": "0.67964464", "text": "public function getOrder()\n {\n return 2;\n }", "title": "" }, { "docid": "9295183fc6734860ecd5f446af12da90", "score": "0.67964464", "text": "public function getOrder()\n {\n return 2;\n }", "title": "" }, { "docid": "9295183fc6734860ecd5f446af12da90", "score": "0.67964464", "text": "public function getOrder()\n {\n return 2;\n }", "title": "" }, { "docid": "9295183fc6734860ecd5f446af12da90", "score": "0.67964464", "text": "public function getOrder()\n {\n return 2;\n }", "title": "" }, { "docid": "9295183fc6734860ecd5f446af12da90", "score": "0.67964464", "text": "public function getOrder()\n {\n return 2;\n }", "title": "" }, { "docid": "9295183fc6734860ecd5f446af12da90", "score": "0.67964464", "text": "public function getOrder()\n {\n return 2;\n }", "title": "" }, { "docid": "9295183fc6734860ecd5f446af12da90", "score": "0.67964464", "text": "public function getOrder()\n {\n return 2;\n }", "title": "" }, { "docid": "9295183fc6734860ecd5f446af12da90", "score": "0.67964464", "text": "public function getOrder()\n {\n return 2;\n }", "title": "" }, { "docid": "9295183fc6734860ecd5f446af12da90", "score": "0.67964464", "text": "public function getOrder()\n {\n return 2;\n }", "title": "" }, { "docid": "9295183fc6734860ecd5f446af12da90", "score": "0.67964464", "text": "public function getOrder()\n {\n return 2;\n }", "title": "" }, { "docid": "9295183fc6734860ecd5f446af12da90", "score": "0.67964464", "text": "public function getOrder()\n {\n return 2;\n }", "title": "" }, { "docid": "9295183fc6734860ecd5f446af12da90", "score": "0.67964464", "text": "public function getOrder()\n {\n return 2;\n }", "title": "" }, { "docid": "9295183fc6734860ecd5f446af12da90", "score": "0.67964464", "text": "public function getOrder()\n {\n return 2;\n }", "title": "" }, { "docid": "8680be2e769dcf31bffbc8963b7b97fc", "score": "0.6794574", "text": "public function getOrder()\n {\n // TODO: Implement getOrder() method.\n return 1;\n }", "title": "" }, { "docid": "6258522224b5e34216374f2e61ed29c0", "score": "0.6789759", "text": "protected function _getOrderClause(){ }", "title": "" }, { "docid": "ee959b2953e284955cd6640bb5b67459", "score": "0.67811424", "text": "public function getOrder()\n {\n return 10;\n }", "title": "" }, { "docid": "0090360d850d132e03fe57128fc8de76", "score": "0.6775372", "text": "public function getOrder() { \r\n return 4;\r\n }", "title": "" }, { "docid": "64a978231ca863c2a8357f7831814ba0", "score": "0.677253", "text": "private function orderObject(){\n\n return new Order(1559794111, 150);\n\n }", "title": "" }, { "docid": "d8aac05687727cf73d1cd80c32c507e7", "score": "0.6766448", "text": "function getOrder()\n {\n return 14;\n }", "title": "" }, { "docid": "965cc600715ff926bf3fb78ea97a13c2", "score": "0.67573917", "text": "function getOrder()\n {\n return 2;\n }", "title": "" }, { "docid": "3aa4da0daea0b77655e3f4609671d617", "score": "0.6750215", "text": "public function getOrder()\r\n {\r\n return 15;\r\n }", "title": "" }, { "docid": "9b2416b607f48ca9b228bdd80b53d075", "score": "0.67477494", "text": "public function getOrder()\n {\n return 99;\n }", "title": "" }, { "docid": "c7f701af83325e2837b2580e71c7cf65", "score": "0.67232585", "text": "public function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "c7f701af83325e2837b2580e71c7cf65", "score": "0.67232585", "text": "public function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "c7f701af83325e2837b2580e71c7cf65", "score": "0.67232585", "text": "public function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "c7f701af83325e2837b2580e71c7cf65", "score": "0.67232585", "text": "public function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "c7f701af83325e2837b2580e71c7cf65", "score": "0.67232585", "text": "public function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "c7f701af83325e2837b2580e71c7cf65", "score": "0.67232585", "text": "public function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "c7f701af83325e2837b2580e71c7cf65", "score": "0.67232585", "text": "public function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "c7f701af83325e2837b2580e71c7cf65", "score": "0.67232585", "text": "public function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "c7f701af83325e2837b2580e71c7cf65", "score": "0.67232585", "text": "public function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "c7f701af83325e2837b2580e71c7cf65", "score": "0.67232585", "text": "public function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "c7f701af83325e2837b2580e71c7cf65", "score": "0.67232585", "text": "public function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "c7f701af83325e2837b2580e71c7cf65", "score": "0.67232585", "text": "public function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "c7f701af83325e2837b2580e71c7cf65", "score": "0.67232585", "text": "public function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "c7f701af83325e2837b2580e71c7cf65", "score": "0.67232585", "text": "public function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "c7f701af83325e2837b2580e71c7cf65", "score": "0.67232585", "text": "public function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "c7f701af83325e2837b2580e71c7cf65", "score": "0.67232585", "text": "public function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "c7f701af83325e2837b2580e71c7cf65", "score": "0.67232585", "text": "public function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "c7f701af83325e2837b2580e71c7cf65", "score": "0.67232585", "text": "public function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "c7f701af83325e2837b2580e71c7cf65", "score": "0.67232585", "text": "public function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "c7f701af83325e2837b2580e71c7cf65", "score": "0.67232585", "text": "public function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "c7f701af83325e2837b2580e71c7cf65", "score": "0.67232585", "text": "public function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "c7f701af83325e2837b2580e71c7cf65", "score": "0.67232585", "text": "public function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "8ca06514f5d7f2218fd522c82df45bba", "score": "0.6708835", "text": "function getOrder() {\n\t\treturn 1;\n\t}", "title": "" }, { "docid": "b89f907dfd0f5ca477c86817fa5e02fd", "score": "0.6707423", "text": "public function getOrder()\n {\n return 11;\n }", "title": "" }, { "docid": "d14a600b8f1ae6312ca9a02e52aca757", "score": "0.66956216", "text": "public function getOrder() {\n return 17;\n }", "title": "" }, { "docid": "e63325493c6a24cb7643f8bf71263278", "score": "0.66918755", "text": "function GetOrder()\r\n\t{\r\n\t\treturn $this->m_order;\r\n\t}", "title": "" }, { "docid": "a4e98357d8b24120ff2253460d4eaa3b", "score": "0.6670235", "text": "function getOrder()\n {\n return 4;\n }", "title": "" }, { "docid": "ac01d2addc6bdbfa1594f4f9daf89646", "score": "0.666999", "text": "public function getOrder()\n {\n return 0;\n }", "title": "" }, { "docid": "ac01d2addc6bdbfa1594f4f9daf89646", "score": "0.666999", "text": "public function getOrder()\n {\n return 0;\n }", "title": "" }, { "docid": "ac01d2addc6bdbfa1594f4f9daf89646", "score": "0.666999", "text": "public function getOrder()\n {\n return 0;\n }", "title": "" }, { "docid": "ac01d2addc6bdbfa1594f4f9daf89646", "score": "0.666999", "text": "public function getOrder()\n {\n return 0;\n }", "title": "" }, { "docid": "5d7136ff58148428f93383e987ec6123", "score": "0.66665125", "text": "public function orderReport() {\n }", "title": "" }, { "docid": "a2d141ce9a1a5718ac8c310873377c21", "score": "0.66524714", "text": "function getOrder()\n {\n return 90;\n }", "title": "" }, { "docid": "bcdf7f9ca413a0b62c2ed9de92d291f0", "score": "0.665211", "text": "public function getOrder()\n {\n return 200;\n }", "title": "" }, { "docid": "53e862dcc79f10c7b51061c57cc50e63", "score": "0.6638938", "text": "public function getOrder()\r\n {\r\n return 3;\r\n }", "title": "" }, { "docid": "91f56fdc7f6b53f6c755eed483d7a902", "score": "0.6626084", "text": "public function getOrder()\n {\n return 300;\n }", "title": "" }, { "docid": "5ff843c4dbe5d10c7915b29f8e6f9b02", "score": "0.66173184", "text": "function getOrder()\n {\n return 3;\n }", "title": "" }, { "docid": "6c385b962f5437324eefd87e591bdac2", "score": "0.6615328", "text": "public function getOrder() : Order\n {\n return $this->order;\n }", "title": "" }, { "docid": "6c385b962f5437324eefd87e591bdac2", "score": "0.6615328", "text": "public function getOrder() : Order\n {\n return $this->order;\n }", "title": "" }, { "docid": "f2cf9a5ecc5bea2977ce1519bee73e74", "score": "0.6615049", "text": "public function getOrder() {\n return 1;\n }", "title": "" }, { "docid": "9e89d7d65322a5c5a5ce4f0c61f07b05", "score": "0.66076356", "text": "public function getOrder()\n {\n return $this->_order;\n }", "title": "" }, { "docid": "9e89d7d65322a5c5a5ce4f0c61f07b05", "score": "0.66076356", "text": "public function getOrder()\n {\n return $this->_order;\n }", "title": "" } ]
ce103a87eacd65ad9849a6f516d0b9db
return a editable form view with record where PK = $id
[ { "docid": "fb3312f788304fc7d5a02c229432ee92", "score": "0.0", "text": "public function edit($id)\n {\n $user = User::find([$id]);\n\n if (is_null($user)) {\n //TODO redirect to standard error page\n } else {\n return View::make('user.edit', ['user' => $user]);\n }\n }", "title": "" } ]
[ { "docid": "434e73275f428cceb2f4f7b76ebd89db", "score": "0.7314476", "text": "public function edit($id) {\n $this->setObject($id);\n $record = $this->object;\n $page_title = \"Edit {$this->singular_name}: <em>{$this->object[$this->model_label]}</em>\";\n $route = $this->route;\n $form_fields = $this->setLabelClass($this->fields_config['form_fields'], 'update'); \n return view($this->view . '.edit', compact('record', 'page_title', 'route', 'form_fields'));\n }", "title": "" }, { "docid": "3e8fdf922f86a5c312e81a01231da238", "score": "0.7291619", "text": "public function getEditView();", "title": "" }, { "docid": "02306b3d77eb0cffe3f4ba65e353ffc3", "score": "0.72312117", "text": "public function edit($id)\r\r\n {\r\r\n return $this->model->find($id);\r\r\n }", "title": "" }, { "docid": "70a3382ff49dd83abd3cf7d4bf1f74f3", "score": "0.72145605", "text": "public function edit($id)\n {\n $object = $this->repository->find($id);\n return view('cp.'.$this->formView, ['object'=>$object, 'fields'=>$this->fields, 'page'=>$this->page ]);\n }", "title": "" }, { "docid": "a207108ea50a28c0e44708ce3cae6f62", "score": "0.7194362", "text": "public function edit($id)\n {\n $record = Record::where('id', $id)->first();\n\n return view('record.edit', compact('record'));\n \n }", "title": "" }, { "docid": "1a5477602729614a0830dad7e42a3edc", "score": "0.71909714", "text": "public function edit($id)\n\t{ \n\t return $this->show($id);\t\n\t}", "title": "" }, { "docid": "d3689d0b1f8040580dccfc780c1e02a6", "score": "0.71527326", "text": "public function getEdit($id)\n {\n return $this->showForm('update', $id);\n }", "title": "" }, { "docid": "2853e0eeffec2e19ec999f69b51769d2", "score": "0.7124208", "text": "abstract public function edit($id);", "title": "" }, { "docid": "68cf3b194e8e57f948ed38f324b8cc37", "score": "0.70932686", "text": "public function edit($id)\n {\n return $this->createEdit($this->model->findOrFail($id)->toArray(), $id);\n }", "title": "" }, { "docid": "7c297f3296e58e813422d727f073b67c", "score": "0.70461744", "text": "public function edit($id)\n {\n return $this->model->find($id);\n }", "title": "" }, { "docid": "a7d20c1a6ac54a75a40feed2d0eefec6", "score": "0.70458007", "text": "public function edit($id)\n {\n\n $data = array_merge([\n 'tabs' => TabManager::get($this->getModel()->getTable()),\n $this->getResourceName() => $this->getEntity($id),\n ], $this->getFormData('edit', $id));\n // echo \"<pre>\";\n // print_r($data);\n // die();\n return view(\"{$this->viewPath}.edit\", $data);\n }", "title": "" }, { "docid": "1a11f4fb1ce5f8cb23b514d6b7ee6f0f", "score": "0.7028684", "text": "public function edit($id)\n {\n if($id==\"create\"){\n return $this->create();\n }\n\n return Admin::content(function (Content $content) use ($id) {\n\n\n // $item = FormModel::findOrFail($id);\n\n // $content->header($item->name);\n $content->header('Formulario');\n $content->description('editando');\n\n $content->body($this->form()->edit($id));\n // $content->body($this->form($item->event_id)->edit($id));\n });\n }", "title": "" }, { "docid": "38b4c2bcc5d6f933f82442e502068ae3", "score": "0.70263475", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "38b4c2bcc5d6f933f82442e502068ae3", "score": "0.70263475", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "ccdfb36fa6950a74a8cececdb662573e", "score": "0.7020259", "text": "public function showEdit($id = null)\n {\n $editing = !is_null($id);\n $fields = $this->getFields();\n $model = $this->model;\n $keys = array();\n $data = array();\n\n\n if($editing){\n $data = $model::findOrFail($id)->toArray();\n \\View::share(\"title\", \"Edit \".strtolower($this->singular));\n }\n\n\n\n foreach ($fields as $key => $field){\n\n if( $editing && array_key_exists('hide_if', $field)){\n foreach($field['hide_if'] as $col => $value){\n if( array_key_exists($col, $data) && $data[$col] == $value){\n unset($fields[$key]);\n break;\n }\n }\n }\n\n if( $editing && $field['type'] == 'json'){\n $meta = json_decode($data[$field['name']]);\n if( is_null( $meta) ){\n continue;\n }\n\n foreach( (array)$meta as $key => $json_field){\n\n $json_field = (array)$json_field;\n $name = $json_field['name'] = '__json__'.$key;\n\n $fields[$json_field['label']] = $json_field;\n $data[$name] = $json_field['value'];\n $keys[] = $name;\n }\n }\n\n $keys[] = $field[\"name\"];\n }\n\n if(!$editing){\n $data = \\Input::only($keys);\n \\View::share(\"title\", \"Create a \".strtolower($this->singular));\n }\n\n return \\View::make(\"admin.crud.edit\")\n ->with(\"fields\", $fields)\n ->with(\"data\", $data)\n ->with(\"post_route\", $this->route . \"-doedit\")\n ->with('editing', $editing)\n ->with(\"id\", $id)\n ->with(\"singular\", $this->singular)\n ->with(\"route\", $this->route);\n }", "title": "" }, { "docid": "aabc1e7151214fad98816d993c697020", "score": "0.7011655", "text": "public function getEdit($id)\n {\n //\n }", "title": "" }, { "docid": "a35ffd93a27511fcf25f5d861e319008", "score": "0.7010259", "text": "public function getEdit($id)\n {\n $data = Object::get();\n\n $object = Object::find($id);\n\n if ($typeName = $object->type) {\n if ($type = Object::getType($typeName)->first()) {\n $fieldsRows = Object::getFields($type->id)->get();\n\n $fields = array();\n $fieldControls = array();\n\n // Promoted\n $field = array();\n $field['id'] = '_field_promoted';\n $field['name'] = 'promoted';\n $field['label'] = 'Promoted';\n $field['type'] = 'boolean';\n $field['instructions'] = '';\n $field['required'] = 0;\n\n $values = $this->getFieldValues($id, $field);\n\n foreach ($values as $key => $value) {\n if ($values[$key] == '1') { $values[$key] = 'on'; }\n }\n\n $fieldControls[] = view('admin.partials.form.boolean', compact( 'field', 'values' ) );\n\n // Occupation\n $field = array();\n $field['id'] = '_field_occupation';\n $field['name'] = 'occupation';\n $field['label'] = 'Occupation';\n $field['type'] = 'text';\n $field['instructions'] = '';\n $field['required'] = 0;\n\n $values = $this->getFieldValues($id, $field);\n\n $fieldControls[] = view('admin.partials.form.text', compact( 'field', 'values' ) );\n\n // Address\n $uniqueId = Hash::getUniqueId();\n\n $field = array();\n $field['id'] = '_field_address';\n $field['name'] = 'address';\n $field['label'] = 'Address';\n $field['type'] = 'map';\n $field['instructions'] = '';\n $field['required'] = 0;\n\n $values = $this->getFieldValues($id, $field);\n\n $fieldControls[] = view('admin.partials.form.map', compact( 'field', 'values', 'uniqueId' ) );\n\n // French\n $field = array();\n $field['id'] = '_field_french_speakers';\n $field['name'] = 'french_speakers';\n $field['label'] = 'French Speakers';\n $field['type'] = 'boolean';\n $field['instructions'] = '';\n $field['required'] = 0;\n\n $values = $this->getFieldValues($id, $field);\n\n $fieldControls[] = view('admin.partials.form.boolean', compact( 'field', 'values' ) );\n\n // Address\n $field = array();\n $field['id'] = '_field_phone';\n $field['name'] = 'phone';\n $field['label'] = 'Phone';\n $field['type'] = 'tel';\n $field['instructions'] = '';\n $field['required'] = 0;\n\n $values = $this->getFieldValues($id, $field);\n\n $fieldControls[] = view('admin.partials.form.tel', compact( 'field', 'values' ) );\n\n // Email\n $field = array();\n $field['id'] = '_field_email';\n $field['name'] = 'email';\n $field['label'] = 'Email';\n $field['type'] = 'email';\n $field['instructions'] = '';\n $field['required'] = 0;\n\n $values = $this->getFieldValues($id, $field);\n\n $fieldControls[] = view('admin.partials.form.email', compact( 'field', 'values' ) );\n\n foreach ($fieldsRows as $fieldRow) {\n $field = unserialize($fieldRow['meta_value']);\n $fields[] = $field;\n\n //$field['value'] = $object->getValue($field['id']);\n $values = array();\n $valuesMeta = ObjectMeta::where('object_id', $id)\n ->where('meta_key', 'LIKE', $field['id'].'%')\n ->get();\n\n foreach ( $valuesMeta as $valueMeta ) {\n $valueMetaKey = str_replace( $field['id'], '', $valueMeta['meta_key']);\n\n if ( substr( $valueMetaKey, 0, 1 ) == '-' ) {\n $valueMetaKey = substr( $valueMetaKey, 1);\n }\n\n $value = $valueMeta['meta_value'];\n\n if ($value == '1') { $value = 'on'; }\n\n if ($valueMetaKey) {\n $values[$valueMetaKey] = $value;\n } else {\n $values[] = $value;\n }\n }\n\n $uniqueId = Hash::getUniqueId();\n\n switch ($field['type']) {\n case 'text':\n $fieldControls[] = view('admin.partials.form.text', compact( 'field', 'values', 'uniqueId' ) );\n break;\n case 'wysiwyg':\n $fieldControls[] = view('admin.partials.form.wysiwyg', compact( 'field', 'values', 'uniqueId' ) );\n break;\n case 'map':\n $fieldControls[] = view('admin.partials.form.map', compact( 'field', 'values', 'uniqueId' ) );\n break;\n case 'tel':\n $fieldControls[] = view('admin.partials.form.tel', compact( 'field', 'values', 'uniqueId' ) );\n break;\n case 'boolean':\n $fieldControls[] = view('admin.partials.form.boolean', compact( 'field', 'values', 'uniqueId' ) );\n break;\n }\n\n }\n }\n }\n\n if (isset($object)) {\n if ($imageObjectId = $object->getValue('_featured_image')) {\n $featuredImage = getImageSrc($imageObjectId);\n $featuredImage = 'cropped/' . getTheImageSize($featuredImage, '_featured_image');\n }\n\n if ($imageObjectId = $object->getValue('_content_image')) {\n $contentImage = getImageSrc($imageObjectId);\n $contentImage = 'cropped/' . getTheImageSize($contentImage, '_content_image');\n }\n\n //d\n }\n//dd($object);\n return view('admin.object.create_edit', compact('object', 'fields', 'values', 'fieldControls', 'featuredImage', 'contentImage'));\n }", "title": "" }, { "docid": "fc7c650022b34020a5584194e2ebc3fe", "score": "0.70013046", "text": "public function edit($id)\n {\n $criteria = CriteriaSetup::find($id);\n $itmID = $criteria->item_setup_id;\n return View('Appraisal.criteria-edit',compact('criteria','itmID'));\n }", "title": "" }, { "docid": "ac001ad554e1dd9544ff91edfa0bce37", "score": "0.6994983", "text": "public function edit($id)\n {\n $view = 'edit';\n\n $active = $this->active;\n $word = $this->edit_word;\n $model = null;\n $select = null;\n $columns = null;\n $actions = null;\n $item = $this->edit_item;\n\n return view('admin.crud.form', compact($this->compact, 'item'));\n }", "title": "" }, { "docid": "1e85cb9f63a996fa8ca7eb434e836cad", "score": "0.6958702", "text": "public function show($id)\n {\n // siehe edit!\n }", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.6935153", "text": "public function edit($id);", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.6935153", "text": "public function edit($id);", "title": "" }, { "docid": "0a284153215366dbae92d8a91d437d07", "score": "0.69315886", "text": "public function edit($id)\n\t{\n\t\t$item = Page::find($id);\n\n\t\treturn $this->layout->nest('content','admin.pages.form',array(\n\t\t\t'item' => $item\n\t\t));\n\t}", "title": "" }, { "docid": "60425bc3a61f570a890eaafb5c08f680", "score": "0.69201535", "text": "public function edit($id){}", "title": "" }, { "docid": "54fdd7aa62f997c2dc567098ea937c52", "score": "0.6915053", "text": "public function edit($id) {\n $viewData = $this->getDefaultFormViewData();\n $viewData[\"item\"] = Item::find($id);\n $viewData[\"mode\"] = \"EDIT\";\n\n return view('pages.items.form', $viewData);\n }", "title": "" }, { "docid": "dcd838b1a372ba9479b3783c8f165ac6", "score": "0.6904316", "text": "public function edit($id)\n {\n //\n $person = Person::find($id);\n $depts = Department::all();\n \n return view('contents.edit-record')->with('person', $person)->with('departments', $depts);\n }", "title": "" }, { "docid": "aa1b1d29b0efaefb2b8620f19fc66553", "score": "0.6900592", "text": "public function edit($id)\n\t{\n\t\treturn view('despacho::edit');\n\t}", "title": "" }, { "docid": "093f4ada65f95c5c7e23c07d6c7e1a49", "score": "0.6894611", "text": "public function edit( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "c1333e15861ffed0d228237f46dc6774", "score": "0.6893226", "text": "function edit()\n\t{\n\t\t$this->get($this->id(),2);\n\t\t$this->editing(true);\n\t}", "title": "" }, { "docid": "7ea5956c42e780b01175b78f4b339980", "score": "0.6890028", "text": "public function edit($id) {\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "4b24275bb3ea49b3f8b526fb30b98f1a", "score": "0.688216", "text": "public function edit($id)\n {\n $object = $this->_model->find($id)->toArray();\n\n $this->_data['id'] = $id;\n $this->_data['object'] = $object;\n\n $orderOptions = General::getOrderOptions();\n $this->_data['orderOptions'] = $orderOptions;\n $this->_data['type'] = ['' => ''] + $this->_model->getType();\n\n $isRange = General::isRange();\n $this->_data['isRange'] = $isRange;\n\n\n return view(\"admin.{$this->_data['controllerName']}.edit\", $this->_data);\n }", "title": "" }, { "docid": "bbf7985121fe9f3f66a95b6e5b96c454", "score": "0.6880354", "text": "public function edit($id)\n\t{\n return View::make('ordencompra.edit');\n\t}", "title": "" }, { "docid": "970b006085e1ab22e60991fdbf502163", "score": "0.68799305", "text": "public function edit($id){\n\t\t//\n\t}", "title": "" }, { "docid": "8583e412e95f9e0160255a3d7ff729ad", "score": "0.68768346", "text": "public function edit($id)\n {\n return view('procrm::edit');\n }", "title": "" }, { "docid": "159fd5b96d64f8bdb9c4b6142ade93c8", "score": "0.68754095", "text": "public function edit($id)\n {\n return $this->create($id);\n }", "title": "" }, { "docid": "1039a6061ea841aff6ddf4646f92466e", "score": "0.6872733", "text": "public function edit ($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "d5b84853822161538ad7800aea9d2259", "score": "0.68551993", "text": "public function edit($id)\n {\n // return $this->showOne($user);\n }", "title": "" }, { "docid": "1b65f07b172bc99f0284e1ff75f1db1e", "score": "0.6854094", "text": "public function edit($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "1b65f07b172bc99f0284e1ff75f1db1e", "score": "0.6854094", "text": "public function edit($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "1b65f07b172bc99f0284e1ff75f1db1e", "score": "0.6854094", "text": "public function edit($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "1b65f07b172bc99f0284e1ff75f1db1e", "score": "0.6854094", "text": "public function edit($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "1b65f07b172bc99f0284e1ff75f1db1e", "score": "0.6854094", "text": "public function edit($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "1b65f07b172bc99f0284e1ff75f1db1e", "score": "0.6854094", "text": "public function edit($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "1b65f07b172bc99f0284e1ff75f1db1e", "score": "0.6854094", "text": "public function edit($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "1b65f07b172bc99f0284e1ff75f1db1e", "score": "0.6854094", "text": "public function edit($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "1b65f07b172bc99f0284e1ff75f1db1e", "score": "0.6854094", "text": "public function edit($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "1b65f07b172bc99f0284e1ff75f1db1e", "score": "0.6854094", "text": "public function edit($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "1b65f07b172bc99f0284e1ff75f1db1e", "score": "0.6854094", "text": "public function edit($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "1b65f07b172bc99f0284e1ff75f1db1e", "score": "0.6854094", "text": "public function edit($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "1b65f07b172bc99f0284e1ff75f1db1e", "score": "0.6854094", "text": "public function edit($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "1b65f07b172bc99f0284e1ff75f1db1e", "score": "0.6854094", "text": "public function edit($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "1b65f07b172bc99f0284e1ff75f1db1e", "score": "0.6854094", "text": "public function edit($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "70b0ae507c4ab69478c9a5b2e35031e1", "score": "0.6848513", "text": "public function edit($id)\n {\n $model = penduduk::where('id',decrypt($id))->first();\n return view('admin.kependudukan.penduduk.form', compact('model'));\n }", "title": "" }, { "docid": "003ea97feca10d5c0c771880f6a3c261", "score": "0.6841743", "text": "public function edit($id)\n {\n $data = Ppdb::where('id', $id)->first();\n return view('ppdbadmin.edit', ['data' => $data]);\n }", "title": "" }, { "docid": "d1990eb001a108a243243728a602a90c", "score": "0.6836642", "text": "public function edit($id)\n {\n $infos = ItemModel::find((int)$id);\n foreach (array_keys($this->fields) as $field) {\n $data[$field] = old($field, $infos->$field);\n }\n $data['id'] = (int)$id;\n return view($this->skin . '.item.edit', $data);\n }", "title": "" }, { "docid": "dad8e3c2a7ebe6cfacf27bae0f994fe2", "score": "0.6830559", "text": "public function edit($id)\t{\n\t\t//\n\t}", "title": "" }, { "docid": "e35c45fd157218323181142d129b43b2", "score": "0.68299204", "text": "public function edit($id)\n {\n return view('mastertoko::edit');\n }", "title": "" }, { "docid": "a71cc2160fbf6150ea5fa124c0b4da5f", "score": "0.6824542", "text": "public function edit($id)\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "a71cc2160fbf6150ea5fa124c0b4da5f", "score": "0.6824542", "text": "public function edit($id)\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "a71cc2160fbf6150ea5fa124c0b4da5f", "score": "0.6824542", "text": "public function edit($id)\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "a71cc2160fbf6150ea5fa124c0b4da5f", "score": "0.6824542", "text": "public function edit($id)\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "a71cc2160fbf6150ea5fa124c0b4da5f", "score": "0.6824542", "text": "public function edit($id)\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "1c6133ef7a296b4e303ef5d8da89b465", "score": "0.6824209", "text": "public function edit($id)\n {\n $obj= Obj::where('id',$id)->first();\n $this->authorize('update', $obj);\n\n\n if($obj)\n return view('appl.'.$this->app.'.'.$this->module.'.createedit')\n ->with('stub','Update')\n ->with('obj',$obj)\n ->with('editor',true)\n ->with('app',$this);\n else\n abort(404);\n }", "title": "" }, { "docid": "420c75ad5a2165024d721e0524640680", "score": "0.68207306", "text": "function edit($id) {\n\t\t$query= $this->Record_model->view($id);\n\t\t\n\t\t//product listing\n\t\t$product_list = array(\n\t\t\t'' => '',\n\t\t\t'FOR ACQ DEL = MIOTV' => 'FOR ACQ DEL = MIOTV',\n\t\t\t'FOR SNBB = CONTENT PACKS' => 'FOR SNBB = CONTENT PACKS',\n\t\t\t'UPSELL VARIETY PCK = UPSELL CONTENTS' => 'UPSELL VARIETY PCK = UPSELL CONTENTS'\n\t\t);\n\t\t\n\t\t//speed listing\n\t\t$speed_list = array(\n\t\t\t'' => '',\n\t\t\t'MIOHOME 6MBPS' => 'MIOHOME 6MBPS',\n\t\t\t'MIOHOME 10MBPS' => 'MIOHOME 10MBPS',\n\t\t\t'MIOHOME 15 MBPS' => 'MIOHOME 15 MBPS',\n\t\t\t'(MIOTV)' => '(MIOTV)'\n\t\t);\n\t\t\n\t\t//SSP listing\n\t\t$ssp_list = array(\n\t\t\t'' => '',\n\t\t\t'NEW' => 'NEW',\n\t\t\t'EXISTING' => 'EXISTING'\n\t\t);\n\t\t\n\t\t//product offer listing\n\t\t$product_offer_list = array(\n\t\t\t'' => '',\n\t\t\t'MioTV with 6 months contract' => 'MioTV with 6 months contract',\n\t\t\t'Astro Pack with 12 months contract; 50% off for 3 months' => 'Astro Pack with 12 months contract; 50% off for 3 months',\n\t\t\t'Bharata Pack with 12 months contract; 50% off for 3 months' => 'Bharata Pack with 12 months contract; 50% off for 3 months',\n\t\t\t'Sports Pack with 12 months contract; 50% off for 6 months' => 'Sports Pack with 12 months contract; 50% off for 6 months',\n\t\t\t'Ultimate Pack with 12 months contract; 50% off for 3 months' => 'Ultimate Pack with 12 months contract; 50% off for 3 months',\n\t\t);\n\n //Plan Option listing\n $plan_option_list = array(\n '' => '',\n 'Standalone' => 'Standalone',\n 'Recontract' => 'Recontract',\n 'Bundle change' => 'Bundle change',\n 'Migration' => 'Migration (Acquisition)',\n 'ADSL Singtel TV Migration' => 'ADSL Singtel TV Migration'\n );\n\t\t\n\t\tif($query) {\n //validate\n $this->form_validation->set_rules('app_name', 'Name', 'trim|required|xss_clean');\n $this->form_validation->set_rules('NRIC', 'NRIC', 'trim|required|xss_clean');\n $this->form_validation->set_rules('ADSL_NO', 'ADSL Number', 'trim|xss_clean');\n $this->form_validation->set_rules('mobile_no', 'Mobile Number', 'trim|xss_clean');\n $this->form_validation->set_rules('IPTV_NO', 'IPTV Number', 'trim|xss_clean');\n $this->form_validation->set_rules('snd_contact', 'Secondary Contact info', 'trim|xss_clean');\n $this->form_validation->set_rules('snd_nric', 'Secondary Contact NRIC', 'trim|xss_clean');\n $this->form_validation->set_rules('snd_email', 'Secondary Contact Email Address', 'trim|xss_clean');\n $this->form_validation->set_rules('snd_dob', 'Secondary Contact Date of Birth', 'trim|xss_clean');\n $this->form_validation->set_rules('product', 'Product', 'trim|xss_clean');\n $this->form_validation->set_rules('speed', 'Speed', 'trim|xss_clean');\n $this->form_validation->set_rules('SSP', 'SSP', 'trim|xss_clean');\n $this->form_validation->set_rules('inst_add', 'Installation Address', 'trim|xss_clean');\n $this->form_validation->set_rules('actv_date', 'Activation Date', 'trim|xss_clean');\n $this->form_validation->set_rules('appt_time', 'Appointment Time', 'trim|xss_clean');\n $this->form_validation->set_rules('dealer', 'Dealer', 'trim|xss_clean');\n $this->form_validation->set_rules('crd', 'CRD', 'trim|xss_clean');\n $this->form_validation->set_rules('notes', 'Notes', 'trim|xss_clean');\n $this->form_validation->set_rules('plan_option', 'Plan Option', 'trim|required|xss_clean');\n $this->form_validation->set_rules('existing_internet_speed', 'Existing Internet Speed', 'trim|required|xss_clean');\n $this->form_validation->set_rules('new_internet_speed', 'New Internet Speed', 'trim|required|xss_clean');\n $this->form_validation->set_rules('existing_pack', 'Existing Pack', 'trim|required|xss_clean');\n $this->form_validation->set_rules('existing_pack_arpu', 'Existing Pack ARPU', 'trim|required|xss_clean');\n $this->form_validation->set_rules('new_pack_arpu', 'New Pack ARPU', 'trim|required|xss_clean');\n $this->form_validation->set_rules('arpu_difference', 'ARPU Difference', 'trim|required|xss_clean');\n $this->form_validation->set_rules('dvr', 'DVR', 'trim|required|xss_clean');\n $this->form_validation->set_rules('singtel_tv_go', 'Singtel TV Go', 'trim|required|xss_clean');\n $this->form_validation->set_rules('family_protection', 'Family Protection', 'trim|required|xss_clean');\n $this->form_validation->set_rules('security_suit_winos', 'Security Suit (WinOS)', 'trim|required|xss_clean');\n $this->form_validation->set_rules('security_suite_macos', 'Security Suit (MacOS)', 'trim|required|xss_clean');\n $this->form_validation->set_rules('tier', 'Tier', 'trim|required|xss_clean');\n $this->form_validation->set_rules('package_offer', 'Package Offer', 'trim|required|xss_clean');\n $this->form_validation->set_rules('alt_no', 'Alternate Number', 'trim|xss_clean');\n $this->form_validation->set_rules('dob', 'Date Of Birth', 'trim|xss_clean');\n $this->form_validation->set_rules('order_id', 'Order ID', 'trim|xss_clean');\n $this->form_validation->set_rules('cause_of_pending', 'Cause Of Pending', 'trim|xss_clean');\n\t\t\t\n\t\t\tif($this->form_validation->run() == FALSE)\n\t\t\t{\n\t\t\t\t//change validation error delimiters\n\t\t\t\t$this->form_validation->set_error_delimiters('<div class=\"error\">', '</div>');\n\t\t\t\t//load view\n\t\t\t\t$this->load->view(\n\t\t\t\t\t'template/main', \n\t\t\t\t\tarray(\n\t\t\t\t\t\t'content'=>'agent/edit', \n\t\t\t\t\t\t'location' => 'Agent / Edit Record',\n\t\t\t\t\t\t'dropdown' => array('product' => $product_list,'speed' => $speed_list,'ssp' => $ssp_list,'product_offer' => $product_offer_list,'plan_option' => $plan_option_list),\n\t\t\t\t\t\t'result' => $query->row_array(),\n\t\t\t\t\t\t'menu' => array(\n\t\t\t\t\t\t\t'Logout' => 'login/logout', \n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (isset($_POST['submit_record'])) {\n\t\t\t\t\t\n\t\t\t\t\tunset($_POST['submit_record']);\n\t\t\t\t\t\n\t\t\t\t\t$tvPacks = implode(',', $_POST[\"tv_pack\"]);\n\t\t\t\t\t$_POST['tv_pack'] = $tvPacks;\n\t\t\t\t\t\n\t\t\t\t\t$update = $this->Record_model->edit($_POST, $id);\n\t\t\t\t\t\n\t\t\t\t\tif($update) {\n\t\t\t\t\t\t$this->session->set_flashdata('prompt', '<div><span class=\"prompt\">Record updated.</span></div>');\n\t\t\t\t\t\t\n\t\t\t\t\t\tredirect('/agent/view/'.$id, 'refresh');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "905c618001f69fece0eae3fc5c2b7c56", "score": "0.6819881", "text": "public function edit( $id )\r\n\t{\r\n\t\treturn $this->doAddEdit( $id );\r\n\t}", "title": "" }, { "docid": "c4943ac280c467ca4f46324e3015a57f", "score": "0.68111277", "text": "public function edit($id)\n {\n return \\Control::edit('user',$id);\n }", "title": "" }, { "docid": "15cfb4f98499d51a7a62814bcbd3fa70", "score": "0.68103504", "text": "public function edit($id) {\n $this->j['isedit'] = true;\n $this->j['deparmentlist'] = app('main')->getdepartmentlist();\n\n $data = DB::table($this->dbname)\n ->where('id', $id)\n ->first();\n\n $this->j['data'] = $data;\n\n return view($this->viewfolder . '.create', ['j' => $this->j]);\n }", "title": "" }, { "docid": "2410e68daff0f0743edb5407668dfe0c", "score": "0.6805872", "text": "public function edit($id)\n\t{\n\t\t$monetaryDonation=MonetaryDonation::with('user','project')->find($id);\n\t\treturn View::make('monetaryDonations/show', ['monetaryDonation'=>$monetaryDonation, 'editable'=>true]);\n\t}", "title": "" }, { "docid": "21393c5768328c611583122a5918f9c4", "score": "0.6804393", "text": "public function edit($id)\n\t{\n\t\t$id = Id::find($id);\n\n\t\treturn View::make('ids.edit', compact('id'));\n\t}", "title": "" }, { "docid": "b20bab89a45b88e35b5646adcb13672f", "score": "0.6804113", "text": "public function edit($id){\n\t}", "title": "" }, { "docid": "b20bab89a45b88e35b5646adcb13672f", "score": "0.6804113", "text": "public function edit($id){\n\t}", "title": "" }, { "docid": "cb8cf9f28d134d12261ba49f89567986", "score": "0.6804039", "text": "public function edit($id)\n {\n return view('giaodien::edit');\n }", "title": "" }, { "docid": "51b921fe457cce079e4ea77f1fc685ed", "score": "0.67969036", "text": "public function edit($id)\n {\n $model = $this->model->find($id);\n return $this->view('crm.sea.edit', compact(\"model\"));\n }", "title": "" }, { "docid": "55da4f26ecef38f6720ad7a8c17f9971", "score": "0.6795279", "text": "public function getEdit($id) {\n View::share('tab_id','tab_create_edit');\n $status = Session::get('status');\n $user = User::find($id);\n return View::make('users.create_edit', array('user' => $user, 'status'=>$status));\n }", "title": "" }, { "docid": "1c388e44c2b35a9c26498cc167d6b501", "score": "0.67942005", "text": "public function edit($id)\n\t{\n\t\t$this->page_title = 'Edit Cms Page';\n\t\t$data = $this->rendarEdit($id);\n\t\treturn view('admin.crud.form',$data);\n\t}", "title": "" }, { "docid": "fa7d49536a6a67c33b01c7ece9b01974", "score": "0.6792136", "text": "public function edit( $id ) {\n //\n }", "title": "" }, { "docid": "55e79f577eea5c605e7b65caa3f3c491", "score": "0.6788001", "text": "public function edit($id)\n {\n $getSingleData = Research::find($id);\n // return $getSingleData->id;\n\n return \\View::make('research/ResearchTask/research-task-update' , compact('getSingleData'));\n }", "title": "" }, { "docid": "4e8abf2c3eba6f7c0d79ffe9c4431669", "score": "0.6785349", "text": "public function edit($id)\n {\n $document = DocumentField::find($id);\n \n return view('admin.document-field.document-field-edit',compact('document'));\n }", "title": "" }, { "docid": "2d679112c23faac815e0cddaed7d7ad7", "score": "0.67832136", "text": "public function edit($id)\n {\n //\n return JurnalManual::find($id);\n }", "title": "" }, { "docid": "57cb04f9cfe796dd2b33d6332fdf7cac", "score": "0.6778885", "text": "public function edit($id)\n\t{\n\t\t//\t\n\t}", "title": "" }, { "docid": "a67720995b7e2197b001075ef2885d5e", "score": "0.6778316", "text": "public function edit($id)\n {}", "title": "" }, { "docid": "d42209922733a651e7e623ed68be5e2f", "score": "0.67783093", "text": "public function edit($id)\n {\n return view('todo.create-update')\n ->withTodo(Todo::find(decrypt($id)));\n }", "title": "" }, { "docid": "ad14a0c79ffa1bea0330a8a2c8ef9d7b", "score": "0.6774304", "text": "public function edit($id)\n\t{\n //\n\t}", "title": "" }, { "docid": "7058afc6faef5d09af62f83abaa686ee", "score": "0.6773231", "text": "public function edit($id)\n {\n return view('data.edit', [\n 'title' => trans('strings.edit'),\n 'url' => \"data/$id\",\n 'method' => 'patch',\n 'saveEnabled' => true,\n 'readonly' => '',\n 'model' => $this->model->findOrFail($id)]);\n }", "title": "" }, { "docid": "707542226b0aa1d8720ce41f222eef35", "score": "0.6772821", "text": "public function edit(int $id) : object\n {\n $data = $this->documentService->show($id);\n return view('document.edit', [\n 'data' => $data->result[0]\n ]);\n }", "title": "" }, { "docid": "98b05f9332e60d9ec5a282ba2cdcab81", "score": "0.67698604", "text": "public function edit($id)\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "eabce867ccd148978f5e79acc7d8b377", "score": "0.67694235", "text": "public function edit($id)\n {\n $looper = Looper::find(Hashids::decode($id)[0]-1000000);\n\n $gc = new generalContainer;\n $gc->url_base = \"looper\";\n $gc->page_name = \"Enlazar nuevo Repositorio\";\n $gc->page_description = \"Inserte los campos requeridos\";\n $gc->form = true;\n $gc->breadcrumb('looper.edit');\n $gc->entity_to_edit = $looper;\n\n return view('cms.looper.form', compact('gc'));\n }", "title": "" }, { "docid": "a33d9b3816f16acd32b8876080d88488", "score": "0.676861", "text": "public function edit($id)\n {\n //maybe not necesary\n }", "title": "" }, { "docid": "15e7118c961f1526ffdebb5f6d0f8a1a", "score": "0.6767954", "text": "public function edit($id)\n {\n $field = Field::findOrFail($id);\n $forms = Form::all();\n $types = Type::all();\n\n return view('backend.field.edit', compact('field', 'forms', 'types'));\n }", "title": "" }, { "docid": "a6de7a52f343e8ef39bdbb573d983083", "score": "0.67679286", "text": "public function edit($id)\n {\n return $this->db->select(\n 'SELECT\n line_id,\n line_name\n FROM\n line\n WHERE\n line_id = :_id', array(':_id' => $id)\n );\n }", "title": "" }, { "docid": "2c7334d85165cf5fa83b3c976b54957a", "score": "0.6763114", "text": "public function edit($id)\n\t {\n\t\t //\n\t }", "title": "" }, { "docid": "89a0d2bcd14c0c3474d9d8956054de7e", "score": "0.676276", "text": "public function edit($id) {\n\t\treturn view('admin::edit');\n\t}", "title": "" }, { "docid": "ed650ebabe44fe852bb09e48882e74ef", "score": "0.6758332", "text": "public function edit($id)\n {\n $item = Field::findOrFail($id);\n\n return view('admin.fields.edit', compact('item'));\n }", "title": "" }, { "docid": "96ce00e214d9cea50df7e2363df090f0", "score": "0.67566043", "text": "public function edit($id)\n\t{\n return View::make('tools.edit');\n\t}", "title": "" }, { "docid": "23a5713884e9b2b610a90321ff004ad1", "score": "0.67523676", "text": "public function renderEdit($id = 0)\n {\n $this->template->pageTitle = '„RB“VL - Družstva - Úprava družstva';\n $this->template->pageHeading = 'Úprava družstva';\n $this->template->pageDesc = '';\n $this->template->robots = 'noindex,noarchive';\n $this->template->scripts = array('autocomplete');\n\n $form = $this->getComponent('druzstvaForm');\n $this->template->form = $form;\n\n $formSoupiska = $this->getComponent('hracForm');\n $this->template->formSoupiska = $formSoupiska;\n\n if (!$form->isSubmitted()) {\n $druzstva = new Druzstva;\n $row = $druzstva->find($id)->fetch();\n if (!$row) {\n //throw new BadRequestException('Požadovaný záznam nenalezen.');\n $this->flashMessage('Požadovaný záznam neexistuje.', 'danger');\n $this->redirect('default');\n }\n $soupiska = $druzstva->soupiska($id)->fetchAll();\n $this->template->soupiska = $soupiska;\n $this->template->druzstvo = $id;\n $form->setDefaults($row);\n\n $hraci = new Hraci;\n $this->template->hraci = $hraci->findAll();\n }\n\n\n }", "title": "" }, { "docid": "fc7655c8844961ddc1f323a4a3f309a0", "score": "0.6750521", "text": "public function edit($id = NULL) {\n\n\t}", "title": "" }, { "docid": "21d297c27e6ee8c9376bb9556a9ab327", "score": "0.6750228", "text": "public function edit($id) {\n $reparto = Reparto::find($id);\n return view('Reparto.edit', ['reparto' => $reparto]);\n }", "title": "" }, { "docid": "d41886ea7acc050797308d166ef3f670", "score": "0.67481905", "text": "public function show($id)\n {\n\t\treturn $this->edit($id);\n }", "title": "" }, { "docid": "84cc5176cb476d2beb85c3cbd46b8432", "score": "0.67449135", "text": "public function edit($id)\n {\n $turno = CturnoEmp::where('id','=',$id)\n ->first();\n\n $view = View('nomina.viewEmpCturno',[\n 'cturnoemp_id' => $turno->id,\n 'cturnoemp_idtur' => $turno->id_turno,\n 'cturnoemp_idemp' => $turno->id_emp,\n \n ]);\n return $view;\n }", "title": "" }, { "docid": "a14e0c93c328d9c51c3e885fd01e9388", "score": "0.6741283", "text": "public function editaModelo($id)\n {\n $template = Template::find($id);\n\n return view('adm.marketing.edita', compact('template'));\n }", "title": "" }, { "docid": "34e197601aac2ae5df4b71dd70204b38", "score": "0.6740588", "text": "public function edit( $id )\n {\n //\n }", "title": "" } ]
6b04cabb202ccf3e6a4ff7791ccd536e
Create request for operation 'usersIdTestimonialsGet'
[ { "docid": "7f8e6a869ba1d22f8d3135f91de7c855", "score": "0.6793778", "text": "protected function usersIdTestimonialsGetRequest($id, $page = null, $per_page = 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 usersIdTestimonialsGet'\n );\n }\n\n $resourcePath = '/users/{id}/testimonials';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($page !== null) {\n $queryParams['page'] = ObjectSerializer::toQueryValue($page);\n }\n // query params\n if ($per_page !== null) {\n $queryParams['per_page'] = ObjectSerializer::toQueryValue($per_page);\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 ['*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['*/*'],\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 // 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": "3af9881eff91163056a2da8c7aa6d7fa", "score": "0.6732618", "text": "public function index(TestimonialUserApiRequest $request)\n {\n $testimonials = $this->repository\n ->pushCriteria(new \\Litecms\\Testimonial\\Repositories\\Criteria\\TestimonialUserCriteria())\n ->setPresenter('\\\\Litecms\\\\Testimonial\\\\Repositories\\\\Presenter\\\\TestimonialListPresenter')\n ->scopeQuery(function ($query) {\n return $query->orderBy('id', 'DESC');\n })->all();\n $testimonials['code'] = 2000;\n return response()->json($testimonials)\n ->setStatusCode(200, 'INDEX_SUCCESS');\n\n }", "title": "" }, { "docid": "38807756c933d72114b9d2e93471086c", "score": "0.6328074", "text": "public function getTestimonials()\n {\n return $this->hasMany(Testimonial::className(), ['user_id' => 'id']);\n }", "title": "" }, { "docid": "d08eca437cc726f60559965278d0e1c6", "score": "0.63210267", "text": "public function getTestimonials($query = [])\n {\n $request = $this->buildRequest('get-testimonials', $query);\n return $this->requestCollection($request, 'Testimonial');\n }", "title": "" }, { "docid": "6558cfa4635929967924a7f0048fcec2", "score": "0.6153776", "text": "public function create(TestimonialUserApiRequest $request, Testimonial $testimonial)\n {\n $testimonial = $testimonial->presenter();\n $testimonial['code'] = 2002;\n return response()->json($testimonial)\n ->setStatusCode(200, 'CREATE_SUCCESS');\n }", "title": "" }, { "docid": "e6ffb5f0ed424b7c82c8ea3640cb481d", "score": "0.61075824", "text": "protected function testimonialsGetRequest($page = null, $per_page = null)\n {\n\n $resourcePath = '/testimonials';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($page !== null) {\n $queryParams['page'] = ObjectSerializer::toQueryValue($page);\n }\n // query params\n if ($per_page !== null) {\n $queryParams['per_page'] = ObjectSerializer::toQueryValue($per_page);\n }\n\n\n // body params\n $_tempBody = null;\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 (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": "eab2323899d3c6f931cd1a26b0fbd041", "score": "0.5854902", "text": "public function getTestimonials0()\n {\n return $this->hasMany(Testimonial::className(), ['created_by_user_id' => 'id']);\n }", "title": "" }, { "docid": "4fa0806dc333cc1d38d660a5e576877b", "score": "0.58240455", "text": "public function testimonials(){\n $data = Testimonial::where('id_testi', '>', 0)\n ->join('users', 'testimonials.id_user', '=', 'users.id')\n ->get() ;\n return view('admin.testimonial', ['testimonials' => $data]) ;\n }", "title": "" }, { "docid": "9b8d54bd915017003bb09ee7aa08245c", "score": "0.5733717", "text": "function newTestimonials()\r\n {\r\n \t//die('Hi');\r\n \r\n //$data['roles'] = $this->user_model->getUserRoles();\r\n //$data['cubes'] = $this->faqs_model->getActiveCubes();\r\n\t\t\t//echo '<pre>';print_r($data['cubes']);die;\r\n //$data['cubes'] = $this->testimonials_model->getActiveProfileCat();\r\n \r\n $this->global['pageTitle'] = 'Indiatoday : Add New User';\r\n\r\n $this->loadViews(\"newTestimonials\");\r\n\r\n }", "title": "" }, { "docid": "708d4e233983f4358a0af7517516f537", "score": "0.5654203", "text": "public function cust_testimonial(Request $request)\n {\n try \n {\n $testimonials=DB::table('testimonial')->where('deleted_at',null)->select('name','description','designation','image')->get();\n if(count($testimonials)==0)\n {\n return response(['status' => false, 'message' => 'No testimonial found!'], 200);\n }\n else\n {\n $status=true;\n return response(compact('testimonials','status'), 200);\n }\n }\n catch(\\Exception $e)\n {\n Log::debug ( \" Exception \". print_r ($e->getMessage(), true)); \n return response()->json([\"message\" => \"Something went wrong!\",\"status\" => false],404);\n }\n }", "title": "" }, { "docid": "097737a66df9f7ea9587312367b3ecef", "score": "0.55774695", "text": "public function actionTestimonial() {\r\n $error = \"\";\r\n $success = \"\";\r\n $userObject = User::model()->findByPK(array('id' => Yii::app()->session['userid']));\r\n $profileObject = UserProfile::model()->findByAttributes(array('user_id' => Yii::app()->session['userid'])); \r\n if (isset($_POST['UserProfile'])) {\r\n if($_POST['UserProfile']['testimonials']=='')\r\n { \r\n $error .= \"Please fill required(*) marked fields.\"; \r\n }else{\r\n if(md5($_POST['UserProfile']['master_pin'])== $userObject->master_pin)\r\n { \r\n \r\n $profileObject->testimonials = $_POST['UserProfile']['testimonials'];\r\n $profileObject->testimonial_status = '0';\r\n \r\n if ($profileObject->update()) {\r\n /*$config['to'] = $userObject->email; \r\n $config['subject'] = 'New testimonial added.';\r\n $config['body'] = 'Dear Admin , <br/> New testimonial added in mglobal site.Please approve.';\r\n $test = mail($config['to'],$config['subject'],$config['body']);\r\n CommonHelper::sendMail($config);*/\r\n $success .= \"Testimonial Updated Successfully.\"; \r\n }\r\n }else{\r\n $error .= \"Incorrect master pin.\"; \r\n }\r\n }\r\n }\r\n \r\n $this->render('/user/testimonial', array('profileObject' => $profileObject,'success' => $success,'error' => $error));\r\n }", "title": "" }, { "docid": "d86a6db991850357961a0a6e2b09bf65", "score": "0.5495985", "text": "public function listTestimonial(){\n\t\t$DB\t\t\t\t\t\t=\tTestimonial::query();\n\t\t$searchVariable\t\t\t=\tarray(); \n\t\t$inputGet\t\t\t\t=\tInput::get();\n\t\t## Searching on the basis of comment ##\n\t\tif (Input::get()) {\n\t\t\t$searchData\t\t\t=\tInput::get();\n\t\t\tunset($searchData['display']);\n\t\t\tunset($searchData['_token']);\n\t\t\tif(isset($searchData['order'])){\n\t\t\t\tunset($searchData['order']);\n\t\t\t}\n\t\t\tif(isset($searchData['sortBy'])){\n\t\t\t\tunset($searchData['sortBy']);\n\t\t\t}\n\t\t\tif(isset($searchData['page'])){\n\t\t\t\tunset($searchData['page']);\n\t\t\t}\n\t\t\tforeach($searchData as $fieldName => $fieldValue){\n\t\t\t\tif(!empty($fieldValue)){\n\t\t\t\t\t$DB->where(\"$fieldName\",'like','%'.$fieldValue.'%');\n\t\t\t\t\t$searchVariable\t=\tarray_merge($searchVariable,array($fieldName => $fieldValue));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$sortBy \t\t\t\t= \t(Input::get('sortBy')) ? Input::get('sortBy') : 'updated_at';\n\t $order \t\t\t\t= \t(Input::get('order')) ? Input::get('order') : 'DESC';\n\t\t$model \t\t\t\t\t= \t$DB->orderBy($sortBy, $order)->paginate(Config::get(\"Reading.records_per_page\"));\n\t\t$complete_string\t\t=\tInput::query();\n\t\tunset($complete_string[\"sortBy\"]);\n\t\tunset($complete_string[\"order\"]);\n\t\t$query_string\t\t\t=\thttp_build_query($complete_string);\n\t\t$model->appends(Input::all())->render();\n\t\treturn View::make(\"admin.$this->model.index\",compact('model','searchVariable','sortBy','order','query_string'));\n\t}", "title": "" }, { "docid": "b98bc11023e20eb386cb6f00b28402d9", "score": "0.5389572", "text": "public function getAllTestimonials()\n {\n return $this->testimonialRepository->findBy(\n array(),\n array(\n 'position' => 'ASC',\n )\n );\n }", "title": "" }, { "docid": "3828e4edf781cb5a2c9f80416aaf7ee8", "score": "0.53181475", "text": "public static function addTestimonial($politician, $user, $data)\n {\n $testi = new static;\n $testi->politician_id = $politician->id;\n $testi->user_id = $user->id;\n $testi->rating = array_get($data, 'vote', TRUE);\n $testi->comment = array_get($data, 'testimonial');\n\t\t\t\t\t\t\t\t$testi->save();\n return $testi;\n }", "title": "" }, { "docid": "dc0a8d15c6cefe6660503abd7d01199d", "score": "0.53027284", "text": "public function index()\n {\n try {\n\n\n $testimonial = DB::table('testimonials')->join('users', 'testimonials.user_id', '=', 'users.user_id')->\n where('testimonials.event_id', '1')->orderby('testimonial_id','desc')->paginate(2);\n\n\n // -- appending items querystring to paginate urls\n return $testimonial;\n }catch(\\Exception $e){\n return response()->json(['error' => $e->getMessage()], 400);\n }\n\n }", "title": "" }, { "docid": "3e0f94cfab85a38751351438b1a0e9a1", "score": "0.5275276", "text": "public function creating(Testimonial $testimonial)\n {\n if (! \\App::runningInConsole()) {\n $testimonial->user_id = auth()->user()->id;\n }\n \n }", "title": "" }, { "docid": "da1a5e480c849eaa7e17dc901d5f13df", "score": "0.523628", "text": "public function edit(TestimonialUserApiRequest $request, Testimonial $testimonial)\n {\n\n if ($testimonial->exists) {\n $testimonial = $testimonial->presenter();\n $testimonial['code'] = 2003;\n return response()->json($testimonial)\n ->setStatusCode(200, 'EDIT_SUCCESS');\n } else {\n return response()->json([])\n ->setStatusCode(400, 'SHOW_ERROR');\n }\n\n }", "title": "" }, { "docid": "b4b4578741ac3900a70248a0f07b00aa", "score": "0.5221192", "text": "public function getTestimonials(){\n $this->load->library(\"pagination\");\n $search = $this->input->get(\"search\");\n $columns = array(\n \"first_name\" => $search, \n \"last_name\" => $search, \n \"email\" => $search, \n \"contact\" => $search, \n );\n \n $response['test'] = $user = $this->user->fetch_like(\"testimonials\", $columns, $search, \"created_at\"); \n\n $totalUsers = 0;\n if($search != \"\"){\n \n $user = $this->user->fetch_like(\"testimonials\", $columns, $search, \"created_at\");\n if($user)\n $totalUsers = count($this->user->fetch_like(\"testimonials\", $columns, $search, \"created_at\")); \n }\n else\n $totalUsers = count($this->user->fetch(\"testimonials\"));\n \n $config = array();\n $config[\"base_url\"] = \"\";\n $config[\"total_rows\"] = $totalUsers;\n $config[\"per_page\"] = 10;\n $config[\"uri_segment\"] = 3;\n $config[\"use_page_numbers\"] = TRUE;\n $config[\"full_tag_open\"] = '<ul class=\"pagination justify-content-center\">';\n $config[\"full_tag_close\"] = '</ul>';\n $config[\"first_tag_open\"] = '<li class=\"page-item\"><a class=\"page-link\" href=\"#\">';\n $config[\"first_tag_close\"] = '</a></li>';\n $config[\"last_tag_open\"] = '<li class=\"page-item\">';\n $config[\"last_tag_close\"] = '</li>';\n $config['next_link'] = '&gt;';\n $config[\"next_tag_open\"] = '<li class=\"page-item\">';\n $config[\"next_tag_close\"] = '</li>';\n $config[\"prev_link\"] = \"&lt;\";\n $config[\"prev_tag_open\"] = '<li class=\"page-item\">';\n $config[\"prev_tag_close\"] = \"</li>\";\n $config[\"cur_tag_open\"] = \"<li class='page-item active'><a class='page-link' 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[\"num_links\"] = 1;\n $config['attributes'] = array('class' => 'page-link');\n $this->pagination->initialize($config);\n $page = $this->uri->segment(3);\n $response[\"page\"] = $page;\n $start = ($page - 1) * $config[\"per_page\"]; \n\n // check if there is a searching \n \n if($search != \"\"){ \n $users = $this->admin->fetchPagination(\"testimonials\", $columns, $search, \"created_at\", $config[\"per_page\"], $start);\n }\n else\n $users = $this->admin->fetchPagination(\"testimonials\", NULL, NULL, \"created_at\", $config[\"per_page\"], $start);\n\n // initialize to check if there are data \n $response[\"success\"] = false;\n $response[\"users\"] = $users;\n \n if($users){\n if(count($users) > 0){\n $html = '<table class=\"table table-striped table-sm\">\n <thead>\n <tr>\n <th>No.</th>\n <th>Name</th>\n <th>Email</th>\n <th>Contact Number</th> \n <th>Rate</th>\n <th>Created At</th>\n <th>Status</th>\n <th>Action</th>\n </tr>\n </thead>\n <tbody>';\n $ctr = 1;\n foreach($users as $u){\n $html .= '<tr>\n <td>'. $ctr++ .'</td>\n <td class=\"text-capitalize\">'. $u->first_name . ' '. $u->last_name .'</td>\n <td class=\"text-capitalize\">'. $u->email .'</td>\n <td class=\"text-capitalize\">'. $u->contact .'</td>\n <td>';\n for($i = 0; $i < $u->rate; $i++) $html .= '<i class=\"fa fa-star\"></i>'; \n $html .= \n '</td>\n <td>'. $u->created_at .'</td>\n <td>'. ($u->status == 1 ? '<span class=\"badge badge-success\">Active</span>' : '<span class=\"badge badge-danger\">Not Active</span>') .'</td>\n <td> \n <a class=\"btn btn-info btn-sm btn-view-rate\" href=\"#\" data-toggle=\"modal\" data-target=\"#view-testimonial-modal\" data-id=\"'. $u->id.'\"><i class=\"fa fa-eye\"></i></a>\n <button class=\"btn btn-success btn-sm btn-update-test-status\" href=\"#\" data-id=\"'. $u->id.'\">' . ($u->status == 1 ? 'Deactivate' : 'Activate') . '</button>\n </td>\n </tr>';\n }\n\n $response[\"success\"] = TRUE;\n $response[\"userTable\"] = $html;\n $response[\"pagination_link\"] = $this->pagination->create_links();\n }\n }\n else{\n $html = '<div class=\"alert alert-dark\" role=\"alert\">\n No Available Data\n </div>';\n $response[\"empty_message\"] = $html;\n }\n\n\n echo json_encode($response);\n }", "title": "" }, { "docid": "00e52f2c191b2fad122e9f40d9691f2e", "score": "0.5215612", "text": "public function showTestimonials(){\n $testimonials = M::getTestimonials();\n\n return view('admin.pages.about.testimonials', compact('testimonials'));\n }", "title": "" }, { "docid": "82cc181df9f30171a57b9994d5312142", "score": "0.51477957", "text": "public function test_get_users_param()\n {\n\n\n foreach (range(0, 4) as $counter) {\n $this->createUser();\n }\n\n\n $response = $this\n ->asUser()\n ->json('GET', '/user-management/users?status=IN_ACTIVE');\n\n $response->assertStatus(200);\n\n $response->assertJsonFragment([\n 'offset' => 0,\n 'limit' => 20,\n 'count' => 0\n ]);\n\n }", "title": "" }, { "docid": "67dea76ab7e6a71d60a81e94b3ede348", "score": "0.51114666", "text": "public function actionCreate()\n {\n $model = new Testimonials();\n if (Yii::$app->request->isAjax && $model->load(Yii::$app->request->post()))\n {\n Yii::$app->response->format = \\yii\\web\\Response::FORMAT_JSON;\n return ActiveForm::validate($model);\n }\n \n if ($model->load(Yii::$app->request->post()) ) {\n \n $image = UploadedFile::getInstance($model, 'image');\n\t\t\n\t\t\tif($image)\n\t\t\t{\n\t\t\t\n\t\t\t$model->image = StaticFunctions::saveImage($image, $model->id,'testimonials');\n\t\t\t\n\t\t\t \n\t\t\t}\n\t\t\t\n\t\t\t$model->save();\n \n return $this->redirect(['update', 'id' => $model->id]);\n \n \n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "86c74e078f4bc3163d825bc29f51f30e", "score": "0.51083356", "text": "public function show(Testimonials $testimonials)\n {\n //\n }", "title": "" }, { "docid": "86c74e078f4bc3163d825bc29f51f30e", "score": "0.51083356", "text": "public function show(Testimonials $testimonials)\n {\n //\n }", "title": "" }, { "docid": "f67ea2f4e25dc8d9c0753975d6c127d2", "score": "0.50865746", "text": "public function update(Request $request, Testimonials $testimonials)\n {\n $request->validate([\n \"titre\" => \"required\",\n \"sous_titre\" => \"required\",\n \"avis1\" => \"required\",\n \"photoavis1\" => \"required\",\n \"nomavis1\" => \"required\",\n \"workavis1\" => \"required\",\n \"avis2\" => \"required\",\n \"photoavis2\" => \"required\",\n \"nomavis2\" => \"required\",\n \"workavis2\" => \"required\",\n \"avis3\" => \"required\",\n \"photoavis3\" => \"required\",\n \"nomavis3\" => \"required\",\n \"workavis3\" => \"required\",\n \"avis4\" => \"required\",\n \"photoavis4\" => \"required\",\n \"nomavis4\" => \"required\",\n \"workavis4\" => \"required\",\n \"avis5\" => \"required\",\n \"photoavis5\" => \"required\",\n \"nomavis5\" => \"required\",\n \"workavis5\" => \"required\",\n ]);\n\n $testimonials->titre = $request->titre;\n $testimonials->sous_titre = $request->sous_titre;\n\n $testimonials->avis1 = $request->avis1;\n $testimonials->photoavis1 = $request->photoavis1;\n $testimonials->nomavis1 = $request->nomavis1;\n $testimonials->workavis1 = $request->workavis1;\n\n $testimonials->avis2 = $request->avis2;\n $testimonials->photoavis2 = $request->photoavis2;\n $testimonials->nomavis2 = $request->nomavis2;\n $testimonials->workavis2 = $request->workavis2;\n\n $testimonials->avis3 = $request->avis3;\n $testimonials->photoavis3 = $request->photoavis3;\n $testimonials->nomavis3 = $request->nomavis3;\n $testimonials->workavis3 = $request->workavis3;\n\n $testimonials->avis4 = $request->avis4;\n $testimonials->photoavis4 = $request->photoavis4;\n $testimonials->nomavis4 = $request->nomavis4;\n $testimonials->workavis4 = $request->workavis4;\n\n $testimonials->avis5 = $request->avis5;\n $testimonials->photoavis5 = $request->photoavis5;\n $testimonials->nomavis5 = $request->nomavis5;\n $testimonials->workavis5 = $request->workavis5;\n\n $testimonials->save();\n return redirect()->route('testimonials.all')->with('message', 'Informations modifié avec succès.');\n\n\n }", "title": "" }, { "docid": "fd0901b3456791970a9de39a0cf5c3e2", "score": "0.50842255", "text": "public function testimonials()\n\t{\n\t\tnew \\Gloudemans\\Testimonials\\TestimonialSubtitle();\n\t}", "title": "" }, { "docid": "1b57bf8a8a4cdb75667aa1830fe3bb01", "score": "0.50630623", "text": "function manageTestimonials()\r\n {\r\n\t\t\r\n \r\n\t\t\t$data['cube_id'] = $this->input->post('cube_id');\r\n\t\t\t//$data['cubes'] = $this->profile_model->getActiveProfile();\r\n $searchText = $this->security->xss_clean($this->input->post('searchText'));\r\n $data['searchText'] = $searchText;\r\n \r\n $this->load->library('pagination');\r\n \r\n $count = $this->testimonials_model->testimonialsListingCount($searchText);\r\n\t\t\t\r\n\t\t\t$returns = $this->paginationCompress ( \"manageTestimonials/\", $count, 10 );\r\n // print_r($data);die;\r\n\t\t\t\r\n\t\t\t\r\n $data['slideRecords'] = $this->testimonials_model->testimonialsListing($searchText, $returns[\"page\"], $returns[\"segment\"], $data['cube_id']);\r\n \r\n $this->global['pageTitle'] = 'Indiatoday : Testimonials Listing';\r\n \r\n $this->loadViews(\"testimonials\", $this->global, $data, NULL);\r\n \r\n }", "title": "" }, { "docid": "73cde61d7a8ffdf0c73c12c86bea09a9", "score": "0.50554484", "text": "public function insertEditTestimonials(){\n\t\tif ($this->checkLogin('A') == ''){\n\t\t\tredirect(ADMIN_ENC_URL);\n\t\t}else {\n\t\t\t$testimonials_id = $this->input->post('testimonials_id');\n\t\t\t$name =trim($this->input->post('name'));\n\t\t\t\n\t\t\t$excludeArr = array(\"testimonials_id\",\"status\");\n\t\t\t\n\t\t\tif ($this->input->post('status') == 'on'){\n\t\t\t\t$testimonials_status = 'Active';\n\t\t\t}else{\n\t\t\t\t$testimonials_status = 'Inactive';\n\t\t\t}\n\t\t\t$testimonials_data = array('status' => $testimonials_status);\n\t\t\t$condition = array();\n\t\t\tif ($testimonials_id == ''){\n\t\t\t\t$testimonials_data['created_date'] = MongoDATE(time());\n\t\t\t\t$this->testimonials_model->commonInsertUpdate(TESTIMONIALS,'insert',$excludeArr,$testimonials_data,$condition);\n\t\t\t\t$this->setErrorMessage('success','Testimonial added successfully','admin_testimonials_added_successfully');\n\t\t\t} else {\n\t\t\t\t$condition = array('_id' => MongoID($testimonials_id));\n\t\t\t\t$this->testimonials_model->commonInsertUpdate(TESTIMONIALS,'update',$excludeArr,$testimonials_data,$condition);\n\t\t\t\t$this->setErrorMessage('success','Testimonials updated successfully','admin_testimonials_edited_successfully');\n\t\t\t}\n\t\t\tredirect(ADMIN_ENC_URL.'/testimonials/display_testimonials_list');\n\t\t}\n\t}", "title": "" }, { "docid": "3874a2d4f4e35435646196d6cd64de44", "score": "0.50551814", "text": "public function getActiveTestimonials()\n {\n return $this->testimonialRepository->findBy(\n array(\n 'deleted' => false,\n 'disabled' => false,\n ),\n array(\n 'position' => 'ASC',\n )\n );\n }", "title": "" }, { "docid": "464360754fb11556604f3c94ac8e628e", "score": "0.502406", "text": "protected function usersGetRequest()\n {\n\n $resourcePath = '/v0.1/user';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\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 API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('X-API-Token');\n if ($apiKey !== null) {\n $headers['X-API-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 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "12ed71f7ae767edca083731cddb805f9", "score": "0.49725184", "text": "public function index()\n {\n // $user = \\Auth::user();\n // dd(in_array($user->role_id, [1]));\n if (! Gate::allows('testimonial_access')) {\n return abort(401);\n }\n\n $testimonials = CmsTestimonial::all();\n\n return view('admin.cms-testimonials.index',compact('testimonials'));\n }", "title": "" }, { "docid": "6f04678abb7213e2085a5b291923630f", "score": "0.49674466", "text": "function getUserDetailsForTestimonials($id){\n $where = array('id' => $id );\n $tbl=\"tbl_user_master\";\n if($this->num_users($where)>0){\n $data = $this->getOneRow('first_name,last_name,user_type',$tbl,$where);\n return $data;\n }else return 0;\n }", "title": "" }, { "docid": "cb8d898559c1417c3477952c61fc158e", "score": "0.49528697", "text": "public function show(Testimonial $testimonial)\n {\n //\n }", "title": "" }, { "docid": "cb8d898559c1417c3477952c61fc158e", "score": "0.49528697", "text": "public function show(Testimonial $testimonial)\n {\n //\n }", "title": "" }, { "docid": "cb8d898559c1417c3477952c61fc158e", "score": "0.49528697", "text": "public function show(Testimonial $testimonial)\n {\n //\n }", "title": "" }, { "docid": "cb8d898559c1417c3477952c61fc158e", "score": "0.49528697", "text": "public function show(Testimonial $testimonial)\n {\n //\n }", "title": "" }, { "docid": "cb8d898559c1417c3477952c61fc158e", "score": "0.49528697", "text": "public function show(Testimonial $testimonial)\n {\n //\n }", "title": "" }, { "docid": "cb8d898559c1417c3477952c61fc158e", "score": "0.49528697", "text": "public function show(Testimonial $testimonial)\n {\n //\n }", "title": "" }, { "docid": "cb8d898559c1417c3477952c61fc158e", "score": "0.49528697", "text": "public function show(Testimonial $testimonial)\n {\n //\n }", "title": "" }, { "docid": "cb8d898559c1417c3477952c61fc158e", "score": "0.49528697", "text": "public function show(Testimonial $testimonial)\n {\n //\n }", "title": "" }, { "docid": "cb03bfe27a910feec1d0b7c29536d90d", "score": "0.49214152", "text": "function add_hello_t_testimonials(){\t\r\n\t\t$the_time = time();\r\n\t\t\r\n\t\t$json_url = get_option('easy_t_hello_t_json_url', '');\r\n\t\tif ( empty($json_url) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t$url = $json_url . \"?last=\" . get_option('easy_t_hello_t_last_time', 0);\t\t\r\n\t\t$response = wp_remote_get( $url, array('sslverify' => false ));\r\n\t\t\t\t\r\n\t\tif ( is_wp_error($response) ) {\r\n\t\t\t// invalid URL, show error message\r\n\t\t\t$this->messages[] = '<strong>Error:</strong> the Hello Testimonials JSON URL you entered could not be reached. Please check the URL in your Hello Testimonials settings, or try again in a few minutes.';\r\n\t\t\treturn;\r\n\t\t}\t\t\r\n\t\t\r\n\t\tif( !empty($response) && !empty($response['body']) ) {\r\n\t\t\t$response = json_decode($response['body']);\r\n\t\t\t\r\n\t\t\tif(isset($response->testimonials)){\r\n\t\t\t\t$testimonial_author_id = get_option('easy_t_testimonial_author', 1);\r\n\t\t\t\t\r\n\t\t\t\tforeach($response->testimonials as $testimonial){\t\t\t\t\t\t\t\r\n\t\t\t\t\t//look for a testimonial with the same HTID\r\n\t\t\t\t\t//if not found, insert this one\r\n\t\t\t\t\t$args = array(\r\n\t\t\t\t\t\t'post_type' => 'testimonial',\r\n\t\t\t\t\t\t'meta_query' => array(\r\n\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t'key' => '_ikcf_htid',\r\n\t\t\t\t\t\t\t\t'value' => $testimonial->id,\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$postslist = get_posts( $args );\r\n\t\t\t\t\t\r\n\t\t\t\t\t//if this is empty, a match wasn't found and therefore we are safe to insert\r\n\t\t\t\t\tif(empty($postslist)){\t\t\t\t\r\n\t\t\t\t\t\t//insert the testimonials\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//defaults\r\n\t\t\t\t\t\t$the_name = isset( $testimonial->name ) ? $testimonial->name : '';\r\n\t\t\t\t\t\t$the_rating = isset( $testimonial->rating ) ? $testimonial->rating : 5;\r\n\t\t\t\t\t\t$the_position = isset( $testimonial->position ) ? $testimonial->position : '';\r\n\t\t\t\t\t\t$the_item_reviewed = isset( $testimonial->item_reviewed ) ? $testimonial->item_reviewed : '';\r\n\t\t\t\t\t\t$the_email = isset( $testimonial->email ) ? $testimonial->email : '';\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$tags = array();\r\n\t\t\t\t\t \r\n\t\t\t\t\t\t$post = array(\r\n\t\t\t\t\t\t\t'post_title' => $testimonial->name,\r\n\t\t\t\t\t\t\t'post_content' => $testimonial->body,\r\n\t\t\t\t\t\t\t'post_category' => array(1), // custom taxonomies too, needs to be an array\r\n\t\t\t\t\t\t\t'tags_input' => $tags,\r\n\t\t\t\t\t\t\t'post_status' => 'publish',\r\n\t\t\t\t\t\t\t'post_type' => 'testimonial',\r\n\t\t\t\t\t\t\t'post_date'\t\t=> $testimonial->publish_time,\r\n\t\t\t\t\t\t\t'post_author' \t=> $testimonial_author_id\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\t$new_id = wp_insert_post($post);\r\n\t\t\t\t\t \r\n\t\t\t\t\t\tupdate_post_meta( $new_id,\t'_ikcf_client',\t\t$the_name );\r\n\t\t\t\t\t\tupdate_post_meta( $new_id,\t'_ikcf_rating',\t\t$the_rating );\r\n\t\t\t\t\t\tupdate_post_meta( $new_id,\t'_ikcf_htid',\t\t$testimonial->id );\r\n\t\t\t\t\t\tupdate_post_meta( $new_id,\t'_ikcf_position',\t$the_position );\r\n\t\t\t\t\t\tupdate_post_meta( $new_id,\t'_ikcf_other',\t\t$the_item_reviewed );\r\n\t\t\t\t\t\tupdate_post_meta( $new_id,\t'_ikcf_email',\t\t$the_email );\r\n\t\t\t\t\t \r\n\t\t\t\t\t\t$inserted = true;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//update the last inserted id\r\n\t\t\t\t\t\tupdate_option( 'easy_t_hello_t_last_time', $the_time );\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\r\n\t\t//all done, so say something letting them know.\r\n\t\t$this->messages[] = 'Success! Your Testimonials have been imported!';\r\n\t}", "title": "" }, { "docid": "6cb996480dea137df80a537d96b696eb", "score": "0.48952982", "text": "function getTestimonial(){\n\t\t\t$query = \"select * from testimonials ORDER BY RAND() LIMIT 3\";\n\t\t\t$result = mysql_query($query);\n\t\t\tif($result){\n\t\t\t\t$data = array();\n\t\t\t\twhile($row = mysql_fetch_assoc($result)){\n\t\t\t\t\t$row['testimonials_image'] = $row['testimonials_image'] !==\"\"? $this->Check_exists_img($row['testimonials_image'],\"testimonials\") : \"admin/dist/img/avatar5.png\";\n\t\t\t\t\tarray_push($data,$row);\n\t\t\t\t}\n\t\t\t\treturn $data;\n\t\t\t}else{\n\t\t\t\tdie(\"error in mysql query \" . mysql_error());\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "135dee8e6ed5d6ddd65c1530ca3da56c", "score": "0.48930758", "text": "public function createAction(Request $request)\n {\n if (!$request->isXmlHttpRequest()) {\n return new JsonResponse(array('message' => 'You can access this only using Ajax!'), 400);\n }\n\n $testimonial = new Testimonial();\n $form = $this->createForm('ScoutBundle\\Form\\TestimonialType', $testimonial);\n $form->handleRequest($request);\n\n// if ($form->isSubmitted() && $form->isValid()) {\n// $em = $this->getDoctrine()->getManager();\n// $em->persist($contact);\n// $em->flush();\n//\n// return $this->redirectToRoute('contact_show', array('id' => $contact->getId()));\n// }\n\n\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($testimonial);\n $em->flush();\n\n return new JsonResponse(array('message' => 'Success!'), 200);\n }\n\n $response = new JsonResponse(\n array(\n 'message' => 'Error',\n 'form' => $this->renderView('testimonial/index.html.twig',\n array(\n 'entity' => $testimonial,\n 'form' => $form->createView(),\n ))), 400);\n\n return $response;\n }", "title": "" }, { "docid": "cb2ace4b49953133808b45690dc6c88e", "score": "0.48887467", "text": "public function _construct()\n {\n $this->_init('magetestimonials/magetestimonials', 'magetestimonials_id');\n }", "title": "" }, { "docid": "d5254202d2fa30e63ff7993c60eff83b", "score": "0.488612", "text": "public function testCreditorGETRequestCreditorIDGet()\n {\n }", "title": "" }, { "docid": "9a3503565e97ffe2100ca4ff7b40e5e3", "score": "0.48701322", "text": "protected function userSummariesAllGetRequest()\n {\n\n $resourcePath = '/user/summaries/all';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_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": "6c836b9e4ab01ed96eb56982953c2624", "score": "0.486215", "text": "public function _construct()\n {\n $this->_init('admintestimonials/admintestimonials', 'admintestimonials_id');\n }", "title": "" }, { "docid": "ad855be185efc1bf0a9d79b9237181ff", "score": "0.48400968", "text": "public function view_testimonials(){\n\t\tif ($this->checkLogin('A') == ''){\n\t\t\tredirect(ADMIN_ENC_URL);\n\t\t}else {\n\t\t\t\n\t\t\t\n\t\t\tif ($this->lang->line('admin_view_testimonial') != '') \n\t\t $this->data['heading']= stripslashes($this->lang->line('admin_view_testimonial')); \n\t\t else $this->data['heading'] = 'View Testimonial';\n\t\t\t\n\t\t\t\n\t\t\t$testimonials_id = $this->uri->segment(4,0);\n\t\t\t$condition = array('_id' => MongoID($testimonials_id));\n\t\t\t$this->data['testimonials_details'] = $testimonials_details=$this->testimonials_model->get_all_details(TESTIMONIALS,$condition);\n\t\t\tif ($this->data['testimonials_details']->num_rows() == 1){\n\t\t\t\t$this->load->view(ADMIN_ENC_URL.'/testimonials/view_testimonials',$this->data);\n\t\t\t}else {\n\t\t\t\tredirect(ADMIN_ENC_URL.'/testimonials/display_testimonials_list');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "7d32ee4784a6ff86acc60f6cb8c6bd0a", "score": "0.48355868", "text": "public function create(array $data)\n {\n $cleaned = $this->clean($data);\n\n $cleaned['entry_id'] = $data['entry'];\n\n $testimonial = Testimonial::create($cleaned);\n\n return $testimonial;\n }", "title": "" }, { "docid": "3a157046a386bef43b569f0d6d82a9e6", "score": "0.48353505", "text": "public function create()\n {\n if (! Gate::allows('testimonial_create')) {\n return abort(401);\n }\n\n return view('admin.cms-testimonials.create');\n }", "title": "" }, { "docid": "d339dbc0266a4966bb70a6fc383e4a08", "score": "0.47906885", "text": "public function testimonials($paramOverride = []) {\n\n $records = $this->items($paramOverride);\n\n $records->each( function($record, $key) use($records) {\n if (!is_array($record->testimonials) or !count($record->testimonials)) {\n $records->forget($key);\n }\n });\n\n return $records;\n\n }", "title": "" }, { "docid": "2bd87ca1442741e229232adeaa5fffcb", "score": "0.478155", "text": "public function addTestimonial(){\n\t\t$languages\t\t\t\t=\tDB::select(\"CALL GetAcitveLanguages(1)\");\n\t\t$language_code\t\t\t=\tConfig::get('default_language.language_code');\n\t\treturn View::make(\"admin.$this->model.add\",compact('languages' ,'language_code'));\n\t}", "title": "" }, { "docid": "6283bb3bf5347a41d7667fd8f5f5d48e", "score": "0.47656727", "text": "function getAlltestimonial(){\n\t\t\t$query = \"select * from testimonials ORDER BY id DESC\";\n\t\t\t$result = mysql_query($query);\n\t\t\tif($result){\n\t\t\t\t$data = array();\n\t\t\t\twhile($row = mysql_fetch_assoc($result)){\n\t\t\t\t\t$row['testimonials_image'] = $row['testimonials_image'] !==\"\"? $this->Check_exists_img($row['testimonials_image'],\"testimonials\") : \"admin/dist/img/avatar5.png\";\n\t\t\t\t\tarray_push($data,$row);\n\t\t\t\t}\n\t\t\t\treturn $data;\n\t\t\t}else{\n\t\t\t\tdie(\"error in mysql query \" . mysql_error());\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "3a6f33adf99244e15e71674f9c0c0fd4", "score": "0.47611964", "text": "protected function officesConnectionRefTestimonialsGetRequest($connection, $ref, $field = null, $page = null, $per_page = null)\n {\n // verify the required parameter 'connection' is set\n if ($connection === null || (is_array($connection) && count($connection) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $connection when calling officesConnectionRefTestimonialsGet'\n );\n }\n // verify the required parameter 'ref' is set\n if ($ref === null || (is_array($ref) && count($ref) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $ref when calling officesConnectionRefTestimonialsGet'\n );\n }\n\n $resourcePath = '/offices/{connection}/{ref}/testimonials';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($field !== null) {\n $queryParams['field'] = ObjectSerializer::toQueryValue($field);\n }\n // query params\n if ($page !== null) {\n $queryParams['page'] = ObjectSerializer::toQueryValue($page);\n }\n // query params\n if ($per_page !== null) {\n $queryParams['per_page'] = ObjectSerializer::toQueryValue($per_page);\n }\n\n // path params\n if ($connection !== null) {\n $resourcePath = str_replace(\n '{' . 'connection' . '}',\n ObjectSerializer::toPathValue($connection),\n $resourcePath\n );\n }\n // path params\n if ($ref !== null) {\n $resourcePath = str_replace(\n '{' . 'ref' . '}',\n ObjectSerializer::toPathValue($ref),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\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 (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": "5965a873af01245a5cba40810aa565bc", "score": "0.47421232", "text": "function add_edit_testimonial($id = null)\n\t{\n\t\t$data['website_id'] = $this->admin_header->website_id();\n\t\tif ($id != null)\n\t\t{\n\t\t\t$testimonial = $this->Testimonial_model->get_testimonial_by_id($id);\n\n\t\t\t$data['testimonial_id'] = $testimonial[0]->id;\n\t\t\t$data['image'] = $testimonial[0]->image;\n\t\t\t$data['image_alt'] = $testimonial[0]->image_alt;\n\t\t\t$data['image_title'] = $testimonial[0]->image_title;\n\t\t\t$data['image_type'] = $testimonial[0]->image_type;\n\t\t\t$data['author'] = $testimonial[0]->author;\n\t\t\t$data['content'] = $testimonial[0]->content;\n\t\t\t$data['author_color'] = $testimonial[0]->author_color;\n\t\t\t$data['author_hover'] = $testimonial[0]->author_hover;\n\t\t\t$data['designation'] = $testimonial[0]->designation;\n\t\t\t$data['designation_color'] = $testimonial[0]->designation_color;\n\t\t\t$data['designation_hover'] = $testimonial[0]->designation_hover;\n\t\t\t$data['content_title_color'] = $testimonial[0]->content_title_color;\n\t\t\t$data['content_title_position'] = $testimonial[0]->content_title_position;\n\t\t\t$data['content_color'] = $testimonial[0]->content_color;\n\t\t\t$data['content_position'] = $testimonial[0]->content_position;\n\t\t\t$data['content_title_hover_color'] = $testimonial[0]->content_title_hover_color;\n\t\t\t$data['content_hover_color'] = $testimonial[0]->content_hover_color;\n\t\t\t$data['redirect'] = $testimonial[0]->redirect;\n\t\t\t$data['redirect_url'] = $testimonial[0]->redirect_url;\n\t\t\t$data['open_new_tab'] = $testimonial[0]->open_new_tab;\n\t\t\t$data['background_hover_color'] = $testimonial[0]->background_hover_color;\n\t\t\t$data['background_color'] = $testimonial[0]->background_color;\n\t\t\t$data['sort_order'] = $testimonial[0]->sort_order;\n\t\t\t$data['status'] = $testimonial[0]->status;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['testimonial_id'] = \"\";\n\t\t\t$data['image'] = \"\";\n\t\t\t$data['image_alt'] = \"\";\n\t\t\t$data['image_title'] = \"\";\n\t\t\t$data['image_type'] = \"\";\n\t\t\t$data['author'] = \"\";\n\t\t\t$data['content'] = \"\";\n\t\t\t$data['author_color'] = \"\";\n\t\t\t$data['author_hover'] = \"\";\n\t\t\t$data['designation'] = \"\";\n\t\t\t$data['designation_color'] = \"\";\n\t\t\t$data['designation_hover'] = \"\";\n\t\t\t$data['content_title_color'] = \"\";\n\t\t\t$data['content_title_position'] = \"\";\n\t\t\t$data['content_color'] = \"\";\n\t\t\t$data['content_position'] = \"\";\n\t\t\t$data['content_title_hover_color'] = \"\";\n\t\t\t$data['content_hover_color'] = \"\";\n\t\t\t$data['background_hover_color'] = \"\";\n\t\t\t$data['redirect'] = \"\";\n\t\t\t$data['redirect_url'] = \"\";\n\t\t\t$data['open_new_tab'] = \"\";\n\t\t\t$data['background_color'] = \"\";\n\t\t\t$data['sort_order'] = \"\";\n\t\t\t$data['status'] = \"\";\n\t\t}\n\t\t\n\t\t$data['httpUrl']\t= $this->admin_header->host_url();\n\t\t$data['ImageUrl']\t= $this->admin_header->image_url();\n\t\t$data['website_folder_name'] = $this->admin_header->website_folder_name();\n\t\t\n\t\t$data['heading']\t= (($id != null) ? 'Edit Testimonial' : 'Add Testimonial');\n\t\t$data['title']\t= (($id != null) ? 'Edit Testimonial' : 'Add Testimonial') . ' | Administrator';\n\t\t$this->load->view('template/meta_head', $data);\n\t\t$this->load->view('testimonial_header');\n\t\t$this->admin_header->index();\n\t\t$this->load->view('add_edit_testimonial', $data);\n\t\t$this->load->view('template/footer_content');\n\t\t$this->load->view('script');\n\t\t$this->load->view('template/footer');\n\t}", "title": "" }, { "docid": "96136310fe549a49eb838823231d579f", "score": "0.47405353", "text": "public function edit(Testimonial $testimonial)\n {\n //\n }", "title": "" }, { "docid": "96136310fe549a49eb838823231d579f", "score": "0.47405353", "text": "public function edit(Testimonial $testimonial)\n {\n //\n }", "title": "" }, { "docid": "96136310fe549a49eb838823231d579f", "score": "0.47405353", "text": "public function edit(Testimonial $testimonial)\n {\n //\n }", "title": "" }, { "docid": "72ad95aca986703f656278e2017fd9e6", "score": "0.47276634", "text": "public function create()\n {\n $testimonial = Testimonial::all();\n return view('home.testimonials.create');\n }", "title": "" }, { "docid": "1a2b18dcd020bc8822596c382c43ae8a", "score": "0.46972466", "text": "public function index(){\n\n $testimonials = Testimonial::where('status',1)->get();\n return view('index',compact('testimonials'));\n}", "title": "" }, { "docid": "baba03c168ee8522f06a4d03e71f3ed6", "score": "0.46931276", "text": "public function actionIndex()\n {\n if(Yii::$app->request->post()){\n $items = Yii::$app->request->post()['rm-input'];\n $items = explode(',', $items);\n for($i = 0; $i < count($items) - 1;$i++){\n if($items[$i] != null)\n Testimonials::findOne($items[$i])->delete();\n }\n }\n \n $searchModel = new TestimonialsSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "4e2570ec8580e74d7f0e70e8bf2715a7", "score": "0.4675867", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $testimonials = $em->getRepository('ScoutBundle:Testimonial')->findAll();\n\n return $this->render('testimonial/index.html.twig', array(\n 'testimonials' => $testimonials,\n ));\n }", "title": "" }, { "docid": "0897a69910db9da2bcf2daa3da7c6936", "score": "0.46741632", "text": "public function submitTestimonialForm(){\n\t\tif (! DOING_AJAX || ! check_ajax_referer('testimonial-nonce', 'nonce') ) {\n\t\t\treturn $this->return_json('error');\n\t\t}\n \n $name = sanitize_text_field( $_POST[\"name\"] );\n $email = sanitize_email($_POST['email']);\n\t\t$message = sanitize_textarea_field($_POST['message']);\n\n $metadata = array(\n \"name\" => $name,\n \"email\" => $email,\n );\n\n // fill a new array ($args) for creating a new post\n $args = array(\n\t\t\t'post_title' => 'Testimonial from ' . $name,\n\t\t\t'post_content' => $message,\n\t\t\t'post_status' => 'publish',\n\t\t\t'post_type' => 'testimonial',\n\t\t\t'meta_input' => array(\n\t\t\t\t'_sandip_testimonial_key' => $metadata\n\t\t\t)\n\t\t);\n\n // Insert the Post, It will Return a Post ID\n\t\t$postID = wp_insert_post($args);\n\n if ($postID) {\n\t\t\treturn $this->return_json('success');\n\t\t}\n\n return $this->return_json('error');\n }", "title": "" }, { "docid": "e6f1ddae98252d560ec41fe4ab4a57f7", "score": "0.46709865", "text": "public function getRandomFoodTriviaRequest()\n {\n\n $resourcePath = '/food/trivia/random';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\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 = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "f533ac82d742e8a4f7135612b32ea127", "score": "0.46576363", "text": "public function update(Request $request, Testimonial $testimonial)\n {\n //\n }", "title": "" }, { "docid": "f533ac82d742e8a4f7135612b32ea127", "score": "0.46576363", "text": "public function update(Request $request, Testimonial $testimonial)\n {\n //\n }", "title": "" }, { "docid": "b86c4caa8451a44adb17b3d9cd40cec3", "score": "0.46474835", "text": "protected function getTeachingClassItemRequest($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 getTeachingClassItem'\n );\n }\n\n $resourcePath = '/api/auth/v1/teaching-class/{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/ld+json', 'application/json', 'text/html']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/ld+json', 'application/json', 'text/html'],\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 // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "c8cfda264f4764c2d308f106d4bcfd06", "score": "0.46233818", "text": "public function test_get_users()\n {\n\n\n foreach (range(0, 4) as $counter) {\n $this->createUser();\n }\n\n\n $response = $this\n ->asUser()\n ->json('GET', '/user-management/users');\n\n $response->assertStatus(200);\n\n $response->assertJsonFragment([\n 'offset' => 0,\n 'limit' => 20,\n 'count' => 6\n ]);\n }", "title": "" }, { "docid": "a93e34c292a259080c1434c36b617383", "score": "0.4623045", "text": "function testDetails(){\n\tinclude_once('../core/class.crud.php');\n\t$param =json_decode(file_get_contents('php://input'));\n\t$catCRUD = new crud('client_testimonial');\n $actionItem = $param->action;\n\tunset($param->action);\n\t\n\tswitch($actionItem ){\n\t\tcase \"Insert\": {\n\t\t\t$returnArr = $catCRUD->addItems($param);\n\t\t\tbreak;\n\t\t}\n\t\tcase \"Get\":{\n\t\t\t$returnArr = $catCRUD->getItems();\n\t\t\tbreak;\n\t\t}\n\t\tcase \"Order\":{\n\t\t\t$returnArr = $catCRUD->orderItems($param);\n\t\t\tbreak;\n\t\t}\n\t\tcase \"Edit\" :{\n\t\t\t$returnArr = $catCRUD->editItems($param);\n\t\t\tbreak;\n\t\t}\n\t\tcase \"Delete\" :{\n\t\t\t$returnArr = $catCRUD->deleteItems($param);\n\t\t\tbreak;\n\t\t}\n\t}\n\techo $_GET['jsoncallback'] . $returnArr ;\n}", "title": "" }, { "docid": "fe7bf1b066ce86293e1a4114cf5090b9", "score": "0.46205133", "text": "public function create()\n {\n $testimonials = 'testimonials';\n $active_menu = 'testimonials';\n $action = 'testimonials.add';\n return view('testimonials.testimonials', compact('active_menu', 'action', 'testimonials'));\n }", "title": "" }, { "docid": "348b83f2d277f8b1c8e5e39e6c7a2372", "score": "0.46033487", "text": "public function getTestimonial($postID)\n {\n $data = array_combine(\n ['avatar', 'comment', 'name', 'position', 'company'],\n getAcfVars(\n ['avatar', 'comment', 'name', 'position', 'company'],\n ['', '', '', '', ''],\n $postID\n )\n );\n\n if (empty($data['name'])) {\n return [];\n }\n\n return $data;\n }", "title": "" }, { "docid": "8a8c9b5aab722189ee0067c182634d4f", "score": "0.45679572", "text": "public function testgetStories(){\n\t\t$url = 'http://188.113.108.37/requests/controller.php';\n\t\t$postarray = json_encode(array('type'=>'getStories', 'userId'=>105));\n \n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n \n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $postarray);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n \n\t\t$response = curl_exec($ch);\n\t\t//print_r(\"\\n\".$response);\n\t\tcurl_close($ch);\n\t\t\n\t\t//TESTING\n\t\t//Does it return stories? \n\t\t$data = json_decode($response);\n\t\t//print_r(\"Result from testGetStories: \");\n\t\t//print_r($response);\n\t\t//Test if the data contains 10 objects as it should.\n\n\t\t$this->assertCount(10,$data);\n\n\t\t//Looping trough all the stories\n\n\t\tfor ($i=0; $i <10 ; $i++) { \n\t\t\t$id = $data[$i]->id;\n\t\t\t//print_r(\"\\n\".$id);\n\t\t\t//Test if every instance include a ID, as it should\n\n\t\t\t$this->assertEquals(\"DF\",substr($id,0,2));\n\t\t\t$this->assertEquals(\".\", substr($id,2,1));\n\t\t\t$this->assertInternalType(\"int\", intval(substr($id,4,7)));\n\n\t\t\t//Test if all the stories contains the array elements they should\n\n\t\t\t$this->assertObjectHasAttribute('id',$data[$i]);\n\t\t\t$this->assertObjectHasAttribute('title',$data[$i]);\n\t\t\t$this->assertObjectHasAttribute('description',$data[$i]);\n\t\t\t$this->assertObjectHasAttribute('false_recommend',$data[$i]);\n\t\t\t$this->assertObjectHasAttribute('explanation',$data[$i]);\n\t\t\t$this->assertObjectHasAttribute('picture',$data[$i]);\n\t\t\t$this->assertObjectHasAttribute('thumbnail',$data[$i]);\n\t\t\t$this->assertObjectHasAttribute('categories',$data[$i]);\n\t\t\t$this->assertObjectHasAttribute('mediaType',$data[$i]);\n\t\t\t$this->assertObjectHasAttribute('author',$data[$i]);\n\t\t\t$this->assertObjectHasAttribute('date',$data[$i]);\n\n\t\t}\n\n\n\t}", "title": "" }, { "docid": "45999cb7b599e8e3356a83ad73b6fd25", "score": "0.45677114", "text": "protected function projectsV2GetRequest()\n {\n\n $resourcePath = '/v2/projects';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\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 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "d514d588bb0688488d076396f1f697ed", "score": "0.4565427", "text": "function get_testimonial($id_product=NULL, $limit=5)\n\t{\n\t\tif($id_product != NULL)\n\t\t{\n\t\t\t// check ageless set\n\t\t\t$id_product = ($id_product >= 8 && $id_product <= 14) ? 15 : $id_product;\n\t\t\t\n\t\t\t$this->db->where('id_product', $id_product);\n\t\t\t\n\t\t\t// if product is not ageless disply doctor testimonail\n\t\t\tif($id_product != 15)\n\t\t\t{\n\t\t\t\t$this->db->or_where('id_product', '0');\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->db->order_by('id', 'random');\n\t\t$this->db->limit($limit);\n\t\t\n\t\t$_query = $this->db->get('content_testimonial');\n\t\t\n\t\treturn $_query;\n\t}", "title": "" }, { "docid": "4fd073ccc788f0f689daf30be66486cb", "score": "0.45621878", "text": "public function testCreditorClassificationGETRequestClassificationsClassificationIDGet()\n {\n }", "title": "" }, { "docid": "bcc4c288857358eb9ef2c9ac246b55d4", "score": "0.45497543", "text": "public function delete_testimonials(){\n\t\tif ($this->checkLogin('A') == ''){\n\t\t\tredirect(ADMIN_ENC_URL);\n\t\t}else {\t\t\n\t\t\t$testimonials_id = $this->uri->segment(4,0);\n\t\t\t$condition = array('_id' => MongoID($testimonials_id));\n\t\t\t$this->testimonials_model->commonDelete(TESTIMONIALS,$condition);\n\t\t\t$this->setErrorMessage('success','Testimonial deleted successfully','admin_testimonial_deleted');\n\t\t\tredirect(ADMIN_ENC_URL.'/testimonials/display_testimonials_list');\n\t\t}\n\t}", "title": "" }, { "docid": "e8b0ecb10a9ae9b23159fa4f86a667e1", "score": "0.4541549", "text": "public function getUserIdListRequest(string $id, int $limit = 10, int $offset = null): Request\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 getUserIdList'\n );\n }\n if ($limit !== null && $limit > 100) {\n throw new InvalidArgumentException('invalid value for \"$limit\" when calling CustomListApi.getUserIdList, must be smaller than or equal to 100.');\n }\n if ($limit !== null && $limit < 1) {\n throw new InvalidArgumentException('invalid value for \"$limit\" when calling CustomListApi.getUserIdList, must be bigger than or equal to 1.');\n }\n\n if ($offset !== null && $offset < 0) {\n throw new InvalidArgumentException('invalid value for \"$offset\" when calling CustomListApi.getUserIdList, must be bigger than or equal to 0.');\n }\n\n\n $resourcePath = '/user/{id}/list';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($limit !== null) {\n if(self::FORM === self::FORM && is_array($limit)) {\n foreach($limit as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams[self::LIMIT] = $limit;\n }\n }\n // query params\n if ($offset !== null) {\n if(self::FORM === self::FORM && is_array($offset)) {\n foreach($offset as $key => $value) {\n $queryParams[$key] = $value;\n }\n }\n else {\n $queryParams[self::OFFSET] = $offset;\n }\n }\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . self::ID . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n [self::APPLICATION_JSON]\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n [self::APPLICATION_JSON],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n self::NAME => $formParamName,\n self::CONTENTS => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers[self::CONTENT_TYPE] === self::APPLICATION_JSON) {\n $httpBody = Utils::jsonEncode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = Query::build($formParams);\n }\n }\n\n // this endpoint requires Bearer authentication (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers[self::AUTHORIZATION] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent() !== '') {\n $defaultHeaders[self::USER_AGENT] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = Query::build($queryParams);\n return new Request(\n self::GET,\n $this->config->getHost() . $resourcePath . ($query !== '' ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "afa4c3e108697fce48cafb2b71ab1467", "score": "0.4530889", "text": "public function tripbuilderFetchApiTest()\n {\n $response = $this->json('get', 'api/tripbuild',['start_date'=>'15-04-21', 'retun_date'=>'15-04-21','deperture_from'=>'YUL','arrival_from'=>'YVR','two_way'=>'true','airline'=>'false','by_price'=>'false','page'=>2]);\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "301778399dbf6176578daf2d9106b6e2", "score": "0.4527788", "text": "function updateTestimonials($slideId)\r\n {\r\n \t\t\r\n $this->load->library('form_validation');\r\n $this->form_validation->set_rules('profile_name','Name','trim|required');\r\n $this->form_validation->set_rules('youtube_url','Testimonial URL','trim|required');\r\n $this->form_validation->set_rules('short_description','Profile Short Description','trim|required');\r\n $this->form_validation->set_rules('meta_title','Meta Title','trim|required');\r\n $this->form_validation->set_rules('meta_keyword','Meta Keyword','trim|required');\r\n $this->form_validation->set_rules('meta_description','Meta Description','trim|required');\r\n \r\n // $this->form_validation->set_rules('heading','Email','trim|required|max_length[28]');\r\n \r\n if($this->form_validation->run() == FALSE)\r\n {\r\n $this->newTestimonials();\r\n }\r\n else\r\n {\r\n \r\n $profile_name = $this->security->xss_clean($this->input->post('profile_name'));\r\n $video_url = $this->security->xss_clean($this->input->post('youtube_url'));\r\n $short_description = $this->security->xss_clean($this->input->post('short_description'));\r\n $meta_title = $this->security->xss_clean($this->input->post('meta_title'));\r\n $meta_keyword = $this->security->xss_clean($this->input->post('meta_keyword'));\r\n $meta_description = $this->security->xss_clean($this->input->post('meta_description'));\r\n $published = $this->security->xss_clean($this->input->post('published'));\r\n \r\n \r\n \r\n $slideInfo = array();\r\n $slideInfo['name'] = $profile_name;\r\n //$slideInfo['profile_title'] = $profile_title;\r\n $slideInfo['video_url'] = $video_url;\r\n $slideInfo['published'] = $published; \r\n $slideInfo['intro'] = $short_description; \r\n $slideInfo['meta_title'] = $meta_title; \r\n $slideInfo['meta_keywords'] = $meta_keyword; \r\n $slideInfo['meta_description'] = $meta_description; \r\n $slideInfo['updatedby'] = $this->session->userdata('userId');\r\n $slideInfo['updated_datetime'] = @date('Y-m-d H:i:s');\r\n \r\n if(!empty($_FILES['profile_image']['name'])){\r\n $fileUpload = $this->do_upload('profile_image','testimonials/');\r\n if($fileUpload['success'] == 1){\r\n $uploadedFile = base_url().'assets/uploads/testimonials/'.$fileUpload['upload_data']['file_name'];\r\n $slideInfo['image_path'] = $uploadedFile; \r\n }\r\n }\r\n\t\t\t\t\r\n // print_r($slideInfo);die;\r\n $result = $this->testimonials_model->updateTestimonials($slideInfo, $slideId);\r\n \r\n if($result > 0)\r\n {\r\n $this->session->set_flashdata('success', 'Testimonial has been updated successfully');\r\n }\r\n else\r\n {\r\n $this->session->set_flashdata('error', 'Testimonial updation failed');\r\n } \t\t\t\t\r\n redirect('editTestimonials/'.$slideId);\r\n }\r\n \r\n }", "title": "" }, { "docid": "732e299b8b251c58e7e4de1d495f0d00", "score": "0.45257205", "text": "public function createRandomInboxRequest($allow_team_access = null, $use_domain_pool = null, $expires_at = null, $expires_in = null, $email_address = null, $inbox_type = null, $description = null, $name = null, $tags = null, $favourite = null, $virtual_inbox = null, $use_short_address = null, $domain_name = null, $domain_id = null, string $contentType = self::contentTypes['createRandomInbox'][0])\n {\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n $resourcePath = '/createInbox';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $allow_team_access,\n 'allowTeamAccess', // param base name\n 'boolean', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $use_domain_pool,\n 'useDomainPool', // param base name\n 'boolean', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $expires_at,\n 'expiresAt', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $expires_in,\n 'expiresIn', // param base name\n 'integer', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $email_address,\n 'emailAddress', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $inbox_type,\n 'inboxType', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $description,\n 'description', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $name,\n 'name', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $tags,\n 'tags', // param base name\n 'array', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $favourite,\n 'favourite', // param base name\n 'boolean', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $virtual_inbox,\n 'virtualInbox', // param base name\n 'boolean', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $use_short_address,\n 'useShortAddress', // param base name\n 'boolean', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $domain_name,\n 'domainName', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n // query params\n $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(\n $domain_id,\n 'domainId', // param base name\n 'string', // openApiType\n 'form', // style\n true, // explode\n false // required\n ) ?? []);\n\n\n\n\n $headers = $this->headerSelector->selectHeaders(\n ['*/*', ],\n $contentType,\n $multipart\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 (stripos($headers['Content-Type'], 'application/json') !== false) {\n # if Content-Type contains \"application/json\", json_encode the form parameters\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n } else {\n // for HTTP post (form)\n $httpBody = ObjectSerializer::buildQuery($formParams);\n }\n }\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 $operationHost = $this->config->getHost();\n $query = ObjectSerializer::buildQuery($queryParams);\n return new Request(\n 'POST',\n $operationHost . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "f6e0502b1ede653da259f7dc31d4164b", "score": "0.45163447", "text": "public function testapi_for_get_all()\n {\n $req = $this->get('/api/jobs', [\n \"Content-Type\" => \"application/json\",\n \"Authorization\" => $this->authuser\n ]);\n\n $this->assertResponseStatus(201);\n }", "title": "" }, { "docid": "8b6cfba9d74218d0316e0a11df25fcc2", "score": "0.4511695", "text": "protected function officesGetRequest()\n {\n\n $resourcePath = '/offices';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\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 (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": "4e5dd65bfc9516ef95841d780e9e5041", "score": "0.45090595", "text": "function editTestimonials($slideId = NULL)\r\n {\r\n\t\t\r\n \r\n if($slideId == null)\r\n {\r\n redirect('manageTestimonials');\r\n }\r\n //$data['cubes'] = $this->profile_model->getActiveProfileCat();\r\n $data['slideInfo'] = $this->testimonials_model->getTestimonialsInfo($slideId)[0];\r\n\t\t\t//echo '<pre>';print_r($data);die;\r\n $this->global['pageTitle'] = 'Indiatoday : Edit Testimonials';\r\n \r\n $this->loadViews(\"editTestimonials\", $this->global, $data, NULL);\r\n\r\n }", "title": "" }, { "docid": "d67900dde96c842886eb3328e0472656", "score": "0.44968212", "text": "public function get($testId);", "title": "" }, { "docid": "9c5a8e4edb456213546e0d1a82ff6d0f", "score": "0.4491442", "text": "public function index()\n {\n $testimonials = Testimonial::all();\n return view('testimonial.index',compact('testimonials'));\n }", "title": "" }, { "docid": "3b1519cac791398f89d6a64206acc351", "score": "0.4487796", "text": "protected function getLearningSkillsTeachingClassItemRequest($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 getLearningSkillsTeachingClassItem'\n );\n }\n\n $resourcePath = '/api/auth/v1/teaching-class/{id}/learning-skills';\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/ld+json', 'application/json', 'text/html']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/ld+json', 'application/json', 'text/html'],\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 // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('Authorization');\n if ($apiKey !== null) {\n $headers['Authorization'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "888f01ed3024f5271edd2364b660135d", "score": "0.44771445", "text": "public function testimonialtoolAction()\n{\n$this->layout()->setTemplate('layout/master'); \n $userCountryids=$this->getuserCountryids();\n $whereData=array();\n if(count($userCountryids)){\n $whereData= array('country'=>$userCountryids);\n }\n$testimonial=$this->getEntityManager()->getRepository('Testimonial\\Entity\\Testimonial')->findBy($whereData,array('created' => 'DESC'));\nreturn new ViewModel(\narray(\n'testimonials'=>$testimonial,\n ));\n\n\n\n}", "title": "" }, { "docid": "62b51e5ff7c984b3690b23eaee29222d", "score": "0.447158", "text": "private function createRequest($action, $params) {\n return $this->httpClient->createRequest(\"POST\", $action, [\"json\" => $params]);\n }", "title": "" }, { "docid": "4a93909df06e88817252bbed9f4c9208", "score": "0.4467995", "text": "public function getAll($user_id = false);", "title": "" }, { "docid": "87c3f0288a013251a48b0220690604c1", "score": "0.4460935", "text": "function addNewTestimonials()\r\n {\r\n \r\n $this->load->library('form_validation');\r\n $this->form_validation->set_rules('profile_name','Name','trim|required');\r\n $this->form_validation->set_rules('youtube_url','Testimonial URL','trim|required');\r\n $this->form_validation->set_rules('short_description','Profile Short Description','trim|required');\r\n $this->form_validation->set_rules('meta_title','Meta Title','trim|required');\r\n $this->form_validation->set_rules('meta_keyword','Meta Keyword','trim|required');\r\n $this->form_validation->set_rules('meta_description','Meta Description','trim|required');\r\n //$this->form_validation->set_rules('profile_image','Profile Image','trim|required');\r\n // $this->form_validation->set_rules('heading','Email','trim|required|max_length[28]');\r\n if($this->form_validation->run() == FALSE)\r\n {\r\n $this->newProfile();\r\n }\r\n else\r\n {\r\n\r\n $profile_name = $this->security->xss_clean($this->input->post('profile_name'));\r\n $video_url = $this->security->xss_clean($this->input->post('youtube_url'));\r\n $short_description = $this->security->xss_clean($this->input->post('short_description'));\r\n $meta_title = $this->security->xss_clean($this->input->post('meta_title'));\r\n $meta_keyword = $this->security->xss_clean($this->input->post('meta_keyword'));\r\n $meta_description = $this->security->xss_clean($this->input->post('meta_description'));\r\n $published = $this->security->xss_clean($this->input->post('published'));\r\n \r\n \r\n\t\t\t\t$slideInfo = array();\r\n\t\t\t\t$slideInfo['name'] = $profile_name;\r\n\t\t\t\t//$slideInfo['profile_title'] = $profile_title;\r\n $slideInfo['video_url'] = $video_url;\r\n $slideInfo['published'] = $published; \r\n $slideInfo['intro'] = $short_description; \r\n $slideInfo['meta_title'] = $meta_title; \r\n $slideInfo['meta_keywords'] = $meta_keyword; \r\n\t\t\t\t$slideInfo['meta_description'] = $meta_description;\t\t\t\t\r\n\t\t\t\t$slideInfo['createdby'] = $this->session->userdata('userId');\r\n\t\t\t\t$slideInfo['created_datetime'] = @date('Y-m-d H:i:s');\r\n\t\t\t\t$slideInfo['updated_datetime'] = $slideInfo['created_datetime'];\r\n \r\n if(!empty($_FILES['profile_image']['name'])){\r\n $fileUpload = $this->do_upload('profile_image','testimonials/');\r\n if($fileUpload['success'] == 1){\r\n $uploadedFile = base_url().'assets/uploads/testimonials/'.$fileUpload['upload_data']['file_name'];\r\n $slideInfo['image_path'] = $uploadedFile; \r\n \r\n }\r\n }\r\n\r\n $result = $this->testimonials_model->addNewTestimonials($slideInfo);\r\n // print_r($slideInfo);die;\r\n \r\n \r\n if($result > 0)\r\n {\r\n $this->session->set_flashdata('success', 'New Profile created successfully');\r\n redirect('manageTestimonials');\r\n }\r\n else\r\n {\r\n $this->session->set_flashdata('error', 'Profile creation failed');\r\n redirect('newTestimonials');\r\n } \r\n \r\n }\r\n \r\n }", "title": "" }, { "docid": "c69c00fafa244bb91d31486cd1239210", "score": "0.44558218", "text": "public function testRecommendedStory(){\n\t\t$this->userId = 105;\n\t\t$this->storyId = 'DF.1901';\n\t\t$url = 'http://188.113.108.37/requests/controller.php';\n\t\t$postarray = json_encode(array('type'=>'recommendedStory','userId'=>$this->userId, 'storyId'=>$this->storyId));\n \n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n \n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $postarray);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n \n\t\t$response = curl_exec($ch);\n\t\t//print_r(\"\\n\".$response);\n\t\tcurl_close($ch);\n\t\t\n\t\t//TESTING??? \n\n\t}", "title": "" }, { "docid": "4afc19c178d3def161c8d6acc216332a", "score": "0.4446263", "text": "public function save(TestimonialRequest $request)\n {\n\n $this->testimonialService->save($request);\n if (empty($request->testimonial_id)) {\n flash('Testimonial created successfully.')->success();\n } else {\n flash('Testimonial Updated successfully.')->success();\n }\n\n return redirect()->route('admin-testimonials-tab');\n }", "title": "" }, { "docid": "43c83ab6a28971a09cd4bb0346ea9444", "score": "0.44440442", "text": "public function getCreateTestimonialForm()\n {\n $this->testimonialForm->bind(clone $this->getTestimonialPrototype());\n\n return $this->testimonialForm;\n }", "title": "" }, { "docid": "414713d2583977f59156c051706c89b5", "score": "0.4443736", "text": "public function testExample()\n {\n $this->generateUser(10);\n $response = $this->get($this->url)->assertStatus(200);\n $this->assertTrue(count(json_decode($response->content())) == 10);\n }", "title": "" }, { "docid": "b6a294985f72485d81378b23eba8cc3d", "score": "0.4434868", "text": "public function create()\n {\n return view('admin.testimonials.create');\n }", "title": "" }, { "docid": "b6a294985f72485d81378b23eba8cc3d", "score": "0.4434868", "text": "public function create()\n {\n return view('admin.testimonials.create');\n }", "title": "" }, { "docid": "a699fc9f4bad51cacfba6d1948e7cf62", "score": "0.44270518", "text": "protected function recipeIdPhpGetRequest($id, $user_id = 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 recipeIdPhpGet'\n );\n }\n\n $resourcePath = '/recipe/id.php';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($id !== null) {\n $queryParams['id'] = ObjectSerializer::toQueryValue($id, null);\n }\n // query params\n if ($user_id !== null) {\n $queryParams['user_id'] = ObjectSerializer::toQueryValue($user_id, null);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_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 $queryParams['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 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "da0ebb00a37fb6a78d4d0e1fe08a9eed", "score": "0.44255254", "text": "public function testRequestHasNoParams(): void\n {\n $client = ComicsControllerIndexTest::createClient();\n $client->request('GET', self::$url);\n $response = json_decode($client->getResponse()->getContent(), true);\n\n $this->assertResponseIsSuccessful();\n $this->assertSame(20, count($response));\n\n }", "title": "" }, { "docid": "727491e8dc00ac2551c8c386929ec4f4", "score": "0.4424457", "text": "public function index()\n\t{\n\t\t$page = Input::get('page', 1);\n $perPage = config_db_cached('settings::per_page');\n $pagiData = $this->testimonial->paginate($page, $perPage, true);\n $testimonials = new LengthAwarePaginator($pagiData->items, $pagiData->totalItems, $perPage, $page, [\n 'path' => Paginator::resolveCurrentPath()\n ]);\n $testimonials->setPath('');\n\n return view('frontend.testimonial.index', compact('testimonials'));\n\t}", "title": "" }, { "docid": "3f627b67ad0209a93aafb1df79e593c0", "score": "0.44181067", "text": "protected function usersGetUserMetadataRequest()\n {\n\n $resourcePath = '/v0.1/user/metadata/optimizely';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\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 API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('X-API-Token');\n if ($apiKey !== null) {\n $headers['X-API-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 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "bf72239ff2628e9fc42d3df475fc74f0", "score": "0.44178638", "text": "public function testUserTransactions()\n {\n \n $user = User::inRandomOrder()->first();\n \n $header = [ 'Authorization' => 'bearer '.$user->api_key];\n\n \n\n $response = $this->get('/api/v1/transactions/'.$user->id, $header);\n $response->seeStatusCode(200);\n }", "title": "" }, { "docid": "e2973b7066405b8ce3ac063f8e1d8ffb", "score": "0.44174072", "text": "public function tesGetRequestTest()\n {\n $client = new Client();\n\n $response = $client->get('http://34.203.203.222/submit?git=https://github.com/GoJanhavi/user-auth-test-case.git');\n $this->assertEquals(200, $response->getStatusCode());\n }", "title": "" } ]
f1ff64d7a5d4f408cab43e83481e7733
authenticate if user is logged in
[ { "docid": "8cced4da99104085a38d17af2760cf3e", "score": "0.71258914", "text": "function authenticate_user(){\n if (isset($_SESSION['user'])) {\n # code...\n return true;\n\n }else {\n\n return false;\n\n }\n }", "title": "" } ]
[ { "docid": "d62c5a3ace72510caa828d0fab868af7", "score": "0.81083775", "text": "public function is_authenticated();", "title": "" }, { "docid": "38fbfb3497a4513f5fed215ef3dc850d", "score": "0.80121183", "text": "public function authenticate() {\r\n\t\t\t//must be signed in to access\r\n\t\t\tif ($this->user->isSignedin() === false) {\r\n\t\t\t\tredirect(site_url('auth'));\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "9c252dc49278a59dc158e27405d30841", "score": "0.7966438", "text": "public function authenticate()\n\t{\n\t\tif(!$this->isLoggedIn)\n\t\t{\n\t\t\tdefine('LOGGED_IN', false);\n\n\t\t\t$this->redirectToLogin();\n\n\t\t\t//return false;\n\t\t}\n\n\t\tdefine('LOGGED_IN', true);\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "1d8f11a07a6b988b2a8f13f3754e41cb", "score": "0.7727773", "text": "public function authenticateUser(){\r\n \r\n if( isset($_SESSION['isLoggedIn']) && $_SESSION[\"isLoggedIn\"] == true){\r\n return true;\r\n }\r\n else{\r\n echo \"access not granted\";\r\n $this->redirectToLogin();\r\n }\r\n }", "title": "" }, { "docid": "cb53795ce8294b4d70ce464c3f5331bd", "score": "0.77177465", "text": "public function authenticate(){\n\t\tif($this->model->isUserLogged($this->view->getClientIdentifier())){\n\t\t\t\n\t\t\t/* Use Case 2 Logging out an authenticated user */\n\t\t\treturn $this->logoutUser();\n\t\n\t\t// if user is out logged and...\n\t\t} else {\n\t\t\t\n\t\t\t// ...has stored credentials\n\t\t\tif($this->view->hasStoredCredentials()){\n\t\t\t\t\n\t\t\t\t/* Use Case 3 Authentication with saved credentials */\n\t\t\t\treturn $this->authCredUser();\n\t\t\t\t\n\t\t\t// ...does not have stored credentials\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\t/* Use Case 1 Authenticate user */\n\t\t\t\treturn $this->authUser();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "82db4151dbf4df66b60f5984e8d6d4da", "score": "0.7705074", "text": "public function isAuthenticated();", "title": "" }, { "docid": "82db4151dbf4df66b60f5984e8d6d4da", "score": "0.7705074", "text": "public function isAuthenticated();", "title": "" }, { "docid": "82db4151dbf4df66b60f5984e8d6d4da", "score": "0.7705074", "text": "public function isAuthenticated();", "title": "" }, { "docid": "9d0b461e87c67947c61785237a6df118", "score": "0.7592133", "text": "public function is_authenticated(){\n\n\n $user_id = $this->_ci->session->userdata('logged_in');\n\n /**\n * If user is set in the session user is authorized\n */\n if(empty($user_id)):\n return FALSE;\n endif;\n\n if(empty($this->user)):\n try {\n $user = $this->user_model->get($user_id);\n $this->_setup_user($user);\n }catch (ObjectDoesNotExist $e){\n return FALSE;\n }\n endif;\n\n\n return TRUE;\n\n }", "title": "" }, { "docid": "5521df30632e387b54dc9ec3a0c59767", "score": "0.7583667", "text": "abstract public function isAuthenticated();", "title": "" }, { "docid": "0f6d35bdcd9dd90ac8e9bcd02633e3e9", "score": "0.75818354", "text": "public function loggedIn() {\n if(Paithal::getInstance()->user) return true;\n else return false;\n }", "title": "" }, { "docid": "14460c4750bc9c2ec8ba16f6db1527b3", "score": "0.7536173", "text": "function isAuthenticated() {\r\n\t\t\treturn true;\r\n\t\t}", "title": "" }, { "docid": "bd50d4eed87911ad42fd0c941d91eee4", "score": "0.7529539", "text": "protected function authenticate()\n {\n // Capturamos las credenciales y las enviamos al\n // metodo para realizar la validacion.\n $this->hasValidCredentials($this->getCredentials());\n\n // Si no hay acceso despues de intentar logeo\n // enviamos a la vista de login.\n if (!Session::auth()) {\n $this->showLoginForm();\n }\n }", "title": "" }, { "docid": "f783b689868385b6caf439e49d4fe1f2", "score": "0.7526196", "text": "public function authenticate(){\n if( user()->authenticate( post()->getRaw('user'), post()->getRaw('pass') ) ){\n\t\t\trouter()->redirectToUrl(user()->postLoginRedirect());\n\t\t} else {\n\t\t\tuser()->login_failed();\n\t\t}\n\t}", "title": "" }, { "docid": "9d4f213d370e5852e06358aa5d878aa6", "score": "0.74500024", "text": "public function isLoggedIn();", "title": "" }, { "docid": "9d4f213d370e5852e06358aa5d878aa6", "score": "0.74500024", "text": "public function isLoggedIn();", "title": "" }, { "docid": "9d4f213d370e5852e06358aa5d878aa6", "score": "0.74500024", "text": "public function isLoggedIn();", "title": "" }, { "docid": "f1e72c28d4d8a729982b265b72a96c56", "score": "0.74163765", "text": "public function isAuthenticated(){\n\t\treturn $_SESSION['loggedIn'];\n\t}", "title": "" }, { "docid": "ca0ff1c738c1780b319291b4697986d5", "score": "0.7416311", "text": "public function authenticate()\n {\n if(!$this->Session->check('User'))\n {\n $this->redirect(array('controller' => 'users', 'action' => 'login_form'));\n exit();\n }\n }", "title": "" }, { "docid": "518f6b471263eef62f6548ca1a8af1e8", "score": "0.7408088", "text": "public function __isAuthenticated();", "title": "" }, { "docid": "84175ab10e9c3add430d7652f59b0c42", "score": "0.7357145", "text": "public static function auth() {\n\n\t\t# first we will save the current url so we could redirect\n\t\t# the user after loggin in.\n\t\t$lastUri = \"http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]\";\n\n\t\t# get board model and check if the current user\n\t\t# in the session is authenticated already.\n\t\t$board = self::getModel('board');\n\n\t\t# save the redirection for the unauthenticated users\n\t\t$uri = self::getBaseUrl() . 'board/login';\n\n\t\t# now check if the user is auth\n\t\tif(! $board->isAuth() ) {\n\t\t\t# automatically redirect to login if it fails the check\n\t\t\theader('location: ' . self::getBaseUrl() . 'board/login?redirect=' . $lastUri);\n\t\t\texit();\n\t\t}\n\t\t\n\t\t# if the user passed the check\n\t\t# then return true\n\t\treturn true;\n\t}", "title": "" }, { "docid": "892396307acb04f6645fd4d45b4b39c2", "score": "0.73415536", "text": "function _authenticate() {\n if (isset($_SESSION['username'])&&$_SESSION['activity']>time()-User::$timeout*60) {\n if ($this->_load($_SESSION['username'])) {\n $this->loggedIn = true;\n return true;\n }\n return false;\n } else {\n $this->_logout();\n return false;\n }\n }", "title": "" }, { "docid": "c21612147ada8feabd03311a75e3633f", "score": "0.73248863", "text": "public static function isAuthenticated(){\n return DI::getDefault()->getSession()->get('user') !== null;\n }", "title": "" }, { "docid": "324e0cc60cea7bc6114e53bc4c88ce20", "score": "0.7302516", "text": "protected function authenticate()\n {\n $user_data = $this->getUserData();\n\n $auth = fn_fill_auth($user_data);\n $auth['is_token_auth'] = !empty($user_data['is_token_auth']);\n\n $this->auth = Tygh::$app['session']['auth'] = $auth;\n\n // Return value must be bool\n return !empty($this->auth['user_id']);\n }", "title": "" }, { "docid": "fb88f18c29428259cfc73975bdb5b0ab", "score": "0.729396", "text": "function auth() {\n // If the user has previously been authenticated\n if(isset($_SESSION['adminUsername']) && isset($_SESSION['adminPassword'])) \n {\n $this->username = $_SESSION['adminUsername'];\n $this->password = $_SESSION['adminPassword'];\n $auth = $this->get(1);\n\n if($this->password == $auth['password']) \n {\n\t\t\t\t$logged = true;\n }\n }\n else // If the user is authenticating\n {\n $auth = $this->get(0);\n\t\t\t\n // Set the sessions\n $_SESSION['adminUsername'] = $this->username;\n\n if($this->password == $auth['password']) \n {\n $logged = true;\n\t\t\t\tsession_regenerate_id();\n }\n }\n\n if(isset($logged)) \n {\n $_SESSION['is_admin'] = true;\n return $auth;\n }\n\n return false;\n }", "title": "" }, { "docid": "3208f7847ca01ebf4637f55c0b383064", "score": "0.7281798", "text": "public function isAuthenticated(): bool;", "title": "" }, { "docid": "e583a14a8f888cb1986894f12e9ab65c", "score": "0.7272552", "text": "public function logged_in() {\n return true;\n }", "title": "" }, { "docid": "18ee8b328b627efb82cacbecfd65ac10", "score": "0.72700715", "text": "public function logged_in() {\n $token = $this->token();\n if ($token) {\n return $this->auth->verify($token);\n }\n return false;\n }", "title": "" }, { "docid": "d5711487ac683b96f731ac5fc339d14d", "score": "0.72478414", "text": "function bs_authenticate() {\n if ( !is_user_logged_in() ) {\n auth_redirect();\n }\n}", "title": "" }, { "docid": "e0b9b5598d08f510fde978941aee65f6", "score": "0.7240036", "text": "public function IsAuthenticated ();", "title": "" }, { "docid": "bf7641c0b03cb3e197e250dca004a5dc", "score": "0.7218374", "text": "function isLoggedIn()\n {\n return $this->getAuthOK();\n }", "title": "" }, { "docid": "7925ca7f67c9360c998b1e607eb0419f", "score": "0.7216753", "text": "public static function isAuthenticUser()\n {\n \n }", "title": "" }, { "docid": "569bcde1f8e715bff7be406cb8a9eb04", "score": "0.7205546", "text": "public function user_is_authenticated()\n {\n return $this->get_user_id() !== NULL;\n }", "title": "" }, { "docid": "aa77812bbba7aeee2cb1fb765bb2d5d6", "score": "0.71565914", "text": "public function isAuthenticated() {\n\t\treturn isset($_SESSION['user']) && $_SESSION['user'] instanceof Wol_User;\n\t}", "title": "" }, { "docid": "fb9d31c7ad5dfaae2a247c2bf56d8d11", "score": "0.7155395", "text": "function user_authenticate() {\n\n\t// get user_name and password from the request\n\t$request = get_request();\n\t$user_name = $request['user_name'];\n\t$password = $request['password'];\n\n\t$isSuccess = user_login($user_name, $password);\n\treturn $isSuccess;\n}", "title": "" }, { "docid": "ca7ec6d25ca33e1b4864627af8f69830", "score": "0.7150617", "text": "public function loggedIn()\n {\n\n return UsersUtility::checkAuth();\n\n }", "title": "" }, { "docid": "1c2dd69b66ad6b41676d5fa86efbf6ed", "score": "0.7125358", "text": "function is_authenticated() {\n\t\t// Checks if there's user data to retrieve.\n\t\t$this->get_user_info();\n\t\t// The user is logged in if the ID is set, there's user information to retrieve and the generated session ID is the same as the session ID stored in the the user entry\n\t\treturn (($this->get_user_id() > 0) && ($this->userinfo != NULL) && ($this->userinfo->session_id == $this->get_session_id()));\n }", "title": "" }, { "docid": "655e6b2fb8c7ea15a64ab873eb0b25b0", "score": "0.71249145", "text": "public function logged_in()\n\t{\n\t\tif (isset($this->ignored_methods[$this->config_name]) && in_array(Request::instance()->action, $this->ignored_methods[$this->config_name]))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// Get the user from the session\n\t\t$user = $this->session->get($this->config['session_key']);\n\t\t\n\t\t$status = is_object($user) ? true : false;\n\t\t\n\t\t// Get the user from the cookie\n\t\tif ($status == false)\n\t\t{\n\t\t\t$token = Cookie::get(\"authlite_{$this->config_name}_autologin\");\n\t\t\t\n\t\t\tif (is_string($token))\n\t\t\t{\n\t\t\t\t$user = ORM::factory($this->user_model)->find(array($this->session_column => $token));\n\t\t\t\t\n\t\t\t\tif (is_object($user))\n\t\t\t\t{\n\t\t\t\t\t$status = true;\n\t\t\t\t\t$this->session->set($this->config['session_key'], $user);\n\t\t\t\t\tCookie::set(\"authlite_{$this->config_name}_autologin\", $token, $this->config['lifetime']);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ($status == true)\n\t\t{\n\t\t\treturn $user;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "35849c5f73ee11fb3389f0fc4ad0135d", "score": "0.7118225", "text": "public function isAuthenticated()\n\t{\n\t\t$this->respondData( ['result' => $this->session->has( 'auth_user_id' )] );\n\t}", "title": "" }, { "docid": "de37d5fefa892267d6bb65cb660c066b", "score": "0.7106944", "text": "static function logged_in()\n {\n $ci = &get_instance();\n $logged_in = ($ci->tank_auth->is_logged_in()) ? TRUE : FALSE;\n if(!$logged_in) redirect('login');\n return ;\n }", "title": "" }, { "docid": "c6dec0ac43305fd4b3a0fdba1781d46e", "score": "0.70931405", "text": "public function isAuthenticated(){\n\t\treturn $this->authenticated;\n\t}", "title": "" }, { "docid": "9cec21b317f7f1533b988bf77a8c3aad", "score": "0.7091376", "text": "public function authenticate();", "title": "" }, { "docid": "9cec21b317f7f1533b988bf77a8c3aad", "score": "0.7091376", "text": "public function authenticate();", "title": "" }, { "docid": "ac873b5178d1523b4ca0cb34b570f838", "score": "0.708428", "text": "public function checkIsUserAuth()\n {\n if (!isset($_COOKIE['login'])) {\n $this->request->redirect('/login');\n }\n }", "title": "" }, { "docid": "32ab903f49ea165204ee0ca87799952c", "score": "0.70791185", "text": "public function authenticate() {\n\t\t \n\t\t$db = db_connect();\n $statement = $db->prepare(\"select * from admin WHERE email = :email and password = :password;\");\n $statement->bindValue(':email', $this->email);\n $statement->bindValue(':password', md5($this->password));\n $statement->execute();\n $rows = $statement->fetchAll(PDO::FETCH_ASSOC);\n\t\t\n\t\tif ($rows) {\n\t\t\t$this->auth = true;\n\t\t\t$_SESSION['name'] = $rows[0]['name'];\n\t\t\t$_SESSION['role'] = 'admin';\n\t\t}\n }", "title": "" }, { "docid": "2088e0343f8032cd4dd0b63415ed2161", "score": "0.7072355", "text": "function IsAuthenticated() {\r\n global $principal;\r\n if (isset($_SESSION['cwipsPrincipalData'])) {\r\n $principal->initFromRawData($_SESSION['cwipsPrincipalData']);\r\n return true;\r\n }\r\n return false;\r\n }", "title": "" }, { "docid": "afc0c273089d76969f90695a0df1c51e", "score": "0.7069712", "text": "public function authenticated(){\n if($this->uri->segment(1) != 'auth' && $this->uri->segment(1) != ''){\n if( !$this->session->userdata('authenticated')) // kalau belum login\n redirect('auth'); // diarahkan ke halaman login\n }\n }", "title": "" }, { "docid": "3b14db071b77809e1668a2a062808136", "score": "0.7064868", "text": "public function authenticated(){\n $session = isset($_SESSION[User::STACKMOB_LOGGED_IN_COOKIE]);\n return ($this->isCurrent() && $session);\n }", "title": "" }, { "docid": "f3fe5d62591d8c2a47278319a91d97c9", "score": "0.70607525", "text": "private function auth() {\n if (!is_null($this->session_id)) {\n return;\n }\n\n $xml = $this->request(GET, 'Library/{library_id}/logIn/' . $this->name . '/' . $this->pass, false);\n\n $sessionId = (string)$xml->SessionId;\n if (strlen($sessionId) == 0) {\n return false;\n }\n\n $this->session_id = $sessionId;\n\n return true;\n }", "title": "" }, { "docid": "76201d9d247f092ae7789009ebc9a84e", "score": "0.7039531", "text": "public function isSessionLoggedIn();", "title": "" }, { "docid": "c8d3b4b2f9406a64149e63c0de487e60", "score": "0.70288193", "text": "private function checkAuth() {\n\t\t$result = false;\n\t\t// Verify if variable loggedin is set\n\t\tif(!$this->member->has('loggedin')){\n\t\t\t$this->message->set('text',\"you_must_create_an_account_or_sign_in_to_access_this_area\");\n\t\t\t$this->message->set('type','error');\n\t\t\t$this->view->setVar('message',$this->message);\n\t\t}else{\n\t\t\t$users = (new Members())->find($this->member->has('idMember'));\n\t\t\tif(count($users)){\n\t\t\t\t$this->user = $users[0];\n\t\t\t}\n\t\t\t$result =true;\n\t\t}\t\n\t\treturn $result;\t\t\n\t}", "title": "" }, { "docid": "71b3549aa3d6166ebbc0dfda64360caa", "score": "0.70281535", "text": "protected function authenticate(){\n\t}", "title": "" }, { "docid": "c164bcbd925bdffca084fafa0229b8ec", "score": "0.7024116", "text": "function authenticate() {\n\t\t$this->output_data['function'] = __FUNCTION__;\n\t\t\n\t\tif (is_logged()) {\n\t\t\t$this->home();\n\n\t\t} else {\n\t\t\t$this->form_validation->set_rules('email', 'Email Address', 'trim|required');\n\t\t\t$this->form_validation->set_rules('password', 'Password', 'trim|required|md5');\n\n\t\t\t$valid_user = FALSE;\n\t\t\t$msg = \"\";\n\n\t\t\tif ($this->form_validation->run() != FALSE){//\techo 'valid';\n\t\t\t\t$valid_user = $this->lx->trylogin($this->input->post(\"email\"), $this->input->post(\"password\"));\n\t\t\t\t\n\t\t\t\tif(!$valid_user) {\n\t\t\t\t\t$msg = '<div class=\"alert\">Invalid User Account</div>'; \n\t\t\t\t} else {\n\t\t\t\t\t$this->home();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->output_data['msg'] = $msg;\n\t\t\t$this->load->view(\"login\", $this->output_data);\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "5d18f81d57e0c5f89110c1e3d2f82b3b", "score": "0.7020085", "text": "public function isAuthenticated()\n {\n if ($this->_authenticated === null) {\n $this->_authenticated = parent::authenticate($this->_pass);\n }\n return $this->_authenticated;\n }", "title": "" }, { "docid": "0307159448229b4bed9784c81ca89b06", "score": "0.7016", "text": "public function logged_in(){\r\n\t\treturn ($this->valid_session()&&isset($_SESSION['user']['id'])&&isset($_SESSION['user']['name'])&&isset($_SESSION['user']['email']));\r\n\t}", "title": "" }, { "docid": "61cf86689db19c1e1621d89ea93f917f", "score": "0.7014594", "text": "private function isUserInAuth(){\n\t\t$auth = new AuthenticationService();\n\t if ($auth->hasIdentity()) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t }", "title": "" }, { "docid": "0d38ce0da878b543825bb588c0f4b184", "score": "0.70136636", "text": "public function authorize()\n {\n // Si no existe usuario autentica procedemos\n // a validar los request.\n if (!Session::auth()) {\n // En caso de que sea una peticion de tipo GET\n // mostramos la vista de login.\n if ($this->isGet()) {\n $this->showLoginForm();\n exit();\n }\n\n // Si la peticion es de tipo POST intentamos\n // validar el request.\n if ($this->isPost()) {\n $this->authenticate();\n }\n }\n }", "title": "" }, { "docid": "f214d1e5f69b158ebf9926f5dd552fc3", "score": "0.70116454", "text": "function phpfmg_user_isLogin(){\n return ( isset($_SESSION['authenticated']) && true === $_SESSION['authenticated'] );\n}", "title": "" }, { "docid": "2bc50786936b7b7b2a2d34b765ec6bf2", "score": "0.70102614", "text": "private function authenticate()\n {\n // attempt to login\n $response = $this->sendPost(\n 'user/auth/',\n [ 'email' => $this->email, 'password' => $this->password ],\n false,\n 'post' );\n\n // set some debug logging\n $this->debugInfo( [ 'auth' => $response ] );\n\n // return the token if we have it\n if ( isset( $response->status ) && $response->status == 'success' )\n {\n return $response->token;\n }\n else\n {\n return false;\n }\n }", "title": "" }, { "docid": "54322fc9835d386eea27057ad46faa29", "score": "0.7004306", "text": "public function userIsAuthenticated()\n {\n if (!Auth::check()) {\n\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "151ebb973f7120476a3cc0dbc105135d", "score": "0.7003874", "text": "public function isAuthenticated()\r\n {\r\n if(isset($_SESSION['password']))\r\n {\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "c524d155c0dadf6bc6a4b5aca6cabd96", "score": "0.6998368", "text": "public function is_authenticated(){\n \n return !empty($this->token);\n \n }", "title": "" }, { "docid": "c3e184755bc984ddc9958dba04335627", "score": "0.6982372", "text": "private function check_the_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->signed_in = true;\n\t\t\t}else {\n\t\t\t\tunset($this->user_id);\n\t\t\t\t$this->signed_in = false;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "38da1fb28673f6d822d18de624a16227", "score": "0.69608235", "text": "public function authenticated(): bool\n {\n return $this->status == self::STATUS_AUTHENTICATED;\n }", "title": "" }, { "docid": "8c0c7525d74fe896f21e014277c20855", "score": "0.6960547", "text": "public static function isAuthenticated() {\n return isset($_SESSION[Security::getUser()]) && $_SESSION[Security::getUser()]->id > 0;\n }", "title": "" }, { "docid": "9b89e3b8d115e1bdab21a3be481051bb", "score": "0.6932538", "text": "public function authenticateUser($user);", "title": "" }, { "docid": "10b94e1f2473c309c07832c0a0091bb6", "score": "0.69322056", "text": "protected function authenticated() {\n if(auth()->user()->isAdmin()):\n return redirect('/admin');\n else:\n return redirect('home');\n endif;\n }", "title": "" }, { "docid": "2474ab2454697f55be34d30993bb874e", "score": "0.69308835", "text": "private function authentication() { \n if (!isset($_SERVER['PHP_AUTH_USER']) || !(\n $this->isOrderAccount($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) || $this->isOrganismAccount($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) )\n ) {\n $this->getException(401);\n }\n }", "title": "" }, { "docid": "6abf046ee5a03f2b9313f638be47a84c", "score": "0.69280565", "text": "public static function checkAuthentication()\n {\n // initialize the session (if not initialized yet)\n Session::init();\n\n // if user is NOT logged in...\n // (if user IS logged in the application will not run the code below and therefore just go on)\n if (!self::userIsLoggedIn()) {\n\n // ... then treat user as \"not logged in\", destroy session, redirect to login page\n Session::destroy();\n\n // send the user to the login form page, but also add the current page's URI (the part after the base URL)\n // as a parameter argument, making it possible to send the user back to where he/she came from after a\n // successful login\n\n // header('location: ' . Config::get('URL') . 'login/?redirect=' . urlencode($_SERVER['REQUEST_URI']));\n // Redirect::to('login/?redirect='.ltrim(urlencode($_SERVER['REQUEST_URI']), '/'));\n Redirect::to('login/?redirect=' . urlencode($_SERVER['REQUEST_URI']));\n\n // to prevent fetching views via cURL (which \"ignores\" the header-redirect above) we leave the application\n // the hard way, via exit(). @see https://github.com/panique/php-login/issues/453\n // this is not optimal and will be fixed in future releases\n exit();\n }\n\n // Hook to check is a cookie exists and if it matches a remember me token in the database.\n // if (!Cookie::isValid()) {\n\n // }\n }", "title": "" }, { "docid": "ae56e59debed5c16e02c45494ff38e2c", "score": "0.69249684", "text": "public function authenticate()\n {\n $uid = $this->header('ID');\n $token = $this->header('X-Auth-Token');\n $user = Sentinel::findById($uid);\n if ($user) {\n return $user->api_token == $token;\n }\n return false;\n }", "title": "" }, { "docid": "75dc19df3f386e844da515f3011d53a0", "score": "0.6918558", "text": "static function isLoggedIn(){\n if(Uri::string() == 'account/signin'){\n return true;\n }\n \n if (isset($_SESSION['user']['id']) && $_SESSION['user']['id']) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "5a63b6b7a8b70784fe4ac7f9e3664281", "score": "0.6913466", "text": "public function isLoggedIn()\r\n\t{\r\n\t\tif ($this->httpContext->getValue(\\Magento\\Customer\\Model\\Context::CONTEXT_AUTH))\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telseif ($this->session->isLoggedIn())\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "812c9bcb08ef12656c23f228e6f62f09", "score": "0.6910694", "text": "public function authenticate() \n {\n $criteria = new CDbCriteria(array\n ( \n 'condition' => \"id = :id AND SHA1(CONCAT(`password`, `salt`)) = :cookiepass\",\n 'params' => array(':id' => intval($this->cookie[0]), ':cookiepass' => $this->cookie[1])\n ));\n \n // fetch the user. if fails -> returs null\n $user = User::model()->find($criteria); \n \n if(null === $user )\n {\n $this->errorCode = static::ERROR_UNKNOWN_IDENTITY;\n }\n else\n {\n $this->username = $user->login;\n $this->user = $user;\n $this->errorCode = static::ERROR_NONE;\n }\n \n return !$this->errorCode;\n }", "title": "" }, { "docid": "90681f21aca8a2f387575d7f097f70de", "score": "0.69048095", "text": "public function loggedIn()\r\n {\r\n if ($this->user != null)\r\n {\r\n return true;\r\n }\r\n return false;\r\n }", "title": "" }, { "docid": "ad82ba03cf45dd4dd9f8a9cc29597493", "score": "0.69047636", "text": "public function authenticate()\n\t{\n\n\t\t$response_raw = h\\Request::get( $this->config->user_doc_url( $this->name, \"main\" ) )\n\t\t\t->authenticateWith( $this->name, $this->pass )\n\t\t\t->sendsJson()\n\t\t\t->send();\n\n\t\t$response = json_decode( $response_raw, true );\n\n\t\t$this->is_auth = isset( $response['_id'] ) ? true : false;\n\n\t\treturn $this->is_auth;\n\n\t}", "title": "" }, { "docid": "9310e63c3093efe374eac1dc5c390e19", "score": "0.69033116", "text": "protected function _authenticate ()\n {\n if ($this->_getOption('use_dokuwiki_session') && ($userInfo = $this->_loadUserInfo())) {\n $this->_debugLog(sprintf(\"Loaded user from session\", $userInfo['uid']));\n return true;\n }\n \n $remoteUser = $this->_getShibVar($this->_getOption('var_remote_user'));\n if ($remoteUser) {\n \n $userId = $remoteUser;\n $userName = $this->_getUserName($userId);\n \n $this->_userInfo = array(\n 'uid' => $userId, \n 'name' => $userName, \n 'mail' => ''\n );\n \n $mails = $this->_getShibVar($this->_getOption('var_mail'), true);\n if (count($mails)) {\n $this->_userInfo['mail'] = $mails[0];\n }\n \n if (NULL !== $this->_getOption('defaultgroup')) {\n $this->_addUserGroup($this->_getOption('defaultgroup'));\n }\n \n if ((NULL !== $this->_getOption('superusers')) && is_array($this->_getOption('superusers')) && in_array($userId, $this->_getOption('superusers'))) {\n $this->_addUserGroup($this->_getOption('admingroup'));\n }\n \n $this->_setGroups();\n $this->_setCustomGroups($userId);\n $this->_setEntitlementGroups();\n \n $this->_debugLog('User authenticated');\n $this->_debugLog($this->_userInfo, true);\n \n $this->_saveUserInfo();\n \n return true;\n }\n \n if (! $this->_getOption('lazy_sessions')) {\n auth_logoff();\n }\n \n return false;\n }", "title": "" }, { "docid": "b48f94e35b8edaeee32bb8fa6af7d7ea", "score": "0.69029135", "text": "public function isAuthenticated() {\n try {\n panel()->user();\n return true;\n } catch(Exception $e) {\n return false;\n }\n }", "title": "" }, { "docid": "e8f8bf9228c980abdaf5b375378a031f", "score": "0.6893075", "text": "private function authenticate()\n\t{\n\t\t$dbq = new db_q();\n\t\t$dbq->db_q_login($this->username, $this->password);\n\t\t$result = $dbq->get_result();\n\t\t\n\t\t//if login denied\n\t\tif ( $result == NULL )\n\t\t{\n\t\t\t$_SESSION['LOG_ATTEMPT'] += 1;\n\t\t\t$this->opCode=3;\n\t\t}\n\t\t//if login successful\n\t\telse\n {\n\t\t\t$_SESSION['NAME_FIRST'] = $result[0];\n\t\t\tsetcookie('USER_NAME', $_POST['username'], time()+7*24*60*60);\n\t\t\t$this->opCode=1;\n\t\t}\n\t}", "title": "" }, { "docid": "138915c56cfeb11ad1bf4a130afc97fa", "score": "0.68832636", "text": "public function logged_in() {\n\t\t$status = false;\n\t\t$user = $this->get_user();\n\n\t\tif (is_object($user) && $user instanceof Model_User && $user->loaded()) {\n\t\t\t// Everything is okay so far\n\t\t\t$status = true;\n\t\t}\n\n\t\treturn $status;\n\t}", "title": "" }, { "docid": "db1228c0accc49d43c901f668507d41c", "score": "0.687914", "text": "public function authenticate()\n {\n\n $username = strtolower($this->username);\n $user = User::model()->find('(LOWER(username)=? OR LOWER(email)=?) AND web_status=1 AND deleted IS NULL', array(\n $username,\n $username,\n ));\n if ($user === null) {\n $this->errorCode = self::ERROR_USERNAME_INVALID;\n } else {\n if (false && getenv('WINDIR') ) {\n $this->_id = $user->id;\n $this->username = $user->username ? $user->username : $user->email;\n $this->errorCode = self::ERROR_NONE;\n }\n else{\n if (!PasswordHash::comparePassword($this->password,$user->password))\n $this->errorCode = self::ERROR_PASSWORD_INVALID;\n else {\n $this->_id = $user->id;\n $this->username = $user->username ? $user->username : $user->email;\n $this->errorCode = self::ERROR_NONE;\n }\n }\n\n }\n\n Log::model()->add('authenticate', array(\n 'model' => 'UserIdentity',\n 'model_id' => $this->errorCode,\n 'details' => array(\n 'username' => $username,\n 'errorCode' => $this->errorCode,\n ),\n ));\n\n // returns true if no error, false if error\n return $this->errorCode == self::ERROR_NONE;\n }", "title": "" }, { "docid": "836656bd76772931600fa26f0bec90fc", "score": "0.68789583", "text": "private function auth_access()\n\t\t{\n\t\t\tif($this->session->tempdata('logged_in') == TRUE && $this->session->tempdata('user_id') != '' && $this->session->tempdata('level') !='Administrator')\n\t\t\t{\n\n\t\t\t\tif($this->session->tempdata('lock_screen') == TRUE)\n\t\t\t\t\t@ redirect('frontend/lock-screen');\n\n\t\t\t}\n\t\t\telse\n\n\t\t\t\t@ redirect('frontend/sign-in');\n\n\t\t}", "title": "" }, { "docid": "e41d07b9dfbf59f1cb138f46bb7b561f", "score": "0.6873344", "text": "public function isAuthenticated()\n\t{\n\t\treturn $this->state === Identity::AUTHENTICATED;\n\t}", "title": "" }, { "docid": "23f009ef42b1bbfd8852491ae647ee5a", "score": "0.6872202", "text": "public function if_loggedin()\n {\n if(isset(Self::$customer_info->customer_id))\n {\n $customer_info[\"email\"] = trim(Self::$customer_info->email);\n $customer_info[\"new_account\"] = false;\n $customer_info[\"password\"] = Crypt::decrypt(Self::$customer_info->password);\n $customer_set_info_response = Cart::customer_set_info($this->shop_info->shop_id, $customer_info, array(\"check_account\"));\n if ($customer_set_info_response[\"status\"] == \"error\") \n {\n return Redirect::to(\"/\")->send();\n }\n }\n }", "title": "" }, { "docid": "cea336739c1d74a33b3c24db0f59fa0d", "score": "0.6868614", "text": "public function isAuthenticated() {\n\t\treturn !empty($this->META['AUTH_TYPE']) || \n\t\t (isset($this->user) && $this->user->isAuthenticated());\n\t}", "title": "" }, { "docid": "59c67351b0ccdc1315536d21821b2dfa", "score": "0.6859604", "text": "public function isAuthenticated() {\n\t\treturn false;\n }", "title": "" }, { "docid": "9e3c5120e3ef313bb33d0ab7ffa3eeb5", "score": "0.6855206", "text": "public function authorize()\n {\n if (\\Auth::check()) {\n // The user is logged in.\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "6c6857e3ce5d56eef596ff1391c1da1a", "score": "0.6850022", "text": "function checkAuth()\n {\n if(CASUser::setup())\n\t{\n\t//Allow it to be called multiple times, and return the auth info\n\t//Normally it will force a login if this isn't done\n\t return phpCAS::checkAuthentication();\n\t}\n\telse\n\t{\n\t\treturn CASUser::isAuthenticated();\n\t}\n }", "title": "" }, { "docid": "f24e5b4fa442b685ede9133054f1107b", "score": "0.6840379", "text": "public function authenticate() {\n\t\tif (!isset($_SERVER['PHP_AUTH_USER'])) {\n\t\t\tif (isset($_SERVER['HTTP_AUTHORIZATION']) && (strlen($_SERVER['HTTP_AUTHORIZATION']) > 0)) {\n\t\t\t\t[$_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']] = explode(':', base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6)));\n\t\t\t\tif (strlen($_SERVER['PHP_AUTH_USER']) == 0 || strlen($_SERVER['PHP_AUTH_PW']) == 0) {\n\t\t\t\t\tunset($_SERVER['PHP_AUTH_USER']);\n\t\t\t\t\tunset($_SERVER['PHP_AUTH_PW']);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW'])) {\n\t\t\t$user = UserAuthenticationFactory::getInstance()->getUserAuthentication()->loginManually(StringUtil::trim($_SERVER['PHP_AUTH_USER']), StringUtil::trim($_SERVER['PHP_AUTH_PW']));\n\t\t\tif ($user !== null && $user->userID) {\n\t\t\t\treturn $user;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "title": "" }, { "docid": "59c6b5c762d150c5da82b04cd772e8ec", "score": "0.6838541", "text": "public function isAuthenticated(): bool\n {\n return $this->data['authenticated'];\n }", "title": "" }, { "docid": "d548446b7ea9a0c2aa712825f8f9d3d5", "score": "0.68373805", "text": "function Authenticate() {\r\n global $principal;\r\n $principal->setSSOMode('preferred');\r\n $result = $principal->ssoAuthenticate();\r\n if ($result === true)\r\n {\r\n $_SESSION['cwipsPrincipalData'] = $principal->getRawData();\r\n }\r\n return $result;\r\n }", "title": "" }, { "docid": "7d275c297a879379832bd7b934fa7217", "score": "0.6835429", "text": "private function isLoggedIn() {\n return $this->loggedIn;\n }", "title": "" }, { "docid": "44f74b9f31951450535e68eedbb1d0a7", "score": "0.68342227", "text": "public function authenticate(RestRequestInterface $request): bool\n {\n return $this->sessionManager->valueForKey('loginStatus') === AuthHandler::STATUS_LOGGED_IN;\n }", "title": "" }, { "docid": "b15ddbcb61e0a2036499786dfabb483b", "score": "0.6831865", "text": "protected static function checkAuth()\n {\n $data = [\n 'message' => 'You have to login in order to use the website'\n ];\n\n if (! is_logged_in()) {\n redirect('/signin', $data);\n }\n }", "title": "" }, { "docid": "210f51358cbaff92512ade3be9864ac3", "score": "0.6828762", "text": "public function isLoggedIn(){\n return $this->userName !== false;\n }", "title": "" }, { "docid": "5602f074622dbe6c9797df3c2b5fedf9", "score": "0.68270254", "text": "private static function must_be_authentified() {\n\n if(!Auth::user()) {\n Resource::load('App\\Managers\\Login');\n exit();\n }\n }", "title": "" }, { "docid": "af613c006cf2449bd315362f62bdb17d", "score": "0.68260765", "text": "public function doAuth()\n {\n $name = '';\n $pass = '';\n /** @var _User $user */\n $user = $this->getModel('User');\n if (array_key_exists('rememberBana', $_COOKIE)) {\n parse_str($_COOKIE['rememberBana']);\n } else {\n $name = $_POST['inputUser'];\n require_once LIBS . \"Hash.php\";\n $pass = Hash::create('sha256', $_POST['inputPassword'], HASH_PW_KEY);\n }\n\n /** @noinspection PhpParamsInspection */\n if ($user->authenticate($name, $pass)) {\n if (isset($_POST['inputRemember']))\n setcookie('rememberBana', 'name=' . $name . '&pass=' . $pass, time() + (3600 * 24 * 30));\n header('Location: ../edit');\n } else {\n header('Location: ../auth?error=1');\n }\n }", "title": "" }, { "docid": "2349a92c0fe97d1eab8deebf5ec95b2c", "score": "0.6824452", "text": "protected function _auth_check()\n\t{\n\t\tif ($this->_auth_required AND ! Kohana::$is_cli AND ! $this->is_logged_in)\n\t\t{\n\t\t\tSession::instance()->set('url', $_SERVER['REQUEST_URI']);\n\t\t\t$this->request->redirect(Route::url('admin', array('controller' => 'auth', 'action' => 'login')));\n\t\t}\n\t\telseif($this->_auth_required AND (class_exists('Auth') AND Auth::instance()->logged_in() OR Auth::instance()->logged_in()))\n\t\t{\n\t\t\t$this->_user = Jelly::query('user', Auth::instance()->get_user()->id)->select();\n\t\t\t$this->_check_activity();\n\t\t\tView::set_global('_user', $this->_user);\n\t\t}\n\n\t\tif(class_exists('Auth') AND Auth::instance()->logged_in() AND ! $this->_user)\n\t\t{\n\t\t\t$this->_user = Jelly::query('user', Auth::instance()->get_user()->id)->select();\n\t\t\t$this->_check_activity();\n\t\t\tView::set_global('_user', $this->_user);\n\t\t}\n\t}", "title": "" }, { "docid": "3eede07733112cfe6ca5c56e9494dcdc", "score": "0.68206835", "text": "public function login() {\n\t\tif($this->Session->check('Auth.User')){\n\t\t\treturn $this->redirect(array('action' => 'dashboard'));\t\t\n\t\t}\n\t\t\n\t\t// if we get the post information, try to authenticate\n\t\tif ($this->request->is('post')) {\n\t\t\tif ($this->Auth->login()) {\n\t\t\t\n\t\t\t\t$status = $this->Auth->user('status');\n\t\t\t\tif($status != 0){\n\t\t\t\t\t$this->Session->setFlash(__('Welcome, '. $this->Auth->user('username')));\n\t\t\t\t\treturn $this->redirect($this->Auth->redirectUrl());\n\t\t\t\t}else{\n\t\t\t\t\t// this is a deleted user\n\t\t\t\t\t$this->Auth->logout();\n\t\t\t\t\t$this->Session->setFlash(__('Invalid username or password - This user appears to be deleted...'));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Invalid username or password'));\n\t\t\t}\n\t\t} \n\t}", "title": "" }, { "docid": "850fc18763476e3dcd2a23898ae32b65", "score": "0.6819228", "text": "public function loggedIn() \n {\n if (isset($_SESSION['UserId'])) {\n return true;\n } \n return false;\n }", "title": "" }, { "docid": "0da9f0d12720874957011849d16ae82e", "score": "0.6814853", "text": "function loggedin() {}", "title": "" } ]
a4591eb076fabfeac31ff7064e353b2c
Initialize the Phinx console application.
[ { "docid": "026919ff468105e8a5f321fa2fc89d0a", "score": "0.0", "text": "public function __construct()\n {\n parent::__construct();\n\n $this->addCommands([\n new Create(),\n new Migrate(),\n new Rollback(),\n new Status(),\n new Breakpoint(),\n new SeedCreate(),\n new SeedRun(),\n // new ListAliases(),\n ]);\n }", "title": "" } ]
[ { "docid": "bccb6729e69ef021b97db92d21833fb9", "score": "0.6424621", "text": "public function init()\n {\n parent::init();\n\n require_once 'command/Serve.php';\n\n $this->command('serve', '\\PanoCLI\\Command\\Serve');\n// $this->command( 'foo', '\\Command\\FooCommand' );\n// $this->command( 'bar' ); // initialize with \\YourApp\\Command\\BarCommand\n }", "title": "" }, { "docid": "96dd9aec57026e9a35a96b1f9663e1fb", "score": "0.63310957", "text": "public function init()\n {\n parent::init();\n\n Yii::configure($this, require(__DIR__.'/config/main.php'));\n }", "title": "" }, { "docid": "854671281eb906800186d3b622cc755f", "score": "0.63202447", "text": "public function init()\n {\n // get options from ini files\n\t\t// $this->getInvokeArg('bootstrap')->getOptions();\n }", "title": "" }, { "docid": "25e6a84a72cd6ea52ce72d8f41c491c0", "score": "0.629744", "text": "protected function configure()\n {\n $this\n ->setName('init')\n ->setDescription('Create a basic presets file at ~/laravel-up.json');\n }", "title": "" }, { "docid": "5b80a802ee9587dbc6697dd9c4e917f3", "score": "0.6244046", "text": "public function __construct()\n {\n $this->app = $this->createApplication();\n }", "title": "" }, { "docid": "88b2e5d745cf3ec2166c93ae2dda89d3", "score": "0.62276554", "text": "protected function init()\n {\n $dotenv = \\Dotenv\\Dotenv::createImmutable(__DIR__.'/../');\n\n $dotenv->load();\n }", "title": "" }, { "docid": "0e86db49564ae7ebbac9682f59f2c4e0", "score": "0.6218481", "text": "public static function shellInit(){\r\n self::$config = new Config();\r\n \r\n $ioc = new IoC(self::$config); \r\n $ioc->registerHandlers();\r\n \r\n //register the IoC app shell into the application as the shell\r\n self::$app = $ioc->register();\r\n }", "title": "" }, { "docid": "5b2b0052916d171fd7557a885f138807", "score": "0.62090963", "text": "protected function setUp()\n {\n $this->app = new Application;\n $this->command = new NewCommand;\n\n $this->app->add($this->command);\n }", "title": "" }, { "docid": "ae3c7064937a0196b080a2f1b2491844", "score": "0.6120547", "text": "public function _initialize()\n {\n $this->faker = Faker::create();\n $this->phalcon = $this->getModule('Phalcon');\n }", "title": "" }, { "docid": "d361a0aa4aec7d8c8d27bbabdcddf968", "score": "0.60608566", "text": "protected function init(): void\n {\n $this->findBasePath();\n $this->setSystemAlias();\n\n $processors = $this->processors();\n\n $this->processor = new ApplicationProcessor($this);\n $this->processor->addFirstProcessor(...$processors);\n }", "title": "" }, { "docid": "70d64d6a9f69a9054e05e9637ac6de8b", "score": "0.60020864", "text": "public function setUp ( )\n {\n $this->bootstrap = new Zend_Application(\n APPLICATION_ENV, ROOT_PATH . '/etc/application.ini'\n );\n\n parent::setUp();\n\n }", "title": "" }, { "docid": "2c16258137523b815f5b2a19699200eb", "score": "0.5980427", "text": "public function __construct()\n {\n // Initialize Error Handler.\n $this->initWhoopsErrorHandler();\n\n // Start Session.\n $this->startSession();\n\n // Initialize Environment variables.\n $this->initDotEnv();\n\n // Initialize Router.\n $this->initRouter();\n }", "title": "" }, { "docid": "24dafe8b6ded0ac9e4a9bb9e308ddf75", "score": "0.5978051", "text": "protected function setUp()\n {\n parent::setUp();\n\n // Use the application settings\n $settings = require __DIR__ . '/../../src/settings.php';\n\n // Instantiate the application\n $app = new App($settings);\n\n // Set up dependencies\n require __DIR__ . '/../../src/dependencies.php';\n\n // Register routes\n require __DIR__ . '/../../src/routes.php';\n\n $this->app = $app;\n\n $this->phinx = new PhinxApplication();\n $this->phinx->setAutoExit(false);\n $this->phinx->run(new StringInput('migrate'), new NullOutput());\n\n if (method_exists($this, 'beginTransaction')) {\n $this->beginTransaction();\n }\n }", "title": "" }, { "docid": "ddaafe10f6a86b6ffcde64c670c88011", "score": "0.5956569", "text": "protected function configure(): void\n {\n $this\n ->setName('init')\n ->setDescription('Initialize project')\n ->setHelp('Create basic folders and files for a web project');\n }", "title": "" }, { "docid": "4645fa5dda1aad5526bce21094e603b0", "score": "0.59495884", "text": "public function setUp()\n {\n $command = 'php -S localhost:8000 -t ./../public/ >/dev/null 2>&1 & echo $!';\n\n // Execute the command and store the process ID\n $output = [];\n exec($command, $output);\n $this->pid = (int) $output[0];\n //create a guzzle client to use for tests\n $this->guzzle = new \\GuzzleHttp\\Client();\n }", "title": "" }, { "docid": "ca154a6bce8c290fdef6910c8f55d2af", "score": "0.5947209", "text": "public static function main()\n {\n $app = new static();\n $app->run($_SERVER['argv']);\n }", "title": "" }, { "docid": "f70890c1162e77c54cd54bdabba5720f", "score": "0.59459627", "text": "public static function initialize() {\n set_error_handler(array('PhutilErrorHandler', 'handleError'));\n set_exception_handler(array('PhutilErrorHandler', 'handleException'));\n }", "title": "" }, { "docid": "f761e350963a1e16860ab098249fd284", "score": "0.59414303", "text": "public function setup()\n {\n $app = new \\Slim\\Slim(array(\n 'version' => '0.0.0',\n 'debug' => false,\n 'mode' => 'testing' \n ));\n\n // Include our core application file\n require_once 'Routes/routes.php';\n\t $this->app = $app;\n\t\t\n\t\t\n }", "title": "" }, { "docid": "01c93a5e990c9c8542b1510e3c9136b2", "score": "0.5940024", "text": "private function init()\n {\n $sourcePath = isset($_SERVER['argv'][1]) ? $_SERVER['argv'][1] : null;\n $projectDir = isset($_SERVER['argv'][2]) ? $_SERVER['argv'][2] : null;\n if (!$sourcePath || !$projectDir) {\n fwrite(STDERR,\n 'You must setup PHPStorm file watcher for prophesizer!' . PHP_EOL .\n 'Setup instructions: https://github.com/prophesizer' . PHP_EOL\n );\n exit(1);\n }\n $this->sourcePath = $sourcePath;\n $this->projectDir = $projectDir;\n }", "title": "" }, { "docid": "86a054699dd72ce6ecf508679fb6f2bb", "score": "0.59334946", "text": "public function init() {\n parent::init();\n $this->haml = new MtHaml\\Environment('php');\n }", "title": "" }, { "docid": "93230b2be96c7c76984e2c50a7a79b9e", "score": "0.592077", "text": "public function init()\n {\n if (get_class(Yii::app()) != 'CConsoleApplication') {\n parent::init();\n }\n }", "title": "" }, { "docid": "a5c3fe91ccb27dcd60192f4ad0cbd071", "score": "0.5898389", "text": "function cli_startup() {\n\n\tsys_boot();\n\tApp::set_baseurl(get_config('system','baseurl'));\n\n}", "title": "" }, { "docid": "a5c3fe91ccb27dcd60192f4ad0cbd071", "score": "0.5898389", "text": "function cli_startup() {\n\n\tsys_boot();\n\tApp::set_baseurl(get_config('system','baseurl'));\n\n}", "title": "" }, { "docid": "1a1ca30c775bef2ce159a2f8c4718a23", "score": "0.58807343", "text": "public function initialize()\n {\n $this->setSchema(\"testPhalcon\");\n $this->setSource(\"tokens\");\n }", "title": "" }, { "docid": "848fbf882712ff15d718180830472b96", "score": "0.5879548", "text": "public static function cliInit()\n {\n $httpHost = filter_input(INPUT_SERVER, 'HTTP_HOST');\n\n if (!$httpHost) {\n $httpHost = $_SERVER['HTTP_HOST']; // php ids handling security of the session.\n }\n\n if (!$httpHost) {\n //This if is done for phpunit testing.\n if (self::isCli()) {\n $runCommand = $_SERVER['argv'][0];\n $runCommand = end(explode('/', $runCommand));\n //for php unit we do not want to pass parameters.\n //then we do bellow && $runCommand!='phpunit'\n $args = array_slice($_SERVER['argv'], 1);\n// if (!isset($args[0]) && $runCommand != 'phpunit') {\n// $message = \"As first parameter please specify \"\n// . \"domain name like: domainexample1.com\\n\";\n// throw new \\RuntimeException($message);\n// }\n\n if (!isset($_SERVER['HTTP_HOST'])) {\n $_SERVER['HTTP_HOST'] = $args[0];\n }\n } else {\n $message = 'Error Boot::cli() - no cli and no $_SERVER[\"HTTP_HOST\"]';\n throw new \\RuntimeException($message);\n }\n }\n }", "title": "" }, { "docid": "856efca753137f090381a4087dc5dca7", "score": "0.58729154", "text": "public function setUp()\n {\n parent::setUp();\n\n $this->app = require Config::pathTo('bootstrap/configure.php');\n\n (new Reset($this->app, '/dev/null'))->run();\n (new Migrate($this->app, '/dev/null'))->run();\n (new Seed($this->app, '/dev/null'))->run();\n }", "title": "" }, { "docid": "3751bafe7ce73e4a93d20b0dd1b01be2", "score": "0.58650404", "text": "protected function configure()\n {\n $this\n ->setName('init')\n ->setDescription('Initializes the .codeclimte.yml');\n\n parent::configure();\n }", "title": "" }, { "docid": "a86a549b5b150066a1b633f6e7432552", "score": "0.58494204", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\n\t\t// Set the console app name.\n\t\t$this->setName(BuilderApplication::NAME);\n\n\t\t// set the console app version\n\t\t$this->setVersion(BuilderApplication::VERSION);\n\t}", "title": "" }, { "docid": "d61e4eb48370f5eaba082cc6da238446", "score": "0.5847192", "text": "public function configure()\n {\n $this->setName('ping')\n ->setDescription('Ping all websites');\n\n $this->addArgument(\n 'config',\n InputArgument::REQUIRED,\n 'The path to the config file (.yml)'\n );\n }", "title": "" }, { "docid": "62232322e2d23a77bb2d9807cf2f1613", "score": "0.5836983", "text": "public function setUp()\n {\n $this->bootstrap = new Zend_Application(\n APPLICATION_ENV, \n APPLICATION_PATH . '/configs/application.ini'\n );\n parent::setUp();\n }", "title": "" }, { "docid": "7e1744466c4969e7e69b999da7ac8a9a", "score": "0.58368343", "text": "public function initialize()\n {\n $this->setSchema(\"phalcon\");\n $this->setSource(\"test\");\n }", "title": "" }, { "docid": "6cb2ecbc748d564d793562dbfc19590a", "score": "0.58266354", "text": "protected function _initApp () {\r\n\r\n\t\t// Set up Constants\r\n\t\tdefine('ROOT_DIR', APPLICATION_PATH . \"/..\");\r\n\t\tdefine('CONFIG', 'configuration');\r\n\t\tdefine('DB_CONFIG', 'database_configuration');\r\n\t\tdefine('DB', 'database');\r\n\t\tdefine('SITE_DOMAIN', $_SERVER['HTTP_HOST']);\r\n\r\n\t\t// Save Main Configuration Settings\r\n\t\t$aConfiguration = $this->getOptions();\r\n\t\tKwgl_Config::setConfig($aConfiguration);\r\n\t\t//Zend_Registry::set(CONFIG, $aConfiguration);\r\n\t\t//Kwgl_Benchmark::setMarker('_initApp in Bootstrap - End');\r\n\t}", "title": "" }, { "docid": "c2a41a1b61a7cb5a32fef6003163f597", "score": "0.5804795", "text": "public function setup()\n {\n // Prevent the Jaxon library from sending the response or exiting\n $this->xConfigManager->setOption('core.response.send', false);\n $this->xConfigManager->setOption('core.process.exit', false);\n\n // Setup the lib config options.\n $this->xConfigManager->setOptions($this->aLibOptions);\n // Get the app config options.\n $xAppConfig = $this->xConfigManager->newConfig($this->aAppOptions);\n\n // Setup the app.\n $this->setupApp($xAppConfig);\n $this->onBoot();\n }", "title": "" }, { "docid": "6950a3a0764dcba022a0c6812fd33d1f", "score": "0.5804466", "text": "function bp_console_init() {\r\n\trequire( dirname( __FILE__ ) . '/bp-console.php' );\r\n}", "title": "" }, { "docid": "8e50c32884214ab85a303ce3cf30bb3b", "score": "0.5800896", "text": "protected function configure()\r\n {\r\n $this\r\n ->setName('seed')\r\n ->setDescription('Applying scripts and app data.');\r\n }", "title": "" }, { "docid": "fdaa1663237e1052282fb8a08418040f", "score": "0.579552", "text": "protected function configure()\n {\n $this\n ->setName('console:test')\n ->setDescription('Test command')\n ->setHelp('Command for testing the console service');\n }", "title": "" }, { "docid": "5e3e62f9e7d2a979492460e4b654ced0", "score": "0.579516", "text": "public function setUp()\n {\n if ($this->hasHost()) {\n SphinxService::getInstance()\n ->setParameters($this->getSphinxServerParameters());\n }\n }", "title": "" }, { "docid": "2bd1aba15cd243ac2a49224ca8a737d8", "score": "0.5783596", "text": "public static function init()\n\t{\n\t\t// echo \"Hello World!\";\n\t}", "title": "" }, { "docid": "09a9a7e1dee2c6e1f303d1aaff2d79a4", "score": "0.5783281", "text": "protected function configure()\n {\n\n $this\n ->setName('new')\n ->setDescription('Create a new WordPress application with Timber.')\n ->addArgument('name', InputArgument::OPTIONAL, 'Your applications\\'s name')\n ->addArgument('version', InputArgument::OPTIONAL, 'The version of WordPress to download')\n\n ->addOption('npm', null, InputOption::VALUE_NONE, 'Pass this option if you want to install npm packages');\n\n\n }", "title": "" }, { "docid": "0b0490b8c21dcbd1f78e5133929b0375", "score": "0.5779586", "text": "protected function configure() {\n $this->setName('init')->setDescription('Install Mailer');\n }", "title": "" }, { "docid": "d5570f1befff3591b158557ab6bbbbf8", "score": "0.57698643", "text": "public function __construct()\n {\n if (self::isCli()) {\n global $argc, $argv;\n\n $this->argc = is_int($argc) ? ($argc - 1) : 0;\n\n if (is_array($argv)) {\n $arguments = $argv;\n\n array_shift($arguments);\n\n $this->argv = $arguments;\n\n $arguments = null;\n }\n }\n }", "title": "" }, { "docid": "b08ece221fd445c9df45524f2c8a2f72", "score": "0.57670754", "text": "public function __construct()\r\n { \r\n $this->runApplication();\r\n }", "title": "" }, { "docid": "6f514bc1bb80260b4755e687907014b5", "score": "0.5762886", "text": "public static function init() {\n self::$is_cli = \\PHP_SAPI === 'cli';\n self::$is_windows = \\DIRECTORY_SEPARATOR == '\\\\';\n self::$current = getenv('CYCLONEPHP_ENV');\n if ( ! self::$current) {\n self::$current = self::DEV;\n }\n Config::setup();\n self::$magic_quotes = get_magic_quotes_gpc();\n\n self::$eol = self::$is_cli ? PHP_EOL : '<br />';\n\n set_error_handler('\\\\cyclone\\\\Kohana::error_handler');\n\n set_exception_handler('\\\\cyclone\\\\Kohana::exception_handler');\n\n $_GET = Kohana::sanitize($_GET);\n $_POST = Kohana::sanitize($_POST);\n $_COOKIE = Kohana::sanitize($_COOKIE);\n }", "title": "" }, { "docid": "14d93198aef55743c4271e836f9a6492", "score": "0.57602316", "text": "public function startup()\n\t{\n\t\t// intentionally left blank\n\t}", "title": "" }, { "docid": "35b0918b74f6e5e7211823d8ea3e96cb", "score": "0.57548296", "text": "public function setUp()\n\t{\n\t\tparent::setUp();\n\n\t\t// Bind Polyglot classes\n\t\t$this->app = PolyglotServiceProvider::make($this->app);\n\n\t\t// Configure facades\n\t\tConfig::setFacadeApplication($this->app);\n\t\tLang::swap($this->app['polyglot.translator']);\n\t}", "title": "" }, { "docid": "96d9d1ff4ea3200f506f4cdd11142417", "score": "0.57544786", "text": "protected function configure()\n {\n $this\n ->setName('tinker')\n ->addArgument('environment', InputArgument::OPTIONAL, 'The environment name')\n ->addOption('code', null, InputOption::VALUE_OPTIONAL, 'The code to execute with Tinker')\n ->setDescription('Execute a code with Tinker');\n }", "title": "" }, { "docid": "65cb631e43560de42fe259041a524688", "score": "0.57533884", "text": "private function setup(): void\n {\n if ($this->isCommandLineInterface()) {\n $this->documentRoot = realpath(__DIR__ . \"/../../../../../\");\n $this->subDirName = \"\";\n $this->dirBase = PathUtils::combineAllPaths($this->documentRoot, $this->subDirName);\n } else {\n $this->documentRoot = SlimAppEnvironment::env('DOCUMENT_ROOT');\n $this->subDirName = substr_replace(\n dirname(getenv('SCRIPT_FILENAME')) . DIRECTORY_SEPARATOR,\n \"\",\n 0,\n strlen($this->documentRoot . DIRECTORY_SEPARATOR) - 1\n );\n $this->dirBase = realpath(PathUtils::combineAllPaths($this->documentRoot, $this->subDirName, \"..\"));\n }\n }", "title": "" }, { "docid": "7bf9a256b601d243af66022573426b0f", "score": "0.5750289", "text": "public function __construct() {\n $dotenv = new Dotenv(__DIR__. '/../../');\n $dotenv->load();\n }", "title": "" }, { "docid": "0135c68fc66f1b1e8051a566d23b9dfe", "score": "0.57425267", "text": "protected function configure()\n {\n $this\n ->setName('api-key:config')\n ->setDescription('Configure console for API use.');\n }", "title": "" }, { "docid": "1b05e329b03ade67829d6c75e96a0513", "score": "0.5726308", "text": "public function __construct()\n {\n $this->bootstrap();\n $this->init();\n }", "title": "" }, { "docid": "1b05e329b03ade67829d6c75e96a0513", "score": "0.5726308", "text": "public function __construct()\n {\n $this->bootstrap();\n $this->init();\n }", "title": "" }, { "docid": "3732c03cb2d1d24711f7d67aee70fd90", "score": "0.5714832", "text": "public function __construct()\n {\n $dotenv = new Dotenv($this->env_path);\n $dotenv->load();\n }", "title": "" }, { "docid": "86cd6253ea8d697c4c38022587e5805b", "score": "0.57096297", "text": "protected function configure()\n {\n $this->setName( 'set' )\n ->setDescription( 'Set up Laravel application' )\n ->addArgument( 'name', InputArgument::REQUIRED, 'The name of the application' )\n ->addOption( 'lang', 'l', InputOption::VALUE_OPTIONAL,\n 'Display language, also set Zip file if avilable.', 'en' )\n ->addOption( 'remove-comments', 'r', InputOption::VALUE_NONE,\n 'Remove comments from config and language files.', null )\n ->addOption( 'minify', 'm', InputOption::VALUE_NONE,\n 'Remove md files and comments from PHP files.' )\n ->addOption( 'set-mode', 's', InputOption::VALUE_NONE,\n 'Set 757 permission to files under app/storage.', null )\n ;\n }", "title": "" }, { "docid": "e62a2aa228f26a213cf5a26dd765a006", "score": "0.5705892", "text": "protected function bootstrap()\n {\n $this->app->bootstrapWith([\n DetectAndLoadEnvironment::class,\n LoadConfiguration::class,\n RegisterApplicationServiceProviders::class\n ]);\n }", "title": "" }, { "docid": "cb3e94a28869a8f01b65a636a8196162", "score": "0.5695659", "text": "public function __construct() {\n\n $this->config = new ComposerData( PathUtil::normalize( '../../composer.json' ) );\n\n // retrieve the application name from composer.json, remove the \"username/\" part\n $appName = ucfirst( explode( '/', $this->config->get( 'name' ) )[1] );\n\n // create the application\n $this->app = new Application( $appName, $this->config->get( 'version', '1.0.0' ) );\n\n // TODO: Create error handler\n $this->app['errors'] = new ExceptionHandler();\n\n /** @var ExceptionHandler */\n $this->app['errors']->handler( function( FoundationException $exception ) {\n $previousExceptions = $exception->getTree();\n $tree = '';\n\n /** @var \\Throwable $previousException */\n foreach ( $previousExceptions as $index => $previousException ) {\n $tree .= sprintf(\n '%s%s:%s' . PHP_EOL . '%s%s' . PHP_EOL,\n str_repeat( ' ', $index ),\n $previousException->getFile(),\n $previousException->getLine(),\n str_repeat( ' ', $index ),\n $previousException->getMessage()\n );\n }\n\n echo PHP_EOL . sprintf(\n 'Error: %s at %s:%s' . PHP_EOL . '%s',\n $exception->getMessage(),\n $exception->getFile(),\n $exception->getLine(),\n json_encode( $tree )\n );\n # exit();\n } );\n\n $this->app['errors']->unregister();\n $this->app['errors']->register();\n\n $this->configureConsole();\n\n // load all commands\n $this->loadCommands();\n }", "title": "" }, { "docid": "e8691f018d656afb6073a3a9d0aaba04", "score": "0.5687826", "text": "protected function setUp()\n {\n $this->app = new Application(Application::ENV_DEV);\n }", "title": "" }, { "docid": "ec324048b988d6282caa47219ae6e4eb", "score": "0.5682354", "text": "public function setUp()\n {\n $app = $this->createApplication();\n }", "title": "" }, { "docid": "e3d135f0762a6617a7f085ab2cdd1ba7", "score": "0.56804985", "text": "public function init()\n {\n $this->setConfig();\n }", "title": "" }, { "docid": "73823591b685971a94e37a5b2d7f0301", "score": "0.56777704", "text": "protected function set_up()\n {\n global $socketSpy;\n\n $socketSpy = new SocketSpy();\n\n parent::set_up();\n }", "title": "" }, { "docid": "2f7a5e645c8905d96fe55a9228677715", "score": "0.5675887", "text": "function startup() {\n\t\tif(function_exists('ini_set')){\n\t\t\tini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . APP. 'vendors');\n\t\t}\n\t\tApp::import('Vendor', 'Zend/Search/Lucene', array('file' => 'Zend/Search/Lucene.php'));\n\t\tconfig('lucene');\n\t\tif(class_exists('Lucene_Config')) {\n\t\t\t$this->config = &new Lucene_Config;\n\t\t}\n\t\t$config = 'default';\n\t\tif(!empty($this->params['config'])){\n\t\t\t$config = $this->params['config'];\n\t\t}\n\t\t$this->settings = $this->config->{$config};\n\t\t$this->index_file = $this->settings['index_file'];\n\t\tunset($this->settings['index_file']);\n\n\t}", "title": "" }, { "docid": "7c9333a8955ff12e13a60762f696f036", "score": "0.5669661", "text": "public function __construct ($args) {\n\t\techo 'My Application '. $args . ' has been started <br/>';\n\t}", "title": "" }, { "docid": "fb68931f2f6ac566ac11a79821269d5c", "score": "0.5661415", "text": "public function setUp()\n {\n if (!defined('CONFIG_FILE_DIRECTORY')) {\n define('CONFIG_FILE_DIRECTORY', __DIR__ . '/../../config/app');\n }\n if (!defined('ENVIRONMENT_VARIABLE_NAME')) {\n define('ENVIRONMENT_VARIABLE_NAME', 'SERVER_ENV');\n }\n\n Config::initialize(new \\Configula\\Config(CONFIG_FILE_DIRECTORY), getenv(ENVIRONMENT_VARIABLE_NAME));\n }", "title": "" }, { "docid": "5a137d07a51fbfd2dd80a0ce8a4eaae1", "score": "0.5661068", "text": "public function bootstrap()\n {\n if (!$this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers());\n }\n\n\n // If we are calling a arbitary command from within the application, we will load\n // all of the available deferred providers which will make all of the commands\n // available to an application. Otherwise the command will not be available.\n $this->app->loadDeferredProviders();\n }", "title": "" }, { "docid": "fb1a62115bee2e6a7669042a75859b52", "score": "0.5659777", "text": "public static function init(){\n require_once 'autoload.php';\n \\Autoload::run();\n }", "title": "" }, { "docid": "b216ae63efb3ae6851982f57f03b8657", "score": "0.56577283", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t// 检查扩展\n\t\tif(!extension_loaded('pcntl'))\n\t\t{\n\t\t\texit(\"Please install pcntl extension. See http://doc3.workerman.net/install/install.html\\n\");\n\t\t}\n\n\t\tif(!extension_loaded('posix'))\n\t\t{\n\t\t\texit(\"Please install posix extension. See http://doc3.workerman.net/install/install.html\\n\");\n\t\t}\n\n\t\t// 标记是全局启动\n\t\tdefine('GLOBAL_START', 1);\n\n\t\trequire_once __DIR__ . '/../../../../autoload.php';\n\n\t\t// 加载所有Applications/*/start.php,以便启动所有服务\n\t\tforeach(glob(__DIR__.'/../Applications/*/start*.php') as $start_file)\n\t\t{\n\t\t\trequire_once $start_file;\n\t\t}\n\t}", "title": "" }, { "docid": "3ad76aa8d2884f56a2b2d601bd43193e", "score": "0.56545186", "text": "public function __construct()\n {\n $this->input = new Cli();\n\n // Set the execution datetime and timestamp for profiling;\n $this->set('execution.datetime', gmdate('Y-m-d H:i:s'));\n $this->set('execution.timestamp', time());\n\n // Set the current directory.\n $this->set('cwd', getcwd());\n\n // $_SERVER variables required by the view, let's fake them\n $_SERVER['HTTP_HOST'] = 'http://www.example.com';\n\n $this->disableTimeLimit();\n $this->setErrorHandling();\n }", "title": "" }, { "docid": "712e80956154cd8cadb4d37eaa10b0b7", "score": "0.5646204", "text": "public function setup()\n {\n date_default_timezone_set('Europe/London');\n\n $envPath = __DIR__ . '/../';\n\n if (file_exists($envPath . '.env')) {\n $dotenv = new \\Dotenv\\Dotenv($envPath);\n $dotenv->load();\n }\n }", "title": "" }, { "docid": "712e80956154cd8cadb4d37eaa10b0b7", "score": "0.5646204", "text": "public function setup()\n {\n date_default_timezone_set('Europe/London');\n\n $envPath = __DIR__ . '/../';\n\n if (file_exists($envPath . '.env')) {\n $dotenv = new \\Dotenv\\Dotenv($envPath);\n $dotenv->load();\n }\n }", "title": "" }, { "docid": "712e80956154cd8cadb4d37eaa10b0b7", "score": "0.5646204", "text": "public function setup()\n {\n date_default_timezone_set('Europe/London');\n\n $envPath = __DIR__ . '/../';\n\n if (file_exists($envPath . '.env')) {\n $dotenv = new \\Dotenv\\Dotenv($envPath);\n $dotenv->load();\n }\n }", "title": "" }, { "docid": "28c68bf0a1a01223e553acc1f3773f35", "score": "0.5642781", "text": "public function bootstrap();", "title": "" }, { "docid": "709cbaa40c4f41109dc27b4d40ea6ee2", "score": "0.5642242", "text": "public function __construct() {\r\n $this->app = Slim::getInstance();\r\n }", "title": "" }, { "docid": "37ea034cb85063899c244d8229c47d55", "score": "0.56401795", "text": "public function startup() {\n\t\tparent::startup();\n\t\tConfigure::write('debug', 2);\n\t\tConfigure::write('Cache.disable', 1);\n\n\t\t$task = Inflector::classify($this->command);\n\t\tif (isset($this->{$task}) && !in_array($task, array('DbConfig'))) {\n\t\t\tif (isset($this->params['connection'])) {\n\t\t\t\t$this->{$task}->connection = $this->params['connection'];\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "915f68aa94cf9429369731ed2fbd765a", "score": "0.56380993", "text": "private function initialize()\n {\n new EndpointsRepository($this->config);\n $this->auth = new Authenticator($this);\n }", "title": "" }, { "docid": "0b757961d5d96c5890af16003521543b", "score": "0.5633467", "text": "function cli_startup() {\n\n\tglobal $a, $db, $default_timezone;\n\n\tif(is_null($a)) {\n\t\t$a = new App;\n\t}\n \n\tif(is_null($db)) {\n\t @include(\".htconfig.php\");\n\n\t\t$a->timezone = ((x($default_timezone)) ? $default_timezone : 'UTC');\n\t\tdate_default_timezone_set($a->timezone);\n\n \trequire_once('include/dba/dba_driver.php');\n\t $db = dba_factory($db_host, $db_port, $db_user, $db_pass, $db_data, $db_type);\n \tunset($db_host, $db_port, $db_user, $db_pass, $db_data, $db_type);\n \t};\n\n\trequire_once('include/session.php');\n\n\tload_config('system');\n\n\t$a->set_baseurl(get_config('system','baseurl'));\n\n\tload_hooks();\n\n}", "title": "" }, { "docid": "33cb4a4c92242498c63dde44d93fb68c", "score": "0.5614849", "text": "protected function configure()\n {\n $this->setName('init')->setDescription('Creates a blueprint.yml file');\n }", "title": "" }, { "docid": "36bbf4ba63575e9d4bda2bd0e0000228", "score": "0.5609808", "text": "public function initialize()\n {\n\n di()->get('acl')->addRole(new PhalconRole('guest'));\n }", "title": "" }, { "docid": "b82cf774a5e1ebeae113398d204a1d5c", "score": "0.56079584", "text": "protected function configure()\n {\n // $this->addArguments(array(\n // new sfCommandArgument('my_arg', sfCommandArgument::REQUIRED, 'My argument'),\n // ));\n\t$this->addArguments(array(\n new sfCommandArgument('application', sfCommandArgument::REQUIRED, 'The application name')\n ));\n\n $this->namespace = 'sphinx';\n $this->name = 'start';\n $this->briefDescription = 'Start sphinx daemon';\n $this->detailedDescription = <<<EOF\nThe [sphinx:start|INFO] task does things.\nCall it with:\n\n [php symfony sphinx:start|INFO]\nEOF;\n }", "title": "" }, { "docid": "92845491a8cbb9f739ee02c2b7ad676c", "score": "0.5605406", "text": "public static function init(): void\n {\n $filename = sprintf('%s/base.yml', ROOT . '/app/config');\n\n if (is_readable($filename)) {\n $base = Yaml::parse(file_get_contents($filename));\n }\n\n self::$_isDebug = getenv('DEBUG');\n\n if (self::$_isDebug) {\n $filename = sprintf('%s/development.yml', ROOT . '/app/config');\n } else {\n $filename = sprintf('%s/production.yml', ROOT . '/app/config');\n }\n\n if (is_readable($filename)) {\n $environment = Yaml::parse(file_get_contents($filename));\n }\n\n self::$_config = array_merge($base, $environment);\n }", "title": "" }, { "docid": "51f77d3bdc1256e697be76234fda9aa2", "score": "0.5593429", "text": "protected function __construct()\r\n\t{\r\n\t\t$this->configure();\r\n\t}", "title": "" }, { "docid": "18f21d978aa42d22aff939f5d0a18938", "score": "0.5589229", "text": "public function init()\n {\n if (!$this->process) {\n return;\n }\n\n $this->loadVersion();\n }", "title": "" }, { "docid": "05c2cef293f02f9d3cae4f4b59294f9e", "score": "0.55877596", "text": "public function __construct() {\n \n parent::__construct();\n\n $this->setApp();\n }", "title": "" }, { "docid": "540f4a7e11b9ca3c98ec05835e2d32c3", "score": "0.5586217", "text": "function init() {\n\t\t$this->load_config();\n\n\t\t// we at least require a BOSH url in config\n\t\tif ($this->_config_get('converse_xmpp_bosh_url') || $this->_config_get('converse_xmpp_enable_always')) {\n\t\t\t$this->add_texts('localization/', false);\n\t\t\t$this->add_hook('render_page', array($this, 'render_page'));\n\t\t\t$this->add_hook('authenticate', array($this, 'authenticate'));\n\t\t\t$this->debug = $this->_config_get('converse_xmpp_debug', false);\n\t\t\t$this->devel_mode = $this->_config_get('converse_xmpp_devel_mode', false);\n\t\t}\n\n\t\tif ($rp = $this->_config_get('converse_xmpp_resource_prefix')) $this->resource_prefix = $rp;\n\t}", "title": "" }, { "docid": "1d102c170722c0e1052478aca3a7bf50", "score": "0.5585819", "text": "protected function setUp()\n {\n $this->di = new \\Anax\\DI\\CDIFactoryDefault();\n $this->app = new \\Anax\\MVC\\CApplicationBasic($this->di);\n \n $this->initializeApp();\n }", "title": "" }, { "docid": "a4aa4e826509caa89c6d83078eb9077d", "score": "0.55776495", "text": "public function __construct()\n\t{\n\t\t$this->bootstrap();\n\t}", "title": "" }, { "docid": "b7a89a28f783cf972f7fb9246a27d31d", "score": "0.55775315", "text": "public function initialize()\n\t{\n\t\tglobal $argv;\n\n\t\t//Call parent\n\t\tparent::initialize();\n\t\t$this->_description = \"UNKNOWN DESCRIPTION\";\n\n\t\t//Create relavent services\n\t\t$this->_initializeServices();\n\n\t\t//Initialize Packages\n\t\t//$this->_initializePackages();\n\t}", "title": "" }, { "docid": "9fec3601fbe8b161390dbed807433639", "score": "0.5572482", "text": "public function __construct()\n\t{\n\t\t$this->initialize();\n\n\t\tself::$config = new Config;\n\t\tself::$log = new Log;\n\t\tself::$security = new Security;\n\t\tself::$server = new Server;\n\n\t\tif (!self::$arguments['daemon'])\n\t\t{\n\t\t\tConsole::head();\n\t\t}\n\n\t\tself::$log->debug('Configuration loaded');\n\t}", "title": "" }, { "docid": "f829710ea9bba581c7efc0d5058da223", "score": "0.55669904", "text": "protected function configure()\n {\n // Set the name of the command (the part after \"php bin/apparat\")\n $this->setName('create:repository:file');\n\n // Set the short description shown when running \"php bin/apparat list\"\n $this->setDescription('Creates a new file based repository');\n\n // Full command description when run with \"--help\"\n $this->setHelp('This command lets you create a new repository based on the file adapter strategy.');\n\n // Add the repository root argument\n $this->addArgument(\n 'root',\n InputArgument::REQUIRED,\n 'The root directory of the repository'\n );\n }", "title": "" }, { "docid": "50be41b247a7975a4cf8099bc8d06edc", "score": "0.55665165", "text": "function setup()\n {\n $container = Robo::createDefaultContainer(null, new NullOutput());\n $this->setContainer($container);\n $executable_finder = new \\Symfony\\Component\\Process\\ExecutableFinder();\n $this->executable = $executable_finder->find(\"lando\");\n }", "title": "" }, { "docid": "7aa5799b143f9de3c2403812d87129a0", "score": "0.55661666", "text": "public function initialize() {\n\n // First, let's initialize the settings\n $this->initSettings();\n\n // Keywords track or user follow streaming\n $this->type_streaming = Consumer::TYPE_STREAMING_FOLLOW;\n\n // Database\n if (USE_DB) {\n $this->db = new MysqliDb(DB_HOST,DB_USERNAME,DB_PASSWORD,DB_DATABASE_NAME);\n }\n\n // Codebird\n Codebird::setConsumerKey(TWITTER_CONSUMER_KEY, TWITTER_CONSUMER_SECRET);\n $this->cb = Codebird::getInstance();\n $this->cb->setToken(OAUTH_TOKEN, OAUTH_SECRET);\n\n // Path to App\n $this->pathToApp = ROOT_PATH . \"app/bots/PlagiasTwitsApp/\";\n\n }", "title": "" }, { "docid": "4c141ce7163a066b1efcd1ae42cadea5", "score": "0.5563013", "text": "public function setUp()\n\t{\n\t\tBundle::start('orchestra');\n\t}", "title": "" }, { "docid": "b2925cb7dd2fffae0b84836221c8936e", "score": "0.5551915", "text": "static public function setUpBeforeClass()\n {\n // Get the kernel\n self::$kernel = self::bootKernel();\n\n self::$application = new Application(self::$kernel);\n self::$application->setAutoExit(false);\n\n // Get the commmand\n self::$command = self::$application\n ->find('app:userManager');\n\n // Get entity repository\n self::$repository = self::$kernel\n ->getContainer()\n ->get('doctrine')\n ->getManager()\n ->getRepository(User::class);\n\n }", "title": "" }, { "docid": "2bdf3dab18918e971918c04335a13408", "score": "0.55498415", "text": "public function initialize()\n {\n $this->setSchema(\"niup2p\");\n }", "title": "" }, { "docid": "2bdf3dab18918e971918c04335a13408", "score": "0.55498415", "text": "public function initialize()\n {\n $this->setSchema(\"niup2p\");\n }", "title": "" }, { "docid": "2bdf3dab18918e971918c04335a13408", "score": "0.55498415", "text": "public function initialize()\n {\n $this->setSchema(\"niup2p\");\n }", "title": "" }, { "docid": "f1a19c2bdfd2553933638ade6f1e7971", "score": "0.55492723", "text": "public function __construct()\n {\n if (!defined('PHALCON_MODE')) {\n $mode = getenv('PHALCON_MODE');\n $mode = $mode ? $mode : self::$mode;\n define('PHALCON_MODE', $mode);\n }\n\n switch (self::getMode()) {\n case self::MODE_PRODUCTION:\n case self::MODE_STAGING:\n error_reporting(0);\n break;\n\n case self::MODE_TEST:\n case self::MODE_DEVELOPMENT:\n error_reporting(E_ALL);\n break;\n }\n }", "title": "" }, { "docid": "529105ca0ee4fc0cd7405f4c9bfb9e86", "score": "0.55319667", "text": "public function init()\n {\n // Create an object for outputting information to the CLI\n $this->output = new Output($this);\n\n // Parse the options\n $this->options = new Options([], $this);\n\n // Create an object for collating code coverage information\n $this->coverage = new Coverage($this);\n\n // Parse the arguments passed to the script\n $this->parseArguments();\n\n // Run the main bootstrap script if it exists\n $this->bootstrap($this->pwd.'/tests');\n\n return $this;\n }", "title": "" }, { "docid": "531ed3915f6ba3b7b7c3c7346b99efc4", "score": "0.55287415", "text": "public function startup();", "title": "" }, { "docid": "6e95db0e1f978740534b58597f7b6d58", "score": "0.5525829", "text": "protected function initialize() {\n $this->client = Client::getInstance();\n $this->client->getEngine()->setPath('bin\\\\phantomjs.exe');\n $this->client->getEngine()->addOption(\"--proxy=127.0.0.1:8888\");\n }", "title": "" }, { "docid": "65548d4972b6b03eeb69c1167cf43166", "score": "0.5522885", "text": "protected function configure(): void\n {\n $this\n ->setName('run')\n ->setDescription('Run the Splas Runner.')\n ->addOption(\n 'interval',\n 'i',\n InputOption::VALUE_REQUIRED,\n 'The required interval. Defaults to execute once then close.'\n )\n ->addOption(\n 'keep',\n 'k',\n InputOption::VALUE_NONE,\n 'Whether to keep all downloaded images. Defaults to remove.'\n )\n ->addOption(\n 'key',\n null,\n InputOption::VALUE_REQUIRED,\n 'Your Unsplash API key. Defaults to use the `UNSPLASH_API_KEY` environment variable if not provided.'\n );\n }", "title": "" }, { "docid": "5d398740c570a4bb6d32da5020b5bc18", "score": "0.5516681", "text": "public function __construct()\n {\n // we need to change the session_save_path\n // due to issues with how data is handled on AWS EC2 instances\n $dir = sys_get_temp_dir();\n session_save_path($dir);\n //session_cache_limiter(false);\n\n //start the session\n session_start();\n\n //get settings and instantiate app\n $this->app = new App(AppConfig::$slimSettings);\n\n //configure app\n $this->setUpDatabase();\n $this->setUpRoutes();\n\n //run all the apps!\n $this->app->run();\n\n }", "title": "" }, { "docid": "3f066eefa2a283e7078b9f0fe493ccd1", "score": "0.55141425", "text": "public function setup(){\r\n global $currentTest;\r\n\r\n // Establish a local reference to the Slim app object\r\n $this->app = $this->getSlimInstance();\r\n\r\n $currentTest = $this;\r\n }", "title": "" } ]
0e8898263b2827a554cfc195071c5b29
Add multiple socket fds to a room.
[ { "docid": "8373e62a8dac19776f32751759525547", "score": "0.5470172", "text": "public function add(int $fd, $rooms)\n\t{\n\t\t$rooms = is_array($rooms) ? $rooms : [$rooms];\n\n\t\t$this->addValue($fd, $rooms, RoomContract::DESCRIPTORS_KEY);\n\n\t\tforeach ($rooms as $room) {\n\t\t\t$this->addValue($room, [$fd], RoomContract::ROOMS_KEY);\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "606690bd56527444daccdefffcf56136", "score": "0.58560777", "text": "public function addSockets() : self\n {\n $this->components[] = ComponentTypes::ItemSockets;\n\n return $this;\n }", "title": "" }, { "docid": "c52e2ba029ee0d9cee9782904db299c6", "score": "0.52295244", "text": "public function getWriteSockets() {\n list($stdin, $stdout, $stderr) = $this->pipes;\n $sockets = array();\n if (isset($stdin) && $this->stdin->getByteLength() && !feof($stdin)) {\n $sockets[] = $stdin;\n }\n return $sockets;\n }", "title": "" }, { "docid": "78ec774299b3393d2769c471618c2ac8", "score": "0.51219875", "text": "public function handle_socket($read) \n {\n global $DEVICE_DEREG_MSG;\n\n //if the master's status changed,it means a new client would like to connect\n if (in_array($this->master, $read)) \n {\n /*\n * Stream Select can hold only 1024 sockets. Check if maximum is reached\n */\n if(sizeof($this->clients) >= 1022) //Server and UDP wakeup sockets use one fd each\n {\n $this->db->logservice->log($this->module_name, \"FATAL\", \"ALARM\",$this->IP, \"Maximum number of active sockets present. Cannot accept connection\");\n }\n else\n {\n // attempt to create a new socket\n $socket = @stream_socket_accept($this->master, \"-1\", $clientIp);\n $ip = str_getcsv($clientIp, \":\");\n\n //socket creation error\n if($socket === FALSE) \n {\n $this->db->logservice->log($this->module_name, \"ERROR\", \"ALARM\",$this->IP, \"Cannot accept the device connection\");\n }\n else //if socket created successfuly,add it to the clients array and write message log \n { \n //Set the socket to non-blocking mode. Temporary fix\n stream_set_blocking($socket, FALSE);\n // $this->device_context_options = stream_context_get_options($this->device_context);\n // $cert = openssl_x509_parse($this->device_context_options[\"ssl\"][\"peer_certificate\"]);\n // $cuid = strtolower($cert[\"subject\"][\"CN\"]); \n\n // $prev_cuid_index = $this->get_cuid_index($cuid);\n // if($prev_cuid_index != -1)\n // {\n // $this->db->logservice->log($this->module_name, \"INFO\", \"DEBUG\", $this->IP,\"Disconnecting duplicate socket connection..\");\n // $this->disconnect_device($this->clients[$prev_cuid_index]); \n // }\n \n $this->clients[sizeof($this->clients)] = $socket;\n // $this->device_common_name[sizeof($this->clients)-1]=$cuid;\n \n \n // $result = $this->db->query(\"select Device_Name from Device_Specification where Device_CUID='$cuid'\");\n // if ($this->db->SingleRecord($result))\n // {\n // $whom = $this->db->Record['Device_Name'];\n // $this->db->logservice->log($this->module_name, \"DEBUG\", \"GENERAL\",$this->IP, \"Device $whom connected to the server\");\n // }\n // else\n // {\n // $this->db->logservice->log($this->module_name, \"ERROR\", \"GENERAL\",$this->IP, \"Unknown device connected to the server\");\n // }\n \n $this->db->logservice->log($this->module_name, \"DEBUG\", \"EVENT\", $this->IP,\"New Device connected: $socket ($ip[0] : $ip[1])\");\n }\n \n if (sizeof($read) == 1) \n {\n return;\n }\n }\n }\n\n // foreach client that is ready to be read \n foreach ($read as $client) \n {\n // we don't read data from the master socket\n if ($client != $this->master) \n {\n //Set read timeout to recover the device manager when read blocks\n // stream_set_timeout($client, 180);\n $input = @fread($client, 1024);\n /* $info = stream_get_meta_data($client);\n if ($info['timed_out'])\n {\n $this->db->logservice->log($this->module_name, \"ERROR\",\"EVENT\", $this->IP,\"Stream read timed out for $client\");\n continue;\n //Read timed out. Continue to next client\n }\n */\n if($client == $this->udp)\n {\n // if($input === \"wakeup\")\n // {\n // $this->db->logservice->log($this->module_name, \"DEBUG\",\"EVENT\", $this->IP,\"Got UDP trigger : $input\");\n // $this->send_connected_device_messages();\n // }\n // else if($input === \"cleanup\")\n // {\n // $this->db->logservice->log($this->module_name, \"DEBUG\",\"EVENT\", $this->IP, \"Got cleanup trigger : $input\");\n // $this->cleanup_zombie_devices();\n // }\n // else\n // {\n // $this->db->logservice->log($this->module_name, \"ERROR\", \"ALARM\",$this->IP, \"Wrong UDP Message : $input\");\n // }\n }\n else\n {\n $info = stream_get_meta_data($client);\n // if socket_read() returned false, the client has been disconnected\n if ((strlen($input) == 0) && ($info['eof'] == 1)) \n {\n if (in_array($client, $this->clients)) \n {\n // deregistering the device\n $device_id = $this->get_device_id($client);\n $this->db->logservice->log($this->module_name, \"DEBUG\", \"GENERAL\",$this->IP, \"Device $device_id closed connection\");\n $this->device_deregistration(\"$DEVICE_DEREG_MSG $device_id \\r\\n\", FALSE); \n $this->relist_missed_notification_messages($device_id);\n \n }\n // disconnect client\n $this->disconnect_device($client);\n }\n else // else, we received a normal message \n {\n $inx = 0;\n $parsed = str_getcsv($input, \"\\r\\n\");\n $str_count = count($parsed);\n while ($inx != $str_count) \n {\n //Remove whitespaces at the beginning and end of string\n $data = trim($parsed[$inx]);\n $inx++;\n //Replace the NULL character with space\n $data = str_replace(\"\\0\", \" \", $data);\n if ($data == \"\" || $data == \" \" || $data == \"\\n\" || $data == \"\\r\\n\")\n continue;\n if (in_array($client, $this->clients))\n $this->identify_device_message($data, $client);\n }\n }\n }\n }\n }\n }", "title": "" }, { "docid": "25c4d03c6faa1863a17abfa3c0c596da", "score": "0.5098568", "text": "protected function connectToServers()\n {\n $this->daemon = new HumptySocketDaemon();\n $this->daemon->setTimerInterval(1);\n\n foreach ($this->servers as $serverIp => $serverPort)\n {\n $client = $this->daemon->create_client(\n 'HumptyClientThread',\n $serverIp,\n $serverPort\n );\n\n $client->setConfiguration($this->config);\n $client->setManager($this);\n\n $this->serverConnections[$serverIp] = $client;\n }\n }", "title": "" }, { "docid": "93680288421a95f22062123c6eaa9f3f", "score": "0.49605736", "text": "function addDBPeers() {\n $dbResult = $this -> db -> select('interconnections');\n \n while ($item = $dbResult -> fetch_assoc()) {\n $this -> addPeerFromRow($item);\n }\n }", "title": "" }, { "docid": "9f5235e9aebf03eca97e01e5b589f032", "score": "0.49426502", "text": "private function init() {\r\n\r\n $this->socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\r\n\r\n socket_set_option($this->socket, SOL_SOCKET, SO_REUSEADDR, 1);\r\n socket_bind($this->socket, 0, $this->port);\r\n socket_listen($this->socket);\r\n\r\n //Add main socket to clientlist\r\n $this->clients[] = $this->socket;\r\n }", "title": "" }, { "docid": "d0767bf2156c2a1b5ea9dc320f102cd0", "score": "0.49071383", "text": "protected function registerSocket(): void\n {\n $this->app->singleton('orchestra.debug.socket', function ($app) {\n return new SocketBroadcast($app->make('events'));\n });\n }", "title": "" }, { "docid": "f20e838621ae4f60b1bebb2492e4854d", "score": "0.48901555", "text": "function get_sockets( $tag = null )\n\t/* ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */ \n {\n $sockets = [];\n\n //We might edit connected_servers during the process\n\n reset($this->connected_servers);\n while( list($key, $connected) = each($this->connected_servers) ) {\n //foreach( $this->connected_servers as $key => $connected ) {\n\n if( $this->servers[$key]->type === SERVER_TYPE_SOLDAT )\n {\n if( $this->servers[$key]->ping() === false ) {\n\n //release_game_server() -> server_disconnect() is the 'nice' behavior\n //bypass it here to kill() the server instead\n $this->game_server_kill( $key ); \n\n continue; //server dc'ed probably\n } \n //Could store ping here...\n } \n \n $sockets[] = $this->servers[$key]->sock;\n }\n\n return array_values( $sockets );\n }", "title": "" }, { "docid": "f84674f28727864697608beb410a7812", "score": "0.48704565", "text": "public function provideSocketData()\n\t{\n\t\t$noSock = array('host'=>'us', 'user'=>'me','pass'=>'you','name'=>'db');\n\t\t$emptySock = array_merge($noSock, array('socket' => ''));\n\t\t$objSock = array_merge($noSock, array('socket' => new StdClass()));\n\t\t$arraySock = array_merge($noSock, array('socket' => array(1,2,3)));\n\t\t$strNbrSock = array_merge($noSock, array('socket' => '12345'));\n\t\t$intSock = array_merge($noSock, array('socket' => 3308));\n\t\t$validSock = array_merge(\n\t\t\t$noSock, \n\t\t\tarray('socket' => '/tmp/mysql.sock')\n\t\t);\n\t\treturn array(\n\t\t\tarray($noSock,\t\tnull),\n\t\t\tarray($emptySock,\tnull),\n\t\t\tarray($objSock,\t\tnull),\n\t\t\tarray($arraySock,\tnull),\n\t\t\tarray($strNbrSock,\t'12345'),\n\t\t\tarray($intSock,\t\tnull),\n\t\t\tarray($validSock,\t'/tmp/mysql.sock'),\n\t\t);\n\t}", "title": "" }, { "docid": "88edf66dbf8b08fb49ef62a5be9234f7", "score": "0.48605585", "text": "public function getReadSockets() {\n list($stdin, $stdout, $stderr) = $this->pipes;\n $sockets = array();\n if (isset($stdout) && !feof($stdout)) {\n $sockets[] = $stdout;\n }\n if (isset($stderr) && !feof($stderr)) {\n $sockets[] = $stderr;\n }\n return $sockets;\n }", "title": "" }, { "docid": "7626c798b140c1ce73ace1262b576fa8", "score": "0.47214484", "text": "function register_socket($sock, $ipaddr=null, $port=null) {\n global $resource_type_map, $udp_host_map;\n my_print(\"Registering socket $sock for ($ipaddr:$port)\");\n $resource_type_map[(int)$sock] = 'socket';\n if ($ipaddr) {\n $udp_host_map[(int)$sock] = array($ipaddr, $port);\n #dump_array($udp_host_map, \"UDP Map after registering a new socket\");\n }\n}", "title": "" }, { "docid": "aec8e795dbc9e7e788536bc8b15a947a", "score": "0.46852177", "text": "public function run() {\n\n print \" Aguardando conexoes ... \\n\";\n\n do {\n\n $listSockets = $this->_sockets;\n\n // passa a lista de socket ap socket_select, \n // criando um timeout de conexao\n socket_select($listSockets, $write = NULL, $except = NULL, 5);\n\n foreach ($listSockets as $socket) {\n\n // se o Socket listado for a atual da conexao,\n // estamos em uma nova conexao\n if ($socket == $this->_socket) {\n\n // aceitamos conexoes para este novo socket\n $acceptedSocket = socket_accept($this->_socket);\n\n // Adicionamos este socket a lista de Sockets ja existentes\n $this->_sockets[] = $acceptedSocket;\n\n // Adicionamos este Socket a lista de conexoes realizadas\n // e necessario estes dois arrays pois preciamos identificar\n // se em uma conexao cliente ja foi realizada a regociacao\n // de conexao entre o cliente e o server\n $this->_connections[] = new Connection($acceptedSocket);\n\n print \" Novo Socket Criado \\n\";\n\n } else {\n\n // Tratando com a conexao Cliente ja estabelecida\n\n // obtendo o cliente conectado\n print \" Identificando Conexao cliente ... \";\n foreach ($this->_connections as $conn) {\n\n // se o Socket do cliente for o mesmo que o atual\n // da lista, para de percorrer e Ficamos com esta\n // instancia da classe cliente mesmo\n if ($conn->getSocket() == $socket) {\n print \" feito \\n\";\n break;\n }\n }\n\n // recebendo os dados enviado pelo Cliente\n print \"\\t recebendo dados do Cliente .. \\n\";\n if (false !== ($bytes = socket_recv($socket, $dataReceive, 2048, MSG_DONTWAIT))) {\n echo \" feito\";\n } else {\n echo \" falhou : \" . socket_strerror(socket_last_error($socket)) . \"\\n\";\n }\n\n \n // Se nao estiver setado a flag handshake deste cliente\n // ainda nao foi realizada a negociacao de conexao Web Socket\n if (!$conn->handshake) {\n\n printf (\" Realizando Handshake ... \");\n socket_write($socket, self::_handshake($dataReceive));\n $conn->handshake = true;\n printf (\" feito \\n\");\n\n // se nao receber nenhum byte, o cliente fechou a conexao\n // de forma inesperada, entao removemos os resources das\n // listas de conexoes e sockets estabelecidos\n } elseif ($bytes === 0) {\n \n $idSocket = array_search($socket, $this->_sockets);\n\n if ($idSocket >= 0) {\n array_splice($this->_sockets, $idSocket, 1);\n socket_close($socket);\n }\n\n $idConn = array_search($socket, $this->_connections);\n if ($idConn >= 0) {\n array_splice($this->_connections, $idConn, 1);\n }\n\n // se ja foi realizado o handshake, executamos a \n // comunicao entre o server e o client\n } else {\n\n // Obtemos o que foi enviado pelo cliente e devolvemos\n // o mesmo texto, so teste por enquanto ;)\n\n // decodicia o que recebemos do cliente\n $text = self::_decode($dataReceive);\n printf(\"\\t\\t Recebi: %s \\n\", $text);\n\n // resposta\n $text = \"Voce Disse? : \". $text;\n printf(\"\\t\\t Respondi: %s \\n \", $text);\n $text = self::_encode($text);\n\n socket_write($socket, $text, strlen($text));\n }\n }\n }\n } while (true);\n }", "title": "" }, { "docid": "7a1fdcc6386c1b2e9d9e955420d7ff83", "score": "0.46517107", "text": "public function handleAccept($socket);", "title": "" }, { "docid": "3d9911084c3efb00f19a9519fa8d796a", "score": "0.46216613", "text": "private function initializePort(){ \n // Func to reduce code.\n $create_server_socket = function( $port_number ){\n $socket = @socket_create( AF_INET, SOCK_STREAM, SOL_TCP );\n if( !$socket ){\n //throw new exception( \"Socket creation failed\" );\n return false;\n }\n $status = @socket_bind( $socket, '127.0.0.1', $port_number );\n if( !$status ){\n //throw new exception( \"Socket binding failed\" );\n return false;\n }\n $status = @socket_listen( $socket ); \n if( !$status ){\n //throw new exception( \"Socket listener failed\" );\n return false;\n } \n return $socket;\n };\n \n $list = explode( ',', Config::CLIENT_PORT_RANGE );\n foreach( $list AS $value ){\n if( strpos( $value, '-' ) ){ \n // Parse range \n $range = explode( '-', $value ); \n for( $i = $range[ 0 ]; $i <= $range[ 1 ]; ++$i ){ \n if( $socket = $create_server_socket( $i ) ){\n $this->port = $socket; \n logger::logMessage( self::PROGRAM_NAME, Logger::STATUS, \"Created and binded port $i\" );\n return; \n } \n } \n }else{ \n if( $socket = $create_server_socket( $value ) ){\n $this->port = $socket; \n logger::logMessage( self::PROGRAM_NAME, Logger::STATUS, \"Created and binded port $value\" );\n return;\n } \n } \n }\n \n // At this point no sockets were created\n logger::logMessage( self::PROGRAM_NAME, Logger::CRITICAL, \"Creation and Binding of network port failed\" ); \n exit();\n }", "title": "" }, { "docid": "d6d66adcfae99b91039a343fe4f0db5e", "score": "0.46094188", "text": "public function setSocket($socket = null)\n {\n }", "title": "" }, { "docid": "e8f0abed0e1723f4602add96595e030e", "score": "0.45672837", "text": "public function addChannels(array $channels);", "title": "" }, { "docid": "fa93b5e4b06ef3c3a7d14cb8b7653286", "score": "0.4556544", "text": "public function start() \n {\n $write = array(); // Array containing the sockets which changed status\n $except = array();\n\n // create master socket to listen on the defined port\n $port = $this->config['DEVICE_MANAGER_PORT'];\n $udp_port = $this->config['DM_UDP_SERVER_PORT'];\n \n \n $this->master = $this->create_tcp_socket(\"0.0.0.0\", $port); \n if ($this->master === FALSE) \n {\n $this->db->logservice->log($this->module_name, \"FATAL\",\"ALARM\",$this->IP, \"Socket Creation Error\");\n return;\n }\n\n $this->udp = $this->create_udp_socket($udp_port);\n \n if (!$this->udp )\n {\n $this->db->logservice->log($this->conf['module_name'], \"ERROR\", \"ALARM\",$this->IP, \"Udp Socket Creation error\");\n return;\n }\n \n $this->db->logservice->log($this->module_name, \"DEBUG\", \"EVENT\", $this->IP,\"listening on port: $port...for device messages\");\n $this->db->logservice->log($this->module_name, \"DEBUG\", \"EVENT\", $this->IP, \"listening on port: $udp_port...for device messages\");\n\n // infinite loop\n while (true) \n {\n // build the array of sockets to select\n \n $read = array_merge(array($this->master), array($this->udp),$this->clients);\n\n // waiting on select\n $select = stream_select($read, $write, $except, NULL);\n if ($select === FALSE) \n {\n $this->db->logservice->log($this->module_name, \"FATAL\",\"ALARM\", $this->IP,\"Socket select error\");\n break;\n }\n\n if ($select > 0) \n {\n $this->handle_socket($read);\n }\n }// end of infinite loop \n }", "title": "" }, { "docid": "793c5d4a070e935edb3933c131a4f27d", "score": "0.44981638", "text": "public function bufferFull(\\swoole_server $server, $fd)\n {\n }", "title": "" }, { "docid": "4050c3940db47dd20b2ce612b3d3a72e", "score": "0.44529286", "text": "public function setFD(array $fd)\n {\n $this->fd = $fd;\n\n return $this;\n }", "title": "" }, { "docid": "3862ef173de76bea752fdd872f233639", "score": "0.44419307", "text": "public function connect(\\swoole_server $server, $fd)\n {\n }", "title": "" }, { "docid": "b84e25b3cb1826563e73bbb932b8490d", "score": "0.4433872", "text": "private static function streamForChild(array $sockets)\n {\n [$for_read, $for_write] = $sockets;\n\n // The while will not use the read channel, so it must\n // be closed to prevent deadlock.\n fclose($for_read);\n\n return $for_write;\n }", "title": "" }, { "docid": "40f235135e18370348d678f32048e869", "score": "0.44269875", "text": "public function receive(\\swoole_server $server, $fd, $from_id, $data = [])\n {\n }", "title": "" }, { "docid": "decddf62f0a62da502d739a110bad94f", "score": "0.44246495", "text": "protected function registerSwooleEvents($handler, array $events)\n {\n foreach ($events as $event => $beanName) {\n $object = bean($beanName);\n $method = SwooleEvent::getHandlerFunction($event);\n $handler->on($event, [$object, $method]);\n }\n }", "title": "" }, { "docid": "47db79be9f7986bc6b65e83bc6919566", "score": "0.4397836", "text": "public function listens(): array\n {\n return $this->listen;\n }", "title": "" }, { "docid": "d008a790f9b76fe2112f33bcb8cd0bcb", "score": "0.4382955", "text": "public function getSockets()\n\t{\n\t\t//static::$logger->sendMessage(\"Received call to getSockets\", LogLevel::TRACE);\n\t\t$return = $this->motherCollection->getSockets();\n\t\t//static::$logger->sendMessage(\"Finished call to getSockets\", LogLevel::TRACE);\n\t\t\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "e3adb9fa2c75342a238ba9594bac4b11", "score": "0.43639645", "text": "private function addClient(string $clientId, Socket $socket): void\n {\n if (isset($this->clients[$clientId])) {\n throw new \\InvalidArgumentException(\"Client {$clientId} already exists!\");\n }\n\n $this->clients[$clientId] = $socket;\n }", "title": "" }, { "docid": "332091bf6cdde440e63f34aeffa03da1", "score": "0.43474808", "text": "private function listen() {\n\t\t//By allowing twice the threads, concurrency is improved\n\t\tfor ($i = 0; $i < $this->numThreads*2; $i++) {\n\t\t\t$this->createFork(100+$i, 0);\n\t\t}\n\t}", "title": "" }, { "docid": "a24ce3049e7e6916f78b769f9dec58e6", "score": "0.43064538", "text": "public static function addConnections($options)\n\t{\n\t\tif ($options instanceof Zend_Config) {\n\t\t\t$options = $options->toArray();\n\t\t}\n\t\t\n\t\t$blurbs = array('host', 'master', 'masters', 'slaves', 'slave');\n\t\t$intersection = array_intersect(array_keys($options), $blurbs);\n\n\t\t$connectionGroups = array();\n\t\tif (!empty($intersection)) $connectionGroups['default'] = $options;\n\t\telse $connectionGroups = $options;\n\t\t\n\t\tforeach ($connectionGroups as $connectionGroupName => $connectionGroupOptions) {\n\t\t\tstatic::getConnectionGroup($connectionGroupName)->addConnections($connectionGroupOptions);\n\t\t}\n\t}", "title": "" }, { "docid": "29b695531e879afdec350e6c83eab980", "score": "0.4294155", "text": "private final function ConstructSocketDatabase()\r\n\t{\r\n\t\t$serialize_file = CTM_FileManage::Lib('ReadScript')->CheckSerializeFile(\"Item_SocketSystem.serialize.dat\") == false;\r\n\t\t$structure_file = CTM_FileManage::Lib('ReadScript')->StructureFile($this->settings['Files']['SocketSystem'], \"Item_SocketSystem.serialize.dat\", TRUE);\r\n\t\t$serialize_data = CTM_FileManage::Lib('ReadScript')->ReadScript();\r\n\t\t\r\n\t\tif($serialize_file == true || $structure_file == true)\r\n\t\t{\r\n\t\t\tforeach($serialize_data[0] as $key => $value)\r\n\t\t\t\t$this->database['Socket']['Types'][$key] = array(\"Index\" => $key, \"Name\" => $value);\r\n\t\t\t\r\n\t\t\tforeach($serialize_data[1] as $key => $value)\r\n\t\t\t{\r\n\t\t\t\t$this->database['Socket']['Options'][$key]['Index'] = $key;\r\n\t\t\t\t$this->database['Socket']['Options'][$key]['Type'] = $value[0];\r\n\t\t\t\t$this->database['Socket']['Options'][$key]['Name'] = $value[1];\r\n\t\t\t\t$this->database['Socket']['Options'][$key]['Values'][1] = $value[2];\r\n\t\t\t\t$this->database['Socket']['Options'][$key]['Values'][2] = $value[3];\r\n\t\t\t\t$this->database['Socket']['Options'][$key]['Values'][3] = $value[4];\r\n\t\t\t\t$this->database['Socket']['Options'][$key]['Values'][4] = $value[5];\r\n\t\t\t\t$this->database['Socket']['Options'][$key]['Values'][5] = $value[6];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tCTM_FileManage::Lib('ReadScript')->WriteSerializeData(\"Item_SocketSystem.serialize.dat\", $this->database['Socket'], md5_file($this->settings['Files']['SocketSystem']));\r\n\t\t}\r\n\t\telseif(!$this->database['Socket'])\r\n\t\t{\r\n\t\t\t$this->database['Socket']['Types'] = $serialize_data['Types'];\r\n\t\t\t$this->database['Socket']['Options'] = $serialize_data['Options'];\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "40885ecf415f8f5590d169f3e068c31d", "score": "0.42835757", "text": "public function pushRequests(): void {\n foreach($this->sentRequests as $request) {\n $this->database_request_repository->addRequest($request);\n }\n }", "title": "" }, { "docid": "858bfcbd545ba411d47d21f9710fa7b5", "score": "0.42752624", "text": "function ev_accept($socket, $flag, $base)\n{\n\n global $clients;\n static $next_id = 0;\n\n $connection = stream_socket_accept($socket);\n stream_set_blocking($connection, 0);\n\n if (GPOP_PORT == 995) {\n stream_socket_enable_crypto($clients[$next_id]['socket'], true, STREAM_CRYPTO_METHOD_TLS_SERVER);\n }\n $next_id++;\n\n $buffer = event_buffer_new($connection, 'ev_read', 'ev_write', 'ev_error', $next_id);\n event_buffer_base_set($buffer, $base);\n event_buffer_timeout_set($buffer, GPOP_TIMEOUT, GPOP_TIMEOUT);\n event_buffer_watermark_set($buffer, EV_READ, 0, 0xffffff);\n event_buffer_priority_set($buffer, 10);\n event_buffer_enable($buffer, EV_READ | EV_PERSIST);\n\n $clients[$next_id]['socket'] = $connection;\n $clients[$next_id]['ev_buffer'] = $buffer; // new socket\n $clients[$next_id]['state'] = 0;\n $clients[$next_id]['db'] = PopDb_Factory::getInstance(GPOP_DB_MAPPER);\n $clients[$next_id]['user'] = '';\n $clients[$next_id]['pass'] = '';\n $clients[$next_id]['error_c'] = 0;\n $clients[$next_id]['read_buffer'] = '';\n $clients[$next_id]['read_buffer_ready'] = false; // true if the buffer is ready to be fetched\n // The client may use this timestamp for APOP authentication\n $clients[$next_id]['ts'] = '<' . getmypid() . '.' . time() . '@' . GPOP_HOSTNAME . '>';\n $clients[$next_id]['response'] = ''; // response messages are placed here, before they go on the write buffer\n $clients[$next_id]['time'] = time();\n $address = stream_socket_get_name($clients[$next_id]['socket'], true);\n $clients[$next_id]['address'] = $address;\n\n\n process_pop($next_id);\n\n if (strlen($clients[$next_id]['response']) > 0) {\n event_buffer_write($buffer, $clients[$next_id]['response']);\n add_response($next_id, null);\n }\n}", "title": "" }, { "docid": "a6922bb9a8654ad5c9333cf47155ef4b", "score": "0.42732692", "text": "public function storeMultiple($volumeServerAddress, $fid, array $files)\n\t{\n\t\t$count = count($files);\n\n\t\t$storeUrl = $volumeServerAddress . '/' . $fid;\n\t\t// TODO check for http://\n\t\t$response = array();\n\t\tfor($i = 1; $i <= $count; $i++) {\n\t\t\t$parameters = array('file'=>$files[$i-1]);\n\n\t\t\t$response[] = $this->transport->post($storeUrl, $parameters);\n\n\t\t\t$storeUrl = $volumeServerAddress . '/' . $fid . '_' . $i;\n\t\t}\n\n\t\t$this->transport->close();\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "03717b138402c4956f862c312201d51e", "score": "0.42627144", "text": "public function add(array $params = [])\n {\n return $this->handleMiddleware('add', $params, function(MiddlewareRequest $request) {\n $params = $request->getApiMethodArguments();\n $data = $params;\n $response = $this->apiInstance->channelsAdd($data);\n return $this->handleResponse($response);\n });\n }", "title": "" }, { "docid": "81afdf56776070b78479476d474d9345", "score": "0.42615098", "text": "private function registerApplicationEvents(): void\n {\n foreach ($this->listens() as $event => $listeners) {\n foreach ($listeners as $listener) {\n self::listen($event, $listener);\n }\n }\n\n }", "title": "" }, { "docid": "cbdcd478b438fe05e736190f2767879c", "score": "0.42596868", "text": "private function bindEventListenersEvents()\n\t{\n\t\tif ($this->_eventListeners && !$this->_listenerInstances) {\n\t\t\tforeach ($this->_eventListeners as $listener) {\n \n\t\t\t\t$listener = static::getListener($listener);\n\t\t\t\t\n\t\t\t\t$events = $listener->events();\n\t\t\t\t\n\t\t\t\tif ($events) foreach ($events as $name => $handler) {\n\t\t\t\t\tstatic::on($name, is_string($handler) ? [$listener, $handler] : $handler);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "2aa9f29170932aeb6d90cf3c291a9cf0", "score": "0.42530036", "text": "protected function discoverServers()\n {\n $discoverySocket = new HumptySimpleSocket(\n AF_INET,\n SOCK_DGRAM,\n SOL_UDP\n );\n\n // set it to broadcast\n $discoverySocket->setOption(SOL_SOCKET, SO_BROADCAST, 1);\n\n // connect to the broadcast ip and port\n $discoverySocket->connect(\n $this->config->getSetting('discovery-address'),\n $this->config->getSetting('discovery-port')\n );\n\n $this->localIp = $discoverySocket->getIp();\n\n // set up a socket to listen for replies on\n $replySocket = new HumptySimpleSocket();\n $replySocket->bind($this->localIp, $this->config->getSetting('discovery-port'));\n $replySocket->setNonBlock();\n $replySocket->listen();\n \n // compose the discovery message containing the details of the port servers should reply to\n $message = HumptyDiscoveryServer::DISCOVERY_FROM_HEADER . ': ' .\n $this->localIp . ':' . $this->config->getSetting('discovery-port');\n\n // write the discovery message to the socket\n $discoverySocket->write($message);\n\n // reply time out in milliseconds\n $replyTimeOut = microtime(true) + self::REPLY_TIME_OUT;\n\n // listen for replies, and save address details to the server array\n do\n {\n if ($server = $replySocket->accept())\n {\n socket_getpeername($server, $remoteAddress, $remotePort);\n if ($data = @socket_read($server, 128))\n {\n preg_match(\"/\" . HumptyDiscoveryServer::DISCOVERY_RESPONSE_HEADER . \": (\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}):(\\d+)/\", $data, $matches);\n\n if (count($matches) != 3)\n {\n continue;\n }\n else\n {\n $port = $matches[2];\n $this->servers[$remoteAddress] = $port;\n }\n }\n }\n } while (microtime(true) <= $replyTimeOut);\n\n // close the sockets\n $discoverySocket->close();\n $replySocket->close();\n }", "title": "" }, { "docid": "d8531d43fec35e48b8f7b6efc5d30db6", "score": "0.4240972", "text": "public function onConnect($sw, $fd, $from_id)\n {\n }", "title": "" }, { "docid": "e81460f7a3f1be2168ca568a317e43a0", "score": "0.42400122", "text": "private function creatingRoomMessages(SimpleXMLElement $rooms)\n\t{\n\t\tforeach ($rooms->room as $r)\n\t\t{\n\t\t\t$tempArray=array(\"name\"=>(string)$r->name,\"event\"=>(string)$r->event); \n\t\t\tforeach ($r->params->children() as $paramAttribute => $p)\n\t\t\t{\n\t\t\t\tforeach ($p->children() as $key=>$pInner)\n\t\t\t\t{\n\t\t\t\t\t$tempArray['params'][$paramAttribute][]=array($key=>(string)$pInner); \n\t\t\t\t} \n\t\t\t}\n\t\t\t$parsedEvents[]=$tempArray; \n\t\t}\n\t\t $this->rooms=$parsedEvents;\n\t}", "title": "" }, { "docid": "ea51ec5430f428d84a1f7caf091f64f0", "score": "0.42393082", "text": "public function start() {\n\n\t\tglobal $port, $path;\n\n\t\t$this->_mPort = $port ? $port : $this->_mPort;\n\t\tself::$_phpDir = $path ? $path : self::$_phpDir;\n\n\t\t$this->_logFile = Config::LOG_DIR.\"main_log\";\n\t\tif (is_writable($this->_logFile)) {\n\t\t\t$this->_logEnabled = true;\n\t\t} else {\n\t\t\tConsole::Warning('Log file is not writable!');\n\t\t}\n\t\t$socket = null;\n\t\t//opening main socket\n\t\ttry {\n\t\t\t$socket = stream_socket_server(\"tcp://0.0.0.0:{$this->_mPort}\", $errno, $errstr);\n\t\t} catch (Exception $e) {\n\t\t\t// handle socket bind exception here\n\t\t}\n\n\t\tif (!$socket) {\n\t\t\texit($errstr.\" (\".$errno.\")\");\n\t\t} else {\n\t\t\t$this->log(PHP_EOL.\"Listening for connections on \".$this->_mPort);\n\t\t}\n\n\t\t$allSockets = &$this->_mAllSockets;\n\t\t$allSockets[] = $socket;\n\n\t\tregister_shutdown_function(array($this, \"shutdown\"));\n\n\t\t$lastActivityCheckTime = time();\n\n\t\t//buffer for reading process responses, while not reached end of response\n\t\t$buff = array();\n\n\t\twhile (1) {\n\t\t\tif (time() - $lastActivityCheckTime > 60) {\n\t\t\t\t$lastActivityCheckTime = time();\n\t\t\t\t$this->checkActivity();\n\t\t\t}\n\n\t\t\t$socketsToRead = $allSockets;\n\t\t\tforeach ($socketsToRead as $key => $res) {\n\t\t\t\t//user disconnected\n\t\t\t\tif ($this->isBadSocket($res)) {\n\t\t\t\t\tunset($socketsToRead[$key]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//if any changes in sockets?\n\t\t\t$write = array();\n\t\t\t$except = array();\n\t\t\t$modFd = stream_select($socketsToRead, $write, $except, 0);\n\n\t\t\tif ($modFd > 0) {\n\t\t\t\tfor ($i = 0; $i < $modFd; ++$i) {\n\t\t\t\t\tif ($socketsToRead[$i] === $socket) { //new user\n\t\t\t\t\t\t$userSocket = stream_socket_accept($socket);\n\t\t\t\t\t\tif ($userSocket) {\n\t\t\t\t\t\t\t$socketData = new SocketData();\n\t\t\t\t\t\t\t$socketData->mSocket = $userSocket;\n\t\t\t\t\t\t\t$socketData->mLastActivityTime = time();\n\t\t\t\t\t\t\t$socketData->mName = $this->getSocketName($userSocket);\n\t\t\t\t\t\t\t$this->_mSockets[$socketData->mName] = $socketData;\n\t\t\t\t\t\t\tstream_set_blocking($socket, 0);\n\t\t\t\t\t\t\t$this->log(\"[main] client connected: \".$socketData->mName);\n\t\t\t\t\t\t\t$this->sendToSocket('<!DOCTYPE cross-domain-policy (View Source for full doctype...)><cross-domain-policy><allow-access-from domain=\"*\" to-ports=\"*\" secure=\"false\" /></cross-domain-policy>', $userSocket);\n\t\t\t\t\t\t\t$allSockets[] = $userSocket;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->log(\"[main] invalid socket not accepted!\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//read new data from server\n\t\t\t\t\t\t$sockData = fread($socketsToRead[$i], 4096);\n\t\t\t\t\t\tif (strlen($sockData) === 0) {\n\t\t\t\t\t\t\t// connection closed\n\t\t\t\t\t\t\t$this->closeSocket($socketsToRead[$i]);\n\t\t\t\t\t\t} else if ($sockData === false) {\n\t\t\t\t\t\t\t$this->log(\"[main] something bad happened\");\n\t\t\t\t\t\t\t$keyToDel = array_search($socketsToRead[$i], $allSockets, true);\n\t\t\t\t\t\t\tunset($allSockets[$keyToDel]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->log(\"[main] client: \".$sockData);\n\t\t\t\t\t\t\t$requests = explode(\"\\n\", $sockData);\n\t\t\t\t\t\t\tforeach ($requests as $request) {\n\t\t\t\t\t\t\t\tif ($request) {\n\t\t\t\t\t\t\t\t\t$this->request($request, $socketsToRead[$i]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//reading stdout pipes\n\t\t\tif (count($this->_mProcesses)) {\n\t\t\t\tforeach ($this->_mProcesses as $name => $process) {\n\t\t\t\t\t$data = '';\n\t\t\t\t\t//reading first 1kb\n\t\t\t\t\t$data .= fread($process->mPipeOut, 4096);\n\t\t\t\t\t//if not reached end of line, reading 50 k more\n\t\t\t\t\tif ($data) {\n\t\t\t\t\t\t$char = ord(substr($data, -1));\n\t\t\t\t\t\t$this->log(\"[main] last char ord: \".$char);\n\t\t\t\t\t\tif ($char != 10) {\n\t\t\t\t\t\t\t$this->log(\"[main] reading 50r more\");\n\t\t\t\t\t\t\t$data .= fread($process->mPipeOut, 51200);\n\t\t\t\t\t\t\t$char = ord(substr($data, -1));\n\t\t\t\t\t\t\t$this->log(\"[main] last char ord: \".$char);\n\t\t\t\t\t\t\tif ($char != 10) {\n\t\t\t\t\t\t\t\t//saving part of mssage and waiting next part\n\t\t\t\t\t\t\t\tif (!isset($buff[$name])) {\n\t\t\t\t\t\t\t\t\t$buff[$name] = '';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$buff[$name] .= $data;\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (isset($buff[$name])) {\n\t\t\t\t\t\t\t$data = $buff[$name].$data;\n\t\t\t\t\t\t\t$buff[$name] = null;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$data = trim($data);\n\n\t\t\t\t\t\t$this->log(\"[process]: \".$data);\n\t\t\t\t\t\t$process->mLastActivityTime = time();\n\t\t\t\t\t\t$xmlparts = explode(PHP_EOL, $data);\n\t\t\t\t\t\tforeach ($xmlparts as $xmlpart) {\n\t\t\t\t\t\t\t$parts = explode(\"|\", $xmlpart);\n\t\t\t\t\t\t\t$socketData = isset($this->_mSockets[$parts[0]]) ? $this->_mSockets[$parts[0]] : null;\n\t\t\t\t\t\t\t$userSocket = $socketData ? $socketData->mSocket : null;\n\n\t\t\t\t\t\t\tif ($userSocket) {\n\t\t\t\t\t\t\t\t$xmlStr = $parts[1];\n\t\t\t\t\t\t\t\t$this->sendToSocket($xmlStr, $userSocket);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$this->processCommand($xmlpart, $name);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//little sleep for weaking cpu usage\n\t\t\tusleep(10000);\n\t\t}\n\t}", "title": "" }, { "docid": "3d50fba01bbd5702b5e3101cba40316d", "score": "0.42382365", "text": "function socket_send_msg ($socket, array $message, $flags )\n{\n return socket_sendmsg($socket, $message, $flags);\n}", "title": "" }, { "docid": "18e8ee4ba183f640c530620b37599cc6", "score": "0.4236802", "text": "public function run(): void\n {\n $this->sockets[] = $this->server;\n while (true) {\n if (isset($this->tick)) {\n if (call_user_func($this->tick, $this) === false) {\n break;\n }\n }\n $changed = $this->sockets;\n $write = [];\n $except = [];\n if (@stream_select($changed, $write, $except, (isset($this->tick) ? 0 : null)) > 0) {\n $messages = [];\n foreach ($changed as $socket) {\n if ($socket === $this->server) {\n $temp = stream_socket_accept($this->server);\n if ($temp !== false) {\n if ($this->connected($temp)) {\n if (isset($this->callbacks['connect'])) {\n call_user_func($this->callbacks['connect'], $this->clients[(int) $temp], $this);\n }\n }\n }\n } else {\n try {\n $message = $this->receive($socket);\n if ($message !== '>PING'.chr(0)) {\n $messages[] = [\n 'client' => $this->clients[(int) $socket],\n 'message' => $message,\n ];\n }\n } catch (WebSocketException $e) {\n if (isset($this->callbacks['disconnect'])) {\n call_user_func($this->callbacks['disconnect'], $this->clients[(int) $socket], $this);\n }\n $this->disconnectClient($socket);\n }\n }\n }\n foreach ($messages as $message) {\n if (isset($this->callbacks['message'])) {\n call_user_func($this->callbacks['message'], $message['client'], $message['message'], $this);\n }\n }\n }\n usleep(5000);\n }\n }", "title": "" }, { "docid": "ba17e9bb6b8adcbc69a8dc19536a6d89", "score": "0.42314848", "text": "public function push($payload):void\n {\n if (! $this->broadcast && $this->sender && ! $this->hasDescriptor($this->sender)) {\n $this->addDescriptor($this->sender);\n }\n // check if to broadcast to other clients\n if($this->shouldBroadcast())\n {\n $this->addDescriptors($this->getWebsocketConnections());\n }\n\n // // push message to designated fds\n foreach ($this->descriptors as $descriptor) {\n if ( $this->shouldPushToDescriptor($descriptor)) {\n $this->server->push($descriptor, $payload, $this->opcode);\n }\n }\n\n }", "title": "" }, { "docid": "2e50de5a0c8b4f7e0cb618aee63bd5ac", "score": "0.42068842", "text": "private function createSocket(){\r\n //Create a socket to send UDP packets\r\n $this->socket=socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); \r\n if(!$this->socket){\r\n throw new Exception('Socket not created');\r\n }else{\r\n //Set broadcast option for socket\r\n socket_set_option($this->socket, SOL_SOCKET, SO_BROADCAST,1);\r\n }\r\n }", "title": "" }, { "docid": "f2548d323363e7f4c4d294e8b9208044", "score": "0.42016628", "text": "function server_loop($address, $port) {\n GLOBAL $fh;\n GLOBAL $__server_listening;\n\t\n\tprintLog($fh, \"server_looping...\");\n\n if(($sock = socket_create(AF_INET, SOCK_STREAM, 0)) < 0) {\n\t\tprintLog($fh, \"failed to create socket: \".socket_strerror($sock));\n exit();\n }\n\n\tif(($ret = socket_bind($sock, $address, $port)) < 0) {\n\t\tprintLog($fh, \"failed to bind socket: \".socket_strerror($ret));\n\t\texit();\n\t}\n\n\tif( ( $ret = socket_listen( $sock, 0 ) ) < 0 ) {\n\t\tprintLog($fh, \"failed to listen to socket: \".socket_strerror($ret));\n\t\texit();\n\t}\n\n\tsocket_set_nonblock($sock);\n\n\tprintLog($fh, \"waiting for clients to connect...\");\n\n\twhile ($__server_listening) {\n\t\t$connection = @socket_accept($sock);\n\t\tif ($connection === false) {\n\t\t\tusleep(100);\n\t\t} elseif ($connection > 0) {\n\t\t\thandle_client($sock, $connection);\n\t\t} else {\n\t\t\tprintLog($fh, \"error: \".socket_strerror($connection));\n\t\t\tdie;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "7bccd66b9e2c7074bc51c473e69d9646", "score": "0.41967702", "text": "function addServer($servername = 'localhost', $port = 0, $sharedSecret = 'testing123', $timeout = 3, $maxtries = 2)\n {\n $this->_servers[] = array($servername, $port, $sharedSecret, $timeout, $maxtries);\n }", "title": "" }, { "docid": "af53e04e27738c85324a3425e9bf18d0", "score": "0.4196239", "text": "function\tacceptConnection( &$socket )\n\t{\n\t\tfor( $i = 0 ; $i <= count( $this->clientFD ); $i++ )\n\t\t{\n\t\t\tif( !isset( $this->clientFD[$i] ) || $this->clientFD[$i] == NULL )\n\t\t\t{\n\t\t\t\t$this->clientFD[$i]\t=\tsocket_accept( $socket );\n\t\t\t\tsocket_setopt( $this->clientFD[$i], SOL_SOCKET, SO_REUSEADDR, 1 );\n\t\t\t\t$peer_host\t=\t\"\";\n\t\t\t\t$peer_port\t=\t\"\";\n\t\t\t\tsocket_getpeername( $this->clientFD[$i], $peer_host, $peer_port );\n\t\t\t\t$this->clientInfo[$i]\t=\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"host\"\t\t=>\t$peer_host,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"port\"\t\t=>\t$peer_port,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"connectOn\"\t=>\ttime()\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t$this->clients++;\n\n\t\t\t\t$this->sendDebugMessage( \"New connection ( \".$i.\" ) from \".$peer_host.\" on port \".$peer_port );\n\n\t\t\t\tif( method_exists( $this, \"onConnect\" ) )\n\t\t\t\t\t$this->onConnect( $i );\n\t\t\t\treturn\t$i;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "c8b2ba3d9d362f70ff9c0874f6a2403a", "score": "0.41955686", "text": "public function appendRoomPeerIds($value)\n {\n return $this->append(self::ROOMPEERIDS, $value);\n }", "title": "" }, { "docid": "66ecf1325b0df2abc4c2f9111ee096fa", "score": "0.4182714", "text": "public function add($items)\n\t{\n\t\treturn $this->append($items);\n\t}", "title": "" }, { "docid": "b5c0c592c944c562df55a7bb08a69d4a", "score": "0.41823024", "text": "private function add_screens() {\n\t\t$screens = $this->get_screens();\n\n\t\tarray_walk( $screens, array( $this, 'add_screen' ) );\n\t}", "title": "" }, { "docid": "f30edbc825126be42904dd0f91234a15", "score": "0.4181063", "text": "public function run()\n\t{\n\n\n\n\t\t//设置socket并loop\n\t\t$this->c_fd = stream_socket_server($this->_local_address,$errno,$errstr);\n\n\n\t\tif(!$this->c_fd){\n\t\t\texit(\"socket create error {$errno} : $errstr\");\n\t\t}\n\n\t\t$flags = \\Event::READ;\n\n $add_res = $this->_event->add($this->c_fd, $flags, [$this, 'accept'],$this->c_fd);\n if(!$add_res){\n \texit(\"event add error\");\n }\n\n echo \"loop start ... \\n\";\n $this->_event->loop(); //Wait for events to become active, and run their callbacks. If the $this->fd become active ,will run this->accept\n echo \"loop exit ... \\n\";\n\t}", "title": "" }, { "docid": "1db8835d150809700a5f778dfb69576a", "score": "0.41781536", "text": "protected static function convertSockets(array $item): array\n {\n return collect($item['sockets'] ?? [])\n ->map(function ($socket) use ($item) {\n // map through colors\n switch ($socket['sColour']) {\n case 'R':\n $color = 'red';\n break;\n case 'B':\n $color = 'blue';\n break;\n case 'G':\n $color = 'green';\n break;\n default:\n $color = 'white';\n }\n\n return new ItemSocket([\n 'group' => $socket['group'],\n 'attribute' => $socket['attr'],\n 'color' => $color,\n ]);\n })\n ->toArray();\n }", "title": "" }, { "docid": "ea698f6dfea442958750d2ec676f57d3", "score": "0.41749275", "text": "protected function registerEvents()\n {\n $events = $this->app->make(Dispatcher::class);\n\n foreach ($this->events as $event => $listeners) {\n foreach ($listeners as $listener) {\n $events->listen($event, $listener);\n }\n }\n }", "title": "" }, { "docid": "0c8a87dcfd30df11dd7eb8722b34aca5", "score": "0.41682237", "text": "public function getSocketPair()\n {\n\n // initialize the array for the socket pair\n $sockets = array();\n\n // on Windows we need to use AF_INET\n $domain = (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN' ? AF_INET : AF_UNIX);\n\n // setup and return a new socket pair\n if (socket_create_pair($domain, SOCK_STREAM, 0, $sockets) === false) {\n throw new \\Exception(\"socket_create_pair failed. Reason: \" . socket_strerror(socket_last_error()));\n }\n\n // return the array with the socket pair\n return $sockets;\n }", "title": "" }, { "docid": "e243750ded878bb3cd80aa558f6bf1aa", "score": "0.41681036", "text": "function socket_create_master()\n {\n \n # No timeouts, flush content immediatly\n set_time_limit(0);\n ob_implicit_flush();\n\n # Create socket\n if(($socket = socket_create(AF_INET,SOCK_STREAM,0))===false )\n {\n $this->mlog ('Could not create socket');\n $this->mlog ('End of script');\n die();\n } \n\n # Bind to socket\n if(socket_bind($socket,$this->acs_ip,$this->acs_port)===false)\n {\n $this->mlog ('Could not bind to socket');\n $this->mlog ('End of script');\n die();\n }\n\n # Start listening\n if(socket_listen($socket)===false)\n {\n $this->mlog ('Could not set up socket listener');\n $this->mlog ('End of script');\n die();\n }\n \n return $socket;\n \n }", "title": "" }, { "docid": "481e1de76ce2203e6a42555c4c0d8b68", "score": "0.41632873", "text": "public function register()\n {\n foreach ($this->params['connections'] as $key => $val) {\n \n $key = $this->getConnectionKey($key);\n\n $this->container->share(\n $key,\n function () use ($val) {\n return $this->createConnection($val['server'], $val);\n }\n );\n }\n }", "title": "" }, { "docid": "12fb0d3ffb3eedfcff32de35988ac9c5", "score": "0.4157522", "text": "function append(...$args) {\n $append = curry(function($idx, $val, $arr) {\n return appendAll($idx, [$val], $arr);\n });\n\n return call_user_func_array($append, $args);\n}", "title": "" }, { "docid": "78275d00906080141248f5df2fdd82bb", "score": "0.41563675", "text": "public function addMultiple($type, array $data);", "title": "" }, { "docid": "e96035fcc1233f391ef74f0772cbfa50", "score": "0.414908", "text": "function add_datagram($osc_datagram) {\n $this->bin = NULL;\n array_push($this->data, $osc_datagram);\n }", "title": "" }, { "docid": "7efe5bab885373ea84e427cc642062b5", "score": "0.4130708", "text": "public function onOpen(Server $server, Request $request)\n {\n Log::info('WebSocket 连接建立');\n //Redis::ltrim('Rooms1',0,0);\n// $redis = Redis::lrange ('Rooms1', 0, -1); //返回第0个至倒数第一个, 相当于返回所有元素\n// var_dump($redis);\n// //测试打开redis存储用户\n// if (!in_array($request->fd,$redis)) // 限制重复用户\n// Redis::rpush('Rooms1', $request->fd); // 返回列表长度 1\n //$server->push($request->fd, '当前房间:');\n }", "title": "" }, { "docid": "3c4df7aa5774af61640a91b94324b33b", "score": "0.41271785", "text": "public function __construct()\n {\n parent::__construct();\n\n $this->createSocket(self::SOCKET_OUTPUT);\n $this->createSocket(self::SOCKET_ARRAY);\n $this->createSocket(self::SOCKET_DATA);\n }", "title": "" }, { "docid": "4de2b33c73219337f40d1d82fe55ebf1", "score": "0.41156176", "text": "protected function registerSwooleServerEvents()\n {\n $swooleListeners = SwooleListenerCollector::getCollector();\n\n if (!isset($swooleListeners[SwooleEvent::TYPE_SERVER]) || empty($swooleListeners[SwooleEvent::TYPE_SERVER])) {\n return;\n }\n\n $swooleServerListeners = $swooleListeners[SwooleEvent::TYPE_SERVER];\n $this->registerSwooleEvents($this->server, $swooleServerListeners);\n }", "title": "" }, { "docid": "cf18604df2fb9e995b1d4c7603635792", "score": "0.41155928", "text": "public function via()\n {\n return [\n 'database',\n 'broadcast',\n ];\n }", "title": "" }, { "docid": "9c6d3d3ea45cd05a5e516ab72fe2cbee", "score": "0.41130832", "text": "public function append($files) : self\n {\n $this->lister->append = (array)$files;\n\n return $this;\n }", "title": "" }, { "docid": "3adbe08861fb5acefb3313ce8501ae99", "score": "0.41122016", "text": "public function makeConnections() {\n\t\tglobal $controller;\n\t\tforeach ($this->bounds as $key => $value) {\n\t\t\t$set = \"set_$key\";\n\t\t\t$this->$set($controller->getFromID($value,$this->$key));\n\t\t}\n\t}", "title": "" }, { "docid": "83fd36f3fdacf56f375c7a566d5282d1", "score": "0.4101802", "text": "private function connect($socket) {\n\t\t$this->console(\"Creation of client on socket {$socket}\");\n\t\t$client = new Client(uniqid(), $socket);\n\t\t$this->clients[] = $client;\n\t\t$this->sockets[] = $socket;\n\t\t$this->console(\"Client #{$client->getId()} is created on socket {$client->getSocket()}\");\n\t}", "title": "" }, { "docid": "f3313643ee01fa2e29c88f437289dae5", "score": "0.40868357", "text": "public function onconnect(){\n debug('socket connected - writing packet');\n $this->nsp->connected[$this->id] = $this;\n $this->join($this->id);\n $skip = $this->nsp->name === '/' && $this->nsp->fns.length === 0;\n if (skip) {\n debug('packet already sent in initial handshake');\n } else {\n $this->packet(Helper::toStdClass([ 'type'=>Parser::CONNECT ]));\n }\n }", "title": "" }, { "docid": "d8ea0d9c7a8205a2068a87fd39d821c4", "score": "0.40799928", "text": "public function getSocket();", "title": "" }, { "docid": "c26ee2fd2c33099df2887b4e8e7ed05c", "score": "0.4078187", "text": "public function write() \r\n {\r\n $requests = array();\r\n \r\n // start executing registered handles\r\n do {\r\n $code = curl_multi_exec($this->_curl_multi, $running);\r\n } while ($code === CURLM_CALL_MULTI_PERFORM);\r\n \r\n // block further script execution until all handles are processed and ready for harvesting\r\n while ($running && $code === CURLM_OK) {\r\n // see if a handle ready for an action\r\n if (curl_multi_select($this->_curl_multi) !== - 1) {\r\n // wait until something changes\r\n do {\r\n $code = curl_multi_exec($this->_curl_multi, $running);\r\n } while ($code === CURLM_CALL_MULTI_PERFORM);\r\n }\r\n }\r\n \r\n while ($msg = curl_multi_info_read($this->_curl_multi, $msgs_in_queue)) \r\n {\r\n $handle_key_map = array_flip($this->_key_handle_map);\r\n $key = $handle_key_map[(string) $msg['handle']];\r\n $adapter = $this->getClient($key)->getAdapter();\r\n \r\n $adapter->setHandle($msg['handle']);\r\n $requests[$key] = $adapter->postWrite();\r\n $response = $adapter->read();\r\n \r\n $this->_responses[$key] = $response;\r\n }\r\n\r\n return $requests;\r\n }", "title": "" }, { "docid": "dcdfe76911e77264bb18e9305b1273cb", "score": "0.40692034", "text": "public function addChats($args) {\n $data = FALSE;\n $grid = new \\Models\\Grid($args[1]);\n $chat = new \\Models\\Chat($grid);\n $chatCtrl = new \\Controllers\\ChatController($chat);\n $input = \\Helper::getInput(TRUE);\n\n // Only one item? make it a sub multidemensional array\n if(!isset($input[0])) {\n $input = array($input);\n }\n\n // Convert UNIX to timestamp, which is used when the request is from the OpenSim Server\n foreach($input as $key => $row) {\n if(isset($row['timestamp']) && is_numeric($row['timestamp'])) {\n $input[$key]['message'] = urldecode($row['message']);\n $input[$key]['timestamp'] = date('Y-m-d H:i:s', $row['timestamp']);\n }\n }\n\n // Validate parameters before inserting\n if($chatCtrl->validateParametersCreate($input)) {\n $data = $chatCtrl->addChats($input);\n }\n\n // Format the result\n $result = array(\n 'success' => $data !== FALSE ? TRUE : FALSE,\n 'id' => $data !== FALSE ? $data : 0\n );\n\n return $result;\n }", "title": "" }, { "docid": "5ecdce3fb2e3675f1c03b832a267347e", "score": "0.40630648", "text": "protected function registerEventBindings()\n {\n if (! $this->app['files']->exists(storage_path('framework/events.php'))) {\n return;\n }\n\n $events = $this->app['events'];\n\n $listen = $this->app['files']->getRequire(storage_path('framework/events.php'));\n\n foreach ($listen as $event => $listeners) {\n foreach ($listeners as $listener) {\n $events->listen($event, $listener);\n }\n }\n }", "title": "" }, { "docid": "cb360c77a5337eebd32e9db2d9149177", "score": "0.40503132", "text": "public function addMany($rules)\n {\n if(!is_array($rules)) $rules = (array)$rules;\n $this->rules += $rules;\n return $this;\n }", "title": "" }, { "docid": "3567f962f6f0d4c324a9ed9f47e3a93d", "score": "0.4036664", "text": "public function addRoutes(array $routes);", "title": "" }, { "docid": "42878aa2d26183d4b01adf07cf96b4df", "score": "0.4033296", "text": "public function getChildSocket(): Socket\n {\n return $this->child;\n }", "title": "" }, { "docid": "7a146f0e41aa4899a148fa67475baaa4", "score": "0.40280074", "text": "function socket_send_to ($socket, $buf, $len, $flags, $addr, $port = 0)\n{\n return socket_sendto($socket, $buf, $len, $flags, $addr, $port);\n}", "title": "" }, { "docid": "741343205728ff855c4f751fb6369f24", "score": "0.40252408", "text": "protected function registerFilesCollection()\n {\n $this->app->bind(FilesInterface::class, function($app, array $data = []){\n return new Files($data);\n });\n }", "title": "" }, { "docid": "d12dce4b80d7edbb0ecd4fc94aeb0d75", "score": "0.4008647", "text": "public function emitBatch(array $events);", "title": "" }, { "docid": "040ce31cd334b2788baaeccad9efa236", "score": "0.4002622", "text": "public function addConnections($connectionOptions)\n\t{\n\t\tif ($connectionOptions instanceof Zend_Config) {\n\t\t\t$connectionOptions = $connectionOptions->toArray();\n\t\t}\n\t\t\n\t\t$masters = array();\n\t\t$masterStackOptions = array();\n\t\t$slaves = array();\n\t\t$slaveStackOptions = array();\n\t\t\n\t\t$group = $this;\n\t\t$addConnections = function(Shanty_Mongo_Connection_Stack $stack, array $connections) use ($group) {\n\t\t\tforeach ($connections as $connectionData) {\n\t\t\t\t$connection = new Shanty_Mongo_Connection($group->formatConnectionString($connectionData));\n\t\t\t\tif (array_key_exists('weight', $connectionData)) $weight = (int) $connectionData['weight'];\n\t\t\t\telse $weight = 1;\n\t\t\t\t\n\t\t\t\t$stack->addNode($connection, $weight);\n\t\t\t}\n\t\t};\n\t\t\n\t\t// Lets add our masters\n\t\tif (array_key_exists('master', $connectionOptions)) $masters[] = $connectionOptions['master']; // single master\n\t\telseif (array_key_exists('masters', $connectionOptions)) {\n\t\t\t$connectionKeys = array_filter(array_keys($connectionOptions['masters']), 'is_numeric');\n\t\t\t$masters = array_intersect_key($connectionOptions['masters'], array_flip($connectionKeys)); // only connections\n\t\t\t$masterStackOptions = array_diff_key($connectionOptions['masters'], array_flip($connectionKeys)); // only options\n\t\t}\n\t\telse $masters[] = $connectionOptions; // one server\n\t\t\n\t\t$addConnections($this->getMasters(), $masters); // Add master connections\n\t\t$this->getMasters()->setOptions($masterStackOptions); // Set master stack options\n\t\t\n\t\t// Lets add our slaves\n\t\tif (array_key_exists('slave', $connectionOptions)) $slaves[] = $connectionOptions['slave']; // single slave\n\t\telseif (array_key_exists('slaves', $connectionOptions)) {\n\t\t\t$connectionKeys = array_filter(array_keys($connectionOptions['slaves']), 'is_numeric');\n\t\t\t$slaves = array_intersect_key($connectionOptions['slaves'], array_flip($connectionKeys)); // only connections\n\t\t\t$slaveStackOptions = array_diff_key($connectionOptions['slaves'], array_flip($connectionKeys)); // only options\n\t\t}; \n\t\t\n\t\t$addConnections($this->getSlaves(), $slaves); // Add slave connections\n\t\t$this->getSlaves()->setOptions($slaveStackOptions); // Set slave stack options\n\t}", "title": "" }, { "docid": "ea88a813a9a4e588effffdd9ef5a1a8f", "score": "0.4002082", "text": "public function bind() {\r\n $listeners = $this->cache->get('app-listeners', function () {\r\n foreach ($this->resolver->getListeners() as $file) {\r\n try {\r\n $binding = $this;\r\n require_once($file);\r\n } catch (\\Throwable $e) {\r\n $this->logger->warn(\"Unable to include $file: \" . $e->getMessage());\r\n }\r\n }\r\n\r\n $listeners = $this->getListeners();\r\n\r\n if ($this->database->isConnected()) {\r\n /** @var ModelEx $eventModel */\r\n if ($eventModel = $this->resolver->getModel('Event', true)) {\r\n try {\r\n foreach ($eventModel::all() as $item) {\r\n $attrs = $item->attributesToArray();\r\n list($class, $func) = @explode('@', $attrs['handler']);\r\n $event = array_merge($attrs, ['event' => $attrs['name'], 'handler' => [sprintf('\\\\%s', ltrim($class, '\\\\')), $func ?? 'index']]);\r\n\r\n $listeners[] = $event;\r\n }\r\n } catch (\\Exception $e) {\r\n }\r\n }\r\n }\r\n\r\n return $listeners;\r\n }, 300);\r\n\r\n foreach ($listeners as $listener) {\r\n $this->dispatcher->listen($listener['event'], $listener['handler'], $listener['priority'] ?? 99, $listener['data'] ?? '');\r\n }\r\n }", "title": "" }, { "docid": "65cb704ac50e2f2847fe9d87cb43b4bd", "score": "0.40015903", "text": "public function onReceive(Server $server, $fd, $fromId, $data)\n {\n }", "title": "" }, { "docid": "77a80ac73343adf7d2978527871dccee", "score": "0.39973137", "text": "protected function startBatch(array $jobs) {\r\n\t\t$streams = [];\r\n\r\n\t\tforeach ($jobs as $key => $job) {\r\n\t\t\t$stream = stream_socket_client('localhost:80', $errno, $errstr, null, STREAM_CLIENT_ASYNC_CONNECT|STREAM_CLIENT_CONNECT);\r\n\t\t\tif (!$stream) {\r\n\t\t\t\tthrow new \\Exception('Error creating socket stream');\r\n\t\t\t}\r\n\t\t\t$streams[] = $stream;\r\n\t\t\t$jobs[$key]['stream'] = $stream;\r\n\t\t}\r\n\r\n\t\t$read = null;\r\n\t\t$except = null;\r\n\t\t$write = $streams;\r\n\r\n\t\t$connectTimeout = $this->connectTimeout * 1000;\r\n\t\t$start = microtime(true);\r\n\r\n\t\twhile (count($jobs) > 0 && $connectTimeout > 0) {\r\n\t\t\t$connectTimeout = min(0, $connectTimeout - ((microtime(true) - $start) * 1000));\r\n\t\t\tif (stream_select($read, $write, $except, 0, $connectTimeout)) {\r\n\t\t\t\tforeach ($write as $stream) {\r\n\t\t\t\t\tforeach ($jobs as $key => $job) {\r\n\t\t\t\t\t\tif ($stream == $job['stream']) {\r\n\t\t\t\t\t\t\tfwrite($stream, $this->createRequest($job['handler'], $this->getTimeout($job['options'])));\r\n\t\t\t\t\t\t\t$this->jobs[] = ['stream' => $stream, 'options' => $job['options'], 'data' => ''];\r\n\t\t\t\t\t\t\tunset($jobs[$key]);\r\n\t\t\t\t\t\t\tbreak;\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// call onConnectTimeout for remaining jobs\r\n\t\tforeach ($jobs as $job) {\r\n\t\t\tif (array_key_exists('onConnectTimeout', $job['options'])) {\r\n\t\t\t\tcall_user_func($job['options']['onConnectTimeout']);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "501d8ed1f553e812fc4f893543a66f2c", "score": "0.39882", "text": "function monitor()\n\t/* ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */ \n {\n $socks = $this->get_sockets();\n do {\n\n //check for socket update\n if( !count($socks) || count($socks) != count($this->connected_servers) ) {\n\n $socks = $this->get_sockets();\n\n if( !count($socks) ) {\n\n continue; //Try again\n }\n }\n\n $r = $socks;\n $w = null;\n $e = null;\n $tv_sec = null;\n\n if( false === socket_select($r, $w, $e, $tv_sec) ) {\n \n //socket select failed \n break;\n }\n else {\n\n foreach( $r as $socket ) {\n\n socket_getpeername( $socket, $IP, $PORT );\n //check for a zero length buffer read\n if( !$this->servers[\"$IP:$PORT\"]->readbuffer() ) { \n \n /*if( $this->servers[\"$IP:$PORT\"]->connected ) {\n\n $this->servers[\"$IP:$PORT\"]->disconnect();\n }*/\n\n $socks = $this->get_sockets( \"$IP:$PORT\" ); \n }\n }\n }\n\n } while( true );\n }", "title": "" }, { "docid": "1464fc1cd4cf2c1b57de1043a2323342", "score": "0.39849278", "text": "public function listen()\n {\n asyncCall(function () {\n $server = Server::listen($this->uri);\n\n while (null !== $socket = yield $server->accept()) {\n $this->handleNewClient($socket);\n }\n });\n }", "title": "" }, { "docid": "3b102b5382dd5981ca81da3e0d392168", "score": "0.39778462", "text": "private function addReadableWatcher(): void\n {\n $this->readWatcher = Loop::onReadable(\n $this->getStream(),\n function(): \\Generator\n {\n yield $this->onDataAvailable();\n }\n );\n }", "title": "" }, { "docid": "3dd1d44f10c724ca1b0cfed6d7edfe92", "score": "0.39696681", "text": "public function get_appended_events();", "title": "" }, { "docid": "ce63ccf64e096fddd67f24d3002d9e21", "score": "0.39682257", "text": "public function getSocket()\n {\n }", "title": "" }, { "docid": "850c8f794cd29e6019b56c26ca7b4473", "score": "0.39616296", "text": "abstract protected function __daemon_listen();", "title": "" }, { "docid": "0d8872f554991c57dc06cdc379e53c0e", "score": "0.3961112", "text": "public function broadcastOn()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "81ac9088ce79acbfbc97a56f8d47d379", "score": "0.39608172", "text": "public function addWalksArray($arrayofwalks) {\n foreach ($arrayofwalks as $walk) {\n $this->arrayofevents[] = $walk;\n }\n }", "title": "" }, { "docid": "b9f70df9c038ecf7093e541010264a5d", "score": "0.39597327", "text": "function __construct($path, $routes){\n $this->pid = getmypid();\n $this->_get_socket_file($path);\n $this->routes = $routes; //copy them from the parent\n $this->socket = stream_socket_server('unix://'.$this->sock_file, $errno, $errstr, STREAM_SERVER_BIND | STREAM_SERVER_LISTEN);\n if(!$this->socket) {\n die(\"$errstr ($errno)\");\n }\n $this->run();\n }", "title": "" }, { "docid": "4f1fd18655c8bdf8e474e60599b8d8e6", "score": "0.39574698", "text": "public function addMessages(){\n\t\ttry{\n\t\t\t$query = $this->db->prepare('INSERT INTO chat(refmember,message) VALUES(?,?)') ;\n\t\t\t$query->execute(array($this->user->id,$_POST['message']));\n\t\t\t//$result = $query->fetch(PDO::FETCH_ASSOC);\n\t\t}\n\t\tcatch (SpykeeException $e){\n\t\t\tif($this->isAdmin){\n\t\t\t\tError::displayError($e);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "d1922627157e371d3087a4d5cf59b548", "score": "0.39572972", "text": "function ngx_connect($fd, $addr, $port)\n{\n return socket_connect($fd,$addr,$port);\n}", "title": "" }, { "docid": "6574cec29e0dc48df2f3d68b7a11b151", "score": "0.39442742", "text": "function interact($sock) {\n\n}", "title": "" }, { "docid": "7c6921e56ad07d3075bb3643bc2a2f37", "score": "0.39430487", "text": "public function onReceive($sw, $fd, $from_id, $data)\n {\n }", "title": "" }, { "docid": "6f08cd73435a7f31280752e3a8f6ffbf", "score": "0.39422342", "text": "public function test_a_event_request_add_multiple_events()\n {\n $data = [\n 'description' => 'test user',\n 'dates' => [date(\"Y-m-d\")],\n 'year' => date(\"Y\"),\n 'month' => date(\"m\"),\n ];\n\n $res = $this->json('POST', '/api/v1/event/add-multiple', $data)\n ->assertStatus(200);\n }", "title": "" }, { "docid": "52533d0889ed3a2f72f479fa0f667291", "score": "0.39385486", "text": "function addSharedEvent($eventId, $users) {\n \n try {\n $mySqlCon = establishDBConnection();\n $stmt = $mySqlCon->prepare(\"update Events set sharedWith = :sharedWith where eventId = :eventId\"); \n \n $stmt->bindParam(':sharedWith', $users, PDO::PARAM_STR);\n $stmt->bindParam(':eventId', $eventId, PDO::PARAM_INT);\n \n $stmt->execute();\n $stmt = null;\n $mySqlCon = null;\n } catch (PDOException $e) {\n \n echo 'Connection failed: ' . htmlentities($e->getMessage());\n exit();\n }\n }", "title": "" }, { "docid": "7bd27faac6572e505e37b6c154ca5d0e", "score": "0.39384258", "text": "public function open()\n {\n try {\n $this->sock = @socket_create(AF_UNIX, SOCK_STREAM, 0);\n $this->handleError();\n\n try {\n @socket_connect($this->sock, $this->path);\n } catch (\\Exception $e) {\n }\n $this->handleError();\n } catch (SyslogException $e) {\n /**\n * If we have a EPROTOTYPE error, the log socket doesn't support stream sockets, only dgram sockets.\n */\n if ($e->getCode() == SOCKET_EPROTOTYPE) {\n try {\n $this->sock = @socket_create(AF_UNIX, SOCK_DGRAM, 0);\n } catch (\\Exception $e) {\n }\n $this->handleError();\n\n try {\n @socket_connect($this->sock, $this->path);\n } catch (\\Exception $e) {\n }\n $this->handleError();\n } else {\n throw $e;\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "c300a626a65a5d416ef7625ca741893c", "score": "0.3936717", "text": "public function CreateSocket()\n {\n return parent::CreateSocket();\n }", "title": "" }, { "docid": "15be5d32f4cada049942dbd95a488d87", "score": "0.39329258", "text": "public function broadcastOn()\n {\n return [\n new PrivateChannel('channel-name'),\n new PrivateChannel('another-channel-name'),\n ];\n }", "title": "" }, { "docid": "7a6a9ec066e49e5c029698f039eab6f1", "score": "0.39327917", "text": "public function addAsync(array $params = [])\n {\n return $this->handleMiddleware('add', $params, function(MiddlewareRequest $request) {\n $params = $request->getApiMethodArguments();\n $data = $params;\n $response = $this->apiInstance->channelsAddAsync($data);\n return $response;\n });\n }", "title": "" }, { "docid": "4119fa3b6cf5e18ce999c9a6a0c79115", "score": "0.3932574", "text": "public function __construct(...$transports)\n {\n foreach ($transports as $transport) {\n $this->add($transport);\n }\n }", "title": "" } ]
f74e0c0d043afd188f0e8516819a3d9a
Get the value of gameNeededRAM
[ { "docid": "1353dbc934fc62d5fd018604690a2522", "score": "0.8772401", "text": "public function getGameNeededRAM()\n {\n return $this->gameNeededRAM;\n }", "title": "" } ]
[ { "docid": "6dc52d4610198b16a5b9e27bc6384ee8", "score": "0.6977353", "text": "public function prgRam() { return $this->_m_prgRam; }", "title": "" }, { "docid": "bea81625978e72bfdcd8241868d43ab8", "score": "0.6839031", "text": "public function getRam() {\n\t\tif (isset($this -> ram)) {\n\t\t\treturn $this -> ram;\n\t\t} else {\n\t\t\t// By default return 1024\n\t\t\treturn 1024;\n\t\t}\n\t}", "title": "" }, { "docid": "12847be39a77c44fc7740026eac3cd41", "score": "0.66806775", "text": "public function getGameNeededFreeSpace()\n {\n return $this->gameNeededFreeSpace;\n }", "title": "" }, { "docid": "61dcded6fcf34e5c972c47647797ba6f", "score": "0.6293116", "text": "public static function ram_used()\n\t{\n\t\t// Need to remove the prefix before minus\n\t\treturn substr(self::ram_total(), 0, -4) - substr(self::ram_free(), 0, -4) . \" GiB\";\n\t}", "title": "" }, { "docid": "0de0be16e86e6594f4424612482f7cb4", "score": "0.6251955", "text": "public function setGameNeededRAM($gameNeededRAM)\n {\n $this->gameNeededRAM = $gameNeededRAM;\n\n return $this;\n }", "title": "" }, { "docid": "0d46859a6f0a1286b67a8005a2409894", "score": "0.6155604", "text": "public function getGameNeededCPU()\n {\n return $this->gameNeededCPU;\n }", "title": "" }, { "docid": "181f3e89e649356f3cf41836a5d48945", "score": "0.59123755", "text": "public static function getTotalRam(): string\n {\n $result = 'N/A';\n $memoryInfoFile = '/proc/meminfo';\n if (!is_file($memoryInfoFile) || !is_readable($memoryInfoFile)) {\n return $result;\n }\n\n $memoryInfoFile = file($memoryInfoFile);\n if (empty($memoryInfoFile)) {\n return $result;\n }\n\n $totalMemory = preg_grep(\"/^MemTotal:/\", $memoryInfoFile);\n list($key, $size, $unit) = preg_split('/\\s+/', $totalMemory[0], 3);\n $result = number_format((float)$size) . ' ' . $unit;\n\n return $result;\n }", "title": "" }, { "docid": "57c61f504cff8a96cfe3f507269968ef", "score": "0.5900581", "text": "public function getTotal_games_registed(){\n return $this->total_games_registed;\n }", "title": "" }, { "docid": "cd1ae94848f67f15f936e7b3fe98c8d7", "score": "0.58573806", "text": "public function lenPrgRam() { return $this->_m_lenPrgRam; }", "title": "" }, { "docid": "8b0a2f4df7b7d4f8c81636f9bc3e84cc", "score": "0.5853622", "text": "public function testGetRam()\n {\n $this->assertEquals('foo', $this->_commonInfrastructure->getRamSize());\n $this->assertEquals('foo', $this->_commonInfrastructure->getAttribute(Instance::INSTANCE_RAM));\n }", "title": "" }, { "docid": "822097efec33fb111825fdbe1101704a", "score": "0.5845525", "text": "public function getStartMemory(){ }", "title": "" }, { "docid": "b8c21a7b4272355784c78cdd8d6e187b", "score": "0.5815386", "text": "public function ramTotalResources();", "title": "" }, { "docid": "1da84e97c49d7fb644d61bec5765d443", "score": "0.5784429", "text": "function readPlantPower(){\n\t\t$plantPower = 0;\n\t\tforeach (Session::getConfig()->devices as $device) {\n\t\t\tif ($device->type == \"production\") {\n\t\t\t\t$plantPower += $device->plantpower;\n\t\t\t}\n\t\t}\n\t\treturn $plantPower;\n\t}", "title": "" }, { "docid": "90222fcad4393c104344d00d9bf4dfcc", "score": "0.5778565", "text": "public function hasBatteryRam() { return $this->_m_hasBatteryRam; }", "title": "" }, { "docid": "f7494b78386cae33e0d332d6cc6ce166", "score": "0.57776237", "text": "public function getRammingFactor(){\r\n\t\t$structuretotal = 0;\r\n\t\t$prevturn = max(0,TacGamedata::$currentTurn-1);\r\n\t\t$activeStructures = $this->getSystemsByName(\"Structure\",true);//list of all Structure blocks (check for being destroyed will come later)\r\n\t\tforeach($activeStructures as $struct){\t\t\t\r\n\t\t\tif (!$struct->isDestroyed($prevturn)){ //if structure is not destroyed AS OF PREVIOUS TURN\r\n\t\t\t\t$structuretotal += $struct->maxhealth;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$multiplier = 1.1;\r\n\t\tif ($this->shipSizeClass == 1) $multiplier = 1.2; //MCVs seem to use a bit larger multiplier...\r\n\t\t$dmg = ceil($structuretotal * $multiplier);\r\n\t\treturn $dmg;\r\n\t}", "title": "" }, { "docid": "95f167e853b0863776a03a46c9a80ee2", "score": "0.5769449", "text": "function getGambarFull()\r\n\t{\r\n\t\treturn $this->gambar_full;\t\r\n\t}", "title": "" }, { "docid": "9746f2ac3e11689ea84914b462c0abec", "score": "0.57298714", "text": "public static function memory()\n\t{\n\t\tif ($output = explode(\"\\n\", rtrim(file_get_contents('/proc/meminfo')))) {\n\t\t\t$results['ram'] = array();\n\t\t\t$results['swap'] = array();\n\t\t\t$results['devswap'] = array();\n\t\t\twhile (list(, $buf) = each($output)) {\n\t\t\t\tif (preg_match('/^MemTotal:\\s+(.*)\\s*kB/i', $buf, $ar_buf)) {\n\t\t\t\t\t$results['ram']['total'] = $ar_buf[1];\n\t\t\t\t} elseif (preg_match('/^MemFree:\\s+(.*)\\s*kB/i', $buf, $ar_buf)) {\n\t\t\t\t\t$results['ram']['free'] = $ar_buf[1];\n\t\t\t\t} elseif (preg_match('/^Cached:\\s+(.*)\\s*kB/i', $buf, $ar_buf)) {\n\t\t\t\t\t$results['ram']['cached'] = $ar_buf[1];\n\t\t\t\t} elseif (preg_match('/^Buffers:\\s+(.*)\\s*kB/i', $buf, $ar_buf)) {\n\t\t\t\t\t$results['ram']['buffers'] = $ar_buf[1];\n\t\t\t\t} elseif (preg_match('/^SwapTotal:\\s+(.*)\\s*kB/i', $buf, $ar_buf)) {\n\t\t\t\t\t$results['swap']['total'] = $ar_buf[1];\n\t\t\t\t} elseif (preg_match('/^SwapFree:\\s+(.*)\\s*kB/i', $buf, $ar_buf)) {\n\t\t\t\t\t$results['swap']['free'] = $ar_buf[1];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$results['ram']['shared'] = 0;\n\t\t\t$results['ram']['used'] = $results['ram']['total'] - $results['ram']['free'];\n\t\t\t$results['swap']['used'] = $results['swap']['total'] - $results['swap']['free'];\n\t\t\tif (file_exists('/proc/swaps') && count(file('/proc/swaps')) > 1) {\n\t\t\t\t$swaps = explode(\"\\n\", rtrim(file_get_contents('/proc/swaps')));\n\t\t\t\twhile (list(, $swap) = each($swaps)) {\n\t\t\t\t\t$swapdevs[] = $swap;\n\t\t\t\t}\n\t\t\t\tfor ($i = 1; $i < (count($swapdevs) - 1); $i++) {\n\t\t\t\t\t$ar_buf = preg_split('/\\s+/', $swapdevs[$i], 6);\n\t\t\t\t\t$results['devswap'][$i - 1] = array();\n\t\t\t\t\t$results['devswap'][$i - 1]['dev'] = $ar_buf[0];\n\t\t\t\t\t$results['devswap'][$i - 1]['total'] = $ar_buf[2];\n\t\t\t\t\t$results['devswap'][$i - 1]['used'] = $ar_buf[3];\n\t\t\t\t\t$results['devswap'][$i - 1]['free'] = ($results['devswap'][$i - 1]['total'] - $results['devswap'][$i - 1]['used']);\n\t\t\t\t\t$results['devswap'][$i - 1]['percent'] = round(($ar_buf[3] * 100) / $ar_buf[2]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$results['devswap'] = array();\n\t\t\t}\n\t\t\t// I don't like this since buffers and cache really aren't\n\t\t\t// 'used' per say, but I get too many emails about it.\n\t\t\t$results['ram']['t_used'] = $results['ram']['used'];\n\t\t\t$results['ram']['t_free'] = $results['ram']['total'] - $results['ram']['t_used'];\n\t\t\t$results['ram']['percent'] = round(($results['ram']['t_used'] * 100) / $results['ram']['total']);\n\t\t\t$results['swap']['percent'] = $results['swap']['total'] > 0 ? round(($results['swap']['used'] * 100) / $results['swap']['total']) : 0;\n\t\t} else {\n\t\t\t$results['ram'] = array();\n\t\t\t$results['swap'] = array();\n\t\t\t$results['devswap'] = array();\n\t\t}\n\t\treturn $results;\n\t}", "title": "" }, { "docid": "af4e60421a04134a5daac479d9f6b490", "score": "0.56682616", "text": "abstract public function getApplicationFreeMemory();", "title": "" }, { "docid": "5d6cd5aa5db797cfca47bbeaa651236c", "score": "0.5631761", "text": "function getGameProgression()\n {\n // TODO: compute and return the game progression\n\n return 0;\n }", "title": "" }, { "docid": "d6818032331217bfcb919590312d0e5f", "score": "0.5628866", "text": "function getGameProgression()\n {\n // TODO: compute and return the game progression #15\n\n return 0;\n }", "title": "" }, { "docid": "96baa661e55ab41d13c78b13d4947f77", "score": "0.560347", "text": "private function getRam()\n {\n $_infos = $this->parser->getRam();\n $infos = [\n 'type' => $_infos['type'],\n 'total' => $_infos['total']\n ];\n return $infos;\n }", "title": "" }, { "docid": "fb58edaf86da70922143e13054268234", "score": "0.5598985", "text": "function getMem()\n\t{\n\t\t$memory\t=\tarray();\n\t\t\n\t\tstatic $keys\t=\tarray( \n\t\t\t\t\t\tarray(\t\n\t\t\t\t\t\t\t'total' => 'total_physical_memory', \n\t\t\t\t\t\t\t'available' => 'available_physical_memory'\n\t\t\t\t\t\t\t),\t\n\t\t\t\t\t\tarray( \n\t\t\t\t\t\t\t'total' => 'virtual_memory:_max_size', \n\t\t\t\t\t\t\t'available' => 'virtual_memory:_available'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t);\n\n\t\t\n\t\t// seperators to be removed\t\t\t\t\n\t\tstatic $seperator\t=\tarray( ',' => '', '.' => '' );\n\t\t\n\t\tfor( $i = 0; $i < count( $keys ); ++$i )\n\t\t{\n\t\t\t$memory[$i]\t=\tarray();\n\t\t\tforeach( $keys[$i] as $key => $value )\n\t\t\t{\n\t\t\t\t$info\t\t=\texplode( ' ', $this->_getSysinfo( $value ) );\n\t\t\t\t$info[0]\t=\tstrtr( $info[0], $seperator );\n\t\t\t\t\n\t\t\t\tif( strtolower( $info[1] ) == 'mb' )\n\t\t\t\t{\n\t\t\t\t\t$info[0]\t=\t$info[0] * 1024;\n\t\t\t\t\t$info[1]\t=\t'kb';\n\t\t\t\t}\n\t\t\t\tif( strtolower( $info[1] ) == 'kb' )\n\t\t\t\t{\n\t\t\t\t\t$info[0]\t=\t$info[0] * 1024;\n\t\t\t\t\t$info[1]\t=\t'';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$memory[$i][$key]\t=\t(int) $info[0];\n\t\t\t}\n\t\t\t$memory[$i]['percent']\t=\tsprintf( '%02.0f', 100 * $memory[$i]['available'] / $memory[$i]['total'] );\n\t\t\t\n\t\t\tif( $this->_useUnitCalc )\n\t\t\t{\n\t\t\t\t$memory[$i]['total']\t\t=\t$this->unitCalc( $memory[$i]['total'] );\n\t\t\t\t$memory[$i]['available']\t=\t$this->unitCalc( $memory[$i]['available'] );\n\t\t\t}\n\t\t}\n\t\treturn $memory;\n\t}", "title": "" }, { "docid": "44b697b2795066b6caa8bbb41fecc729", "score": "0.5586168", "text": "public function ramUsedResourcesPercentage();", "title": "" }, { "docid": "d63458461e7dc1738bb58e448418968e", "score": "0.5573853", "text": "protected function _getMemory()\r\n {\r\n $used = $this->_getInfo('used_memory_human', false);\r\n $peak = $this->_getInfo('used_memory_peak_human', false);\r\n if (!$used || !$peak) {\r\n return $this->__(self::DEFAULT_MISSING_STRING);\r\n }\r\n return $used . ' / ' . $peak;\r\n }", "title": "" }, { "docid": "216f7f5cbdee64547b2fcdcdd02c5b55", "score": "0.5563647", "text": "function get_meminfo(){\n $ram_info = array();\n $output = shell_exec('cat /proc/meminfo 2>&1');\n $ram_array = explode(\"\\n\", $output);\n foreach( $ram_array as $key => $val )\n {\n //get total\n if( strstr( $val , 'MemTotal') )\n {\n $tmp = explode(':', $val);\n $tmp = trim(substr($tmp[1], 1, count($tmp[1])-3)); //strip white space and remove KB\n $ram_info['total'] = (int)round($tmp/1024); //round to full MB and store as int\n }\n //get free\n if( strstr( $val , 'MemFree') )\n {\n $tmp = explode(':', $val);\n $tmp = trim(substr($tmp[1], 1, count($tmp[1])-3)); //strip white space and remove KB\n $ram_info['free'] = (int)round($tmp/1024); //round to full MB and store as int\n }\n //get cache\n if( strstr( $val , 'Cached') && !strstr( $val , 'SwapCached') )\n {\n $tmp = explode(':', $val);\n $tmp = trim(substr($tmp[1], 1, count($tmp[1])-3)); //strip white space and remove KB\n $ram_info['cached'] = (int)round($tmp/1024); //round to full MB and store as int\n }\n\n //swap total\n if( strstr( $val , 'SwapTotal') )\n {\n $tmp = explode(':', $val);\n $tmp = trim(substr($tmp[1], 1, count($tmp[1])-3)); //strip white space and remove KB\n $ram_info['swap_total'] = (int)round($tmp/1024); //round to full MB and store as int\n }\n //swap free\n if( strstr( $val , 'SwapFree') )\n {\n $tmp = explode(':', $val);\n $tmp = trim(substr($tmp[1], 1, count($tmp[1])-3)); //strip white space and remove KB\n $ram_info['swap_free'] = (int)round($tmp/1024); //round to full MB and store as int\n }\n //get cache\n if( strstr( $val , 'SwapCached') )\n {\n $tmp = explode(':', $val);\n $tmp = trim(substr($tmp[1], 1, count($tmp[1])-3)); //strip white space and remove KB\n $ram_info['swap_cached'] = (int)round($tmp/1024); //round to full MB and store as int\n }\n }\n return $ram_info;\n}", "title": "" }, { "docid": "890ef24af9ff88996f237bed2d08d490", "score": "0.5559654", "text": "public function getApplicationFreeMemory()\n {\n return $this->memInfo['memfree']\n + $this->memInfo['buffers']\n + $this->memInfo['cached'];\n }", "title": "" }, { "docid": "cabd8d2df4209630b04aba7106ae069a", "score": "0.55465937", "text": "public function getAvailableSpace()\n {\n $path = $this->getOptions()->getCacheDir();\n\n return (float) $this->filesystem->availableBytes($path);\n }", "title": "" }, { "docid": "2ea34e6c2d362f9e7223e7023029ac6a", "score": "0.55451024", "text": "private static function _getUsableMemory()\n\t{\n\t\t$sVal = trim(@ini_get('memory_limit'));\n\t\n\t\tif (preg_match('/(\\\\d+)([mkg]?)/i', $sVal, $aRegs))\n\t\t{\n\t\t\t$sMemoryLimit = (int) $aRegs[1];\n\t\t\tswitch ($aRegs[2])\n\t\t\t{\t\n\t\t\t\tcase 'k':\n\t\t\t\tcase 'K':\n\t\t\t\t\t$sMemoryLimit *= 1024;\n\t\t\t\t\tbreak;\t\n\t\t\t\tcase 'm':\n\t\t\t\tcase 'M':\n\t\t\t\t\t$sMemoryLimit *= 1048576;\n\t\t\t\t\tbreak;\t\n\t\t\t\tcase 'g':\n\t\t\t\tcase 'G':\n\t\t\t\t\t$sMemoryLimit *= 1073741824;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t$sMemoryLimit /= 2;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$sMemoryLimit = 1048576;\n\t\t}\n\t\n\t\treturn $sMemoryLimit;\n\t}", "title": "" }, { "docid": "f7b24dc803e52c15ad0e2b37e17eacb2", "score": "0.5473412", "text": "public function getMemory()\n {\n return $this->memory;\n }", "title": "" }, { "docid": "b5242f2babe1d58fe68a44dca0b0ffbd", "score": "0.5468869", "text": "protected function _getExtraGbsUsed()\n\t{\n\t\treturn ceil($this->_getExtraMbsUsed()/1024);\n\t}", "title": "" }, { "docid": "042ffaf699a37c3ab245163d96912442", "score": "0.54580486", "text": "function getGameProgression()\n {\n $prog = $this->getGameStateValue('progression');\n return $prog;\n }", "title": "" }, { "docid": "dd5e3be1f687797753001082bec8936d", "score": "0.5429089", "text": "function mmrpg_game_battle_points(){\n // Return the current point total for thisgame\n $session_token = mmrpg_game_token();\n if (!empty($_SESSION[$session_token]['counters']['battle_points'])){ return $_SESSION[$session_token]['counters']['battle_points']; }\n else { return 0; }\n}", "title": "" }, { "docid": "6a15c2bc25766a6833bc4b28174f1bf4", "score": "0.54005975", "text": "public function getIphoneMemory()\n\t{\n\t}", "title": "" }, { "docid": "3534d3ca92d3c7096cd7d758133a7f1d", "score": "0.5363608", "text": "public function getJreFreeMemory(): int\n {\n return $this->jreFreeMemory;\n }", "title": "" }, { "docid": "60f5dd99774d232461def28b40b4f702", "score": "0.53588396", "text": "public function getGameProgression(): int {\n // TODO: compute and return the game progression\n\n return 0;\n }", "title": "" }, { "docid": "570c3520b0e49ee1eb3e960964d4063e", "score": "0.53309566", "text": "public function getEndMemory(){ }", "title": "" }, { "docid": "93266bb5252fcb60f6f7f73c0488440f", "score": "0.5313205", "text": "public function getInGame() : int;", "title": "" }, { "docid": "413ebd7bafaa87698adbd2ab40c250bd", "score": "0.531284", "text": "function getMem()\n\t{\n\t\t$result\t=\tarray();\n\t\tif ( !$fh = @fopen( '/proc/meminfo', 'r' ) )\n\t\t\treturn $result;\n\n\t\t$keys\t=\tarray( 'total', 'used', 'free', 'shared', 'buffers', 'cache' );\n\t\n\t\twhile( $buffer = fgets( $fh, 4096 )) \n\t\t{\n\t\t\t// look for real and virtaul memory\n\t\t\tif ( !preg_match( '/^(Mem|Swap):\\s+/', $buffer, $match ) )\n\t\t\t\tcontinue;\n\t\n\t\t\t$split = preg_split( '/\\s+/', $buffer );\n\t\t\t\n\t\t\t$mem\t=\tarray();\n\t\t\t$i\t\t=\t1;\n\t\t\tforeach( $keys as $key )\n\t\t\t{\n\t\t\t\t$mem[$key]\t=\t0;\n\t\t\t\tif( isset( $split[$i] ) )\n\t\t\t\t\t$mem[$key]\t=\t(int) $split[$i];\n\t\t\t\t\n\t\t\t\t++$i;\n\t\t\t}\n\t\t\t\n\t\t\t$mem['available']\t=\t$mem['free'] + $mem['cache'] + $mem['buffers'];\n\t\t\t$mem['percent']\t\t=\tsprintf( '%02.0f', 100 * $mem['available'] / $mem['total'] );\n\t\t\t\n\t\t\t// throw away some information :-(\n\t\t\tunset( $mem['cache'] );\n\t\t\tunset( $mem['free'] );\n\t\t\tunset( $mem['used'] );\n\t\t\tunset( $mem['buffers'] );\n\t\t\tunset( $mem['shared'] );\n\t\t\t\n\t\t\tif( $this->_useUnitCalc )\n\t\t\t{\n\t\t\t\t$mem['total']\t\t=\t$this->unitCalc( $mem['total'] );\n\t\t\t\t$mem['available']\t=\t$this->unitCalc( $mem['available'] );\n\t\t\t}\n\t\t\tarray_push( $result, $mem );\n\t\t}\n\t\t\n\t\tfclose( $fh );\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "b2ebb804e03430f3650b13b32673186f", "score": "0.53048426", "text": "public function getNvram() {\n\t\tif (isset($this -> nvram)) {\n\t\t\treturn $this -> nvram;\n\t\t} else {\n\t\t\t// By default return 1024\n\t\t\treturn 1024;\n\t\t}\n\t}", "title": "" }, { "docid": "91fedfcb7c4d4eaaff934cfce2f3bc23", "score": "0.52890134", "text": "protected function _getExtraMbsUsed()\n\t{\n\t\t$extra_mbs = 0;\n\t\tif(isset($this->installation) && isset($this->installation->currentusage))\n\t\t{\n\t\t\t$mbs_used = $this->installation->currentusage->getTotalUsage()/1024/1024;\n\t\t\t$extra_mbs = $mbs_used - (\\GO::config()->get_setting('sm_mbs_included') * $this->installation->currentusage->count_users);\n\t\t}\n\t\treturn $extra_mbs;\n\t}", "title": "" }, { "docid": "9053d8877c247518908ab3c94624f0d7", "score": "0.52885985", "text": "public function getGameData()\n {\n return $this->gameData;\n }", "title": "" }, { "docid": "23b53eb361785e2d76f527b55ce861a6", "score": "0.52839047", "text": "public function getPeakMemory()\n {\n return $this->hasData('peak_memory') ? $this->getData('peak_memory') : Mage::helper('mp_debug')->getMemoryUsage();\n }", "title": "" }, { "docid": "a8aa6db82fd424c7f1e9c72250a1961a", "score": "0.52830863", "text": "public function getStartMemory()\n {\n return $this->startMemory;\n }", "title": "" }, { "docid": "2d5c3ea1db4641fe121924202f4f1798", "score": "0.5278779", "text": "public function getCurrentMemory()\n {\n return memory_get_usage(true);\n }", "title": "" }, { "docid": "a5508edad15e6e4b6e0eb13fea5df9db", "score": "0.52787066", "text": "function getAvailable() {\n\t\treturn $this->getData('available');\n\t}", "title": "" }, { "docid": "37b66e2418bd38e4da64e917f3746dc6", "score": "0.5278581", "text": "public function getSpaceUsage()\n {\n return $this->spaceUsage->getSpaceUsed();\n }", "title": "" }, { "docid": "37b66e2418bd38e4da64e917f3746dc6", "score": "0.5278581", "text": "public function getSpaceUsage()\n {\n return $this->spaceUsage->getSpaceUsed();\n }", "title": "" }, { "docid": "ab86e9e8edf0110b542d4ab2226a7da6", "score": "0.5268274", "text": "public function getFuelProduction()\n\t{\n\t\treturn $this->getStorageCapacityOrProduction(\"fuel_station\", \"fuel_production\", false);\n\t}", "title": "" }, { "docid": "327b8105aa7fab8cf1f35db21c4db54f", "score": "0.5265595", "text": "function get_cpufree(){\n\t$cmd = \"top -n 1 -b -d 0.1 | grep 'Cpu'\";//'free -m'- \n\t$lastline = exec($cmd,$output);\n\n\tpreg_match('/(\\S+)%id/',$lastline, $matches);\n\t$cpufree = $matches[1];\n\treturn $cpufree;\n}", "title": "" }, { "docid": "477d593efdd78138ea009166249ac993", "score": "0.5265126", "text": "public function getHardLimit();", "title": "" }, { "docid": "32374671ee20a1ceba4fe55afe85b443", "score": "0.5244448", "text": "private function memory_usage()\n {\n return memory_get_usage();\n }", "title": "" }, { "docid": "e1e8d9b743bd24e0c31f240d405dedbf", "score": "0.52420276", "text": "public function ramResources();", "title": "" }, { "docid": "2e47285554f342bd076de34b1434b4fc", "score": "0.52416056", "text": "function mmrpg_game_zenny_unlocked(){\n // Define the game session helper var\n $session_token = mmrpg_game_token();\n // Collect the zenny count and return it\n if (!empty($_SESSION[$session_token]['values']['battle_zenny'])){ return $_SESSION[$session_token]['values']['battle_zenny']; }\n else { return 0; }\n}", "title": "" }, { "docid": "68460fc67079d20aa768530e49ab68ab", "score": "0.5239152", "text": "public function getMemoryGb()\n {\n return $this->memory_gb;\n }", "title": "" }, { "docid": "f69b6f05ac3b9707502ac24cbfabfeb2", "score": "0.52291805", "text": "public function getAvailableSpace()\n {\n $memc = $this->getSSDBMasterResource();\n $stats = $memc->getStats();\n if ($stats === false) {\n throw new Exception\\RuntimeException($memc->getResultMessage());\n }\n\n $mem = array_pop($stats);\n return $mem['limit_maxbytes'] - $mem['bytes'];\n }", "title": "" }, { "docid": "8c63c8e046b7096f3cd23551b9b7190d", "score": "0.5198055", "text": "public function getMemTotal(): ?int;", "title": "" }, { "docid": "51f0db8cb66a518ec1a04c10a5ef65b6", "score": "0.5192387", "text": "public function getMemAvailable(): ?int;", "title": "" }, { "docid": "51d3c6ff441a632049d02663dbc72030", "score": "0.5181608", "text": "protected function getMemoryUsage()\n {\n return $this->memoryUsage;\n }", "title": "" }, { "docid": "f33b6ab2e549463676550c4b1c6832d7", "score": "0.5169555", "text": "public function getStopMemory()\n {\n return $this->stopMemory;\n }", "title": "" }, { "docid": "eb436a91a633116c4bbf935e931fd950", "score": "0.5159029", "text": "function getMemData($os) {\n if ($os == \"Darwin\") { // Tested and works\n $resources = getrusage(2);\n $max_mem = ($resources[\"ru_maxrss\"] * 1024);\n $mem_free = shell_exec('vm_stat | grep \"free.*\" | grep -o \"[0-9]*\\.$\"');\n $mem_free = (float)substr($mem_free, 0, strlen($mem_free) - 1);\n $mem_free = $mem_free * 4096;\n $mem_inactive = shell_exec('vm_stat | grep \"inactive.*\" | grep -o \"[0-9]*\\.$\"');\n $mem_inactive = (float)substr($mem_inactive, 0, strlen($mem_inactive) - 1);\n $mem_inactive = $mem_inactive * 4096;\n return array($max_mem - ($mem_free + $mem_inactive), $mem_free + $mem_inactive, $max_mem);\n } else if ($os == \"Linux\") { // Tested and works\n $data = explode(\"_\",preg_replace('/[ ]+/','_',shell_exec(\"free | grep Mem\")));\n return array($data[2], $data[3], $data[1]);\n } else if ($os == \"WINNT\" || $os == \"WIN32\" || $os == \"Windows\") { // Tested and works\n $rows = explode(\"\\n\", shell_exec(\"wmic os get FreePhysicalMemory, TotalVisibleMemorySize\"));\n $data = explode(\"_\",preg_replace('/[ ]+/', \"_\",$rows[1]));\n return array((((int)$data[1] - (int)$data[0]) * 1024), (int)$data[0] * 1024, (int)$data[1] * 1024);\n }\n}", "title": "" }, { "docid": "e6d7475b0ff4d36f578d96b20cacfd0f", "score": "0.5152341", "text": "public function getIronProduction()\n\t{\n\t\treturn $this->getStorageCapacityOrProduction(\"iron_station\", \"iron_production\", false);\n\t}", "title": "" }, { "docid": "0ef37e6cf9d8023bd475a10c4547d426", "score": "0.5152095", "text": "public function getMemoryUsage(){}", "title": "" }, { "docid": "a343a8b5830296ef6d651e834a7e43a4", "score": "0.51469356", "text": "private function _getFree()\n {\n return $this->_buffer - $this->count(); \n }", "title": "" }, { "docid": "2336f28b5704af0d26276ce42743a557", "score": "0.51443106", "text": "public function getCurrentMemoryDifferenc()\n {\n return $this->getCurrentMemory() - $this->getStartMemory();\n }", "title": "" }, { "docid": "7ecdcb8133520cc58614a359224d22be", "score": "0.51408845", "text": "function mmrpg_game_cores_unlocked(){\n // Define the game session helper var\n $session_token = mmrpg_game_token();\n $temp_counter = 0;\n if (!empty($_SESSION[$session_token]['values']['battle_items'])){\n foreach ($_SESSION[$session_token]['values']['battle_items'] AS $token => $quantity){\n if (preg_match('/-core$/i', $token)){ $temp_counter += $quantity; }\n }\n }\n return $temp_counter;\n}", "title": "" }, { "docid": "1797eaae7d5187f016d78098fad41fba", "score": "0.5140175", "text": "public function getChoosedGame()\r\n {\r\n return $this->getState('choosedGame');\r\n }", "title": "" }, { "docid": "eb121ff6b43155d25b3e648decddbc56", "score": "0.51373285", "text": "public function isRmaAvailable();", "title": "" }, { "docid": "c25f494677ddf21c8a13dfdfc866a2d2", "score": "0.512345", "text": "function get_used_status()\n{\n $fp = popen('top -b -n 2 | grep -E \"^(Cpu|Mem|Tasks)\"', \"r\");//获取某一时刻系统cpu和内存使用情况\n $rs = \"\";\n while (!feof($fp)) {\n $rs .= fread($fp, 1024);\n }\n pclose($fp);\n $sys_info = explode(\"\\n\", $rs);\n $tast_info = explode(\",\", $sys_info[3]);//进程 数组\n $cpu_info = explode(\",\", $sys_info[4]); //CPU占有量 数组\n $mem_info = explode(\",\", $sys_info[5]); //内存占有量 数组\n //正在运行的进程数\n $tast_running = trim(trim($tast_info[1], 'running'));\n //CPU占有量\n $cpu_usage = trim(trim($cpu_info[0], 'Cpu(s): '), '%us'); //百分比\n //内存占有量\n $mem_total = trim(trim($mem_info[0], 'Mem: '), 'k total');\n $mem_used = trim($mem_info[1], 'k used');\n $mem_usage = round(100 * intval($mem_used) / intval($mem_total), 2); //百分比\n print_r($sys_info);\n die;\n\n\n /*硬盘使用率 begin*/\n $fp = popen('df -lh | grep -E \"^(/)\"', \"r\");\n $rs = fread($fp, 1024);\n pclose($fp);\n $rs = preg_replace(\"/\\s{2,}/\", ' ', $rs); //把多个空格换成 “_”\n $hd = explode(\" \", $rs);\n $hd_avail = trim($hd[3], 'G'); //磁盘可用空间大小 单位G\n $hd_usage = trim($hd[4], '%'); //挂载点 百分比\n //print_r($hd);\n /*硬盘使用率 end*/\n //检测时间\n $fp = popen(\"date +\\\"%Y-%m-%d %H:%M\\\"\", \"r\");\n $rs = fread($fp, 1024);\n pclose($fp);\n $detection_time = trim($rs);\n /*获取IP地址 begin*/\n\n $fp = popen('ifconfig eth0 | grep -E \"(inet addr)\"', 'r');\n $rs = fread($fp, 1024);\n pclose($fp);\n $rs = preg_replace(\"/\\s{2,}/\", ' ', trim($rs)); //把多个空格换成 “_”\n $rs = explode(\" \", $rs);\n $ip = trim($rs[1], 'addr:');\n\n /*获取IP地址 end*/\n /*\n $file_name = \"/tmp/data.txt\"; // 绝对路径: homedata.dat\n $file_pointer = fopen($file_name, \"a+\"); // \"w\"是一种模式,详见后面\n fwrite($file_pointer,$ip); // 先把文件剪切为0字节大小, 然后写入\n fclose($file_pointer); // 结束\n */\n return array(\n 'cpu_usage' => $cpu_usage,\n 'mem_usage' => $mem_usage,\n 'hd_avail' => $hd_avail,\n 'hd_usage' => $hd_usage,\n 'tast_running' => $tast_running,\n 'detection_time' => $detection_time\n );\n}", "title": "" }, { "docid": "b49ddd599b7764464cb51773d3b3a185", "score": "0.50980127", "text": "function mmrpg_game_robot_experience($player_token, $robot_token){\n // Return the current point total for this robot\n $session_token = mmrpg_game_token();\n if (!empty($_SESSION[$session_token]['values']['battle_rewards'][$player_token]['player_robots'][$robot_token]['robot_experience'])){ return $_SESSION[$session_token]['values']['battle_rewards'][$player_token]['player_robots'][$robot_token]['robot_experience']; }\n elseif (!empty($_SESSION[$session_token]['values']['battle_rewards'][$player_token]['player_robots'][$robot_token]['robot_points'])){ return $_SESSION[$session_token]['values']['battle_rewards'][$player_token]['player_robots'][$robot_token]['robot_points']; }\n else { return 0; }\n}", "title": "" }, { "docid": "3904c993d1befff6825c84fe287b5ec6", "score": "0.5048819", "text": "function fuel() {\n\n $fuelMin = 0;\n return $fuelMin;\n\n}", "title": "" }, { "docid": "be12d2ba382109a9440a9766c50140c6", "score": "0.5034071", "text": "public function getWaterProduction()\n\t{\n\t\treturn $this->getStorageCapacityOrProduction(\"water_station\", \"water_production\", false);\n\t}", "title": "" }, { "docid": "50df9d53759f9e08a04aa3a042f9ea03", "score": "0.5024197", "text": "public function getquantumdepth(){}", "title": "" }, { "docid": "b4758ccba8582f5d158fc401e4d02d52", "score": "0.5020075", "text": "protected function getMemory(): ?Obj\n\t{\n\t\t$memory = null;\n\t\t$meminfo = $this->readFile('/proc/meminfo');\n\t\tif ($meminfo) {\n\t\t\t$bufer = preg_split(\"/\\n/\", $meminfo, -1, PREG_SPLIT_NO_EMPTY);\n\t\t\t$memory = new Obj;\n\n\t\t\tforeach ($bufer as $buf) {\n\t\t\t\tif (preg_match('/^MemTotal:\\s+(.*)\\s*kB/i', $buf, $ar_buf)) {\n\t\t\t\t\t$memory->total = ((float)$ar_buf[1]) * 1024;\n\t\t\t\t} elseif (preg_match('/^MemFree:\\s+(.*)\\s*kB/i', $buf, $ar_buf)) {\n\t\t\t\t\t$memory->free = ((float)$ar_buf[1]) * 1024;\n\t\t\t\t} elseif (preg_match('/^Cached:\\s+(.*)\\s*kB/i', $buf, $ar_buf)) {\n\t\t\t\t\t$memory->cache = ((float)$ar_buf[1]) * 1024;\n\t\t\t\t} elseif (preg_match('/^Buffers:\\s+(.*)\\s*kB/i', $buf, $ar_buf)) {\n\t\t\t\t\t$memory->buffer = ((float)$ar_buf[1]) * 1024;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$memory->used = $memory->total - $memory->free;\n\n\t\t\tif ($memory->cache !== null && $memory->buffer !== null) {\n\t\t\t\t$memory->application = $memory->used - $memory->cache - $memory->buffer;\n\t\t\t}\n\n\t\t\t$memory->swap = [];\n\t\t\t$swaps = preg_split(\"/\\n/\", $this->readFile('/proc/swaps'), -1, PREG_SPLIT_NO_EMPTY);\n\t\t\tunset($swaps[0]);\n\t\t\tforeach ($swaps as $swap) {\n\t\t\t\t$ar_buf = preg_split('/\\s+/', $swap, PREG_BAD_UTF8_OFFSET_ERROR);\n\t\t\t\t$swap = new Obj;\n\t\t\t\t$swap->mount = $ar_buf[0];\n\t\t\t\t$swap->name = 'SWAP';\n\t\t\t\t$swap->total = $ar_buf[2] * 1024;\n\t\t\t\t$swap->used = $ar_buf[3] * 1024;\n\t\t\t\t$swap->free = $swap->total - $swap->used;\n\t\t\t\t$memory->swap[] = $swap;\n\t\t\t}\n\t\t}\n\t\treturn $memory;\n\t}", "title": "" }, { "docid": "3753757703e07f266f488b1768f45386", "score": "0.5017868", "text": "private function _getCpuMemoryInfo()\n {\n $loadAvgCommand = 'top -b -d 1 -n 2 | grep -E \"(Cpu|Mem|Tasks)\"';\n\n //获取某一时刻系统cpu和内存使用情况\n $this -> _resource = popen($loadAvgCommand,\"r\");\n\n if( !is_resource($this->_resource) )\n return ;\n\n $sysLoad = \"\";\n while(!feof($this->_resource)){\n $sysLoad .= fread($this->_resource,1024);\n }\n pclose($this -> _resource);\n\n $sysArray = explode(\"\\n\",$sysLoad);\n\n if( count($sysArray)==1 )\n return ;\n\n $tastArray = explode(\",\",$sysArray[4]);\n $cpuArray = explode(\",\",$sysArray[5]);\n $memArray = explode(\",\",$sysArray[6]);\n\n //进程\n if( count($tastArray)>1 )\n {\n $this->_return['proc']['total'] = intval( $this->_parseToNumber($tastArray[0]) );\n $this->_return['proc']['running'] = intval( $this->_parseToNumber($tastArray[1]) );\n $this->_return['proc']['sleeping'] = intval( $this->_parseToNumber($tastArray[2]) );\n $this->_return['proc']['zombie'] = intval( $this->_parseToNumber($tastArray[4]) );\n }\n\n //CPU\n if( count($cpuArray)>1 )\n {\n $this->_return['cpu']['usrUsage'] = floatval($this -> _parseToNumber($cpuArray[0]));\n $this->_return['cpu']['sysUsage'] = floatval($this -> _parseToNumber($cpuArray[1]));\n }\n\n //内存\n if( count($memArray)>1 )\n {\n $this->_return['mem']['total'] = intval($this -> _parseToNumber($memArray[0]));\n $this->_return['mem']['used'] = intval($this -> _parseToNumber($memArray[1]));\n }\n }", "title": "" }, { "docid": "1132ad154c8e201eedd54872bce435a9", "score": "0.5014213", "text": "function getGameProgression()\n {\n //game progression is whichever is higher: percentage of tiles used, or highest player temp to max\n $deck = $this->tiles->countCardsInLocation(\"deck\");\n $total = $deck + $this->tiles->countCardsInLocation(\"board\");\n\n $tileCompletion= 100*(1 - ($deck/($total+1))); //+1 as tiles gone doesn't end game immediately\n\n //throw new feException();\n $sql = \"select max(player_temp) as maxtemp from player\";\n $result = self::getObjectFromDB($sql);\n $tempCompletion = (100*$result['maxtemp'])/($this->maxBurnTemp+10); //extra 10 as maxtemp doesnt end immediately\n\n return max($tileCompletion, $tempCompletion);\n }", "title": "" }, { "docid": "3cd29443fcd957b273a419c0c1b58495", "score": "0.5009121", "text": "public function hasMagCapacity(){\n return $this->_has(6);\n }", "title": "" }, { "docid": "ca07816029590e5d2e14bb339c9e79f3", "score": "0.5004132", "text": "public function getGamePrice()\n {\n return $this->gamePrice;\n }", "title": "" }, { "docid": "9b4be1a33d66fa3eeef1622f579f22f3", "score": "0.5000771", "text": "public function GB_RAM()\n {\n return $this->hasMany(GB_RAM::class, 'id_product', 'id');\n }", "title": "" }, { "docid": "511a651437b1fbdd4873a2629618f697", "score": "0.5000537", "text": "protected function getCardVal() {\n\t\tshuffle($this->values);\n\t\treturn $this->values[0];\n\t}", "title": "" }, { "docid": "810626f24b3f2551cdc46438810c01cb", "score": "0.499697", "text": "public function getAvailable()\n {\n return $this->available;\n }", "title": "" }, { "docid": "70a0079a280b790fdcad08d46a552ee9", "score": "0.49924734", "text": "public function getUsage() {\n if (empty($this->deviceData)) {\n return $this->getDeviceData($this->usageIdx)->Data;\n }\n return false;\n }", "title": "" }, { "docid": "1c126c37ef8597d879e21ca9f1a5596b", "score": "0.49798813", "text": "private function runtimeVals()\n {\n $vals = $this->debug->getData('runtime');\n if (!$vals) {\n $vals = array(\n 'memoryPeakUsage' => \\memory_get_peak_usage(true),\n 'memoryLimit' => $this->debug->utilities->memoryLimit(),\n 'runtime' => $this->debug->timeEnd('debugInit', true),\n );\n $this->debug->setData('runtime', $vals);\n }\n return $vals;\n }", "title": "" }, { "docid": "c6f90de7ba40f2070b6acb6d75171c0a", "score": "0.49786738", "text": "public function getEnginePower()\n {\n return $this->enginePower;\n }", "title": "" }, { "docid": "007143c564a55e1b50a87ba4a6fdbece", "score": "0.4976928", "text": "public function getCapacity() {\n return $this->data->occupation->max;\n }", "title": "" }, { "docid": "7a06becb61350c8c51d94c4d1ebe20be", "score": "0.49744955", "text": "public function getAvailableStock()\n {\n return EksiciRepository::HISSE_MAX - $this->eksiciModel->user()->sum(\"hisse\");\n\n }", "title": "" }, { "docid": "36675d56dee61bb50bb7476afe7dda9f", "score": "0.49740952", "text": "protected function getSystemArmour($system, $gamedata, $fireOrder, $pos=null){\n return 0;\n\t}", "title": "" }, { "docid": "e2d13e4f991dc7e5872f083bb564275f", "score": "0.4962099", "text": "public function getScreenAvailable()\n {\n return $this->screen_available;\n }", "title": "" }, { "docid": "6cd03fddfaade6156d85119c11010af2", "score": "0.49551037", "text": "function mmrpg_game_database_unlocked(){\n // Define the game session helper var\n $session_token = mmrpg_game_token();\n // Collect the database count and return it\n if (!empty($_SESSION[$session_token]['values']['robot_database'])){ return count($_SESSION[$session_token]['values']['robot_database']); }\n else { return 0; }\n}", "title": "" }, { "docid": "9676f9435f0b7bc033fd4a648ad47182", "score": "0.4940743", "text": "function getConsumption();", "title": "" }, { "docid": "a9d511301764f91caa30150a7d1b97fe", "score": "0.49401596", "text": "public function get()\n\t{\n\t\t$log = trim(file_get_contents($this->logPath));\n\n\t\t// error output of command\n\t\t$errorEndPos = strpos($log, 'Process ID:');\n\t\tif ($errorEndPos)\n\t\t{\n\t\t\t$error = substr($log, 0, $errorEndPos);\n\t\t\t$log = substr($log, $errorEndPos);\n\t\t\tfile_put_contents($this->errorOutputPath, $error);\n\t\t}\n\n\t\t$log = preg_match('/Peak Working Set Size \\(kbytes\\): ([0-9]*)/', $log, $matches);\n\t\t$maxMemory = $matches[1];\n\n\t\tunlink($this->logPath);\n\n\t\t// units corrections (Kilobytes -> Bytes)\n\t\t$maxMemory = $maxMemory * 1000;\n\n\t\treturn $maxMemory;\n\t}", "title": "" }, { "docid": "e0b5712c92cc1aa5668a27bab12c57c8", "score": "0.49351877", "text": "public static function getAvailable(){}", "title": "" }, { "docid": "0b239bd66b8ae9bbf2f50c37e3c10c64", "score": "0.4933981", "text": "public function Needed_array() {\n\treturn $this->LCItemTable()->Needed_forStock_array();\n }", "title": "" }, { "docid": "1fbb4944c823c0d5c658538ea47ac288", "score": "0.4921693", "text": "public function getJreTotalMemory(): int\n {\n return $this->jreTotalMemory;\n }", "title": "" }, { "docid": "540daa35cd91f7defda7926acd46b0f2", "score": "0.49183738", "text": "public function getTotalUsageMemory(){ }", "title": "" }, { "docid": "5e0797b1f21e41cbf2035812eae6bed8", "score": "0.49170753", "text": "private function _usedStorage () {\n\t\t$percentage = ( $this->_storageSize() / Consts::MAX_FOLDER_SIZE ) * 100;\n\t\t$this->_setResult( 'usage', $percentage );\n\t\t$this->_setSuccess();\n\t}", "title": "" }, { "docid": "0b31d336153d5c430e1305834893a73f", "score": "0.49133888", "text": "public function getAvailable();", "title": "" }, { "docid": "0b31d336153d5c430e1305834893a73f", "score": "0.49133888", "text": "public function getAvailable();", "title": "" }, { "docid": "951db8e3c8b5d068e1184af899d51767", "score": "0.49119928", "text": "public function getPeakMemoryUsage(){}", "title": "" }, { "docid": "82fe8a889e70d68d062998abeda31ad6", "score": "0.4911901", "text": "public function getAvailableCapacity()\n {\n return $this->available_capacity;\n }", "title": "" }, { "docid": "7efd14957cc4de7019af5ca0fa89c577", "score": "0.49021778", "text": "public function getPower() {\n if (empty($this->deviceData)) {\n return $this->getDeviceData($this->powerIdx)->Data;\n }\n return false;\n }", "title": "" } ]
9361b3d8694c9570bfb26a4c029a366d
TODO: move to base class
[ { "docid": "298834c0e3f38c7ce56a26744b03363b", "score": "0.0", "text": "protected static function get_non_ui_options() {\n\t\treturn array_filter(self::get_options(), function($option) {\n\t\t\treturn $option['type'] !== 'tab' &&\n\t\t\t $option['type'] !== 'title' &&\n\t\t\t $option['type'] !== 'description' &&\n\t\t\t $option['type'] !== 'code';\n\t\t});\n\t}", "title": "" } ]
[ { "docid": "0f773b937522af81605098f9615cbb8d", "score": "0.68687266", "text": "protected function __init () {}", "title": "" }, { "docid": "a9e876c85e38882c5a3514c2eca20d6c", "score": "0.6667107", "text": "final private function __construct() {}", "title": "" }, { "docid": "a9e876c85e38882c5a3514c2eca20d6c", "score": "0.6667107", "text": "final private function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.6629189", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.6629189", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.6629189", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.6629189", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.6629189", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.6629189", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.6629189", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.6629189", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.6629189", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.6629189", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.6629189", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.6629189", "text": "protected function __construct() {}", "title": "" }, { "docid": "7cb42ce49071e9d9be1ced642821b0fe", "score": "0.6629189", "text": "protected function __construct() {}", "title": "" }, { "docid": "0e59379112512b1f4fc1b3ae6ccaa830", "score": "0.65935713", "text": "private function __construct () {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.65862256", "text": "private function __construct() {}", "title": "" }, { "docid": "bf8b6b2eac30c1afd7ebe8a254f2bc09", "score": "0.65753937", "text": "private function __construct() {\n\t\t\n\t}", "title": "" }, { "docid": "abafabb2e6139e8d44ba1c18cfac7358", "score": "0.65637934", "text": "final private function __construct() { }", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.65446925", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.65446925", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.65446925", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.65446925", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.65446925", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.65446925", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.65446925", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.65446925", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.65446925", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.65446925", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.65446925", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.65446925", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.65446925", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.65446925", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.65446925", "text": "private function __construct(){}", "title": "" }, { "docid": "bf576553ec72294462117443a185f534", "score": "0.6538953", "text": "protected function __construct(){}", "title": "" } ]
26efbfa73a638d059e9a840f9327ae5f
Runs once before all tests are started
[ { "docid": "68e372275dd80e514b67778a0dbb4edb", "score": "0.0", "text": "public function setUp()\r\n {\r\n $options = array(\r\n 'username' => 'pj-ql-01',\r\n 'password' => 'pj-ql-01p',\r\n 'appkey' => '2489d40d-a74f-474f-9e8e-7b39507f3101',\r\n 'endpoint' => 'test'\r\n );\r\n\r\n parent::setUp();\r\n $this->client = (new PayJunction\\Client($options))->transaction();\r\n }", "title": "" } ]
[ { "docid": "961f4d6efd3b73665c542253f0a48c0a", "score": "0.7907694", "text": "public function doSetUp()\n {\n static::$setUpRunIterator++;\n }", "title": "" }, { "docid": "1322d18946e9cbf4f904366dbb82667c", "score": "0.778631", "text": "public function executeBeforeFirstTest(): void\n {\n if ($namespace = $GLOBALS[self::NAMESPACE] ?? false) {\n Expectation::addNamespace($namespace);\n }\n\n if ($file = $GLOBALS[self::MACRO_FILE] ?? false) {\n $this->macroFiles[] = $file;\n }\n\n $this->loadMacros();\n }", "title": "" }, { "docid": "c08e921c1484dac8df2e95eccef06299", "score": "0.77343637", "text": "public function setUp():void\n {\n parent::setUp();\n\n $this->start();\n }", "title": "" }, { "docid": "7c5e3659bdb2a89b14f519f12a5f1c52", "score": "0.76975715", "text": "public function initialSetUp() {}", "title": "" }, { "docid": "4bf35f881d68262aec2b90052831bfd0", "score": "0.7686685", "text": "public function startTesting()\n {\n // Blacklist non-needed modules for testing\n $this->modules_blacklist = [\n 'Session',\n ];\n\n // Init the whole system\n $this->initSystem();\n\n // Post init hooks\n $this->callPostInitHooks();\n }", "title": "" }, { "docid": "24dfc287f1003bd002a817fb3be82c7d", "score": "0.74261", "text": "protected function setUp(): void\n\t{\n\t\tTimer::reset();\n\t}", "title": "" }, { "docid": "8814949b3d5d557314989b9cdb2e61d6", "score": "0.74083984", "text": "protected function setUp(): void\n {\n if (!self::TEST_ENABLE) {\n $this->markTestSkipped('Test disabled.');\n }\n $this->init();\n }", "title": "" }, { "docid": "a8713caca21cf5e6d1a794f3d3556ab3", "score": "0.73977304", "text": "public function setUp() {\n // TODO: Fill code that gets executed before every test method\n // or remove this method\n }", "title": "" }, { "docid": "862501534824905402b37ba5403fdfd5", "score": "0.73716944", "text": "public function doSetUp()\n {\n }", "title": "" }, { "docid": "733a3d5f1b2037bad0451fb2f61b9718", "score": "0.72650146", "text": "public function setUp()\n\t{\n\t\tparent::setUp();\n\t\t$this->prepareForTests();\n\t}", "title": "" }, { "docid": "d4cce23fdcc5d00113b1aece110535f2", "score": "0.72252697", "text": "public function preRun(){\n $this->hasRun = true;\n }", "title": "" }, { "docid": "3e4213899c9dea9f81fb902b54380120", "score": "0.71945715", "text": "public function setUp(): void\n {\n $this->markTestSkipped();\n parent::setUp();\n }", "title": "" }, { "docid": "6adb7a865f5316688bcd028e81615900", "score": "0.71776575", "text": "protected function setUp()\n {\n if (empty(Tinebase_Core::getConfig()->filesdir)) {\n $this->markTestSkipped('filesystem base path not found');\n }\n \n Tinebase_TransactionManager::getInstance()->startTransaction(Tinebase_Core::getDb());\n \n $this->_basePath = 'tine20:///' . Tinebase_Application::getInstance()->getApplicationByName('Tinebase')->getId() . '/internal/phpunit';\n \n Tinebase_FileSystem::getInstance()->initializeApplication(Tinebase_Application::getInstance()->getApplicationByName('Tinebase'));\n \n clearstatcache();\n }", "title": "" }, { "docid": "5145be25d1a783916b481318f65e4f0b", "score": "0.71694505", "text": "protected function setUp() {\n\t\tparent::setUp();\n\t\tMonkey\\setUp();\n\t}", "title": "" }, { "docid": "8c84e19b6da9f3343d878d4ce93d994c", "score": "0.71531016", "text": "public function startTestSuite()\n {\n self::backupStaticVariables();\n }", "title": "" }, { "docid": "6e818f54cda5ab5053b6ca036db4ca95", "score": "0.7116499", "text": "public static function setUpBeforeClass()\n {\n self::$sniffFiles = array();\n parent::setUpBeforeClass();\n }", "title": "" }, { "docid": "556cba7257bb0e5b9cbfa326828d263b", "score": "0.71138924", "text": "public function runTests() {\n\t}", "title": "" }, { "docid": "c010b1ea4a5c542b736fea2c5bfdf8ec", "score": "0.7112129", "text": "public function setUp()\n {\n parent::setUp();\n \n $this->prepareForTests();\n }", "title": "" }, { "docid": "0c608e2149c92a4748ebf1b87603fbef", "score": "0.711135", "text": "public function setUp(){}", "title": "" }, { "docid": "0c608e2149c92a4748ebf1b87603fbef", "score": "0.711135", "text": "public function setUp(){}", "title": "" }, { "docid": "3de10f2c95bbb60716c8849a24b4c588", "score": "0.71012175", "text": "public function setUp(){\n\t\t// TestUtils::flushTempDir(3600);\n\t}", "title": "" }, { "docid": "0b366d0cea0190f5f291c1e266c7972b", "score": "0.70989853", "text": "public function setUp()\n {\n parent::setUp();\n\n //prepare environment for tests\n $this->prepareForTests();\n }", "title": "" }, { "docid": "f8fc01a6ee7ac961a4d095b9af784117", "score": "0.7098176", "text": "public static function setUpBeforeClass() {}", "title": "" }, { "docid": "b82d9f48bbcbc176e06f293738d19cf9", "score": "0.7093508", "text": "public function setUp()\n {\n parent::setUp();\n\n $this->prepareForTests();\n }", "title": "" }, { "docid": "2e2db3d75d4fc50f48f821c898d47f75", "score": "0.70929706", "text": "protected function setUp()\n {\n $this->completed = false;\n }", "title": "" }, { "docid": "4a77f3415074eb03e38fc6ddb1ba9627", "score": "0.7091871", "text": "public function before() {}", "title": "" }, { "docid": "4a77f3415074eb03e38fc6ddb1ba9627", "score": "0.7091871", "text": "public function before() {}", "title": "" }, { "docid": "68fd60b0dbf60bb7eb3466ee39121d86", "score": "0.7090127", "text": "public function setUp() {\n $this->setUpSiteAuditTestEnvironment();\n }", "title": "" }, { "docid": "066655ab8835b09eef6a4522416884bc", "score": "0.70838773", "text": "public function preRun(): void;", "title": "" }, { "docid": "e3f7462cfb94e46264b9cc429553225a", "score": "0.70789945", "text": "public function setUp() {}", "title": "" }, { "docid": "0400a8f63a9c596b4b847ac6bc2777b1", "score": "0.7076533", "text": "public function setUp()\n\t{\n\t\t// Do nothing\n\t}", "title": "" }, { "docid": "1ec3f98f69789458e2efa0a2d8e8998c", "score": "0.70715487", "text": "public function setUp() {\n\n\t\t$this->maybeBootstrap();\n\t\t$this->testee = new Requisite\\SplAutoLoader;\n\t}", "title": "" }, { "docid": "d74b08eb9c89d419c47a0c199fb4a8f3", "score": "0.7063293", "text": "protected function setUp() {\n \t}", "title": "" }, { "docid": "0acc49bdb895b20826cb76b972c03935", "score": "0.7042446", "text": "protected function beforeRun(){}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.7041938", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.7041938", "text": "protected function setUp() {}", "title": "" }, { "docid": "ac4e20be99f7f50256100c8295258b17", "score": "0.70066893", "text": "public function testStartInstance()\n {\n $this->markTestSkipped('Test start instance skipped');\n }", "title": "" }, { "docid": "3533d1c495644d9a1cdf4c6e6483a145", "score": "0.7006674", "text": "protected function setUp() {\n\t\t\n\t}", "title": "" }, { "docid": "611abc831ef3ca8a7da2bc3a12abf631", "score": "0.7006575", "text": "public function setUpBeforeTests()\n {\n $this->loginAdminUser();\n }", "title": "" }, { "docid": "fb73a881f0f01ee4e8b8774f43cf98c9", "score": "0.7004548", "text": "protected function setUp()/*: void*/\n {\n static::$latestResponse = null;\n\n $this->setUpTheTestEnvironment();\n }", "title": "" }, { "docid": "18bfa293755e810e4869aecbb2206043", "score": "0.6999122", "text": "public static function setUpBeforeClass(): void {\n // do nothing\n }", "title": "" }, { "docid": "c94d76bc3afeeef64821a71c5b298212", "score": "0.6994884", "text": "protected function setUp()\n {\n // 1.\n // restore_error_handler();\n // Warning: Cannot modify header information - headers already sent by (output started at PHPUnit\\Util\\Printer.php:173)\n // more see in https://www.analysisandsolutions.com/blog/html/writing-phpunit-tests-for-wordpress-plugins-wp-redirect-and-continuing-after-php-errors.htm\n\n // 2.\n // the Symfony used the HeaderMock.php\n\n // 3.\n // not run the eclipse will held, and travis-ci.org Searching for coverage reports\n // **> Python coverage not found\n // **> No coverage report found.\n // add the\n // /**\n // * @runInSeparateProcess\n // */\n if (!$this->default_return_type) {\n $this->default_return_type = \\think\\Config::get('default_return_type');\n }\n if (!$this->default_ajax_return) {\n $this->default_ajax_return = \\think\\Config::get('default_ajax_return');\n }\n }", "title": "" }, { "docid": "b60452868c7fa08cadb28313c6dcf7f8", "score": "0.6968075", "text": "public function setUp()\n {\n // todo create routing to reset the move\n $this->markTestSkipped();\n\n parent::setUp();\n }", "title": "" }, { "docid": "22d8c95f8d04fc6d63d0ff2cd76fb51b", "score": "0.6953463", "text": "protected function before_setup() {}", "title": "" }, { "docid": "9d2cc84f2f0c3d8fbf22f4235e1030e8", "score": "0.6950981", "text": "public function setUp()\n {\n parent::setUp(); // Don't forget this!\n\n $this->prepareForTests();\n }", "title": "" }, { "docid": "9d2cc84f2f0c3d8fbf22f4235e1030e8", "score": "0.6950981", "text": "public function setUp()\n {\n parent::setUp(); // Don't forget this!\n\n $this->prepareForTests();\n }", "title": "" }, { "docid": "9d2cc84f2f0c3d8fbf22f4235e1030e8", "score": "0.6950981", "text": "public function setUp()\n {\n parent::setUp(); // Don't forget this!\n\n $this->prepareForTests();\n }", "title": "" }, { "docid": "7876458f35925dd9db6cd0623135b5d8", "score": "0.6944836", "text": "public static function doSetupBeforeClass()\n {\n }", "title": "" }, { "docid": "4938266f5adc6b7e84cb991dfa89eab8", "score": "0.6942726", "text": "public function runningUnitTests()\n {\n }", "title": "" }, { "docid": "0c3e4cc67746a56d9b753ab314a91eff", "score": "0.6941246", "text": "protected function willRunTests() {\n return;\n }", "title": "" }, { "docid": "38eec108ee29c8e89b7d3482c76f4762", "score": "0.69340223", "text": "public abstract function setUp();", "title": "" }, { "docid": "2eb59c23e9f429e9144983e80f74cb89", "score": "0.6933788", "text": "public function setUpBeforeTests()\n {\n $this->loginAdminUser();\n $this->navigate('system_configuration');\n $this->systemConfigurationHelper()->configure('payflowpro_without_3Dsecure');\n }", "title": "" }, { "docid": "6cd4856bc7bda925d23235d0b0e41db4", "score": "0.6923065", "text": "private function _loadTests()\n {\n return;\n }", "title": "" }, { "docid": "7665f3a76836b2c495b5521331a54865", "score": "0.69203174", "text": "protected function setUp()\n\t{\n\t\n\t}", "title": "" }, { "docid": "0bc368ec82cd01c573d8e682b76eafd6", "score": "0.6918858", "text": "public function setUp(): void\n {\n StickyContext::clear();\n }", "title": "" }, { "docid": "bb0e32d67bc1684f42d009c54c538cfd", "score": "0.6913244", "text": "protected function setUp()\n {\n if (!defined('PHPUNIT_TESTSUITE')) {\n define('PHPUNIT_TESTSUITE', true);\n }\n }", "title": "" }, { "docid": "d307116db38b18fce12bb449fdf899a9", "score": "0.69128907", "text": "protected function didRunTests() {\n return;\n }", "title": "" }, { "docid": "df645e2614d1b2d5dfb84365653811e7", "score": "0.6908508", "text": "public function setUp() {\n\t}", "title": "" }, { "docid": "5d876868e92d4adebfeaa20c4ae15a6f", "score": "0.6907453", "text": "protected function setUp()\n {}", "title": "" }, { "docid": "eccf5004604e9b4a8036bc9641cf8f10", "score": "0.6893597", "text": "protected function setUp() {\n \n }", "title": "" }, { "docid": "57c8aa2c29a5db0859cfa46232b72b56", "score": "0.6885225", "text": "protected function OnBeforeSetup()\n {\n\n return true; // To allow setup() to run\n }", "title": "" }, { "docid": "1523a6df7c137cc976178e2b0b59539e", "score": "0.6874915", "text": "protected function setUp(): void {\n\t\t$this->stack = [];\n\t}", "title": "" }, { "docid": "17b3d3808d6976d8f75c808b6e66c068", "score": "0.687354", "text": "protected function setUp()\n {\n $this->clearCache();\n }", "title": "" }, { "docid": "c562c5991d5c02aa665d484be7653c2b", "score": "0.6870152", "text": "protected abstract function doSetUp();", "title": "" }, { "docid": "d28df8f6b3b01f65075e252e22673097", "score": "0.68685985", "text": "protected function setUp()\n\t{\n\t}", "title": "" }, { "docid": "d28df8f6b3b01f65075e252e22673097", "score": "0.68685985", "text": "protected function setUp()\n\t{\n\t}", "title": "" }, { "docid": "f44295e73dde5f72774d39846925e58e", "score": "0.6866334", "text": "public function setUp()\n\t\t{\n\n\t\t}", "title": "" }, { "docid": "cdbec81e29b33c878d859a30328b3bc7", "score": "0.6864799", "text": "public function setUp()\n {\n $kernel = static::createKernel(array('environment' => 'test', 'debug' => false));\n $kernel->boot();\n $this->container = $kernel->getContainer();\n $this->_dm = $this->container->get('doctrine_mongodb.odm.document_manager');\n\n // For any pre-fixtures setup\n $this->init();\n\n if ($this->_fixtures) {\n $this->_loadFixtures($this->_fixtures, $this->_fixturesAppend);\n }\n\n $this->container->get('snc_redis.default')->flushdb();\n $this->container->get('pw.event')->resetRequests();\n }", "title": "" }, { "docid": "bfef60e35a16e026912eb83d772183cf", "score": "0.6857759", "text": "public function setUp() {\n\n\t}", "title": "" }, { "docid": "a12419231fe8c557a9f72163909c4f18", "score": "0.68564147", "text": "protected function _before()\n {\n if (!extension_loaded('memcached')) {\n $this->markTestSkipped('memcached extension not loaded');\n }\n }", "title": "" }, { "docid": "39876d1007d1dd5af2e829113c2060db", "score": "0.68535924", "text": "public function setUp() : void\n {\n $this->strategy = new RandomServerSelectionStrategy();\n }", "title": "" }, { "docid": "45d543b0c16718c7aed12f54cc062949", "score": "0.6844526", "text": "public function setUp()\n {\n parent::setUp();\n $this->init();\n }", "title": "" }, { "docid": "9409540844ca81ff090a2c3bc881836a", "score": "0.683555", "text": "public static function setUpBeforeClass()\n\t\t{\n\n\t\t}", "title": "" }, { "docid": "00818951b440da7690767e0ecfb554d3", "score": "0.6833406", "text": "public function before() { }", "title": "" }, { "docid": "8afbc83fbeb3f29b7494f76139860c15", "score": "0.6825416", "text": "private function prepareForTests()\n {\n /*(needs to be done manually before running phpunit)\n //Artisan::call('migrate:generate');//generate migration files from live db \n */\n \n Artisan::call('migrate');//create migration files for testing\n Artisan::call('db:seed', ['--env' => 'testing']);//seed testing tables\n Mail::pretend(true);//switch mailer to pretend to not send mails\n }", "title": "" }, { "docid": "27ae341755357f50b22f5bdedbe3a729", "score": "0.68253666", "text": "protected function setUp() {\r\n }", "title": "" }, { "docid": "27ae341755357f50b22f5bdedbe3a729", "score": "0.68253666", "text": "protected function setUp() {\r\n }", "title": "" }, { "docid": "27ae341755357f50b22f5bdedbe3a729", "score": "0.68253666", "text": "protected function setUp() {\r\n }", "title": "" }, { "docid": "27ae341755357f50b22f5bdedbe3a729", "score": "0.68253666", "text": "protected function setUp() {\r\n }", "title": "" }, { "docid": "18d4cba19aaa11878d74d68abc4d7287", "score": "0.68242204", "text": "protected function setUp() {\n // As we want to test a static library, there is nothing to do here\n\t}", "title": "" }, { "docid": "51bfde0f0dc4e6fd9d696c115657fc55", "score": "0.6812836", "text": "public function setUp()\n {\n foreach ($this->modules as $module) {\n $module->setUp();\n }\n }", "title": "" }, { "docid": "97c1d71ed30dc3d4d5fdac8b9e652a0d", "score": "0.681216", "text": "private function prepareForTests()\n {\n if ($this->useDatabase) {\n $this->setUpDb();\n }\n \\Mail::pretend(true);\n }", "title": "" }, { "docid": "0a8c107460a7d8de601e150e10857b5d", "score": "0.68118453", "text": "protected function setUp() {\r\n }", "title": "" }, { "docid": "fdf8f673eda779f691593b53f1ad2d40", "score": "0.6810223", "text": "public static function setUpBeforeClass(): void\n {\n }", "title": "" }, { "docid": "fdf8f673eda779f691593b53f1ad2d40", "score": "0.6810223", "text": "public static function setUpBeforeClass(): void\n {\n }", "title": "" }, { "docid": "fdf8f673eda779f691593b53f1ad2d40", "score": "0.6810223", "text": "public static function setUpBeforeClass(): void\n {\n }", "title": "" }, { "docid": "fdf8f673eda779f691593b53f1ad2d40", "score": "0.6810223", "text": "public static function setUpBeforeClass(): void\n {\n }", "title": "" }, { "docid": "fdf8f673eda779f691593b53f1ad2d40", "score": "0.6810223", "text": "public static function setUpBeforeClass(): void\n {\n }", "title": "" }, { "docid": "fdf8f673eda779f691593b53f1ad2d40", "score": "0.6810223", "text": "public static function setUpBeforeClass(): void\n {\n }", "title": "" }, { "docid": "fdf8f673eda779f691593b53f1ad2d40", "score": "0.6810223", "text": "public static function setUpBeforeClass(): void\n {\n }", "title": "" }, { "docid": "fdf8f673eda779f691593b53f1ad2d40", "score": "0.6810223", "text": "public static function setUpBeforeClass(): void\n {\n }", "title": "" }, { "docid": "fdf8f673eda779f691593b53f1ad2d40", "score": "0.6810223", "text": "public static function setUpBeforeClass(): void\n {\n }", "title": "" }, { "docid": "fdf8f673eda779f691593b53f1ad2d40", "score": "0.6810223", "text": "public static function setUpBeforeClass(): void\n {\n }", "title": "" }, { "docid": "fdf8f673eda779f691593b53f1ad2d40", "score": "0.6810223", "text": "public static function setUpBeforeClass(): void\n {\n }", "title": "" }, { "docid": "fdf8f673eda779f691593b53f1ad2d40", "score": "0.6810223", "text": "public static function setUpBeforeClass(): void\n {\n }", "title": "" }, { "docid": "fdf8f673eda779f691593b53f1ad2d40", "score": "0.6810223", "text": "public static function setUpBeforeClass(): void\n {\n }", "title": "" }, { "docid": "fdf8f673eda779f691593b53f1ad2d40", "score": "0.6810223", "text": "public static function setUpBeforeClass(): void\n {\n }", "title": "" }, { "docid": "fdf8f673eda779f691593b53f1ad2d40", "score": "0.6810223", "text": "public static function setUpBeforeClass(): void\n {\n }", "title": "" }, { "docid": "fdf8f673eda779f691593b53f1ad2d40", "score": "0.6810223", "text": "public static function setUpBeforeClass(): void\n {\n }", "title": "" }, { "docid": "fdf8f673eda779f691593b53f1ad2d40", "score": "0.6810223", "text": "public static function setUpBeforeClass(): void\n {\n }", "title": "" }, { "docid": "fdf8f673eda779f691593b53f1ad2d40", "score": "0.6810223", "text": "public static function setUpBeforeClass(): void\n {\n }", "title": "" } ]
dae9adb1dc8bc58289faeb664f24fe78
Test case for scanPost Scan Ticket.
[ { "docid": "97bdb75e4410d0be6e57f16f46eaeea5", "score": "0.72082514", "text": "public function testScanPost()\n {\n }", "title": "" } ]
[ { "docid": "390ee33ed2643a542a69d7316c95e201", "score": "0.5499874", "text": "public function testCreateCardSpendingControlUsingPost()\n {\n }", "title": "" }, { "docid": "e04327107c8fc3fe4fafaa0969c9c2d7", "score": "0.5473205", "text": "public function testCreateCardIssueUsingPost()\n {\n }", "title": "" }, { "docid": "748ba70939d3c3d3628a2b68396264ae", "score": "0.5470034", "text": "public function testCreateCardReactivateUsingPost()\n {\n }", "title": "" }, { "docid": "0856c22ba9eb91ddcdd21010394b371a", "score": "0.5451568", "text": "public function schedule_scan() {\n\t\tif ( ! WD_Utils::check_permission() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! wp_verify_nonce( WD_Utils::http_post( 'wd_scan_nonce' ), 'wd_schedule_scan' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t/*$email = WD_Utils::http_post( 'email' );\n\t\tif ( ! empty( $email ) && ! filter_var( $email, FILTER_VALIDATE_EMAIL ) ) {\n\t\t\twp_send_json( array(\n\t\t\t\t'status' => 0,\n\t\t\t\t'error' => __( \"Please enter a valid email address\", wp_defender()->domain )\n\t\t\t) );\n\t\t}*/\n\t\t//all good here\n\t\tWD_Utils::update_setting( 'scan->schedule', array(\n\t\t\t//'email' => $email,\n\t\t\t'frequency' => WD_Utils::http_post( 'frequency' ),\n\t\t\t'day' => WD_Utils::http_post( 'day' ),\n\t\t\t'time' => WD_Utils::http_post( 'time' ),\n\t\t) );\n\t\t//we also activate the toggle\n\t\tWD_Utils::update_setting( 'scan->auto_scan', 1 );\n\t\tWD_Utils::do_submitting( true );\n\t\twp_send_json( array(\n\t\t\t'status' => 1,\n\t\t\t'message' => __( \"Congratulations. Your scan schedule is saved.\", wp_defender()->domain )\n\t\t) );\n\t}", "title": "" }, { "docid": "0317030a8ffe5319531269948c00928a", "score": "0.5436151", "text": "public function testProfilesPostForBarcode()\n {\n }", "title": "" }, { "docid": "1fbbc00a4e152c48fdc802f44a84d588", "score": "0.53483504", "text": "public function testCreateCardSuspendUsingPost()\n {\n }", "title": "" }, { "docid": "4f46d9cc9495462108dbc8f1f1ffafba", "score": "0.50976986", "text": "public function testCashInvoicesWithPaymentPost()\n {\n }", "title": "" }, { "docid": "3d209a80fa04162f0bfe71b89209ec09", "score": "0.5097616", "text": "public function testPostUnpublishedOfferReport()\n {\n }", "title": "" }, { "docid": "4ce067c3e9e26381a94fa244b41827d7", "score": "0.50435895", "text": "public function testCashInvoicesIdPaymentPost()\n {\n }", "title": "" }, { "docid": "1bc6049d5971a55ba78a344e53d21fb1", "score": "0.5030972", "text": "public function testActionPost() {\n\t\t$Action = $this->_actionSuccess();\n\t\t$this->setReflectionClassInstance($Action);\n\t\t$this->callProtectedMethod('_post', array(1), $Action);\n\t}", "title": "" }, { "docid": "f421088fcb9626eff4d19dda4471e2d8", "score": "0.503042", "text": "protected function scan($get, $post, $files)\n {\n if ($this->site->scheduleScan(Scan::SCAN_TYPE_USER)) {\n Controller::redirect(\n $this->site->getURL(),\n new FlashBagMessage(FlashBagMessage::TYPE_SUCCESS, 'A new scan has been scheduled. Feel free to grab some coffee or work on something else -- we will email you if we find any changes.')\n );\n } else {\n Controller::redirect(\n $this->site->getURL(),\n new FlashBagMessage(FlashBagMessage::TYPE_ERROR, 'Can\\'t schedule a scan because there is already one scheduled')\n );\n }\n }", "title": "" }, { "docid": "d83cb752b56894fe6b7acd6a37d64aff", "score": "0.5030059", "text": "public function testGetAllPortfolioTransactionByPostUsingPOST()\n {\n }", "title": "" }, { "docid": "764f54ec26e2828c2cb630a6ec4ff736", "score": "0.5024658", "text": "public function testPostOffer()\n {\n }", "title": "" }, { "docid": "804e8f8dfc2a6b302c0ee1771b87c15b", "score": "0.50154597", "text": "public function testCreateCardLoadUsingPost()\n {\n }", "title": "" }, { "docid": "a0b29243f980f44108e370fe14d5d456", "score": "0.50140935", "text": "public function testCashInvoicesPost()\n {\n }", "title": "" }, { "docid": "befe535d6527b0c54c9f536847c86a8f", "score": "0.49842542", "text": "public function testScan()\n {\n $this->logMock\n ->expects($this->atLeastOnce())\n ->method('log');\n \n $this->object->scan();\n }", "title": "" }, { "docid": "2a7adac53e538470577865257aea00d3", "score": "0.4954957", "text": "public function testPostAlertingInteractionstatsRules()\n {\n }", "title": "" }, { "docid": "bbcac52184f95de530d588c13cf2fcbb", "score": "0.49514788", "text": "public function testCreateCardReplaceUsingPost()\n {\n }", "title": "" }, { "docid": "044b5fa1d80d5a87ccf44e44d8147418", "score": "0.4912324", "text": "public function testCreateCardUnloadUsingPost()\n {\n }", "title": "" }, { "docid": "02a181c060bbff94b7f4a29fcfd5f8c5", "score": "0.49121025", "text": "protected function _postAction()\n {\n }", "title": "" }, { "docid": "222f67c71aa80dd4be120a2e825c3d72", "score": "0.490874", "text": "public function testCashInvoicesEmailDocumentPost()\n {\n }", "title": "" }, { "docid": "399872825dd8abae1313ecf3163d9190", "score": "0.48672697", "text": "public function testCreateCardCloseUsingPost()\n {\n }", "title": "" }, { "docid": "dc2bb22632e15c78150ac7103165e417", "score": "0.48091325", "text": "public function Post()\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->Merge_Params();\n\t\t\t\t\t\t\n\t\t\t\t\t\t$lead_data = $this->Get_Lead_Data();\n\t\t\t\t\t\t$this->movePayDate($lead_data);\n\t\t\t\t\t\t$fields = $this->Generate_Fields($lead_data, $this->params);\n\n\t\t\t\t\t\t$result = new Vendor_Post_Result();\n\n\t\t\t\t\t\t$fred=Dupe_Bloom_Singleton::Get_Instance();\n\t\t\t\t\t\tif($fred->is_dupe($fields['email'],$fields['ssn']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$result->Set_Message(\"Rejected\");\n\t\t\t\t\t\t\t$result->Set_Success(FALSE);\n\t\t\t\t\t\t\t$result->Set_Vendor_Decision('REJECTED');\n\t\t\t\t\t\t\t$reason=\"Failed OLP/CG dupe check\";\n\t\t\t\t\t\t\t$result->Set_Vendor_Reason($reason);\n\t\t\t\t\t\t\t$result->Set_Data_Sent(serialize($fields));\n\t\t\t\t\t\t\t//following response message must stay for CG-- usurped as a flag \n\t\t\t\t\t\t\t//used in olp.php Post_To_Winner\n\t\t\t\t\t\t\t$result->Set_Data_Received(\"failed_cg_dupes\");\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//passed the bloom filter check\n\t\t\t\t\t\t\t$result = $this->HTTP_Post_Process($fields,FALSE);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\treturn $result;\n\t\t\t\t\t}", "title": "" }, { "docid": "aec7bdfb5078f8e953ac9c1ad0395690", "score": "0.4802177", "text": "public function testPreAuthorise()\n {\n $paymentMethodToken = new Token('pm_card_visa');\n\n $payment = $this->service->reserve(\n $paymentMethodToken,\n 1000\n );\n\n $this->assertInstanceOf(Payment::class, $payment);\n\n $paymentToken = new Token($payment->uid);\n\n $this->assertEquals( Token::PAYMENT_INTENT, $paymentToken->type);\n }", "title": "" }, { "docid": "fbd502e2f2cd997eb82671d3718a778c", "score": "0.47987935", "text": "public function testCreateClientCardUsingPost()\n {\n }", "title": "" }, { "docid": "cc67ddf64010e92d02386ef5f9fd6538", "score": "0.47820818", "text": "public function testPostRequestCount()\n {\n $this->assertTrue(\\tabs\\api\\utility\\Utility::postRequestCount('mouse', 2014, 11, 11, 11, 500));\n\n //Request request count from API and check that the count was correctly applied\n $requests = \\tabs\\api\\utility\\Utility::getRequestCount('mouse');\n //$this->assertEquals(500, $requests->{2014}->months->{11}->days->{11}->hours->{11}->total);\n\n }", "title": "" }, { "docid": "8b4613b0551384e2ecbc78e15888c9f0", "score": "0.47735995", "text": "public function testDataSourceSoapsPost()\n {\n\n }", "title": "" }, { "docid": "e6c35147f1b3faf3ddce9ae6285f58bf", "score": "0.47667527", "text": "public function testCashInvoicesSharedocumentPost()\n {\n }", "title": "" }, { "docid": "4d83dacd5eec88228a3ef831008a59c1", "score": "0.476303", "text": "public function postTrip()\n\t{\n\t}", "title": "" }, { "docid": "555e9c223158465c4bedbd6090520622", "score": "0.47565997", "text": "public function testPostOfferExport()\n {\n }", "title": "" }, { "docid": "7167a5df5deb9a698f381e5c03117371", "score": "0.47412005", "text": "public function submit() {\n if($this->id === null) {\n $call = \"MRWebServices__createIssue_goc\";\n } else {\n $call = \"MRWebServices__editIssue_goc\";\n }\n\n $params = $this->prepareParams();\n\n slog(\"[submit] Footprint Ticket Web API invoked with following parameters -------------------\");\n slog(print_r($params, true));\n slog(print_r($this->metadata, true));\n\n if(config()->simulate) {\n //simulation doesn't submit the ticket - just dump the content out.. (and no id..)\n $this->id = print_r($params, true);\n\n $this->id.=\"[Metadata Dump]\\n\";\n foreach($this->metadata as $key=>$value) {\n $this->id.=\"$key: $value\\n\";\n }\n //slog($this->id);\n } else {\n //submit the ticket!\n $newid = fpCall($call, array(config()->webapi_user, config()->webapi_password, \"\", $params));\n if(is_null($this->id)) {\n $this->id = $newid; //reset ticket ID with new ID that we just got\n\n //For new ticket, send SMS - if the ticket didn't come from other ticketing system.\n if(trim(@$this->project_fields[\"Originating__bTicket__bNumber\"]) == \"\") {\n $this->send_notification($params[\"assignees\"], $this->id);\n }\n\n $this->sendEventNotification(true); //true == new ticket notification\n } else {\n $this->sendEventNotification(false); //false == ticket update notification\n }\n\n //if assignee notification was suppressed, then send GOC-TX trigger email ourselves\n if(@$params[\"mail\"][\"assignees\"] === 0) {\n slog(\"sending trigger emails to GOC-TX\");\n $this->sendGOCTXTrigger($this->assignees, $this->id);\n }\n\n //store metadata\n $data = new Data();\n foreach($this->metadata as $key=>$value) {\n $data->setMetadata($this->id, $key, $value);\n slog(\"Setmetadata : $this->id $key = $value\");\n }\n }\n return $this->id;\n }", "title": "" }, { "docid": "1819c777ad6a287a59b47c2a676967c5", "score": "0.47183627", "text": "public function testDebtorPOSTRequestPost()\n {\n }", "title": "" }, { "docid": "8fcd5dfec5ab9b09203ffab8e7950ebe", "score": "0.47148022", "text": "public function test_purchase_works()\n {\n $response = $this->postJson('/api/purchase', ['type' => '10_entries']);\n $response\n ->assertStatus(201)\n ->assertJson([\n 'ticket_uuid' => true,\n ]);\n\n $this->assertEquals(1, Ticket::count());\n }", "title": "" }, { "docid": "9440808631cc3dbb9a582b3a6efab82a", "score": "0.47092828", "text": "protected function assertPostConditions() : void\n {\n }", "title": "" }, { "docid": "1b34555a12ac948719fba96695a7f07d", "score": "0.47089016", "text": "public function run()\n {\n $data = \\DB::table('tickets')->where('id', 1)->count();\n if ($data == 0) {\n Ticket::factory(10)->create();\n }\n }", "title": "" }, { "docid": "998177fdfa2a71a741509fb70eb6ae26", "score": "0.46964586", "text": "protected function assertPostConditions(): void\n {\n }", "title": "" }, { "docid": "2566736d2e3ceb551387ba3f596f8a4b", "score": "0.46955618", "text": "public function testCreateCampaignPlanUsingPost()\n {\n }", "title": "" }, { "docid": "03acb4097863a7a612e13c1244d3895c", "score": "0.46938407", "text": "public function testCashInvoicesIdStatusStatusIdPost()\n {\n }", "title": "" }, { "docid": "8a4690738b123296300d073953be70fd", "score": "0.46907064", "text": "public function testRegistration()\n {\n $inRangeTime = time() - 20 * 60;\n $this->init('register', $inRangeTime, false, false, false);\n\n $this->assertEquals('closure', $this->sessionTimeout->handle($this->request, $this->next));\n\n $this->session->shouldReceive('put')->with('last_activity');\n $this->addToAssertionCount(1);\n }", "title": "" }, { "docid": "1ed47efa8f643b22b92421a8c92f3e58", "score": "0.46892592", "text": "public function testCashInvoicesIdAttachmentPost()\n {\n }", "title": "" }, { "docid": "6b87307c1b48e060e9a557775086b61d", "score": "0.46878782", "text": "public function run(): void\n {\n TicketType::factory()->count(10)->create();\n }", "title": "" }, { "docid": "4cd29e6ffa146a352d557be9b9f4b847", "score": "0.46660933", "text": "public function testCreatePortfolioTransactionUsingPost()\n {\n }", "title": "" }, { "docid": "50e5a710f1f8e35c5ab1164e14839116", "score": "0.46596912", "text": "public function testPostAuthorizationSubjectBulkadd()\n {\n }", "title": "" }, { "docid": "3d0f35a765391f30e988575de992ebed", "score": "0.4647449", "text": "protected function _postRun()\n {\n }", "title": "" }, { "docid": "bbb47747f7441c392a475acb81630b5c", "score": "0.46371037", "text": "public function testCreateAfterSalesServiceWarrantyUsingPOST()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "591ca2ec17ae48d09712ede8c95a910a", "score": "0.46287203", "text": "public function testCreateAfterSalesServiceConditionsAttachmentUsingPOST()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "28103eaf323433d1c70c201b482bc89a", "score": "0.46269032", "text": "public function testPdfOcrPost()\n {\n }", "title": "" }, { "docid": "3f672f29edacac57b2909af0927d8357", "score": "0.46128866", "text": "public function postTrip()\r\n {\r\n }", "title": "" }, { "docid": "cac652257ccaf630d8ac44499bc7c265", "score": "0.4609825", "text": "public function simpleTestPostService()\n {\n $this->mockPostServiceCall(201, 11, []);\n }", "title": "" }, { "docid": "1575b1db7dde0ea472b4ce8c754d3072", "score": "0.46065834", "text": "public function testPostUserInvite()\n {\n }", "title": "" }, { "docid": "656d650ce1ed9e0981a33412801c0935", "score": "0.45853797", "text": "public function testReleasesCreateReleaseUpload()\n {\n }", "title": "" }, { "docid": "70193151c8618b6241ae8f1b3ec0f1af", "score": "0.45844525", "text": "public function testTicket()\n {\n $verifyTicket = $this->getVerifyTicket('foobar');\n\n $this->assertTrue($verifyTicket->setTicket('ticket@foobar'));\n $this->assertEquals('ticket@foobar', $verifyTicket->getTicket());\n }", "title": "" }, { "docid": "0c7071e60ef94e392eefbda3d10c8ca7", "score": "0.45814475", "text": "public function secretaryAssign_post(){\n\t\t\n\t}", "title": "" }, { "docid": "442deb7a27a057802594450f2c61f612", "score": "0.45714775", "text": "public function testEventsEventIdOrdersBarcodeBarcodeGet()\n {\n }", "title": "" }, { "docid": "66a01d46ba6fe750da5ab6b27d21b526", "score": "0.45699278", "text": "public function meta_box_booking($post)\n {\n do_action('mec_metabox_booking', $post);\n }", "title": "" }, { "docid": "07f5b0c91023ad87d84edfdcbeb882a3", "score": "0.45637634", "text": "public function testCreatePortfolioHoldingUsingPost()\n {\n }", "title": "" }, { "docid": "1f20e7c9afabce2dc03c85afb1baf61b", "score": "0.4558471", "text": "public function _post() { }", "title": "" }, { "docid": "5776da1614f9d41c2a14f51894e5bc37", "score": "0.4554418", "text": "function pre_booking($search_id = 2500, $static_search_result_id = 2879) {\r\n \r\n error_reporting(0);\r\n $post_params = $this->input->post();\r\n // debug($post_params);exit;\r\n //$this->custom_db->generate_static_response(json_encode($post_params));\r\n //Insert To temp_booking and proceed\r\n /* $post_params = $this->bus_model->get_static_response($static_search_result_id); */\r\n //Make sure token and temp token matches\r\n $valid_temp_token = unserialized_data($post_params['token'], $post_params['token_key']);\r\n if ($valid_temp_token != false) {\r\n load_bus_lib($post_params['booking_source']);\r\n /* * **Convert Display currency to Application default currency** */\r\n //After converting to default currency, storing in temp_booking\r\n $post_params['token'] = unserialized_data($post_params['token']);\r\n //debug($post_params['token']);die('?');\r\n $currency_obj = new Currency(array(\r\n 'module_type' => 'bus',\r\n 'from' => get_application_currency_preference(),\r\n 'to' => admin_base_currency()\r\n ));\r\n $post_params['token'] = $this->bus_lib->convert_token_to_application_currency($post_params['token'], $currency_obj, $this->current_module);\r\n $post_params['token'] = serialized_data($post_params['token']);\r\n\r\n $temp_token = unserialized_data($post_params['token']);\r\n //debug($temp_token);die('777');\r\n /********* Promocode Start ********/\r\n $promocode_discount = $post_params['promo_code_discount_val'];\r\n /********* Promocode End ********/\r\n // debug($temp_token);exit;\r\n if ($post_params['booking_source'] == BITLA_BUS_BOOKING_SOURCE || $post_params['booking_source'] == SRS_BUS_BOOKING_SOURCE || $post_params['booking_source'] == ETS_BUS_BOOKING_SOURCE || $post_params['booking_source'] == KUKKESHREE_BUS_BOOKING_SOURCE || $post_params['booking_source'] == KRL_BUS_BOOKING_SOURCE || $post_params['booking_source'] == VRL_BUS_BOOKING_SOURCE) {\r\n $amount = $temp_token['seat_attr']['markup_price_summary'];\r\n $currency = $temp_token['seat_attr']['default_currency'];\r\n }\r\n $admin_markup = $currency_obj->get_currency($temp_token['seat_attr']['total_price_summary']);\r\n //debug($temp_token);exit;\r\n // debug($temp_token);exit;\r\n //check current balance before proceeding further\r\n $domain_balance_status = $this->domain_management_model->verify_current_balance($amount, $currency);\r\n\r\n $selected_pm=$post_params ['selected_pm'];\r\n if(isset($post_params ['bank_code']) && !empty($post_params ['bank_code'])){\r\n $bank_code = $post_params ['bank_code'];\r\n }\r\n else\r\n $bank_code = 0;\r\n $selected_pm_array = explode(\"_\", $selected_pm);\r\n $selected_pm = $selected_pm_array[0];\r\n $method = $selected_pm_array[1];\r\n \r\n if($selected_pm == \"WALLET\")\r\n $method = \"wallet\";\r\n if($method==\"CC\")\r\n $payment_mode = \"credit_card\";\r\n else if($method==\"DC\")\r\n $payment_mode = \"debit_card\";\r\n else if($method==\"PPI\")\r\n $payment_mode = \"paytm_wallet\";\r\n else if($selected_pm==\"TECHP\")\r\n $payment_mode = \"net_banking\";\r\n else\r\n $payment_mode = \"wallet\";\r\n\t\t\t\r\n if ($domain_balance_status == true) {\r\n\r\n //Block Seats\r\n //run block and then booking request\r\n $post_params['token'] = $temp_token;\r\n //debug($post_params);exit;\r\n $block_status = $this->bus_lib->block_seats($search_id, $post_params);\r\n //debug($block_status);exit;\r\n if ($block_status['status'] == SUCCESS_STATUS) {\r\n $post_params['block_key'] = $block_status['data']['result']['HoldKey'];\r\n $post_params['block_data'] = $block_status['data']['result']['Passenger'];\r\n if($post_params['booking_source'] == BITLA_BUS_BOOKING_SOURCE || $post_params['booking_source'] == SRS_BUS_BOOKING_SOURCE){\r\n $post_params['block_ticket_data'] = $block_status['data']['result'];\r\n }else if($post_params['booking_source'] == ETS_BUS_BOOKING_SOURCE){\r\n $post_params['block_ticket_data'] = $block_status['data']['result'];\r\n }else if(($post_params['booking_source'] == KUKKESHREE_BUS_BOOKING_SOURCE || $post_params['booking_source'] == KRL_BUS_BOOKING_SOURCE)){\r\n $post_params['block_ticket_data'] = $block_status['data']['result'];\r\n }\r\n //update seat block details and continue\r\n $post_params['token'] = serialized_data($post_params['token']);\r\n $temp_booking = $this->module_model->serialize_temp_booking_record($post_params, BUS_BOOKING);\r\n $book_id = $temp_booking['book_id'];\r\n $book_origin = $temp_booking['temp_booking_origin'];\r\n\r\n //details for PGI\r\n $email = $post_params ['billing_email'];\r\n $phone = $post_params ['passenger_contact'];\r\n $pgi_amount = $amount;\r\n $firstname = $post_params ['contact_name'] ['0'];\r\n $productinfo = META_BUS_COURSE;\r\n $number_of_seats = count($temp_token['seat_attr']['seats']);\r\n \r\n /********* Convinence Fees Start ********/\r\n $con_row = $this->master_currency->get_instant_recharge_convenience_fees($pgi_amount, $method, $bank_code);\r\n /********* Convinence Fees End ********/\r\n $gst_value = $temp_token['gst_value'];\r\n switch ($post_params['payment_method']) {\r\n case PAY_NOW :\r\n $this->load->model('transaction');\r\n $pg_currency_conversion_rate = $currency_obj->payment_gateway_currency_conversion_rate();\r\n $this->transaction->create_payment_record($book_id, $pgi_amount, $firstname, $email, $phone, $productinfo, $con_row['cf'], $promocode_discount, $pg_currency_conversion_rate,0, $gst_value,$selected_pm, $payment_mode);\r\n redirect(base_url() . 'index.php/payment_gateway/payment/' . $book_id . '/' . $book_origin.'/'.$selected_pm);\r\n //redirect(base_url() . 'index.php/bus/process_booking/' . $book_id . '/' . $book_origin);\r\n break;\r\n case PAY_AT_BANK : echo 'Under Construction - Remote IO Error';\r\n exit;\r\n break;\r\n }\r\n } else {\r\n redirect(base_url() . 'index.php/bus/exception?op=seat_block&notification=' . $block_status['msg']);\r\n }\r\n } else {\r\n redirect(base_url() . 'index.php/bus/exception?op=booking_balance&notification=insufficient balance');\r\n }\r\n }\r\n\r\n redirect(base_url() . 'index.php/bus/exception?op=validation_hack&notification=Remote IO error @ Bus Booking');\r\n }", "title": "" }, { "docid": "6a90dc002d6377e0dd4405f2b9a5efab", "score": "0.45520034", "text": "public function postAction()\n\t{\n\t\tif (($bot = Mage::helper('nobots')->getBot(false)) !== false) {\n\t\t\ttry {\n\t\t\t\t// Validate the captcha details\n\t\t\t\tMage::helper('nobots/recaptcha')->validateCaptcha();\n\t\t\t\t\n\t\t\t\t// Captcha passed so unmark bot as spam\n\t\t\t\t$bot->release();\n\t\t\t}\n\t\t\tcatch (Exception $e) {\n\t\t\t\tMage::getSingleton('core/session')->addError($e->getMessage());\n\t\t\t}\n\t\t}\n\n\t\t// Redirect to referrer, if possible\n\t\t$this->_redirectReferer();\t\t\n\t}", "title": "" }, { "docid": "c49e4b09800c1fe2ca604d6d1ffb67a3", "score": "0.4547032", "text": "public function testCreateAfterSalesServiceImpliedWarrantyUsingPOST()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "403900e910bfb77c5eb03039eb66e5c9", "score": "0.4545506", "text": "public function testDataSourceSoapsChangeStreamPost()\n {\n\n }", "title": "" }, { "docid": "187885eb74aa8617f89fa5d986ee97ab", "score": "0.45269316", "text": "public function postRegister()\n\t{\n\t}", "title": "" }, { "docid": "2675d9af56f3c513e2bf9657e29a95f5", "score": "0.45262673", "text": "public function teststripeAction(){\n\t\t// See your keys here https://dashboard.stripe.com/account/apikeys\n\t\t\\Stripe\\Stripe::setApiKey(\"sk_test_pzZdL0U9VmqJAm8XhHeCVJuT\");\n\n\t\t$acct = \\Stripe\\Account::create(array(\n\t\t \"managed\" => true,\n\t\t \"country\" => \"US\",\n\t\t \"external_account\" => array(\n\t\t \"object\" => \"bank_account\",\n\t\t \"country\" => \"US\",\n\t\t \"currency\" => \"usd\",\n\t\t \"routing_number\" => \"110000000\",\n\t\t \"account_number\" => \"000123456789\",\n\t\t ),\n\t\t \"tos_acceptance\" => array(\n\t\t \"date\" => 1459851033,\n\t\t \"ip\" => '122.160.74.176'\n\t\t )\n\t\t));\n\n\t\t$acct_id = $acct->id;\n\t\tif($acct_id){\n\t\t\t$pay = \\Stripe\\Charge::create(array(\n\t\t\t \"amount\" => 50,\n\t\t\t \"currency\" => \"usd\",\n\t\t\t \"source\" => array(\n\t\t\t object => \"card\",\n\t\t\t number => 4000000000004210,\n\t\t\t exp_month => 2,\n\t\t\t exp_year => 2017\n\t\t\t ),\n\t\t\t \"destination\" => $acct_id\n\t\t\t));\n\t\t\t//var_dump(\\Stripe\\Account::retrieve($acct_id));\n\t\t\t//print_r($verification[fields_needed]);\n\t\t\t$ac = \\Stripe\\Account::retrieve($acct_id);\t\n\t\t\t\t\t\t\n\t\t\tif(!empty($ac->verification->fields_needed)){\t\n\t\t\t\t$account = \\Stripe\\Account::retrieve($acct_id);\n\t\t\t\t$account->legal_entity->dob->day = 10;\n\t\t\t\t$account->legal_entity->dob->month = 01;\n\t\t\t\t$account->legal_entity->dob->year = 1986;\n\t\t\t\t$account->legal_entity->first_name = \"Jonathan\";\n\t\t\t\t$account->legal_entity->last_name = \"Goode\";\n\t\t\t\t$account->legal_entity->type = \"individual\";\n\t\t\t\t$account->save();\n\t\t\t\t\n\t\t\t\t\\Stripe\\Charge::create(array(\n\t\t\t\t\"amount\" => 50,\n\t\t\t\t\"currency\" => \"usd\",\n\t\t\t\t\"source\" => array(\n\t\t\t\tobject => \"card\",\n\t\t\t\tnumber => 4000000000004202,\n\t\t\t\texp_month => 2,\n\t\t\t\texp_year => 2017\n\t\t\t\t),\n\t\t\t\t\"destination\" => $acct_id\n\t\t\t\t));\n\n\t\t\t\t// Re-fetch the account to see what its status is.\n\t\t\t\tvar_dump(\\Stripe\\Account::retrieve($acct_id));\n\t\t\t}\n\t\t}\n\t\t//echo $acct_id;\n\t\t//print_r($acct);\n\t\techo 'Hedayat';exit;\n\t}", "title": "" }, { "docid": "13ae3663a7b4f08d52bd8ab22e1b51db", "score": "0.45111904", "text": "public function testGetCardReserveAccountDetailsUsingGet()\n {\n }", "title": "" }, { "docid": "65446984b5c4fd328c7bb3043bbab8ac", "score": "0.4507433", "text": "public function testCreateAfterSalesServiceReturnPolicyUsingPOST()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "434482dbaa1b1a7052a0b39a63194a66", "score": "0.45050403", "text": "public function testPostAnalyticsUsersDetailsQuery()\n {\n }", "title": "" }, { "docid": "46d83b54c6528bdd9554647b5c796043", "score": "0.4502104", "text": "public function cron(){\n\t\t$schedule_list = $this->db->select('post.*, account.access_token')\n\t\t->from($this->tb_posts.\" as post\")\n\t\t->join($this->tb_accounts.\" as account\", \"post.account = account.id\")\n\t\t->where(\"(post.status = 1 OR post.status = 4) AND post.time_post <= '\".NOW.\"' AND account.status = 1\")->get()->result();\n\n\t\tif(!empty($schedule_list)){\n\t\t\tforeach ($schedule_list as $key => $schedule) {\n\t\t\t\tif(!permission(\"pinterest/post\", $schedule->uid)){\n\t\t\t\t\t$this->db->delete($this->tb_posts, array(\"uid\" => $schedule->uid, \"time_post >=\" => NOW));\n\t\t\t\t}\n\n\t\t\t\t$vk = new VkAPI(VK_CLIENT_ID, VK_CLIENT_SERECT);\n\t\t\t\t$vk->set_access_token($schedule->access_token);\n\t\t\t\t$result = $vk->post($schedule);\n \n\t\t\t\t$data = array();\n\t\t\t\tif(is_array($result) && $result[\"status\"] == \"error\"){\n\t\t\t\t\t$data['status'] = 3;\n\t\t\t\t\t$data['result'] = json_encode(array(\"message\" => $result[\"message\"]));\n\n\t\t\t\t\t//\n\t\t\t\t\tupdate_setting(\"vk_post_error_count\", get_setting(\"vk_post_error_count\", 0, $schedule->uid) + 1, $schedule->uid);\n\t\t\t\t\tupdate_setting(\"vk_post_count\", get_setting(\"vk_post_count\", 0, $schedule->uid) + 1, $schedule->uid);\n\t\t\t\t\t\n\t\t\t\t\t//Save report\n\t\t\t\t\t$this->db->update($this->tb_posts, $data, \"id = '{$schedule->id}'\");\n\t\t\t\t\techo $result[\"message\"].\"<br/>\";\n\t\t\t\t}else{\n\n\t\t\t\t\t//Save report\n\t\t\t\t\tupdate_setting(\"vk_post_success_count\", get_setting(\"vk_post_success_count\", 0, $schedule->uid) + 1, $schedule->uid);\n\t\t\t\t\tupdate_setting(\"vk_post_count\", get_setting(\"vk_post_count\", 0, $schedule->uid) + 1, $schedule->uid);\n\t\t\t\t\tupdate_setting(\"vk_post_photo_count\", get_setting(\"vk_post_photo_count\", 0, $schedule->uid) + 1, $schedule->uid);\n\n\t\t\t\t\t$data['status'] = 2;\n\t\t\t\t\t$data['result'] = json_encode(array(\"message\" => \"successfully\", \"id\" => $result));\n\t\t\t\t\t$this->db->update($this->tb_posts, $data, \"id = '{$schedule->id}'\");\n\n\t\t\t\t\techo '<a target=\\'_blank\\' href=\\'https://vk.com/'.$result.'\\'>'.lang('post_successfully').'</a><br/>';\n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "b336b99ec0691ae2c5080ba5de63f29a", "score": "0.45016783", "text": "public function test_postDraft() {\n\n }", "title": "" }, { "docid": "d0d6e682c63f876ceb95bd9d6fc1e661", "score": "0.4493005", "text": "function mc_check_data( $action, $post, $i ) {\n\tglobal $wpdb, $submission;\n\t$user = wp_get_current_user();\n\t$post = apply_filters( 'mc_pre_checkdata', $post, $action, $i );\n\t$submit = array();\n\t$errors = '';\n\t$approved = 0;\n\t$every = '';\n\t$recur = '';\n\t$events_access = '';\n\t$begin = '';\n\t$end = '';\n\t$short = '';\n\t$time = '';\n\t$endtime = '';\n\t$event_label = '';\n\t$event_street = '';\n\t$event_street2 = '';\n\t$event_city = '';\n\t$event_state = '';\n\t$event_postcode = '';\n\t$event_region = '';\n\t$event_country = '';\n\t$event_url = '';\n\t$event_image = '';\n\t$event_phone = '';\n\t$event_phone2 = '';\n\t$event_access = '';\n\t$event_tickets = '';\n\t$event_registration = '';\n\t$event_author = '';\n\t$category = '';\n\t$expires = '';\n\t$event_zoom = '';\n\t$host = '';\n\t$event_fifth_week = '';\n\t$event_holiday = '';\n\t$event_group_id = '';\n\t$event_span = '';\n\t$event_hide_end = '';\n\t$event_longitude = '';\n\t$event_latitude = '';\n\n\tif ( get_magic_quotes_gpc() ) {\n\t\t$post = array_map( 'stripslashes_deep', $post );\n\t}\n\tif ( ! wp_verify_nonce( $post['event_nonce_name'], 'event_nonce' ) ) {\n\t\treturn array();\n\t}\n\n\tif ( 'add' == $action || 'edit' == $action || 'copy' == $action ) {\n\t\t$title = ! empty( $post['event_title'] ) ? trim( $post['event_title'] ) : '';\n\t\t$desc = ! empty( $post['content'] ) ? trim( $post['content'] ) : '';\n\t\t$short = ! empty( $post['event_short'] ) ? trim( $post['event_short'] ) : '';\n\t\t$recur = ! empty( $post['event_recur'] ) ? trim( $post['event_recur'] ) : '';\n\t\t$every = ! empty( $post['event_every'] ) ? (int) $post['event_every'] : 1;\n\t\t// if this is an all weekdays event, and it's been scheduled to start on a weekend, the math gets nasty.\n\t\t// ...AND there's no reason to allow it, since weekday events will NEVER happen on the weekend.\n\t\t$begin = trim( $post['event_begin'][ $i ] );\n\t\t$end = ( ! empty( $post['event_end'] ) ) ? trim( $post['event_end'][ $i ] ) : $post['event_begin'][ $i ];\n\t\tif ( 'E' == $recur && 0 == ( date( 'w', mc_strtotime( $begin ) ) || 6 == date( 'w', mc_strtotime( $begin ) ) ) ) {\n\t\t\tif ( 0 == date( 'w', mc_strtotime( $begin ) ) ) {\n\t\t\t\t$newbegin = my_calendar_add_date( $begin, 1 );\n\t\t\t\tif ( ! empty( $post['event_end'][ $i ] ) ) {\n\t\t\t\t\t$newend = my_calendar_add_date( $end, 1 );\n\t\t\t\t} else {\n\t\t\t\t\t$newend = $newbegin;\n\t\t\t\t}\n\t\t\t} elseif ( 6 == date( 'w', mc_strtotime( $begin ) ) ) {\n\t\t\t\t$newbegin = my_calendar_add_date( $begin, 2 );\n\t\t\t\tif ( ! empty( $post['event_end'][ $i ] ) ) {\n\t\t\t\t\t$newend = my_calendar_add_date( $end, 2 );\n\t\t\t\t} else {\n\t\t\t\t\t$newend = $newbegin;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$begin = $newbegin;\n\t\t\t$end = $newend;\n\t\t} else {\n\t\t\t$begin = ! empty( $post['event_begin'][ $i ] ) ? trim( $post['event_begin'][ $i ] ) : '';\n\t\t\t$end = ! empty( $post['event_end'][ $i ] ) ? trim( $post['event_end'][ $i ] ) : $begin;\n\t\t}\n\n\t\t$begin = date( 'Y-m-d', mc_strtotime( $begin ) );// regardless of entry format, convert.\n\t\t$time = ! empty( $post['event_time'][ $i ] ) ? trim( $post['event_time'][ $i ] ) : '';\n\t\tif ( '' != $time ) {\n\t\t\t$default_modifier = apply_filters( 'mc_default_event_length', '1 hour' );\n\t\t\t$endtime = ! empty( $post['event_endtime'][ $i ] ) ? trim( $post['event_endtime'][ $i ] ) : date( 'H:i:s', mc_strtotime( $time . ' +' . $default_modifier ) );\n\t\t\tif ( empty( $post['event_endtime'][ $i ] ) && date( 'H', mc_strtotime( $endtime ) ) == '00' ) {\n\t\t\t\t// If one hour pushes event into next day, reset to 11:59pm.\n\t\t\t\t$endtime = '23:59:00';\n\t\t\t}\n\t\t} else {\n\t\t\t$endtime = ! empty( $post['event_endtime'][ $i ] ) ? trim( $post['event_endtime'][ $i ] ) : '';\n\t\t}\n\t\t$time = ( '' == $time || '00:00:00' == $time ) ? '00:00:00' : $time; // Set at midnight if not provided.\n\t\t$endtime = ( '' == $endtime && '00:00:00' == $time ) ? '23:59:59' : $endtime; // Set at end of night if np.\n\n\t\t// Prevent setting enddate to incorrect value on copy.\n\t\tif ( mc_strtotime( $end ) < mc_strtotime( $begin ) && 'copy' == $action ) {\n\t\t\t$end = date( 'Y-m-d', ( mc_strtotime( $begin ) + ( mc_strtotime( $post['prev_event_end'] ) - mc_strtotime( $post['prev_event_begin'] ) ) ) );\n\t\t}\n\t\tif ( isset( $post['event_allday'] ) && 0 !== (int) $post['event_allday'] ) {\n\t\t\t$time = '00:00:00';\n\t\t\t$endtime = '23:59:59';\n\t\t}\n\n\t\t// Verify formats.\n\t\t$time = date( 'H:i:s', mc_strtotime( $time ) );\n\t\t$endtime = date( 'H:i:s', mc_strtotime( $endtime ) );\n\t\t$end = date( 'Y-m-d', mc_strtotime( $end ) ); // regardless of entry format, convert.\n\t\t$repeats = ( isset( $post['event_repeats'] ) ) ? trim( $post['event_repeats'] ) : 0;\n\t\t$host = ! empty( $post['event_host'] ) ? $post['event_host'] : $user->ID;\n\t\t$primary = false;\n\n\t\tif ( isset( $post['event_category'] ) ) {\n\t\t\t$cats = $post['event_category'];\n\t\t\tif ( is_array( $cats ) ) {\n\t\t\t\t// Set first category as primary.\n\t\t\t\t$primary = ( is_numeric( $cats[0] ) ) ? $cats[0] : 1;\n\t\t\t\tforeach ( $cats as $cat ) {\n\t\t\t\t\t$private = mc_get_category_detail( $cat, 'category_private' );\n\t\t\t\t\t// If a selected category is private, set that category as primary instead.\n\t\t\t\t\tif ( 1 == $private ) {\n\t\t\t\t\t\t$primary = $cat;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Backwards compatibility for old versions of My Calendar Pro.\n\t\t\t} else {\n\t\t\t\t$primary = $cats;\n\t\t\t\t$cats = array( $cats );\n\t\t\t}\n\t\t}\n\t\t$event_author = ( isset( $post['event_author'] ) && is_numeric( $post['event_author'] ) ) ? $post['event_author'] : 0;\n\t\t$event_link = ! empty( $post['event_link'] ) ? trim( $post['event_link'] ) : '';\n\t\t$expires = ! empty( $post['event_link_expires'] ) ? $post['event_link_expires'] : '0';\n\t\t$approved = ( current_user_can( 'mc_approve_events' ) ) ? 1 : 0;\n\t\t// Check for event_approved provides support for older versions of My Calendar Pro.\n\t\tif ( isset( $post['event_approved'] ) && $post['event_approved'] != $approved ) {\n\t\t\t$approved = absint( $post['event_approved'] );\n\t\t}\n\n\t\t$location_preset = ! empty( $post['location_preset'] ) ? $post['location_preset'] : '';\n\t\t$event_tickets = ( isset( $post['event_tickets'] ) ) ? trim( $post['event_tickets'] ) : '';\n\t\t$event_registration = ( isset( $post['event_registration'] ) ) ? trim( $post['event_registration'] ) : '';\n\t\t$event_image = ( isset( $post['event_image'] ) ) ? esc_url_raw( $post['event_image'] ) : '';\n\t\t$event_fifth_week = ! empty( $post['event_fifth_week'] ) ? 1 : 0;\n\t\t$event_holiday = ! empty( $post['event_holiday'] ) ? 1 : 0;\n\t\t$group_id = (int) $post['event_group_id'];\n\t\t$event_group_id = ( ( is_array( $post['event_begin'] ) && count( $post['event_begin'] ) > 1 ) || mc_event_is_grouped( $group_id ) ) ? $group_id : 0;\n\t\t$event_span = ( ! empty( $post['event_span'] ) && 0 != $event_group_id ) ? 1 : 0;\n\t\t$event_hide_end = ( ! empty( $post['event_hide_end'] ) ) ? (int) $post['event_hide_end'] : 0;\n\t\t$event_hide_end = ( '' == $time || '23:59:59' == $time ) ? 1 : $event_hide_end; // Hide end time on all day events.\n\t\t// Set location.\n\t\tif ( 'none' != $location_preset && is_numeric( $location_preset ) ) {\n\t\t\t$location = $wpdb->get_row( $wpdb->prepare( 'SELECT * FROM ' . my_calendar_locations_table() . ' WHERE location_id = %d', $location_preset ) ); // phpcs:ignore WordPress.DB.PreparedSQL.NotPrepared\n\t\t\t$event_label = $location->location_label;\n\t\t\t$event_street = $location->location_street;\n\t\t\t$event_street2 = $location->location_street2;\n\t\t\t$event_city = $location->location_city;\n\t\t\t$event_state = $location->location_state;\n\t\t\t$event_postcode = $location->location_postcode;\n\t\t\t$event_region = $location->location_region;\n\t\t\t$event_country = $location->location_country;\n\t\t\t$event_url = $location->location_url;\n\t\t\t$event_longitude = $location->location_longitude;\n\t\t\t$event_latitude = $location->location_latitude;\n\t\t\t$event_zoom = $location->location_zoom;\n\t\t\t$event_phone = $location->location_phone;\n\t\t\t$event_phone2 = $location->location_phone2;\n\t\t\t$event_access = $location->location_access;\n\t\t} else {\n\t\t\t$event_label = ! empty( $post['event_label'] ) ? $post['event_label'] : '';\n\t\t\t$event_street = ! empty( $post['event_street'] ) ? $post['event_street'] : '';\n\t\t\t$event_street2 = ! empty( $post['event_street2'] ) ? $post['event_street2'] : '';\n\t\t\t$event_city = ! empty( $post['event_city'] ) ? $post['event_city'] : '';\n\t\t\t$event_state = ! empty( $post['event_state'] ) ? $post['event_state'] : '';\n\t\t\t$event_postcode = ! empty( $post['event_postcode'] ) ? $post['event_postcode'] : '';\n\t\t\t$event_region = ! empty( $post['event_region'] ) ? $post['event_region'] : '';\n\t\t\t$event_country = ! empty( $post['event_country'] ) ? $post['event_country'] : '';\n\t\t\t$event_url = ! empty( $post['event_url'] ) ? $post['event_url'] : '';\n\t\t\t$event_longitude = ! empty( $post['event_longitude'] ) ? $post['event_longitude'] : '';\n\t\t\t$event_latitude = ! empty( $post['event_latitude'] ) ? $post['event_latitude'] : '';\n\t\t\t$event_zoom = ! empty( $post['event_zoom'] ) ? $post['event_zoom'] : '';\n\t\t\t$event_phone = ! empty( $post['event_phone'] ) ? $post['event_phone'] : '';\n\t\t\t$event_phone2 = ! empty( $post['event_phone2'] ) ? $post['event_phone2'] : '';\n\t\t\t$event_access = ! empty( $post['event_access'] ) ? $post['event_access'] : '';\n\t\t\t$event_access = ! empty( $post['event_access_hidden'] ) ? unserialize( $post['event_access_hidden'] ) : $event_access;\n\t\t\tif ( isset( $post['mc_copy_location'] ) && 'on' == $post['mc_copy_location'] && 0 == $i ) {\n\t\t\t\t// Only the first event, if adding multiples.\n\t\t\t\t$add_loc = array(\n\t\t\t\t\t'location_label' => $event_label,\n\t\t\t\t\t'location_street' => $event_street,\n\t\t\t\t\t'location_street2' => $event_street2,\n\t\t\t\t\t'location_city' => $event_city,\n\t\t\t\t\t'location_state' => $event_state,\n\t\t\t\t\t'location_postcode' => $event_postcode,\n\t\t\t\t\t'location_region' => $event_region,\n\t\t\t\t\t'location_country' => $event_country,\n\t\t\t\t\t'location_url' => $event_url,\n\t\t\t\t\t'location_longitude' => $event_longitude,\n\t\t\t\t\t'location_latitude' => $event_latitude,\n\t\t\t\t\t'location_zoom' => $event_zoom,\n\t\t\t\t\t'location_phone' => $event_phone,\n\t\t\t\t\t'location_phone2' => $event_phone2,\n\t\t\t\t\t'location_access' => ( is_array( $event_access ) ) ? serialize( $event_access ) : '',\n\t\t\t\t);\n\n\t\t\t\t$add_loc = array_map( 'mc_kses_post', $add_loc );\n\t\t\t\t$loc_formats = array( '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%f', '%f', '%d', '%s', '%s', '%s' );\n\t\t\t\t$wpdb->insert( my_calendar_locations_table(), $add_loc, $loc_formats );\n\t\t\t}\n\t\t}\n\t\t// Perform validation on the submitted dates - checks for valid years and months.\n\t\tif ( mc_checkdate( $begin ) && mc_checkdate( $end ) ) {\n\t\t\t// Make sure dates are equal or end date is later than start date.\n\t\t\tif ( mc_strtotime( \"$end $endtime\" ) < mc_strtotime( \"$begin $time\" ) ) {\n\t\t\t\t$errors .= mc_show_error( __( 'Your event end date must be either after or the same as your event begin date', 'my-calendar' ), false );\n\t\t\t}\n\t\t} else {\n\t\t\t$errors .= mc_show_error( __( 'Your date format is correct but one or more of your dates is invalid. Check for number of days in month and leap year related errors.', 'my-calendar' ), false );\n\t\t}\n\n\t\t// Check for a valid or empty time.\n\t\t$time = ( '' == $time ) ? '23:59:59' : date( 'H:i:00', mc_strtotime( $time ) );\n\t\t$time_format_one = '/^([0-1][0-9]):([0-5][0-9]):([0-5][0-9])$/';\n\t\t$time_format_two = '/^([2][0-3]):([0-5][0-9]):([0-5][0-9])$/';\n\t\tif ( preg_match( $time_format_one, $time ) || preg_match( $time_format_two, $time ) ) {\n\t\t} else {\n\t\t\t$errors .= mc_show_error( __( 'The time field must either be blank or be entered in the format hh:mm am/pm', 'my-calendar' ), false );\n\t\t}\n\t\t// Check for a valid or empty end time.\n\t\tif ( preg_match( $time_format_one, $endtime ) || preg_match( $time_format_two, $endtime ) || '' == $endtime ) {\n\t\t} else {\n\t\t\t$errors .= mc_show_error( __( 'The end time field must either be blank or be entered in the format hh:mm am/pm', 'my-calendar' ), false );\n\t\t}\n\t\t// Check for valid URL (blank or starting with http://).\n\t\tif ( ! ( '' == $event_link || preg_match( '/^(http)(s?)(:)\\/\\//', $event_link ) ) ) {\n\t\t\t$event_link = 'http://' . $event_link;\n\t\t}\n\t}\n\t// A title is required, and can't be more than 255 characters.\n\t$title_length = strlen( $title );\n\tif ( ! ( $title_length >= 1 && $title_length <= 255 ) ) {\n\t\t$title = __( 'Untitled Event', 'my-calendar' );\n\t}\n\t// Run checks on recurrence profile.\n\t$valid_recur = array( 'W', 'B', 'M', 'U', 'Y', 'D', 'E' );\n\tif ( ( 0 == $repeats && 'S' == $recur ) || ( ( $repeats >= 0 ) && in_array( $recur, $valid_recur ) ) ) {\n\t\t$recur = $recur . $every;\n\t} else {\n\t\t// if it's not valid, assign a default value.\n\t\t$repeats = 0;\n\t\t$recur = 'S1';\n\t}\n\tif ( isset( $post['mcs_check_conflicts'] ) ) {\n\t\t$conflicts = mcs_check_conflicts( $begin, $time, $end, $endtime, $event_label );\n\t\t$conflicts = apply_filters( 'mcs_check_conflicts', $conflicts, $post );\n\t\tif ( $conflicts ) {\n\t\t\t$conflict_id = $conflicts[0]->occur_id;\n\t\t\t$conflict_ev = mc_get_event( $conflict_id );\n\t\t\t$conflict = mc_get_details_link( $conflict_ev );\n\t\t\t// Translators: URL to event details.\n\t\t\t$errors .= mc_show_error( sprintf( __( 'That event conflicts with a <a href=\"%s\">previously scheduled event</a>.', 'my-calendar' ), $conflict ), false );\n\t\t}\n\t}\n\t$spam_content = ( '' != $desc ) ? $desc : $short;\n\t$spam = mc_spam( $event_link, $spam_content, $post );\n\t// Likelihood that event will be flagged as spam, have a zero start time and be legit is minimal. Just kill it.\n\tif ( 1 == $spam && '1970-01-01' == $begin ) {\n\t\tdie;\n\t}\n\n\tif ( '' == $errors ) {\n\t\t$current_user = wp_get_current_user();\n\t\t$event_author = ( $event_author == $current_user->ID || current_user_can( 'mc_manage_events' ) ) ? $event_author : $current_user->ID;\n\t\t$primary = ( ! $primary ) ? 1 : $primary;\n\t\t$cats = ( isset( $cats ) && is_array( $cats ) ) ? $cats : array( 1 );\n\t\t$ok = true;\n\t\t$submit = array(\n\t\t\t// Begin strings.\n\t\t\t'event_begin' => $begin,\n\t\t\t'event_end' => $end,\n\t\t\t'event_title' => $title,\n\t\t\t'event_desc' => force_balance_tags( $desc ),\n\t\t\t'event_short' => force_balance_tags( $short ),\n\t\t\t'event_time' => $time,\n\t\t\t'event_endtime' => $endtime,\n\t\t\t'event_link' => $event_link,\n\t\t\t'event_label' => $event_label,\n\t\t\t'event_street' => $event_street,\n\t\t\t'event_street2' => $event_street2,\n\t\t\t'event_city' => $event_city,\n\t\t\t'event_state' => $event_state,\n\t\t\t'event_postcode' => $event_postcode,\n\t\t\t'event_region' => $event_region,\n\t\t\t'event_country' => $event_country,\n\t\t\t'event_url' => $event_url,\n\t\t\t'event_recur' => $recur,\n\t\t\t'event_image' => $event_image,\n\t\t\t'event_phone' => $event_phone,\n\t\t\t'event_phone2' => $event_phone2,\n\t\t\t'event_access' => ( is_array( $event_access ) ) ? serialize( $event_access ) : '',\n\t\t\t'event_tickets' => $event_tickets,\n\t\t\t'event_registration' => $event_registration,\n\t\t\t// Begin integers.\n\t\t\t'event_repeats' => $repeats,\n\t\t\t'event_author' => $event_author,\n\t\t\t'event_category' => $primary,\n\t\t\t'event_link_expires' => $expires,\n\t\t\t'event_zoom' => $event_zoom,\n\t\t\t'event_approved' => $approved,\n\t\t\t'event_host' => $host,\n\t\t\t'event_flagged' => $spam,\n\t\t\t'event_fifth_week' => $event_fifth_week,\n\t\t\t'event_holiday' => $event_holiday,\n\t\t\t'event_group_id' => $event_group_id,\n\t\t\t'event_span' => $event_span,\n\t\t\t'event_hide_end' => $event_hide_end,\n\t\t\t// Begin floats.\n\t\t\t'event_longitude' => $event_longitude,\n\t\t\t'event_latitude' => $event_latitude,\n\t\t\t// Array: removed before DB insertion.\n\t\t\t'event_categories' => $cats,\n\t\t);\n\n\t\t$submit = array_map( 'mc_kses_post', $submit );\n\t} else {\n\t\t$ok = false;\n\t\t$event_access = ( is_array( $event_access ) ) ? serialize( $event_access ) : '';\n\t\t// The form is going to be rejected due to field validation issues, so we preserve the users entries here.\n\t\t// All submitted data should be in this object, regardless of data destination.\n\t\t$submission = ( ! is_object( $submission ) ) ? new stdClass() : $submission;\n\t\t$submission->event_id = ( isset( $_GET['event_id'] ) && is_numeric( $_GET['event_id'] ) ) ? $_GET['event_id'] : false;\n\t\t$submission->event_title = $title;\n\t\t$submission->event_desc = $desc;\n\t\t$submission->event_begin = $begin;\n\t\t$submission->event_end = $end;\n\t\t$submission->event_time = $time;\n\t\t$submission->event_endtime = $endtime;\n\t\t$submission->event_recur = $recur;\n\t\t$submission->event_repeats = $repeats;\n\t\t$submission->event_host = $host;\n\t\t$submission->event_category = $primary;\n\t\t$submission->event_link = $event_link;\n\t\t$submission->event_link_expires = $expires;\n\t\t$submission->event_label = $event_label;\n\t\t$submission->event_street = $event_street;\n\t\t$submission->event_street2 = $event_street2;\n\t\t$submission->event_city = $event_city;\n\t\t$submission->event_state = $event_state;\n\t\t$submission->event_postcode = $event_postcode;\n\t\t$submission->event_country = $event_country;\n\t\t$submission->event_region = $event_region;\n\t\t$submission->event_url = $event_url;\n\t\t$submission->event_longitude = $event_longitude;\n\t\t$submission->event_latitude = $event_latitude;\n\t\t$submission->event_zoom = $event_zoom;\n\t\t$submission->event_phone = $event_phone;\n\t\t$submission->event_phone2 = $event_phone2;\n\t\t$submission->event_author = $event_author;\n\t\t$submission->event_short = $short;\n\t\t$submission->event_approved = $approved;\n\t\t$submission->event_image = $event_image;\n\t\t$submission->event_fifth_week = $event_fifth_week;\n\t\t$submission->event_holiday = $event_holiday;\n\t\t$submission->event_flagged = 0;\n\t\t$submission->event_group_id = $event_group_id;\n\t\t$submission->event_span = $event_span;\n\t\t$submission->event_hide_end = $event_hide_end;\n\t\t$submission->event_access = $event_access;\n\t\t$submission->events_access = serialize( $events_access );\n\t\t$submission->event_tickets = $event_tickets;\n\t\t$submission->event_registration = $event_registration;\n\t\t$submission->event_categories = $cats;\n\t\t$submission->user_error = true;\n\t}\n\n\t$data = array( $ok, $submission, $submit, $errors );\n\n\treturn $data;\n}", "title": "" }, { "docid": "8bad6f22ee78dfe5b31319a57a8ec095", "score": "0.44911352", "text": "public function transaction_process()\n {\n $data = array_merge($_GET, $_POST);\n $trans_id = $data['Reference'];\n $reason = $data['Reason'];\n $success = ($data['TransactionAccepted'] === 'true');\n $transaction = geoTransaction::getTransaction($trans_id);\n if ($transaction->getID() == 0) {\n //failed to reacquire transaction\n trigger_error('DEBUG TRANSACTION: failed to reacquire transaction #' . $trans_id);\n self::_failure($transaction, 2, \"No response from server\");\n return;\n }\n\n if ($success) {\n //payment successful -- do common success stuff\n $order = $transaction->getInvoice()->getOrder();\n self::_success($order, $transaction, $this);\n } else {\n self::_failure($transaction, $reason, \"Denied by Netcash with reason: \" . $reason);\n }\n }", "title": "" }, { "docid": "70428361ae1a14c18a3ba094d11ec33f", "score": "0.44883892", "text": "function requestCheckin($barcode){\n\t\tglobal $data_validation, $db;\n\n\t\t// capture barcode\n\t\t$sql['id'] = $data_validation->escape_sql($barcode);\n\n\t\t// Check to see if student exists in the database\n\t\t$db->query('SELECT * FROM student WHERE id = ' . $sql['id'], 'checkForStudent');\n\t\tif($db->num_rows('checkForStudent')){\n\n\t\t\t//Check to see if this is a checkout request\n\t\t\t$sql['currDate'] = date('Y-m-d');\n\t\t\t$sql['currTime'] = date('G:i:s');\n\t\t\t\n\t\t\t$db->query('SELECT id FROM `log` WHERE studentId = \\''.$sql['id'].'\\' AND date = \\''.$sql['currDate'].'\\' AND timeOut IS NULL', 'checkoutValidation');\n\t\t\tif($db->num_rows('checkoutValidation')){\n\n\t\t\t\t//Process checkout request\n\t\t\t\t$sql['logId'] = $data_validation->escape_sql($db->result('checkoutValidation', 0, 'id'));\n\t\t\t\t$db->query('UPDATE `log` SET timeOut = \\''.$sql['currTime'].'\\' WHERE id = \\''.$sql['logId'].'\\'', 'updateCheckout');\n\t\t\t\t\t\n\t\t\t\t\t//Send email to current instructor\n\n\t\t\t\t//build period field for database call\n\t\t\t\t$blockId = '';\n\t\t\t\t$currTime = strtotime(date('G:i:s'));\n\t\t\t\t$endTime = strtotime($_SESSION['SCHEDULE']['ENDTIME']);\n\t\t\t\t\n\t\t\t\t//select current block\t\t\t\n\t\t\t\tforeach($_SESSION['SCHEDULE']['BLOCK'] as $key => $value){\n\t\t\t\t\t$startTime = strtotime($value);\n\t\t\t\t\tif($currTime >= $startTime && $currTime <= $endTime){\n\t\t\t\t\t\t$blockId = $key;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($blockId != ''){\n\t\t\t\t\t$sql['block'] = 'P'.$blockId;\n\t\t\t\t}else{\n\t\t\t\t\t$sql['block'] = '';\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Query teacher name\n\t\t\t\tif(!$db->query('SELECT `'.$sql['block'].'` FROM student WHERE id = '.$sql['id'], 'teacherEmailAddress')){\n\t\t\t\t\t$template->errorPage('Unable to find email address of current teacher. SELECT '.$sql['block'].' FROM student WHERE id = '.$sql['studentId']);\n\t\t\t\t\texit();\n\t\t\t\t}else{\n\t\t\t\t\t$sql['teacherName'] = $data_validation->escape_sql($db->result('teacherEmailAddress', 0, $sql['block']));\n\t\t\t\t\t//query for alternate email address\n\t\t\t\t\t$db->query('SELECT emailAddress FROM alternate_email_address WHERE name = \\''.$sql['teacherName'].'\\'', 'alternateEmail');\n\t\t\t\t\tif($db->num_rows('alternameEmail')){\n\t\t\t\t\t\t$html['to'] = $data_validation->escape_html($db->result('alternateEmail', 0, 'emailAddress'));\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$tmpArray = explode(',', $sql['teacherName']);\n\t\t\t\t\t\t$lastname = trim($tmpArray[0]);\n\t\t\t\t\t\t$firstname = substr(trim($tmpArray[1]), 0, 2);\n\t\t\t\t\t\t$html['to'] = strtolower($lastname.$firstname.'@tfsd.org');\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//initialize content\n\t\t\t\t\t\n\t\t\t\t\t$html['subject'] = 'Library Alert';\n\t\t\t\t\t$html['message'] = $data_validation->escape_html($sql['firstName']).' '.$data_validation->escape_html($sql['lastName']).' checked into the library at '.$data_validation->escape_html($sql['timeIn']).' on '.$data_validation->escape_html($sql['date']);\n\t\t\t\t\t$html['headers'] = 'From: '.$system['ADMIN_EMAIL']. \"\\r\\n\";\n\t\t\t\t\t\n\t\t\t\t\t//send email\n\t\t\t\t\tmail($html['to'], $html['subject'], $html['message'], $html['headers']);\n\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// redirect user to checkout page\n\t\t\t\t\theader('Location:checkedout.php');\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\theader('Location:options.php?id=' . $sql['id']);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "fe9326678e7f5055c290e3989e3ee337", "score": "0.44871598", "text": "public function secretary_post(){\n\t\t\n\t}", "title": "" }, { "docid": "6154656455f778d4c8bb9ab6d89954d5", "score": "0.44863984", "text": "public function testReleasesUpdateReleaseUploadStatus()\n {\n }", "title": "" }, { "docid": "e60bad712ba26cb4171e4b399a616a13", "score": "0.44842705", "text": "private function busRegPostedActionHandler(array $postData)\n {\n if (isset($postData['action'], $postData['table'])) {\n if ($postData['table'] !== self::TABLE_TXC_INBOX) {\n //this is a redirect to the EBSR upload page\n return $this->redirect()->toRoute('bus-registration/ebsr');\n }\n\n //this is a mark as read request\n if (isset($postData['id'])) {\n return $this->processMarkAsRead($postData);\n }\n\n $this->getServiceLocator()->get('Helper\\FlashMessenger')->addErrorMessage('select-at-least-one-row');\n }\n\n return $this->processSearch($postData);\n }", "title": "" }, { "docid": "87e7741e154c6234542e5c06e4c40fd3", "score": "0.44814843", "text": "public function submitdisputeAction() {\n $apikey = $_SESSION['SESSION']['ApiKey'];\n $this->_helper->layout->disableLayout();\n $this->_helper->viewRenderer->setNoRender(true);\n $mydata = $_POST;\n $this->mapper->submitDispute($mydata, $this->userName->userId, $apikey);\n exit;\n }", "title": "" }, { "docid": "8ee406b355a3b0f884a9d83a3f7fdea8", "score": "0.44774705", "text": "public function testRegisterPaymentAccount()\n {\n }", "title": "" }, { "docid": "fa3b99921952855a8923547fde9f3505", "score": "0.4469419", "text": "public function testAnnuleTransaction()\n {\n }", "title": "" }, { "docid": "701a865e808955bff5f832454c67fc5e", "score": "0.44694057", "text": "public function postScanlog()\n {\n\n $key = \\Input::get('key');\n\n //$user = \\Apiauth::user($key);\n\n $user = \\Device::where('key','=',$key)->first();\n\n if(!$user){\n $actor = 'no id : no name';\n \\Event::fire('log.api',array($this->controller_name, 'post' ,$actor,'device not found, upload image failed'));\n\n return \\Response::json(array('status'=>'ERR:NODEVICE', 'timestamp'=>time(), 'message'=>'Device Unregistered' ));\n }\n\n\n $json = \\Input::all();\n\n $batch = \\Input::get('batch');\n\n $result = array();\n\n foreach( $json as $j){\n\n if(isset( $j['logId'] )){\n if(isset($j['timestamp'])){\n $j['mtimestamp'] = new \\MongoDate(strtotime($j['timestamp']));\n }\n\n $log = \\Scanlog::where('logId', $j['logId'] )->first();\n\n if($log){\n $result[] = array('status'=>'OK', 'timestamp'=>time(), 'message'=>$j['logId'] );\n }else{\n \\Scanlog::insert($j);\n $result[] = array('status'=>'OK', 'timestamp'=>time(), 'message'=>$j['logId'] );\n }\n }\n }\n\n //print_r($result);\n\n //die();\n $actor = $user->identifier.' : '.$user->devname;\n\n \\Event::fire('log.api',array($this->controller_name, 'get' ,$actor,'sync scan log'));\n\n return Response::json($result);\n }", "title": "" }, { "docid": "87aa8cbbe5175e56ff828c5f69691448", "score": "0.44688934", "text": "public function testBasicTest()\n {\n\n// // hit at timestamp 1.\n// $this->hit(1);\n//\n//// hit at timestamp 2.\n// $this->hit(2);\n//\n//// hit at timestamp 3.\n// $this->hit(3);\n//\n//// get hits at timestamp 4, should return 3.\n// $a = $this->getHits(4);\n//\n//// hit at timestamp 300.\n// $this->hit(300);\n//\n//// get hits at timestamp 300, should return 4.\n// $a = $this->getHits(300);\n\n $this->tokenBucket = [\n 1 => 1,\n 2 => 1,\n 3 => 1,\n 300 => 1\n ];\n\n// get hits at timestamp 301, should return 3.\n $a = $this->getHits(301);\n dd($a);\n $this->assertTrue(true);\n\n\n }", "title": "" }, { "docid": "989eccdba7a2a3e82f6149c27566ca63", "score": "0.44680747", "text": "public function testAccountRecover()\n {\n\n }", "title": "" }, { "docid": "7346a783de63d150b9c43ee250a284b4", "score": "0.4461598", "text": "protected function register_post_count_control(){}", "title": "" }, { "docid": "a9ebd2a3dd49fd26134cea41ecd11873", "score": "0.44519442", "text": "public function testPostUsers()\n {\n }", "title": "" }, { "docid": "af58ced1469f9d4ea1349388acd781d6", "score": "0.4451337", "text": "public function testPostUserPassword()\n {\n }", "title": "" }, { "docid": "166b894da32e8d4957064ccee6ebdce9", "score": "0.44449475", "text": "public function runScanner()\n {\n $timerStart = DUP_Util::getMicrotime();\n $report = array();\n $this->ScanFile = \"{$this->NameHash}_scan.json\";\n\n $report['RPT']['ScanTime'] = \"0\";\n $report['RPT']['ScanFile'] = $this->ScanFile;\n\n //SERVER\n $srv = DUP_Server::getChecks();\n $report['SRV'] = $srv['SRV'];\n\n //FILES\n $this->Archive->getScannerData();\n $dirCount = count($this->Archive->Dirs);\n $fileCount = count($this->Archive->Files);\n $fullCount = $dirCount + $fileCount;\n\n $report['ARC']['Size'] = DUP_Util::byteSize($this->Archive->Size) or \"unknown\";\n $report['ARC']['DirCount'] = number_format($dirCount);\n $report['ARC']['FileCount'] = number_format($fileCount);\n $report['ARC']['FullCount'] = number_format($fullCount);\n\t\t$report['ARC']['FilterDirsAll'] = $this->Archive->FilterDirsAll;\n\t\t$report['ARC']['FilterFilesAll'] = $this->Archive->FilterFilesAll;\n\t\t$report['ARC']['FilterExtsAll'] = $this->Archive->FilterExtsAll;\n $report['ARC']['FilterInfo'] = $this->Archive->FilterInfo;\n $report['ARC']['RecursiveLinks'] = $this->Archive->RecursiveLinks;\n $report['ARC']['UnreadableItems'] = array_merge($this->Archive->FilterInfo->Files->Unreadable,$this->Archive->FilterInfo->Dirs->Unreadable);\n $report['ARC']['Status']['Size'] = ($this->Archive->Size > DUPLICATOR_SCAN_SIZE_DEFAULT) ? 'Warn' : 'Good';\n $report['ARC']['Status']['Names'] = (count($this->Archive->FilterInfo->Files->Warning) + count($this->Archive->FilterInfo->Dirs->Warning)) ? 'Warn' : 'Good';\n $report['ARC']['Status']['UnreadableItems'] = !empty($this->Archive->RecursiveLinks) || !empty($report['ARC']['UnreadableItems'])? 'Warn' : 'Good';\n\n //$report['ARC']['Status']['Big'] = count($this->Archive->FilterInfo->Files->Size) ? 'Warn' : 'Good';\n $report['ARC']['Dirs'] = $this->Archive->Dirs;\n $report['ARC']['Files'] = $this->Archive->Files;\n\t\t$report['ARC']['Status']['AddonSites'] = count($this->Archive->FilterInfo->Dirs->AddonSites) ? 'Warn' : 'Good';\n \n\n\n //DATABASE\n $db = $this->Database->getScannerData();\n $report['DB'] = $db;\n\n $warnings = array(\n $report['SRV']['PHP']['ALL'],\n $report['SRV']['WP']['ALL'],\n $report['ARC']['Status']['Size'],\n $report['ARC']['Status']['Names'],\n $db['Status']['DB_Size'],\n $db['Status']['DB_Rows']);\n\n //array_count_values will throw a warning message if it has null values,\n //so lets replace all nulls with empty string\n foreach ($warnings as $i => $value) {\n if (is_null($value)) {\n $warnings[$i] = '';\n }\n }\n\t\t\n $warn_counts = is_array($warnings) ? array_count_values($warnings) : 0;\n $report['RPT']['Warnings'] = is_null($warn_counts['Warn']) ? 0 : $warn_counts['Warn'];\n $report['RPT']['Success'] = is_null($warn_counts['Good']) ? 0 : $warn_counts['Good'];\n $report['RPT']['ScanTime'] = DUP_Util::elapsedTime(DUP_Util::getMicrotime(), $timerStart);\n $fp = fopen(DUPLICATOR_SSDIR_PATH_TMP.\"/{$this->ScanFile}\", 'w');\n\n\n fwrite($fp, json_encode($report));\n fclose($fp);\n\n return $report;\n }", "title": "" }, { "docid": "48121157048ba2d239b339973daf784f", "score": "0.44394702", "text": "public function testReleaseUploadsComplete()\n {\n }", "title": "" }, { "docid": "d8329bd58883e00ef1517a001c737b14", "score": "0.44314128", "text": "public function testPostAction() \n {\n $controller = new YatzyController();\n\n // Posts parameters\n $_POST['n0'] = 1;\n $_POST['n1'] = 1;\n $_POST['n2'] = 1;\n $_POST['n3'] = 1;\n $_POST['n4'] = 1;\n\n $exp = 5;\n $controller->process();\n $this->assertCount($exp, $_SESSION['yatzy_values']);\n }", "title": "" }, { "docid": "b649f7fcbb6914d384632ae9409e700c", "score": "0.4423703", "text": "public function run()\n {\n $listener = new Listener();\n $verifier = new CurlVerifier();\n $ipnMessage = Message::createFromGlobals();\n\n $verifier->setIpnMessage($ipnMessage);\n\n $verifier->setEnvironment($this->config['sandbox'] ? 'sandbox' : 'production');\n\n $listener->setVerifier($verifier);\n\n $payment = $this->payment;\n $listener->listen(\n // valid ipn\n function () use ($listener, $payment) {\n // decode the custom field and based on that we insert the payment\n $data = array();\n foreach ($listener->getVerifier()->getIpnMessage() as $k => $v) {\n $data[$k] = $v;\n }\n\n $payment->update($data);\n exit;\n }\n );\n exit;\n }", "title": "" }, { "docid": "fcdc31760867e80d3ccc8584cd8cbf6b", "score": "0.4422338", "text": "public function testCreateCampaignUsingPost()\n {\n }", "title": "" }, { "docid": "c2ba916b0865ccf7941528d97d3980c7", "score": "0.4422299", "text": "public function scanAction($qrCode) {\n\t\t$serialNumber = str_replace('http://qr.sandstorm-media.de/', '', $qrCode);\n\t\t$this->redirect('createOrUpdate', 'InventoryItem', 'Sandstorm.Inventory', array('serialNumber' => $serialNumber));\n\t}", "title": "" }, { "docid": "edcb1a1d12ef02d5bdcb2f992ce7c8f3", "score": "0.4421708", "text": "function _btcnew_check_do_import($btcnew_post, $idx) {\n\t// TODO: clean this up\n\tbtcnew_log('Scheduling', 'debug');\n\tbtcnew_log(sprintf('Post ID: %s', $btcnew_post->ID), 'debug');\n\tbtcnew_log(sprintf('Initial import date: %s', $btcnew_post->initial_import_date_gmt), 'debug');\n\tbtcnew_log(sprintf('Last import date: %s', $btcnew_post->last_import_date_gmt), 'debug');\n\tbtcnew_log(sprintf('Post date: %s', $btcnew_post->post_date_gmt), 'debug');\n\tif ($btcnew_post->initial_import_date_gmt == 0) {\n\t\treturn true;\n\t} elseif ($btcnew_post->post_date_gmt > gmdate('Y-m-d H:i:s', time()-3600)) { // first hour\n\t\tif ($idx < 10) {\n\t\t\treturn true;\n\t\t} else {\t\n\t\t\treturn ($btcnew_post->last_import_date_gmt < gmdate('Y-m-d H:i:s', time()-1800)) ? true : false; // every 30 minutes\n\t\t}\n\t} elseif ($btcnew_post->post_date_gmt > gmdate('Y-m-d H:i:s', time()-86400)) { // first 24 hours\n\t\tif ($btcnew_post->hits > $btcnew_post->misses) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tif ($idx < 20) {\n\t\t\t\treturn ($btcnew_post->last_import_date_gmt < gmdate('Y-m-d H:i:s', time()-900)) ? true : false; // every 15 minutes\n\t\t\t} else {\n\t\t\t\treturn ($btcnew_post->last_import_date_gmt < gmdate('Y-m-d H:i:s', time()-7200)) ? true : false; // every 2 hours\n\t\t\t}\n\t\t}\n\t} elseif ($btcnew_post->post_date_gmt > gmdate('Y-m-d H:i:s', time()-129600)) { // first 1.5 days\n\t\tif ($btcnew_post->hits > $btcnew_post->misses) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tif ($idx < 30) {\n\t\t\t\treturn ($btcnew_post->last_import_date_gmt < gmdate('Y-m-d H:i:s', time()-1800)) ? true : false; // every 30 minutes\n\t\t\t} else {\n\t\t\t\treturn ($btcnew_post->last_import_date_gmt < gmdate('Y-m-d H:i:s', time()-14400)) ? true : false; // every 4 hours\n\t\t\t}\n\t\t}\n\t} elseif ($btcnew_post->post_date_gmt > gmdate('Y-m-d H:i:s', time()-172800)) { // first 2 days\n\t\tif ($btcnew_post->hits > $btcnew_post->misses) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tif ($idx < 40) {\n\t\t\t\treturn ($btcnew_post->last_import_date_gmt < gmdate('Y-m-d H:i:s', time()-3600)) ? true : false; // every hour\n\t\t\t} else {\n\t\t\t\treturn ($btcnew_post->last_import_date_gmt < gmdate('Y-m-d H:i:s', time()-28800)) ? true : false; // every 8 hours\n\t\t\t}\n\t\t}\n\t} elseif ($btcnew_post->post_date_gmt > gmdate('Y-m-d H:i:s', time()-604800)) { // first week\n\t\tif ($btcnew_post->last_import_date_gmt < gmdate('Y-m-d H:i:s', time()-7200)) { // 2 hour\n\t\t\treturn true;\n\t\t} elseif ($btcnew_post->hits > $btcnew_post->misses) {\n\t\t\treturn true;\n\t\t}\n\t} elseif ($btcnew_post->post_date_gmt > gmdate('Y-m-d H:i:s', time()-1728000)) { // twenty days\n\t\tif ($btcnew_post->last_import_date_gmt < gmdate('Y-m-d H:i:s', time()-14400)) { // 4 hours\n\t\t\treturn true;\n\t\t} elseif ($btcnew_post->hits > $btcnew_post->misses) {\n\t\t\treturn true;\n\t\t}\n\t} elseif ($btcnew_post->hits > $btcnew_post->misses && $btcnew_post->post_date_gmt > gmdate('Y-m-d H:i:s', time()-5184000)) { // safety\n\t\treturn ($btcnew_post->last_import_date_gmt < gmdate('Y-m-d H:i:s', time()-1800)) ? true : false; // every 30 minutes\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "c48447e786da25e98bdd116b1f867090", "score": "0.44212073", "text": "public function testDataSourceSoapsIdReplacePost()\n {\n\n }", "title": "" }, { "docid": "7dbc9a5a696c623c1f36403283b23ff9", "score": "0.4420633", "text": "public function Scan()\n {\n if (IPS_SemaphoreEnter('BTPScan', 6000)) {\n $mac = strtoupper($this->ReadPropertyString('Mac'));\n if (preg_match('/^(?:[0-9A-F]{2}[:]?){6}$/i', $mac)) {\n $lastState = GetValueBoolean($this->GetIDForIdent('STATE'));\n if ($this->ReadPropertyBoolean('BluetoothLE')) {\n $timeout = time() + 5;\n $handle = popen(\"stdbuf -oL hcitool -i hci0 lescan\", \"r\");\n stream_set_blocking($handle, false);\n $output = '';\n $state = false;\n do {\n $output .= fread($handle, 1024);\n if (strstr($output, $mac)) {\n $state = true;\n break;\n }\n usleep(250000);\n } while (time() < $timeout);\n shell_exec(\"pkill --signal SIGINT hcitool\");\n pclose($handle);\n } else {\n $search = trim(shell_exec(\"hcitool -i hci0 name $mac\"));\n $state = ($search != '');\n if ($state) {\n SetValueString($this->GetIDForIdent('NAME'), $search);\n }\n }\n SetValueBoolean($this->GetIDForIdent('STATE'), $state);\n\n if ($lastState != $state) {\n if ($state) {\n SetValueInteger($this->GetIDForIdent('PRESENT_SINCE'), time());\n }\n if (!$state) {\n SetValueInteger($this->GetIDForIdent('ABSENT_SINCE'), time());\n }\n }\n\n IPS_SetHidden($this->GetIDForIdent('PRESENT_SINCE'), !$state);\n IPS_SetHidden($this->GetIDForIdent('ABSENT_SINCE'), $state);\n }\n IPS_SemaphoreLeave('BTPScan');\n } else {\n IPS_LogMessage('BTPDevice', 'Semaphore Timeout');\n }\n }", "title": "" }, { "docid": "b00c11ccae656cd96f0ef8dd61c2e788", "score": "0.4419319", "text": "function save($ticket) {\n global $primary_db;\n $errores = array();\n \n //Creo una prestacion (tic_ticket_prestaciones)\n $sql2 = \"insert into tic_ticket_prestaciones (tic_nro , tpr_code , tru_code , ttp_estado , ttp_prioridad , ttp_tstamp_plazo , ttp_alerta) \".\n \"values (:tic_nro:, ':tpr_code:', :tru_code:, ':ttp_estado:', ':ttp_prioridad:', ':ttp_tstamp_plazo:', ':ttp_alerta:')\";\n $params2 = array(\n 'tic_nro' => $ticket->getNro(), \n 'tpr_code' => $this->tpr_code, \n 'tru_code' => ($this->tru_code!=='' ? $this->tru_code : 'null'), \n 'ttp_prioridad' => $this->ttp_prioridad, \n 'plazo' => $this->plazo,\n 'plazo_unit' => $this->plazo_unit,\n 'ttp_alerta' => $this->ttp_alerta,\n 'ttp_estado' => $this->ttp_estado,\n 'ttp_tstamp_plazo' => $this->ttp_tstamp_plazo\n );\n $primary_db->do_execute($sql2,$errores,$params2);\n \n //Le creo un primer registro de avance\n foreach($this->avance as $av) {\n $av->save($ticket, $this->tpr_code);\n }\n \n //Salvo los organismos\n foreach($this->organismos as $org) {\n $org->save($ticket, $this->tpr_code);\n }\n \n //Salvo el cuestionario\n foreach($this->cuestionario as $preg) {\n $preg->save($ticket, $this->tpr_code);\n }\n \n //Notifica al event bus\n $eev_task = $primary_db->QueryString(\"select eev_task from tic_prestaciones where tpr_code='{$this->tpr_code}'\");\n if($eev_task!=='') {\n $ev = new eventbus_event();\n $ev->eev_task = $eev_task;\n $ev->eev_data = array(\n 'op' => 'ingreso ticket',\n 'ticket' => $ticket->getNro(),\n 'prestacion'=> $this->tpr_code\n );\n $ev->save(); \n }\n \n //Aviso interno al ingresar la prestacion\n $al_inicio = $primary_db->QueryString(\"select tpr_al_inicio from tic_prestaciones where tpr_code='{$this->tpr_code}'\");\n\n if( $al_inicio!='' ) {\n $ticket->notificarEmail('aviso_ingreso_interno', $this, $ticket->tic_nota_in, $al_inicio); \n }\n }", "title": "" }, { "docid": "d21a45135041f70cfd69d14df4645621", "score": "0.4414769", "text": "public function testScan()\n {\n $client = $this->client;\n // @begin\n\n $iterator = $client->getIterator('Scan', array(\n 'TableName' => 'errors',\n 'ScanFilter' => array(\n 'error' => array(\n 'AttributeValueList' => array(array('S' => 'overflow')),\n 'ComparisonOperator' => 'CONTAINS'\n ),\n 'time' => array(\n 'AttributeValueList' => array(\n array('N' => strtotime('-15 minutes'))\n ),\n 'ComparisonOperator' => 'GT'\n )\n )\n ));\n\n // Each item will contain the attributes we added\n foreach ($iterator as $item) {\n // Grab the time number value\n echo $item['time']['N'] . \"\\n\";\n // Grab the error string value\n echo $item['error']['S'] . \"\\n\";\n }\n\n // @end\n $this->assertNotEmpty($this->getActualOutput());\n }", "title": "" }, { "docid": "ec18c4031d89abab9ba6c5c6a04bbf40", "score": "0.44140953", "text": "public function testCreateCanBeAccessed() {\r\n\t\t$this->request->setMethod ( 'post' );\r\n\t\t\r\n\t\t$result = $this->controller->dispatch ( $this->request );\r\n\t\t$response = $this->controller->getResponse ();\r\n\t\t\r\n\t\t$this->assertEquals ( 200, $response->getStatusCode () );\r\n\t}", "title": "" }, { "docid": "bd5402631900df4b02d25939c38b24cb", "score": "0.44134316", "text": "public function testPostItemCommand()\n {\n }", "title": "" }, { "docid": "4b83dd82ac56c500a959b356ab0cb652", "score": "0.44115746", "text": "public function testCreateCampaignDataUsingPost()\n {\n }", "title": "" }, { "docid": "e1eff8c89125d7f2b593d9cf0d1f5ac8", "score": "0.44103912", "text": "public function testPostUserSettings()\n {\n }", "title": "" }, { "docid": "01d5cdf4136360cb3fc17f065c9b8405", "score": "0.4407744", "text": "public function testRegister()\n {\n }", "title": "" }, { "docid": "f33b98bea3eb057b93b56588387b5fde", "score": "0.4405195", "text": "public function run() {\n //session_start();\n ini_set('upload_tmp_dir', wcConfig::UPLOAD_TMP_DIR);\n $forcePaginate = false;\n $this->readRequest();\n $buysellaction = $this->getAction();\n \n\t\tif (!empty($buysellaction)) {\n switch($buysellaction) {\n case 'postBuyerAd':\n $this->postNewAd('B');\n $forcePaginate = true;\n break;\n case 'postSellerAd':\n $this->postNewAd('S');\n $forcePaginate = true;\n break;\n case 'deleteAd':\n $this->deleteAd();\n $forcePaginate = true;\n break;\n default:\n //$this->showIllegalRequest();\n break;\n }\n }\n $this->paginate($forcePaginate);\n }", "title": "" } ]
076799487529a287e91234aa57108f1e
Allows accessing get, post, put and delete method statically. This method offers the convenient static entry point to the class like WPRouting_Route::get('hello', $callback)>...
[ { "docid": "e09ae05a017725021b2272540495cb96", "score": "0.0", "text": "public static function __callStatic($func, $args)\n {\n\n // get defined public methods\n $publicMethods = array(\n 'get',\n 'post',\n 'put',\n 'delete',\n 'all'\n );\n\n // if not $func in defined public method throw\n if (!in_array($func, $publicMethods)) {\n throw new InvalidArgumentException(\"$func is not a defined class method\", 1);\n }\n\n // create and set an instance of the class\n $instance = new self();\n $instance->hook();\n call_user_func_array(array(\n $instance,\n \"_$func\"\n ), $args);\n return $instance;\n }", "title": "" } ]
[ { "docid": "fa848bf9fcdafde812204ec139f16048", "score": "0.6869763", "text": "static function Get(){}", "title": "" }, { "docid": "fa848bf9fcdafde812204ec139f16048", "score": "0.6869763", "text": "static function Get(){}", "title": "" }, { "docid": "fa848bf9fcdafde812204ec139f16048", "score": "0.6869763", "text": "static function Get(){}", "title": "" }, { "docid": "fa848bf9fcdafde812204ec139f16048", "score": "0.6869763", "text": "static function Get(){}", "title": "" }, { "docid": "fa848bf9fcdafde812204ec139f16048", "score": "0.6869763", "text": "static function Get(){}", "title": "" }, { "docid": "fa848bf9fcdafde812204ec139f16048", "score": "0.6869763", "text": "static function Get(){}", "title": "" }, { "docid": "83f101cc5c2b4fcdc48e571f503c13e1", "score": "0.6377207", "text": "function route() {\n global $routing_table;\n $router = FastRoute\\simpleDispatcher($routing_table);\n\n $path = uri_path($_SERVER[\"REQUEST_URI\"]);\n $query = uri_query($_SERVER[\"REQUEST_URI\"]);\n $method = $_SERVER[\"REQUEST_METHOD\"];\n $dispatchResult = $router->dispatch($method, $path);\n\n $apiResult = null;\n\n switch ($dispatchResult[0]) {\n case FastRoute\\Dispatcher::NOT_FOUND:\n $apiResult = bad_endpoint($path);\n break;\n\n case FastRoute\\Dispatcher::METHOD_NOT_ALLOWED:\n $apiResult = new ApiError(\"'$method' is not allowed on API endpoint '$path'\", 405);\n foreach ($dispatchResult[1] as $allowed_method) {\n $apiResult->addHeader(\"Allowed\", $allowed_method);\n }\n break;\n\n case FastRoute\\Dispatcher::FOUND:\n $fn = $dispatchResult[1];\n $named_args = $dispatchResult[2];\n $apiResult = $fn($path, $named_args, $query);\n break;\n }\n\n return $apiResult;\n }", "title": "" }, { "docid": "72a4e9f1c99155184248656e34216337", "score": "0.6318917", "text": "public function Route ();", "title": "" }, { "docid": "dd6a1412e8cf0a4bb3d6767097a40fe1", "score": "0.6271293", "text": "public function route();", "title": "" }, { "docid": "dd6a1412e8cf0a4bb3d6767097a40fe1", "score": "0.6271293", "text": "public function route();", "title": "" }, { "docid": "3f0285867566e8b6a631ea50207c8c63", "score": "0.62340015", "text": "public static function route() {\t\n\t\t// copy needed server variables, leave the environment alone\n\t\tself::$query_string = $_SERVER['QUERY_STRING'];\n\t\tself::$request_uri = $_SERVER['REQUEST_URI'];\n\t\tself::$request_method = $_SERVER['REQUEST_METHOD'];\n\t\tself::$script_name = $_SERVER['SCRIPT_NAME'];\n\t\t\n\t\t// remove query string components\n\t\tself::$request_uri = str_replace(self::$query_string, '', self::$request_uri);\n\t\tself::$request_uri = rtrim(self::$request_uri, '?');\n\t\t\n\t\t// strip full script name off, if needed\n\t\tself::$request_uri = str_replace(self::$script_name, '', self::$request_uri);\n\t\t\n\t\t// finally, trim all /'s\n\t\tself::$request_uri = trim(self::$request_uri, '/');\n\t\tself::$request_method = strtolower(self::$request_method);\n\t\t\n\t\tif(!$match = self::match())\n\t\t\tdie(\"Match for URL pattern not found.\");\n\t\t\n\t\t// instantiate the matched controller, call the requested method\n\t\t$object = new $match;\n\t\t$method = self::$request_method;\n\t\t\n\t\tif(!method_exists($object, $method))\n\t\t\tdie(\"Required method does not exist.\");\n\t\t\n\t\t$object->$method();\n\t}", "title": "" }, { "docid": "4b356b1d57846b6697019ec9c3d54f73", "score": "0.6114789", "text": "public static function dispatch() {\n self::getAll();\n\n // ṕega a requisição atual\n Request::uri();\n\n // pega as chaves das exp. regular\n $searches = array_keys(static::$patterns);\n // pega os valores das exp. regular\n $replaces = array_values(static::$patterns);\n\n // callback sem argumentos ou injeção de controlador e método\n // se o controlador passado existir\n if(in_array('/' . Request::getController(), self::$routes)) {\n // ṕega a sua posição\n (Integer) $route_pos = array_flip(self::$routes)['/' . Request::getController()];\n\n // se for uma posição válida\n if(isset($route_pos)) {\n // verifica se o método de requisição é válido\n if(Request::header('request-method') === self::$methods[$route_pos] || 'ANY' === self::$methods[$route_pos]) {\n // a rota informada existe!\n (Bool) $found_route = true;\n\n // se a rota possuir callback\n if(is_callable(self::$callbacks[$route_pos])) {\n // executa a callback\n call_user_func(self::$callbacks[$route_pos]);\n return;\n } else {\n // se for injeção de controlador e metodo, executa o mesmo.\n self::invokeObject(self::$callbacks[$route_pos]);\n return;\n }\n }\n }\n } else {\n // callback com passagem de argumentos\n // verifica todas as rotas\n foreach(self::$routes as $route_pos => $route) {\n // remove a '/' inicial\n $route = ltrim($route, '/');\n\n // verifica a callback tem passagem de argumentos\n if(strpos($route, ':') !== false) {\n // prepara os argumentos para exp. regular\n $route = str_replace($searches, $replaces, $route);\n }\n\n // verifica se a exp. regular é válida\n if(preg_match('#^'.$route.'$#', Request::getUri(), $matched)) {\n // verifica se o método de requisição é válido\n if(Request::header('request-method') === self::$methods[$route_pos] || 'ANY' === self::$methods[$route_pos]) {\n // a rota informada existe!\n (Bool) $found_route = true;\n\n // remove o primeiro e deixa apenas a combinação\n array_shift($matched);\n\n // se a rota possuir callback\n if(is_callable(self::$callbacks[$route_pos])) {\n // executa a callback\n call_user_func_array(self::$callbacks[$route_pos], $matched);\n return;\n } else {\n // se não, faz a injeção do controlador e método\n self::invokeObject(self::$callbacks[$route_pos], $matched);\n return;\n }\n }\n }\n }\n\n // se habilitado, sempre executará o auto dispatch.\n if(self::$autoDispatch) {\n $found_route = self::autoDispatch();\n } else {\n $found_route = false;\n }\n\n // se a rota passada não for encontrada\n if(!$found_route) {\n // responde com o erro 404.\n Response::error(404);\n }\n }\n }", "title": "" }, { "docid": "1e01b338dbe553a57cdb5e396de37f07", "score": "0.6101636", "text": "function get_handler() {\n\n\tglobal $app;\n\n\t$request = \\Slim\\Slim::getInstance()->request();\n\t$action = ltrim($request->getPathInfo(), '/');\n\t$methodAlias = $request->headers('method');\n\t$contentType = $request->headers('Content-Type');\n\t$acceptType = $request->headers('Accept');\n\t$requestBody = $_GET;\n\n\t$req = new BaseRequest($contentType);\n\t$req->setData($requestBody);\n\n\t$base = new BaseController();\n\t$resp = $base->doAction('get', $action, $methodAlias, $req);\n\n\tif('json' == $acceptType) {\n\t\t$app->contentType('application/json');\n\t\tprint $resp->asJson();\n\n\t} else if('xml' == $acceptType) {\n\t\t$app->contentType('application/xml');\n\t\tprint $resp->asXml();\n\n\t} else { //default\n\t\t$app->contentType('application/json');\n\t\tprint $resp->asJson();\n\t}\n}", "title": "" }, { "docid": "c4de829577b623f4112eb992e4d47fd6", "score": "0.60954577", "text": "public static function route() {\n require_once $_SERVER['DOCUMENT_ROOT'] . '/Controller/AdminController.php';\n $controller = new AdminController();\n\n switch ($_GET['action']) {\n\n case 'users-list':\n $controller->listUsers();\n break;\n\n case 'user-delete':\n if(isset($_GET['id']))\n $controller->deleteUser($_GET['id']);\n else\n home();\n break;\n\n case 'user-edit':\n if(isset($_GET['id']))\n $controller->editUser($_GET['id'], $_POST);\n else\n home();\n break;\n\n case 'services-list':\n $controller->listServices();\n break;\n\n case 'service-edit':\n if(isset($_GET['id']))\n $controller->editService($_GET['id'], $_POST);\n else\n home();\n break;\n\n case 'service-delete':\n if(isset($_GET['id']))\n $controller->deleteService($_GET['id']);\n else\n home();\n break;\n\n case 'roles':\n $controller->manageRoles($_POST);\n break;\n\n case 'validate':\n $serviceId = $_GET['id'] ?? null;\n $controller->serviceValidate($serviceId);\n break;\n\n default:\n home();\n }\n }", "title": "" }, { "docid": "27e63bc5232de62bbb889a5866625170", "score": "0.6092794", "text": "public static function getRoutes(){}", "title": "" }, { "docid": "8a493b0f96cdaa41003f7be9a0a399a3", "score": "0.6086944", "text": "public static function get( string $path, callable $action, array $options = [] ) { Route::create(\"GET\", $path, $action, $options); }", "title": "" }, { "docid": "2770038d8238044a63536a16259e2f1a", "score": "0.6072715", "text": "public function get($path, $callback)\n {\n $route = new Route($path, $callback); // Create new route\n $this->routes[\"GET\"][] = $route; // Add route instance in GET list\n }", "title": "" }, { "docid": "a45be3597cbbcf34eeddd7afb022e6fd", "score": "0.60523725", "text": "abstract protected function routes();", "title": "" }, { "docid": "55299cf36d2509680791719d47634068", "score": "0.602468", "text": "static function get($uri, $callback, $middleware = null) {\n\t\t$item = array(\n\t\t\t\"uri\" => $uri,\n\t\t\t\"method\" => \"GET\",\n\t\t\t\"callback\" => $callback,\n\t\t\t\"middleware\" => $middleware\n\t\t);\n\t\tself::$routes[] = $item;\n\t}", "title": "" }, { "docid": "fff3a9eb46ce4eda880a36d737150aca", "score": "0.6011437", "text": "public function get(string $uri, $callable, ?string $name = null): Route;", "title": "" }, { "docid": "696d2a8bf9b47e48598828306fe36fb0", "score": "0.59973747", "text": "public static function route_request()\n\t{\n\t\tself::_set_uri();\n\n\t\tif (is_null(self::$uri))\n\t\t{\n\t\t\tcall_user_func_array(self::$routes['/'], self::$controller_params);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ( ! self::_match_route()) \n\t\t\t\terror(404);\n\t\t\t\n\t\t\tob_start();\n\t\t\tcall_user_func_array(self::$controller_function, self::$controller_params);\n\t\t\tob_end_flush();\n\t\t}\n\t}", "title": "" }, { "docid": "fa2fc2b84eff229092544e80a84460de", "score": "0.59855616", "text": "public function get($path, $callback)\n {\n // 'get' => [\n // '/' => callback_function,\n // '/contact' => another_callback_function\n // ],\n // 'post' => [\n // '/post_here' => callback_function\n // ]\n\n /**\n * @usage\n * $app->router->get(path: '/contact', callback: function(){\n * return 'contact';\n * });\n */\n // set/add all of the get routes with given $path to our $this->_routes array\n $this->_routes['get'][$path] = $callback;\n }", "title": "" }, { "docid": "6d782f32b9e8b2e546197ef3973506a2", "score": "0.59726864", "text": "public static function getMethod(){}", "title": "" }, { "docid": "6d782f32b9e8b2e546197ef3973506a2", "score": "0.59726864", "text": "public static function getMethod(){}", "title": "" }, { "docid": "205b6f3bd82a8e8277e18fb12eedaece", "score": "0.59456784", "text": "public function processApi(){\n$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['x'])));\nif((int)method_exists($this,$func) > 0)\n$this->$func();\nelse\n$this->response('',404); // If the method not exist with in this class \"Page not found\".\n}", "title": "" }, { "docid": "134316de70a0c0716eed18a863df1159", "score": "0.59421104", "text": "public static function requiresGet()\n {\n self::requires('GET');\n }", "title": "" }, { "docid": "3598a59fa373528ac1ffcbe7c810e295", "score": "0.5919796", "text": "public function processApi(){\r\n\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['rquest'])));\r\n\t\tif((int)method_exists($this,$func) > 0)\r\n\t\t\t$this->$func();\r\n\t\telse\r\n\t\t\t$this->response('',404);\t\t\t\t// If the method not exist with in this class, response would be \"Page not found\".\r\n\t}", "title": "" }, { "docid": "1a281f9e3ae89d6f6752b7b8154decca", "score": "0.59179205", "text": "public static function dispatch()\n {\n if('GET' == $_SERVER['REQUEST_METHOD']){\n \t$request = static::$clean_request;\n \t$routes = static::$getRoutes;\n if(empty($request)) $request = 'home';\n if(array_key_exists($request, $routes))\n {\n call_user_func($routes[$request]);\n }\n }\n\n if('POST' == $_SERVER['REQUEST_METHOD']){\n $request = static::$clean_request;\n \t$routes = static::$postRoutes;\n if(empty($request)) $request = 'home';\n if(array_key_exists($request, $routes))\n {\n call_user_func($routes[$request]);\n }\n }\n }", "title": "" }, { "docid": "e44fabb1949aa01e18f69defdcfb0a5e", "score": "0.59155506", "text": "public function route()\n {\n $url = $this->parseUrl();\n\n $url = $this->direct($url);\n\n if ($this->controllerInstance == null) {\n\n $this->getInstance();\n\n $method = $this->defaultMethod;\n\n $this->controllerInstance->$method();\n }\n }", "title": "" }, { "docid": "5b512251fc19213275e3cb2d6a4494aa", "score": "0.58986753", "text": "public function mapRoute()\n {\n $this->map('/null/create', 'create')->via('GET', 'POST');\n $this->map('/:id/read', 'read')->via('GET');\n $this->map('/:id/update', 'update')->via('GET', 'POST');\n $this->map('/:id/delete', 'delete')->via('GET', 'POST');\n\n $this->map('/', 'search')->via('GET');\n $this->map('/', 'create')->via('POST');\n $this->map('/:id', 'read')->via('GET');\n $this->map('/', 'update')->via('PUT');\n $this->map('/', 'delete')->via('DELETE');\n\n }", "title": "" }, { "docid": "2314e84f1a667fc16d82296c2a997f55", "score": "0.5865496", "text": "public function processApi(){\n\t\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['rquest'])));\n\t\t\tif((int)method_exists($this,$func) > 0)\n\t\t\t\t$this->$func();\n\t\t\telse\n\t\t\t\t$this->response('',404);\t\t\t\t// If the method not exist with in this class, response would be \"Page not found\".\n\t\t}", "title": "" }, { "docid": "cf3987f538dcf1eebbf322b2b9b03f50", "score": "0.5860817", "text": "public function processApi(){\r\n\t\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['rquest'])));\r\n\t\t\tif((int)method_exists($this,$func) > 0)\r\n\t\t\t\t$this->$func();\r\n\t\t\telse\r\n\t\t\t\t$this->response('',404);\t\t\t\t// If the method not exist with in this class, response would be \"Page not found\".\r\n\t\t}", "title": "" }, { "docid": "cf3987f538dcf1eebbf322b2b9b03f50", "score": "0.5860817", "text": "public function processApi(){\r\n\t\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['rquest'])));\r\n\t\t\tif((int)method_exists($this,$func) > 0)\r\n\t\t\t\t$this->$func();\r\n\t\t\telse\r\n\t\t\t\t$this->response('',404);\t\t\t\t// If the method not exist with in this class, response would be \"Page not found\".\r\n\t\t}", "title": "" }, { "docid": "dbcd8e9c71458ed318904653c558e65b", "score": "0.58353525", "text": "function get_method() {\n\t\t\treturn \"GET\";\n\t\t}", "title": "" }, { "docid": "76d92147e2d5d02ed219291ed6844144", "score": "0.58347386", "text": "public function routes()\n {\n\n }", "title": "" }, { "docid": "e344379788ed944aa84abbebb2632205", "score": "0.58344847", "text": "public function processApi(){\n\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['x'])));\n\tif((int)method_exists($this,$func) > 0)\n\t\t$this->$func();\n\telse\n\t\t$this->response('',404); // If the method not exist with in this class \"Page not found\".\n}", "title": "" }, { "docid": "3ea7f4ba2bb7141029094e94d47d4a8c", "score": "0.58342415", "text": "public static function get(string $path, string $entryClass, string $entryFunction): void\n\t{\n\t\tself::addRoute($path, $entryClass, $entryFunction, \"GET\");\n\t}", "title": "" }, { "docid": "88f2dbcf5ddd00e841866ee013e9cd4d", "score": "0.5829071", "text": "public static function route(){\n //Hace el routing del Request capturado\n Router::route(self::$request);\n }", "title": "" }, { "docid": "722877dda19ab38a8d2378ed776287ed", "score": "0.58208495", "text": "public static function __callStatic($name, $arguments) {\n \t\n $requestType = strtoupper($name);\n \tif (!in_array($requestType, array('GET', 'POST', 'PUT', 'DELETE')))\n return false;\n \n $route = $arguments[0];\n $callback = $arguments[1];\n \n if($_SERVER['REQUEST_METHOD'] != $requestType) return false; // Ignore request if it's not the same type.\n if(!self::matchRoute($route)) return false; // Ignore request if the route doesn't match.\n return self::runCallback($route, $callback); // execute the provided callback and return it's result.\n }", "title": "" }, { "docid": "f7317f196db89d310f34ef59ad671104", "score": "0.5808759", "text": "function GetController(){}", "title": "" }, { "docid": "f7317f196db89d310f34ef59ad671104", "score": "0.5808759", "text": "function GetController(){}", "title": "" }, { "docid": "111f90e1b7b4f483c334499d0a5dfdb2", "score": "0.58070636", "text": "private function declareGetRoutes() {\n\t\t\t//\n\t\t\t$this->router->map('GET', '/dev/restore/', function () {\n\t\t\t\tResponse::result($this->routes_get->restoreSampleData());\n\t\t\t}, 'FOR DEVELOPMENT: Drops table and creates sample records.');\n\t\t\t//\n\t\t\t$this->router->map('GET', '/presentations/all/', function () {\n\t\t\t\tResponse::result($this->routes_get->getAllPresentations());\n\t\t\t}, 'Get ALL presentations in table (inc. deleted/moved).');\n\t\t\t//\n\t\t\t$this->router->map('GET', '/presentations/movable/', function () {\n\t\t\t\tResponse::result($this->routes_get->getPresentationsToBeMoved());\n\t\t\t}, 'Get all presentations scheduled for removal.');\n\t\t\t//\n\t\t\t$this->router->map('GET', '/presentations/moved/', function () {\n\t\t\t\tResponse::result($this->routes_get->getMovedPresentations());\n\t\t\t}, 'Get all presentations marked as moved.');\n\t\t\t//\n\t\t\t$this->router->map('GET', '/presentations/deletable/', function () {\n\t\t\t\tResponse::result($this->routes_get->getPresentationsToBeDeleted());\n\t\t\t}, 'Get all presentations scheduled for permanent deletion.');\n\t\t\t//\n\t\t\t$this->router->map('GET', '/presentations/deleted/', function () {\n\t\t\t\tResponse::result($this->routes_get->getDeletedPresentations());\n\t\t\t}, 'Get all presentations marked as deleted.');\n\t\t\t//\n\t\t\t$this->router->map('GET', '/presentations/undeletable/', function () {\n\t\t\t\tResponse::result($this->routes_get->getPresentationsToBeUndeleted());\n\t\t\t}, 'Get all presentations requested to be UNdeleted.');\n\t\t}", "title": "" }, { "docid": "b08a072e52d84c584f15f6d244274f43", "score": "0.58061284", "text": "public function processApi(){\n\n\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['request'])));\n\t\tif((int)method_exists($this,$func) > 0)\n\t\t\t$this->$func();\n\t\telse\n\t\t\t$this->response('Error code 404, Page not found',404); // If the method not exist with in this class, response would be \"Page not found\".\n\t}", "title": "" }, { "docid": "14beb3f817f63d22425c06711e7f95ba", "score": "0.5805417", "text": "function route()\n {\n // Add an entry for each new controller and its actions\n $controllers = array(\n 'Pages' => ['home', 'error',],\n 'User' => ['logIn', 'logOut', 'registerUser', 'dashboard', 'editBio', 'editTwitter', 'editInstagram',],\n 'Post' => ['readAll', 'read', 'create', 'delete', 'update'],\n 'Image' => ['upload', 'delete', 'gallery', 'viewAll'],\n 'Comment' => ['create', 'showAllComments', 'delete'],\n 'controllerXXX' => ['actionYYY', 'actionZZZ'],\n );\n\n if (isset($_GET['controller'], $_GET['action'])) {\n $controller = $_GET['controller'];\n $action = $_GET['action'];\n } else {\n $controller = 'Pages';\n $action = 'home';\n }\n\n // check that the requested controller and action are both allowed\n // if someone tries to access something else they will be redirected\n // to the error action of the pages controller\n if (array_key_exists($controller, $controllers) && in_array($action, $controllers[$controller], TRUE)) {\n return call($controller, $action);\n }\n return call('Pages', 'error');\n }", "title": "" }, { "docid": "0cdd563246fb96afd97c09444680b3a4", "score": "0.57974666", "text": "public function processApi() {\n \n (isset($_REQUEST['request'])) ? $request = $_REQUEST['request'] : $request = '';\n \n $func = strtolower(trim(str_replace(\"/\",\"\",$request)));\n if ( (int) method_exists($this,$func) > 0) $this->$func();\n \n // if the method doesn't exist with in this class, response would be \"Page Not Found\".\n else $this->response('Error code 404, Page not found',404);\n }", "title": "" }, { "docid": "68f960ae392fa3326e6de07c08eaeb15", "score": "0.5793182", "text": "function route()\n{\n static $routes = array();\n $nargs = func_num_args();\n if( $nargs > 0)\n {\n $args = func_get_args();\n if($nargs === 1 && is_null($args[0])) $routes = array();\n else if($nargs < 3) trigger_error(\"Missing arguments for route()\", E_USER_ERROR);\n else\n {\n $method = $args[0];\n $path_or_array = $args[1];\n $func = $args[2];\n $options = $nargs > 3 ? $args[3] : array();\n\n $routes[] = route_build($method, $path_or_array, $func, $options);\n }\n }\n return $routes;\n}", "title": "" }, { "docid": "8c89f35affc953fa6b0d468cad517258", "score": "0.578921", "text": "public function processApi() {\n $func = strtolower(trim(str_replace(\"/\", \"\", $_REQUEST['rquest'])));\n if ((int) method_exists($this, $func) > 0)\n $this->$func();\n else\n $this->response('', 404); // If the method not exist with in this class, response would be \"Page not found\".\n }", "title": "" }, { "docid": "712d94bde32aedda2b56ae813c92370a", "score": "0.5786652", "text": "public function processApi() {\n\t\t$func = strtolower(trim(str_replace(\"/\", \"\", $_REQUEST['rquest'])));\n\n\t\tif ( (int) method_exists($this, $func) > 0 ) {\n\n\t\t\t$this->$func();\n\t\t} else {\n\n\t\t\t$this->response('',404); \n\t\t}\n\n\t\t// If the method not exist with in this class, response would be \"Page not found\".\n\t}", "title": "" }, { "docid": "00a4a9804a206e807df70be90b8f1d63", "score": "0.5783771", "text": "public static function get($route, $callable, $args = [])\n {\n $r = self::instance();\n $r->addRoute('GET', $route, $callable, $args);\n }", "title": "" }, { "docid": "15370b1e2cbb2eb33f927e3ae35a6a37", "score": "0.57768935", "text": "public static function __callStatic($method, $params)\n {\n $method = strtoupper($method);\n\n if (($method != 'ANY') && ! in_array($method, static::$methods)) {\n throw new \\Exception('Invalid method');\n } else if (empty($params)) {\n throw new \\Exception('Invalid parameters');\n }\n\n // Get the Route.\n $route = array_shift($params);\n\n // Get the Callback, if any.\n $callback = ! empty($params) ? array_shift($params) : null;\n\n // Register the Route.\n static::register($method, $route, $callback);\n }", "title": "" }, { "docid": "6d1fc8cd55de60fb6f6148f1d5d60479", "score": "0.57625216", "text": "public function testRouteMethodReturnsStaticRoute()\n {\n Request::$route = 'Budi';\n\n $this->assertEquals('Budi', Request::route());\n }", "title": "" }, { "docid": "e8bfe17adcd0d5b10acfac677b1e0e05", "score": "0.57621264", "text": "private function routeHandler()\n\t{\n\t\t$this->route = $this->parse($_GET['url']);\n\t\t\n\t\tif (isset($this->route['0'])) {\n\t\t\t$this->controller = 'Phillton\\Controllers\\\\' . ucfirst($this->route['0']) . 'Controller';\n\t\t\t$this->controller = new $this->controller;\n\t\t} else {\n\t\t\tdie('Controller: ' . $this->controller . ' doesn\\'t exists');\n\t\t}\n\n\t\tif (isset($this->route['1'])) {\n\t\t\t$this->method = $this->route['1'];\n\t\t}\n\n\t\tcall_user_func([$this->controller, $this->method]);\n\t}", "title": "" }, { "docid": "5d6b531186cde94ed794b38e8207c3bf", "score": "0.5760785", "text": "function run()\n {\n \n //request resource by RESTful way.\n //$method = $this->restMethodname;\n $method = 'rest'.ucfirst(strtolower($_SERVER['REQUEST_METHOD']));\n \n if ( !method_exists($this->_controller, $method) ) {\n \n self::pageNotFound();\n \n } else {\n\n $arguments = $this->_segments;\n $this->_controller->$method($arguments, $_SERVER['PATH_INFO']);\n\n }\n \n }", "title": "" }, { "docid": "8b846cfd5a44467aa8673b2c73993123", "score": "0.57581", "text": "public function processApi() {\n\t\t$func = strtolower(trim(str_replace(\"/\", \"\", $_REQUEST['rquest'])));\n\t\tif ((int) method_exists($this, $func) > 0)\n\t\t\t$this -> $func();\n\t\telse\n\t\t\t$this -> response('', 404);\n\t\t// If the method not exist with in this class, response would be \"Page not found\".\n\t}", "title": "" }, { "docid": "00221f100aa923da54ed1a6e036dbf80", "score": "0.57564974", "text": "public function processApi(){\r\n\r\n\t\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['x'])));\r\n\t\t\tif((int)method_exists($this,$func) > 0)\r\n\t\t\t\t$this->$func();\r\n\t\t\telse\r\n\t\t\t\t$this->response('',404); // If the method not exist with in this class \"Page not found\".\r\n\t\t}", "title": "" }, { "docid": "ae4190bcdebe5ceb870e76781d9d7f29", "score": "0.5754448", "text": "public function getRouteMethod():string;", "title": "" }, { "docid": "30364e7bb2c59b744c8e4502b5e97066", "score": "0.5743478", "text": "public static function get($host, $name = NULL, $options = NULL, $callback = NULL, $route = NULL) {\n return self::route($host, $name, $options, $callback, $route)->allows('GET');\n }", "title": "" }, { "docid": "043a8873d33e13eef147e740e8a35f7d", "score": "0.57413185", "text": "public function ProcessApi() {\n \n $request_parts = explode('/', $_SERVER['REQUEST_URI']);\n \n if (isSet($request_parts[1]) && $request_parts[1] == \"api\") {\n if (isSet($request_parts[2])) {\n $func = strtolower($request_parts[2]);\n if ((int) method_exists($this, $func) > 0) {\n $this->$func($request_parts);\n } else {\n $this->response('', 404); // If the method not exist with in this class, response would be \"Page not found\".\n }\n } else {\n $this->response('', 404); // If the method not exist with in this class, response would be \"Page not found\".\n }\n $this->response('', 404); // If the method not exist with in this class, response would be \"Page not found\".\n }\n }", "title": "" }, { "docid": "027b10161c08a660823e2157e2e3f8da", "score": "0.5740809", "text": "public static function __callStatic($method, $args){}", "title": "" }, { "docid": "027b10161c08a660823e2157e2e3f8da", "score": "0.5740809", "text": "public static function __callStatic($method, $args){}", "title": "" }, { "docid": "10cfcc4cf325679facbbea3ed4f6679a", "score": "0.5738098", "text": "public function route() {\n if ($this->helper->isGet()) {\n $this->doListContent();\n } else if ($this->helper->isPost()) {\n $this->doUpload();\n } else {\n $this->helper->respondWithError(\"I don't know what you're trying to do...\",\n Helper::HTTP_STATUS_NOT_IMPLEMENTED);\n }\n }", "title": "" }, { "docid": "56877f09a148191f890e6f321f4f87f1", "score": "0.5727891", "text": "public static function dispatch()\r\n\t{\r\n\t\t$request = Router::getCleanRequest();\r\n\r\n\t\tif ('GET' == $_SERVER['REQUEST_METHOD']) {\r\n\t\t\t$routes = Router::getGetRoutes();\r\n\t\t\tif(empty($request)) $request = 'home';\r\n\t\t\t// each $key is a regular expression\r\n\t\t\t// each $func is the callbe assigned to it\r\n\t\t\t//var_dump(__FUNCTION__ . ' -> '. $request);\r\n\t\t\tforeach ($routes as $key => $func) {\r\n\t\t\t\tif(preg_match($key, $request, $matches)) {\r\n\t\t\t\t\t// remove full string match from $matches\r\n\t\t\t\t\tarray_shift($matches);\r\n\t\t\t\t\tcall_user_func_array($func, $matches);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ('POST' == $_SERVER['REQUEST_METHOD']) {\r\n\t\t\t$routes = Router::getPostRoutes();\r\n\t\t\tif(empty($request)) $request = 'home';\r\n\t\t\tforeach ($routes as $key => $func) {\r\n\t\t\t\tif(preg_match($key, $request, $matches)) {\r\n\t\t\t\t\tarray_shift($matches);\r\n\t\t\t\t\tcall_user_func_array($func, $matches);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "title": "" }, { "docid": "ae89d3d4af83ab01dbefdae7f43c6052", "score": "0.57265913", "text": "public static function getRoutes() {}", "title": "" }, { "docid": "50f47f2a9fa96660e0b55aa5363d3f71", "score": "0.5722538", "text": "public function get($path, $callback)\n {\n $name = md5(uniqid(rand(), true));\n\n return $this->map($name, $path, $callback)->addMethod('GET');\n }", "title": "" }, { "docid": "5b1c7ee6d24a248fd75c57305bcb3767", "score": "0.57123107", "text": "public function api_handler() {}", "title": "" }, { "docid": "6382f04014167ef6cee3586b0cfdeedb", "score": "0.5698104", "text": "public function route($request);", "title": "" }, { "docid": "846c08011acb2e46505b8f693137de3b", "score": "0.5697669", "text": "public function map ()\n {\n\n $this->mapApiRoutes(); /* como el metodo esta llamada en laravel de una manera automatizada , estos dos funccion se ejecutan de una manara automatizada */\n $this->mapWebRoutes();\n\n }", "title": "" }, { "docid": "3c076ec8bfce14c7b5a98581cddf99b6", "score": "0.5689169", "text": "public function dispatch(){\n $uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);\n $method = $_SERVER['REQUEST_METHOD'];\n\n $searches = array_keys($this->patterns);\n $replaces = array_values($this->patterns);\n\n $found_route = false;\n\n $this->routes = preg_replace('/\\/+/', '/', $this->routes);\n\n // Check if route is defined without regex\n if (in_array($uri, $this->routes)) {\n $route_pos = array_keys($this->routes, $uri);\n foreach ($route_pos as $route) {\n\n // Using an ANY option to match both GET and POST requests\n if ($this->methods[$route] == $method || $this->methods[$route] == 'ANY' || in_array($method, $this->maps[$route])) {\n $found_route = true;\n\n // If route is not an object\n if (!is_object($this->callbacks[$route])) {\n\n // Grab all parts based on a / separator\n $parts = explode('/',$this->callbacks[$route]);\n\n // Collect the last index of the array\n $last = end($parts);\n\n // Grab the controller name and method call\n $segments = explode('@',$last);\n $controller = Core::param('controllers').$segments[0];\n\n // Instanitate controller\n $controller = new $controller();\n\n // Call method\n $controller->{$segments[1]}();\n\n if ($this->halts) return;\n } else {\n // Call closure\n call_user_func($this->callbacks[$route]);\n\n if ($this->halts) return;\n }\n }\n }\n } else {\n // Check if defined with regex\n $pos = 0;\n foreach ($this->routes as $route) {\n if (strpos($route, ':') !== false) {\n $route = str_replace($searches, $replaces, $route);\n }\n\n if (preg_match('#^' . $route . '$#', $uri, $matched)) {\n if ($this->methods[$pos] == $method || $this->methods[$pos] == 'ANY' || (!empty($this->maps[$pos]) && in_array($method, $this->maps[$pos]))) {\n $found_route = true;\n\n // Remove $matched[0] as [1] is the first parameter.\n array_shift($matched);\n\n if (!is_object($this->callbacks[$pos])) {\n\n // Grab all parts based on a / separator\n $parts = explode('/',$this->callbacks[$pos]);\n\n // Collect the last index of the array\n $last = end($parts);\n\n // Grab the controller name and method call\n $segments = explode('@',$last);\n $controller = Core::param('controllers').$segments[0];\n\n // Instanitate controller\n $controller = new $controller();\n\n // Fix multi parameters\n if (!method_exists($controller, $segments[1])) {\n echo \"controller and action not found\";\n } else {\n call_user_func_array(array($controller, $segments[1]), $matched);\n }\n\n if ($this->halts) return;\n } else {\n call_user_func_array($this->callbacks[$pos], $matched);\n\n if ($this->halts) return;\n }\n }\n }\n $pos++;\n }\n }\n\n // Run the error callback if the route was not found\n if ($found_route == false) {\n if (!$this->error_callback) {\n $this->error_callback = function() {\n header($_SERVER['SERVER_PROTOCOL'].\" 404 Not Found\");\n echo '404';\n };\n } else {\n if (is_string($this->error_callback)) {\n $this->get($_SERVER['REQUEST_URI'], $this->error_callback);\n $this->error_callback = null;\n $this->dispatch();\n return ;\n }\n }\n call_user_func($this->error_callback);\n }\n }", "title": "" }, { "docid": "aab311cd3b9dcfdde882ddc51517fc20", "score": "0.56887263", "text": "public function Get ();", "title": "" }, { "docid": "cf9a4e563ae3315492855a4c86f765cc", "score": "0.5675096", "text": "public function initRoutes() {\n\t\t$app = $this->getInstance();\n\t\t$routes = Page::getRoutes();\n\t\tforeach ($routes as $route) {\n\t\t\t$callable = function() use ($app, $route) {\n\t\t\t\t$app->renderPage($route);\n\t\t\t};\n\t\t\tswitch ($route->request_method) {\n\t\t\t\tcase Request::METHOD_POST:\n\t\t\t\t\t$this->post($route->path, $callable);\n\t\t\t\t\tbreak;\n\t\t\t\tcase Request::METHOD_DELETE:\n\t\t\t\t\t$this->delete($route->path, $callable);\n\t\t\t\t\tbreak;\n\t\t\t\tcase Request::METHOD_PUT:\n\t\t\t\t\t$this->put($route->path, $callable);\n\t\t\t\t\tbreak;\n\t\t\t\tcase Request::METHOD_OPTIONS:\n\t\t\t\t\t$this->options($route->path, $callable);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\tcase Request::METHOD_HEAD:\n\t\t\t\tcase Request::METHOD_GET:\n\t\t\t\t\t$this->get($route->path, $callable);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e1cab9071505df7bd2bb66122689e9a7", "score": "0.5673601", "text": "public function method(): string\n {\n return 'GET';\n }", "title": "" }, { "docid": "2695751ba25d269a7f2a281a97155a7c", "score": "0.5664586", "text": "public static function route()\n\t{\n\t\t// Set path to routes file\n\t\tself::$routes_path = BASE_PATH . '/Config/routes.php';\n\n\t\t// Collect all routes\n\t\tself::collectRoutes();\n\t\t\n\t\t// Where do we wanna go?\n\t\t// We might wanna split it with ? as well\n\t\t$route = $_SERVER['REQUEST_URI'];\n\t\t$method = $_SERVER['REQUEST_METHOD'];\n\n\t\t// Check that route exists\n\t\tif (!($found = self::checkRoute($route, $method))) {\n\t\t\tthrow new Exception('Error: route ' . $route . ' not found');\n\t\t\tdie();\n\t\t}\n\n\t\t$controller = $found['controller'];\n\t\t$call = $found['call'];\n\t\t$values = (isset($found['values']) ? $found['values'] : []);\n\n\t\tif ($method === 'POST' || $method === 'GET') {\n\t\t\tRequest::collect();\n\t\t}\n\t\t\n\t\tself::$current_route = $route;\n\t\tif (isset($found['alias']))\n\t\t\tself::$current_alias = $found['alias'];\n\n\t\treturn call_user_func_array(['App\\\\Controllers\\\\' . $controller, $call], $values);\n\t}", "title": "" }, { "docid": "5d3c5321370344921569cf60733c9ed7", "score": "0.5663817", "text": "#[Route(methods: ['GET'], name: 'custom_external_route', path: '/common/custom/object')]\n public function __invoke(): CustomObject\n {\n return new CustomObject(1, 'Lorem ipsum dolor sit amet');\n }", "title": "" }, { "docid": "f8c19b01a73593447ad54f96ffc27834", "score": "0.5660098", "text": "function _http_action () {\r\n // to use the method functions instead\r\n\r\n $this->glob->log->add ( 'xs_Action : ACTION : Start' ) ;\r\n\r\n // echo \"(\".$this->_meta->class.\") \" ;\r\n\r\n // Get the HTTP method\r\n $m = $this->glob->request->method() ;\r\n\r\n // Create an indexed array of all this class' methods\r\n $mm = array_keyify ( $this->_meta->methods ) ;\r\n\r\n // If any of the match the HTTP method, just call it, so for example\r\n // if the HTTP method is 'DELETE', and it exists, we call $this->DELETE()\r\n\r\n if ( isset ( $mm[$m] ) )\r\n $this->$m() ;\r\n \r\n $this->glob->log->add ( 'xs_Action : ACTION : End' ) ;\r\n }", "title": "" }, { "docid": "40d6262e114660f695d427e682de8f27", "score": "0.56577367", "text": "public function testGettingSpecificMethodRoutes()\n {\n $path = '/foo';\n $getRoute = new ParsedRoute(new Route(RequestMethods::GET, $path, MockController::class . '@noParameters'));\n $this->collection->add($getRoute);\n $getRoutes = $this->collection->get(RequestMethods::GET);\n $this->assertSame([$getRoute], $getRoutes);\n }", "title": "" }, { "docid": "979681e6ccd6765c61d91504adaf1150", "score": "0.5653591", "text": "public function processApi()\n {\n $func = strtolower(trim(str_replace(\"/\", \"\", $_REQUEST['x'])));\n if ((int) method_exists($this, $func) > 0)\n $this->$func();\n else\n $this->response('', 404); // If the method not exist with in this class \"Page not found\".\n }", "title": "" }, { "docid": "0dfc954e8ea5b482eba546a95b6b72c6", "score": "0.5637635", "text": "public function route(Request &$request): false|string|callable|array;", "title": "" }, { "docid": "7d17ce862c316f983c8b20cc023c9b98", "score": "0.56169224", "text": "function getRoute();", "title": "" }, { "docid": "d532bcb9824b2dc68b9dd0abfe16457e", "score": "0.56113917", "text": "public static function __callStatic($method, $args)\n {\n return static::$app->get($method, ...$args);\n }", "title": "" }, { "docid": "55a5599fc903dc4a5479f19ae9d56236", "score": "0.561026", "text": "public static function __callStatic($method, $parameters){}", "title": "" }, { "docid": "3fb9de7c7c3aa49a9a802c9ca812a820", "score": "0.5604761", "text": "public function testAllowedMethodsToGetRoutes()\n {\n $I = $this->tester;\n\n // Bad methods\n foreach(['POST', 'PATCH', 'PUT', 'DELETE'] as $method) {\n $I->{'send' . $method}('/routes', []);\n $I->seeResponseIsJson();\n $I->seeResponseContainsJson([\n 'previous' => ['name' => 'Invalid Route'],\n ]);\n }\n\n // Success method\n $I->sendGET('/routes', []);\n $I->seeResponseIsJson();\n $I->dontSeeResponseContainsJson([\n 'previous' => ['name' => 'Invalid Route'],\n ]);\n }", "title": "" }, { "docid": "668f938e51240f801a60adbc441d9048", "score": "0.5593332", "text": "private function routes() {\n $routes = new RouteCollection();\n $routes->add('test_get', new Route('/some/path/{variable}')); // if no method is set, it will default to GET\n $routes->add('test_post', (new Route('{key1}/path/{key2}'))->setMethods('POST'));\n $routes->add('find', (new Route('/path/{id}'))->setMethods('GET'));\n return $routes;\n }", "title": "" }, { "docid": "3cee4338e1b73a955c229aca77c6f454", "score": "0.5592207", "text": "function route();", "title": "" }, { "docid": "9db9c4bbd9a5e931b67169c508cc4f9c", "score": "0.559173", "text": "public function route()\r\n {\r\n // get controller and action from request uri\r\n $parts = $this->parseRequest();\r\n $controller = array_shift($parts);\r\n $action = array_shift($parts);\r\n $controller = mb_convert_case($controller, MB_CASE_TITLE);\r\n // all other parts - params for action\r\n $params = $parts;\r\n $method = static::getHttpMethod();\r\n $this->executeAction($controller, $action, $params, $method);\r\n }", "title": "" }, { "docid": "3b6c0cb8d2c874b6972e465e46c68cf3", "score": "0.558988", "text": "private function run() {\n\n\t\t$passedUrl = parse_url($_SERVER['REQUEST_URI']);\n\t\t$methodType = $_SERVER['REQUEST_METHOD'];\n\t\t$this->serverUri = $passedUrl['path'];\n\n\t\tif (array_key_exists('query', $passedUrl)) {\n\t\t\tparse_str($passedUrl['query'], $this->queryVar);\n\t\t}\n\n\t\tforeach ($this->routes as $path => $callback) {\n\t\t\tif ($this->serverUri === $path) {\n\t\t\t\t/**\n\t\t\t\t * checking the number of param callback function can receive\n\t\t\t\t */\n\t\t\t\t$reflection = new \\ReflectionFunction($callback);\n\t\t\t\t$numParams = $reflection->getNumberOfParameters();\n\n\t\t\t\t/**\n\t\t\t\t * checking if the number of param callback function can receive \n\t\t\t\t * against the query var provided in URL \n\t\t\t\t * It is to prevent malicious intention \n\t\t\t\t */\n\n\n\t\t\t\tif ($methodType == 'GET' && $this->queryVar != null && $numParams === count($this->queryVar)) {\n\t\t\t\t\t/**\n\t\t\t\t\t * sending query var to the callable function \n\t\t\t\t\t */\n\t\t\t\t\t$callback(...$this->queryVar);\n\t\t\t\t} elseif ($methodType == 'POST' && $numParams > 0) {\n\t\t\t\t\t/**\n\t\t\t\t\t * sending post value(s) to the callable function\n\t\t\t\t\t */\n\t\t\t\t\t$callback($_POST);\n\t\t\t\t} else {\n\t\t\t\t\t/**\n\t\t\t\t\t * calling the callback function \n\t\t\t\t\t */\n\t\t\t\t\t$callback();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "0225026814ccd4a88457a3ae24eba96e", "score": "0.5586895", "text": "public function processApi(){\n\t\t\t$func = strtolower(trim(str_replace(\"/\",\"\",$_REQUEST['x'])));\n\t\t\tif((int)method_exists($this,$func) > 0)\n\t\t\t\techo $this->$func();\n\t\t\telse\n\t\t\t\t$this->response('',404); // If the method not exist with in this class \"Page not found\".\n\t\t}", "title": "" }, { "docid": "f013ac09b93bcff1000a4054c5bf0f0d", "score": "0.55865973", "text": "public function index_get() {\n $action = $this->get('action');\n switch ($action) {\n case \"retrieve_get\":\n $this->retrieve_get();\n break;\n default:\n $this->not_found();\n break;\n }\n }", "title": "" }, { "docid": "9de455d452920ad6f44480f81ea2e53d", "score": "0.5586173", "text": "function run()\n {\n // Gets the verb\n $verb = Str::toLower(Input::getMethod());\n\n // Verify is REST API allowed\n if (!in_array($verb, $this->allowedVerbs)) {\n // return unauthorized\n return $this->unauthorized();\n } // end if not in array\n\n // Get the current uri\n $uri = Str::replace(BASE_URL.\"/\".$this->endPoint, \"\", Uri::currentUrl());\n // Filter the routes by verb\n $routes = array_map(\n function ($route) use ($verb, $uri) {\n $matches = $route->matchUri($uri, $route->uri);\n return (($route->method == $verb) && $matches) ? array($route, $matches) : null;\n }, // end anonymous array filter function\n $this->routes\n ); // end array filter\n $routes = array_filter($routes);\n\n // If no routes: unauthorized\n if (!count($routes)) {\n return $this->notFound($uri);\n } // end if no routes\n\n // Take the first one\n $route = array_shift($routes);\n\n // Perform the route\n $matches = $route[1];\n $route = $route[0];\n\n try {\n if ($route->method != 'options' && $this->auth) {\n call_user_func($this->auth);\n } // end if this auth\n\n if (is_array($matches)) {\n call_user_func_array($route->newUri, $matches);\n } else {\n call_user_func($route->newUri);\n } // end if array\n } catch (UnauthorizedException $ex) {\n $this->unauthorized();\n return;\n } catch (NoContentException $ex) {\n $this->noContent();\n return;\n } catch (Exception $ex) {\n Logger::error($ex->getMessage());\n $this->error($ex->getMessage());\n return;\n } // end try catch\n }", "title": "" }, { "docid": "2f4915957c98e81e86a04cb545541af6", "score": "0.55859226", "text": "public function get($path, $callable){\n\t\treturn $this->add($path, $callable, \"GET\");\n\t}", "title": "" }, { "docid": "ebfdb57163d8b2d0ced3eb5f65dc1a04", "score": "0.5585552", "text": "public static function dispatch() {\n\t\t// Find the requested host.\n\t\t$host = isset( $_SERVER['HTTP_HOST'] ) ? $_SERVER['HTTP_HOST'] : \"\";\n\t\t// Find the request method.\n\t\t$method = isset( $_SERVER['REQUEST_METHOD'] ) && $_SERVER['REQUEST_METHOD'] == (\"GET\" || \"POST\") ? $_SERVER['REQUEST_METHOD'] : \"GET\";\n\t\t// Find the path provided by mod_rewrite in .htaccess file.\n\t\t$path = isset( $_GET['path'] ) ? $_GET['path'] : \"\";\n\t\t// Prepare array for path parameters later.\n\t\t$path_params = [];\n\n\t\t// Find all registered routes.\n\t\t$routes = Route::find();\n\n\t\t// Prepare array for requested route later.\n\t\t$req_route = [];\n\n\t\t// Loop through all registered routes.\n\t\tforeach( $routes as $route ) {\n\t\t\t// Check if route requires parameters\n\t\t\tif( is_array( $route ) && array_key_exists( \"path_parts\", $route ) && array_key_exists( \"path_params\", $route ) ) {\n\t\t\t\t// Find the path parameters for this route.\n\t\t\t\t$reg_path_params = $route['path_params'];\n\t\t\t\t// Find the path parts for this route.\n\t\t\t\t$reg_path_parts = $route['path_parts'];\n\t\t\t\t// Split the requested path into segments based on forward-slashes.\n\t\t\t\t$req_path_parts = explode(\"/\", $path);\n\t\t\t\t// Prepare array for requested path parameters later.\n\t\t\t\t$req_path_params = [];\n\t\t\t\t// Keep track of path parameters matched.\n\t\t\t\t$req_path_param = 0;\n\n\t\t\t\t// Do we have the same number of registered path parts compared to requested path parts?\n\t\t\t\tif( count( $reg_path_parts ) == count( $req_path_parts ) ) {\n\t\t\t\t\t// For each registered path part\n\t\t\t\t\tfor( $rpp = 0; $rpp < count( $reg_path_parts ); $rpp++ ) {\n\t\t\t\t\t\t// Find placeholders\n\t\t\t\t\t\tpreg_match( '/(\\{[a-zA-Z]*\\})/', $reg_path_parts[$rpp], $matches );\n\t\t\t\t\t\t// Are there any placeholders?\n\t\t\t\t\t\tif( count( $matches ) > 0 ) {\n\t\t\t\t\t\t\t// For each placeholder\n\t\t\t\t\t\t\tfor( $m = 1; $m < count( $matches ); $m++ ) {\n\t\t\t\t\t\t\t\t// Replace the placeholder with parameter provided in the requested path.\n\t\t\t\t\t\t\t\t$req_path_params[] = $req_path_parts[ $rpp ];\n\t\t\t\t\t\t\t\t$req_path_parts[$rpp] = preg_replace('/(\\{[a-zA-Z]*\\})/', $req_path_parts[$rpp], $reg_path_parts[$rpp]);\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// Prepare to store updated requested path.\n\t\t\t\t\t$req_path = \"\";\n\t\t\t\t\t// for all the requested path parts\n\t\t\t\t\tfor( $req_path_part = 0; $req_path_part < count( $req_path_parts ); $req_path_part++ ) {\n\t\t\t\t\t\t// Merge into updated path.\n\t\t\t\t\t\t$req_path .= $reg_path_parts[$req_path_part];\n\n\t\t\t\t\t\t// If not the last path part, insert a forward-slash.\n\t\t\t\t\t\tif( $req_path_part < count( $req_path_parts ) -1 ) {\n\t\t\t\t\t\t\t$req_path .= \"/\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Does the route have a specified host and does it match the request?\n\t\t\t\t\tif( array_key_exists( 'host', $route ) && $route['host'] != $host ) { continue; }\n\t\t\t\t\t// Does the requested method match the route's method?\n\t\t\t\t\tif( $route['method'] != $method ) { continue; }\n\n\t\t\t\t\t// Is the updated requested path the same as the current route path?\n\t\t\t\t\tif( $req_path == $route['path'] ) {\n\t\t\t\t\t\t// Let's assume this is the route requested, save it for later.\n\t\t\t\t\t\t$req_route = $route;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t// Route does not require parameters, perform a simple path match.\n\t\t\t} else if( $path && $route['path'] == $path && $method == $route['method'] ) {\n\t\t\t\tif( array_key_exists( 'host', $route ) && $route['host'] != $host ) { continue; }\n\n\t\t\t\t// Let's assume this is the route requested, save it for later.\n\t\t\t\t$req_route = $route;\n\t\t\t}\n\n\t\t\t// Have we found the requested route?\n\t\t\tif( is_array( $req_route ) && array_key_exists('action', $req_route) ) {\n\t\t\t\t// Call the route's callable action.\n\t\t\t\tcall_user_func_array( $req_route['action'], $req_path_params );\n\t\t\t\t// All done, now exit.\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\n\t\t// Seriously? We still have not found a route? Only one thing we can do.\n\t\t// Output header 404 not found status.\n\t\theader(\"HTTP/1.0 404 Not Found\");\n\t\t// In fact, let's try to find a route one more time.\n\t\t// Check for \"not_found\" route.\n\t\t$not_found_route = Route::find(['path' => 'not_found']);\n\t\t// Did we find it?\n\t\tif( array_key_exists( 'action', $not_found_route ) ) {\n\t\t\t// Finally! Let's call the route's callable action.\n\t\t\tcall_user_func( $not_found_route['action'] );\n\t\t} else {\n\t\t\t// Still not found it? Oh well, we tried.\n\t\t\techo \"Not Found (404)\";\n\t\t}\n\t}", "title": "" }, { "docid": "4a429b824eea3d1babf8746699815fbd", "score": "0.5572831", "text": "protected function dispatch()\n\t{\n\t\tif ( $this->method == 'GET' ) {\n\t\t\tif ( $this->list === NULL ) {\n\t\t\t\treturn $this->get();\n\t\t\t}\n\n\t\t\treturn $this->openList();\n\t\t} elseif ( $this->method == 'DELETE' ) {\n\t\t\treturn $this->delete();\n\t\t} elseif ( $this->method == 'POST' ) {\n\t\t\treturn $this->post();\n\t\t} elseif ( $this->method == 'PUT' ) {\n\t\t\treturn $this->put();\n\t\t}\n\n\t\treturn $this->custom();\n\t}", "title": "" }, { "docid": "ddd4a76444bf14d5bba9dd1f269edcd0", "score": "0.55552673", "text": "public function get(string $path, \\Closure|string $callable): Route\n {\n return $this->add($path, $callable, 'GET');\n }", "title": "" }, { "docid": "d34fb2f3a083caf10d5e1d096411c272", "score": "0.5543498", "text": "function api_get($uri, $action)\n {\n return app('api.router')->get($uri, $action);\n }", "title": "" }, { "docid": "7c6c12c6da90269ed8e792dd90d2171f", "score": "0.55254036", "text": "public static final function getMethod() {}", "title": "" }, { "docid": "b430f68e07e8f5f99f0b5c54c286651b", "score": "0.5521526", "text": "public function register_routes() {\n (new Api\\Example())->register_routes();\n }", "title": "" }, { "docid": "1194a893fda92fc8297a083ea6dd40ed", "score": "0.5509991", "text": "private function __startAPI(){\n\t\t$c = new \\Slim\\Container();\n\t\t$c['notFoundHandler'] = function ($c) {\n\t\t return function ($request, $response) use ($c) {\n\t\t return $c['response']\n\t\t ->withStatus(404)\n\t\t ->withHeader('Content-Type', 'text/html')\n\t ->write('Page not found');\n\t\t };\n\t\t};\n\t\t$app = new \\Slim\\App($c);\n\t\t$this->__buildRoutes($app);\n\t}", "title": "" }, { "docid": "853bbd5faa0862e9766819d69b3762a5", "score": "0.55009365", "text": "public function get($path, $callable)\n {\n // Pushes the path to the array\n array_push($this->r_RoutesGet, new Route($path, $callable));\n }", "title": "" }, { "docid": "72ec11302ec7d05aa9ef674dab5cd668", "score": "0.54896253", "text": "public static function __callstatic($method, $params) {\n array_push(self::$methods, strtoupper($method));\n // adiciona as rotas passado estaticamente em um conjunto de array.\n array_push(self::$routes, $params[0]);\n // adiciona callbacks/controlador@metodo passados em um conjunto de array;\n array_push(self::$callbacks, $params[1]);\n }", "title": "" }, { "docid": "24708e5ba267d5574da43817edf60649", "score": "0.5487822", "text": "public function get($path, $callable, $name = null){\r\n return $this->add($path, $callable, $name, 'GET');\r\n }", "title": "" }, { "docid": "f2784c43f83de265ed50acddb219bfb5", "score": "0.54842883", "text": "public function __invoke()\n {\n /* @var $request \\Strapi\\Request */\n $request = $this->load('request');\n\n if ($route = $this->load('router')->route($request)) {\n return call_user_func($this->load('dispatcher'), $route);\n } else {\n throw new HttpErrorException('Route not found: ' . $request->uri(), 404);\n }\n }", "title": "" }, { "docid": "8c198707ea480c6a50407a851766f80e", "score": "0.5482205", "text": "public function register_routes() {\n\t\tregister_rest_route( $this->namespace, '/' . $this->rest_base, array(\n\t\t\tarray(\n\t\t\t\t'methods' => WP_REST_Server::READABLE,\n\t\t\t\t'callback' => array( $this, 'get_sample_entry' ),\n\t\t\t\t'permission_callback' => array( $this, 'get_item_permissions_check' ),\n\t\t\t),\n\t\t) );\n\t}", "title": "" } ]
40e553ec532eb798f3275b465bd140fb
Initializes the route. This method is invoked after the route is created by the route manager.
[ { "docid": "20a549879b1a1cf6ec2b6df7eeef0c74", "score": "0.0", "text": "public function getDir($logFile = 'app') {\n $logFile = preg_replace(\"![^\\w\\d\\s]*!\", \"\", $logFile);\n $logFile = (empty($logFile)) ? 'app' : $logFile;\n $this->logFile = Yii::$app->getRuntimePath() . '/logs/' . date($this->date_format) . '/' . $logFile . '.log';\n $logPath = dirname($this->logFile);\n if (!is_dir($logPath)) {\n FileHelper::createDirectory($logPath, $this->dirMode, true);\n }\n if ($this->maxLogFiles < 1) {\n $this->maxLogFiles = 1;\n }\n }", "title": "" } ]
[ { "docid": "77cb2e4e012901f7476283c4dea03f1c", "score": "0.8426995", "text": "public function init() {\r\n $this->_router->route();\r\n }", "title": "" }, { "docid": "fd5882fece8872a0c23f1348d9dd43d3", "score": "0.7917559", "text": "public function initializeRouter()\r\n {\r\n $this->route = trim($this->app->request->get('route') , '/');\r\n\r\n $this->route = $this->route ? explode('/' , $this->route) : false;\r\n\r\n $this->setScript();\r\n\r\n $this->establishRoutes();\r\n\r\n $this->setRouteKey();\r\n\r\n $this->setRouteController();\r\n\r\n $this->setControllerMethod();\r\n\r\n $this->setControllerArguments();\r\n\r\n }", "title": "" }, { "docid": "16381466deef48166990b2ffa1f5b870", "score": "0.7413517", "text": "public function __construct() \n\t{\n\t\tparent::__construct();\n\t\t$this->_routes = array();\n\t}", "title": "" }, { "docid": "3f9241b125d3077ae9a0c841ee836a2b", "score": "0.7071418", "text": "protected function initRoutes()\n {\n foreach ($this->routes as $name => $data) {\n $this->application\n ->match($data['match'], array($this, $data['method']))\n ->bind($name);\n }\n }", "title": "" }, { "docid": "75812b9b65cd25e79b598229ba7a8e93", "score": "0.706059", "text": "public function __construct()\n\t{\n\t\tlog_message('info', 'Initializing Orange Route Class');\n\n\t\t/* reference to CodeIgniter URI Object */\n\t\t$uri = load_class('URI');\n\t\t$input = load_class('Input');\n\n\t\t$this->url = implode('/', $uri->segments);\n\n\t\tlog_message('info', sprintf('Route: URI: \"%s\".', $this->url));\n\n\t\t$this->requestMethod = $input->get_http_method(); /* http method (get,put,post,patch,delete... or cli */\n\t\t$this->requestType = $input->get_request_type(); /* http, cli, ajax */\n\n\t\tlog_message('info', sprintf('Route: the HTTP request method is \"%s\" the request type is \"%s\".', $this->requestMethod, $this->requestType));\n\n\t\t/* load our routes from the routes configuration file */\n\t\t$this->loadRouterConfig();\n\n\t\t/* convert the URL to Controller / Method */\n\t\tlist($callback, $params) = $this->dispatch($this->getSearch('routes'));\n\n\t\t/* if it's a closure call it */\n\t\t/* -- not working because of cache\n\t\tif (is_callable($callback)) {\n\t\t\t$callback = call_user_func_array($callback,$params);\n\t\t}\n\t\t*/\n\n\t\tlog_message('info', sprintf('Route: the found call back is \"%s\".', $callback));\n\n\t\t$this->setDirectoryClassMethod($callback);\n\n\t\t$uri->rsegments = array_merge([1 => $this->fetch_class(), 2 => $this->fetch_method()], $params);\n\n\t\tlog_message('info', 'Orange Route Class Initialized');\n\t}", "title": "" }, { "docid": "05e3a1964a1e336a1addbcc06b07b290", "score": "0.69599295", "text": "protected function setupRoutes()\r\n\t{\r\n\t}", "title": "" }, { "docid": "fbee902bbcbf6739dccc4fdaea7ea88c", "score": "0.69228935", "text": "protected function setUpRoutes()\n {\n }", "title": "" }, { "docid": "1a5c06ac2c878fb7d9846b040cf677dc", "score": "0.6876414", "text": "private function initRoute() {\n $route = isset($_GET['_url']) ? array_values(array_filter(explode('/', $_GET['_url']))) : array();\n\n // Set controller\n if (isset($route[0])) {\n $controllerName = str_replace( ' ', '', ucwords( str_replace('-', ' ', $route[0]) ) ) . 'Controller';\n unset($route[0]);\n } else {\n $controllerName = 'IndexController';\n }\n\n // Set Action\n if (isset($route[1])) {\n $actionName = lcfirst( str_replace( ' ', '', ucwords( str_replace('-', ' ', $route[1]) ) ) ) . 'Action';\n unset($route[1]);\n } else {\n $actionName = 'indexAction';\n }\n\n // Set action parameter(s)\n // Remaining values in route variable are the list of parameters\n // Since after getting the controller and action name we unset their value\n $this->parameters = $route;\n \n $controllerFileLocation = __DIR__ . '/../controllers/' . $controllerName . '.php';\n\n // Set global variables\n $this->controllerName = $controllerName;\n $GLOBALS['controllerName'] = $this->controllerName;\n\n $this->actionName = $actionName;\n $GLOBALS['actionname'] = $this->actionName;\n\n $this->controllerFileLocation = $controllerFileLocation;\n $GLOBALS['controllerFileLocation'] = $this->controllerFileLocation;\n\n // Load base controller\n require __DIR__ . '/../controllers/BaseController.php';\n\n if (file_exists($controllerFileLocation)) {\n \n // Redirect to calling controller\n $this->invokeController();\n\n } else {\n\n // Set global variables\n $this->controllerName = 'NotFoundController';\n $GLOBALS['controllerName'] = $this->controllerName;\n\n $this->actionName = 'indexAction';\n $GLOBALS['actionname'] = $this->actionName;\n\n $this->controllerFileLocation = __DIR__ . '/../controllers/NotFoundController.php';\n $GLOBALS['controllerFileLocation'] = $this->controllerFileLocation;\n\n // Redirect to NotFoundController\n $this->invokeController();\n \n }\n\n }", "title": "" }, { "docid": "c4404059c4d4bb096445d9cf0c7a28eb", "score": "0.6832853", "text": "protected function initRoutes() {\n $array['home'] = array('route' => '/phpmvc/public/index', 'controller' => 'index', 'action' => 'index');\n $array['empresa'] = array('route' => '/phpmvc/public/empresa', 'controller' => 'index', 'action' => 'empresa');\n $array['pagenotfound'] = array('route' => '/phpmvc/public/pagenotfound', 'controller' => 'index', 'action' => 'pagenotfound');\n $this->setRoutes($array);\n }", "title": "" }, { "docid": "fb79618e8f6013ed2646f7e220b24968", "score": "0.67889917", "text": "protected function setUp()\n {\n $this->object = new AdvancedRoute(\n 'GET', '', function () {\n \n }\n );\n }", "title": "" }, { "docid": "9439324505f3ca2d25c845bee7b46ad4", "score": "0.677564", "text": "private function __construct()\n {\n $this->route = new \\System\\Route();\n $this->route->matchRoute();\n \n $this->diContainer = new \\System\\DependencyInjection();\n }", "title": "" }, { "docid": "872599e9d668f7b3629a42f89ee14438", "score": "0.67655766", "text": "protected function iniRoutes() {\n \n }", "title": "" }, { "docid": "46c33766ea9f04d67d1143b5c73c1a49", "score": "0.6710905", "text": "private function route()\n\t{\n\t\t$this->route_controller = (isset($this->route[0]) ? ucfirst( $this->route[0] ) : null);\n\t\t$this->route_action = (isset($this->route[1]) ? $this->route[1] : null);\n\n\t\t// Get the rest of the parameters from the route\n\t\tif( isset( $this->route[2] ) )\n\t\t{\n\t\t\t// Add all the parameters to the array\n\t\t\t$this->route_parameters = $this->route;\n\n\t\t\t// Unset the first 2 parameters as they are used for the controller and action\n\t\t\tarray_shift($this->route_parameters);\n\t\t\tarray_shift($this->route_parameters);\n\t\t}\n\t}", "title": "" }, { "docid": "60e3e32cc8c6a6c40ae4268fb9fd41b7", "score": "0.6709049", "text": "public function __construct()\n {\n $this->config = [\n 'RouteServerRequest' => $_SERVER['REQUEST_URI'],\n 'RouteRequest' => explode('?', $_SERVER['REQUEST_URI'])[0],\n 'RouteQueryString' => empty($_SERVER['QUERY_STRING']) ? '' : $_SERVER['QUERY_STRING'],\n 'RouteAllowedMethods' => ['GET', 'POST', 'PUT', 'DELETE', 'HEAD'],\n ];\n }", "title": "" }, { "docid": "1cafdeaaebbc979c2131c27cdab795b4", "score": "0.6703315", "text": "private function route()\n {\n // Initialize the router\n $router = new AltoRouter();\n $router->setBasePath(BASEPATH);\n\n // Load plugin/theme routes first\n // TODO: Update router.map in modules to App::addRoute();\n $GLOBALS[\"_ROUTER_\"] = $router;\n \\Event::trigger(\"router.map\", \"_ROUTER_\");\n $router = $GLOBALS[\"_ROUTER_\"];\n\n // Load internal routes\n $this->addInternalRoutes();\n\n // Load global routes\n include APPPATH.\"/inc/routes.inc.php\";\n \n // Map the routes\n $router->addRoutes(App::getRoutes());\n\n // Match the route\n $route = $router->match();\n $route = json_decode(json_encode($route));\n\n if ($route) {\n if (is_array($route->target)) {\n require_once $route->target[0];\n $controller = $route->target[1];\n } else {\n $controller = $route->target.\"Controller\";\n }\n } else {\n header(\"HTTP/1.0 404 Not Found\");\n $controller = \"IndexController\";\n }\n\n $this->controller = new $controller;\n $this->controller->setVariable(\"Route\", $route);\n }", "title": "" }, { "docid": "77c4bb828994fa8e57f423a415abd96c", "score": "0.6658197", "text": "public function __construct() \r\n\t{\r\n\t\tparent::__construct();\r\n\t\t$tabRoute = array();\r\n\t\t\r\n\t\t$this->setRouteTab();\r\n\t}", "title": "" }, { "docid": "c47614c03e64d5dfa8aafa01296ec52e", "score": "0.665079", "text": "protected function setUp() {\n\t\t$this->route = new ControllerRoute;\n\t}", "title": "" }, { "docid": "485497713036c1305cbe28d3e5f3dc04", "score": "0.6641453", "text": "public function __construct()\n\t{\n\t\t$this->Route = new Route(\n\t\t\t'/:module/:controller/:action',\n\t\t\tarray(\n\t\t\t\t'module' => 'index',\n\t\t\t\t'controller' => 'index',\n\t\t\t\t'action' => 'index',\n\t\t\t\t'prefix' => '',\n\t\t\t\t'format' => 'html'\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "3941b0e71a721abe485883b2b7437a75", "score": "0.65812117", "text": "public function __construct(Route $route) {\n\t\t$this->route = $route;\n\t}", "title": "" }, { "docid": "73b15ef0ff996b05963ba1e7fef8717c", "score": "0.6568841", "text": "public function __construct() {\n\t\t\tadd_action( 'rest_api_init', array( $this, 'register_routes' ) );\n\t\t}", "title": "" }, { "docid": "ac722d15e27f9a3e67057014e15314f6", "score": "0.6563598", "text": "public function __construct()\n {\n $this->bundles = $this->registerBundles();\n $this->bundleManager = new BundleManager($this->bundles);\n\n $this->routes = $this->bundleManager->getRoutes();\n }", "title": "" }, { "docid": "371a12b904e8bb77b0c1c861a52bb3e9", "score": "0.6543788", "text": "function initialize(RouteCollector $routeCollector)\n {\n $routeCollector->get('/router', '/test');\n /*\n * eg path : /closure/index.html ; /closure/ ; /closure\n */\n $routeCollector->get('/closure', function (Request $request, Response $response) {\n $response->write('this is closure router');\n //不再进入控制器解析\n return false;\n });\n\n $routeCollector->addGroup('/component', function (\\FastRoute\\RouteCollector $collector) {\n // ################### Region ###############\n $collector->get('/regions', '/Component/Regions/getRegions');\n $collector->get('/region/{code:\\d+}/childs', '/Component/Regions/getRegionChilds');\n\n // ################### Redis ###############\n $collector->addGroup('/redis', function (\\FastRoute\\RouteCollector $collector) {\n $collector->get('/lock', '/Component/Redis/lock');\n });\n // ################### Location ###############\n $collector->addGroup('/location', function (\\FastRoute\\RouteCollector $collector) {\n $collector->get('', '/Component/Location/getLocation');\n });\n });\n }", "title": "" }, { "docid": "2e2f4a2e6d8ae47b39f1451b4d92c409", "score": "0.6538904", "text": "public function initialize()\n {\n $this->router->setBasePath(BASE_DIR);\n\n //set the homepage route\n //$this->router->map('GET|POST', '/', 'Manifesto\\Controller\\Page#homepage');\n\n //pull in the routes from the manifest\n foreach($this->manifest->get('routes') as $route)\n {\n $this->router->map($route[0], $route[1], $route[2]);\n }\n\n $this->router->map('GET|POST', '/', '\\Manifesto\\Controller\\Dashboard#index');\n $match = $this->router->match();\n\n // call a closure\n if( $match && is_callable( $match['target'] ) ) {\n call_user_func_array( $match['target'], $match['params'] );\n }\n\n // parse a string and call it\n elseif($match && is_string($match['target']))\n {\n $target = explode('#', $match['target']);\n\n try {\n $class = Box::load($target[0]);\n call_user_func_array([$class, $target[1]], $match['params']);\n\n } catch(Exception $e) {\n var_dump($e);\n show404();\n }\n }\n\n // throw a 404 error\n else\n {\n $error = new \\Manifesto\\Controller\\Error;\n $error->index();\n }\n }", "title": "" }, { "docid": "b8b9e2d522a3a39a41fff59a0e697c22", "score": "0.6516207", "text": "public function __construct(Route $route)\n {\n $this->route=$route;\n }", "title": "" }, { "docid": "cfa90bceaf0bc582c9d57f914e32947a", "score": "0.65134186", "text": "public function __construct(Route $route)\n {\n $this->route = $route;\n }", "title": "" }, { "docid": "324d83714a7f16784c396e14cc3c289e", "score": "0.65132153", "text": "public function init(){\n\t\tadd_action( 'rest_api_init', array( $this, 'register_routes' ) );\n\t}", "title": "" }, { "docid": "7671b085a8a73f36af6b1b17227d8cf2", "score": "0.65129614", "text": "public static function init() {\n\t\treturn (new static())->register_routes();\n\t}", "title": "" }, { "docid": "a07ab6c2cd8064075ac1b9219aa7497d", "score": "0.6510615", "text": "public function __construct() {\n $controllerName = get_class($this);\n $this->route = substr($controllerName, 0, strlen($controllerName) - 10)\n . '/';\n }", "title": "" }, { "docid": "dbbd068450976b445a37612b98fb985e", "score": "0.649998", "text": "public function _initRoutes()\n {\n $frontController = Zend_Controller_Front::getInstance();\n $router = $frontController->getRouter();\n $route = new Zend_Controller_Router_Route(\n 'page/:page/',\n array(\n /*'page' => 1,*/\n 'action' => 'index',\n 'controller' => 'Index'\n ),\n array('page' => '\\d+')\n );\n $router->addRoute('index', $route);\n }", "title": "" }, { "docid": "9f6b8e70303d465e69491c9e16073848", "score": "0.648857", "text": "private function __construct()\n {\n $this->request = Application::getService(Request::class);\n\n $this->registerRoutes();\n }", "title": "" }, { "docid": "c53a0015f54ec6dc2724f0585b3bf14c", "score": "0.6485662", "text": "public function init() {\n\t\tadd_action( 'rest_api_init', array( $this, 'register_rest_routes' ), 10 );\n\t}", "title": "" }, { "docid": "bb3bd2535a730cbafed1d271c8a17f51", "score": "0.6484314", "text": "public function __construct(Route $route)\n {\n $this->route=$route;\n }", "title": "" }, { "docid": "5ca1293a434e468f776949ff102880cd", "score": "0.64636225", "text": "function __construct() {\n\t\t$this->handler();\n\n\t\t// Run route callback on WordPress init\n\t\tadd_action( 'init', [ $this, 'handler' ] );\n\t}", "title": "" }, { "docid": "07a688130538fba69b12b373570d441d", "score": "0.6445028", "text": "public function __construct()\n {\n add_action('rest_api_init', [$this, 'register_routes'], 10);\n }", "title": "" }, { "docid": "a63d3183eaa090b80ea6bd99717cea12", "score": "0.64250964", "text": "public static function init()\n {\n $router = new Router;\n $router->parseUrl();\n $router->setVerb();\n\n self::execute($router->getSegments(), $router->getVerb(), file_get_contents('php://input'));\n }", "title": "" }, { "docid": "48bfcad04954b8e711a7f5c511cdd334", "score": "0.64042866", "text": "public function __construct($route)\n {\n $this->route = $route;\n $this->path = $route['controller'].'/'.$route['action'];\n }", "title": "" }, { "docid": "7df61c17cd3c6c2c0d0f1c499cd3c193", "score": "0.64028", "text": "protected static function _load_routes () {\n\t\t\tif( is_null( self::$routes ) )\n\t\t\t\tself::$routes = Config::get( 'routes.routes', array() );\n\t\t}", "title": "" }, { "docid": "e442004de887308553648d7e9d50af61", "score": "0.6399639", "text": "public function __construct()\n\t\t{\n\t\t\t$routes = require ROOT . '/application/config/routes.php';\n\t\t\tforeach ($routes as $route => $val) {\n\t\t\t\t$this->add($route, $val);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "3f185a23a4e423590327a0a57ff8a949", "score": "0.6391441", "text": "protected function setUpRoutes()\n {\n parent::setUpRoutes();\n $this->setRoutes([\n 'create' => 'messages'\n ]);\n }", "title": "" }, { "docid": "9545de907f3cb0fa1f358325abc40125", "score": "0.6390057", "text": "public function init() {\n\t\t$this->initRouter();\n\t\t$this->initView();\n\t\t$this->initController();\n\t\t\n\t}", "title": "" }, { "docid": "b89506119269a67e60424015e2d9f2ec", "score": "0.63749564", "text": "public function boot()\n {\n self::setupRoute();\n }", "title": "" }, { "docid": "f1a843e029954d6ed2d8322d8cc5dcd0", "score": "0.6364825", "text": "public function initialize()\n {\n parent::initialize();\n\n $this->setQueueOption('name', 'analysis.phploc');\n $this->enableDeadLettering();\n\n $this->setRouting('analysis.phploc');\n }", "title": "" }, { "docid": "76a27f10f7ee617f59e82b8266621f5c", "score": "0.6358407", "text": "public static function init() {\n\t\tself::load_routes();\n\t\tself::load_fields();\n\t}", "title": "" }, { "docid": "48d67278085696222ed163e0d7e32bd4", "score": "0.6337776", "text": "public function initCrossRouting()\n {\n if($this->pattern == null) {\n return;\n }\n\n $route = swPatternRouting::getCrossApplicationRouteInstance($this->options['encapsulated']['name']);\n $this->setRoute($route->getRoute());\n }", "title": "" }, { "docid": "4650fd558e6e5f6db9fb0fc7259d0922", "score": "0.63203794", "text": "public function initialize() {\n $this->setPrefix('/auth');\n\n $this->add('/login/{method}', array(\n 'controller' => 'auth-api',\n 'action' => 'login'\n ))->via(array('OPTIONS', 'POST'));\n\n $this->add('/logout', array(\n 'controller' => 'auth-api',\n 'action' => 'logout'\n ))->via(array('OPTIONS', 'POST'));\n\n $this->add('/verify-session', array(\n 'controller' => 'auth-api',\n 'action' => 'verifySession'\n ))->via(array('OPTIONS', 'POST'));\n\n }", "title": "" }, { "docid": "fab8e54a7bee0fb9e02ce96cf9bc6cf9", "score": "0.63128006", "text": "public function on_start(){\n define('SEQUENCE_IMAGE_PATH', DIR_REL . '/packages/' . $this->pkgHandle . '/images/');\n\n Route::register(\n Router::route(array('/modal_info/{id}', 'sequence')),\n '\\Concrete\\Package\\Sequence\\Controller\\Tools\\ModalInfo::view'\n );\n\n Route::register(\n Router::route(array('/disclaimer', 'sequence')),\n '\\Concrete\\Package\\Sequence\\Controller\\Tools\\Disclaimer::view'\n );\n\n Route::register(\n Router::route(array('/terms_of_use', 'sequence')),\n '\\Concrete\\Package\\Sequence\\Controller\\Tools\\TermsOfUse::view'\n );\n\n Route::register(\n Router::route(array('/contact_form', 'sequence')),\n '\\Concrete\\Package\\Sequence\\Controller\\Tools\\Contact::handler'\n );\n }", "title": "" }, { "docid": "21ccd30e59287096efd27aac65dd5275", "score": "0.63034445", "text": "protected function initRoutes()\n {\n if (isset($this->settings) && $this->settings->exists('routes') || !self::$init_stages[$this->name]['routes']) {\n\n $routes = $this->settings->get('routes');\n\n // Get uncamelized app name\n $string = new CamelCase($this->name);\n $app = $string->uncamelize();\n\n // Add always a missing index route!\n if (!array_key_exists('index', $routes)) {\n $routes['index'] = [];\n }\n\n foreach ($routes as $name => $definition) {\n\n if (is_numeric($name)) {\n Throw new AppException(sprintf('AbstractApp \"%s\" sent a nameless route to be mapped.', $this->name));\n }\n\n $definition = $this->parseRouteDefintion($name, $definition);\n\n $this->core->router->map($definition['method'], $definition['route'], $definition['target'], $definition['name']);\n }\n\n self::$init_stages[$this->name]['routes'] = true;\n }\n }", "title": "" }, { "docid": "644e4f1edc02a14c6ddf708b454e5e66", "score": "0.62873155", "text": "public function init()\n {\n // don't do that in the real world!\n $this->properties = $_REQUEST;\n $this->path = $_SERVER['PATH_INFO'];\n $this->path = (empty($this->path)) ? \"/\" : $this->path;\n }", "title": "" }, { "docid": "63968195284b8620bf828e0bb23f4a85", "score": "0.6264085", "text": "public function __construct(){\n\t\t$routes_path = ROOT.'/config/routes.php';\n\t\t$this->routes = include($routes_path);\n\t}", "title": "" }, { "docid": "79ae14be62fba4bac64a8cb527233483", "score": "0.62552094", "text": "public function __construct()\n {\n // Assign global route parameters\n if ($route = request()->route()) {\n $accessarea = str_before(Route::currentRouteName(), '.');\n $passwordResetBroker = $this->getPasswordResetBroker();\n $guard = $this->getGuard();\n\n $route->setParameter('passwordResetBroker', $passwordResetBroker);\n $route->setParameter('accessarea', $accessarea);\n $route->setParameter('guard', $guard);\n\n // Activate Guardians\n ! in_array($accessarea, config('cortex.auth.guardians')) || $this->middleware('auth.basic:guardian,username');\n }\n }", "title": "" }, { "docid": "ef4309c1a4ffc3ae43274dd704d13c4f", "score": "0.62511945", "text": "public function bootstrapRouter()\n {\n $this->router = new Router($this, false);\n }", "title": "" }, { "docid": "c6887945c197d0f98c647ace7e17360b", "score": "0.6246691", "text": "public function initialize()\n {\n // Basic configuration\n $this->setPaths(array(\n 'module' => 'app',\n 'controller' => 'index',\n 'namespace' => 'App\\Controllers'\n ));\n\n $this->add('/test', array(\n 'controller' => 'testing',\n 'action' => 'static'\n ));\n }", "title": "" }, { "docid": "bee7df4c13dc5df71bd733a3edce539d", "score": "0.62219256", "text": "public function __construct()\n {\n $this->routes = include_once(ROOT.'/config/routes.php');\n }", "title": "" }, { "docid": "d5f27879b0e8262ff86b803f04403cf4", "score": "0.62164474", "text": "public function init()\n\t{\n\t\tadd_action( 'init', array( $this, 'config' ), 0 );\n\t\tadd_action( 'init', array( $this, 'route_response' ), 1 );\n\t\tadd_filter( 'page_template', array( $this, 'load_template' ) );\n\t}", "title": "" }, { "docid": "883fb1718d157c3c34e232aa8176859d", "score": "0.62054026", "text": "protected function routing()\n {\n $relativeCmsUri = $this->getRelativeCmsUri($this->request);\n $userRights = $_SESSION[CmsConstants::SESSION_PARAMETER_CLOUD_CONTROL]->rights;\n\n $baseRouting = new BaseRouting($this->request, $relativeCmsUri, $this);\n $baseRouting->setUserRights($userRights);\n $baseRouting->route();\n }", "title": "" }, { "docid": "a7ba456a1d8166ab4a2489a62cf74222", "score": "0.61942047", "text": "public function initialize(): void\n {\n new Url($this->getKernel());\n new TwigTemplate();\n new Navigation($this->getKernel());\n new Header($this->getKernel());\n\n $this->action = new Action($this->getKernel());\n }", "title": "" }, { "docid": "249f5a98a41a5738d3d77222c0a04b41", "score": "0.6184975", "text": "public static function setup()\n\t{\n\t\tif ( ! empty($_SERVER['QUERY_STRING']))\n\t\t{\n\t\t\t// Set the query string to the current query string\n\t\t\tself::$query_string = '?'.trim($_SERVER['QUERY_STRING'], '&/');\n\t\t}\n\n\t\tif (self::$routes === NULL)\n\t\t{\n\t\t\t// Load routes\n\t\t\tself::$routes = Kohana::config('routes');\n\t\t}\n\n\t\t// Default route status\n\t\t$default_route = FALSE;\n\n\t\tif (self::$current_uri === '')\n\t\t{\n\t\t\t// Make sure the default route is set\n\t\t\tif ( ! isset(self::$routes['_default']))\n\t\t\t\tthrow new Kohana_Exception('core.no_default_route');\n\n\t\t\t// Use the default route when no segments exist\n\t\t\tself::$current_uri = self::$routes['_default'];\n\n\t\t\t// Default route is in use\n\t\t\t$default_route = TRUE;\n\t\t}\n\n\t\t// Make sure the URL is not tainted with HTML characters\n\t\tself::$current_uri = html::specialchars(self::$current_uri, FALSE);\n\n\t\t// Remove all dot-paths from the URI, they are not valid\n\t\tself::$current_uri = preg_replace('#\\.[\\s./]*/#', '', self::$current_uri);\n\n\t\t// At this point segments, rsegments, and current URI are all the same\n\t\tself::$segments = self::$rsegments = self::$current_uri = trim(self::$current_uri, '/');\n\n\t\t// Set the complete URI\n\t\tself::$complete_uri = self::$current_uri.self::$query_string;\n\n\t\t// Explode the segments by slashes\n\t\tself::$segments = ($default_route === TRUE OR self::$segments === '') ? array() : explode('/', self::$segments);\n\n\t\tif ($default_route === FALSE AND count(self::$routes) > 1)\n\t\t{\n\t\t\t// Custom routing\n\t\t\tself::$rsegments = self::routed_uri(self::$current_uri);\n\t\t}\n\n\t\t// The routed URI is now complete\n\t\tself::$routed_uri = self::$rsegments;\n\n\t\t// Routed segments will never be empty\n\t\tself::$rsegments = explode('/', self::$rsegments);\n\n\t\t// Prepare to find the controller\n\t\t$controller_path = '';\n\t\t$method_segment = NULL;\n\n\t\t// Paths to search\n\t\t$paths = Kohana::include_paths();\n\t\t\n\t\tforeach (self::$rsegments as $key => $segment)\n\t\t{\n\t\t\t// Add the segment to the search path\n\t\t\t$controller_path .= $segment;\n\n\t\t\t$found = FALSE;\n\t\t\tforeach ($paths as $dir)\n\t\t\t{\n\t\t\t\t// Search within controllers only\n\t\t\t\t$dir .= 'controllers/';\n\t\t\t\n\t\t\t\t// First check if admin URL, if so check for be_ controller\n\t\t\t\tif(array_key_exists(0, self::$segments) && self::$segments[0] == Kohana::config('admin.url'))\n\t\t\t\t{\n\t\t\t\t\tif(!self::check_path($dir,'be_'.$controller_path,$key,$segment,$method_segment,$found))\n\t\t\t\t\t{\n\t\t\t\t\t\t// Give up and check for normal controller\n\t\t\t\t\t\tself::check_path($dir,$controller_path,$key,$segment,$method_segment,$found);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(!self::check_path($dir,'fe_'.$controller_path,$key,$segment,$method_segment,$found))\n\t\t\t\t\t{\n\t\t\t\t\t\t// Give up and check for normal controller\n\t\t\t\t\t\tself::check_path($dir,$controller_path,$key,$segment,$method_segment,$found);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($found){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($found === FALSE)\n\t\t\t{\n\t\t\t\t// Maximum depth has been reached, stop searching\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Add another slash\n\t\t\t$controller_path .= '/';\n\t\t}\n\n\t\tif ($method_segment !== NULL AND isset(self::$rsegments[$method_segment]))\n\t\t{\n\t\t\t// Set method\n\t\t\tself::$method = self::$rsegments[$method_segment];\n\n\t\t\tif (isset(self::$rsegments[$method_segment + 1]))\n\t\t\t{\n\t\t\t\t// Set arguments\n\t\t\t\tself::$arguments = array_slice(self::$rsegments, $method_segment + 1);\n\t\t\t}\n\t\t}\n\n\t\t// Last chance to set routing before a 404 is triggered\n\t\tEvent::run('system.post_routing');\n\n\t\tif (self::$controller === NULL)\n\t\t{\n\t\t\t// No controller was found, so no page can be rendered\n\t\t\tEvent::run('system.404');\n\t\t}\n\t}", "title": "" }, { "docid": "39635b23bb7a989f413db5c1e419a6e8", "score": "0.6182974", "text": "public function __construct() {\n\n // All the routers are initialized with these HTTP methods by default\n // Every other method will be ignored\n $this->routes = [\n 'OPTIONS' => [],\n 'GET' => [],\n 'POST' => [],\n 'PUT' => [],\n 'DELETE' => [],\n\n '_ERROR_' => []\n ];\n\n // Default route prefix for this router\n $this->routes_prefix = \"\";\n\n $this->error_handler = null;\n\n // Load overriden settings\n $this->load();\n }", "title": "" }, { "docid": "379b2e459cb17f8925f8da13cc3247be", "score": "0.6160779", "text": "public function setUp()\n {\n Route::reset();\n }", "title": "" }, { "docid": "10a8db81dd75e620e71725252a37b8c6", "score": "0.6129617", "text": "protected function setUpRoutes()\n {\n parent::setUpRoutes();\n\n $this->setRoutes([\n 'getStarImages' => 'resources/images/stars/{stars}?apikey={apikey}',\n 'getStarString' => 'resources/strings/stars/{stars}?locale={locale}&apikey={apikey}',\n ]);\n }", "title": "" }, { "docid": "13c59af70d8dc48efbd71bf5aa337cb6", "score": "0.6127772", "text": "public function createRoutes()\n {\n }", "title": "" }, { "docid": "b23d64d12bfbf5854f417d1b69da1a54", "score": "0.60958976", "text": "public function testInit()\n {\n $app = new App();\n $routes = new MultiRoutes($app);\n Routes::init([$routes]);\n $slimRoutes = $app->getContainer()->router->getRoutes();\n $firstRoute = array_pop($slimRoutes);\n $this->assertTrue($firstRoute->getMethods() === ['POST']);\n $this->assertTrue($firstRoute->getPattern() === '/base/inner/two');\n $secondRoute = array_pop($slimRoutes);\n $this->assertTrue($secondRoute->getMethods() === ['GET']);\n $this->assertTrue($secondRoute->getPattern() === '/base/inner/one');\n $thirdRoute = array_pop($slimRoutes);\n $this->assertTrue($thirdRoute->getMethods() === ['GET']);\n $this->assertTrue($thirdRoute->getPattern() === '/base');\n }", "title": "" }, { "docid": "a4b18ec9fe389b9123781f82e784e5e7", "score": "0.6079654", "text": "public function __construct()\n {\n $this->router = resolve(Router::class);\n }", "title": "" }, { "docid": "dc87a9522b6390ef3e6ae0b584538fdf", "score": "0.6076966", "text": "protected function initialize() {\n\t\t$this->resource = \"actions\";\n\t}", "title": "" }, { "docid": "f97c9b9046446759b4e7f78e5d3353e3", "score": "0.6075101", "text": "function afterroute(){\n\t}", "title": "" }, { "docid": "ce83199039ff438835c9e77ef35530c1", "score": "0.6072399", "text": "private function setRoutes(): void\n {\n $routesClassRoot = new \\HeliumConfig\\Routes;\n $routesClass = new ReflectionClass($routesClassRoot);\n $routes = [];\n foreach ($routesClass->getConstants() as $controller => $actions) {\n foreach ($actions as $action => $isVisible) {\n $key = $controller . DS . $action;\n $routes[$key] = [\n 'controller' => $controller,\n 'action' => $action,\n 'visible' => $isVisible\n ];\n }\n }\n\n $this->routes = $routes;\n }", "title": "" }, { "docid": "6acaa4a735c93e14ac19b79866026bca", "score": "0.6054666", "text": "public function setUp(): void\n {\n $container = $this->container();\n\n $this->obj = new ActionRoute([\n 'logger' => $container['logger'],\n 'config' => []\n ]);\n }", "title": "" }, { "docid": "465c30666260d989a1dfe78b1aef8fb9", "score": "0.60114294", "text": "public function __construct()\n {\n /**\n * By default, I assume that the Light instance is created from $appDir/www/index.php\n * If that's not the case, you should set the applicationDir just after instantiating this class.\n */\n $appDir = $_SERVER['DOCUMENT_ROOT'] ?? null;\n if ($appDir) {\n $appDir = dirname($appDir);\n }\n $this->applicationDir = $appDir;\n $this->debug = false;\n $this->routes = [];\n $this->container = null;\n $this->httpRequest = null;\n $this->matchingRoute = null;\n $this->settings = [];\n $this->isInitialized = false;\n }", "title": "" }, { "docid": "bfd810b91cb581b07a71e40db959be7c", "score": "0.60080844", "text": "public function __construct(){\n\t\t// chargement du tableau de routage\n\t\t$reader = new \\Zend\\Config\\Reader\\Ini();\n\t\t$this->__routeArray = $reader->fromFile(APPLICATION_ROOT.'/config/route.ini.php', true);\n\t\t\t\t\n\t\t// chargement du path prefix défini\n// \t\t$conf = Setting::getInstance();\n// \t\t$this->__pathPrefix = $conf->getParam('general', 'path_prefix'); \n\t}", "title": "" }, { "docid": "6f95e32d825dd2b124aaba1dfdd41b35", "score": "0.60065734", "text": "public function __construct()\n {\n // p($_SERVER[\"REQUEST_URI\"]);exit(); //DEBUG-route\n if( isset($_SERVER['REQUEST_URI']) && $_SERVER['REQUEST_URI'] != '/' ) {\n $path = $_SERVER['REQUEST_URI'];\n $patharr = explode('/', trim($path, '/')); // '/' slice\n if( isset($patharr[0]) ) {\n $this->ctrl = $patharr[0];\n }\n unset($patharr[0]); //drop first arr\n\n if( isset($patharr[1]) ) {\n $this->action = $patharr[1]; //drop second\n unset($patharr[1]);\n } else {\n $this->action = conf::get('ACTION','route');\n }\n\n //GET extra url --> get require\n $countPath = count($patharr) + 2;\n $i = 2;\n while($i < $countPath)\n {\n if( isset($patharr[$i + 1]))\n {\n $_GET[$patharr[$i]] = $patharr[$i + 1];\n }\n $i = $i + 2;\n }\n } else {\n $this->ctrl = conf::get('CTRL','route');\n $this->action = conf::get('ACTION','route');\n }\n }", "title": "" }, { "docid": "1b48a197786eee836e0d35b50f162b74", "score": "0.59992045", "text": "public function on_start(){\n define('ARTSY_IMAGE_PATH', DIR_REL . '/packages/' . $this->pkgHandle . '/images/');\n\n // Search\n Route::register(\n Router::route(array('site_search', 'artsy')),\n '\\Concrete\\Package\\Artsy\\Controller\\SiteSearch::search'\n );\n\n // Email List Signup\n Route::register(\n Router::route(array('email_list_signup', 'artsy')),\n '\\Concrete\\Package\\Artsy\\Controller\\EmailListSignup::complete'\n );\n\n // Custom password validation functionality\n $this->passwordValidation();\n }", "title": "" }, { "docid": "d81954e4143b64ea847f56b7b602ffd3", "score": "0.5992656", "text": "public function init()\n {\n $this->loadOutboundSettings();\n $this->loadDefaultFromAndToAddresses();\n }", "title": "" }, { "docid": "28ebb2d12f4e7e1fde983a3725e6d97a", "score": "0.5978845", "text": "public function __construct(RouteCollection $routes) {\n $this->routes = $routes;\n }", "title": "" }, { "docid": "89248954c694352e60039e0fe587e29d", "score": "0.59654444", "text": "public function __construct(RouteCollection $routes)\n\t{\n\t\t$this->routes = $routes;\n\t\t//$this->context = $context;\n\t}", "title": "" }, { "docid": "6f480e741e21dc4bd118cb18e0927b01", "score": "0.5954735", "text": "function clearRoutes() {\r\n\t\t\t$this->routes = array();\r\n\t\t}", "title": "" }, { "docid": "5308a1887689b0dfe13f4c1f188bcc04", "score": "0.5946052", "text": "protected function setupRouters()\n {\n $this->zoo->getApp()->event->dispatcher->connect('application:sefparseroute', function ($event) {\n\n $app_id = $this->app->request->getInt('app_id', null);\n $app = $this->app->table->application->get($app_id);\n\n // check if was loaded\n if (!$app) return;\n\n $group = $app->getGroup();\n if ($router = $this->app->path->path(\"applications:$group/router.php\")) {\n\n require_once $router;\n\n $class = 'ZLRouter' . ucfirst($group);\n $routerClass = new $class;\n $routerClass->parseRoute($event);\n }\n });\n }", "title": "" }, { "docid": "e67999a044772ef2e37bc45b80a29ffc", "score": "0.5932547", "text": "public function initRouteController() {\n $this->routeController = new $this->controllerClass;\n\n if (true == ($this->routeController instanceof \\Fewlines\\Core\\Controller\\View)) {\n $template = Template::getInstance();\n $this->routeController->init($template);\n return $this->callRouteMethod($this->activeRoute->getToMethod(), $this->activeRoute->getVarsRecursive());\n }\n else {\n throw new View\\Exception\\ControllerInitialisationGoneWrongException(\n 'The route controller could not be initialized.\n Must be instance of \\Fewlines\\Controller\\View'\n );\n }\n\n return null;\n }", "title": "" }, { "docid": "1433c1abb848e86df63063cd0a926b27", "score": "0.59264517", "text": "public function configure()\n {\n if ($this->_routerObject === null) {\n $this->_routerObject = new Zend_Controller_Router_Route_Static($this->getRoute(), $this->getDefaults());\n }\n return $this;\n }", "title": "" }, { "docid": "2baddea9cfada4dae5c2f5ec53f7718e", "score": "0.5912882", "text": "public function init(){\n\t\trequire_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'routes' . DIRECTORY_SEPARATOR . 'api.php';\n\t}", "title": "" }, { "docid": "df613e96afe87b0664cd2dccd8d7e3d7", "score": "0.5911467", "text": "public function _initRoutes(){\n\t\t$this->bootstrap('frontController');\n\t\t$request = $this->getResource('frontController');\n\t\t\n\t\t/*$frontController = Zend_Controller_Front::getInstance();\n\t\t$route = new Zend_Controller_Router_Route('login', \n\t\t\t\t\tarray(\n\t\t\t\t\t\t'controller' => 'user',\n\t\t 'action' => 'login'\n\t\t\t\t\t)\n\t\t);\n\t\t\n \t// add this route to the front controller \n $frontController->getRouter()->addRoute('login', $route);\n \n $frontController = Zend_Controller_Front::getInstance();\n\t\t$route = new Zend_Controller_Router_Route('logout', \n\t\t\t\t\tarray(\n\t\t\t\t\t\t'controller' => 'user',\n\t\t 'action' => 'logout'\n\t\t\t\t\t)\n\t\t);\n \t// add this route to the front controller \n $frontController->getRouter()->addRoute('logout', $route);\n \n $frontController = Zend_Controller_Front::getInstance();\n $route = new Zend_Controller_Router_Route('user/:username', \n\t\t\t\t\tarray(\n\t\t\t\t\t\t'controller' => 'farmer',\n\t\t 'action' => 'view',\n\t\t 'username' => 1\n\t\t\t\t\t),\n\t\t\t\t\tarray('user' => '\\d+')\n\t\t);\n\t\t$frontController->getRouter()->addRoute('user', $route);*/\n\t}", "title": "" }, { "docid": "257ec765641ade2442a1f5d6063136b0", "score": "0.58941776", "text": "public function init_route_fields_options() {\n\n //Setup Settings Page\n $settings_page = Rest_Manager_Settings::getInstance( $this->plugin_name );\n\n $route_fields = rest_manager_settings_route_fields();\n\n foreach ( $route_fields as $route_field) {\n $settings_page->add_field( 'rest_manager_routes', 'routes', $route_field );\n }\n\n }", "title": "" }, { "docid": "3b1c3a4b88841396615e1f63e8c86061", "score": "0.5893744", "text": "protected function setRouter()\n {\n $eventsDispatcher = new EventsDispatcher($this->container);\n\n $this->router = new Router($eventsDispatcher, $this->container);\n $this->router->allowAdapters([\n MainAdapter::name,\n JsonRpcAdapter::name,\n SoapAdapter::name,\n 'Rest'\n ]);\n }", "title": "" }, { "docid": "3556194795ec92abbb0f780555047083", "score": "0.58917844", "text": "public function __construct(string $ROUTE) {\n $this->ROUTE = $ROUTE;\n }", "title": "" }, { "docid": "2b3469208f4df91d755d97d9b6ac9b2d", "score": "0.58887684", "text": "public function __construct()\n\t{\n\t\t// Hook into routing right after controller object is created\n\t\tEvent::add('system.post_controller', array($this, 'add'));\n\t}", "title": "" }, { "docid": "9c66b5b5e71eb632fb2c0cbcaa9ccc65", "score": "0.58869725", "text": "public function initialize()\n {\n\n // load configurations\n $this->_config = $this->di->get('config');\n if ($this->_config->logger->enable === true) {\n $this->_logger = $this->di->get('logger');\n }\n\n // setup breadcrumbs\n $this->_breadcrumbs = $this->di->get('breadcrumbs');\n\n // setup navigation\n\n $navigation = $this->di->get('navigation');\n\n $navigation->setActiveNode(\n $this->router->getActionName(),\n $this->router->getControllerName(),\n $this->router->getModuleName()\n );\n\n if (APPLICATION_ENV === 'development') {\n // add toolbar to the layout\n $toolbar = new \\Fabfuel\\Prophiler\\Toolbar($this->di->get('profiler'));\n $toolbar->addDataCollector(new \\Fabfuel\\Prophiler\\DataCollector\\Request());\n $this->view->setVar('toolbar', $toolbar);\n }\n\n // global view variables\n $this->view->setVars([\n 'user' => $this->_user,\n 'breadcrumbs' => $this->_breadcrumbs,\n 'navigation' => $navigation,\n 'search' => new Forms\\SearcherForm()\n ]);\n }", "title": "" }, { "docid": "d1c14b3eef7f03e4cd3921dc60692e60", "score": "0.5884692", "text": "public function __construct($route = null) \n {\n\t\tif($route !== null)\n\t\t{\n\t\t\t$this->route = $route;\n\t\t\t$this->moduleName = $route['module'];\n\t\t\t$this->actionName = $route['action'];\n\t\t\t$this->controllerName = $route['controller'];\n\t\t}\n \n\t\t// Handle all controller init tasks (create view, theme, etc..)\n $this->init();\n\t\t\n\t\t// Controller on load action\n $this->onLoad();\n }", "title": "" }, { "docid": "850fc4c94079f0182591a21a414a33f6", "score": "0.5872188", "text": "public function onBeforeRouting() {}", "title": "" }, { "docid": "d6438e40c2351e78839f61b8dd180ab3", "score": "0.5860379", "text": "public function initialize()\n {\n $this->params = $this->trimArray( $this->request->getQuery(), array(\"_url\") );\n }", "title": "" }, { "docid": "c049fc4135f5eecfb9c160302cb4d559", "score": "0.5843829", "text": "public function __construct()\n {\n //todo: temp route for 404 page\n $this->addRoute(\n \"/404\",\n function () {\n return \"<h1>Page not found :(</h1>\";\n }\n );\n }", "title": "" }, { "docid": "7a4ec62d445cf689370a76a8ab8bd93f", "score": "0.58342373", "text": "protected function _set_routing()\n {\n // Are query strings enabled in the config file? Normally CI doesn't utilize query strings\n // since URI segments are more search-engine friendly, but they can optionally be used.\n // If this feature is enabled, we will gather the directory/class/method a little differently\n if ($this->enable_query_strings)\n {\n $_d = $this->config->item('directory_trigger');\n $_d = isset($_GET[$_d]) ? trim($_GET[$_d], \" \\t\\n\\r\\0\\x0B/\") : '';\n if ($_d !== '')\n {\n $this->set_directory($this->uri->filter_uri($_d));\n }\n\n $_c = $this->config->item('controller_trigger');\n if ( ! empty($_GET[$_c]))\n {\n $this->set_class(trim($this->uri->filter_uri(trim($_GET[$_c]))));\n\n $_f = $this->config->item('function_trigger');\n if ( ! empty($_GET[$_f]))\n {\n $this->set_method(trim($this->uri->filter_uri($_GET[$_f])));\n }\n\n $this->uri->rsegments = array(\n 1 => $this->class,\n 2 => $this->method\n );\n }\n else\n {\n $this->_set_default_controller();\n }\n\n // Routing rules don't apply to query strings and we don't need to detect\n // directories, so we're done here\n return;\n }\n\n // Load the routes.php file.\n if (file_exists(APPPATH.'config/routes.php'))\n {\n include(APPPATH.'config/routes.php');\n }\n\n if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/routes.php'))\n {\n include(APPPATH.'config/'.ENVIRONMENT.'/routes.php');\n }\n\n // Validate & get reserved routes\n if (isset($route) && is_array($route))\n {\n isset($route['default_controller']) && $this->default_controller = $route['default_controller'];\n isset($route['translate_uri_dashes']) && $this->translate_uri_dashes = $route['translate_uri_dashes'];\n unset($route['default_controller'], $route['translate_uri_dashes']);\n\n foreach ($this->verbs as $verb) {\n if (isset($route[$verb])) {\n $this->closure_routes[$verb] = $route[$verb];\n\n unset($route[$verb]);\n }\n }\n\n $this->routes = $route;\n }\n\n // Is there anything to parse?\n if ($this->uri->uri_string !== '')\n {\n $this->_parse_routes();\n }\n else\n {\n $this->_set_default_controller();\n }\n }", "title": "" }, { "docid": "ca3c47a9109be6b37f1f2f0961499cf5", "score": "0.5826047", "text": "function setRoute(DynamicValue $p_route):void\n {\n $this->route=$p_route; \n }", "title": "" }, { "docid": "bee648492e2308baa028870fe49c8dd4", "score": "0.58164716", "text": "function init()\n {\n $router = new Router();\n return $router;\n }", "title": "" }, { "docid": "c88b0349dc6847469f838e1a42d2fed8", "score": "0.58068323", "text": "function beforeRoute()\n {\n }", "title": "" }, { "docid": "eb4255cff62229d420d1891ef3a4f63f", "score": "0.5802455", "text": "public function startup() \n\t{\n\t\t//load component classes\n\t\t$this->_loadFiles($this->config->getConfigValue('controller_dir', '/controllers'));\n\t\t$this->_loadFiles($this->config->getConfigValue('model_dir', '/models'));\n\t\t\n\t\t$this->addEventListenerTo('Router', 'router_collect_routes', array(&$this, 'routes'));\n\t}", "title": "" }, { "docid": "98b59a1687f0061f80fb93ded6570934", "score": "0.57967734", "text": "public function __construct() {\n parent::__construct();\n $this->privileges = [\"page-all\", \"page-system-staticroutes-editroute\"];\n $this->change_note = \"Added static route via API\";\n }", "title": "" }, { "docid": "76953ef6de3da19a72c5a61699f401b6", "score": "0.57892525", "text": "function route () {\n\t\tif (!method_exists($this->controller, $this->method)) {\n\t\t\t$this->controller = 'AppController';\n\t\t\t$this->method = 'four_zero_four';\n\t\t}\n\n\t\t// set controller object\n\t\t$controller_object = new $this->controller();\n\n\t\tif (!empty($this->params)) {\n\t\t\t// params not empty, call method with them\n\t\t\t@call_user_func_array([$controller_object, $this->method], $this->params);\n\t\t}\n\t\telse {\n\t\t\t// call method with no params\n\t\t\t@call_user_func([$controller_object, $this->method]);\n\t\t}\n\t}", "title": "" }, { "docid": "0d7c791166223adf2645c1c0fe768a8f", "score": "0.5781468", "text": "protected function initialize()\n {\n parent::initialize();\n\n self::creating([self::class, 'generateLink']);\n }", "title": "" }, { "docid": "e810687069bdfe8cd4dd05c90b3a0bc2", "score": "0.57612115", "text": "protected function setupRoutes(){\n /** Gets all the units ordered by name. */\n $this->GET('/units', [ 'cookbook\\controllers\\UnitController', 'doGet']);\n \n /** creates a new unit */\n $this->POST('/units', [ 'cookbook\\controllers\\UnitController', 'doCreate']);\n \n /** delete a unit */\n $this->DELETE('/units/{id}', [ 'cookbook\\controllers\\UnitController', 'doDelete']);\n \n \n \n /** Gets all the countries ordered by name. */\n $this->GET('/countries', [ 'cookbook\\controllers\\CountryController', 'doGet']);\n \n /** creates a new country */\n $this->POST('/countries', [ 'cookbook\\controllers\\CountryController', 'doCreate']);\n \n /** updates a country */\n $this->PUT('/countries/{id}', [ 'cookbook\\controllers\\CountryController', 'doUpdate']);\n \n /** delete a country */\n $this->DELETE('/countries/{id}', [ 'cookbook\\controllers\\CountryController', 'doDelete']);\n }", "title": "" }, { "docid": "2dc473f209865180239cd749fd44a288", "score": "0.57593334", "text": "abstract public function register_routes();", "title": "" }, { "docid": "0568d84498c558d0f0bf2f653f061a55", "score": "0.57507074", "text": "public function clear()\n {\n $this->_routes = array();\n }", "title": "" }, { "docid": "338b36586c627cc9d779cad209c5b535", "score": "0.5743707", "text": "private function setRoutes()\n {\n $this->routes = new RouteCollection();\n $fileLocator = new FileLocator(array(__DIR__));\n $loader = new YamlFileLoader($fileLocator);\n $routes = $loader->load(__DIR__.'/../../conf/routes.yml');\n\n foreach ($routes as $route => $value) {\n $controllerStr = 'src\\Controller\\\\'.explode('::', $value->getDefaults()['_controller'])[0];\n $controller = new $controllerStr;\n\n $this->routes->add($route, new Route(\n $value->getPath(),\n array('_controller' => array($controller, explode('::', $value->getDefaults()['_controller'])[1])),\n $value->getRequirements(),\n array(),\n '',\n array(),\n $value->getMethods()\n ));\n }\n }", "title": "" } ]
b736632f9952e4d7199faf7d0a98ddc8
Remove the specified Document from storage.
[ { "docid": "63b7a09f1f90d61a9cb8f9531627b5d2", "score": "0.0", "text": "public function destroyVerordnung(Request $request)\n {\n $res = Verordnung::where('id', $request->get('id'))->delete();\n return $res;\n }", "title": "" } ]
[ { "docid": "6da5a8f0702c334cf591a779d5d4eac2", "score": "0.73882836", "text": "public function removeDocument() {\n $file = $this->getFullName();\n if ( $file && file_exists($file) ) {\n unlink( $file );\n }\n }", "title": "" }, { "docid": "f036b8dff0d05956be5fbc31d77058e4", "score": "0.70638436", "text": "public function destroy(Document $document)\n {\n //\n }", "title": "" }, { "docid": "f036b8dff0d05956be5fbc31d77058e4", "score": "0.70638436", "text": "public function destroy(Document $document)\n {\n //\n }", "title": "" }, { "docid": "f036b8dff0d05956be5fbc31d77058e4", "score": "0.70638436", "text": "public function destroy(Document $document)\n {\n //\n }", "title": "" }, { "docid": "f036b8dff0d05956be5fbc31d77058e4", "score": "0.70638436", "text": "public function destroy(Document $document)\n {\n //\n }", "title": "" }, { "docid": "f036b8dff0d05956be5fbc31d77058e4", "score": "0.70638436", "text": "public function destroy(Document $document)\n {\n //\n }", "title": "" }, { "docid": "9f9c2bf4e4ad9f399e21a4ddcaeebcf6", "score": "0.69105476", "text": "public function destroy(Document $document)\n {\n $document->delete();\n }", "title": "" }, { "docid": "859401d3d17f79b96482307703c095b2", "score": "0.6820718", "text": "function destroy(Document $document) \n {\n if(!$document->exists()) {\n return false;\n }\n\n return $this->accessAdapter()->delete([static::$primaryKey => $document->id], ['limit' => 1]);\n }", "title": "" }, { "docid": "3d791da7fe4114bb68250c749be553bf", "score": "0.67760634", "text": "public function remove(Document\\Base $document)\n {\n $this->dm->remove($document);\n }", "title": "" }, { "docid": "19f2ba4374e66c7f024ee349ee09e2b8", "score": "0.6597447", "text": "public static function deleteDocument($documentId);", "title": "" }, { "docid": "09c1c666f7610acc7d49623d89cfbc34", "score": "0.6549814", "text": "public function delete($document)\r\n\t{\r\n\t\treturn $this->getWriteConnection()->delete($document);\r\n\t}", "title": "" }, { "docid": "c1cc2616f2328c1b441aa2cc2cf75045", "score": "0.64903", "text": "public function destroy(Document $Document)\n {\n Document::findOrFail($Document->id)->delete();\n return redirect()->back()->with('success','Document Type deleted successfully !');\n \n }", "title": "" }, { "docid": "858fa695909fefb274858d214e0072aa", "score": "0.63930106", "text": "public function deleteDocument($rid, $version = null, $database = null);", "title": "" }, { "docid": "1f69434387077bf0ec3ad0fcb8945e2e", "score": "0.6372886", "text": "public function removeDocumentsAction(array $options = []): Model;", "title": "" }, { "docid": "95dd3d8b5fb493b8fa04881f841db1b1", "score": "0.63538337", "text": "public function destroy(Document $document)\n {\n //TODO: add checks and validation\n $document->delete();\n\n //redirect\n return redirect($this->basepath); \n }", "title": "" }, { "docid": "378b8eb285185a1a8b9e15c79817c4a0", "score": "0.63120604", "text": "public function destroy(Document $document)\n {\n //\n $document->delete();\n return redirect()->route('documents.index')->with('opcion','de');\n\n }", "title": "" }, { "docid": "dbabbc72195045d823f720803561575f", "score": "0.62601465", "text": "public function deindexRemovedDocument(RemoveEvent $event)\n {\n $document = $event->getDocument();\n\n if (!$document instanceof StructureBehavior) {\n return;\n }\n\n if (!$document instanceof WorkflowStageBehavior) {\n $this->searchManager->deindex($document);\n } else {\n $workflowStage = $document->getWorkflowStage();\n\n foreach (WorkflowStage::$stages as $stage) {\n $document->setWorkflowStage($stage);\n $this->searchManager->deindex($document);\n }\n\n $document->setWorkflowStage($workflowStage);\n }\n }", "title": "" }, { "docid": "57e9ad764281a2fa8748134cf8b0d38b", "score": "0.62303704", "text": "public function remove($record) {\n\t\t$index = $this->getIndex();\n\t\t$type = $index->getType($record->getElasticaType());\n\n\t\t$type->deleteDocument($record->getElasticaDocument());\n\t}", "title": "" }, { "docid": "b8fcc04341dac8f2f4e12682bd59b018", "score": "0.62229496", "text": "function deleteDocument() {\r\n global $synAbsolutePath, ${$this->name}, ${$this->name.\"_name\"}, ${$this->name.\"_old\"};\r\n include_once(\"../../includes/php/utility.php\");\r\n\r\n $ext = $this->translate($this->getValue());\r\n $mat = $this->translatePath($this->mat);\r\n $filename = $this->createFilename(false);\r\n $documentRoot = $synAbsolutePath . '/';\r\n $fileToBeRemoved = $documentRoot . $mat . $filename . '*';\r\n foreach (glob($fileToBeRemoved) as $filename){\r\n unlink($filename);\r\n }\r\n }", "title": "" }, { "docid": "8702cc911a51e067de1f8ce5fdd2d4a9", "score": "0.62229276", "text": "function removeDocument($id,$type = null){\n\t\tlist($_default_type,$id) = $this->_determineDocumentTypeAndId($id);\n\n\t\tif(is_null($type)){ $type = $_default_type; }\n\t\t$params = array(\n\t\t\t\"id\" => $id,\n\t\t\t\"type\" => $type,\n\t\t\t\"stage\" => $this->_getStage(),\n\t\t\t\"auth_token\" => $this->_getAuthToken(),\n\t\t);\n\t\t$apf = $this->getApiDataFetcher();\n\t\t$data = $apf->post(\"documents/destroy\",$params);\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "7ce8ce53c940abf7e96ef1e37b58de17", "score": "0.6213983", "text": "public function accountingDocumentRemoved(AccountingDocument $document): void\n {\n $this->accountingDocuments->removeElement($document);\n }", "title": "" }, { "docid": "051ea188102ed091a396293a6df7ac62", "score": "0.61824244", "text": "public function delete()\n {\n // delete the file (and previous versions of files)\n $filesToDelete = array();\n $storageFolder = $this->getStorageFolder();\n\n if (file_exists($storageFolder)) {\n if ($handle = opendir($storageFolder)) {\n while (false !== ($entry = readdir($handle))) {\n // only delete if filename starts the the relevant ID\n if (strpos($entry, $this->ID.'~') === 0) {\n $filesToDelete[] = $entry;\n }\n }\n\n closedir($handle);\n\n //delete all this files that have the id of this document\n foreach ($filesToDelete as $file) {\n $filePath = $storageFolder .DIRECTORY_SEPARATOR . $file;\n\n if (is_file($filePath)) {\n unlink($filePath);\n }\n }\n }\n }\n\n // get rid of any versions have saved for this DMSDocument, too\n if (DMSDocument_versions::$enable_versions) {\n $versions = $this->getVersions();\n\n if ($versions->Count() > 0) {\n foreach ($versions as $v) {\n $v->delete();\n }\n }\n }\n\n return parent::delete();\n }", "title": "" }, { "docid": "c516ed19f881e9f6c230d5487edc746e", "score": "0.6181407", "text": "public function destroy(Document $document)\n {\n //\n $inquiry_id = $document->inquiry_id;\n $document->delete();\n\n session()->flash('success', 'Document deleted!');\n\n return redirect(\"/inquiries/$inquiry_id\");\n }", "title": "" }, { "docid": "ff530292db4dc0197713f0e519e5f238", "score": "0.6156822", "text": "public function deleteDocument()\n {\n $user = User::first();\n\n $params = [\n 'index' => 'custom-users',\n 'id' => $user->id\n ];\n\n return $this->elasticSearchClient->delete($params);\n }", "title": "" }, { "docid": "d968eaffe2165c7fafe16599b3e2c81e", "score": "0.61539483", "text": "public function deleteAction(Request $request, Document $document)\n {\n $form = $this->createDeleteForm($document);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n // Create an ArrayCollection of the current Tag objects in the database\n if($document->getDocumentLines()){\n foreach ($document->getDocumentLines() as $documentLine) {\n $em->remove($documentLine);\n }\n }\n $em->remove($document);\n $em->flush();\n }\n\n return $this->redirectToRoute('document_index');\n }", "title": "" }, { "docid": "582993e910fdfecce8f9d00b1e8bc17d", "score": "0.6150832", "text": "public function deleteAction(Request $request, Documents $document)\n {\n $form = $this->createDeleteForm($document);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->remove($document);\n $em->flush();\n }\n\n return $this->redirectToRoute('documents_index');\n }", "title": "" }, { "docid": "6ee300147401319b541683c85b7a1e7f", "score": "0.61436427", "text": "protected function remove() \n\t{\n\n\t\t$sql = \"SELECT id FROM docmgr.dm_file_history WHERE object_id='\".$this->objectId.\"'\";\n\t\t$info = $this->DB->fetch($sql,1);\n\t\n\t\t//get our directory path for this object\n\t\t$dirPath = $this->getObjectDir($this->objectId);\n\t\n\t\t//delete the thumbnail and preview\n\t\t@unlink(THUMB_DIR.\"/\".$dirPath.\"/\".$this->objectId.\".docmgr\");\n\t\t@unlink(PREVIEW_DIR.\"/\".$dirPath.\"/\".$this->objectId.\".docmgr\");\n\t\n\t\t//delete any physical files associated with our revisions\n\t\tif (is_array($info[\"id\"])) \n\t\t\tforeach ($info[\"id\"] AS $id) @unlink(DATA_DIR.\"/\".$dirPath.\"/\".$id.\".docmgr\");\n\t\n\t\t$sql = \"DELETE FROM docmgr.dm_file_history WHERE object_id='\".$this->objectId.\"';\";\n\t\t$this->DB->query($sql);\n\n\t}", "title": "" }, { "docid": "b5298109b037ab53156f3ec9070d8ad7", "score": "0.60807085", "text": "public function handleRemove(RemoveEvent $event)\n {\n $document = $event->getDocument();\n $node = $this->documentRegistry->getNodeForDocument($document);\n\n $node->remove();\n }", "title": "" }, { "docid": "2291e71ad58fceadec0581ced500e39b", "score": "0.60788214", "text": "public function deleteDocument($document, array $options = [])\n {\n if ($document instanceof FirestoreDocument) {\n $document = FirestoreHelper::normalizeCollection($document->getRelativeName());\n }\n\n $this->validatePath($document);\n\n $response = $this->client->request('DELETE', 'documents/' . FirestoreHelper::normalizeCollection($document), $options);\n\n return count($response) === 0 ? true : false;\n }", "title": "" }, { "docid": "20340ae69f46965449dc508b639c84e9", "score": "0.60587233", "text": "public function remove_storage()\n\t{\n\t\t$this->_storage->destroy_storage();\n\t}", "title": "" }, { "docid": "0d767b5430f4a8d582420975d071c773", "score": "0.6017389", "text": "public function deleteDocument($param)\n {\n return $this->es->delete($param);\n }", "title": "" }, { "docid": "5d5d05c7a73a03d4e3ad20839892cfd7", "score": "0.6003557", "text": "public function deleteTenderDoc(){\n\t\t\n\t\t$docId = $this->getRequest()->param('ID');\n\t\t\n\t\t$tenderId = $_GET['tenderId'];\n\t\t\n\t\t$doc = $_GET['doc'];\n\t\t\n\t\t$tender = Tender::get()->byID($tenderId);\n\t\t\n\t\t$tenderDoc = File::get()->byID($docId);\n\t\t\n\t\t$tender->$doc()->remove($tenderDoc);\n\t\t\n\t\tunlink($tenderDoc->AbsoluteLink());\n\t\t\n\t\t$tenderDoc->delete();\n\t\t\n\t\treturn $this->redirectBack();\n\t\t\n\t}", "title": "" }, { "docid": "fbcc06567ee96e97781e508dfa8a69b4", "score": "0.5882134", "text": "public function destroy(Document $document)\n {\n throw new \\Exception('Argh');\n }", "title": "" }, { "docid": "de0cdadee3d0d9b7c06362f35127dfe5", "score": "0.58794737", "text": "public function destroy($id)\n\t{\n\t\t//\n $doc = Document::find($id);\n if($doc->file)\n {\n $filename = $doc->file;\n $file= public_path(). \"/assets/documents/\".$filename;\n unlink($file);\n }\n\n $doc->delete();\n\n return Redirect::route('admin.docs.index')->with('pesanSuccess','Document Has Been Deleted');\n\n\t}", "title": "" }, { "docid": "6707daffe05f2d285c7603e0e0bae86f", "score": "0.5847609", "text": "public static function deleteByDocument(int $id): void\n\t{\n\t\tif ($id <= 0)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t$conn = Application::getConnection();\n\t\t$helper = $conn->getSqlHelper();\n\t\t$conn->queryExecute(\n\t\t\t'delete from ' . $helper->quote(self::getTableName())\n\t\t\t. ' where ' . $helper->quote('DOC_ID') . ' = ' . $id\n\t\t);\n\t\tunset($helper, $conn);\n\t}", "title": "" }, { "docid": "bea622467e2cbf08ed226a9bb532c012", "score": "0.58439225", "text": "public function deleteDocument($documentId)\n {\n $this->deleteDocuments([$documentId]);\n }", "title": "" }, { "docid": "f775a464f5a1275495346ed0af9b8012", "score": "0.58327186", "text": "function delete($id)\n\t{\n\t\tif(!$this->Session->user('ROLE'))\n\t\t{\n\t\t\t$this->redirect('personnels/login');\n\t\t}\n\t\t$this->loadModel('Document');\n\t\t$doc = $this->Document->findFirst(array(\n\t\t\t'conditions' => array('id'=>$id)\n\t\t));\n\t\tunlink(WEBROOT.DS.'images'.DS.$doc->URL);\n\t\t$this->Document->delete($id);\n\t\t$this->Session->setFlash(\"Le Document a bien été supprimé\");\n\t\t$this->redirect('documents');\n\t}", "title": "" }, { "docid": "a57933422f7f967e032c47b7a4ae1869", "score": "0.57732993", "text": "public function delete()\n {\n $builder = self::builder();\n\n $builder->remove($this);\n }", "title": "" }, { "docid": "7d312df03061b9baf9ac8b66853d1980", "score": "0.5737684", "text": "public function deleteDocument($id)\n {\n $where = $this->_db->quoteInto('doc_id = ?', $id);\n $this->_db->delete('documents', $where);\n }", "title": "" }, { "docid": "553fd4de69c491a605f27a0d1932c1df", "score": "0.5732438", "text": "public function destroy(PersonDoc $personDoc)\n {\n //\n }", "title": "" }, { "docid": "0af6b97fc81790da37bc5771fb3351a6", "score": "0.5717902", "text": "public function removeMerchantDocument(Request $request)\n\t{\n\t\t$user = Auth::guard('merchant')->user();\n\n\t\t$merchantDocument = MerchantDocument::where('merchant_id', $user->id)->first();\n\n\t\tif($request->type == 'proprietor_pan_card')\n\t\t{\n\t\t\t@unlink(storage_path($this->file_storage . $user->id . '/' . $merchantDocument->proprietor_pan_card_file));\n\n\t\t\t//ACTIVITY LOG\n\t\t\tactivity($this->eventUpdateMerchantDocument)->causedBy($user)->withProperties([\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'attributes' =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'proprietor_pan_card_file' => null,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'old' =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'proprietor_pan_card_file' => $merchantDocument->proprietor_pan_card_file,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t])->log($this->removeMerchantDocumentSuccess);\n\t\t\t//END ACTIVITY LOG\n\n\t\t\t$merchantDocument->proprietor_pan_card_file = null;\n\t\t\t$merchantDocument->proprietor_pan_card_path = null;\n\t\t}\n\n\t\tif($request->type == 'gumasta')\n\t\t{\n\t\t\t@unlink(storage_path($this->file_storage . $user->id . '/' . $merchantDocument->gumasta_file));\n\n\t\t\t//ACTIVITY LOG\n\t\t\tactivity($this->eventUpdateMerchantDocument)->causedBy($user)->withProperties([\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'attributes' =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'gumasta_file' => null,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'old' =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'gumasta_file' => $merchantDocument->gumasta_file,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t])->log($this->removeMerchantDocumentSuccess);\n\t\t\t//END ACTIVITY LOG\n\n\t\t\t$merchantDocument->gumasta_file = null;\n\t\t\t$merchantDocument->gumasta_path = null;\n\t\t}\n\n\t\tif($request->type == 'gst_in')\n\t\t{\n\t\t\t@unlink(storage_path($this->file_storage . $user->id . '/' . $merchantDocument->gst_in_file));\n\n\t\t\t//ACTIVITY LOG\n\t\t\tactivity($this->eventUpdateMerchantDocument)->causedBy($user)->withProperties([\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'attributes' =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'gst_in_file' => null,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'old' =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'gst_in_file' => $merchantDocument->gst_in_file,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t])->log($this->removeMerchantDocumentSuccess);\n\t\t\t//END ACTIVITY LOG\n\n\t\t\t$merchantDocument->gst_in_file = null;\n\t\t\t$merchantDocument->gst_in_path = null;\n\t\t}\n\n\t\tif($request->type == 'importer_exporter_code')\n\t\t{\n\t\t\t@unlink(storage_path($this->file_storage . $user->id . '/' . $merchantDocument->importer_exporter_code_file));\n\n\t\t\t//ACTIVITY LOG\n\t\t\tactivity($this->eventUpdateMerchantDocument)->causedBy($user)->withProperties([\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'attributes' =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'importer_exporter_code_file' => null,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'old' =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'importer_exporter_code_file' => $merchantDocument->importer_exporter_code_file,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t])->log($this->removeMerchantDocumentSuccess);\n\t\t\t//END ACTIVITY LOG\n\n\t\t\t$merchantDocument->importer_exporter_code_file = null;\n\t\t\t$merchantDocument->importer_exporter_code_path = null;\n\t\t}\n\n\t\tif($request->type == 'passport')\n\t\t{\n\t\t\t@unlink(storage_path($this->file_storage . $user->id . '/' . $merchantDocument->passport_file));\n\n\t\t\t//ACTIVITY LOG\n\t\t\tactivity($this->eventUpdateMerchantDocument)->causedBy($user)->withProperties([\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'attributes' =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'passport_file' => null,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'old' =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'passport_file' => $merchantDocument->passport_file,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t])->log($this->removeMerchantDocumentSuccess);\n\t\t\t//END ACTIVITY LOG\n\n\t\t\t$merchantDocument->passport_file = null;\n\t\t\t$merchantDocument->passport_path = null;\n\t\t}\n\n\t\tif($request->type == 'aadhar_card')\n\t\t{\n\t\t\t@unlink(storage_path($this->file_storage . $user->id . '/' . $merchantDocument->aadhar_card_file));\n\n\t\t\t//ACTIVITY LOG\n\t\t\tactivity($this->eventUpdateMerchantDocument)->causedBy($user)->withProperties([\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'attributes' =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'aadhar_card_file' => null,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'old' =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'aadhar_card_file' => $merchantDocument->aadhar_card_file,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t])->log($this->removeMerchantDocumentSuccess);\n\t\t\t//END ACTIVITY LOG\n\n\t\t\t$merchantDocument->aadhar_card_file = null;\n\t\t\t$merchantDocument->aadhar_card_path = null;\n\t\t}\n\n\t\tif($request->type == 'driving_license')\n\t\t{\n\t\t\t@unlink(storage_path($this->file_storage . $user->id . '/' . $merchantDocument->driving_license_file));\n\n\t\t\t//ACTIVITY LOG\n\t\t\tactivity($this->eventUpdateMerchantDocument)->causedBy($user)->withProperties([\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'attributes' =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'driving_license_file' => null,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'old' =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'driving_license_file' => $merchantDocument->driving_license_file,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t])->log($this->removeMerchantDocumentSuccess);\n\t\t\t//END ACTIVITY LOG\n\n\t\t\t$merchantDocument->driving_license_file = null;\n\t\t\t$merchantDocument->driving_license_path = null;\n\t\t}\n\n\t\tif($request->type == 'voter_id_card')\n\t\t{\n\t\t\t@unlink(storage_path($this->file_storage . $user->id . '/' . $merchantDocument->voter_id_card_file));\n\n\t\t\t//ACTIVITY LOG\n\t\t\tactivity($this->eventUpdateMerchantDocument)->causedBy($user)->withProperties([\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'attributes' =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'voter_id_card_file' => null,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'old' =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'voter_id_card_file' => $merchantDocument->voter_id_card_file,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t])->log($this->removeMerchantDocumentSuccess);\n\t\t\t//END ACTIVITY LOG\n\n\t\t\t$merchantDocument->voter_id_card_file = null;\n\t\t\t$merchantDocument->voter_id_card_path = null;\n\t\t}\n\n\t\tif($request->type == 'property_tax_receipt')\n\t\t{\n\t\t\t@unlink(storage_path($this->file_storage . $user->id . '/' . $merchantDocument->property_tax_receipt_file));\n\n\t\t\t//ACTIVITY LOG\n\t\t\tactivity($this->eventUpdateMerchantDocument)->causedBy($user)->withProperties([\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'attributes' =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'property_tax_receipt_file' => null,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'old' =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'property_tax_receipt_file' => $merchantDocument->property_tax_receipt_file,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t])->log($this->removeMerchantDocumentSuccess);\n\t\t\t//END ACTIVITY LOG\n\n\t\t\t$merchantDocument->property_tax_receipt_file = null;\n\t\t\t$merchantDocument->property_tax_receipt_path = null;\n\t\t}\n\n\t\tif($request->type == 'bank_canceled_cheque')\n\t\t{\n\t\t\t@unlink(storage_path($this->file_storage . $user->id . '/' . $merchantDocument->bank_canceled_cheque_file));\n\n\t\t\t//ACTIVITY LOG\n\t\t\tactivity($this->eventUpdateMerchantDocument)->causedBy($user)->withProperties([\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'attributes' =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'bank_canceled_cheque_file' => null,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'old' =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'bank_canceled_cheque_file' => $merchantDocument->bank_canceled_cheque_file,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t])->log($this->removeMerchantDocumentSuccess);\n\t\t\t//END ACTIVITY LOG\n\n\t\t\t$merchantDocument->bank_canceled_cheque_file = null;\n\t\t\t$merchantDocument->bank_canceled_cheque_path = null;\n\t\t}\n\n\t\tif($request->type == 'audited_balance_sheet')\n\t\t{\n\t\t\t@unlink(storage_path($this->file_storage . $user->id . '/' . $merchantDocument->audited_balance_sheet_file));\n\n\t\t\t//ACTIVITY LOG\n\t\t\tactivity($this->eventUpdateMerchantDocument)->causedBy($user)->withProperties([\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'attributes' =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'audited_balance_sheet_file' => null,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'old' =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'audited_balance_sheet_file' => $merchantDocument->audited_balance_sheet_file,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t])->log($this->removeMerchantDocumentSuccess);\n\t\t\t//END ACTIVITY LOG\n\n\t\t\t$merchantDocument->audited_balance_sheet_file = null;\n\t\t\t$merchantDocument->audited_balance_sheet_path = null;\n\t\t}\n\n\t\tif($request->type == 'current_account_statement')\n\t\t{\n\t\t\t@unlink(storage_path($this->file_storage . $user->id . '/' . $merchantDocument->current_account_statement_file));\n\n\t\t\t//ACTIVITY LOG\n\t\t\tactivity($this->eventUpdateMerchantDocument)->causedBy($user)->withProperties([\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'attributes' =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'current_account_statement_file' => null,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'old' =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'current_account_statement_file' => $merchantDocument->current_account_statement_file,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t])->log($this->removeMerchantDocumentSuccess);\n\t\t\t//END ACTIVITY LOG\n\n\t\t\t$merchantDocument->current_account_statement_file = null;\n\t\t\t$merchantDocument->current_account_statement_path = null;\n\t\t}\n\n\t\tif($request->type == 'income_tax_return')\n\t\t{\n\t\t\t@unlink(storage_path($this->file_storage . $user->id . '/' . $merchantDocument->income_tax_return_file));\n\n\t\t\t//ACTIVITY LOG\n\t\t\tactivity($this->eventUpdateMerchantDocument)->causedBy($user)->withProperties([\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'attributes' =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'income_tax_return_file' => null,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'old' =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'income_tax_return_file' => $merchantDocument->income_tax_return_file,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t])->log($this->removeMerchantDocumentSuccess);\n\t\t\t//END ACTIVITY LOG\n\n\t\t\t$merchantDocument->income_tax_return_file = null;\n\t\t\t$merchantDocument->income_tax_return_path = null;\n\t\t}\n\n\t\tif($request->type == 'kartpay_merchant_agreement')\n\t\t{\n\t\t\t@unlink(storage_path($this->file_storage . $user->id . '/' . $merchantDocument->kartpay_merchant_agreement_file));\n\n\t\t\t//ACTIVITY LOG\n\t\t\tactivity($this->eventUpdateMerchantDocument)->causedBy($user)->withProperties([\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'attributes' =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'kartpay_merchant_agreement_file' => null,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'old' =>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'kartpay_merchant_agreement_file' => $merchantDocument->kartpay_merchant_agreement_file,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t])->log($this->removeMerchantDocumentSuccess);\n\t\t\t//END ACTIVITY LOG\n\n\t\t\t$merchantDocument->kartpay_merchant_agreement_file = null;\n\t\t\t$merchantDocument->kartpay_merchant_agreement_path = null;\n\t\t}\n\n\t\t$merchantDocument->save();\n\n\t\treturn Response::json([\n\t\t\t\t\t\t\t\t'response' => 'Success',\n\t\t\t\t\t\t\t\t'type' => $request->type\n\t\t\t\t\t\t\t ]);\n\t}", "title": "" }, { "docid": "5589342c7ee10fa66f011424d847cde7", "score": "0.56952477", "text": "protected function deleteDocument($docu_plan)\n {\n try\n {\n if (Storage::disk('planeamiento')->exists($docu_plan))\n {\n Storage::disk('planeamiento')->delete($docu_plan);\n }\n }\n catch (\\Exception $e) { }\n }", "title": "" }, { "docid": "897b7b10834523b5df6cc27760af00cb", "score": "0.56568426", "text": "public function destroy($id)\n {\n $data = Document::find($id);\n\t\tif($data->id)\n\t\t{\n\t\t\tunlink('./uploads/documents/'.$data->document_name);\n\t\t\t$data->delete();\n\t\t}\n\t\treturn back()->with(array('success'=>'Saved Successfully'));\n }", "title": "" }, { "docid": "3b7b0d232d3fce6f7792a9d546e38280", "score": "0.56545895", "text": "public function dropDocument(string $name)\r\n {\r\n \ttry {\r\n if (empty($name)) throw new Exception('Document name missing');\r\n if ($this->db->collection($this->name)->document($name)->snapshot()->exists()) {\r\n \t\treturn $this->db->collection($this->name)->document($name)->delete();\r\n \t\t} else {\r\n throw new Exception('Document are not exists');\r\n }\r\n } catch (Exception $exception) {\r\n return $exception->getMessage();\r\n }\r\n }", "title": "" }, { "docid": "996723978101968ed6e8854129375914", "score": "0.5652752", "text": "public function destroy(Request $request)\n {\n $res = Document::where('id', $request->get('id'))->delete();\n return $res;\n }", "title": "" }, { "docid": "63c746e83e4810da00eb276176f9c1b8", "score": "0.56426054", "text": "public function clear(): void\n {\n try {\n $this->collection->remove($this->id, $this->options->removeOptions());\n } catch (DocumentNotFoundException $ex) {\n return;\n }\n }", "title": "" }, { "docid": "2a1cc1ed76aa9b15a3a0593b8a08a734", "score": "0.56281453", "text": "function delete() {\n\t\tif (SyndLib::runHook('lob_storage_delete', $this->_file)) {\n\t\t\t$this->_file = null;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "075d54d302de6cc65fb1186cf7b826f6", "score": "0.5628102", "text": "public function dropDocumentDatabase($documentName)\n {\n $class = $this->dm->getClassMetadata($documentName);\n if ($class->getMetadata('collection') === null) {\n throw new \\InvalidArgumentException('Cannot drop document database for entity documents.');\n }\n\n $this->dm->getDocumentDatabase($documentName)->drop();\n }", "title": "" }, { "docid": "91d8cfcac0e33aee30e35899bbd0a0c4", "score": "0.56207484", "text": "public function remove() {\n\t\tif ($this->exists()) {\n\t\t\tunlink($this->getFullName());\n\t\t}\n\t}", "title": "" }, { "docid": "893dc0f9edd4303f8e92916c96142dbe", "score": "0.56167614", "text": "public function deleted(Documents $documents)\n {\n //\n }", "title": "" }, { "docid": "b60207dd29ec1ddc56e2e583a8df7449", "score": "0.5589188", "text": "public function delete()\n {\n $this->repo = null;\n\n if ($this->exists()) {\n $this->filesystem->remove($this->path);\n }\n }", "title": "" }, { "docid": "d07cc9f42021d14a397f6d3a45019a15", "score": "0.55887365", "text": "public function deleteTenderSubmitDoc(){\n\t\t\n\t\t$docId = $this->getRequest()->param('ID');\n\t\t\n\t\t$submitId = $_GET['submitId'];\n\t\t\n\t\t$doc = $_GET['doc'];\n\t\t\n\t\t$submission = Submission::get()->byID($submitId);\n\t\t\n\t\t$submitDoc = File::get()->byID($docId);\n\t\t\n\t\t$submission->$doc()->remove($submitDoc);\n\t\t\n\t\tunlink($submitDoc->AbsoluteLink());\n\t\t\n\t\t$submitDoc->delete();\n\t\t\n\t\treturn $this->redirectBack();\n\t\t\n\t}", "title": "" }, { "docid": "447cc2710e071b604098d6ae4aa1aa06", "score": "0.55867225", "text": "public function destroy($id_documento)\n {\n $documento = Documento::with('pagos')->find($id_documento);\n $compra = Compra::where('documento',$id_documento);\n $pagos = $documento->pagos;\n //echo '<pre>' , var_dump($pagos) , '</pre>';\n if (count($pagos)){\n foreach ($pagos as $pago){\n $pago->monto -= $pago->pivot->monto;\n $pago->save();\n }\n }\n $documento->pagos()->detach();\n $documento->delete();\n $compra->delete();\n if ($pagos){\n foreach ($pagos as $pago){\n //echo '<pre>' , var_dump($pago->documentos) , '</pre>';\n //echo '<pre>' , var_dump(count($pago->documentos)) , '</pre>';\n if(!count($pago->documentos)){\n $pago->delete();\n }\n }\n }\n\n return redirect('/Documento')->with('success', 'Documento Anulado');\n }", "title": "" }, { "docid": "8a6fa746286ee64577716778d184586a", "score": "0.5563071", "text": "public function destroy($id)\n {\n $document = Document::findOrFail($id);\n\n $document->delete();\n\n Toastr::warning('Ya no lo veremos por aqui.','Banner borrado');\n return redirect()->route('document.index');\n }", "title": "" }, { "docid": "1592b3038104b310e2c0b529a905d8bb", "score": "0.5560873", "text": "public function removePhoto($uploaded_doc_id)\n {\n return DB :: transaction(function() use ($uploaded_doc_id){\n $event = $this->query()->whereHas('documents', function($query) use($uploaded_doc_id){\n $query->where('document_resource.id', $uploaded_doc_id);\n })->first();\n\n /*unlink image from folder - storage*/\n $file_path = $event->eventImageFileDir($uploaded_doc_id);\n if(is_file($file_path)){\n unlink($file_path);\n }\n /*Detach image from pivot table*/\n DB::table('document_resource')->where('id', $uploaded_doc_id)->delete();\n return $event;\n });\n }", "title": "" }, { "docid": "5d5ba129d412e8206bce9626e4224e6c", "score": "0.55465406", "text": "public function destroy($id)\n {\n $document = Document::find($id);\n $document->delete();\n return redirect('admin/document')->with(\"status\", \"Document deleted successfully\");\n }", "title": "" }, { "docid": "e864cbadab4f8afbbfa817ff99fe5be8", "score": "0.55442643", "text": "public function delete_document_record($id){\r\n\t\t$this->db->where('document_id', $id);\r\n\t\t$this->db->delete('xin_employee_documents');\r\n\t\t\r\n\t}", "title": "" }, { "docid": "a753ded2c43b7abd6dcf886dafe84efb", "score": "0.55433077", "text": "public function removeDocuments(Request $request)\n {\n $status = 200;\n $response = [];\n $documents = $request->documents_ids;\n $flag = false;\n $user_id = Auth::guard('api')->user()->id;\n if (!empty($documents)) {\n foreach ($documents as $key => $id) {\n $file = Document::where('user_id', $user_id)->find($id);\n if (!empty($file)) {\n if (!empty($file->uploaded_by)) {\n $flag = true;\n } else {\n $file_name = substr($file->filename, 0, strripos($file->filename, '.', 0));\n //if document added by organization \n $organization_id = explode('/', $file->url)[4];\n $folder = '/users/' . $user_id . '/common-documents/';\n //remove the file from the folder\n Storage::disk('public')->delete($folder . $file_name . '.txt');\n //remove the file from the database\n Document::destroy($id);\n }\n }\n }\n if ($flag) {\n $response = [\n 'success' => false,\n 'errors' => \\Lang::get('lang.document-upload-error'),\n ];\n } else {\n $response = [\n 'success' => true,\n 'message' => count($documents) > 1 ? \\Lang::get('lang.documents-removed-successfully') : \\Lang::get('lang.document-removed-successfully'),\n ];\n }\n return response()->json($response, $status);\n } else {\n //if documents are not found\n $err_response = [\n 'success' => false,\n 'errors' => \\Lang::get('lang.document-not-exist')\n ];\n return response()->json($err_response, 200);\n }\n }", "title": "" }, { "docid": "534632411fa3ea8e2929a415ae4cfdae", "score": "0.5542019", "text": "public function destroy($id)\n {\n $this->document->find($id)->delete();\n\n return Redirect::route('profile.documents.index');\n }", "title": "" }, { "docid": "ab9cc7dd24158523144b06a104a759d3", "score": "0.5540734", "text": "public function deleteDoc($doc) {\r\n\t\tif (!is_object($doc)) {\r\n\t\t\tthrow new InvalidArgumentException(\"Document should be an object\");\r\n\t\t}\r\n\r\n\t\tif (empty($doc->_id) OR empty($doc->_rev)) {\r\n\t\t\tthrow new Exception(\"Document should contain _id and _rev\");\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t\t$url = '/' . urlencode($this->dbname) . '/' . urlencode($doc->_id) . '?rev=' . urlencode($doc->_rev);\r\n\t\treturn $this->_queryAndTest('DELETE', $url, array(200, 202));\r\n\t}", "title": "" }, { "docid": "d6bebe26a1da68ec43da9f53767dc3a4", "score": "0.5534465", "text": "public function removeDocumentAction($title)\n {\n $dm = $this->container->get('doctrine.phpcr_odm.document_manager');\n\n $repository = new DocumentRepository($dm);\n $document = $repository->find('/'.$title);\n $dm->remove($document);\n $dm->flush();\n\n return new \\Symfony\\Component\\HttpFoundation\\Response('Deleted');\n }", "title": "" }, { "docid": "792bdb4710de88108a0ddef09c49525f", "score": "0.5516259", "text": "public function destroy(Request $request, $id){\n\n $id_sg = str_replace(\"-\",\"\",$id);\n $doc = Documentourl::findOrFail($id_sg);\n if ($doc->delete()) { // Borramos los archivos en el dicrectorio public\\docorigen\n if (\\File::exists($doc->urldoc) and (\\File::exists($doc->urlp))){\n \\File::delete($doc->urldoc, $doc->urlp);\n }else{\n abort(404);\n }\n };\n return redirect()->route('doc.show', ['idnotice' => $request->input('idnotice')])->with('status', 'Eliminación Exitosa!');\n\n }", "title": "" }, { "docid": "c313cb5fc43b276f7988c4653430e367", "score": "0.5506544", "text": "public function delete() {\n $this->data = false;\n unlink($this->path);\n }", "title": "" }, { "docid": "464ee2cf581a97fe2e12eb6f0c30a095", "score": "0.5499109", "text": "public function destroy_storage();", "title": "" }, { "docid": "25a28ec2377d900473b41a3eb07a611d", "score": "0.54903567", "text": "public function delete()\n {\n $path = $this->_media->getOriginal('path');\n if ($this->_media->driver) {\n Storage::disk($this->_media->driver)->delete($path);\n } else {\n Storage::delete($path);\n }\n }", "title": "" }, { "docid": "5992bc03912d25fb876de60492bf074e", "score": "0.5476519", "text": "public function delete()\n {\n $this->getDataStore()->delete($this);\n }", "title": "" }, { "docid": "54d4fd528f6c1fb83a645a2e2b99e245", "score": "0.54764235", "text": "public function destroy(Documenttype $documenttype)\n {\n $documenttype->delete();\n return redirect()->back()->with('success',\"Document Type Deleted\");\n }", "title": "" }, { "docid": "caedd2707a074ceb757c54714214b502", "score": "0.54732394", "text": "public function remove()\n {\n return Storage::disk($this->disk)->delete($this->path);\n }", "title": "" }, { "docid": "504b352a60046b3c677ade74932feedb", "score": "0.5468268", "text": "public function testDeleteDocument()\n {\n $client = $this->getDefaultClient();\n $engine = $this->getDefaultEngineName();\n\n $docFields = [['name' => 'title', 'value' => 'Title', 'type' => 'string']];\n $docId = 'deletedDoc';\n\n $client->createDocument($engine, self::getDefaultDocumentType(), $docId, $docFields);\n $this->assertNotEmpty($client->getDocument($engine, self::getDefaultDocumentType(), $docId));\n\n $client->deleteDocument($engine, self::getDefaultDocumentType(), $docId);\n\n $this->expectException(NotFoundException::class);\n $client->getDocument($engine, self::getDefaultDocumentType(), $docId);\n }", "title": "" }, { "docid": "91fe2f4d68e6e44fcf4b444ca1ef5804", "score": "0.5463444", "text": "public function delete_document($docid) {\n api_call('DELETE', $this->docs_url(), array(\"docid\" => $docid));\n }", "title": "" }, { "docid": "aa72849e060efecd8fa3815ae640512d", "score": "0.54632586", "text": "public function destroy($id)\n {\n $fileName = Document::find($id)->name;\n Document::destroy($id);\n\n Storage::delete('documents/' . $fileName);\n\n return response(\n null,\n Response::HTTP_NO_CONTENT\n );\n }", "title": "" }, { "docid": "e26b72caf36b6e3561ce58aef86783c9", "score": "0.54477465", "text": "public function deleteDocument($documentListName, $documentId)\r\n\t{\r\n\t\t$mozuClient = DocumentClient::deleteDocumentClient($documentListName, $documentId);\r\n\t\t$mozuClient = $mozuClient->withContext($this->apiContext);\r\n\t\t$mozuClient->execute();\r\n\r\n\t}", "title": "" }, { "docid": "44bbc68c168d6de937fa2061625e20cb", "score": "0.54474574", "text": "public function destroy($id)\n {\n Document::find($id)->delete();\n return back();\n }", "title": "" }, { "docid": "e180f4b4d117693c986e59c2843750f6", "score": "0.5440523", "text": "public function deindexRemovedLocaleDocument(RemoveLocaleEvent $event)\n {\n $document = $event->getDocument();\n\n if (!$document instanceof StructureBehavior) {\n return;\n }\n\n $this->searchManager->deindex($document);\n }", "title": "" }, { "docid": "cd6400b08a8abc3a60aa3962960dfbc3", "score": "0.54328954", "text": "public function destroyDocument($name)\n {\n Seminar::deleteDocument($name);\n\n return back()->withInput();\n }", "title": "" }, { "docid": "df78ee055c67b6b4cc5d1fb17364d0d7", "score": "0.54273015", "text": "public function supprimer_document($iddoc) {\r\n\t\t$this->load->model('tag_model');\r\n \r\n\t\tif(!is_null($iddoc) && $iddoc != 0){\r\n $this->tag_model->supprimer_tags_document($iddoc);\r\n\t \t\r\n\t\t$document = $this->db->select('*')\r\n\t\t\t\t\t\t->from($this->table)\r\n\t\t\t\t\t\t->where('iddocument',$iddoc)\r\n\t\t\t\t\t\t->get()\r\n\t\t\t\t\t\t->row();\r\n\t\t\t\t\t\t\r\n\t\t$this->db->where('iddocument', $iddoc)->delete($this->images);\r\n\t\t$this->db->where('iddocument', $iddoc)->delete($this->droit_document);\r\n\t\t$this->db->where('iddocument', $iddoc)->delete($this->table);\r\n\t\t\r\n\t\t$this->load->model('upload_model');\r\n\t\t\r\n\t\tif ($document->idrepertoire == '0')\r\n\t\t{ $chemin = \"uploads/projets/\".$document->idprojet.\"/\".$document->chemin_fichier;}\r\n\t\telse \r\n\t\t{ $chemin = \"uploads/projets/\".$document->idprojet.\"/\".$document->idrepertoire.\"/\".$document->chemin_fichier;}\r\n\t\t\r\n\t\t$this->upload_model->supprimer_fichier($chemin);\r\n\t\treturn $chemin;\r\n }\r\n\t}", "title": "" }, { "docid": "7ebccbc9b1626f3cfe6dfdd403570ca7", "score": "0.54221755", "text": "public function testRemoveUpload()\n {\n $file = new UploadedFile(__DIR__.\"/../../../../../data/sampleDocument.pdf\", \"sampleDocument.pdf\");\n $this->record->setFile($file);\n\n $this->record->removeUpload();\n }", "title": "" }, { "docid": "b306520bb4c275e5b984132d7642d8d4", "score": "0.5417469", "text": "public function deleteAction(Request $request, $documentId)\n {\n $this->validateAccessForRole('ROLE_ACCESS_DOCUMENTS_DELETE');\n\n $document = $this->getService('em')\n ->find('RZ\\Roadiz\\Core\\Entities\\Document', (int) $documentId);\n\n if ($document !== null) {\n $this->assignation['document'] = $document;\n $form = $this->buildDeleteForm($document);\n $form->handleRequest($request);\n\n if ($form->isValid() &&\n $form->getData()['documentId'] == $document->getId()) {\n try {\n $this->getService(\"dispatcher\")->dispatch(\n DocumentEvents::DOCUMENT_DELETED,\n new FilterDocumentEvent($document)\n );\n $this->getService('em')->remove($document);\n $this->getService('em')->flush();\n $msg = $this->getTranslator()->trans('document.%name%.deleted', ['%name%' => $document->getFilename()]);\n $this->publishConfirmMessage($request, $msg);\n } catch (\\Exception $e) {\n $msg = $this->getTranslator()->trans('document.%name%.cannot_delete', ['%name%' => $document->getFilename()]);\n $this->getService('logger')->error($e->getMessage());\n $this->publishErrorMessage($request, $msg);\n }\n /*\n * Force redirect to avoid resending form when refreshing page\n */\n return $this->redirect($this->generateUrl('documentsHomePage'));\n }\n\n $this->assignation['form'] = $form->createView();\n\n return $this->render('documents/delete.html.twig', $this->assignation);\n } else {\n return $this->throw404();\n }\n }", "title": "" }, { "docid": "524ed3026b3b176b384e6f6dff4ee342", "score": "0.5410659", "text": "public function destroy($id)\n {\n $documentosP = DocumentoP::findOrFail($id);\n $documentosP->estado = 0;\n $documentosP->usuario_deleted = auth()->user()->name;\n $documentosP->save();\n }", "title": "" }, { "docid": "a45eb800db8ba38b84970fef3c206b34", "score": "0.540468", "text": "public function deleteDocumentType($id) {\n return $this->where('id', $id)->delete();\n }", "title": "" }, { "docid": "6c54914885cccebc6df1c9665b72cb3b", "score": "0.539975", "text": "public function destroy($id)\n {\n if (! Gate::allows('document_delete')) {\n return abort(401);\n }\n $document = Document::findOrFail($id);\n $document->delete();\n\n return redirect()->route('admin.documents.index');\n }", "title": "" }, { "docid": "4d9c97b0b4e0e7825a881897b576bea6", "score": "0.5393346", "text": "public function delete_blog_document() {\n\t\t$this->layout = 'ajax';\n\t\t$this->autoRender = false;\n\t\t$this->loadModel('BlogDocument');\n\t\tif ($this->request->isAjax()) {\n\t\t\t$response = [\n\t\t\t\t'success' => false,\n\t\t\t\t'msg' => 'Sorry accor some error.',\n\t\t\t\t'content' => null,\n\t\t\t];\n\n\t\t\t//pr($this->request->data, 1);\n\n\t\t\tif (isset($this->request->data['id']) && !empty($this->request->data['id']) && $this->request->data['id'] != 'null') {\n\t\t\t\t$id = $this->request->data['id'];\n\t\t\t\t//$fielname = $this->request->data['file_name'];\n\t\t\t\t//$conditions = array(\"BlogDocument.document_name\" => $fielname);\n\t\t\t\tif (isset($id) && !empty($id)) {\n\t\t\t\t\t$conditions['AND'][] = array(\"BlogDocument.id\" => $id);\n\t\t\t\t}\n\t\t\t\t$old = $this->BlogDocument->find(\"first\", array(\"conditions\" => $conditions));\n\t\t\t\t$this->request->data['BlogDocument']['id'] = $old['BlogDocument']['id'];\n\t\t\t\t$filePath = DO_LIST_BLOG_DOCUMENTS . $old['BlogDocument']['document_name'];\n\t\t\t\tif ($this->BlogDocument->delete($this->request->data['BlogDocument']['id'])) {\n\t\t\t\t\tif (file_exists($filePath)) {\n\t\t\t\t\t\tunlink($filePath);\n\t\t\t\t\t}\n\t\t\t\t\t$response = [\n\t\t\t\t\t\t'success' => true,\n\t\t\t\t\t\t'msg' => 'The blog attachment has been removed successfully.',\n\t\t\t\t\t\t'content' => null,\n\t\t\t\t\t];\n\t\t\t\t\techo json_encode($response);\n\t\t\t\t\texit();\n\t\t\t\t} else {\n\t\t\t\t\techo json_encode($response);\n\t\t\t\t\texit();\n\t\t\t\t}\n\t\t\t} else {\n\n\t\t\t\t$filePath = DO_LIST_BLOG_DOCUMENTS . $this->request->data['file_name'];\n\t\t\t\tif (file_exists($filePath)) {\n\t\t\t\t\tunlink($filePath);\n\t\t\t\t}\n\t\t\t\t$response = [\n\t\t\t\t\t'success' => true,\n\t\t\t\t\t'msg' => 'The blog attachment has been removed successfully.',\n\t\t\t\t\t'content' => null,\n\t\t\t\t];\n\t\t\t\techo json_encode($response);\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "27962a9328d4c2785ab5a1c50e79973a", "score": "0.5390594", "text": "public function destroy(PofDocument $document)\n {\n $document->update(['is_deleted' => '1']);\n\n return response()->json(['response' => true, 'message' => 'Documento de P.O.F. eliminado con éxito.']);\n }", "title": "" }, { "docid": "5336825b23ae57c225d3534fd55b1861", "score": "0.53901935", "text": "public function remove() {}", "title": "" }, { "docid": "809d7e0a01c498dd284eab9105730461", "score": "0.538594", "text": "public function canHardDelete(DocumentInterface $document);", "title": "" }, { "docid": "73c704a80ae4a82903ee86a2b821245a", "score": "0.53819996", "text": "public function delete()\n {\n unlink($this->path);\n }", "title": "" }, { "docid": "adbf1d63c425aed18a5edcc13d57f2c2", "score": "0.5376667", "text": "public function delete()\n {\n $id = $this->request->get('id');\n $topic = $this->topics->find($id);\n $oldFile = $topic->pdf_link;\n $deleted = $this->topics->delete($id);\n\n //delete pdf file\n if ($deleted) {\n $pos = mb_strrpos($oldFile, '/');\n $oldFile = mb_substr($oldFile, $pos + 1);\n $oldFile = $this->uploadDir . $oldFile;\n $this->removeFile($oldFile);\n }\n redirect('admin/topic');\n }", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.53597677", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.53597677", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.53597677", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.53597677", "text": "public function remove();", "title": "" }, { "docid": "0d3915610c4c44083281b81873cfb774", "score": "0.5355682", "text": "public function remove() {\n\t\t$this->assert_ready();\n\n\t\t// Remove slide from its queue.\n\t\t$queue = $this->get_queue();\n\t\t$queue->remove_slide($this);\n\t\t$queue->write();\n\n\t\t// Remove slide data files.\n\t\tUtil::rmdir_recursive(self::get_dir_path($this->id));\n\t}", "title": "" }, { "docid": "47cdf2398adeb82ec7ce62538873cbe0", "score": "0.5347697", "text": "public function destroy($vendor_document)\n {\n DB::select(\"select DeleteVendors('$vendor_document')\");\n return back();\n\n }", "title": "" }, { "docid": "fe54671341ea10c36d192ab9e625b41d", "score": "0.5346494", "text": "public function deleteAction(Request $request, $id)\n {\n $form = $this->createDeleteForm($id);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n \n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('CustomCMSBundle:Document')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Document entity.');\n }\n\n $em->remove($entity);\n $em->flush();\n }\n\n return $this->redirect($this->generateUrl('cms_upload'));\n }", "title": "" }, { "docid": "07e5cdd3f8257de3e9ec54c45384f5f1", "score": "0.5337668", "text": "public function canDelete(DocumentInterface $document);", "title": "" }, { "docid": "5edb8c34646048c81149f05643f2d0e0", "score": "0.5318881", "text": "public function canSoftDelete(DocumentInterface $document);", "title": "" }, { "docid": "2fe8cb4a176089d038ed14c1086ef9b3", "score": "0.53180516", "text": "public function delete()\n {\n $em = Application::getFacadeApplication()->make(EntityManagerInterface::class);\n $em->remove($this);\n $em->flush();\n }", "title": "" }, { "docid": "d161c06e8208408bdf900a02809ed392", "score": "0.53176224", "text": "public function deleteDocument($uuid) {\n $client = $this->httpClient;\n $uri = $this->getUri('documents', $uuid);\n $request = $client->delete($uri);\n return $request->getStatusCode();\n }", "title": "" }, { "docid": "f80c17a3b806b3fa8e01b2e831558571", "score": "0.5300781", "text": "function delete() {\n\t\tSyndLib::runHook('lob_storage_delete', SyndLib::chopExtension($this->_file), true);\n\t\treturn parent::delete();\n\t}", "title": "" }, { "docid": "0728a970acfcd2a737baf26dafcf5fe9", "score": "0.5296673", "text": "public function testCreateAndDeleteDocument()\n {\n $connection = $this->connection;\n $collection = $this->collection;\n $collectionHandler = $this->collectionHandler;\n $document = new \\triagens\\ArangoDb\\Document();\n $documentHandler = new \\triagens\\ArangoDb\\DocumentHandler($connection);\n\n $document->someAttribute = 'someValue';\n\n $documentId = $documentHandler->add($collection->getId(), $document);\n\n $resultingDocument = $documentHandler->get($collection->getId(), $documentId);\n\n $resultingAttribute = $resultingDocument->someAttribute;\n $this->assertTrue($resultingAttribute === 'someValue', 'Created document id is not numeric!');\n\n $response = $documentHandler->delete($document);\n }", "title": "" }, { "docid": "09946e44db622cbc88049d182d8c2462", "score": "0.52959365", "text": "static public function cancel(Document $document, DocProductDetail $detail){\n\t\t// Validation is not necessary because the document has already validated.\n\t\t$reserve = $detail->getReserve();\n\t\tReserve::delete($reserve);\n\t\t$document->deleteDetail($detail);\n\t}", "title": "" } ]
3eb92a3f06f273dc04f69a9c513a24ac
Return whether or not this value should be auto loaded
[ { "docid": "54c673ed4f5952e8334990f3726494e6", "score": "0.0", "text": "function get_autoload() {\r\n\t\treturn $this->autoload;\r\n\t}", "title": "" } ]
[ { "docid": "305f8aedadbd9ffb56e715ae3bed6b9b", "score": "0.7029487", "text": "public function getAutoInit() : bool\n {\n return $this->autoInit;\n }", "title": "" }, { "docid": "e773fc70a7f070ecbd08df6fdfcd6711", "score": "0.70072776", "text": "public function is_loaded()\n\t{\n\t\treturn !empty( $this->attributes );\n\t}", "title": "" }, { "docid": "78c9d1ae5ed6d3a45ec9ad96b7b63fc5", "score": "0.6978591", "text": "final function isLoaded()\r\n\t{\r\n\t\treturn $this->_is_loaded;\r\n\t}", "title": "" }, { "docid": "4e3a0d9f8b17bf4b7c97b769dd0c0f0a", "score": "0.69348264", "text": "function isLoaded() {\n return !$this->isNew();\n }", "title": "" }, { "docid": "15426dfc415108c10bf4f4256b3e587d", "score": "0.6926985", "text": "public static function loadedFromCache(): bool\n {\n return self::$loadedFromCache;\n }", "title": "" }, { "docid": "6d77fb92dccb4522aefda6df2f537925", "score": "0.6921183", "text": "public static function is_loaded() {\r\n\t\t\treturn (bool)self::$_loaded;\r\n\t\t}", "title": "" }, { "docid": "68af83fd647d3fa3b0531f642bc44652", "score": "0.6885641", "text": "public function isAutoload() {\n\t\treturn false; \n\t}", "title": "" }, { "docid": "56a6cf49d8791eabf5727f515cb2d6c6", "score": "0.6869155", "text": "public function isAutoValue()\n {\n return $this->_isAutoValue;\n }", "title": "" }, { "docid": "aeb684d1a35b01f211747be824b2188b", "score": "0.6830956", "text": "public static function isLoaded()\n {\n if (is_null(self::$__instance))\n return false;\n \n return true;\n }", "title": "" }, { "docid": "aeb684d1a35b01f211747be824b2188b", "score": "0.6830956", "text": "public static function isLoaded()\n {\n if (is_null(self::$__instance))\n return false;\n \n return true;\n }", "title": "" }, { "docid": "aeb684d1a35b01f211747be824b2188b", "score": "0.6830956", "text": "public static function isLoaded()\n {\n if (is_null(self::$__instance))\n return false;\n \n return true;\n }", "title": "" }, { "docid": "aeb684d1a35b01f211747be824b2188b", "score": "0.6830956", "text": "public static function isLoaded()\n {\n if (is_null(self::$__instance))\n return false;\n \n return true;\n }", "title": "" }, { "docid": "aeb684d1a35b01f211747be824b2188b", "score": "0.6830956", "text": "public static function isLoaded()\n {\n if (is_null(self::$__instance))\n return false;\n \n return true;\n }", "title": "" }, { "docid": "aeb684d1a35b01f211747be824b2188b", "score": "0.6830956", "text": "public static function isLoaded()\n {\n if (is_null(self::$__instance))\n return false;\n \n return true;\n }", "title": "" }, { "docid": "aeb684d1a35b01f211747be824b2188b", "score": "0.6830956", "text": "public static function isLoaded()\n {\n if (is_null(self::$__instance))\n return false;\n \n return true;\n }", "title": "" }, { "docid": "03961646cd470680bf4d0d6fa751a79d", "score": "0.68296546", "text": "public static function isLoaded()\n {\n if (is_null(self::$__instance))\n return false;\n return true;\n }", "title": "" }, { "docid": "fb36e5e370eda768f49dc283c7cc6b0d", "score": "0.680555", "text": "public static function isLoaded()\n {\n return (is_null(self::$__instance) === false);\n }", "title": "" }, { "docid": "f9379a3bbbf567b012c9a21716004af9", "score": "0.68027437", "text": "public function isLoaded() {\n\t\treturn $this->isLoaded;\n\t}", "title": "" }, { "docid": "de1b1534a7bdd2d0544206e5224db24d", "score": "0.6706305", "text": "public function IsLoaded()\n {\n return $this->_isloaded;\n }", "title": "" }, { "docid": "1eb3aebc374b375bb2b298fda1c8d85f", "score": "0.67027086", "text": "protected function _isLoaded()\n {\n return $this->_loaded;\n }", "title": "" }, { "docid": "26d373d7c9a2f64265a54b81c0b15649", "score": "0.66466135", "text": "public function isLoaded()\n {\n return (bool)count($this->propertyLoaded);\n }", "title": "" }, { "docid": "8522fd2ae0d919c52c79f2451673cf66", "score": "0.66386867", "text": "public static function isLoaded()\n {\n return true;\n }", "title": "" }, { "docid": "8522fd2ae0d919c52c79f2451673cf66", "score": "0.66386867", "text": "public static function isLoaded()\n {\n return true;\n }", "title": "" }, { "docid": "fdc74beac672128535b5ab31a9bfb92f", "score": "0.6603841", "text": "function bimber_is_auto_load() {\n\t$auto_load_template = filter_input( INPUT_GET, 'bimber_auto_load_next_post_template', FILTER_SANITIZE_STRING );\n\tif ( $auto_load_template ) {\n\t\treturn true;\n\t}\n}", "title": "" }, { "docid": "dc634eeef11d1628ba523dea9b04e18c", "score": "0.658007", "text": "function isLoaded() {\n return !empty($this->id) && !empty($this->data);\n }", "title": "" }, { "docid": "02c3372139ba48692be8f6315de9ee8e", "score": "0.6560224", "text": "public function autoload()\n\t{\n\t\treturn (isset($this->autoload)) ? $this->autoload : FALSE;\n\t}", "title": "" }, { "docid": "842bc9a66a38c7e4db5a803d6f9cf2ca", "score": "0.65593374", "text": "public function isTableLazyLoad(){\n\t\treturn $this->_lazy_load;\n\t}", "title": "" }, { "docid": "de52e08c329aa6883ba64448e42b25d5", "score": "0.65488356", "text": "public function instanceLoaded() {\n\n return $this->instance !== null ? true : false;\n }", "title": "" }, { "docid": "1f41acea4adfff7f62df8ddc9c252bea", "score": "0.65368223", "text": "public function IsLoaded() : bool\r\n\t{\r\n\t\treturn $this->loaded;\r\n\t}", "title": "" }, { "docid": "101c96007aa0c0579afa9c8c53647786", "score": "0.6512138", "text": "public function isLoaded()\n {\n return (bool) $this->loaded;\n }", "title": "" }, { "docid": "02e753e242d595a50ebb59b972ae3a68", "score": "0.64943373", "text": "public function isLoaded()\n {\n return $this->loaded;\n }", "title": "" }, { "docid": "ae1d91488bfe72aa0d89ce235257e551", "score": "0.64841306", "text": "public function isAutoReload()\n {\n return $this->autoReload;\n }", "title": "" }, { "docid": "c6ec754028084f471b33dbf4c2a505f3", "score": "0.6443824", "text": "private function shouldAutoLoad(): bool\n {\n return ($this->parentCollection\n && count($this->parentCollection) > 1\n && count($this->parentCollection) <= $this->autoloadThreshold);\n }", "title": "" }, { "docid": "451c86d9da62d2de861f88497b9537a5", "score": "0.6411293", "text": "public function hasAuto(){\n return $this->_has(7);\n }", "title": "" }, { "docid": "db4408df4933b347112e0e2262c3ac3e", "score": "0.6372902", "text": "public static function hasInitiated()\r\n {\r\n return !is_null(self::$_loader);\r\n }", "title": "" }, { "docid": "3c78ca32276ba804939899e2b093d3fb", "score": "0.636088", "text": "public function hasLazyloadFlag()\n {\n if ($this->node->hasAttribute(DeferConstant::ATTR_DEFER)\n || $this->node->hasAttribute(DeferConstant::ATTR_LAZY)) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "529fded26d439f055c6aa1154cb6806f", "score": "0.6354047", "text": "public function isValueAvailable(): bool;", "title": "" }, { "docid": "7194698eac4cdd869d2a7107f65396aa", "score": "0.6342322", "text": "public function hasAuto(): bool\n {\n return !!$this->getAutoMode();\n }", "title": "" }, { "docid": "1b7a90fd2199d02d9a9d186c2a35ca13", "score": "0.63366526", "text": "public function isDefaultValueAvailable(): bool\n {\n return $this->default !== null;\n }", "title": "" }, { "docid": "b0c11da60b8edcac3b80e96221f12485", "score": "0.6330577", "text": "public function isValueInstantiable(): bool\n {\n if (is_string($this->entry->getValue()) && class_exists($this->entry->getValue())) {\n $class = $this->getValueReflectionClass();\n\n if ($class !== null && $class->isInstantiable()) {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "c50d9b483d28545abe13fbe5d53a3bf2", "score": "0.6327654", "text": "public function shouldLazyload()\n {\n if ($this->options->enable_lazyloading === false) {\n return false;\n }\n\n if ($this->node->hasAttribute(DeferConstant::ATTR_NOLAZY)) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "44fbbd308522971bf07721eb28d16bf2", "score": "0.63200754", "text": "private function should_load() {\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "01396a2133cb47fec9d614a8ba3654e8", "score": "0.6319797", "text": "private function getConfigLoaded()\n {\n if (!isset($this->state['config'])) {\n return false;\n }\n return (bool) $this->state['config'];\n }", "title": "" }, { "docid": "9bf4b7071af129a1e204b76a4c0e9f66", "score": "0.6288316", "text": "public function get() {\n\t\treturn (bool) parent::get();\n\t}", "title": "" }, { "docid": "85d1dbd372ad4c9f7b5552d26ce82160", "score": "0.6283789", "text": "public function need_value_detect() {\n\t\treturn false;\n\t}", "title": "" }, { "docid": "85d1dbd372ad4c9f7b5552d26ce82160", "score": "0.6283789", "text": "public function need_value_detect() {\n\t\treturn false;\n\t}", "title": "" }, { "docid": "85d1dbd372ad4c9f7b5552d26ce82160", "score": "0.6283789", "text": "public function need_value_detect() {\n\t\treturn false;\n\t}", "title": "" }, { "docid": "85d1dbd372ad4c9f7b5552d26ce82160", "score": "0.6283789", "text": "public function need_value_detect() {\n\t\treturn false;\n\t}", "title": "" }, { "docid": "031f6aa9369a3a31ae0dd2e0694440fa", "score": "0.62549716", "text": "public function hasAutoActivation()\n\t{\n\t\treturn false;\n\t}", "title": "" }, { "docid": "80dc3ebdd575491810ee68e839273b93", "score": "0.62499005", "text": "private function should_load_autocomplete() {\n\t\t$settings = $this->plugin->get_settings();\n\t\t$autocomplete = $this->plugin->get_autocomplete_config();\n\n\t\tif ( null === $autocomplete ) {\n\t\t\t// The user has not provided his credentials yet.\n\t\t\treturn false;\n\t\t}\n\n\t\t$config = $autocomplete->get_config();\n\t\tif ( 'yes' !== $settings->get_autocomplete_enabled() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn ! empty( $config );\n\t}", "title": "" }, { "docid": "4f838df1b6c5e160956db41a5bada968", "score": "0.6223087", "text": "public function autoGenerated(): bool\n {\n return ($this->type == 'auto_generated');\n }", "title": "" }, { "docid": "5498f517ad2c759a7553853186cc1116", "score": "0.61997414", "text": "function is_normal_load() {\n\t\treturn !$this->is_high_load();\n\t}", "title": "" }, { "docid": "763f54816c8d1177c323e36781c51845", "score": "0.6199289", "text": "public function IsLazyLoaded(): bool\n {\n if (Image::getLazyLoadingEnabled() && $this->getIsImage()) {\n return empty($this->attributes['loading']) || $this->attributes['loading'] === 'lazy';\n }\n return false;\n }", "title": "" }, { "docid": "67bab28e72cb947e40021c420d353869", "score": "0.6156726", "text": "function _loadType()\n\t{\n\t\t// Lets load the type if it doesn't already exist\n\t\tif ( $this->_type===null )\n\t\t{\n\t\t\t$query = 'SELECT *'\n\t\t\t\t\t. ' FROM #__flexicontent_types'\n\t\t\t\t\t. ' WHERE id = '.$this->_id\n\t\t\t\t\t;\n\t\t\t$this->_db->setQuery($query);\n\t\t\t$this->_type = $this->_db->loadObject();\n\n\t\t\treturn (boolean) $this->_type;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "ec1dc562102aca4d192e6ff981853ae8", "score": "0.61470866", "text": "public function load($key)\n {\n return false;\n }", "title": "" }, { "docid": "de9c760731f7e46e7f9bd7058c48699a", "score": "0.6144424", "text": "protected function getWrapperLoad() {\n return false;\n }", "title": "" }, { "docid": "e9c78c761a598a579a13c6f4afa3212c", "score": "0.61400265", "text": "public function load(): bool\n {\n $vars = $this->parse();\n\n return $vars !== null;\n }", "title": "" }, { "docid": "d64c5699b16daf666b1bd76f0ca32f2e", "score": "0.6133414", "text": "public function isLoaded()\n\t{\n\t\treturn $this->hasInput() || $this->hasOutput();\n\t}", "title": "" }, { "docid": "151e840879de94dee64ff9ea66e93a3f", "score": "0.6120811", "text": "final public function isLoaded()\n\t{\n\t\treturn $this->isPluginLoaded($this->getId());\n\t}", "title": "" }, { "docid": "c62eff0fb6b99067f6bd8acd46a5e8c0", "score": "0.6119198", "text": "public function has_default_value() {\r\n\t\t$ret = $this->has_policy(self::AUTOINCREMENT) || parent::has_default_value();\r\n\t\treturn $ret;\r\n\t}", "title": "" }, { "docid": "1a6f2488ad7730c255fa8eccd2513bb6", "score": "0.61138594", "text": "protected function init() {\n return TRUE;\n }", "title": "" }, { "docid": "fb02ae74294d144b88d808c9ecf9e305", "score": "0.6104188", "text": "function is_auto_routed() {\n return $this->is_auto_routed == 'y';\n }", "title": "" }, { "docid": "a7230ae83f036bbda7e7a8a07910688f", "score": "0.6095281", "text": "function presscore_lazy_loading_enabled() {\n\t\treturn of_get_option( 'general-images_lazy_loading' ) === '1';\n\t}", "title": "" }, { "docid": "7475015e82e23c1cb25683b0aa2098b6", "score": "0.60824203", "text": "public function isPopulated();", "title": "" }, { "docid": "e8e5b7e12ad9416c19631b6f40a33a1a", "score": "0.60780966", "text": "public function isAutoAssigned()\n {\n return $this->didAutoAssign;\n }", "title": "" }, { "docid": "34cc5b0c7f498c2bd0eb8c7001d4e8c8", "score": "0.6077128", "text": "public function isConfigured()\n {\n return (boolean) $this->_cache;\n }", "title": "" }, { "docid": "620da2a3f7c4f8ba582ef6dc10f99776", "score": "0.60613215", "text": "function is_extreme_load() {\n\t\t return (\n\t\t\t(\n\t\t\t\t defined( 'CALYX_EXTREME_LOAD' )\n\t\t\t\t && constant( 'CALYX_EXTREME_LOAD' )\n\t\t\t)\n\t\t\t|| !!get_transient( 'CALYX_EXTREME_LOAD' )\n\t\t\t|| !!get_option( 'CALYX_EXTREME_LOAD' )\n\t\t);\n\t}", "title": "" }, { "docid": "79f67644f5a60ff434c827ac45a82be7", "score": "0.60416496", "text": "public function has_default_value();", "title": "" }, { "docid": "51dc8d7c37ff34e83fcb922458e3a7b2", "score": "0.6040206", "text": "function force_load() {\n $fl = get_transient(AM_SLUG.'_force_load');\n if (!isset($fl) || $fl === false) {\n $fl = array_filter($this->opts['lazy_load_scripts'], function($v){\n if ($v['loadtype'] == 'forceload') {\n return true;\n }\n return false;\n });\n }\n set_transient(AM_SLUG.'_force_load', $fl);\n return $fl;\n }", "title": "" }, { "docid": "c0b52706a5b11853435895cb8535371c", "score": "0.6038868", "text": "public function is_initialized()\n {\n return $this->initialized;\n }", "title": "" }, { "docid": "b1988e8f959fc41cd53824fd9af5d902", "score": "0.60296464", "text": "public function wasLoadedFromCache(): bool\n {\n return $this->wasLoadedFromCache;\n }", "title": "" }, { "docid": "4ff842b65ed1e37eea4eae2bee881d69", "score": "0.60293764", "text": "function isAutoTuneEnabled() {\n global $config;\n $configContent=@file_get_contents($config[\"configFile\"]);\n if ($configContent!=null&&$configContent!=\"\") {\n $configArray = json_decode($configContent, true);\n if (is_array($configArray)&&array_key_exists(getMinerType().\"noauto\",$configArray)) {\n return false;\n }\n\n }\n return true;\n}", "title": "" }, { "docid": "f7f6caf4f1e3013a3dccae8e8c4753ae", "score": "0.6005727", "text": "public function isLazy();", "title": "" }, { "docid": "27debff1ff40e29378dff47d263cbf17", "score": "0.600265", "text": "public function should_load() {\n\t\t\t// Always load on the admin.\n\t\t\tif ( is_admin() ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t// check conditions for frontend\n\t\t\tif ( self::is_frontend() && ! is_user_logged_in() && ! self::should_load_frontend() ) {\n // user isn't logged in, and we aren't logging visitor events on front-end\n return false;\n\t\t\t}\n\n\t\t\t// other contexts/scenarios\n\n\t\t\t// If this is a rest API request and the user is not logged in, bail.\n\t\t\tif ( self::is_rest_api() && ! is_user_logged_in() ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "7306471664b86324e32914f6b582dde8", "score": "0.6001111", "text": "public function isRegistered()\n {\n return in_array(\n $this->getCallback(),\n AutoloadAPI::getInstance()->getRegisteredAutoloaders(),\n true\n );\n }", "title": "" }, { "docid": "776e2c84ad066280e023f9e085b95d10", "score": "0.599197", "text": "public function autoSaveIsAllowed()\n {\n if ($this->environment == 'local' && $this->config->get('db.autosave', true)) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "c285c607d09b058a8e53584500f96bf8", "score": "0.59704185", "text": "private function _loadConfig() {\n\t\t$this->_apiconfiguration = new APIConfiguration($this->_call('configuration'));\n\n\t\treturn ! empty($this->_apiconfiguration);\n\t}", "title": "" }, { "docid": "43b1909556e9dabd45c37ab51f8bfc94", "score": "0.5968341", "text": "public function IsConfigured();", "title": "" }, { "docid": "f3d2b93bda6f0b8cc0596dfeef662a7d", "score": "0.5966554", "text": "public function isLoadedFor($record);", "title": "" }, { "docid": "895e11ed6605b6b6119bf116a51e36c0", "score": "0.5963068", "text": "public function isDefined()\n {\n return 0 < $this->id && class_exists($this->class);\n }", "title": "" }, { "docid": "aa91acc2aed0743a955212650fef1884", "score": "0.59455496", "text": "protected function aValue()\n {\n return true;\n }", "title": "" }, { "docid": "5f37bf49e41913c82135670f7cd099be", "score": "0.5945227", "text": "public function getTrue(): bool\n {\n return true;\n }", "title": "" }, { "docid": "83f34a07f07ef9da3e5f70e0012c69f7", "score": "0.5933283", "text": "public function load(): bool\n {\n if ($this->filename !== null) {\n include_once $this->root . '/' . $this->getPath() . '/' . $this->filename;\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "d6e7bf8c84bf3c621499c5eb4413290a", "score": "0.5930091", "text": "private function isLoaded($key)\r\n {\r\n $loaded = isset($this->loadedEntities[$key]);\r\n\r\n // Check caching layer if available\r\n if (!$loaded)\r\n $loaded = $this->isCached($key);\r\n \r\n return $loaded;\r\n }", "title": "" }, { "docid": "666d06b8d376dc53feb5bf113dfe3e1f", "score": "0.59292746", "text": "public function isConfigured() { return true; }", "title": "" }, { "docid": "666d06b8d376dc53feb5bf113dfe3e1f", "score": "0.59292746", "text": "public function isConfigured() { return true; }", "title": "" }, { "docid": "ec9d10e23a961d66cdcb513bfd027b36", "score": "0.5913307", "text": "public function overrideValueAvailable() {\n\n $settings = $this->getExtconfSettings();\n\n if (t3lib_div::_GP($settings['overrideParameters.']['continent']) !== NULL) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "3de4934a58c0d774907c4c141606ab10", "score": "0.5898389", "text": "function &is_loaded($class = '') {\n static $_is_loaded = array();\n\n if ($class !== '') {\n $_is_loaded[strtolower($class)] = $class;\n }\n\n return $_is_loaded;\n }", "title": "" }, { "docid": "71d6744cda7080dfd9d43a5b31cbbdd8", "score": "0.58929753", "text": "public static function get_enabled_force_value() {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "c6467197befe141db2de6338b8ed1c08", "score": "0.58873945", "text": "public function loadWithRelations(): bool\n {\n return $this->load_with_relations;\n }", "title": "" }, { "docid": "a81e79ef859a408ea0dfabd9e97c8764", "score": "0.58696866", "text": "public function checkRegistryRequestsAnswers()\n {\n return $this->db && $this->loader && parent::checkRegistryRequestsAnswers();\n }", "title": "" }, { "docid": "c3a3bee4fefe6d200d4fdaa7e5e3de42", "score": "0.58619064", "text": "function isLoaded($fieldname){\n\t\t$parent =& $this->getParentRecord();\n\t\tif ( isset($parent) and $parent->_table->hasField($fieldname) ){\n\t\t\treturn $parent->isLoaded($fieldname);\n\t\t}\n\t\treturn ( isset( $this->_isLoaded[$fieldname] ) and $this->_isLoaded[$fieldname]);\n\t}", "title": "" }, { "docid": "145c3e91ebb53b9980f7058477d78a0f", "score": "0.58583033", "text": "public function is_set() {\n\n\t\t\tif ( $this->plugins ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\n\t\t}", "title": "" }, { "docid": "2cdc4622201dc2bf154c5908f7333457", "score": "0.58582526", "text": "public function hasDefault() {\n return isset($this->data[self::DEFAULT]);\n }", "title": "" }, { "docid": "f1eb7ccfdb4d7c9020ff41430a02634e", "score": "0.5853772", "text": "public function isInitialized(): bool\n {\n return $this->getParent()->settings()->count() === Metadata::query()->count();\n }", "title": "" }, { "docid": "52e2c688112671eed932bbf9d9e0a87d", "score": "0.5853727", "text": "public function isAutoIncremental()\n {\n return $this->_isAutoIncremental;\n }", "title": "" }, { "docid": "8aeb9ea00c91f228b974f1fa03a6a8be", "score": "0.584997", "text": "protected function _loadCache()\n {\n return false;\n }", "title": "" }, { "docid": "cf4f886931062906c0b701d8cc1228f8", "score": "0.5839059", "text": "function can_be_manually_set() {\n return true;\n }", "title": "" }, { "docid": "987d706c63e44655a4b2b0daf9395b9d", "score": "0.5836139", "text": "protected function get_default() {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "5979e96fe81a9f222d286ee59726a026", "score": "0.58357584", "text": "function is_high_load() {\n\t\treturn (\n\t\t\t(\n\t\t\t\t defined( 'CALYX_HIGH_LOAD' )\n\t\t\t\t && constant( 'CALYX_HIGH_LOAD' )\n\t\t\t)\n\t\t\t|| !!get_transient( 'CALYX_HIGH_LOAD' )\n\t\t\t|| !!get_option( 'CALYX_HIGH_LOAD' )\n\t\t\t|| $this->is_extreme_load()\n\t\t);\n\t}", "title": "" }, { "docid": "aefde274f5ab88d51c339e4dd4a70e4c", "score": "0.5830415", "text": "public function hasDefaultValue(){\n return $this->_has(11);\n }", "title": "" } ]
5afc77b257454ad5b7af7a5c43eeb659
this up() migration is autogenerated, please modify it to your needs
[ { "docid": "3fa331f03182b32127a509a91d7db88a", "score": "0.0", "text": "public function up(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n $this->addSql('CREATE TABLE api_token (id INT AUTO_INCREMENT NOT NULL, user_id INT NOT NULL, token VARCHAR(255) NOT NULL, expires_at DATETIME NOT NULL, INDEX IDX_7BA2F5EBA76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');\n $this->addSql('CREATE TABLE buffy (id INT AUTO_INCREMENT NOT NULL, pepe_id INT NOT NULL, name VARCHAR(255) NOT NULL, quote LONGTEXT NOT NULL, slug VARCHAR(32) NOT NULL, UNIQUE INDEX UNIQ_2F1531B5989D9B62 (slug), INDEX IDX_2F1531B545176A60 (pepe_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');\n $this->addSql('CREATE TABLE comida_preferidad (id INT AUTO_INCREMENT NOT NULL, nombre_buffy_id INT DEFAULT NULL, comida_id INT DEFAULT NULL, nombre VARCHAR(255) NOT NULL, INDEX IDX_E8E8591E787C426C (nombre_buffy_id), INDEX IDX_E8E8591E399E35A6 (comida_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');\n $this->addSql('CREATE TABLE intendente (id INT AUTO_INCREMENT NOT NULL, relation_id INT NOT NULL, estado VARCHAR(255) NOT NULL, fecha_inicio DATE NOT NULL, fin_funcion DATE DEFAULT NULL, UNIQUE INDEX UNIQ_CD3B964B3256915B (relation_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');\n $this->addSql('CREATE TABLE persona (id INT AUTO_INCREMENT NOT NULL, nombre VARCHAR(255) NOT NULL, apellido VARCHAR(255) NOT NULL, dni INT NOT NULL, slug VARCHAR(40) NOT NULL, image_filename VARCHAR(255) DEFAULT NULL, email VARCHAR(191) NOT NULL, roles LONGTEXT DEFAULT NULL COMMENT \\'(DC2Type:json)\\', password VARCHAR(255) NOT NULL, UNIQUE INDEX UNIQ_51E5B69B989D9B62 (slug), UNIQUE INDEX UNIQ_51E5B69BE7927C74 (email), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');\n $this->addSql('ALTER TABLE api_token ADD CONSTRAINT FK_7BA2F5EBA76ED395 FOREIGN KEY (user_id) REFERENCES persona (id)');\n $this->addSql('ALTER TABLE buffy ADD CONSTRAINT FK_2F1531B545176A60 FOREIGN KEY (pepe_id) REFERENCES comida_preferidad (id)');\n $this->addSql('ALTER TABLE comida_preferidad ADD CONSTRAINT FK_E8E8591E787C426C FOREIGN KEY (nombre_buffy_id) REFERENCES buffy (id)');\n $this->addSql('ALTER TABLE comida_preferidad ADD CONSTRAINT FK_E8E8591E399E35A6 FOREIGN KEY (comida_id) REFERENCES buffy (id)');\n $this->addSql('ALTER TABLE intendente ADD CONSTRAINT FK_CD3B964B3256915B FOREIGN KEY (relation_id) REFERENCES persona (id)');\n }", "title": "" } ]
[ { "docid": "20b3078116cca0d8f0cbce1a8d663632", "score": "0.79145443", "text": "abstract public function up();", "title": "" }, { "docid": "20b3078116cca0d8f0cbce1a8d663632", "score": "0.79145443", "text": "abstract public function up();", "title": "" }, { "docid": "20b3078116cca0d8f0cbce1a8d663632", "score": "0.79145443", "text": "abstract public function up();", "title": "" }, { "docid": "20b3078116cca0d8f0cbce1a8d663632", "score": "0.79145443", "text": "abstract public function up();", "title": "" }, { "docid": "20b3078116cca0d8f0cbce1a8d663632", "score": "0.79145443", "text": "abstract public function up();", "title": "" }, { "docid": "0b358aead7545940a4d585a3cfe977f9", "score": "0.78708136", "text": "public function up()\n {\n parent::up(); // TODO: Change the autogenerated stub\n }", "title": "" }, { "docid": "b70b05aafbbd7dadaa263d8f80755566", "score": "0.7718898", "text": "public static function up();", "title": "" }, { "docid": "4421a87aa40fd0c91b1c2109bb68956e", "score": "0.7659962", "text": "public function up()\n\t{\n if (!$this->db->field_exists('winkey', 'users')) {\n $fields = array(\n 'winkey boolean default 0',\n );\n\n $this->dbforge->add_column('users', $fields);\n }\n\t}", "title": "" }, { "docid": "cbc0dcb01e210f94b15e17134681af6f", "score": "0.7653375", "text": "protected function beforeUp()\n {\n }", "title": "" }, { "docid": "317b6f681e9ed052d7156d838ba7bb5e", "score": "0.76300174", "text": "public function safeUp()\n {\n $this->createTable(\n $this->table,\n [\n 'id'=>$this->primaryKey(),\n 'from_type_id'=>$this->integer(),\n 'to_type_id'=>$this->integer(),\n 'example'=>$this->text(),\n ]\n );\n }", "title": "" }, { "docid": "4193782bd67d12f406d284ea17c02235", "score": "0.76086634", "text": "protected function afterUp()\n {\n }", "title": "" }, { "docid": "627326097197ff042404b56d31587847", "score": "0.759487", "text": "public function up();", "title": "" }, { "docid": "627326097197ff042404b56d31587847", "score": "0.759487", "text": "public function up();", "title": "" }, { "docid": "d2f8c29b30052b0a0520407e18ea8f2e", "score": "0.7583955", "text": "public function up()\n {\n $this->migrationType='up';\n $this->processMigration();\n }", "title": "" }, { "docid": "b7e7d34ba9af30d86d1755aab9a0689d", "score": "0.7533073", "text": "public function up()\n\t{\n\t}", "title": "" }, { "docid": "b7e7d34ba9af30d86d1755aab9a0689d", "score": "0.7533073", "text": "public function up()\n\t{\n\t}", "title": "" }, { "docid": "c607926fda5773348ddbf0ee20ede136", "score": "0.74850506", "text": "public function up()\n\t{\n \n\t}", "title": "" }, { "docid": "e040b52ee2ceafd37b49c4f49a3c9e13", "score": "0.7483289", "text": "public function up()\n {\n $this->executeSQL(\"ALTER TABLE sf_guard_user_profile ADD COLUMN `facebook_uid` VARCHAR(20)\");\n $this->executeSQL(\"ALTER TABLE sf_guard_user_profile ADD UNIQUE KEY `facebook_uid_index` (`facebook_uid`)\");\n $this->executeSQL(\"ALTER TABLE sf_guard_user_profile ADD COLUMN `email_hash` VARCHAR(255)\");\n $this->executeSQL(\"ALTER TABLE sf_guard_user_profile ADD UNIQUE KEY `email_hash_index` (`email_hash`)\");\n $this->executeSQL(\"ALTER TABLE sf_guard_user_profile ADD UNIQUE KEY `email_index` (`email`)\");\n }", "title": "" }, { "docid": "50af43bea5cd59af8b28a9e805cdcf89", "score": "0.7476892", "text": "public function up()\n\t{\n \n\t}", "title": "" }, { "docid": "b8c1ecf0c3bb205890a2417e6b1c4a24", "score": "0.7472744", "text": "public abstract function up();", "title": "" }, { "docid": "0bf78dda082d5d749f42e583eec883e6", "score": "0.74307704", "text": "public function up()\n {\n }", "title": "" }, { "docid": "62c34b306d45b00def15ce55ddf94244", "score": "0.74189", "text": "public function safeUp()\n\t{\n $this->createTable('{{captcha}}', array(\n 'id' \t=> 'pk',\n 'respondent_id' \t=> 'INT(3)',\n 'code' => 'VARCHAR(30)',\n 'img_name' \t=> 'VARCHAR(30)',\n 'full_path' \t=> 'VARCHAR(230)',\n 'date_created' \t=> 'DATETIME',\n 'IP' \t\t=> 'VARCHAR(30)',\n ), $this->MySqlOptions);\n\n $this->createTable('{{history_respondent}}', array(\n 'id' \t=> 'pk',\n 'key_action' => 'ENUM(\"code_phone\")',\n 'action_do' => 'ENUM(\"edit\")',\n 'respondent_id' \t=> 'INT(3)',\n 'date_created' \t=> 'DATETIME',\n ), $this->MySqlOptions);\n\t}", "title": "" }, { "docid": "b425a2376d2e75cb8cdc87cdaade4edd", "score": "0.74120045", "text": "public function safeUp()\n {\n $this->createTable('gallery', [\n 'id' => 'serial NOT NULL',\n 'title' => 'character varying(100) NOT NULL ',\n 'image' => 'character varying(255) NOT NULL ',\n ]);\n $this->addPrimaryKey('pk_gallery', 'gallery', 'id');\n }", "title": "" }, { "docid": "68f57a5cce225e4085248b8f99a86651", "score": "0.73957556", "text": "public function up()\n\t{\n\t\t//\n\t\t/*Schema::create('subscription_signup_stats',function($table){\n\t\t\t$table->increments('id');\n\t\t\t$table->string('account_code');\n\t\t\t$table->string('uuid');\n\t\t\t$table->string('plan_code');\n\t\t\t$table->string('plan_name');\n\t\t\t$table->integer('quantity');\n\t\t\t$table->float('amount');\n\t\t\t$table->date('activation_date');\n\t\t\t$table->timestamps();\n\t\t});*/\n\n\t\tSchema::create('subscription_history',function($table){\n\t\t\t$table->increments('id');\n\t\t\t$table->string('uuid');\n\t\t\t$table->string('account_code');\n\t\t\t$table->string('plan_code');\n\t\t\t$table->string('plan_name');\n\t\t\t$table->integer('quantity');\n\t\t\t$table->decimal('amount', 10, 2);\n\t\t\t$table->date('activation_date');\n\t\t\t$table->timestamps();\n\t\t});\n\t}", "title": "" }, { "docid": "6b173e0085cd2097e9e10d0be0c82cc3", "score": "0.7395485", "text": "public function up()\r\n {\r\n $this -> executeSQL(\"ALTER TABLE `esq_customers` ADD `sales_person_id` INT( 11 ) NULL DEFAULT NULL AFTER `bar_association_id`;\");\r\n $this -> executeSQL(\"ALTER TABLE `esq_customers` ADD INDEX ( `sales_person_id` );\");\r\n }", "title": "" }, { "docid": "88517aa718f70d84abffdbd6b5d259c9", "score": "0.7379026", "text": "public function up()\n {\n\n $relations = $this->table(\"relations\");\n $relations->addColumn(\"nodevalue\",\"integer\",array('null' => true))\n ->addColumn(\"geometryvalue\",\"integer\",array('null' => true))\n ->update();\n\n // A user auth feature was requested, later on we will use that to enhance logging\n $this->execute(\"DROP TRIGGER IF EXISTS statements_logging_trigger ON relations CASCADE\");\n $this->execute(\"DROP TRIGGER IF EXISTS nodes_logging_trigger ON nodes CASCADE\");\n $this->execute(\"DROP TRIGGER IF EXISTS properties_logging_trigger ON properties CASCADE\");\n\n $this->execute(\"UPDATE relations SET nodevalue = CAST(value as INT) WHERE property = \".\n \"(SELECT id FROM properties WHERE datatype = 'node') \");\n $this->execute(\"UPDATE relations SET geometryvalue = CAST(value as INT) WHERE property = \".\n \"(SELECT id FROM properties WHERE datatype = 'geometry') \");\n }", "title": "" }, { "docid": "366cf61a12a2d07cfc7f4de238a7676c", "score": "0.7370453", "text": "public function preUp()\n {\n }", "title": "" }, { "docid": "366cf61a12a2d07cfc7f4de238a7676c", "score": "0.7370453", "text": "public function preUp()\n {\n }", "title": "" }, { "docid": "2715d65babd11169c0223203b4394e7b", "score": "0.736837", "text": "function up()\n\t{\n\t\t\\DBUtil::set_connection(\\Config::get('db.db_connection', null));\n\n\t\t// only do this if it exists \n\t\tif ( \\DBUtil::table_exists('books'))\n\t\t{\n\t\t\t\\DBUtil::add_fields('books', array(\n\t\t\t\t'removed' => array('type' => 'boolean', 'default' => false),\n\t\t\t));\n\t\t}\n\n\t\t// reset any DBUtil connection set\n\t\t\\DBUtil::set_connection(null);\n\t}", "title": "" }, { "docid": "3cbf8b125187d70a1730dd3eeb866d1f", "score": "0.73663956", "text": "public function safeUp()\n {\n $this->createTable(\n $this->tableName,\n [\n 'id' => Schema::TYPE_INTEGER. ' UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY',\n 'product_id' => Schema::TYPE_INTEGER. ' UNSIGNED NOT NULL',\n 'label' => Schema::TYPE_STRING. ' NOT NULL COMMENT \"Название\"',\n 'sku' => Schema::TYPE_STRING. ' NOT NULL COMMENT \"Артикул\"',\n 'price' => Schema::TYPE_DECIMAL. '(10, 2) NOT NULL DEFAULT 0.00 COMMENT \"Цена\"',\n 'position' => Schema::TYPE_INTEGER. ' UNSIGNED NOT NULL DEFAULT 0 COMMENT \"Позиция\"',\n\n ],\n 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'\n );\n\n $this->addForeignKey(\n 'fk_variants_product_id_to_store_product_table',\n $this->tableName,\n 'product_id',\n '{{%store_product}}',\n 'id',\n 'CASCADE'\n );\n }", "title": "" }, { "docid": "d3af6cce0bbe9d5eba803142c5c343ff", "score": "0.73518455", "text": "public function up()\n\t{\n \n\t\t$this->execute(\"\n CREATE TABLE `uxip_user_x_ip_table` (\n `uxip_user_id` int(11) NOT NULL,\n `uxip_iptb_id` smallint(5) unsigned NOT NULL,\n KEY `uxip_user_id` (`uxip_user_id`),\n KEY `uxip_iptb_id` (`uxip_iptb_id`)\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8;\n\n\n ALTER TABLE `uxip_user_x_ip_table`\n ADD CONSTRAINT `uxip_user_x_ip_table_ibfk_1` FOREIGN KEY (`uxip_user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE,\n ADD CONSTRAINT `uxip_user_x_ip_table_ibfk_2` FOREIGN KEY (`uxip_iptb_id`) REFERENCES `iptb_ip_table` (`iptb_id`) ON DELETE CASCADE;\n \");\n \n\t}", "title": "" }, { "docid": "ca20f6669e4659bbf881f121882314ac", "score": "0.73332083", "text": "public function safeUp()\n {\n $tableOptions = null;\n\n if ($this->db->driverName === 'mysql') { // Тип БД, далее тип таблицы и стандартная кодировка для этой таблицы.\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n $this->createTable(Stage::tableName(), [\n 'id' => $this->primaryKey(),\n 'name' => $this->string(),\n ], $tableOptions);\n }", "title": "" }, { "docid": "1fdae400d7f7499a2af69c704186a651", "score": "0.73238975", "text": "public function up()\n\t{\n\t\t// Create Role_User pivot table\n\t Schema::table('role_user', function($table)\n\t {\n\t $table->engine = 'InnoDB';\n\t $table->create();\n\t $table->increments('id');\n\t $table->timestamps();\n\n\t $table->integer('user_id')->unsigned();\n\t $table->integer('role_id')->unsigned();\n\n\t $table->foreign('role_id')->references('id')->on('roles')->on_delete('cascade');\n\t $table->foreign('user_id')->references('id')->on('users')->on_delete('cascade');\n\t });\n\n\t $this->insert_roles();\n\t $this->insert_demo_user();\n\t}", "title": "" }, { "docid": "c14fb97d32595a1ec7c1e087371d20b0", "score": "0.7302332", "text": "public function up()\n {\n\n //$this->getDb()->createCommand('DROP VIEW `excluded`;')->execute();\n //$this->getDb()->createCommand('DROP VIEW `included`;')->execute();\n\n\n $this->dropForeignKey('fk_monthly_reports_users1', 'monthly_reports');\n $this->addForeignKey('fk_monthly_reports_users1', 'monthly_reports', 'user_id', 'users', 'id');\n\n }", "title": "" }, { "docid": "5bb7bb81502a6534e0da5d5ff09ba09c", "score": "0.7296431", "text": "function up(){\n\n\t\t$this->db->update('result_type', array('result_type_order'=>3), array('result_type_id'=>1));\n\t\t$this->db->update('result_type', array('result_type_order'=>2), array('result_type_id'=>2));\n\t\t$this->db->update('result_type', array('result_type_order'=>1), array('result_type_id'=>3));\t\t\n\t\t$this->db->update('result_type', array('result_type_order'=>5), array('result_type_id'=>4));\n\t\t$this->db->update('result_type', array('result_type_order'=>4), array('result_type_id'=>5));\n\t\t\t\t\t\n\t}", "title": "" }, { "docid": "5d5eff5a32acc952df5eb7720e6c730f", "score": "0.7293645", "text": "public function safeUp()\n {\n $this->createTable('blog', [\n 'id' => 'serial NOT NULL',\n 'title' => 'character varying(255) NOT NULL ',\n 'short_description' => 'character varying(255) NOT NULL ',\n 'text' => 'text',\n 'created_at' => 'timestamp without time zone NOT NULL',\n 'updated_at' => 'timestamp without time zone NOT NULL',\n ]);\n $this->addPrimaryKey('pk_blog', 'blog', 'id');\n }", "title": "" }, { "docid": "d35f407d3847f27200ad5945725730ef", "score": "0.7281348", "text": "public function up(){\n // Create new_attachments table\n $new_table = $this->table('new_attachments', array('id'=>false, 'primary_key'=>'uuid'));\n $new_table->addColumn('uuid', 'char', array('limit'=>36));\n $new_table->addColumn('entry_id', 'integer', array('signed'=>false));\n $new_table->addColumn('attachment', 'string');\n $new_table->addColumn('stamp', 'timestamp', array('default'=>'CURRENT_TIMESTAMP'));\n $new_table->addIndex('entry_id');\n $new_table->save();\n\n // migrate data from attachments to new_attachments\n $this->execute(\n \"INSERT INTO new_attachments (\n SELECT uid, entry_id, attachment, stamp FROM attachments\n )\"\n );\n\n // drop attachments table\n $this->dropTable('attachments');\n\n // rename new_attachments to attachments\n $new_table->rename('attachments');\n }", "title": "" }, { "docid": "537bfbcff6a7f0ee2254a0e5a63de1fd", "score": "0.7276975", "text": "public function up() \n {\n $exists = $this->hasTable('appointment_modifications');\n if (!$exists) {\n $appointment_modifications = $this->table('appointment_modifications');\n $appointment_modifications->addColumn('created_at', 'datetime')\n ->addColumn('updated_at', 'datetime') \n ->addColumn('user_id', 'integer',['limit' => 20, 'null' => true]) \n ->addColumn('type', 'boolean',['limit' => 2, 'default' => 0, 'comment' => '0-Unavailable in Particular Date And Time; 1 - Make a Day Fully Off; 2 - Unavailable In Every Particular Day And Time Recursively; 3 - Make a Day Fully On;']) \n ->addColumn('unavailable_date', 'date',['null' => true]) \n ->addColumn('unavailable_from_time', 'time',['null' => true])\n ->addColumn('unavailable_to_time', 'time',['null' => true])\n ->addColumn('day', 'string',['null' => true, 'comment' => 'AllDay, Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday'])\n ->addIndex('user_id')\n ->addForeignKey('user_id', 'users', 'id', ['delete'=> 'CASCADE', 'update'=> 'NO_ACTION']) \n ->save();\n }\n }", "title": "" }, { "docid": "3bd220ecc16edd72553ba3f9d778e6ea", "score": "0.7271855", "text": "public function up()\n {\n $table = $this->table('user');\n $table->addColumn('sms_message', 'integer', array('limit' => MysqlAdapter::INT_TINY, 'after' => 'email_general', 'default' => 1))\n ->addColumn('sms_diary', 'integer', array('limit' => MysqlAdapter::INT_TINY, 'after' => 'sms_message', 'default' => 1))\n ->addColumn('sms_reminder', 'integer', array('limit' => MysqlAdapter::INT_TINY, 'after' => 'sms_diary', 'default' => 1))\n ->addColumn('sms_purchase', 'integer', array('limit' => MysqlAdapter::INT_TINY, 'after' => 'sms_reminder', 'default' => 1))\n ->addColumn('sms_general', 'integer', array('limit' => MysqlAdapter::INT_TINY, 'after' => 'sms_purchase', 'default' => 1))\n ->save();\n\n }", "title": "" }, { "docid": "af1f9820136f60e0fc839f21da88bb7a", "score": "0.7271843", "text": "public function up()\n {\n $builder = $this->getQueryBuilder();\n $builder->insert(['name', 'login', 'password', 'email', 'frontpage_id', 'system_unit_id', 'active'])\n ->into('system_user')\n ->values([\n 'name' => 'Administrator',\n 'login' => 'admin',\n 'password' => '21232f297a57a5a743894a0e4a801fc3',\n 'email' => '[email protected]',\n 'frontpage_id' => '10',\n 'system_unit_id' => NULL,\n 'active' => 'Y',\n ])\n ->values([\n 'name' => 'User',\n 'login' => 'user',\n 'password' => 'ee11cbb19052e40b07aac0ca060c23ee',\n 'email' => '[email protected]',\n 'frontpage_id' => '7',\n 'system_unit_id' => NULL,\n 'active' => 'Y',\n ])\n ->execute();\n }", "title": "" }, { "docid": "c644794ae8bffe9cc38aa3fa44fa1f6d", "score": "0.72608984", "text": "public function up()\n {\n if (!$this->hasTable('drive_drivers')) {\n $users = $this->table('users');\n\n $drivers = $this->table('drive_drivers');\n $drivers->create();\n $drivers\n ->changeColumn('id', 'integer', ['null' => false, 'signed' => false])\n ->addForeignKey('id', $users, 'id')\n ->create();\n\n $vehicles = $this->table('drive_vehicles');\n $vehicles\n ->addColumn('driver_id', 'integer', ['null' => false, 'signed' => false])\n ->addColumn('acceleration', 'integer', ['null' => false, 'signed' => false])\n ->addColumn('stability', 'integer', ['null' => false, 'signed' => false])\n ->addColumn('mobility', 'integer', ['null' => false, 'signed' => false])\n ->addForeignKey('driver_id', $drivers, 'id')\n ->create();\n\n $vehicles\n ->changeColumn('id', 'integer', ['null' => false, 'signed' => false])\n ->update();\n }\n }", "title": "" }, { "docid": "88cf03350fac7f91257b3f08d1599b99", "score": "0.7260683", "text": "public function safeUp()\n {\n $this->createTable(\n $this->tableName,\n [\n 'id' => Schema::TYPE_INTEGER . ' UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY',\n 'category_id' => Schema::TYPE_INTEGER . ' UNSIGNED DEFAULT NULL COMMENT \"Категория\"',\n 'label' => Schema::TYPE_STRING . ' NOT NULL COMMENT \"Название\"',\n 'link' => Schema::TYPE_STRING . ' NOT NULL COMMENT \"Ссылка\"',\n 'position' => Schema::TYPE_INTEGER . ' UNSIGNED NOT NULL DEFAULT 0 COMMENT \"Позиция\"',\n 'created' => Schema::TYPE_DATETIME . ' NOT NULL COMMENT \"Создано\"',\n 'modified' => Schema::TYPE_DATETIME . ' NOT NULL COMMENT \"Обновлено\"',\n ],\n 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'\n );\n\n $this->addForeignKey(\n 'fk_seo_footer_links_cat_id_to_cat_table',\n $this->tableName,\n 'category_id',\n '{{%store_category}}',\n 'id',\n 'CASCADE',\n 'CASCADE'\n );\n }", "title": "" }, { "docid": "e4603ddf040c224613097d711d3acac2", "score": "0.72568494", "text": "public function safeUp()\n {\n $this->createTable('categories', [\n 'id' => Schema::TYPE_PK,\n 'name' => Schema::TYPE_STRING . '(100) NOT NULL',\n 'lft' => Schema::TYPE_INTEGER . ' NOT NULL',\n 'rgt' => Schema::TYPE_INTEGER . ' NOT NULL',\n 'depth' => Schema::TYPE_INTEGER . ' NOT NULL',\n ]);\n\n $this->createTable('products_categories', [\n 'product_id' => Schema::TYPE_INTEGER . ' NOT NULL',\n 'category_id' => Schema::TYPE_INTEGER . ' NOT NULL',\n ]);\n\n $this->addForeignKey('fk_pc_product_id', 'products_categories', 'product_id', 'products', 'id');\n $this->addForeignKey('fk_pc_category_id', 'products_categories', 'category_id', 'categories', 'id');\n\n }", "title": "" }, { "docid": "0f4fc2f7814c103f04e86be5a4505f19", "score": "0.72544545", "text": "public function up()\n {\n //get page id\n $result = $this->fetchRow(\n \"SELECT * \n FROM information_schema.COLUMNS \n WHERE \n TABLE_SCHEMA = 'transcription' \n AND TABLE_NAME = 'ht_jobs' \n AND COLUMN_NAME = 'county_name' \"\n );\n\n if (!$result) {\n print \"Adding in new columns: \\n county_name \\n county_code \\n\";\n $table = $this->table('ht_jobs');\n $table->addColumn('county_name', 'string', array('after' => 'city','limit' => 255,'default'=>null,'null' => true))\n ->addColumn('county_code', 'string', array('after' => 'county_name','limit' => 255,'default'=>null,'null' => true))\n ->save();\n } else {\n print \"Nothing to do, the columns are already added\";\n }\n\n\n }", "title": "" }, { "docid": "eff15ffc91355d278bf3d3d8b5e6d8b8", "score": "0.72494197", "text": "public function safeUp()\n\t{\n $this->createTable('product_promo', array(\n 'id' => 'pk',\n 'product_id' => 'int NOT NULL',\n 'promo_id' => 'int NOT NULL',\n ));\n\t}", "title": "" }, { "docid": "e1a82aa816d8a067fcac82ff0a6c078e", "score": "0.7247148", "text": "public static function up() {\n\n\t\t$db = DB::connect();\n\t\t$platform = $db->getDatabasePlatform();\n\t\t$schema = new \\Doctrine\\DBAL\\Schema\\Schema();\n\n\t\t$myTable = $schema->createTable('phonebook');\n\t\t$myTable->addColumn(\"id\", \"integer\", array(\"unsigned\" => true, \"autoincrement\" => true));\n\t\t$myTable->addColumn(\"first_name\", \"string\", array(\"length\" => 32));\n\t\t$myTable->addColumn(\"last_name\", \"string\", array(\"length\" => 32, \"notnull\" => false));\n\t\t$myTable->addColumn(\"phone_number\", \"string\", array(\"length\" => 24));\n\t\t$myTable->addColumn(\"country_code\", \"string\", array(\"length\" => 24, \"notnull\" => false));\n\t\t$myTable->addColumn(\"time_zone\", \"string\", array(\"length\" => 24, \"notnull\" => false));\n\t\t$myTable->addColumn(\"insertedOn\", \"datetime\");\n\t\t$myTable->addColumn(\"updatedOn\", \"datetime\");\n\t\t$myTable->setPrimaryKey(array(\"id\"));\n\t\t$myTable->addUniqueIndex(array(\"id\"));\n\n\t\t$sql = $schema->toSql($platform);\n\t\t$stmt = $db->prepare(current($sql));\n\t\t$stmt->execute();\n\t}", "title": "" }, { "docid": "f17812457d87c332c4210c8fb9c900cc", "score": "0.72430265", "text": "public function up()\n\t{\n\t\t$this->dbforge->add_column($this->users_table, $this->users_fields);\n\n\t\t$this->db->where('role_name', $this->roles_data['role_name'])\n\t\t\t->delete($this->roles_table);\n\t}", "title": "" }, { "docid": "9f4dbefa22c764fff846c5fbcc1b8854", "score": "0.72413224", "text": "public function up()\n {\n $this->createTable('content_seo', [\n 'id' => $this->primaryKey(),\n 'page_title' => $this->string() . ' NOT NULL',\n 'page_deck' => $this->text() . ' NOT NULL',\n 'keyswords' => $this->string(),\n 'content_group_id' => $this->integer(),\n 'language_id' => $this->integer(),\n 'created_at' => $this->dateTime(),\n 'updated_at' => $this->dateTime(),\n\n\n\n ]);\n }", "title": "" }, { "docid": "53d6429a4b43a7366b367c48a33b27f0", "score": "0.72197866", "text": "public function up(): void {\n\t $q = \"ALTER TABLE {$this->scores_table} ADD COLUMN wp_user_id BIGINT(20) \";\n $this->db->query( $q );\n\t}", "title": "" }, { "docid": "bae5c21397eee6253c7e187f8412c430", "score": "0.721371", "text": "public function up()\n {\n /* $this->addPageTitleOption();\n $this->createBlocks();\n $this->addContent(); */\n \n }", "title": "" }, { "docid": "75aee9b9b532ce1af23cc6fa934da82a", "score": "0.72101504", "text": "public function up()\n\t{\n\t\t$this->uniqueAutoIncrement = $this->db->DBDriver === 'SQLite3' ? 'unique' : 'auto_increment';\n\n\t\t$this->createAuthorTable();\n\t\t$this->createPostTable();\n\t\t$this->createCommentTable();\n\t}", "title": "" }, { "docid": "d2855110b758e06a9c48aeb8bba591c5", "score": "0.7208791", "text": "public function up()\n {\n \tif(!$this->db->table_exists('kategori')){\n \t\t$this->dbforge->add_field( array(\n\t\t\t\t'id' => array(\n\t\t\t\t\t'type' => 'int',\n\t\t\t\t\t'constraint' => 11,\n\t\t\t\t\t'unsigned' => true,\n\t\t\t\t\t'auto_increment' => true\n\t\t\t\t),\n\t\t\t\t'kategori' => array(\n\t\t\t\t\t'type' => 'varchar',\n\t\t\t\t\t'constraint' => 255,\n\t\t\t\t\t'null' => false\n\t\t\t\t)\n\t\t\t));\n\n\t\t\t/**\n\t\t\t * add key and create the table\n\t\t\t */\t\n\t\t\t$this->dbforge->add_key('id', true);\n\t\t\t$this->dbforge->create_table('kategori');\n \t}\n\t\t\n\n \t\n }", "title": "" }, { "docid": "c538e5c651996ec8d6d4943f7ee2c736", "score": "0.7195306", "text": "public function up()\n {\n $category = new \\App\\Category();\n $category->name = 'Otros';\n $category->save(); //la persistimos en bbdd\n\n Schema::table('products', function (Blueprint $table) use ($category) {\n $table->unsignedBigInteger('category_id')->default($category->id);\n // creamos la clave foranea para mantener la integridad de datos en bbdd\n // al agregar el foreign me dio un error y tuve que instalar\n //composer require doctrine/dbal pero que tampoco solucinó el problema\n // lo solucioné borrando la bbdd y haciendo las migraciones otra vez\n $table->foreign('category_id')->references('id')->on('categories');\n\n });\n }", "title": "" }, { "docid": "48691244f1813b4578c5c052fef35f9f", "score": "0.71847355", "text": "public function up()\n {\n\n $this->table('users')\n ->addColumn('course', 'string', [\n 'after' => 'enabled',\n 'default' => null,\n 'length' => 10,\n 'null' => true,\n ])\n ->update();\n }", "title": "" }, { "docid": "7a9f45b4c86b4cea0608d0481823f5b3", "score": "0.71832716", "text": "public function up()\n {\n $departments = $this->table('tbl_master_departments', [\n 'id' => false,\n 'primary_key' => ['id']\n ]);\n $departments->addColumn('id', 'integer', [\n 'autoIncrement' => true,\n 'default' => null,\n 'limit' => 11,\n 'null' => false,\n ])\n ->addPrimaryKey(['id'])\n ->addColumn('name', 'string')\n ->addColumn('tel', 'string',['null'=>true])\n ->addColumn('address', 'string',['null'=>true])\n ->addColumn('status', 'integer', array('limit' => 1,'default'=>0))\n ->addColumn('del_flg', 'integer', array('limit' => 1,'default'=>0))\n ->addColumn('created', 'datetime',['default'=> \"CURRENT_TIMESTAMP\"])\n ->addColumn('modified', 'datetime', array('null' => true,'default'=>null))\n ->addIndex(\n [\n 'name',\n ]\n )\n ->save();\n\n $users = $this->table('tbl_master_users');\n $users->addForeignKey( 'dep_id',\n 'tbl_master_departments',\n 'id',\n [\n 'update' => 'CASCADE',\n 'delete' => 'CASCADE'\n ])->save();\n }", "title": "" }, { "docid": "7891bedaeb0c29697df1649af460bebf", "score": "0.7181359", "text": "public function safeUp()\n\t{\n $this->alterColumn('{{child}}', 'grade', 'varchar(5) NOT NULL');\n $this->addColumn('{{child}}', 'additional_school_details', 'varchar(100) NOT NULL');\n\n $this->dropColumn('{{child}}', 'address2');\n $this->dropColumn('{{child}}', 'school_address2');\n\n $this->insert('{{relation}}', array(\n 'id' => 7,\n 'name' => 'Sister')\n );\n\n $this->insert('{{relation}}', array(\n 'id' => 8,\n 'name' => 'Brother')\n );\n\n $this->insert('{{relation}}', array(\n 'id' => 9,\n 'name' => 'Caregiver')\n );\n\n\t}", "title": "" }, { "docid": "47c6c47ab5b5bc21e484e797590b6f5f", "score": "0.717178", "text": "public function up()\n {\n Schema::table('users', function (Blueprint $table) {\n $table->integer('role')->unsigned()->default(1)->change();\n });\n }", "title": "" }, { "docid": "9fe5f69f5e7f9e050f95c77f338a2b67", "score": "0.7167919", "text": "public function up()\n\t{\n\t\tSchema::table('app_user_apps_publishes', function($table) {\n $table->foreign('app_apps_application_id')->references('id')->on('app_apps_applications')->on_update('cascade')->on_delete('cascade');\n \n\t\t});\n\t\tSchema::table('app_apps_fbapps', function($table) {\n $table->foreign('app_apps_application_id')->references('id')->on('app_apps_applications')->on_update('cascade')->on_delete('cascade');\n \n\t\t});\n\t}", "title": "" }, { "docid": "6d90a2da929bf33f98672b2e502b7ab0", "score": "0.71649307", "text": "public function up()\n {\n \tif (!$this->db->table_exists('detailprivatechat')) {\n \t\t$this->dbforge->add_field( array(\n \t\t\t'id_detprivate' => array(\n\t\t\t\t\t'type' => 'int',\n\t\t\t\t\t'constraint' => 11,\n\t\t\t\t\t'unsigned' => true,\n\t\t\t\t\t'auto_increment' => true\n \t\t\t),\n \t\t\t'tanggal' => array(\n\t\t\t\t\t'type' => 'date',\n\t\t\t\t\t'null' => false\n \t\t\t),\n \t\t\t'sender' => array(\n\t\t\t\t\t'type' => 'varchar',\n\t\t\t\t\t'constraint' => 50,\n\t\t\t\t\t'null' => false,\n 'auto_increment' => true\n \t\t\t),\n 'pesan' => array(\n 'type' => 'text',\n 'constraint' => 500,\n 'null' => false,\n 'auto_increment' => true\n ),\n \t\t));\n \n \t\t/**\n \t\t * add key and create the table\n \t\t */\t\n \t\t$this->dbforge->add_key('id_detprivate', true);\n \t\t$this->dbforge->create_table('detailprivatechat');\n \n \t} //else\n }", "title": "" }, { "docid": "a196a50924c37bc4acc85080e758001a", "score": "0.7153089", "text": "public function up()\n {\n // add foreign key for table `Country`\n $this->addForeignKey(\n 'fk-Country-Languag_id',\n 'Country',\n 'Language_id',\n 'Languag',\n 'id',\n 'CASCADE'\n );\n\n // add foreign key for table `City`\n $this->addForeignKey(\n 'fk-City-Languag_id',\n 'City',\n 'Language_id',\n 'Languag',\n 'id',\n 'CASCADE'\n );\n }", "title": "" }, { "docid": "162e725d949ebd122673038d1aff23d4", "score": "0.7151073", "text": "public function up()\n\t{\n\t\tSchema::table('users', function($t){\n\t\t\t$t->integer('invited_by')->nullable()->unsigned();\n $t->foreign('invited_by')->references('id')->on('users')->on_delete('SET NULL');\n\t\t});\n\t}", "title": "" }, { "docid": "566ad67b21628fd05f3ba7d957eda497", "score": "0.71449924", "text": "public function up() {\n $users = $this->table('users');\n $users->renameColumn('isEnabled','is_enabled')\n ->renameColumn('confirmationToken','confirmation_token')\n ->renameColumn('timePasswordResetRequested','time_password_reset_requested')\n ->addColumn('name','string', array('limit'=> 100))\n ->changeColumn('username', 'string', array('limit' => 100, 'null'=>true))\n ->update();\n }", "title": "" }, { "docid": "2137cf920e0e161c947aa1bfcbf5e109", "score": "0.7143358", "text": "public function safeUp()\n {\n $this->createTable('user', [\n 'id' => Schema::TYPE_PK,\n 'username' => Schema::TYPE_STRING . ' NOT NULL',\n 'auth_key' => Schema::TYPE_STRING . ' NOT NULL',\n 'password_hash' => Schema::TYPE_STRING . ' NOT NULL',\n 'password_reset_token' => Schema::TYPE_STRING,\n 'email' => Schema::TYPE_STRING . ' NOT NULL',\n 'status' => Schema::TYPE_SMALLINT . ' NOT NULL DEFAULT \\'10\\'',\n 'created_at' => Schema::TYPE_INTEGER . ' NOT NULL',\n 'updated_at' => Schema::TYPE_INTEGER . ' NOT NULL',\n 'is_admin' => Schema::TYPE_INTEGER\n ]);\n }", "title": "" }, { "docid": "6637cefead2b5888298bce4b27e0aee2", "score": "0.71428365", "text": "public function up()\n {\n $this->getSchema()->create('forum_categories', function ($table){\n $table->increments('id');\n $table->string('name', 2048);\n $table->integer('order_id')->unsigned();\n $table->timestamps();\n });\n parent::up();\n }", "title": "" }, { "docid": "53f666cc232c0baef48005f71033c694", "score": "0.71387273", "text": "public function up()\n {\n DBManager::get()->execute(\"CREATE TABLE IF NOT EXISTS `vimeo_folders`\n (\n `folder_id` INT NOT NULL AUTO_INCREMENT,\n `vimeo_id` INT NOT NULL,\n `course_id` VARCHAR(32) NOT NULL REFERENCES `seminare`.`Seminar_id`,\n `mkdate` DATETIME NOT NULL,\n `chdate` DATETIME NOT NULL,\n PRIMARY KEY (`folder_id`),\n UNIQUE KEY vimeo_id (`vimeo_id`),\n UNIQUE KEY course_id (`course_id`)\n ) ENGINE InnoDB ROW_FORMAT=DYNAMIC\");\n }", "title": "" }, { "docid": "aec86ba424102a503aac8d06cc99ca02", "score": "0.713707", "text": "public function up()\n {\n // @todo: develop migration up features\n $this->getSchema()->create('dms_list', function ($table){\n $table->increments('id');\n $table->string('title', 1024);\n $table->string('from', 1024)->nullable();\n $table->date('deadline_date');\n $table->date('incoming_date');\n $table->boolean('accepted')->default(false);\n $table->boolean('finished')->default(false);\n $table->text('keywords')->nullable();\n $table->timestamps();\n });\n parent::up();\n }", "title": "" }, { "docid": "6ec82f7c36d8b7e50b3a541f3c7d4a31", "score": "0.7133449", "text": "public function up()\n {\n $schedulers = $this->table('schedulers');\n\n $schedulers->addColumn('model_id', 'integer')\n ->addColumn('model', 'string', ['limit' => 20])\n ->addColumn('user_id', 'integer')\n ->addForeignKey('user_id', 'users')\n ->addColumn('start_on', 'datetime')\n ->addColumn('alert', 'string', ['limit' => 45] )\n ->addColumn('created_by','integer', ['null' => true])\n ->addColumn('updated_by','integer', ['null' => true])\n ->addColumn('modified','datetime', ['null' => true])\n ->addColumn('created','datetime', ['null' => true])\n ->create();\n }", "title": "" }, { "docid": "3ecf692961adde4ef8fca742b2453b83", "score": "0.7131338", "text": "abstract public function up() : bool;", "title": "" }, { "docid": "c9dd69998241e77dbc5520d4f7c8164a", "score": "0.71300364", "text": "public function up()\n\t{\n\t\t$this->migrations_model->add_permissions($this->_permissions);\n\n\t\t// add the module menu\n\t\t$this->migrations_model->add_menus($this->_menus);\n\t}", "title": "" }, { "docid": "0d4d9c2dd58af1b1bb1e78f8d54af8b3", "score": "0.71264267", "text": "public function up()\n\t{\n\t\t/*Schema::table('job_user', function($table)\n\t\t{\n\t\t\t$table->drop_column('id');\n\t\t\t// $table->integer('id')->nullable();\n\t\t});*/\n\t\tDB::query('ALTER TABLE \"job_user\" ADD COLUMN \"id\" SERIAL NOT NULL');\n\t}", "title": "" }, { "docid": "2af9c9d3ca2fcf37dffca56df2f4f121", "score": "0.71180964", "text": "public function up()\n {\n $this->execute('ALTER TABLE caixa.remessacobrancaregistrada ADD COLUMN k147_arquivoremessa OID');\n\n $this->table('db_syscampo', array('schema' => 'configuracoes'))\n ->insert(array('codcam', 'nomecam', 'conteudo', 'descricao', 'valorinicial', 'rotulo', 'tamanho', 'nulo', 'maiusculo', 'autocompl', 'aceitatipo', 'tipoobj', 'rotulorel'),\n array(array(22306,'k147_arquivoremessa','oid','Arquivo da Remessa',\n '', 'Arquivo da Remessa',1,'t','f','f',0,'text','Arquivo da Remessa'))\n )\n ->saveData();\n\n $this->table('db_sysarqcamp', array('schema' => 'configuracoes'))\n ->insert(array('codarq', 'codcam', 'seqarq', 'codsequencia'),\n array(array(3981,22306,7,0))\n )\n ->saveData();\n\n\n }", "title": "" }, { "docid": "47bf2937475bffe61f9d9a95bd757920", "score": "0.71168584", "text": "public function safeUp()\n\t{\n\t\t$this->up();\n\t}", "title": "" }, { "docid": "47bf2937475bffe61f9d9a95bd757920", "score": "0.71168584", "text": "public function safeUp()\n\t{\n\t\t$this->up();\n\t}", "title": "" }, { "docid": "47bf2937475bffe61f9d9a95bd757920", "score": "0.71168584", "text": "public function safeUp()\n\t{\n\t\t$this->up();\n\t}", "title": "" }, { "docid": "758cc109f5b4b5ecaf03396e6e4304c6", "score": "0.7112169", "text": "public function up()\n {\n DBManager::get()->execute(\"ALTER TABLE `external_videos`\n CHANGE `course_id` `range_id` CHAR(32) NOT NULL,\n DROP INDEX `course_id`, ADD INDEX `range_id` (`range_id`)\");\n\n DBManager::get()->execute(\"ALTER TABLE `vimeo_folders`\n CHANGE `course_id` `range_id` CHAR(32) NOT NULL,\n DROP INDEX `course_id`, ADD INDEX `range_id` (`range_id`)\");\n }", "title": "" }, { "docid": "534f29e26ddcde1cfee5172dbe48a837", "score": "0.71096176", "text": "public function safeUp() {\n\t\t$this->up();\n\t}", "title": "" }, { "docid": "534f29e26ddcde1cfee5172dbe48a837", "score": "0.71096176", "text": "public function safeUp() {\n\t\t$this->up();\n\t}", "title": "" }, { "docid": "b1d3d0484557762f19ef9b54fc3bb74f", "score": "0.71086097", "text": "public function up()\n {\n //add the column named \"user_id\" to the recipes\n //add to the posts table the next column\n Schema::table('posts', function($table){\n //the name is \"user_id\"\n $table->integer(\"user_id\");\n });\n }", "title": "" }, { "docid": "d01a6a435b41f85cee3b6ef8b0e1a80d", "score": "0.7104628", "text": "public function safeUp()\n {\n $this->up();\n }", "title": "" }, { "docid": "11eaea95171d14d05edcd0febb918f8a", "score": "0.71035916", "text": "public function up() {\n $this->dbforge->drop_table('positions', TRUE); \n \n $this->dbforge->add_field(array(\n 'id' => array(\n 'type' => 'INT',\n 'constraint' => 11,\n 'auto_increment' => TRUE\n ),\n 'pos_name' => array(\n 'type' => 'VARCHAR',\n 'constraint' => 100\n ),\n 'pos_desc' => array(\n 'type' => 'VARCHAR',\n 'constraint' => 100\n ),\n 'date_updated' =>array(\n 'type'=>'DATETIME'\n ),\n 'date_created' => array(\n 'type'=>'DATETIME'\n ),\n 'updated_from_ip' => array(\n 'type' => 'VARCHAR',\n 'constraint' => 100\n ),\n 'created_from_ip' => array(\n 'type' => 'VARCHAR',\n 'constraint' => 100\n )\n ));\n $this->dbforge->add_key('id', TRUE);\n $this->dbforge->create_table('positions');\n }", "title": "" }, { "docid": "99a1670f5b81956d542ace5e02da1bc5", "score": "0.7102536", "text": "public function up()\n {\n $this->table('message_choices', ['id' => false, 'primary_key' => ['message_choices_id']])\n ->addColumn('message_choices_id', 'integer', [\n 'autoIncrement' => true,\n 'default' => null,\n 'limit' => 11,\n 'null' => false,\n ])\n ->addColumn('message_bords_id', 'integer', [\n 'default' => null,\n 'limit' => 11,\n 'null' => false,\n ])\n ->addColumn('content', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => false,\n ])\n ->create();\n\n $this->table('message_choices')\n ->addForeignKey(\n 'message_bords_id',\n 'message_bords',\n 'message_bords_id',\n [\n 'update' => 'CASCADE',\n 'delete' => 'CASCADE'\n ]\n )\n ->update();\n }", "title": "" }, { "docid": "4224ce01c2e45c116d1f46b9d1ed6c40", "score": "0.7102249", "text": "public function up(){\n $sql=\"ALTER TABLE `drivers`\nMODIFY COLUMN `cpf` varchar(14);\";\n $this->execute($sql);\n\n }", "title": "" }, { "docid": "24d546a18ae11a3e03ac8e379d9148c3", "score": "0.71009386", "text": "public function up()\n {\n $fields = array(\n 'user_name' => array(\n 'type' => 'varchar',\n 'constraint' => '255'\n ),\n );\n $this->dbforge->add_column('invitations', $fields);\n }", "title": "" }, { "docid": "c8dffc4b4cef24bfd66e82c9b44f5319", "score": "0.7092608", "text": "public function up()\n {\n $this->createTable('orders',[\n 'id'=>$this->integer(),\n 'price'=>$this->double(),\n 'address'=>$this->string(),\n 'PRIMARY KEY(id)',\n ]);\n $this-$this->addForeignKey('orders_id','customer','id','customer_id');\n\n }", "title": "" }, { "docid": "e7ae519ae5289ab2bbfb92144091a556", "score": "0.70918465", "text": "public function up()\r\n {\r\n $this -> executeSQL('ALTER TABLE esq_domain_names DROP rank, DROP domain_name_attribute_id;');\r\n $this -> executeSQL('ALTER TABLE esq_website_attributes DROP domain_name_attribute_id;');\r\n $this -> executeSQL('ALTER TABLE esq_email_accounts DROP customer_id;');\r\n }", "title": "" }, { "docid": "b838216022e4539c1470ec94a7538818", "score": "0.708865", "text": "public function up()\n {\n echo \"\\n Adding client_snapshot_session_groups table\";\n Schema::create_table('client_snapshot_session_groups', function($table) {\n\n $table->auto_increment_integer('id', array('constraint' => 20));\n\n\n $table->integer('session_id', array('constraint' => 20));\n $table->integer('group_id', array('constraint' => 20));\n\n });\n\n echo \"\\n Schema changes successful\";\n }", "title": "" }, { "docid": "d89e1c1e533a84f5271d509ab7368342", "score": "0.70872355", "text": "public function up()\n {\n $this->addColumn('catalog_item', 'is_main_page', $this->boolean()->defaultValue(false));\n }", "title": "" }, { "docid": "82ed79d30ab7851e34e9f52ec9bf64dd", "score": "0.70728374", "text": "public function up()\n {\n $this->insert('user', ['id' => 1, 'username' => 'admin', 'password' => 'test', 'is_active' => true]);\n $this->insert('user', ['id' => 2, 'username' => 'disabled', 'password' => 'test', 'is_active' => false]);\n }", "title": "" }, { "docid": "5a9c7c4b549ac0bec30050b80431db2b", "score": "0.7065377", "text": "public function up()\n\t{\n\t\t//create multiple columns through an array\n\t\t$this->dbforge->add_field(array(\n\t\t\t'comment_id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '5',\n\t\t\t\t'auto_increment' => TRUE\n\t\t\t),\n\t\t\t'comments' => array(\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '100',\n\t\t\t),\n\n\t\t\t'user_id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t),\n\n\t\t\t'review_id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t),\n\t\t\t'article_id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '10',\n\t\t\t),\n\t\t\t//create foreign to link the two tables together\n\n\t\t));\n\n\t\t//Assign a primary key to a column\n\t\t$this->dbforge->add_key('comment_id',TRUE);\n\n\t\t//Create the table with the specified column\n\t\t$this->dbforge->create_table('comments');\n\n\t}", "title": "" }, { "docid": "4e79bb84ab1d2098a3de3adddc5aa5c6", "score": "0.7061022", "text": "public function up()\n\t{\n $this->forge->addField('id');\n\n // add table fields\n $this->forge->addField([\n 'name' => ['type' => 'VARCHAR', 'constraint' => 255],\n 'display_name' => ['type' => 'VARCHAR', 'constraint' => 255],\n // add created_at and updated_at, they seem to get populated via the model?\n 'created_at' => ['type' => 'DATETIME'],\n 'updated_at' => ['type' => 'DATETIME'],\n ]);\n\n $this->forge->createTable('items');\n\t}", "title": "" }, { "docid": "cc1cc37ef944a5fc7969519713c41103", "score": "0.7055788", "text": "public function up()\n\t{\n\t\t//create multiple columns through an array\n\t\t$this->dbforge->add_field(array(\n\t\t\t'article_id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '5',\n\t\t\t\t'auto_increment' => TRUE\n\t\t\t),\n\t\t\t'title' => array(\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '100',\n\t\t\t),\n\n\t\t\t'image' => array(\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '100',\n\t\t\t),\n\n\t\t\t'paragraph' => array(\n\t\t\t\t'type' => 'VARCHAR',\n\t\t\t\t'constraint' => '100',\n\t\t\t),\n\n\t\t\t'review_id' => array(\n\t\t\t\t'type' => 'INT',\n\t\t\t\t'constraint' => '5',\n\t\t\t),\n\n\n\t\t\t//create foreign to link the two tables together\n\n\n\t\t));\n\n\t\t//Assign a primary key to a column\n\t\t$this->dbforge->add_key('article_id',TRUE);\n\n\t\t//Create the table with the specified column\n\t\t$this->dbforge->create_table('article');\n\n\t}", "title": "" }, { "docid": "29f096e7e3e4712da801f35eb808d704", "score": "0.7052144", "text": "public function up()\n {\n Schema::table('documentos', function (Blueprint $table) {\n $table->string('dependencia')->after('fecha_oficio');//after para especificar el lugar, de lo contrario se pondrá al final\n $table->renameColumn('dirigido','para');\n $table->string('envia',20)->nullable()->default(null)->change();\n //\n });\n }", "title": "" }, { "docid": "89067490e8428ab2fd0c2311d50e869e", "score": "0.70489424", "text": "public function up()\n {\n $table = $this->table('students');\n $table->renameColumn('firstname', 'lastname')->update();\n }", "title": "" }, { "docid": "75e17541b7cc31d1cec468b125bc9180", "score": "0.70488894", "text": "public function up()\n {\n $this->createTable('{{%oil_price}}', \n [\n 'id' => $this->primaryKey(),\n 'trade_date' => $this->date(),\n 'code' => $this->string(4),\n 'close_price' => $this->float(),\n 'open_price' => $this->float(),\n 'low_price' => $this->float(),\n 'high_price' => $this->float(),\n ]\n );\n }", "title": "" }, { "docid": "0fc9647ca5a633fe33915ac5fa5f200d", "score": "0.70437926", "text": "public function up()\n {\n \n $this->addDicionarioDados();\n $this->criarTabelas(); \n }", "title": "" }, { "docid": "21b73fe60b26b081591b1584666e7386", "score": "0.7043687", "text": "public function safeUp()\n\t{\n $this->createTable('gallery', array(\n 'gallery_id' => 'INT(11) UNSIGNED NOT NULL AUTO_INCREMENT',\n 'title' => 'varchar(255) NOT NULL',\n 'description' => 'TEXT DEFAULT NULL',\n 'is_active' => 'TINYINT(1) NOT NULL DEFAULT 1',\n 'PRIMARY KEY (gallery_id)',\n ),\n 'ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci'\n );\n $this->createTable('photo', array(\n 'photo_id' => 'INT(11) UNSIGNED NOT NULL AUTO_INCREMENT',\n 'gallery_id' => 'INT(11) UNSIGNED NOT NULL',\n 'title' => 'varchar(255) NOT NULL', \n 'filename' => 'varchar(255) NOT NULL',\n 'thumb_filename' => 'varchar(255) NOT NULL',\n 'description' => 'VARCHAR(255) NOT NULL',\n 'mime_type' => 'VARCHAR(32) NOT NULL',\n 'sort_order' => 'INT(10) DEFAULT NULL',\n 'is_top' => 'TINYINT(1) NOT NULL DEFAULT 1',\n 'PRIMARY KEY (photo_id)',\n //'REFERENCES gallery (gallery_id) ON DELETE RESTRICT ON UPDATE RESTRICT'\n ),\n 'ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci'\n );\n $this->addForeignKey('FK_photo_gallery', 'photo', 'gallery_id', 'gallery', 'gallery_id', 'RESTRICT', 'RESTRICT');\n\t}", "title": "" }, { "docid": "b24c7d01a2be6999c289a4177573b4ca", "score": "0.70405304", "text": "public function safeUp() {\n\t$this->createTable('BillingAction', array(\n'name'=>\" varchar(3) NOT NULL\",\n \"PRIMARY KEY (`name`)\"\n\t),'ENGINE=InnoDB DEFAULT CHARSET=utf8');\n }", "title": "" }, { "docid": "39971d0b4435ab81901c32ccc0de12e7", "score": "0.7040002", "text": "public function up()\n {\n if (!$this->getDb()->schema()->hasTable('availability')) {\n $this->getDb()->schema()->create('availability', function ($table) {\n $table->increments('id');\n $table->timestamps();\n });\n }\n\n /*\n * Create availability_translation table\n */\n if (!$this->getDb()->schema()->hasTable('availability_translation')) {\n $this->getDb()->schema()->create('availability_translation', function ($table) {\n $table->increments('id');\n $table->string('name', 64);\n $table->text('description');\n $table->integer('availability_id')->unsigned();\n $table->integer('language_id')->unsigned();\n $table->timestamps();\n $table->foreign('availability_id')->references('id')->on('availability')->onDelete('cascade')->onUpdate('no action');\n $table->foreign('language_id')->references('id')->on('language')->onDelete('cascade')->onUpdate('no action');\n $table->unique(Array('name', 'language_id'));\n });\n }\n }", "title": "" }, { "docid": "a27e35bcde5f9cc29b6161c07698d902", "score": "0.703973", "text": "public function up()\n {\n $rows = [\n [\n 'login_name' => 'admin',\n 'name' => '管理员',\n 'sex' => 'male',\n 'phone' => 18888888888,\n 'email' => '[email protected]',\n 'password' => $this->create_pass(\"Cms@Admin\"),\n 'create_time' => time()\n ]\n ];\n\n $this->table('user')->insert($rows)->save();\n }", "title": "" }, { "docid": "2870cdd7702c4d38a398fdbb00492ed0", "score": "0.70360583", "text": "public function safeUp()\n\t{\n $this->renameColumn(\"folders\", \"default\", \"is_default\");\n\t}", "title": "" }, { "docid": "e4d90cdc2797e4d0daa1c2df9e540a8e", "score": "0.70358133", "text": "public function up()\n\t{\n\t\tDB::table('users')->insert(array(\n\t\t\t'email'\t\t=> '[email protected]',\n\t\t\t'password'\t=> Hash::make('password'),\n\t\t\t'name'\t\t=> 'Test User',\n\t\t\t'team'\t\t=> 'team1',\n\t\t\t'cumulative'=> 123546,\n\t\t\t'created_at'=> date('Y-m-d H:m:s'),\n\t\t\t'updated_at'=> date('Y-m-d H:m:s')\n\t\t));\n\t\t\n\t\tDB::table('metrics')->insert(array(\n\t\t\t'email'\t\t=> '[email protected]',\n\t\t\t'steps'\t\t=> '61728',\n\t\t\t'created_at'=> date('Y-m-d H:m:s'),\n\t\t\t'updated_at'=> date('Y-m-d H:m:s')\n\t\t));\n\t\t\n\t\tDB::table('metrics')->insert(array(\n\t\t\t'email'\t\t=> '[email protected]',\n\t\t\t'steps'\t\t=> '61728',\n\t\t\t'created_at'=> date('2012-07-25 10:00:00'),\n\t\t\t'updated_at'=> date('2012-07-26 10:00:00')\n\t\t));\n\t}", "title": "" } ]
86dd35fadc177be05218120b7470d3df
Converts the passed database results to XML
[ { "docid": "26b1de41a91641d5a045f6465c41f115", "score": "0.0", "text": "function RSReturnQueryResults($result, $compressed = true) {\n global $RSallowUncompressed;\n global $RStempPath;\n\tglobal $cstCDATAseparator;\n\tglobal $cstRSsendUncompressed;\n\tglobal $cstClientID;\n\tglobal $cstRS_POST;\n\n $theFile = \"\";\n $filename = '';\n\n // set optimizer value (if the number of the result fields is greater than this number, file method will be apply)\n $optimizerValue = 2000;\n // FIX ME: ---> this value can be changed... test it to get optimum results\n\n if (($result->num_rows * $result->field_count) > $optimizerValue) {\n\n // create a temporary file with a unique filename\n $filename = @tempnam($RStempPath, \"RSR\");\n\n if ($filename) {\n // open the temporary file\n $file = @fopen($filename, \"w\");\n\n if ($file) {\n // write XML response\n fwrite($file, \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" ?>\");\n fwrite($file, \"<RSRecordset>\");\n fwrite($file, \"<rows>\");\n\n while ($row = $result->fetch_assoc()) {\n fwrite($file, \"<row>\");\n\n foreach ($row as $field => $value) {\n fwrite($file, \"<column name=\\\"\" . $field . \"\\\"><![CDATA[\" . str_replace(\"]]>\", $cstCDATAseparator, $value) . \"]]></column>\");\n }\n\n fwrite($file, \"</row>\");\n }\n\n fwrite($file, \"</rows>\");\n fwrite($file, \"</RSRecordset>\");\n\n // close the file\n fclose($file);\n }\n }\n }\n\n // Check compression required\n $compress = ((isset($GLOBALS[$cstRS_POST][$cstRSsendUncompressed]) || !$compressed) && ($RSallowUncompressed))? FALSE : TRUE;\n\n if (file_exists($filename) && filesize($filename) > 0) {\n header(\"Content-type: text/xml\");\n if ($compress) {\n $comp_result = gzCompressFile($filename);\n if ($comp_result !== false) {\n // delete uncompressed temporary file\n removeTmpFile($filename);\n $filename = $comp_result;\n Header('Content-type: application/x-gzip');\n }\n }\n\n Header('Content-Length: ' . filesize($filename));\n readfile($filename);\n\n } else {\n // build response using the string concatenation; it is slower than file method if the number of results is high\n $theFile .= \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" ?>\";\n $theFile .= \"<RSRecordset>\";\n $theFile .= \"<rows>\";\n\n while ($row = $result->fetch_assoc()) {\n $theFile .= \"<row>\";\n\n foreach ($row as $field => $value) {\n $theFile .= \"<column name=\\\"\" . $field . \"\\\"><![CDATA[\" . $value . \"]]></column>\";\n }\n\n $theFile .= \"</row>\";\n }\n\n $theFile .= \"</rows>\";\n $theFile .= \"</RSRecordset>\";\n\n header(\"Content-type: text/xml\");\n\n if ($compress) {\n $theFile = checkCompressionVersion($theFile).gzCompress($theFile, 9);\n Header('Content-type: application/x-gzip');\n }\n\n Header(\"Content-Length: \" . strlen($theFile));\n echo $theFile;\n }\n\n // delete the temporary file\n if ($filename) {\n removeTmpFile($filename);\n }\n\n if (isset($GLOBALS[$cstRS_POST][$cstClientID])) {\n checkTriggeredEvents($GLOBALS[$cstRS_POST][$cstClientID]);\n }\n\n mem_usage_check();\n\n // Terminate PHP execution\n exit;\n}", "title": "" } ]
[ { "docid": "6f2ab7789791b42a200c7b39cba78f0b", "score": "0.695662", "text": "function toXML( $database_name, $table, $columns, $rows ) {\n\t\t\t$output = '<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?> \n<database name=\"' . $database_name . '\">\n\t<table name=\"' . $table . '\">\n\t\t<columns>';\n\t\t\tforeach ( $columns as $column ) {\n\t\t\t\t// for custom queries we don't know the column types\n\t\t\t\tif ( property_exists( $column, \"Type\" ) ) {\n\t\t\t\t\t$output .= '\n\t\t\t<column name=\"' . $column->Field . '\" type=\"' . $column->Type . '\" null=\"' . $column->Null . '\" key=\"' . $column->Key . '\" default=\"' . $column->Default . '\" extra=\"' . $column->Extra . '\" />';\n\t\t\t\t} else {\n\t\t\t\t\t$output .= '\n\t\t\t<column name=\"' . $column->Field . '\" />';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$output .= '\n\t\t</columns>\n\t\t<rows>';\n\t\t\tforeach ( $rows as $row ) {\n\t\t\t\t$line = '\n\t\t\t<row>';\n\t\t\t\tforeach ( $columns as $column ) {\n\t\t\t\t\t$line .= '\n\t\t\t\t<' . $column->Field . '>' . $row[$column->Field] . '</' . $column->Field . '>';\n\t\t\t\t}\n\t\t\t\t$line .= '\n\t\t\t</row>';\n\t\t\t\t$output .= $line;\n\t\t\t}\n\t\t\t$output .= '\n\t\t</rows>\n\t</table>\n</database>\n';\n\t\t\treturn $output;\n\t\t}", "title": "" }, { "docid": "8d7e661299bfbb723dd6d29356fb7bf6", "score": "0.6879795", "text": "function toXML(){\n \n }", "title": "" }, { "docid": "69994b505ebc0da61924284e42599ec2", "score": "0.6649563", "text": "public function as_xml()\n\t{\n\t\t$this->formatOutput = TRUE;\n\t\treturn $this->saveXML();\n\t}", "title": "" }, { "docid": "0069a6724acd3ac3b1cd01d233f1b411", "score": "0.65907204", "text": "public function obterXmls() {\n \n $sql = \"SELECT * FROM xmls\";\n $query = $this->query->setQuery($sql);\n return $query;\n }", "title": "" }, { "docid": "f1d2ff3b9c5d0f22c10483af2fbcb017", "score": "0.64087576", "text": "function toXML( ) {\n\t\t$node_name = $this->_table_name;\n\t\t$xml = \"<$node_name>\";\n foreach (get_object_vars( $this ) as $k => $v) {\n\t\t\tif (is_array($v) or is_object($v) or $v === NULL) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ($k[0] == '_') { // internal field\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$xml .= '<' . $k . '><![CDATA[' . $v . ']]></' . $k . '>';\n\t\t}\n\t\t$xml .= '</' . $node_name . '>';\n\t\treturn $xml;\n\t}", "title": "" }, { "docid": "a26da0e5188c8a86342e67f46c8999f0", "score": "0.6403176", "text": "public function toXML( )\n {\n \n $xml = \"<result><code>$this->code</code><data>\";\n foreach( $this->_data as $quote ) {\n $xml .= $quote->toXML();\n }\n $xml .= \"</data></result>\";\n return $xml;\n }", "title": "" }, { "docid": "ce9536ab6a95fad3de2ede7683bf3eca", "score": "0.63974494", "text": "public function asXml();", "title": "" }, { "docid": "1de8faa4fcec803e9f1c75adb3126a87", "score": "0.63792175", "text": "public function toXml()\n {\n return call_user_func_array(array(get_called_class(), 'toDom'), func_get_args())->saveXML();\n }", "title": "" }, { "docid": "480d7f34be303d3a9dc94e035a6d3210", "score": "0.63749063", "text": "function writeXML($recordName, $query, $valuesArray, $dbh)\r\t\t{\r\t\t\t$stmt = $dbh->prepare($query);\r\t\t\t$stmt->execute($valuesArray);\r\t\t\t$records = $stmt->fetchAll();\r\t\t\techo \"<\" . $recordName . \"s>\";\r\t\t\t\r\t\t\tforeach($records as $record) {\r\t\t\t\techo \"<$recordName>\";\r\t\t\t\tforeach ($record as $key => $value)\r\t\t\t\t{\r\t\t\t\t\tif (!is_numeric($key))\r\t\t\t\t\t\techo \"<$key>$value</$key>\";\r\t\t\t\t}\r\t\t\t\techo \"</$recordName>\";\r\t\t\t}\t\r\t\t\t\r\t\t\techo \"</\" . $recordName . \"s>\";\r\t\t}", "title": "" }, { "docid": "3e1ab192ecfd22cbf10f10ef51ef666f", "score": "0.6340001", "text": "function sqlConverter(){\n\t// baru setelah itu diconvert menjadi format XML dari database tersebut\n\t// Setting dengan MySQL\n\t\t$host = \"localhost\";\n\t\t$user = \"root\";\n\t\t$pass = \"\";\n\t\t$database = \"pegawai\";\n\t\t$outputFile = \"datasql.xml\";\n\t \n\t\t// Query database\n\t\t$SQL_query = \"SELECT * FROM PEGAWAI\";\n\t \n\t\t// connect dengan MySQL, memilih database, dan menyimpan hasil query database \n\t\t$DB_link = mysql_connect($host, $user, $pass) or die(\"Could not connect to host.\");\n\t\tmysql_select_db($database, $DB_link) or die (\"Could not find or access the database.\");\n\t\t$result = mysql_query ($SQL_query, $DB_link) or die (\"Data not found. Your SQL query didn't work... \");\n\n\t\t// membuat XML\n\t\t//header(\"Content-type: application/xml\");\n\t\t$XML = \"<?xml version=\\\"1.0\\\"?>\\n\";\n\t\t$XML .= \"<?xml-stylesheet type=\\\"text/xsl\\\" href=\\\"datasql.xsl\\\"?>\\n\";\n\t\t$XML .= \"<database>\\n\";\n\t\n\t\t// rows\n\t\twhile ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { \n\t\t\t$XML .= \"\\t<row>\\n\"; \n\t\t\t$i = 0;\n\t\t\t// cells\n\t\t\tforeach ($row as $cell) {\n\t\t\t\t// mengganti karakter \n\t\t\t\t$cell = str_replace(\"&\", \"&amp;\", $cell);\n\t\t\t\t$cell = str_replace(\"<\", \"&lt;\", $cell);\n\t\t\t\t$cell = str_replace(\">\", \"&gt;\", $cell);\n\t\t\t\t$cell = str_replace(\"\\\"\", \"&quot;\", $cell);\n\t\t\t\t$col_name = mysql_field_name($result,$i);\n\t\t\t\t// menambahkan tag <identifier> </identifier> dari nama kolom\n\t\t\t\t$XML .= \"\\t\\t<\" . $col_name . \">\" . $cell . \"</\" . $col_name . \">\\n\";\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t$XML .= \"\\t</row>\\n\"; \n\t\t}\n\t\t$XML .= \"</database>\\n\";\n\t\t//save ke file output\n\t\t$handle = fopen($outputFile, \"w\");\n\t\tfwrite($handle, $XML);\n\t\tfclose($handle);\n\t}", "title": "" }, { "docid": "8dc480b21dbe612a9136153df24b2b7a", "score": "0.62413174", "text": "public function getXML(){\n\n\t\t$node_name = preg_replace('/^.*\\\\\\\\/','',get_class($this));\n\n\t\t$xml = \"<\".$node_name.\">\";\n\n\t\t$columns = $this->_table->getColumns();\n\n\t\tforeach($this->_fieldData as $field=>$value){\n\n\t\t\tif($columns[$field]){\n\t\t\t\tif($columns[$field]->isBoolean()){\n\t\t\t\t\t$value = ($value) ? '1' : '0';\n\t\t\t\t}else if($columns[$field]->isDateTime() && ($dateTime = $this->getDateTimeValue($field))){\n\t\t\t\t\t$value = $dateTime->format('Y-m-d\\TH:i:sP');\n\t\t\t\t}else if($columns[$field]->isDate() && ($dateTime = $this->getDateTimeValue($field))){\n\t\t\t\t\t$value = $dateTime->format('Y-m-d');\n\t\t\t\t}else if($columns[$field]->isDate() && ($dateTime = $this->getDateTimeValue($field))){\n\t\t\t\t\t$value = $dateTime->format('H:i:s');\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(stristr($value,'&') || stristr($value,'<') || stristr($value,'>')){\n\t\t\t\t$value = '<![CDATA[' . $value . ']]>';\n\t\t\t}\n\t\t\t$field = preg_replace('/\\W/','',$field);\n\t\t\t$xml .= '<' . $field . '>' . $value . '</' . $field . '>';\n\t\t}\n\n\t\t$xml .= \"</\".$node_name.\">\";\n\n\t\treturn $xml;\n\t}", "title": "" }, { "docid": "a5259323884e25ed521627777b9dfff2", "score": "0.6224391", "text": "public function toXML()\n {\n return $this->generate()->saveXML();\n }", "title": "" }, { "docid": "83de4dcc3601f0fc216b39bb5510ed0d", "score": "0.62170374", "text": "protected function convertResultData($results) {\n $single = false;\n if (empty($results)) {\n $results = array();\n }\n if (is_object($results)) {\n $single = true;\n }\n if ($results) {\n if ($single) {\n $results = $results->getData();\n } else {\n foreach ($results as &$result) {\n $result = $result->getData();\n }\n }\n }\n if ($this->responseType === 'json') {\n //utf8 encode all the data, otherwise it causes errors when json_encode is performed, one example is 'Hübner' from a comment.\n //this could be done before the data is stored to mysql, but it would also mean that the xml output would be utf8 encoded when it doesn't need to be.\n array_walk_recursive($results, function (&$item, $key) {\n if (!mb_detect_encoding($item, 'utf-8', true)) {\n $item = utf8_encode($item);\n }\n });\n return json_encode($results);\n } else {\n if ($single) {\n $xml = '<?xml version=\"1.0\"?><record></record>';\n } else {\n $xml = '<?xml version=\"1.0\"?><records></records>';\n }\n $xml_data = new SimpleXMLElement($xml);\n $this->array_to_xml($results, $xml_data, 'records');\n return $xml_data->asXML();\n }\n }", "title": "" }, { "docid": "9d15182c5f8b7d763d4e0423da297a1f", "score": "0.6216389", "text": "function result() {\n\t\t\t$filter = new $this->models[0];\n\t\t\t$filtered_records = $filter->filter_xml($this->params['xml']['filename'], !empty($this->params['xml']['field']) ? $this->params['xml']['field'] : '');\n\t\t\t\n\t\t\t//after use, delete the file\n\t\t\t$filter->remove_file($this->params['xml']['filename']);\n\t\t\t\n\t\t\treturn $filter->create_xml($filtered_records);\n\t\t}", "title": "" }, { "docid": "a572102d5f1bbfd3f49ed4532e4bcbfd", "score": "0.6157905", "text": "function getAllTours() {\n require '../../utils/db_connection.php'; // database connection\n $sql = 'select * from tour;'; //SQL statement\n $result = &$db->query($sql); // query from databases\n $allTours = array(); // array of tours\n while ($tourRow = $result->fetchRow()) {\n $tour = array();\n foreach ($tourRow as $key => $value) {\n switch ($key) {\n case 0 : $tour[\"tourID\"] = $value;\n break;\n case 1 : $tour[\"name\"] = $value;\n break;\n case 2 : $tour[\"state\"] = $value;\n break;\n case 3 : $tour[\"imageUrl\"] = $value;\n break;\n case 4 : $tour[\"date\"] = $value;\n break;\n default : break;\n }\n }\n $allTours[] = $tour;\n }\n //return XML\n header('Content-Type: text/xml');\n echo '<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n <tours>';\n foreach ($allTours as $row) {\n echo \"\n <tour>\";\n echo \"\n <tourID>\" . $row['tourID'] . \"</tourID>\";\n echo \"\n <name>\" . $row['name'] . \"</name>\";\n echo \"\n <state>\" . $row['state'] . \"</state>\";\n echo \"\n <imageUrl>\" . $row['imageUrl'] . \"</imageUrl>\";\n echo \"\n <date>\" . $row['date'] . \"</date>\";\n echo \"\n </tour>\";\n }\n echo \"\n </tours>\";\n}", "title": "" }, { "docid": "c85bb23a658201a2ff251b1f3dec29c0", "score": "0.61503315", "text": "public function renderXml();", "title": "" }, { "docid": "96c4610127876335332540af0abe351d", "score": "0.61202484", "text": "public function toXml() : string\n {\n $root = Inflector::camelCase(Inflector::plural($this->model ?? 'Record'));\n $data = [$root => [\n Inflector::camelCase($this->model ?? 'Record') => $this->toArray(),\n ]];\n\n return Xml::fromArray($data);\n }", "title": "" }, { "docid": "982ee1d3e54ab224354bf6fd970535c1", "score": "0.60898244", "text": "public function Consulta_XML($Sql_consulta, $campos){\r\n\t\t\r\n\t\t// Realizar consulta Mysql\r\n\t\t$result = mysql_query($Sql_consulta, $this->conex);\r\n\t\tif (!$result) { die('Consulta erronea: ' . mysql_error());}\r\n\t\telse {\r\n\t\tif (mysql_num_rows($result)>0){\r\n\t\t// Pasar datos a objetos\r\n\t\tfor ($f=0; $f < mysql_num_rows($result);$f++) {\r\n \t\t$row = mysql_fetch_array($result, MYSQL_NUM);\r\n\t\t\t$Resultado[$f] = $row;\r\n\t\t\t};\r\n\t\t// Generar XML\r\n\t\t$xml = '<?xml version=\"1.0\" encoding=\"utf-8\"?>';\t\r\n\t\t$Ncampos = count($Resultado[0]);\r\n\t\tif (count($campos) == $Ncampos) {\r\n\t\tfor ($z=0; $z< mysql_num_rows($result);$z++) {\r\n\t\t $xml .= '<item>';\r\n\t\t\tfor ($y=0; $y<$Ncampos; $y++){\r\n\t\t \t$xml .= '<'.$campos[$y].'>';\r\n\t\t \t$xml .= $Resultado[$z][$y];\r\n\t\t \t$xml .= '</'.$campos[$y].'>';\r\n\t\t }\r\n\t\t\t\r\n\t\t\t$xml .= '</item>';\t\r\n\t\t} \r\n\t\t\r\n\t\treturn $xml;\r\n\t\t} else return false;\r\n\t\t\r\n\t\t} else return false;\r\n\t\t\r\n\t\tmysql_free_result($result);\r\n\t\t\r\n\t\t}\t\t\r\n\t}", "title": "" }, { "docid": "88948ecb79a7e6aa9e8bf0d9838a7e3f", "score": "0.60810643", "text": "function xml($filepointer = NULL) {\n $tablexmlname = $this->table . '-db-table';\n if (!$filepointer) $file = fopen($tablexmlname . '.xml', 'w');\n\n $xml = '';\n $data = $this->load_all_records();\n// echo '<pre>'; print_r($data); echo '</pre>';\n $xml .= '<?xml version=\"1.0\" ?>' . \"\\n\" .\n '<' . $tablexmlname . \">\\n\";\n fwrite($file, $xml);\n foreach($data as $recordID=>$record) {\n \n $xml = '<recordtype ID=\"' . htmlentities($recordID) . '\">' . \"\\n\";\n foreach($record as $key=>$value) {\n $xml .= \"<$key>\" . htmlentities($value) . \"</$key>\\n\";\n }\n $xml .= '</recordtype>' . \"\\n\";\n fwrite($file, $xml);\n }\n $xml = '</' . $tablexmlname . \">\\n\";\n fwrite($file, $xml);\n fclose($file);\n return $tablexmlname . '.xml';\n }", "title": "" }, { "docid": "f83bc2c63b8ee73eb17d3da4b392a754", "score": "0.60505986", "text": "function toXml()\n{\n$xml_data = new SimpleXMLElement('<?xml version=\"1.0\" ?><xmlDS></xmlDS>');\n$data = $this->data;\n$n = $this->toArray();\n$this->array_to_xml($n,$xml_data);\n$result = $xml_data->asXML();\n$xmlDocument = new DOMDocument('1.0');\n$xmlDocument->preserveWhiteSpace = false;\n$xmlDocument->formatOutput = true;\n$xmlDocument->loadXML($result);\n$retval = $xmlDocument->saveXML();\nreturn $retval;\n}", "title": "" }, { "docid": "c0dfe6abe0a28d1e867e6671b8667ad1", "score": "0.6049676", "text": "function DoXML() {\n global $DB;\n\n $fp = fopen($this->FilePath, 'wb');\n fputs($fp, \"<?xml version=\\\"1.0\\\"?>\\n\");\n fputs($fp, \"<dataxml>\\n\");\n\n foreach ($this->SqlString as $strqry) {\n if ($strqry == \"\") {\n $this->IsError = 1;\n $this->ErrorString = \"Error the query can't be a null string\";\n return -1;\n }\n $result = $DB->query($strqry);\n\n if ($result == false) {\n $this->IsError = 1;\n $this->ErrorString = \"Error in SQL Query: \".$strqry;\n return -1;\n }\n // OK... let's create XML;)\n fputs($fp, \" <fields>\\n\");\n $i = 0;\n $FieldsVector = [];\n while ($i < $DB->numFields ($result)) {\n $name = $DB->fieldName($result, $i);\n fputs($fp, \" <field>\".$name.\"</field>\\n\");\n $FieldsVector[] = $name;\n $i++;\n }\n\n fputs($fp, \" </fields>\\n\");\n // And NOW the Data ...\n fputs($fp, \" <rows>\\n\");\n while ($row = $DB->fetchRow($result)) {\n fputs($fp, \" <row>\\n\");\n for ($j=0; $j<$i; $j++) {\n $FieldName = \"\"; // Name of TAG\n $Attributes = \"\";\n switch ($this->Type) {\n case 1 :\n $FieldName = \"data\";\n break;\n\n case 2 :\n $FieldName = \"data\".$j;\n break;\n\n case 3 :\n $FieldName = $FieldsVector[$j];\n break;\n\n case 4 :\n $FieldName = \"data\";\n $Attributes = \" fieldname=\\\"\".$FieldsVector[$j].\"\\\"\";\n }\n fputs($fp, \" <\".$FieldName.$Attributes.\">\".\n Toolbox::encodeInUtf8(htmlspecialchars($row[$j])).\"</\".$FieldName.\">\\n\");\n }\n fputs($fp, \" </row>\\n\");\n }\n fputs($fp, \" </rows>\\n\");\n\n $DB->freeResult($result);\n }\n fputs($fp, \"</dataxml>\");\n //OK free ...;)\n fclose($fp);\n\n }", "title": "" }, { "docid": "18d73b86dc6204b28f9b43a806ae4a05", "score": "0.59867376", "text": "function to_xml(){\r\n\t\tif ($this->skip) return \"\";\r\n\t\treturn $this->to_xml_start().$this->to_xml_end();\r\n\t}", "title": "" }, { "docid": "70ab23aa3b028f74e84e24a99917fc93", "score": "0.5981695", "text": "function toXml() {\n if ($this->deleted) {\n return;\n }\n $export = array_merge(array('name'),$this->extras);\n \n $ret = \" <table>\\n\";\n foreach($export as $k) {\n if (!isset($this->$k)) {\n continue;\n }\n $ret .= \" <$k>{$this->$k}</$k>\\n\";\n }\n $ret .= \" <declaration>\\n\";\n foreach($this->fields as $k=>$v) {\n $ret .= $v->toXml();\n }\n foreach($this->indexes as $k=>$v) {\n $ret .= $v->toXml();\n }\n $ret .= \" </declaration>\\n\";\n $ret .= \" </table>\\n\";\n return $ret;\n }", "title": "" }, { "docid": "cf1977de624f70e080a867b1551e0d6f", "score": "0.5967339", "text": "public function get_xml($logDate, $widths, $collist){\n\t\tob_start();\n \t\techo \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" ?>\\n\";\n \t\t\techo \"<rows>\\n\"; \n \t\t\techo \"<head>\\n\";\n \t\t\t\n \t\t\tif(isset($collist)){\n \t\t\t\tforeach ($collist as $key){\n \t\t\t\t\techo \"\n \t\t\t\t\t\t<column type='ro' align='center' sort='str' width='\".$widths[$key].\"'>\n \t\t\t\t\t\t\t&lt;div style='text-align:center;' &gt;\".$key.\"&lt;/div&gt;\n \t\t\t\t\t\t</column>\\n\n \t\t\t\t\t\";\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\telse{\n \t\t\t\techo \"<column type='ro' align='center' sort='str' width='150'>&lt;div style='text-align:center;'&gt;Date Created&lt;/div&gt;</column>\\n\" ;\n \t\t\t\techo \"<column type='ro' align='center' sort='str' width='100'>&lt;div style='text-align:center;'&gt;User Name&lt;/div&gt;</column>\\n\" ;\n \t\t\t\techo \"<column type='ro' align='center' sort='str' width='100'>&lt;div style='text-align:center;'&gt;Member type&lt;/div&gt;</column>\\n\" ;\n \t\t\t\techo \"<column type='ro' align='center' sort='str' width='100'>&lt;div style='text-align:center;'&gt;IP address&lt;/div&gt;</column>\\n\" ;\n \t\t\t\t\n \t\t\t\tif(isset($this->serverDetails)){\n\t\t\t\t\t\t$this->get_variable();\n \t\t\t\t\tforeach($this->serverData as $key=>$value){\n\t\t\t\t\t\t\techo \"<column type='ro' align='center' sort='str' width='100'>&lt;div style='text-align:center;'&gt;\".$key.\"&lt;/div&gt;</column>\\n\" ;\n\t\t\t\t\t\t}\n \t\t\t\t}\n\n\t\t\t\t\tif(is_array($this->otherDetails)){\n\t\t\t\t\t\tforeach($this->otherDetails as $key=>$value){\n\t\t\t\t\t\t\techo \"<column type='ro' align='center' sort='str' width='100'>&lt;div style='text-align:center;'&gt;\".$key.\"&lt;/div&gt;</column>\\n\" ;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n \t\t\t}\n \t\t\techo \"</head>\\n\";\n \t\t\t\n \tif ($logDate){\n \t\tinclude($this->save_path.'/AL-'.$logDate.'.xml');\n \t}\n \telse{\n \t\tinclude($this->save_path.'/AL-'.date('Y-m-d').'.xml');\n \t}\n \t\n \techo \"</rows>\";\n \t\t$xmldata = ob_get_clean();\n \t\treturn $xmldata;\n\t}", "title": "" }, { "docid": "463ba3149002ab62d6f2152f33ba4d73", "score": "0.593577", "text": "public function MakeXml()\r\n\t{\r\n\t\tglobal $dbobj,$comObj;\r\n\t\t$recordArray = $this->getRecordArray();\r\n\t\t$FieldPara = $this->getFieldArray();\r\n\t\t$num_totrec =$this->getCountRecordSet();\r\n\t\t$statusmsg = $this->getSetStatusMessage();\r\n\t\t$recmsg = $this->getSetMessage();\r\n\t\t$sort_img = $this->SortImage();\r\n\t\t$displayRec = count($recordArray);\r\n\t\t$xmlcontent ='<?xml version=\"1.0\" encoding=\"UTF-8\"?><list>';\r\n\r\n\t\tfor($i=0;$i< count($recordArray);$i++)\r\n\t\t{\r\n\t\t\tfor($j=0;$j<count($FieldPara);$j++)\r\n\t\t\t{\r\n\t\t\t\t//Check if Field is not blank\r\n\t\t\t\tif($recordArray[$i][$FieldPara[$j][1]] != \"\")\r\n\t\t\t\t{\r\n\r\n\t\t\t\t\t/*if no php public function like Date_Format_Local, make Price*/\r\n\t\t\t\t\tif($FieldPara[$j][7] == \"0\"){\r\n \t\t\t\t\t switch($this->file){\r\n \t\t\t\t\t\t\tcase \"languagelebel\":\r\n \t\t\t\t\t\t\t\t//echo $FieldPara[$j][1];\r\n \t\t\t\t\t\t\t\tif($FieldPara[$j][1] == 'vName')\r\n {\r\n \t\t\t\t\t\t\t\t\t$FieldValue = $this->displayAjaxData(stripslashes($comObj->GetMouseOverDetail($recordArray[$i]['vName'])));\r\n \t\t\t\t\t\t\t\t}else{\r\n \t\t\t\t\t\t\t\t\t$FieldValue = $this->displayAjaxData(stripslashes($recordArray[$i][$FieldPara[$j][1]]));\r\n \t\t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase \"whoisonline\":\r\n \t\t\t\t\t\t\t\t//echo $FieldPara[$j][1];\r\n\t\t\t\t\t\t\t\t$FieldValue = str_replace(\"&\",\"&amp;\",$this->displayAjaxData(stripslashes($recordArray[$i][$FieldPara[$j][1]])));\r\n \t\t\t\t\t\t\tbreak;\r\n \t\t\t\t\t\t\tdefault:\r\n \t\t\t\t\t\t\t\t$FieldValue = $this->displayAjaxData(stripslashes($recordArray[$i][$FieldPara[$j][1]]));\r\n \t\t\t\t\t\t\tbreak;\r\n \t\t\t\t\t\t}\r\n\t\t\t\t\t\t //$FieldValue = $this->displayAjaxData(stripslashes($recordArray[$i][$FieldPara[$j][1]]));\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tswitch($this->file)\r\n\t\t\t\t\t\t {\r\n\t\t\t\t\t\t \tdefault:\r\n\t\t\t\t\t\t\t $nonObjFunc = array('Time_Format','DateTime');\r\n\t\t\t\t\t\t\t if(@in_array($FieldPara[$j][7],$nonObjFunc))\r\n\t\t\t\t\t\t\t\t $FieldValue = $this->displayAjaxData(stripslashes($FieldPara[$j][7]($recordArray[$i][$FieldPara[$j][1]])));\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t $FieldValue = $this->displayAjaxData(stripslashes($comObj->$FieldPara[$j][7]($recordArray[$i][$FieldPara[$j][1]])));\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t }\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$xmlcontent .='<'.strtolower($FieldPara[$j][1]).'>'.$FieldValue.'</'.strtolower($FieldPara[$j][1]).'>';\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$xmlcontent .='<'.strtolower($FieldPara[$j][1]).'> --- </'.strtolower($FieldPara[$j][1]).'>';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif($this->file == 'admin')\r\n\t\t\t{\r\n\t\t\t\t$xmlcontent .='<eType>'.$recordArray[$i]['eType'].'</eType>';\r\n\t\t\t}\r\n\t\t}\r\n\t\t//exit;\r\n\t//\techo $this->sorton;exit;\r\n\t\t$xmlcontent .='<totrec>'.$pre.str_replace(\"&\",\"&amp;\",$num_totrec).'</totrec>';\t\t\t// Total Record\r\n\t\t$xmlcontent .='<var_limit>'.$pre.str_replace(\"&\",\"&amp;\",$this->var_limit).'</var_limit>';\t// var limit\r\n\t\t$xmlcontent .='<start>'.$pre.str_replace(\"&\",\"&amp;\",$this->start).'</start>';\r\n\t\t$xmlcontent .='<displayrec>'.$displayRec.'</displayrec>';\r\n\t\t$xmlcontent .='<recmsg>'.$recmsg.'</recmsg>';\r\n\t\t$xmlcontent .='<statusmsg>'.$statusmsg.'</statusmsg>';\r\n\t\t$xmlcontent .='<sort_img>'.$sort_img.'</sort_img>';\r\n\t\t$xmlcontent .='<stat>'.$this->stat.'</stat>';\r\n\t\t$xmlcontent .='<sorton>'.$this->sorton.'</sorton>';\r\n\t\t$xmlcontent.='</list>';\r\n\t\treturn $xmlcontent;\r\n\t}", "title": "" }, { "docid": "a1040fdb9a2e1e68982f63864e59d766", "score": "0.5932861", "text": "public static function toXML() {\n\t\t//TODO\n\t\treturn null;\n\t}", "title": "" }, { "docid": "381facd49f2781fd5ed3304447a57835", "score": "0.59317905", "text": "public function asXML() {\n $dom = $this->dom;\n $dom->formatOutput = TRUE;\n return $this->doc_prefix . $this->dom->saveXML($this->dom->documentElement);\n }", "title": "" }, { "docid": "2c44baada53211aa05e0506226c977f7", "score": "0.59274507", "text": "function serializeArray($resultList)\n{\n $options = array(\n XML_SERIALIZER_OPTION_XML_DECL_ENABLED => false,\n XML_SERIALIZER_OPTION_DOCTYPE_ENABLED => false,\n XML_SERIALIZER_OPTION_INDENT => \" \",\n XML_SERIALIZER_OPTION_LINEBREAKS => \"\\n\",\n XML_SERIALIZER_OPTION_TYPEHINTS => false,\n XML_SERIALIZER_OPTION_XML_ENCODING => \"UTF-8?\",\n XML_SERIALIZER_OPTION_ROOT_NAME => \"results\",\n XML_SERIALIZER_OPTION_DEFAULT_TAG => \"result\",\n XML_SERIALIZER_OPTION_CDATA_SECTIONS => true\n );\n \n // instatiate the serializer object\n $serializer = new XML_Serializer($options);\n $serializer->setErrorHandling(PEAR_ERROR_DIE);\n \n // serialze the data\n $status = $serializer->serialize($resultList);\n \n // check whether serialization worked\n if (PEAR::isError($status)) {\n die($status->getMessage());\n }\n \n // get the serialized data\n $xml = $serializer->getSerializedData();\n \n header(\"Content-type: text/xml; charset=UTF-8\");\n //header(\"Content-Transfer-Encoding: binary\\n\");\n // return the xml\n $xml = html_entity_decode($xml,ENT_QUOTES, 'UTF-8');\n $xml = stripslashes($xml);\n $xml = trim($xml);\n echo($xml); \n}", "title": "" }, { "docid": "5885d99c5da230239a8d770e0985c957", "score": "0.59233624", "text": "function valueToXML() {\n\t\t$xml = parent::valueToXML();\n\t\tforeach ($this->childs as $child )\n\t\t{\n\t\t\t$xml .= $child->toXML();\n\t\t}\n\t\treturn $xml;\n\t}", "title": "" }, { "docid": "ea01068cb324af1c6c24a7c0aa55bb0d", "score": "0.5913622", "text": "function outputXML() {\n // XML headers\n header('Content-Type: text/xml; charset=utf-8');\n // prevent caching by browser\n header('Cache-Control: no-store, no-cache, must-revalidate');\n header('Cache-Control: post-check=0, pre-check=0', FALSE);\n header('Pragma: no-cache');\n echo '<?xml version=\"1.0\" encoding=\"UTF-8\" ?>'.LF;\n echo '<status>'.LF;\n // this allows multiple upload blocks to be implemented in the future\n foreach ($this->info as $id => $infoBlock) {\n echo sprintf(\n '<id value=\"%s\">'.LF,\n papaya_strings::escapeHTMLChars($id)\n );\n foreach ($infoBlock as $key => $value) {\n echo sprintf(\n '<%s>%s</%s>'.LF,\n papaya_strings::escapeHTMLChars($key),\n papaya_strings::escapeHTMLChars($value),\n papaya_strings::escapeHTMLChars($key)\n );\n }\n echo '</id>'.LF;\n }\n echo '</status>'.LF;\n exit;\n }", "title": "" }, { "docid": "061915b11707eabede32abf4420aed20", "score": "0.58729714", "text": "function toXml() {\n // create a dom document with encoding utf8\n $domtree = new DOMDocument('1.0', 'UTF-8');\n $xmlRoot = $domtree->appendChild($domtree->createElement('view'));\n $this->addSelfToDocument($domtree, $xmlRoot);\n $xml = $domtree->saveXML();\n return $xml;\n }", "title": "" }, { "docid": "bfbcfa0271ad7ea569d534ed9e48d36e", "score": "0.58458775", "text": "function getUniversityDAL ()\n{\n $conn = openDB();\n\n $query = \"Select * From University\";\n $result = mysql_query($query);\n\n\n $doc = new DOMDocument('1.0');\n\n $style = $doc->createProcessingInstruction('xml-stylesheet', 'type=\"text/xsl\" href=\"test.xsl\"');\n $doc->appendChild($style);\n $list = $doc->createElement('universityList');\n $doc->appendChild($list);\n\n while($row = mysql_fetch_assoc($result)) {\n\n $university = $doc->createElement('University');\n $list->appendChild($university);\n\n $id_attr = $doc->createAttribute('Id');\n $university->appendChild($id_attr);\n\n $id_text = $doc->createTextNode($row['ID']);\n $id_attr->appendChild($id_text);\n\n $univ_name = $doc->createTextNode($row['NAME']);\n $university->appendChild($univ_name);\n }\n\n $out = $doc->saveXML();\n\n closeDB ($result, $conn);\n\n return $out;\n}", "title": "" }, { "docid": "a3ec89895ea79d63b8403d41edae504e", "score": "0.58427316", "text": "public function toXML() {\n\t\t\treturn $this->content_xml->asXML();\n\t\t}", "title": "" }, { "docid": "b5b8285e7f0ef5595bf750446a422b91", "score": "0.58410573", "text": "function createxml ($db, $outputfile){\r\n\t\t//Attempt to open the file.\r\n\t\ttry {\r\n\t\t\tif (!$file = fopen ($outputfile,\"w\")){\r\n\t\t\t\tthrow new exception (\"Sorry, the file could not be opened for writing.\");\r\n\t\t\t} else {\r\n\t\t\t\t//Begin writing the XML document.\r\n\t\t\t\t//Output the version number.\r\n\t\t\t\tfwrite ($file, \"<?xml version=\\\"1.0\\\" encoding=\\\"ISO-8859-1\\\"?>\\n\");\r\n\t\t\t\t//Then the wrapper tag.\r\n\t\t\t\tfwrite ($file, \"<markers>\\n\");\r\n\t\t\t\t//Now, run through the database and grab any instances of a store.\r\n\t\t\t\tif ($storequery = mysql_query (\"SELECT * FROM store ORDER BY storeid ASC\")){\r\n\t\t\t\t\twhile ($storedata = mysql_fetch_array ($storequery)){\r\n\t\t\t\t\t\tfwrite ($file, \"\\t<marker lat=\\\"\". $storedata['latitude'] . \"\\\" lng=\\\"\". $storedata['longitude'] . \"\\\" storename=\\\"\". $storedata['name'] . \"\\\" theaddress=\\\"\". $storedata['address'] . \"\\\" city=\\\"\". $storedata['city'] . \"\\\" province=\\\"\". $storedata['province'] . \"\\\" postal=\\\"\". $storedata['postal'] . \"\\\" />\\n\");\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\theader (\"Location: theform.php?message=Data Error: \".mysql_error().\"\");\r\n\t\t\t\t\texit;\r\n\t\t\t\t}\r\n\t\t\t\t//Close the wrapper tag.\r\n\t\t\t\tfwrite ($file, \"</markers>\");\r\n\t\t\t}\r\n\t\t} catch (exception $e){\r\n\t\t\theader (\"Location: theform.php?message=\".urlencode ($e->getmessage()).\"\");\r\n\t\t\texit;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "db586be3aa8b11ee0cc644da558fd7b8", "score": "0.5833497", "text": "function outputXML($projectList) {\n\t\t$dom = new DOMDocument('1.0');\n\t\t$dom->formatOutput = true;\n\t\t//header(\"Content-Type: text/plain\");\n\t\t\n\t\t$root = $dom->createElement('SVNDump');\n\t\t$dom->appendChild($root);\n\n\t\tforeach ($projectList as &$project) {\n\t\t\t$this->addProjectNode($dom, $root, $project);\n\t\t}\n\t\t\n\t\t$xsl = new DOMDocument('1.0');\n\t\t$xsl->load(\"cs242_portfolio.xsl\");\n\t\t$proc = new XsltProcessor();\n\t\t$xsl = $proc->importStylesheet($xsl);\n\t\t$newdom = $proc->transformToDoc($dom);\n\t\techo $newdom->saveHTML();\n\t\t\n\t\t//echo $dom->saveXML();\t\n\t}", "title": "" }, { "docid": "b3f2602725d7b12714b4d50572b06aa4", "score": "0.5808242", "text": "function toXML( $mapKeysToText=false ) {\n\t\tglobal $database;\n\n\t\tif ($mapKeysToText) {\n\t\t\t$query = \"SELECT name\"\n\t\t\t. \"\\n FROM #__sections\"\n\t\t\t. \"\\n WHERE id = $this->sectionid\"\n\t\t\t;\n\t\t\t$database->setQuery( $query );\n\t\t\t$this->sectionid = $database->loadResult();\n\n\t\t\t$query = \"SELECT name\"\n\t\t\t. \"\\n FROM #__categories\"\n\t\t\t. \"\\n WHERE id $this->catid\"\n\t\t\t;\n\t\t\t$database->setQuery( $query );\n\t\t\t$this->catid = $database->loadResult();\n\n\t\t\t$query = \"SELECT name\"\n\t\t\t. \"\\n FROM #__users\"\n\t\t\t. \"\\n WHERE id = $this->created_by\"\n\t\t\t;\n\t\t\t$database->setQuery( $query );\n\t\t\t$this->created_by = $database->loadResult();\n\t\t}\n\n\t\treturn parent::toXML( $mapKeysToText );\n\t}", "title": "" }, { "docid": "6c2d5aa96ea95b231a50c3d7957ce5f9", "score": "0.5800956", "text": "function sqlToXml(){\n global $wpdb;\n $productQuery = \"SELECT * FROM wphr_posts WHERE post_type = 'product' OR post_type = 'product_variation' ORDER BY ID ASC\";\n $xml = new DOMDocument('1.0', 'UTF-8');\n $xmlRoot = $xml->createElement('wphr_posts');\n $xmlRoot = $xml->appendChild($xmlRoot);\n $xmlProductRoot = $xml->createElement('products');\n $xmlProductRoot = $xmlRoot->appendChild($xmlProductRoot);\n $productRows = $wpdb->get_results($productQuery);\n foreach($productRows as $productRow){\n $currentPerson = $xml->createElement(\"product\");\n $currentPerson = $xmlProductRoot->appendChild($currentPerson);\n $currentPerson->appendChild($xml->createElement('ID',$productRow->ID));\n $currentPerson->appendChild($xml->createElement('post_author', $productRow->post_author));\n $currentPerson->appendChild($xml->createElement('post_date',$productRow->post_date));\n $currentPerson->appendChild($xml->createElement('post_date_gmt',$productRow->post_date_gmt));\n $currentPerson->appendChild($xml->createElement('post_content', $productRow->post_content));\n $currentPerson->appendChild($xml->createElement('post_title', $productRow->post_title));\n $currentPerson->appendChild($xml->createElement('post_excerpt', $productRow->post_excerpt));\n $currentPerson->appendChild($xml->createElement('post_status', $productRow->post_status));\n $currentPerson->appendChild($xml->createElement('comment_status', $productRow->comment_status));\n $currentPerson->appendChild($xml->createElement('ping_status', $productRow->ping_status));\n $currentPerson->appendChild($xml->createElement('post_password', $productRow->post_password));\n $currentPerson->appendChild($xml->createElement('post_name', $productRow->post_name));\n $currentPerson->appendChild($xml->createElement('to_ping', $productRow->to_ping));\n $currentPerson->appendChild($xml->createElement('pinged', $productRow->pinged));\n $currentPerson->appendChild($xml->createElement('post_modified', $productRow->post_modified));\n $currentPerson->appendChild($xml->createElement('post_modified_gmt', $productRow->post_modified_gmt));\n $currentPerson->appendChild($xml->createElement('post_content_filtered', $productRow->post_content_filtered));\n $currentPerson->appendChild($xml->createElement('post_parent', $productRow->post_parent));\n $currentPerson->appendChild($xml->createElement('guid', htmlspecialchars($productRow->guid)));\n $currentPerson->appendChild($xml->createElement('menu_order', $productRow->menu_order));\n $currentPerson->appendChild($xml->createElement('post_type', $productRow->post_type));\n $currentPerson->appendChild($xml->createElement('post_mime_type', $productRow->post_mime_type));\n $currentPerson->appendChild($xml->createElement('comment_count', $productRow->comment_count));\n }\n\n $imageQuery = \"SELECT * FROM wphr_posts WHERE wphr_posts.ID IN (SELECT wpm2.post_id\n FROM wphr_posts wp\n INNER JOIN wphr_postmeta wpm\n ON (wp.ID = wpm.post_id AND wpm.meta_key = '_thumbnail_id')\n INNER JOIN wphr_postmeta wpm2\n ON (wpm.meta_value = wpm2.post_id AND wpm2.meta_key = '_wp_attached_file')) ORDER BY wphr_posts.ID\";\n $imageRows = $wpdb->get_results($imageQuery);\n $xmlImgRoot = $xml->createElement('imgs');\n $xmlImgRoot = $xmlRoot->appendChild($xmlImgRoot);\n foreach($imageRows as $imageRow){\n $currentPerson = $xml->createElement(\"img\");\n $currentPerson = $xmlImgRoot->appendChild($currentPerson);\n $currentPerson->appendChild($xml->createElement('ID',$imageRow->ID));\n $currentPerson->appendChild($xml->createElement('post_author', $imageRow->post_author));\n $currentPerson->appendChild($xml->createElement('post_date',$imageRow->post_date));\n $currentPerson->appendChild($xml->createElement('post_date_gmt',$imageRow->post_date_gmt));\n $currentPerson->appendChild($xml->createElement('post_content', $imageRow->post_content));\n $currentPerson->appendChild($xml->createElement('post_title', $imageRow->post_title));\n $currentPerson->appendChild($xml->createElement('post_excerpt', $imageRow->post_excerpt));\n $currentPerson->appendChild($xml->createElement('post_status', $imageRow->post_status));\n $currentPerson->appendChild($xml->createElement('comment_status', $imageRow->comment_status));\n $currentPerson->appendChild($xml->createElement('ping_status', $imageRow->ping_status));\n $currentPerson->appendChild($xml->createElement('post_password', $imageRow->post_password));\n $currentPerson->appendChild($xml->createElement('post_name', $imageRow->post_name));\n $currentPerson->appendChild($xml->createElement('to_ping', $imageRow->to_ping));\n $currentPerson->appendChild($xml->createElement('pinged', $imageRow->pinged));\n $currentPerson->appendChild($xml->createElement('post_modified', $imageRow->post_modified));\n $currentPerson->appendChild($xml->createElement('post_modified_gmt', $imageRow->post_modified_gmt));\n $currentPerson->appendChild($xml->createElement('post_content_filtered', $imageRow->post_content_filtered));\n $currentPerson->appendChild($xml->createElement('post_parent', $imageRow->post_parent));\n $currentPerson->appendChild($xml->createElement('guid', $imageRow->guid));\n $currentPerson->appendChild($xml->createElement('menu_order', $imageRow->menu_order));\n $currentPerson->appendChild($xml->createElement('post_type', $imageRow->post_type));\n $currentPerson->appendChild($xml->createElement('post_mime_type', $imageRow->post_mime_type));\n $currentPerson->appendChild($xml->createElement('comment_count', $imageRow->comment_count));\n }\n\n $xmlMetaRoot = $xml->createElement('products_meta');\n $xmlMetaRoot = $xmlRoot->appendChild($xmlMetaRoot);\n\n $meta_product_Query = \"SELECT * FROM `wphr_wc_product_meta_lookup`\";\n $meta_product_Rows = $wpdb->get_results($meta_product_Query);\n foreach($meta_product_Rows as $meta_product_Row){\n $currentPerson = $xml->createElement(\"product_meta\");\n $currentPerson = $xmlMetaRoot->appendChild($currentPerson);\n $currentPerson->appendChild($xml->createElement('product_id',$meta_product_Row->product_id));\n $currentPerson->appendChild($xml->createElement('sku', $meta_product_Row->sku));\n $currentPerson->appendChild($xml->createElement('virtual',$meta_product_Row->virtual));\n $currentPerson->appendChild($xml->createElement('downloadable',$meta_product_Row->downloadable));\n $currentPerson->appendChild($xml->createElement('min_price', $meta_product_Row->min_price));\n $currentPerson->appendChild($xml->createElement('max_price', $meta_product_Row->max_price));\n $currentPerson->appendChild($xml->createElement('onsale', $meta_product_Row->onsale));\n $currentPerson->appendChild($xml->createElement('stock_quantity', $meta_product_Row->stock_quantity));\n $currentPerson->appendChild($xml->createElement('stock_status', $meta_product_Row->stock_status));\n $currentPerson->appendChild($xml->createElement('rating_count', $meta_product_Row->rating_count));\n $currentPerson->appendChild($xml->createElement('average_rating', $meta_product_Row->average_rating));\n $currentPerson->appendChild($xml->createElement('total_sales', $meta_product_Row->total_sales));\n $currentPerson->appendChild($xml->createElement('tax_status', $meta_product_Row->tax_status));\n $currentPerson->appendChild($xml->createElement('tax_class', $meta_product_Row->tax_class));\n }\n\n $xmlTermRoot = $xml->createElement('terms');\n $xmlTermRoot = $xmlRoot->appendChild($xmlTermRoot);\n $term_query = get_wp_terms();\n foreach ( $term_query ->terms as $term ) \n {\n $currentPerson = $xml->createElement(\"term\");\n $currentPerson = $xmlTermRoot->appendChild($currentPerson);\n $currentPerson->appendChild($xml->createElement('term_id',$term->term_id));\n $currentPerson->appendChild($xml->createElement('name',$term->name));\n $currentPerson->appendChild($xml->createElement('slug',$term->slug));\n $currentPerson->appendChild($xml->createElement('term_group',$term->term_group));\n }\n\n $xmlRelRoot = $xml->createElement('term_relationships');\n $xmlRelRoot = $xmlRoot->appendChild($xmlRelRoot);\n $term_relations = get_wp_term_relations();\n foreach ( $term_relations as $term_relation ) \n {\n $currentPerson = $xml->createElement(\"term_relationship\");\n $currentPerson = $xmlRelRoot->appendChild($currentPerson);\n $currentPerson->appendChild($xml->createElement('object_id',$term_relation->object_id));\n $currentPerson->appendChild($xml->createElement('term_taxonomy_id',$term_relation->term_taxonomy_id));\n $currentPerson->appendChild($xml->createElement('term_order',$term_relation->term_order));\n }\n\n $xmlTaxRoot = $xml->createElement('term_taxonomies');\n $xmlTaxRoot = $xmlRoot->appendChild($xmlTaxRoot);\n $term_query = get_wp_terms();\n foreach ( $term_query ->terms as $term ) {\n $term_taxonomy_rows = $wpdb->get_results(\"SELECT * FROM `wphr_term_taxonomy` WHERE term_id = $term->term_id\");\n foreach($term_taxonomy_rows as $term_taxonomy_row){\n $currentPerson = $xml->createElement(\"term_taxonomy\");\n $currentPerson = $xmlTaxRoot->appendChild($currentPerson);\n $currentPerson->appendChild($xml->createElement('term_taxonomy_id',$term_taxonomy_row->term_taxonomy_id));\n $currentPerson->appendChild($xml->createElement('term_id',$term_taxonomy_row->term_id));\n $currentPerson->appendChild($xml->createElement('taxonomy',$term_taxonomy_row->taxonomy));\n $currentPerson->appendChild($xml->createElement('description',$term_taxonomy_row->description));\n $currentPerson->appendChild($xml->createElement('parent',$term_taxonomy_row->parent));\n $currentPerson->appendChild($xml->createElement('count',$term_taxonomy_row->count));\n }\n \n }\n\n $xml_post_meta_root = $xml->createElement('posts_meta');\n $xml_post_meta_root = $xmlRoot->appendChild($xml_post_meta_root);\n $posts_meta = get_wp_posts_metas(); \n foreach($posts_meta as $post_meta){\n $currentPerson = $xml->createElement(\"post_meta\");\n $currentPerson = $xml_post_meta_root->appendChild($currentPerson);\n $currentPerson->appendChild($xml->createElement('meta_id',$post_meta->meta_id));\n $currentPerson->appendChild($xml->createElement('post_id',$post_meta->post_id));\n $currentPerson->appendChild($xml->createElement('meta_key',$post_meta->meta_key));\n $currentPerson->appendChild($xml->createElement('meta_value',$post_meta->meta_value));\n }\n \n $xml_term_meta_root = $xml->createElement('terms_meta');\n $xml_term_meta_root = $xmlRoot->appendChild($xml_term_meta_root);\n $terms_meta = get_term_metas(); \n foreach($terms_meta as $term_meta){\n $currentPerson = $xml->createElement(\"term_meta\");\n $currentPerson = $xml_term_meta_root->appendChild($currentPerson);\n $currentPerson->appendChild($xml->createElement('meta_id',$term_meta->meta_id));\n $currentPerson->appendChild($xml->createElement('term_id',$term_meta->term_id));\n $currentPerson->appendChild($xml->createElement('meta_key',$term_meta->meta_key));\n $currentPerson->appendChild($xml->createElement('meta_value',$term_meta->meta_value));\n }\n \n $xml_attribute_taxonomies_root = $xml->createElement('attribute_taxonomies');\n $xml_attribute_taxonomies_root = $xmlRoot->appendChild($xml_attribute_taxonomies_root);\n $attribute_taxonomies = $wpdb->get_results(\"SELECT * FROM `wphr_woocommerce_attribute_taxonomies`\"); \n foreach($attribute_taxonomies as $attribute_taxonomy){\n $currentPerson = $xml->createElement(\"attribute_taxonomy\");\n $currentPerson = $xml_attribute_taxonomies_root->appendChild($currentPerson);\n $currentPerson->appendChild($xml->createElement('attribute_id',$attribute_taxonomy->attribute_id));\n $currentPerson->appendChild($xml->createElement('attribute_name',$attribute_taxonomy->attribute_name));\n $currentPerson->appendChild($xml->createElement('attribute_label',$attribute_taxonomy->attribute_label));\n $currentPerson->appendChild($xml->createElement('attribute_type',$attribute_taxonomy->attribute_type));\n $currentPerson->appendChild($xml->createElement('attribute_orderby',$attribute_taxonomy->attribute_orderby));\n $currentPerson->appendChild($xml->createElement('attribute_public',$attribute_taxonomy->attribute_public));\n }\n // kemfjfjhn\n $xml_options_root = $xml->createElement('options');\n $xml_options_root = $xmlRoot->appendChild($xml_options_root);\n $product_IDs = $wpdb->get_results(\"SELECT ID FROM `wphr_posts` WHERE ID IN (SELECT post_parent FROM wphr_posts WHERE post_type='product_variation') \", ARRAY_A);\n $product_options = $wpdb->get_results(\"SELECT option_name, option_value FROM wphr_options WHERE option_name REGEXP \" .\"'\". implode('|',array_column($product_IDs, 'ID') ) . \"'\");\n foreach($product_options as $product_option){ \n $currentPerson = $xml->createElement(\"option\");\n $currentPerson = $xml_options_root->appendChild($currentPerson);\n $currentPerson->appendChild($xml->createElement('option_name',$product_option->option_name));\n $currentPerson->appendChild($xml->createElement('option_value',$product_option->option_value));\n \n }\n // Options attributes have same values with attribute_taxonomies so there is no need to export to xml file\n\n saveXMLFile($xml);\n}", "title": "" }, { "docid": "f10c6ca10d7041c7793fcc53312f563a", "score": "0.579565", "text": "function getDepartmentsDAL ($univ_id)\n{\n $conn = openDB();\n\n $query = \"Select * From Department Where University_Ptr = \".$univ_id;\n $result = mysql_query($query);\n\n $doc = new DOMDocument('1.0');\n\n $style = $doc->createProcessingInstruction('xml-stylesheet', 'type=\"text/xsl\" href=\"test.xsl\"');\n $doc->appendChild($style);\n $list = $doc->createElement('deptList');\n $doc->appendChild($list);\n\n while($row = mysql_fetch_assoc($result)) {\n \n $dept = $doc->createElement('Dept');\n $list->appendChild($dept);\n\n $id_attr = $doc->createAttribute('Id');\n $dept->appendChild($id_attr);\n\n $id_text = $doc->createTextNode($row['ID']);\n $id_attr->appendChild($id_text);\n\n $dept_name = $doc->createTextNode($row['NAME']);\n $dept->appendChild($dept_name);\n }\n\n $out = $doc->saveXML();\n \n closeDB ($result, $conn);\n\n return $out;\n}", "title": "" }, { "docid": "52a9c3e26e4bf482d467fb2418e77674", "score": "0.57908726", "text": "public function output(){\n $this->domdoc->formatOutput = true;\n return $this->domdoc->saveXML(); \n }", "title": "" }, { "docid": "69cf9ac56eaf5923d62176ce839dc91e", "score": "0.5786622", "text": "public function myDBColumns2XML ( $table, $columnList ) {\n\n $XMLWriter = new XMLWriter();\n // Output directly to the user\n\n header(\"Content-Type: text/xml\");\n $XMLWriter->openURI('php://output');\n $XMLWriter->startDocument();\n\n $XMLWriter->setIndent(4);\n\n // declare it as a PSI Response document\n $XMLWriter->startElement('PSIResponse');\n\n $XMLWriter->startElement( 'table' );\n $XMLWriter->writeAttribute( 'name', $table );\n if ( isset( $columnList ) && is_array( $columnList ) ) {\n foreach ( $columnList as $column ) {\n $XMLWriter->writeElement( 'column', $column);\n } #foreach\n }\n $XMLWriter->endElement(); // Table\n // End PSIResponse\n $XMLWriter->endElement();\n\n $XMLWriter->endDocument();\n\n $XMLWriter->flush();\n }", "title": "" }, { "docid": "03a0f198263ed6b86a9fcedbf08a6fad", "score": "0.57735896", "text": "function toXml($top = 'todo',\n $print = true,\n $options = 0)\n {\n $idtd = $this->row['idtd'];\n $retval = \"<$top idtd='$idtd'>\\n\";\n\n foreach($this->row as $fld => $value)\n { // loop through all fields\n switch($fld)\n {\n case 'idar':\n { // IDAR of repository\n $retval .= \" <$fld>\" . $value . \"</$fld>\\n\";\n if ($value > 0)\n {\n $repo = new Address(array('idar' => $value));\n if ($repo->isExisting())\n $retval .= $repo->toXml('repository', false);\n }\n break;\n }\n\n case 'openedd':\n case 'reminderd':\n { // internal date format\n $date = new LegacyDate($value);\n $retval .= \" <{$fld}c>\" . htmlentities($value,ENT_XML1) . \n \"</{$fld}c>\\n\";\n $value = $date->toString();\n $retval .= \" <$fld>\" . htmlentities($value,ENT_XML1) . \n \"</$fld>\\n\";\n break;\n } // internal date format\n\n case 'idtc':\n { // document type\n $meaning = htmlentities(self::$intCategory[$value],ENT_XML1);\n $retval .= \" <$fld>$value=$meaning</$fld>\\n\";\n break;\n }\n\n default:\n { // fields passed back with no interpretation\n $retval .= \" <$fld>\" . htmlentities($value,ENT_XML1) . \"</$fld>\\n\";\n break;\n } // fields passed back with no interpretation\n } // switch on field name\n } // loop through all fields\n \n $retval .= \"</$top>\\n\";\n if ($print)\n print $retval;\n return $retval;\n }", "title": "" }, { "docid": "b8ffe5030320387b0e9c838c04a8a8df", "score": "0.5768349", "text": "private function createXMLDoc(Database $database)\n {\n $doc = new DOMDocument('1.0', 'utf-8');\n $doc->formatOutput = true; // pretty printing\n $doc->appendChild($doc->createComment(\"Created by PropelDataDumpTask.\"));\n\n $dsNode = $doc->createElement(\"dataset\");\n $dsNode->setAttribute(\"name\", \"all\");\n $doc->appendChild($dsNode);\n\n $platform = $this->getGeneratorConfig()->getConfiguredPlatform($this->conn);\n\n $this->log(\"Building DOM tree containing data from tables:\");\n\n foreach ($database->getTables() as $tbl) {\n $this->log(\"\\t+ \" . $tbl->getName());\n $stmt = $this->getTableDataStmt($tbl->getName(), $platform);\n while ($row = $stmt->fetch()) {\n $rowNode = $doc->createElement($tbl->getPhpName());\n foreach ($tbl->getColumns() as $col) {\n $cval = $row[$col->getName()];\n if ($cval !== null) {\n $rowNode->setAttribute($col->getPhpName(), iconv($this->dbEncoding, 'utf-8', $cval));\n }\n }\n $dsNode->appendChild($rowNode);\n unset($rowNode);\n }\n unset($stmt);\n }\n\n return $doc;\n }", "title": "" }, { "docid": "84eeeeb9a36ac6353399d109483bf85c", "score": "0.5766233", "text": "function xml() {\n\t\theader(\"Content-Type: text/xml\");\n\t\t$this->layout = 'empty';\n\t\t$aArticles = $this->SiteProduct->find('all', array(\n\t\t\t'fields' => array('Category.id', 'Category.title', 'Category.object_id', 'Article.object_type', 'Article.object_id', 'Article.title', 'Article.page_id', 'Article.teaser', 'Article.featured'),\n\t\t\t'conditions' => array('Article.object_type <> ' => 'pages', 'Article.published' => 1),\n\t\t\t'order' => array('Article.object_type', 'Article.modified')\n\t\t));\n\t\t$this->set('aArticles', $aArticles);\n\t\t\n\t\t$aCategories = $this->Category->findAllByObjectType('products');\n\t\t$this->set('aCategories', $aCategories);\n\t}", "title": "" }, { "docid": "709442eda9cc2917e00983d5935b3816", "score": "0.5753704", "text": "private function get_xml() {\n\n\t\t$this->endDocument();\n\n\t\treturn $this->outputMemory();\n\t}", "title": "" }, { "docid": "2f001f2d964913ff59a409e159534c47", "score": "0.5746909", "text": "public function export()\n {\n $products = $this->getData();\n $xml = [];\n $xml[] = '<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>';\n $xml[] = '<products>';\n\n while ($product = $products->fetch_object())\n {\n $xml[] = '<product>';\n $xml[] = \"<id>{$product->id}</id>\";\n $xml[] = \"<title>{$product->title}</title>\";\n $xml[] = '</product>';\n }\n $xml[] = \"</products>\";\n\n $filename = 'XML/' . time() . '.xml';\n file_put_contents($filename, implode(PHP_EOL, $xml));\n return $filename;\n\n }", "title": "" }, { "docid": "7b3f70b9297729d0c3d754f1c7c24c82", "score": "0.57277477", "text": "function __xml($data) {\r\n\r\n\t\t$result = \"\";\r\n\t\tforeach ($data as $k => $v) {\r\n\t\t\t$value = is_array($v) ? \"\\n\" . $this->__xml($v) : $this->_change_encoding($v, \"HTML-ENTITIES\", true);\r\n\t\t\t$result .= \"<$k>$value</$k>\\n\";\r\n\t\t}\r\n\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "0ce285024e97826018263a3547513fcf", "score": "0.5708186", "text": "protected function xmlResponse()\r\n {\r\n header('Content-Type: application/xml; charset=utf-8');\r\n\r\n // set return output\r\n $result = '';\r\n if (!empty($this->output['result']) && is_array($this->output['result'])) {\r\n\r\n foreach ($this->output['result'] as $node => $item) {\r\n if (is_array($item)) {\r\n $subResult = '';\r\n foreach ($item as $subNode => $subItem) {\r\n $subResult .= $this->_getXmlNode($subNode, $subItem);\r\n }\r\n $node = 'item';\r\n $item = $subResult;\r\n $result .= $this->_getXmlNode($node, $item, false);\r\n } else {\r\n $result .= $this->_getXmlNode($node, $item);\r\n }\r\n }\r\n }else{\r\n $result = clsMobCommon::getMobMessage('mob_empty_results');\r\n }\r\n\r\n // set error output\r\n $outputError = '';\r\n if (!empty($this->output['error']) && is_array($this->output['error'])) {\r\n foreach ($this->output['error'] as $node => $item) {\r\n $outputError .= $this->_getXmlNode('error_' . $node, $item);\r\n }\r\n }\r\n if (!empty($outputError)){\r\n $outputError = '<errors>' . $outputError . '</errors>';\r\n }\r\n\r\n $outputResult = <<<EOF\r\n<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<output>\r\n<result>{$result}</result>\r\n{$outputError}\r\n</output>\r\nEOF;\r\n return $outputResult;\r\n }", "title": "" }, { "docid": "185222d8016c25ce8ccb5f8c6ba45622", "score": "0.57060194", "text": "function rss($filepointer = NULL) {\n $tablexmlname = $this->table . '-db-table';\n if (!$filepointer) $file = fopen($tablexmlname . '.rss', 'w');\n\n $xml = '';\n $data = $this->load_all_records();\n// echo '<pre>'; print_r($data); echo '</pre>';\n $xml .= '<?xml version=\"1.0\" ?>' . \"\\n\" .\n '<' . $tablexmlname . \">\\n\";\n fwrite($file, $xml);\n foreach($data as $recordID=>$record) {\n \n $xml = '<recordtype ID=\"' . htmlentities($recordID) . '\">' . \"\\n\";\n foreach($record as $key=>$value) {\n $xml .= \"<$key>\" . htmlentities($value) . \"</$key>\\n\";\n }\n $xml .= '</recordtype>' . \"\\n\";\n fwrite($file, $xml);\n }\n $xml = '</' . $tablexmlname . \">\\n\";\n fwrite($file, $xml);\n fclose($file);\n return $tablexmlname . '.xml';\n }", "title": "" }, { "docid": "5f95f93d54c0a02ee4350c7be9286a84", "score": "0.5686724", "text": "function toxml($data)\n{\n\n $dom = '<?xml version=\"1.0\" encoding=\"utf-8\"?>';\n $dom .= '<items>';\n foreach($data as $key=>$val)\n {\n $dom .= \"<item autocomplete='autocompletex' uid='{$key}' arg='{$val['url']}'>\";\n $dom .= \"<title>{$val['name']}</title>\";\n $dom .= \"<subtitle></subtitle>\";\n $dom .= \"<icon></icon>\";\n $dom .= '</item>';\n }\n $dom .= '</items>';\n\n echo $dom;\n exit;\n}", "title": "" }, { "docid": "f571b14abef11a7684c54b001fdec610", "score": "0.5658623", "text": "function createXML()\r\n {\r\n global $_LANGID, $objDatabase;\r\n\r\n if ($this->checkPermissions()){\r\n $xmlOutput = \"\";\r\n $xmlOutput .= \"<?xml version=\\\"1.0\\\" encoding=\\\"\".CONTREXX_CHARSET.\"\\\"?>\\n\";\r\n $xmlOutput .= \"<rss version=\\\"2.0\\\">\\n\";\r\n $xmlOutput .= \"<channel>\\n\";\r\n $xmlOutput .= \"<title>\".$this->channelTitle.\"</title>\\n\";\r\n $xmlOutput .= \"<description>\".$this->channelDescription.\"</description>\\n\";\r\n $xmlOutput .= \"<link>\".$this->channelLink.\"</link>\\n\";\r\n $xmlOutput .= \"<copyright>\".$this->channelCopyright.\"</copyright>\\n\";\r\n $xmlOutput .= \"<webMaster>\".$this->channelWebMaster.\"</webMaster>\\n\";\r\n $xmlOutput .= \"<generator>\".$this->channelGenerator.\"</generator>\\n\";\r\n $xmlOutput .= \"<lastBuildDate>\".date('r',time()).\"</lastBuildDate>\\n\";\r\n $xmlOutput .= \"<language>\".$this->channelLanguage.\"</language>\\n\";\r\n\r\n// $query = \"SELECT n.id AS docId,\r\n// n.date,\r\n// n.title,\r\n// n.text,\r\n// n.source,\r\n// u.firstname,\r\n// u.lastname,\r\n// n.lang,\r\n// n.userid,\r\n// u.id\r\n// FROM \".DBPREFIX.\"module_docsys AS n,\r\n// \".DBPREFIX.\"access_users AS u\r\n// WHERE n.userid = u.id AND n.lang = \".$_LANGID.\"\r\n// ORDER BY n.id DESC\";\r\n \r\n $query = \"SELECT n.id AS docId,\r\n n.date,\r\n n.title,\r\n n.text,\r\n n.source,\r\n n.lang,\r\n n.userid,\r\n u.id\r\n FROM \".DBPREFIX.\"module_docsys\".MODULE_INDEX.\" AS n,\r\n \".DBPREFIX.\"access_users AS u\r\n WHERE n.userid = u.id AND n.lang = \".$_LANGID.\"\r\n ORDER BY n.id DESC\";\r\n $objResult = $objDatabase->SelectLimit($query, $this->limit);\r\n\r\n while (!$objResult->EOF) {\r\n $xmlOutput .= \"<item>\\n\";\r\n $xmlOutput .= \"<title>\".strip_tags(stripslashes($objResult->fields['title'])).\"</title>\\n\";\r\n\r\n if ($this->xmlType == 'fulltext'){\r\n $xmlOutput .= \"<description>\".htmlspecialchars(stripslashes($objResult->fields['text']), ENT_QUOTES, CONTREXX_CHARSET).\"</description>\\n\";\r\n //$xmlOutput .= \"<description>\".$objResult->fields['text').\"</description>\";\r\n $xmlOutput .= \"<source>\".htmlspecialchars(stripslashes($objResult->fields['source']), ENT_QUOTES, CONTREXX_CHARSET).\"</source>\\n\";\r\n }\r\n\r\n $xmlOutput .= \"<pubDate>\".date('r',time()).\"</pubDate>\\n\";\r\n $xmlOutput .= \"<link>\".$this->itemLink.$objResult->fields['docId'].\"</link>\\n\";\r\n $xmlOutput .= \"</item>\\n\";\r\n $objResult->MoveNext();\r\n }\r\n $xmlOutput .= \"</channel>\\n\";\r\n $xmlOutput .= \"</rss>\";\r\n\r\n if ($this->xmlType == 'fulltext'){\r\n $fileHandle = fopen($this->filePath.\"/\".$this->fileName[2],\"w+\");\r\n }else {\r\n $fileHandle = fopen($this->filePath.\"/\".$this->fileName[1],\"w+\");\r\n }\r\n if($fileHandle){\r\n @fwrite($fileHandle,$xmlOutput);\r\n @fclose($fileHandle);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "a93aa2fa40da947d1255808f123d4ea4", "score": "0.5628101", "text": "public function toXMLString()\n {\n $xml = $this->toXML();\n return $xml->asXML();\n }", "title": "" }, { "docid": "a93aa2fa40da947d1255808f123d4ea4", "score": "0.5628101", "text": "public function toXMLString()\n {\n $xml = $this->toXML();\n return $xml->asXML();\n }", "title": "" }, { "docid": "1119da85d6e8af2ebf59d8af0d8ed0ff", "score": "0.56261927", "text": "function exportXML($uri='php://output', $detail=false)\n {\n // ==== Declare local variable ====\n $schema_num = $this->getNumSchemas();\n $schemas = $this->getResultArray($this->getSchemas());\n // ==========================================================\n $writer = new XMLWriter(); \n $writer->openURI($uri);\n // $writer->openMemory();\n $writer->startDocument('1.0', 'UTF-8');\n $writer->setIndent(true);\n $writer->setIndentString(\" \");\n\n $writer->startElement('database');\n $writer->writeAttribute('name', $this->dbname);\n $writer->writeAttribute('schema_num', $schema_num);\n if ($detail) {\n // ==== Detail Database ====\n $writer->startElement('details');\n $writer->writeElement('host', $this->host);\n $writer->endElement();\n }\n // ==== Schema loop ====\n for ($i=0; $i < $schema_num; $i++) {\n // ==== Declare local variable ====\n $schema_name = $schemas[$i]['schema_name'];\n $table_num = $this->getNumTables($schema_name);\n $tables = $this->getResultArray($this->getTables($schema_name));\n $view_num = $this->getNumViews($schema_name);\n $views = $this->getResultArray($this->getViews($schema_name));\n // ==========================================================\n $writer->startElement('schema');\n $writer->writeAttribute('name', $schema_name);\n $writer->writeAttribute('table_num', $table_num);\n if ($detail) {\n $writer->writeAttribute('view_num', $view_num);\n }\n // ==== Table loop ====\n for ($j=0; $j < $table_num; $j++) {\n // ==== Declare local variable ====\n $table_name = $tables[$j]['table_name'];\n $column_num = $this->getNumColumns($table_name, $schema_name);\n $result = $this->getColumns($table_name, $schema_name);\n $columns = $this->getResultArray($result);\n // ==========================================================\n $writer->startElement('table');\n $writer->writeAttribute('name', $table_name);\n $writer->writeAttribute('column_num', $column_num);\n // ==== Column loop ====\n for ($k=0; $k < $column_num; $k++) {\n $columns[$k] = array_change_key_case($columns[$k], CASE_LOWER);\n $index = $columns[$k]['ordinal_position'];\n $writer->startElement('column');\n $writer->writeAttribute('index', $index);\n $writer->writeAttribute('type', $columns[$k][Driver::COLUMN_TYPE]);\n $writer->text($columns[$k]['column_name']);\n $writer->endElement(); // End of Column\n }\n $writer->endElement(); // End of Table.\n }\n // ==== if detail is true.\n if ($detail) { \n // ==== View loop ====\n for ($j=0; $j < $table_num; $j++) {\n // ==== Declare local variable ====\n $view_name = $views[$j]['table_name'];\n $column_num = $this->getNumColumns($view_name, $schema_name);\n $result = $this->getColumns($view_name, $schema_name);\n $columns = $this->getResultArray($result);\n // ==========================================================\n $writer->startElement('view');\n $writer->writeAttribute('name', $view_name);\n $writer->writeAttribute('column_num', $column_num);\n // ==== Column loop ====\n for ($k=0; $k < $column_num; $k++) {\n $columns[$k] = array_change_key_case($columns[$k], CASE_LOWER);\n $index = $columns[$k]['ordinal_position'];\n $writer->startElement('column');\n $writer->writeAttribute('index', $index);\n $writer->writeAttribute('type', $columns[$k][Driver::COLUMN_TYPE]);\n $writer->text($columns[$k]['column_name']);\n $writer->endElement(); // End of Column\n }\n $writer->endElement(); // End of View.\n }\n }\n $writer->endElement(); // End of Schema.\n }\n $writer->endElement(); // End of Database.\n $writer->endDocument(); // End of Document.\n $writer->flush(); \n }", "title": "" }, { "docid": "06196cdcb5ab170249a280a3eee2a55e", "score": "0.5624274", "text": "function DbGetProductList(){\n $query = $this->conn->query(\"SELECT * FROM product\"); \n \n $xml = '<products>';\n while($row = $query->fetch(PDO::FETCH_ASSOC)){ \n $xml = $xml.'<product>';\n $xml = $xml.'<product_id>'.$row['product_id'].'</product_id>';\n $xml = $xml.'<product_name>'.$row['product_name'].'</product_name>'; \n $xml = $xml.'<author_name>'.$row['author_name'].'</author_name>';\n $xml = $xml.'<publisher_name>'.$row['publisher_name'].'</publisher_name>';\n $xml = $xml.'<isbn_no>'.$row['isbn_no'].'</isbn_no>';\n $xml = $xml.'<product_price>'.$row['product_price'].'</product_price>';\n $xml = $xml.'</product>'; \n }\n $xml = $xml.'</products>';\n \n return $xml;\n }", "title": "" }, { "docid": "6b5019d53464d9090591deb65b2959c8", "score": "0.56197107", "text": "public function generate_xml( $report ){\r\n\t\t$xml = new SimpleXMLElement( \"<?xml version='1.0'?><xml/>\" );\r\n\t\tforeach( $report as $key=>$value ){\r\n\t\t\t$this->recursive_add( $xml, $key, $value );\r\n\t\t}\r\n\t\treturn $xml->asXML();\r\n\t}", "title": "" }, { "docid": "5e78611431248c93dcd7ca0d21a30c45", "score": "0.56115055", "text": "public function toXML()\n {\n $className = $this->getClass();\n\n $xml = '<'. $className . '>'.PHP_EOL;\n foreach ($this->getAssocArray(true) as $k => $v)\n {\n $xml .= $this->propertyToXML($k, $v);\n }\n $xml .= '</'. $className . '>'.PHP_EOL;\n\n return $xml;\n }", "title": "" }, { "docid": "f6215d791831312dcd2f5dc9253c5331", "score": "0.55981547", "text": "public function toXML($value);", "title": "" }, { "docid": "de37092bac929588e1be44d2d40891ff", "score": "0.5596586", "text": "function create_xml($records) {\n\t\t\t//before creating new xml, first filter the xml\n\t\t\t$xml = new SimpleXMLElement('<data></data>');\n\t\t\tforeach($records as $record) {\n\t\t\t\t$xml_record = $xml->addChild('record');\n\t\t\t\tforeach ($record as $key => $value) {\n\t\t\t\t\t$xml_record->addChild($key, $value);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $xml->asXML();\n\t\t}", "title": "" }, { "docid": "f38decac61dc5dc6a6b1958043eff3fe", "score": "0.5594775", "text": "function json2array($data) {\r\n $jsonArr = json_decode($data, true);\r\n $convertedXML = array2xml($jsonArr);\r\n echo \"Converted XML: \" . $convertedXML . \"</br></br>\";\r\n return ('\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<?xml-stylesheet type=\"text/xml\" href=\"#stylesheet\"?>\r\n<!DOCTYPE catelog [\r\n<!ATTLIST xsl:stylesheet\r\n id ID #REQUIRED>\r\n]>\r\n<full-response>\r\n<xsl:stylesheet id=\"stylesheet\" version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\"> \r\n<xsl:template match=\"/\">\r\n<html>\r\n <body>\r\n <h2 align=\"center\">Results</h2>\r\n <table border=\"1\" width=\"100%\" align=\"center\" style=\"font:10px Arial;\" >\r\n <tr height=\"50px\" bgcolor=\"#00FFFF\">\r\n <xsl:for-each select=\"full-response/list/list-item/item\">\r\n <th style=\"table-layout:fixed; width:50px\">\r\n <xsl:value-of select=\"@key\"/>\r\n </th>\r\n </xsl:for-each>\r\n </tr>\r\n </table>\r\n <table border=\"1\" width=\"100%\" align=\"center\" style=\"font:10px Arial;\">\r\n <tr height=\"100px\">\r\n <xsl:for-each select=\"full-response/list/list-item/item\">\r\n <th style=\"table-layout:fixed; width:50px\">\r\n <xsl:value-of select=\"text()\"/>\r\n </th>\r\n </xsl:for-each>\r\n </tr>\r\n </table>\r\n </body>\r\n</html>\r\n</xsl:template>\r\n</xsl:stylesheet>'\r\n.$convertedXML.\r\n'</full-response>'\r\n);}", "title": "" }, { "docid": "7e0012998850323487bdc9b9261f4259", "score": "0.55801886", "text": "protected function store()\n\t{\n\t\t$xmlDoc = new DOMDocument(\"1.0\");\n\t\t$xmlDoc->preserveWhiteSpace = false;\n\t\t$xmlDoc->formatOutput = true;\n\t\t$data = $xmlDoc->createElement('root');\n\t\tforeach ($this->data as $key => $value)\n\t\t{\n\t\t\t$record = $xmlDoc->createElement('record');\n\t\t\tforeach ($value as $itemkey => $datum)\n\t\t\t{\n\t\t\t\t$item = $xmlDoc->createElement($itemkey, htmlspecialchars($datum));\n\t\t\t\t$record->appendChild($item);\n\t\t\t}\n\t\t\t$data->appendChild($record);\n\t\t}\n\t\t$xmlDoc->appendChild($data);\n\t\t$xmlDoc->save($this->origin);\n\t\t//echo $xmlDoc->saveXML();\n\t}", "title": "" }, { "docid": "783ddebf5e9199d0cecd997a67e3f37f", "score": "0.5560976", "text": "public function getAsXml()\n { \n $idioma_arr = $reg_webservice=Zend_Registry::get('idioma');\n $num_idiomas = $idioma_arr[\"count\"];\n \n $string_xml =\"\\t\\t<especial_butaca_sesion id_especial_butaca_sesion=\\\"\".$this->_id.\"\\\" id_agrupador=\\\"\".$this->_id_agrupador.\"\\\">\\n\";\n $string_xml.=\"\\t\\t\\t<flag_numerada>\".$this->_flag_numerada.\"</flag_numerada>\\n\";\n $string_xml.=\"\\t\\t\\t<nombre>\\n\";\n for($i=0;$i<$num_idiomas;$i++){ \n $idioma= $idioma_arr[$i];\n $string_xml.=\"\\t\\t\\t\\t<\".$idioma.\">\";\n $string_xml.=htmlentities($this->_nombre_arr[$idioma], ENT_XML1);\n $string_xml.=\"</\".$idioma.\">\\n\";\n } \n $string_xml.=\"\\t\\t\\t</nombre>\\n\";\n \n $string_xml.=\"\\t\\t\\t<descripcion>\\n\";\n for($i=0;$i<$num_idiomas;$i++){ \n $idioma= $idioma_arr[$i];\n $string_xml.=\"\\t\\t\\t\\t<\".$idioma.\">\";\n $string_xml.=htmlentities($this->_descripcion_arr[$idioma], ENT_XML1);\n $string_xml.=\"</\".$idioma.\">\\n\";\n } \n $string_xml.=\"\\t\\t\\t</descripcion>\\n\";\n \n $string_xml.=\"\\t\\t\\t<pvp>\".$this->_pvp.\"</pvp>\\n\";\n \n $string_xml.=\"\\t\\t\\t<descuentos>\\n\";\n foreach($this->_id_descuento_arr as $data_descuento ){ \n $string_xml.=\"\\t\\t\\t\\t<descuento id_agrupador=\\\"\".$data_descuento[\"id_agrupador\"].\"\\\">\\n\";\n $string_xml.=\"\\t\\t\\t\\t\\t<id_descuento>\".$data_descuento[\"id_descuento\"].\"</id_descuento>\\n\";\n $string_xml.=\"\\t\\t\\t\\t</descuento>\\n\";\n }\n $string_xml.=\"\\t\\t\\t</descuentos>\\n\"; \n \n $string_xml.=\"\\t\\t\\t<imagen_principal>\".$this->_imagen_principal.\"</imagen_principal>\\n\";\n $string_xml.=\"\\t\\t\\t<catalogo_galeria>\\n\";\n foreach($this->_catalogo_galeria_arr as $imagen){ \n $string_xml.=\"\\t\\t\\t\\t<imagen>\";\n $string_xml.=$imagen;\n $string_xml.=\"</imagen>\\n\";\n } \n $string_xml.=\"\\t\\t\\t</catalogo_galeria>\\n\";\n $string_xml.=\"\\t\\t\\t<id_butacas>\\n\";\n foreach($this->_id_butaca_arr as $butaca ){ \n $string_xml.=\"\\t\\t\\t\\t<butaca id_zona=\\\"\".$butaca[\"id_zona\"].\"\\\" id_butaca=\\\"\".$butaca[\"id_butaca\"].\"\\\" />\\n\";\n }\n $string_xml.=\"\\t\\t\\t</id_butacas>\\n\"; \n \n $string_xml.=\"\\t\\t</especial_butaca_sesion>\\n\";\n return $string_xml;\n }", "title": "" }, { "docid": "09c79577aefa6d80be8b29fca5aeb9ab", "score": "0.554468", "text": "public function to_xml()\n\t{\n\t\t// Set up\n\t\t$dom = new DOMDocument('1.0', 'UTF-8');\n\t\t$table = $dom->createElement('column');\n\t\t$dom->appendChild($table);\n\n\t\t// name\n\t\t$name = $dom->createElement('name');\n\t\t$name->appendChild($dom->createTextNode($this->get_name()));\n\t\t$table->appendChild($name);\n\n\t\t// references\n\t\t$references = $dom->createElement('references');\n\t\t$references->appendChild($dom->createTextNode($this->getReferencedTableName()));\n\t\t$table->appendChild($references);\n\n\t\t// size\n\t\t$size = $dom->createElement('size');\n\t\t$size->appendChild($dom->createTextNode($this->get_size()));\n\t\t$table->appendChild($size);\n\n\t\t// type\n\t\t$type = $dom->createElement('type');\n\t\t$type->appendChild($dom->createTextNode($this->get_type()));\n\t\t$table->appendChild($type);\n\n\t\t// primarykey\n\t\t$primarykey = $dom->createElement('primarykey');\n\t\t$primarykey->appendChild($dom->createTextNode($this->is_primary_key()));\n\t\t$table->appendChild($primarykey);\n\n\t\t// type\n\t\t$required = $dom->createElement('required');\n\t\t$required->appendChild($dom->createTextNode($this->isRequired()));\n\t\t$table->appendChild($required);\n\n\t\t// Finish\n\t\treturn $table;\n\t}", "title": "" }, { "docid": "fda67fb5d5e9e03efeac944ef78a4e6d", "score": "0.5544073", "text": "function sparql_to_html ($type, $relation, $term, $title, $target, $notes, $count, $date, $dsLabel, $xsl_file, $server, $path, $command, $query) {\n\t$search_url_final = $server.$command.urlencode($query);\n\n\t// EXECUTE THE iTQL QUERY\n\t$results = file_get_contents($search_url_final);\n\n// DEBUGGING : WHEN ENABLED, THE FOLLOWING WILL DUMP THE XML RESULTS SO YOU CAN SEE THE SPARQL XML RESULTS\n\t$results2 = str_replace('<', '&lt;', $results);\n\t$results2 = str_replace('>', '&gt;<br/>', $results2);\n// echo \"Sparql = [\". $results2.\"]\";\n\n// ENABLE THE FOLLOWING LINE -- INSTEAD OF THE PREVIOUS ONE -- IF YOU WANT TO SEE JUST THE FIRST 50000 HITS\n// echo \"Sparql = [\". substr($results2, 0, 50000).\"]\";\n\n\t// STORE THE XML RESULTS IN Xml_file\n\t$Xml_file = \"$results\";\n\n\t// STORE THE XSL FILE NAME IN Xsl_file\n\t$Xsl_file = \"../xslt/\". $xsl_file;\n\n\t// INITIALIZE A NEW XML OBJECT IN PHP\n\t$XML = new DOMDocument();\n\n\t// LOAD THE XML RESULTS FILE IN THE XML OBJECT\n\t$XML->loadXML( $Xml_file );\n\n\t// INITIALIZE A NEW XSLT PROCESSOR\n\t$xslt = new XSLTProcessor();\n\n\t// SET VARIABLES TO BE AVAILABLD TO THE XSLT\n\t$xslt->setParameter('','myType',$type);\n\t$xslt->setParameter('','myRelation',$relation);\n\t$xslt->setParameter('','myTerm',$term);\n\t$xslt->setParameter('','myTitle',$title);\n\t$xslt->setParameter('','myTarget',$target);\n\t$xslt->setParameter('','myNotes',$notes);\n\t$xslt->setParameter('','myCount',$count);\n\t$xslt->setParameter('','myDate',$date);\n\t$xslt->setParameter('','myDs',$dsLabel);\n\t$xslt->setParameter('','myServer',$server);\n\t$xslt->setParameter('','myCustomPath',$path);\n\t$xslt->setParameter('','myCommand',$command);\n\t$xslt->setParameter('','myQuery',$query);\n\n\t// TRANSFORM THE XML WITH XSLT\n\t$XSL = new DOMDocument();\n\t$XSL->load( $Xsl_file);\n\t$xslt->importStylesheet( $XSL );\n\n\t// PRINT THE OUTPUT IN XHTML\n\tprint $xslt->transformToXML( $XML );\n}", "title": "" }, { "docid": "46a1be739f1ddc78b62b5fcd91fc1824", "score": "0.5534441", "text": "public function format(Result $result): string\n {\n $data = $this->getSummaryData($result);\n $xml = new \\SimpleXMLElement('<phpbu></phpbu>');\n\n foreach ($data as $name => $value) {\n $xml->addChild($name, $value);\n }\n\n $errors = $xml->addChild('errors');\n $this->appendErrors($errors, $result->getErrors());\n\n $backups = $xml->addChild('backups');\n $this->appendBackups($backups, $result->getBackups());\n\n return $xml->asXML();\n }", "title": "" }, { "docid": "e56a2f6d2e2a27bf277aed4ec247190f", "score": "0.5520036", "text": "private function _result($result){\n try {\n return new SimpleXMLElement($result);\n } catch(\\Exception $e) {\n return $result;\n }\n }", "title": "" }, { "docid": "629f9ca5a2a4253094d102dc229fa639", "score": "0.5512596", "text": "private function _toRssXml (array $results) {\n $this->rssgen = new ThirdParty\\rss_writer_class;\n // channel properties\n $this->rssgen->specification = '2.0';\n $this->rssgen->allownoitems = true;\n $this->rssgen->about = Url::getShortEufBaseUrl(false, '/app/about');\n $this->rssgen->rssnamespaces['atom'] = 'http://www.w3.org/2005/Atom';\n // general feed info\n $parameters = array(\n 'title' => $this->title,\n 'link' => $this->link,\n 'description' => $this->description,\n 'ttl' => $this->ttl,\n );\n $this->rssgen->addchannel($parameters);\n // feed image info\n if (strlen($imageLink = Config::getConfig(EU_SYNDICATION_IMAGE_URL))) {\n $this->rssgen->addimage($parameters = array(\n 'url' => $imageLink,\n 'title' => $this->title,\n 'link' => $this->link,\n 'description' => $this->description,\n ));\n }\n\n if ($this->type === 'product') {\n $productCategoryColumnNumber = 9;\n }\n else if ($this->type === 'category') {\n $productCategoryColumnNumber = 8;\n }\n foreach ($results['data'] as $row) {\n preg_match('@href=[\"|\\'](.*)[\"|\\'].*@', $row['2'], $matches);\n $item = array(\n 'title' => $row['1'],\n 'link' => Url::getShortEufBaseUrl(false, $matches[1]),\n 'description' => \\RightNow\\Api::utf8_trunc_nchars($row['3'], $this->descriptionLength),\n 'pubDate' => date(DATE_W3C, $row['4']),\n 'author' => $row['7'],\n 'category' => $row[$productCategoryColumnNumber]\n );\n $this->rssgen->additem($item);\n }\n $this->rssgen->writerss($output);\n return $output;\n }", "title": "" }, { "docid": "e15542022b8b0ce8225ac6318e295987", "score": "0.5506748", "text": "public function toXML( $mapKeysToText=false ) {\n\t\t$xml = '<record table=\"' . $this->_tbl . '\"';\n\t\tif ($mapKeysToText) {\n\t\t\t$xml .= ' mapkeystotext=\"true\"';\n\t\t}\n\t\t$xml .= '>';\n\t\tforeach (get_object_vars( $this ) as $k => $v) {\n\t\t\tif (is_array($v) or is_object($v) or $v === NULL) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ($k[0] == '_') { // internal field\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$xml .= '<' . $k . '><![CDATA[' . $v . ']]></' . $k . '>';\n\t\t}\n\t\t$xml .= '</record>';\n\n\t\treturn $xml;\n\t}", "title": "" }, { "docid": "df025c5816aff89cc9eed325840515d4", "score": "0.5506215", "text": "public function __toString()\n {\n return $this->saveXml();\n }", "title": "" }, { "docid": "195a60315d2c1899da6712d245f07353", "score": "0.5496633", "text": "public function __toString() {\n $xml = '';\n $dom = $this->getXml();\n foreach($dom->childNodes as $node) {\n $xml .= $dom->saveXML($node) . \"\\n\";\n }\n\n return $xml;\n }", "title": "" }, { "docid": "4fbbcad7f930f0dde2cec9864a4e03b2", "score": "0.54799473", "text": "public function actionXml()\n {\n $content = Producto::exportXML();\n $this->responseXml($content);\n }", "title": "" }, { "docid": "a9245a56751e4cb964a78578d08711dd", "score": "0.54707813", "text": "public function objToXML($obj) {\n\t\t$this->getObject2XML($this->xml, $obj);\n \n\t\t$this->xml->endElement();\n \n\t\treturn $this->xml->outputMemory(true);\n\t}", "title": "" }, { "docid": "0cc85b5e0234d3d29ee56a150a023488", "score": "0.5468115", "text": "public function fetchXML($parameters) {\n\t\t\t// Get the data as an array\n\t\t$result = $this->fetchArray($parameters);\n\t\t\t// Transform result to XML\n\t\t$xml = t3lib_div::array2xml_cs($result);\n\t\t\t// Implement post-processing hook\n\t\tif (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$this->extKey]['processXML'])) {\n\t\t\tforeach($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][$this->extKey]['processXML'] as $className) {\n\t\t\t\t$processor = &t3lib_div::getUserObj($className);\n\t\t\t\t$xml = $processor->processXML($xml, $this);\n\t\t\t}\n\t\t}\n\t\treturn $xml;\n\t}", "title": "" }, { "docid": "8d0301d4ee8b31e78e2e25bb0d1193b7", "score": "0.54550976", "text": "public function render()\n {\n $xml = new \\SimpleXMLElement('<root/>');\n $data = $this->getData();\n array_walk_recursive($data, array ($xml, 'addChild'));\n\n return $xml->asXML();\n }", "title": "" }, { "docid": "97997e1f61d2aa8d4a0cac6a12a935ce", "score": "0.5454995", "text": "function system_generateXML($section = \"categories\", $sql = \"\", $domain_id = false) {\n\t\tif (!$section || !$sql){\n return false;\n }\n\n\t\t$dbMain = db_getDBObject(DEFAULT_DB, true);\n\t\tif ($domain_id) {\n $dbObj = db_getDBObjectByDomainID($domain_id, $dbMain);\n\t\t} else {\n $dbObj = db_getDBObject();\n\t\t}\n\t\tunset($dbMain);\n\n\t\t//$result = $dbObj->query($sql);\n\t\t$result = $dbObj->unbuffered_query($sql);\n\n\t\t//if(mysql_num_rows($result) > 0){\n\t\tif($result){\n unset($xml_content);\n $xml_content = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\";\n $xml_content .= \"<$section>\";\n\n while($row = mysql_fetch_assoc($result)){\n $xml_content .=\"<info>\";\n\n foreach ($row as $key => $value) {\n if (is_string($value)){\n $xml_content .=\"<$key>\".format_getString($value).\"</$key>\";\n }else if (is_numeric($value)){\n $xml_content .=\"<$key>\".$value.\"</$key>\";\n }\n }\n\n $xml_content .=\"</info>\";\n }\n\n $xml_content .=\"</$section>\";\n\n return $xml_content;\n\t\t} else {\n return false;\n\t\t}\n\t}", "title": "" }, { "docid": "cbba19c641d9c7efe6c61d85bd52d891", "score": "0.5448734", "text": "public function outputDocument() {\n header('Content-type: text/xml');\n echo $this->getDocument();\n }", "title": "" }, { "docid": "758afb02ac1211f570dc72800e090c02", "score": "0.54427624", "text": "function generationFichiersXML() {\n $this->listeProfs();\n $this->listeMatieres();\n $this->listeDispoProfs();\n $this->dataActivity();\n }", "title": "" }, { "docid": "68d0c6c3c0f12a930c5b1ea42648c667", "score": "0.5437843", "text": "public function getXML();", "title": "" }, { "docid": "4e0d1af2059cceb5780c94adc0b3bc72", "score": "0.54153264", "text": "private function generatexml($table_array, $cmid_array)\n {\n global $CFG;\n global $DB;\n \n $content = '<?xml version=\"1.0\" ?>';\n $content .= '<ROOT>';\n $content .= '<STATUS>0</STATUS>'; \n foreach($table_array as $student)\n {\t\n\t $content .= '<STUDENT>';\n \t$user = $DB->get_record('user', array('id'=>$student[0]));\n \t$content .= '<ID>'.$student[0].'</ID>';\n $content .= '<NAME>'.fullname($user).'</NAME>';\n $content .= '<LINK>'.$CFG->wwwroot.\"/user/profile.php?id=\".$student[0].'</LINK>';\n\t $count = 0;\n\t //record cell\n\t foreach($cmid_array as $cmid)\n\t {\n\t\t if(isset($student[1][$cmid]))\n\t\t {\n $content .= '<CM id=\"'.$cmid.'\">1</CM>';\n $count += 1;\n\t\t }\n\t\t else \n $content .= '<CM id=\"'.$cmid.'\">0</CM>';\n\t }\n\t $content .= '<SUMMARY>'.$count.'</SUMMARY>';\n\t $content .= '</STUDENT>';\n }\n $content .='</ROOT>';\n \n return $content;\n }", "title": "" }, { "docid": "0cfddb289f32fb5892c849d9b90966a6", "score": "0.5412828", "text": "function mysqlToXML($resource,$clientID,$itemTypeID,$propertiesToTranslate=array(),$extFilterRules=\"\",$decodeEntities=false){\n global $RStempPath;\n\tglobal $cstCDATAseparator;\n\tglobal $cstMainPropertyID;\n\tglobal $cstMainPropertyType;\n\tglobal $cstReferredItemTypeID;\n\tglobal $cstUTF8;\n\n // create a temporary file with a unique filename\n $filename = @tempnam($RStempPath, \"RSR\");\n if ($filename) {\n $writer = new XMLWriter();\n $writer->openUri($filename);\n\n $writer->setIndentString(' ');\n $writer->setIndent(true);\n\n $writer->startDocument( '1.0', 'UTF-8' );\n\n $writer->startElement('RSRecordset');\n $writer->startElement('rows');\n\n //prepare extFilters\n $extFilterArr = explode(',', $extFilterRules);\n $extFilters = array();\n if($extFilterRules != \"\") {\n foreach ($extFilterArr as $extFilterItem) {\n // get property data\n $filterArr = explode(';', $extFilterItem);\n\n // get all ascendants matching the filter\n $ascendantItemTypeID = getItemTypeIDFromProperties(array($filterArr[0]), $clientID);\n $filterProperties = array( array('ID' => parsePID($filterArr[0],$clientID), 'value' => str_replace(\"&amp;\", \"&\", htmlentities(base64_decode($filterArr[1]), ENT_COMPAT, $cstUTF8)), 'mode' => $filterArr[2]));\n\n $validAscendants = getFilteredItemsIDs($ascendantItemTypeID, $clientID, $filterProperties, array());\n\n //get ascendant ItemType MainProperty ID and Type for treePath root level\n $ascendantItemTypeMainPropertyID = getMainPropertyID($ascendantItemTypeID, $clientID);\n $ascendantItemTypeMainPropertyType = getPropertyType ($ascendantItemTypeMainPropertyID, $clientID);\n\n // get all paths between filtered and destination itemtype\n $allowedItemTypes = array();\n if (isset($filterArr[3]) && $filterArr[3] != \"\") $allowedItemTypes = explode(\",\", base64_decode($filterArr[3]));\n\n $treePath = array();\n\n getTreePath($clientID, $treePath, array( array('itemTypeID' => $ascendantItemTypeID,$cstMainPropertyID=>$ascendantItemTypeMainPropertyID,$cstMainPropertyType=>$ascendantItemTypeMainPropertyType)), $itemTypeID, $allowedItemTypes, 4);\n\n $extFilters[] = array('ascendantItemTypeID' => $ascendantItemTypeID, 'validAscendants' => $validAscendants, 'treePath' => $treePath);\n }\n }\n\n // Prepare ids translation\n $propertiesToReplace = array();\n foreach ($propertiesToTranslate as $propertyKey => $property) {\n if (($property['type'] == 'identifier') || ($property['type'] == 'identifiers')) {\n\n // get identifier property referred item type\n $referredItemTypeID = getClientPropertyReferredItemType($property['ID'], $clientID);\n $mainPropertyID = getMainPropertyID($referredItemTypeID, $clientID);\n $mainPropertyType = getPropertyType($mainPropertyID, $clientID);\n $propertiesToTranslate[$propertyKey][$cstReferredItemTypeID] = $referredItemTypeID;\n $propertiesToTranslate[$propertyKey][$cstMainPropertyID] = $mainPropertyID;\n $propertiesToTranslate[$propertyKey][$cstMainPropertyType] = $mainPropertyType;\n }\n\n // If property has not translated name we should replace the original, so move to another list for replacement instead of addition\n if (!isset($property['trName'])) {\n $propertiesToReplace[$propertiesToTranslate[$propertyKey]['name']] = $propertiesToTranslate[$propertyKey];\n unset($propertiesToTranslate[$propertyKey]);\n }\n }\n\n while ($row = $resource->fetch_assoc()) {\n\n if (count($extFilters) == 0) {\n $found = true;\n }\n\n foreach ($extFilters as $extFilter){\n\n // construct IDs tree for each result\n $tempPaths = getPathsForItem($clientID, $itemTypeID, $row['ID'], $extFilter['treePath'], 0, \"\");\n\n // search for any valid (filter matching) ascendant in generated paths\n $found = false;\n foreach ($extFilter['validAscendants'] as $validAscendant) {\n foreach ($tempPaths as $element) {\n if ($element[\"nodeID\"] == $validAscendant[\"ID\"] && $element[\"nodeItemType\"] == $extFilter['ascendantItemTypeID']) {\n $found = true;\n break 2;\n }\n }\n }\n\n // If it doesn't have any matching ascendant for any filter don't add to file\n if (!$found) {\n break;\n }\n }\n\n if ($found) {\n $writer->startElement('row');\n\n foreach ($row as $field => $value) {\n if (array_key_exists($field, $propertiesToReplace)) {\n // We have to translate and replace the value\n $value = getTranslatedValue($clientID, $propertiesToReplace[$field], $value);\n }\n\n if ($decodeEntities) {\n $field = html_entity_decode($field, ENT_COMPAT|ENT_QUOTES, $cstUTF8);\n $value = html_entity_decode($value, ENT_COMPAT|ENT_QUOTES, $cstUTF8);\n }\n\n $writer->startElement('column');\n $writer->writeAttribute('name', $field);\n $writer->writeCData(str_replace(\"]]>\", $cstCDATAseparator, $value));\n $writer->endElement(); // </column>\n }\n\n //Now add translated properties if needed\n foreach ($propertiesToTranslate as $propertyKey => $property) {\n $field = $propertiesToTranslate[$propertyKey]['trName'];\n $value = getTranslatedValue($clientID, $propertiesToTranslate[$propertyKey], $row[$propertiesToTranslate[$propertyKey]['name']]);\n\n if ($decodeEntities) {\n $field = html_entity_decode($field, ENT_COMPAT|ENT_QUOTES, $cstUTF8);\n $value = html_entity_decode($value, ENT_COMPAT|ENT_QUOTES, $cstUTF8);\n }\n\n $writer->startElement('column');\n $writer->writeAttribute('name', $field);\n $writer->writeCData(str_replace(\"]]>\", $cstCDATAseparator, $value));\n $writer->endElement(); // </column>\n }\n\n $writer->endElement(); // </row>\n }\n }\n\n $writer->endElement(); // </rows>\n $writer->flush();\n $writer->endElement(); // </RSRecordset>\n $writer->endDocument();\n\n return $filename;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "70198f1a59cb18beab292cb3e18c2380", "score": "0.5412639", "text": "function getSessionsDAL($course_id)\n{\n $conn = openDB();\n\n $query = \"Select * From Session Where COURSE_PTR = \".$course_id;\n $result = mysql_query($query);\n\n $doc = new DOMDocument('1.0');\n\n $style = $doc->createProcessingInstruction('xml-stylesheet', 'type=\"text/xsl\" href=\"test.xsl\"');\n $doc->appendChild($style);\n $list = $doc->createElement('sessionList');\n $doc->appendChild($list);\n\n while($row = mysql_fetch_assoc($result)) {\n\n $session = $doc->createElement('Session');\n $list->appendChild($session);\n\t\n $id_attr = $doc->createAttribute('Id');\n $session->appendChild($id_attr);\n\t\n $id_text = $doc->createTextNode($row['ID']);\n $id_attr->appendChild($id_text);\n\t\n $session_name = $doc->createTextNode($row['NAME']);\n $session->appendChild($session_name);\n }\n\n $out = $doc->saveXML();\n\n closeDB ($result, $conn);\n\n return $out;\n}", "title": "" }, { "docid": "98599345be2a1a9f3a71ebf3bcddf31b", "score": "0.54082525", "text": "function create_xml_response() \n{\n global $linenumber, $foffset, $totalqueries, $curfilename, $delimiter,\n\t\t\t\t $lines_this, $lines_done, $lines_togo, $lines_tota,\n\t\t\t\t $queries_this, $queries_done, $queries_togo, $queries_tota,\n\t\t\t\t $bytes_this, $bytes_done, $bytes_togo, $bytes_tota,\n\t\t\t\t $kbytes_this, $kbytes_done, $kbytes_togo, $kbytes_tota,\n\t\t\t\t $mbytes_this, $mbytes_done, $mbytes_togo, $mbytes_tota,\n\t\t\t\t $pct_this, $pct_done, $pct_togo, $pct_tota,$pct_bar;\n\n\theader('Content-Type: application/xml');\n\theader('Cache-Control: no-cache');\n\t\n\techo '<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>';\n\techo \"<root>\";\n\n// data - for calculations\n\n\techo \"<linenumber>$linenumber</linenumber>\";\n\techo \"<foffset>$foffset</foffset>\";\n\techo \"<fn>$curfilename</fn>\";\n\techo \"<totalqueries>$totalqueries</totalqueries>\";\n\techo \"<delimiter>$delimiter</delimiter>\";\n\n// results - for page update\n\n\techo \"<elem1>$lines_this</elem1>\";\n\techo \"<elem2>$lines_done</elem2>\";\n\techo \"<elem3>$lines_togo</elem3>\";\n\techo \"<elem4>$lines_tota</elem4>\";\n\t\n\techo \"<elem5>$queries_this</elem5>\";\n\techo \"<elem6>$queries_done</elem6>\";\n\techo \"<elem7>$queries_togo</elem7>\";\n\techo \"<elem8>$queries_tota</elem8>\";\n\t\n\techo \"<elem9>$bytes_this</elem9>\";\n\techo \"<elem10>$bytes_done</elem10>\";\n\techo \"<elem11>$bytes_togo</elem11>\";\n\techo \"<elem12>$bytes_tota</elem12>\";\n\t\t\t\n\techo \"<elem13>$kbytes_this</elem13>\";\n\techo \"<elem14>$kbytes_done</elem14>\";\n\techo \"<elem15>$kbytes_togo</elem15>\";\n\techo \"<elem16>$kbytes_tota</elem16>\";\n\t\n\techo \"<elem17>$mbytes_this</elem17>\";\n\techo \"<elem18>$mbytes_done</elem18>\";\n\techo \"<elem19>$mbytes_togo</elem19>\";\n\techo \"<elem20>$mbytes_tota</elem20>\";\n\t\n\techo \"<elem21>$pct_this</elem21>\";\n\techo \"<elem22>$pct_done</elem22>\";\n\techo \"<elem23>$pct_togo</elem23>\";\n\techo \"<elem24>$pct_tota</elem24>\";\n\techo \"<elem_bar>\".htmlentities($pct_bar).\"</elem_bar>\";\n\t\t\t\t\n\techo \"</root>\";\t\t\n}", "title": "" }, { "docid": "d9a1771f55e3c664c2c3bc3d44a5d9e6", "score": "0.5407833", "text": "public function xmlDB()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "3646b0ee444715e6dcb52ff704b16b49", "score": "0.5407422", "text": "public function toXML()\r\n {\r\n $xml = '<?xml version=\"1.0\" encoding=\"UTF-8\" ?>' . PHP_EOL\r\n .'<wtf>' . PHP_EOL;\r\n \r\n if (isset($this->state)) {\r\n $xml .= $this->state->toXML();\r\n }\r\n if (isset($this->response)) {\r\n $xml .= \"<response>{$this->response}</response>\" . PHP_EOL;\r\n }\r\n if (isset($this->chat)) {\r\n $xml .= '<chat>' . PHP_EOL;\r\n foreach ($this->chat as $msg) {\r\n $msg = htmlspecialchars($msg);\r\n $xml .= \"<msg>$msg</msg>\" . PHP_EOL;\r\n }\r\n $xml .= '</chat>' . PHP_EOL;\r\n }\r\n if (isset($this->error)) {\r\n $msg = htmlspecialchars($this->error);\r\n $xml .= \"<error><msg>$msg</msg><url>./</url></error>\" . PHP_EOL;\r\n } \r\n \r\n $xml .= '</wtf>';\r\n \r\n return $xml;\r\n }", "title": "" }, { "docid": "2ecb2d37f3aaeba97b7430f54b267f14", "score": "0.5405912", "text": "function printResult($result) {\n\techo \"result from SQL:\";\n echo \"<table>\";\n\twhile ($row = OCI_Fetch_Array($result, OCI_BOTH)) {\n echo \"<tr>\\n\";\n foreach ($row as $item) {\n echo \" <td>\" . ($item !== null ? htmlentities($item, ENT_QUOTES) : \"&nbsp;\") . \"</td>\\n\";\n }\n echo \"</tr>\\n\";\n }\n echo \"</table>\\n\";\n}", "title": "" }, { "docid": "083ffc567a419d6b054aa8fc4bf09263", "score": "0.5405581", "text": "function getCoursesDAL ($dept_id)\n{\n $conn = openDB();\n\n $query = \"Select * From Course Where Department_Ptr = \".$dept_id;\n $result = mysql_query($query);\n\n $doc = new DOMDocument('1.0');\n\n $style = $doc->createProcessingInstruction('xml-stylesheet', 'type=\"text/xsl\" href=\"test.xsl\"');\n $doc->appendChild($style);\n $list = $doc->createElement('courseList');\n $doc->appendChild($list);\n\n while($row = mysql_fetch_assoc($result)) {\n\n $course = $doc->createElement('Course');\n $list->appendChild($course);\n\t\n $id_attr = $doc->createAttribute('Id');\n $course->appendChild($id_attr);\n\t\n $id_text = $doc->createTextNode($row['ID']);\n $id_attr->appendChild($id_text);\n\t\n $course_name = $doc->createTextNode($row['NAME']);\n $course->appendChild($course_name);\n }\n\n $out = $doc->saveXML();\n\n closeDB ($result, $conn);\n\n return $out;\n}", "title": "" }, { "docid": "5f6db76a3296f554f09cc6379833e730", "score": "0.5405027", "text": "public function exportData()\r\n {\r\n $incontentCreator = new DOMDocument();\r\n $incontentCreator->formatOutput = true;\r\n $incontentCreator->preserveWhiteSpace = false;\r\n $incontentNode = null;\r\n if ($this->type == \"ordered\")\r\n {\r\n $incontentNode = $incontentCreator->createElement(\"ol\");\r\n if (!empty($this->attr))\r\n {\r\n $incontentNode->setAttribute(\"type\", $this->attr);\r\n }\r\n }\r\n else if ($this->type == \"unordered\")\r\n {\r\n $incontentNode = $incontentCreator->createElement(\"ul\");\r\n if (!empty($this->attr))\r\n {\r\n $incontentNode->setAttribute(\"bullet\", $this->attr);\r\n }\r\n }\r\n\r\n $createdbodyNode = $this->createXmlContent($incontentCreator, $this->content, $incontentNode, $this);\r\n $bodyNode = $incontentCreator->importNode($createdbodyNode, true);\r\n return $bodyNode;\r\n }", "title": "" }, { "docid": "49ad8623ee7e27ff22d822f6d1358127", "score": "0.5403867", "text": "public function toXml()\n {\n // TODO: improve element attributes\n $ser = new XmlSerializer();\n $data = $this->getData();\n return $ser->encode($data);\n }", "title": "" }, { "docid": "38eabe6ff2f13b8a735d64b9f9f6d3aa", "score": "0.5390672", "text": "public function generateResults($results);", "title": "" }, { "docid": "8ced10d6ea132f5ae439dc33d8257667", "score": "0.5379821", "text": "public function getAsXml(DOMDocument $document)\n {\n $element = $document->createElement(self::XML_NODE_TABLE);\n $element->setAttribute(self::XML_ATTR_NAME, $this->adaptee->getName());\n foreach ($this->adaptee->getColumns() as $column) {\n /* @var $column DColumnDefinition */\n $node = DSchemaElementXmlMapper::adapt($column)\n ->getAsXml($document);\n $element->appendChild($node);\n }\n foreach ($this->adaptee->getIndexes() as $index) {\n /* @var $index DIndexDefinition */\n $node = DSchemaElementXmlMapper::adapt($index)\n ->getAsXml($document);\n $element->appendChild($node);\n }\n\n return $element;\n }", "title": "" }, { "docid": "a176804325b9e7f62f2070126fce88bc", "score": "0.5376546", "text": "public function afficher(){\n return $this->doc->saveXML();\n }", "title": "" }, { "docid": "bc9532a59f5950bb8b6524d301ad8f4e", "score": "0.5375047", "text": "function noticia_xml($dao, $id_notic, $id_tipo_fuente)\n {\n\n switch($id_tipo_fuente) {\n case 1:\n\n \n // armamos el query de la noticia de TV\n $query =\" SELECT\n noticia.id_noticia AS id_noticia,\n noticia.encabezado AS encabezado,\n noticia.sintesis AS sintesis,\n noticia.autor AS autor,\n noticia.fecha AS fecha,\n noticia.comentario AS comentario,\n noticia.id_tipo_fuente AS id_tipo_fuente,\n noticia.id_fuente AS id_fuente,\n noticia.id_seccion AS id_seccion,\n noticia.id_sector AS id_sector,\n noticia.id_tipo_autor AS id_tipo_autor,\n noticia.id_genero AS id_genero,\n fuente.nombre AS fuente,\n\t\t\t\t\t\t fuente.logo AS logo_fuente,\n seccion.nombre AS seccion,\n sector.nombre AS sector,\n tipo_fuente.descripcion AS tipo_fuente,\n tipo_autor.descripcion AS tipo_autor,\n genero.descripcion AS genero,\n tendencia.descripcion AS tendencia,\n asigna.id_tendencia AS id_tendencia,\n noticia_tel.hora AS hora,\n noticia_tel.duracion AS duracion,\n\t\t\t\t\t\t noticia_tel.costo AS costo,\n tema.nombre AS tema,\n asigna.id_tema AS id_tema,\n fuente_tel.canal AS canal\n\n FROM\n asigna\n INNER JOIN noticia ON (asigna.id_noticia=noticia.id_noticia)\n INNER JOIN empresa ON (asigna.id_empresa=empresa.id_empresa)\n INNER JOIN fuente ON (fuente.id_fuente=noticia.id_fuente)\n INNER JOIN fuente_tel ON (fuente_tel.id_fuente=fuente.id_fuente)\n INNER JOIN noticia_tel ON (noticia_tel.id_noticia=noticia.id_noticia)\n INNER JOIN genero ON (genero.id_genero=noticia.id_genero)\n INNER JOIN tipo_autor ON (tipo_autor.id_tipo_autor=noticia.id_tipo_autor)\n INNER JOIN tema ON (tema.id_tema=asigna.id_tema)\n INNER JOIN tendencia ON (tendencia.id_tendencia=asigna.id_tendencia)\n INNER JOIN sector ON (sector.id_sector=noticia.id_sector)\n INNER JOIN seccion ON (seccion.id_seccion=noticia.id_seccion)\n INNER JOIN tipo_fuente ON (tipo_fuente.id_tipo_fuente=noticia.id_tipo_fuente)\n\n WHERE\n noticia.id_noticia = \".$id_notic;\n\n $dao->execute_query($query);\n $noticia = new SuperNoticia($dao->get_row_assoc());\n\n //costo-beneficio\n\t\t\t\n\t\t\tif($noticia->getCosto() == \"\")\n\t\t\t{\n\t\t\t\t$c_b = \"N/D\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$c_b = $noticia->getCosto(); \n\t\t\t\t$_SESSION['suma_costo']+= $noticia->getCosto();\n\t\t\t}\n\t\t\t\n\t\t\t//hacemos consulta para obtener los datos del archivo principal y creamos objeto Archivo para asignarlo a la noticia\n $dao->execute_query(\"SELECT * FROM adjunto WHERE id_noticia = \".$noticia->getId().\" AND principal = 1 LIMIT 1;\");\n\n if($dao->num_rows() == 0) {\n $isprincipal = 0;\n }\n else {\n $isprincipal = 1;\n $principal = new Archivo($dao->get_row_assoc());\n }\n\n\n //hacemos consulta para obtener los archivos secundarios de la noticia\n //por cada archivo que obtengamos generamos un objeto Archivo y lo metemos a un arreglo\n $arreglo_secundarios = array();\n $dao->execute_query(\"SELECT * FROM adjunto WHERE id_noticia = \".$noticia->getId().\" AND principal = 0;\");\n\n if($dao->num_rows() == 0) {\n $issecundarios = 0;\n }\n else {\n \n $issecundarios = $dao->num_rows();\n while($row_archivo = $dao->get_row_assoc()) {\n $archivo = new Archivo($row_archivo);\n $arreglo_secundarios[$archivo->getId()]=$archivo;\n }\n }\n\t\n \n // generamos la salida:\n $new_back = array();\n \n\t\t\t$new_back[].='<noticia>'.\"\\n\";\n\t\t\t\n\t\t\t$new_back[].=\"\\t\".'<id_noticia>'.$noticia->getId().'</id_noticia>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<encabezado>'.$noticia->getEncabezado().'</encabezado>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<sintesis>'.$noticia->getSintesis().'</sintesis>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<autor>'.$noticia->getAutor().'</autor>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<fecha>'.$noticia->getFecha().'</fecha>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<fecha_larga>'.$noticia->getFecha_larga().'</fecha_larga>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<comentario>'.$noticia->getComentario().'</comentario>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<tipo_fuente>'.utf8_encode($noticia->getTipo_fuente()).'</tipo_fuente>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<fuente>'.$noticia->getFuente().'</fuente>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<seccion>'.$noticia->getSeccion().'</seccion>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<sector>'.$noticia->getSector().'</sector>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<tipo_autor>'.$noticia->getTipo_autor().'</tipo_autor>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<genero>'.utf8_encode($noticia->getGenero()).'</genero>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<tema>'.$noticia->getTema().'</tema>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<tendencia>'.$noticia->getTendencia().'</tendencia>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<hora>'.$noticia->getHora().'</hora>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<canal>'.$noticia->getCanal().'</canal>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<estacion>'.$noticia->getEstacion().'</estacion>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<duracion>'.$noticia->getDuracion().'</duracion>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<costo>'.$noticia->getCosto().'</costo>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<pagina>'.$noticia->getPagina().'</pagina>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<tipo_pagina>'.$noticia->getTipo_pagina().'</tipo_pagina>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<porcentaje_pagina>'.$noticia->getPorcentaje_pagina().'</porcentaje_pagina>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<tiraje>'.$noticia->getTiraje().'</tiraje>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<url>'.$noticia->getUrl().'</url>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<autor>'.$noticia->getAutor().'</autor>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<archivo_principal>http://sistema.opemedios.com.mx/data/noticias/television/'.$principal->getNombre_archivo().'</archivo_principal>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<archivos_secundarios>'.\"\\n\";\n\t\t\tforeach($arreglo_secundarios as $sec)\n\t\t\t{\n\t\t\t\t$new_back[].=\"\\t\\t\".'<archivo>http://sistema.opemedios.com.mx/data/noticias/television/'.$sec->getNombre_archivo().'</archivo>'.\"\\n\";\n\t\t\t}\n\t\t\t$new_back[].=\"\\t\".'</archivos_secundarios>'.\"\\n\";\n \n\t\t\t$new_back[].='</noticia>'.\"\\n\";\n\n $output = join(\"\", $new_back);\n\n break; // end case 1, television\n\n case 2: // radio\n\n // armamos el query de la noticia de radio\n $query =\" SELECT\n noticia.id_noticia AS id_noticia,\n noticia.encabezado AS encabezado,\n noticia.sintesis AS sintesis,\n noticia.autor AS autor,\n noticia.fecha AS fecha,\n noticia.comentario AS comentario,\n noticia.id_tipo_fuente AS id_tipo_fuente,\n noticia.id_fuente AS id_fuente,\n noticia.id_seccion AS id_seccion,\n noticia.id_sector AS id_sector,\n noticia.id_tipo_autor AS id_tipo_autor,\n noticia.id_genero AS id_genero,\n fuente.nombre AS fuente,\n\t\t\t\t\t\t fuente.logo AS logo_fuente,\n seccion.nombre AS seccion,\n sector.nombre AS sector,\n tipo_fuente.descripcion AS tipo_fuente,\n tipo_autor.descripcion AS tipo_autor,\n genero.descripcion AS genero,\n tendencia.descripcion AS tendencia,\n asigna.id_tendencia AS id_tendencia,\n noticia_rad.hora AS hora,\n noticia_rad.duracion AS duracion,\n\t\t\t\t\t\t noticia_rad.costo AS costo,\n tema.nombre AS tema,\n asigna.id_tema AS id_tema,\n fuente_rad.estacion AS estacion\n\n FROM\n asigna\n INNER JOIN noticia ON (asigna.id_noticia=noticia.id_noticia)\n INNER JOIN empresa ON (asigna.id_empresa=empresa.id_empresa)\n INNER JOIN fuente ON (fuente.id_fuente=noticia.id_fuente)\n INNER JOIN fuente_rad ON (fuente_rad.id_fuente=fuente.id_fuente)\n INNER JOIN noticia_rad ON (noticia_rad.id_noticia=noticia.id_noticia)\n INNER JOIN genero ON (genero.id_genero=noticia.id_genero)\n INNER JOIN tipo_autor ON (tipo_autor.id_tipo_autor=noticia.id_tipo_autor)\n INNER JOIN tema ON (tema.id_tema=asigna.id_tema)\n INNER JOIN tendencia ON (tendencia.id_tendencia=asigna.id_tendencia)\n INNER JOIN sector ON (sector.id_sector=noticia.id_sector)\n INNER JOIN seccion ON (seccion.id_seccion=noticia.id_seccion)\n INNER JOIN tipo_fuente ON (tipo_fuente.id_tipo_fuente=noticia.id_tipo_fuente)\n\n WHERE\n noticia.id_noticia = \".$id_notic;\n\n $dao->execute_query($query);\n $noticia = new SuperNoticia($dao->get_row_assoc());\n\n //costo-beneficio\n\t\t\t\n\t\t\tif($noticia->getCosto() == \"\")\n\t\t\t{\n\t\t\t\t$c_b = \"N/D\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$c_b = $noticia->getCosto(); \n\t\t\t\t$_SESSION['suma_costo']+= $noticia->getCosto();\n\t\t\t}\n\t\t\t\n\t\t\t//hacemos consulta para obtener los datos del archivo principal y creamos objeto Archivo para asignarlo a la noticia\n $dao->execute_query(\"SELECT * FROM adjunto WHERE id_noticia = \".$noticia->getId().\" AND principal = 1 LIMIT 1;\");\n\n if($dao->num_rows() == 0) {\n $isprincipal = 0;\n }\n else {\n $isprincipal = 1;\n $principal = new Archivo($dao->get_row_assoc());\n }\n\n\n //hacemos consulta para obtener los archivos secundarios de la noticia\n //por cada archivo que obtengamos generamos un objeto Archivo y lo metemos a un arreglo\n $arreglo_secundarios = array();\n $dao->execute_query(\"SELECT * FROM adjunto WHERE id_noticia = \".$noticia->getId().\" AND principal = 0;\");\n\n if($dao->num_rows() == 0) {\n $issecundarios = 0;\n }\n else {\n \n $issecundarios = $dao->num_rows();\n while($row_archivo = $dao->get_row_assoc()) {\n $archivo = new Archivo($row_archivo);\n $arreglo_secundarios[$archivo->getId()]=$archivo;\n }\n }\n\t\n \n // generamos la salida:\n $new_back = array();\n \n\t\t\t$new_back[].='<noticia>'.\"\\n\";\n\t\t\t\n\t\t\t$new_back[].=\"\\t\".'<id_noticia>'.$noticia->getId().'</id_noticia>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<encabezado>'.$noticia->getEncabezado().'</encabezado>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<sintesis>'.$noticia->getSintesis().'</sintesis>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<autor>'.$noticia->getAutor().'</autor>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<fecha>'.$noticia->getFecha().'</fecha>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<fecha_larga>'.$noticia->getFecha_larga().'</fecha_larga>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<comentario>'.$noticia->getComentario().'</comentario>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<tipo_fuente>'.utf8_encode($noticia->getTipo_fuente()).'</tipo_fuente>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<fuente>'.$noticia->getFuente().'</fuente>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<seccion>'.$noticia->getSeccion().'</seccion>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<sector>'.$noticia->getSector().'</sector>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<tipo_autor>'.$noticia->getTipo_autor().'</tipo_autor>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<genero>'.utf8_encode($noticia->getGenero()).'</genero>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<tema>'.$noticia->getTema().'</tema>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<tendencia>'.$noticia->getTendencia().'</tendencia>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<hora>'.$noticia->getHora().'</hora>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<canal>'.$noticia->getCanal().'</canal>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<estacion>'.$noticia->getEstacion().'</estacion>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<duracion>'.$noticia->getDuracion().'</duracion>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<costo>'.$noticia->getCosto().'</costo>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<pagina>'.$noticia->getPagina().'</pagina>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<tipo_pagina>'.$noticia->getTipo_pagina().'</tipo_pagina>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<porcentaje_pagina>'.$noticia->getPorcentaje_pagina().'</porcentaje_pagina>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<tiraje>'.$noticia->getTiraje().'</tiraje>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<url>'.$noticia->getUrl().'</url>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<autor>'.$noticia->getAutor().'</autor>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<archivo_principal>http://sistema.opemedios.com.mx/data/noticias/radio/'.$principal->getNombre_archivo().'</archivo_principal>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<archivos_secundarios>'.\"\\n\";\n\t\t\tforeach($arreglo_secundarios as $sec)\n\t\t\t{\n\t\t\t\t$new_back[].=\"\\t\\t\".'<archivo>http://sistema.opemedios.com.mx/data/noticias/radio/'.$sec->getNombre_archivo().'</archivo>'.\"\\n\";\n\t\t\t}\n\t\t\t$new_back[].=\"\\t\".'</archivos_secundarios>'.\"\\n\";\n \n\t\t\t$new_back[].='</noticia>'.\"\\n\";\n\n $output = join(\"\", $new_back);\n\n break; // end case 2, radio\n\n case 3: // periodico\n\n //hacemos consulta para la noticia de periodico\n $query = \"SELECT\n noticia.id_noticia AS id_noticia,\n noticia.encabezado AS encabezado,\n noticia.sintesis AS sintesis,\n noticia.autor AS autor,\n noticia.fecha AS fecha,\n noticia.comentario AS comentario,\n noticia.id_tipo_fuente AS id_tipo_fuente,\n noticia.id_fuente AS id_fuente,\n noticia.id_seccion AS id_seccion,\n noticia.id_sector AS id_sector,\n noticia.id_tipo_autor AS id_tipo_autor,\n noticia.id_genero AS id_genero,\n fuente.nombre AS fuente,\n\t\t\t\t\t\t fuente.logo AS logo_fuente,\n seccion.nombre AS seccion,\n sector.nombre AS sector,\n tipo_fuente.descripcion AS tipo_fuente,\n tipo_autor.descripcion AS tipo_autor,\n genero.descripcion AS genero,\n noticia_per.pagina AS pagina,\n noticia_per.id_tipo_pagina AS id_tipo_pagina,\n noticia_per.porcentaje_pagina AS porcentaje_pagina,\n tipo_pagina.descripcion AS tipo_pagina,\n tema.nombre AS tema,\n asigna.id_tema AS id_tema,\n fuente_per.tiraje AS tiraje,\n tendencia.descripcion AS tendencia,\n asigna.id_tendencia AS id_tendencia\n FROM\n asigna\n INNER JOIN noticia ON (asigna.id_noticia=noticia.id_noticia)\n INNER JOIN empresa ON (asigna.id_empresa=empresa.id_empresa)\n INNER JOIN fuente ON (fuente.id_fuente=noticia.id_fuente)\n INNER JOIN fuente_per ON (fuente_per.id_fuente=fuente.id_fuente)\n INNER JOIN noticia_per ON (noticia_per.id_noticia=noticia.id_noticia)\n INNER JOIN genero ON (genero.id_genero=noticia.id_genero)\n INNER JOIN tipo_autor ON (tipo_autor.id_tipo_autor=noticia.id_tipo_autor)\n INNER JOIN tema ON (tema.id_tema=asigna.id_tema)\n INNER JOIN tendencia ON (tendencia.id_tendencia=asigna.id_tendencia)\n INNER JOIN sector ON (sector.id_sector=noticia.id_sector)\n INNER JOIN seccion ON (seccion.id_seccion=noticia.id_seccion)\n INNER JOIN tipo_fuente ON (tipo_fuente.id_tipo_fuente=noticia.id_tipo_fuente)\n INNER JOIN tipo_pagina ON (tipo_pagina.id_tipo_pagina=noticia_per.id_tipo_pagina)\n\n WHERE\n noticia.id_noticia = \".$id_notic;\n\n\n $dao->execute_query($query);\n $noticia = new SuperNoticia($dao->get_row_assoc());\n\n // buscamos el costo/beneficio\n\t\t\t\n\t\t\t\n\t\t\t//metemos las tarifas en un arreglo\n\t\t\t$arreglo_tarifas = array();\n\t\t\t$tarifas = 0;\n\t\t\t\n\t\t\t//si hay una tarifa con el tamaño exacto de la nota creamos solo una con el precio establecido\n\t\t\t$dao->execute_query(\"SELECT * FROM cuesta_prensa\n\t\t\t\t\t\t\t\t WHERE\n\t\t\t\t\t\t\t\t\t id_fuente = \".$noticia->getId_fuente().\"\n\t\t\t\t\t\t\t\t AND id_seccion = \".$noticia->getId_seccion().\"\n\t\t\t\t\t\t\t\t AND id_tipo_pagina = \".$noticia->getId_tipo_pagina().\";\");\n\t\t\t\n\t\t\tif($dao->num_rows()>0)\n\t\t\t{\n\t\t\t\t$tarifas = 1;\n\t\t\t\n\t\t\t\twhile($row_tarifa = $dao->get_row_assoc())\n\t\t\t\t{\n\t\t\t\t\t$tarifa = new TarifaPrensa($row_tarifa);\n\t\t\t\t\t$dao->execute_query2(\"SELECT * FROM seccion WHERE id_seccion=\".$row_tarifa['id_seccion'].\" LIMIT 1\");\n\t\t\t\t\t$seccion = new Seccion($dao->get_row_assoc2());\n\t\t\t\t\t$tarifa->set_seccion($seccion);\n\t\t\t\t\t$precio_noticia = $tarifa->get_precio() * ($noticia->getPorcentaje_pagina()/100);\n\t\t\t\t\t$tarifa->setPrecio_noticia($precio_noticia);\n\t\t\t\t\t$arreglo_tarifas[$tarifa->get_id_fuente().\"_\".$tarifa->get_seccion()->get_id().\"_\".$tarifa->get_id_tipo_pagina()]=$tarifa;\n\t\t\t\t}\n\t\t\t\t$c_b = $precio_noticia;\n\t\t\t\t$_SESSION['suma_costo'] += $precio_noticia;\n\t\t\t}\n\t\t\t\n\t\t\telse // si no hubo una con el tamaño exacto ya no se hace nada\n\t\t\t{\n\t\t\t\t$tarifas = 0;\n\t\t\t\t$c_b = \"N/D\";\n\t\t\t}\n\t\t\t\n\t\t\t//hacemos consulta para obtener los datos del archivo principal y creamos objeto Archivo para asignarlo a la noticia\n $dao->execute_query(\"SELECT * FROM adjunto WHERE id_noticia = \".$noticia->getId().\" AND principal = 1 LIMIT 1;\");\n\n if($dao->num_rows() == 0) {\n $isprincipal = 0;\n }\n else {\n $isprincipal = 1;\n $principal = new Archivo($dao->get_row_assoc());\n }\n\t\t\t\t\t\t\n\t\t\t\t\t\t//hacemos consulta para obtener los datos del archivo CONTENEDOR y creamos objeto Archivo para asignarlo a la noticia\n $dao->execute_query(\"SELECT * FROM adjunto WHERE id_noticia = \".$noticia->getId().\" AND principal = 2 LIMIT 1;\");\n\n if($dao->num_rows() == 0) {\n $iscontenedor = 0;\n }\n else {\n $iscontenedor = 1;\n $contenedor = new Archivo($dao->get_row_assoc());\n }\n\n\n //hacemos consulta para obtener los archivos secundarios de la noticia\n //por cada archivo que obtengamos generamos un objeto Archivo y lo metemos a un arreglo\n $arreglo_secundarios = array();\n $dao->execute_query(\"SELECT * FROM adjunto WHERE id_noticia = \".$noticia->getId().\" AND principal = 0;\");\n\n if($dao->num_rows() == 0) {\n $issecundarios = 0;\n }\n else {\n \n $issecundarios = $dao->num_rows();\n while($row_archivo = $dao->get_row_assoc()) {\n $archivo = new Archivo($row_archivo);\n $arreglo_secundarios[$archivo->getId()]=$archivo;\n }\n }\n\t\t\t\n\t\t\t// generamos la salida:\n $new_back = array();\n \n\t\t\t$new_back[].='<noticia>'.\"\\n\";\n\t\t\t\n\t\t\t$new_back[].=\"\\t\".'<id_noticia>'.$noticia->getId().'</id_noticia>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<encabezado>'.$noticia->getEncabezado().'</encabezado>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<sintesis>'.$noticia->getSintesis().'</sintesis>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<autor>'.$noticia->getAutor().'</autor>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<fecha>'.$noticia->getFecha().'</fecha>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<fecha_larga>'.$noticia->getFecha_larga().'</fecha_larga>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<comentario>'.$noticia->getComentario().'</comentario>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<tipo_fuente>'.utf8_encode($noticia->getTipo_fuente()).'</tipo_fuente>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<fuente>'.$noticia->getFuente().'</fuente>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<seccion>'.$noticia->getSeccion().'</seccion>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<sector>'.$noticia->getSector().'</sector>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<tipo_autor>'.$noticia->getTipo_autor().'</tipo_autor>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<genero>'.utf8_encode($noticia->getGenero()).'</genero>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<tema>'.$noticia->getTema().'</tema>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<tendencia>'.$noticia->getTendencia().'</tendencia>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<hora>'.$noticia->getHora().'</hora>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<canal>'.$noticia->getCanal().'</canal>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<estacion>'.$noticia->getEstacion().'</estacion>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<duracion>'.$noticia->getDuracion().'</duracion>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<costo>'.$noticia->getCosto().'</costo>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<pagina>'.$noticia->getPagina().'</pagina>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<tipo_pagina>'.$noticia->getTipo_pagina().'</tipo_pagina>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<porcentaje_pagina>'.$noticia->getPorcentaje_pagina().'</porcentaje_pagina>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<tiraje>'.$noticia->getTiraje().'</tiraje>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<url>'.$noticia->getUrl().'</url>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<autor>'.$noticia->getAutor().'</autor>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<archivo_principal>http://sistema.opemedios.com.mx/data/noticias/periodico/'.$principal->getNombre_archivo().'</archivo_principal>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<archivos_secundarios>'.\"\\n\";\n\t\t\tforeach($arreglo_secundarios as $sec)\n\t\t\t{\n\t\t\t\t$new_back[].=\"\\t\\t\".'<archivo>http://sistema.opemedios.com.mx/data/noticias/periodico/'.$sec->getNombre_archivo().'</archivo>'.\"\\n\";\n\t\t\t}\n\t\t\t$new_back[].=\"\\t\".'</archivos_secundarios>'.\"\\n\";\n \n\t\t\t$new_back[].='</noticia>'.\"\\n\";\n\n $output = join(\"\", $new_back);\n\n\n break; // end case 3, periodico\n\n case 4: // revista\n\t\t\n\t\t\n\t\t//hacemos consulta para la noticia de periodico\n $query = \"SELECT\n noticia.id_noticia AS id_noticia,\n noticia.encabezado AS encabezado,\n noticia.sintesis AS sintesis,\n noticia.autor AS autor,\n noticia.fecha AS fecha,\n noticia.comentario AS comentario,\n noticia.id_tipo_fuente AS id_tipo_fuente,\n noticia.id_fuente AS id_fuente,\n noticia.id_seccion AS id_seccion,\n noticia.id_sector AS id_sector,\n noticia.id_tipo_autor AS id_tipo_autor,\n noticia.id_genero AS id_genero,\n fuente.nombre AS fuente,\n\t\t\t\t\t\t fuente.logo AS logo_fuente,\n seccion.nombre AS seccion,\n sector.nombre AS sector,\n tipo_fuente.descripcion AS tipo_fuente,\n tipo_autor.descripcion AS tipo_autor,\n genero.descripcion AS genero,\n noticia_rev.pagina AS pagina,\n noticia_rev.id_tipo_pagina AS id_tipo_pagina,\n noticia_rev.porcentaje_pagina AS porcentaje_pagina,\n tipo_pagina.descripcion AS tipo_pagina,\n tema.nombre AS tema,\n asigna.id_tema AS id_tema,\n fuente_rev.tiraje AS tiraje,\n tendencia.descripcion AS tendencia,\n asigna.id_tendencia AS id_tendencia\n FROM\n asigna\n INNER JOIN noticia ON (asigna.id_noticia=noticia.id_noticia)\n INNER JOIN empresa ON (asigna.id_empresa=empresa.id_empresa)\n INNER JOIN fuente ON (fuente.id_fuente=noticia.id_fuente)\n INNER JOIN fuente_rev ON (fuente_rev.id_fuente=fuente.id_fuente)\n INNER JOIN noticia_rev ON (noticia_rev.id_noticia=noticia.id_noticia)\n INNER JOIN genero ON (genero.id_genero=noticia.id_genero)\n INNER JOIN tipo_autor ON (tipo_autor.id_tipo_autor=noticia.id_tipo_autor)\n INNER JOIN tema ON (tema.id_tema=asigna.id_tema)\n INNER JOIN tendencia ON (tendencia.id_tendencia=asigna.id_tendencia)\n INNER JOIN sector ON (sector.id_sector=noticia.id_sector)\n INNER JOIN seccion ON (seccion.id_seccion=noticia.id_seccion)\n INNER JOIN tipo_fuente ON (tipo_fuente.id_tipo_fuente=noticia.id_tipo_fuente)\n INNER JOIN tipo_pagina ON (tipo_pagina.id_tipo_pagina=noticia_rev.id_tipo_pagina)\n\n WHERE\n noticia.id_noticia = \".$id_notic;\n\n\n $dao->execute_query($query);\n $noticia = new SuperNoticia($dao->get_row_assoc());\n\n // buscamos el costo/beneficio\n\t\t\t\n\t\t\t\n\t\t\t//metemos las tarifas en un arreglo\n\t\t\t$arreglo_tarifas = array();\n\t\t\t$tarifas = 0;\n\t\t\t\n\t\t\t//si hay una tarifa con el tamaño exacto de la nota creamos solo una con el precio establecido\n\t\t\t$dao->execute_query(\"SELECT * FROM cuesta_prensa\n\t\t\t\t\t\t\t\t WHERE\n\t\t\t\t\t\t\t\t\t id_fuente = \".$noticia->getId_fuente().\"\n\t\t\t\t\t\t\t\t AND id_seccion = \".$noticia->getId_seccion().\"\n\t\t\t\t\t\t\t\t AND id_tipo_pagina = \".$noticia->getId_tipo_pagina().\";\");\n\t\t\t\n\t\t\tif($dao->num_rows()>0)\n\t\t\t{\n\t\t\t\t$tarifas = 1;\n\t\t\t\n\t\t\t\twhile($row_tarifa = $dao->get_row_assoc())\n\t\t\t\t{\n\t\t\t\t\t$tarifa = new TarifaPrensa($row_tarifa);\n\t\t\t\t\t$dao->execute_query2(\"SELECT * FROM seccion WHERE id_seccion=\".$row_tarifa['id_seccion'].\" LIMIT 1\");\n\t\t\t\t\t$seccion = new Seccion($dao->get_row_assoc2());\n\t\t\t\t\t$tarifa->set_seccion($seccion);\n\t\t\t\t\t$precio_noticia = $tarifa->get_precio() * ($noticia->getPorcentaje_pagina()/100);\n\t\t\t\t\t$tarifa->setPrecio_noticia($precio_noticia);\n\t\t\t\t\t$arreglo_tarifas[$tarifa->get_id_fuente().\"_\".$tarifa->get_seccion()->get_id().\"_\".$tarifa->get_id_tipo_pagina()]=$tarifa;\n\t\t\t\t}\n\t\t\t\t$c_b = $precio_noticia;\n\t\t\t\t$_SESSION['suma_costo'] += $precio_noticia;\n\t\t\t}\n\t\t\t\n\t\t\telse // si no hubo una con el tamaño exacto ya no se hace nada\n\t\t\t{\n\t\t\t\t$tarifas = 0;\n\t\t\t\t$c_b = \"N/D\";\n\t\t\t}\n\t\t\t\n\t\t\t//hacemos consulta para obtener los datos del archivo principal y creamos objeto Archivo para asignarlo a la noticia\n $dao->execute_query(\"SELECT * FROM adjunto WHERE id_noticia = \".$noticia->getId().\" AND principal = 1 LIMIT 1;\");\n\n if($dao->num_rows() == 0) {\n $isprincipal = 0;\n }\n else {\n $isprincipal = 1;\n $principal = new Archivo($dao->get_row_assoc());\n }\n\t\t\t\t\t\t\n\t\t\t\t\t\t//hacemos consulta para obtener los datos del archivo CONTENEDOR y creamos objeto Archivo para asignarlo a la noticia\n $dao->execute_query(\"SELECT * FROM adjunto WHERE id_noticia = \".$noticia->getId().\" AND principal = 2 LIMIT 1;\");\n\n if($dao->num_rows() == 0) {\n $iscontenedor = 0;\n }\n else {\n $iscontenedor = 1;\n $contenedor = new Archivo($dao->get_row_assoc());\n }\n\n\n //hacemos consulta para obtener los archivos secundarios de la noticia\n //por cada archivo que obtengamos generamos un objeto Archivo y lo metemos a un arreglo\n $arreglo_secundarios = array();\n $dao->execute_query(\"SELECT * FROM adjunto WHERE id_noticia = \".$noticia->getId().\" AND principal = 0;\");\n\n if($dao->num_rows() == 0) {\n $issecundarios = 0;\n }\n else {\n \n $issecundarios = $dao->num_rows();\n while($row_archivo = $dao->get_row_assoc()) {\n $archivo = new Archivo($row_archivo);\n $arreglo_secundarios[$archivo->getId()]=$archivo;\n }\n }\n\t\t\t\n\t\t\t// generamos la salida:\n $new_back = array();\n \n\t\t\t$new_back[].='<noticia>'.\"\\n\";\n\t\t\t\n\t\t\t$new_back[].=\"\\t\".'<id_noticia>'.$noticia->getId().'</id_noticia>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<encabezado>'.$noticia->getEncabezado().'</encabezado>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<sintesis>'.$noticia->getSintesis().'</sintesis>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<autor>'.$noticia->getAutor().'</autor>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<fecha>'.$noticia->getFecha().'</fecha>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<fecha_larga>'.$noticia->getFecha_larga().'</fecha_larga>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<comentario>'.$noticia->getComentario().'</comentario>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<tipo_fuente>'.$noticia->getTipo_fuente().'</tipo_fuente>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<fuente>'.$noticia->getFuente().'</fuente>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<seccion>'.$noticia->getSeccion().'</seccion>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<sector>'.$noticia->getSector().'</sector>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<tipo_autor>'.$noticia->getTipo_autor().'</tipo_autor>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<genero>'.utf8_encode($noticia->getGenero()).'</genero>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<tema>'.$noticia->getTema().'</tema>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<tendencia>'.$noticia->getTendencia().'</tendencia>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<hora>'.$noticia->getHora().'</hora>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<canal>'.$noticia->getCanal().'</canal>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<estacion>'.$noticia->getEstacion().'</estacion>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<duracion>'.$noticia->getDuracion().'</duracion>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<costo>'.$noticia->getCosto().'</costo>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<pagina>'.$noticia->getPagina().'</pagina>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<tipo_pagina>'.$noticia->getTipo_pagina().'</tipo_pagina>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<porcentaje_pagina>'.$noticia->getPorcentaje_pagina().'</porcentaje_pagina>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<tiraje>'.$noticia->getTiraje().'</tiraje>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<url>'.$noticia->getUrl().'</url>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<autor>'.$noticia->getAutor().'</autor>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<archivo_principal>http://sistema.opemedios.com.mx/data/noticias/revista/'.$principal->getNombre_archivo().'</archivo_principal>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<archivos_secundarios>'.\"\\n\";\n\t\t\tforeach($arreglo_secundarios as $sec)\n\t\t\t{\n\t\t\t\t$new_back[].=\"\\t\\t\".'<archivo>http://sistema.opemedios.com.mx/data/noticias/revista/'.$sec->getNombre_archivo().'</archivo>'.\"\\n\";\n\t\t\t}\n\t\t\t$new_back[].=\"\\t\".'</archivos_secundarios>'.\"\\n\";\n \n\t\t\t$new_back[].='</noticia>'.\"\\n\";\n\n $output = join(\"\", $new_back);\n \n break; // end case 4, revista\n\n case 5: // internet\n\n //hacemos consulta para la noticia de internet\n $query = \"SELECT\n noticia.id_noticia AS id_noticia,\n noticia.encabezado AS encabezado,\n noticia.sintesis AS sintesis,\n noticia.autor AS autor,\n noticia.fecha AS fecha,\n noticia.comentario AS comentario,\n noticia.id_tipo_fuente AS id_tipo_fuente,\n noticia.id_fuente AS id_fuente,\n noticia.id_seccion AS id_seccion,\n noticia.id_sector AS id_sector,\n noticia.id_tipo_autor AS id_tipo_autor,\n noticia.id_genero AS id_genero,\n fuente.nombre AS fuente,\n\t\t\t\t\t\t fuente.logo AS logo_fuente,\n seccion.nombre AS seccion,\n sector.nombre AS sector,\n tipo_fuente.descripcion AS tipo_fuente,\n tipo_autor.descripcion AS tipo_autor,\n genero.descripcion AS genero,\n noticia_int.url AS url,\n tema.nombre AS tema,\n asigna.id_tema AS id_tema,\n tendencia.descripcion AS tendencia,\n asigna.id_tendencia AS id_tendencia\n FROM\n asigna\n INNER JOIN noticia ON (asigna.id_noticia=noticia.id_noticia)\n INNER JOIN empresa ON (asigna.id_empresa=empresa.id_empresa)\n INNER JOIN fuente ON (fuente.id_fuente=noticia.id_fuente)\n INNER JOIN fuente_int ON (fuente_int.id_fuente=fuente.id_fuente)\n INNER JOIN noticia_int ON (noticia_int.id_noticia=noticia.id_noticia)\n INNER JOIN genero ON (genero.id_genero=noticia.id_genero)\n INNER JOIN tipo_autor ON (tipo_autor.id_tipo_autor=noticia.id_tipo_autor)\n INNER JOIN tema ON (tema.id_tema=asigna.id_tema)\n INNER JOIN tendencia ON (tendencia.id_tendencia=asigna.id_tendencia)\n INNER JOIN sector ON (sector.id_sector=noticia.id_sector)\n INNER JOIN seccion ON (seccion.id_seccion=noticia.id_seccion)\n INNER JOIN tipo_fuente ON (tipo_fuente.id_tipo_fuente=noticia.id_tipo_fuente)\n\n WHERE\n noticia.id_noticia = \".$id_notic;\n\n\n $dao->execute_query($query);\n $noticia = new SuperNoticia($dao->get_row_assoc());\n\n // no existe costo/beneficio, procedemos a generar output\n\n $c_b = \"N/D\";\n\t\t\t\n\t\t\t//hacemos consulta para obtener los datos del archivo principal y creamos objeto Archivo para asignarlo a la noticia\n $dao->execute_query(\"SELECT * FROM adjunto WHERE id_noticia = \".$noticia->getId().\" AND principal = 1 LIMIT 1;\");\n\n if($dao->num_rows() == 0) {\n $isprincipal = 0;\n }\n else {\n $isprincipal = 1;\n $principal = new Archivo($dao->get_row_assoc());\n }\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n //hacemos consulta para obtener los archivos secundarios de la noticia\n //por cada archivo que obtengamos generamos un objeto Archivo y lo metemos a un arreglo\n $arreglo_secundarios = array();\n $dao->execute_query(\"SELECT * FROM adjunto WHERE id_noticia = \".$noticia->getId().\" AND principal = 0;\");\n\n if($dao->num_rows() == 0) {\n $issecundarios = 0;\n }\n else {\n \n $issecundarios = $dao->num_rows();\n while($row_archivo = $dao->get_row_assoc()) {\n $archivo = new Archivo($row_archivo);\n $arreglo_secundarios[$archivo->getId()]=$archivo;\n }\n }\n\t\t\t\n\n // generamos la salida:\n $new_back = array();\n \n\t\t\t$new_back[].='<noticia>'.\"\\n\";\n\t\t\t\n\t\t\t$new_back[].=\"\\t\".'<id_noticia>'.$noticia->getId().'</id_noticia>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<encabezado>'.$noticia->getEncabezado().'</encabezado>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<sintesis>'.$noticia->getSintesis().'</sintesis>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<autor>'.$noticia->getAutor().'</autor>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<fecha>'.$noticia->getFecha().'</fecha>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<fecha_larga>'.$noticia->getFecha_larga().'</fecha_larga>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<comentario>'.$noticia->getComentario().'</comentario>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<tipo_fuente>'.$noticia->getTipo_fuente().'</tipo_fuente>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<fuente>'.$noticia->getFuente().'</fuente>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<seccion>'.$noticia->getSeccion().'</seccion>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<sector>'.$noticia->getSector().'</sector>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<tipo_autor>'.$noticia->getTipo_autor().'</tipo_autor>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<genero>'.utf8_encode($noticia->getGenero()).'</genero>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<tema>'.$noticia->getTema().'</tema>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<tendencia>'.$noticia->getTendencia().'</tendencia>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<hora>'.$noticia->getHora().'</hora>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<canal>'.$noticia->getCanal().'</canal>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<estacion>'.$noticia->getEstacion().'</estacion>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<duracion>'.$noticia->getDuracion().'</duracion>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<costo>'.$noticia->getCosto().'</costo>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<pagina>'.$noticia->getPagina().'</pagina>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<tipo_pagina>'.$noticia->getTipo_pagina().'</tipo_pagina>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<porcentaje_pagina>'.$noticia->getPorcentaje_pagina().'</porcentaje_pagina>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<tiraje>'.$noticia->getTiraje().'</tiraje>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<url>'.$noticia->getUrl().'</url>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<autor>'.$noticia->getAutor().'</autor>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<archivo_principal>http://sistema.opemedios.com.mx/data/noticias/internet/'.$principal->getNombre_archivo().'</archivo_principal>'.\"\\n\";\n\t\t\t$new_back[].=\"\\t\".'<archivos_secundarios>'.\"\\n\";\n\t\t\tforeach($arreglo_secundarios as $sec)\n\t\t\t{\n\t\t\t\t$new_back[].=\"\\t\\t\".'<archivo>http://sistema.opemedios.com.mx/data/noticias/internet/'.$sec->getNombre_archivo().'</archivo>'.\"\\n\";\n\t\t\t}\n\t\t\t$new_back[].=\"\\t\".'</archivos_secundarios>'.\"\\n\";\n \n\t\t\t$new_back[].='</noticia>'.\"\\n\";\n\n $output = join(\"\", $new_back);\n\n break; // end case 5, internet\n\n } // end switch\n\t \n\t return $output;\n\t \n }", "title": "" }, { "docid": "1b858f15b996de83f78a75a59c60e886", "score": "0.53742194", "text": "public function asXML ($filename = null) {}", "title": "" }, { "docid": "1b858f15b996de83f78a75a59c60e886", "score": "0.53742194", "text": "public function asXML ($filename = null) {}", "title": "" }, { "docid": "1b858f15b996de83f78a75a59c60e886", "score": "0.53742194", "text": "public function asXML ($filename = null) {}", "title": "" }, { "docid": "f290bd745f3e964a3094aae081e9c427", "score": "0.5359703", "text": "static public function generate(Resultset $resultset){\n\t\t$code = '<table>' ;\n\t\tforeach ($resultset as $record){\n\t\t\t$code .= '<tr>' ;\n\t\t\tforeach ($record->toArray() as $value){\n\t\t\t\t$code .= '<td>'.$value.'</td>' ;\n\t\t\t}\n\t\t\t$code .= '</tr>' ;\n\t\t}\n\t\t$code .= '</table>';\n\t\t\n\t\treturn $code ;\n\t}", "title": "" }, { "docid": "d536bb5f8152c0116d7e70c3c0ad9e29", "score": "0.53587097", "text": "function Export_adminapi_tableToXML($args){\n // Security check\n if (!SecurityUtil::checkPermission( 'Export::', '::', ACCESS_ADMIN) || !pnUserLoggedIn()) {\n\t\treturn LogUtil::registerPermissionError();\n\t}\n $path = FormUtil::getPassedValue('path', isset($args['path']) ? $args['path'] : null, 'REQUEST');\n $table = FormUtil::getPassedValue('table', isset($args['table']) ? $args['table'] : null, 'REQUEST');\n\n //$table_content = DBUtil::selectObjectArray($table);\n\t//$table_rows = DBUtil::selectObjectArray($table);\n\n\t$dbconn =& pnDBGetConn(true);\n\t$pntable =& pnDBGetTables();\n\t$table_rows =& $dbconn->Execute('SELECT * FROM '.pnConfigGetVar('prefix').'_'.$table);\n\t$columns = DBUtil::metaColumnNames($table);\n\t$num_columns = array();\n\tforeach ($columns as $column) $num_columns[] = $column;\n\t$table_content = array();\n\t$i = 0;\n\t$j = 0;\n\tforeach ($table_rows as $row) {\n\t\tforeach ($row as $key => $field){\n\t\t\t\t$table_content[$i][$num_columns[$j]] = (is_null($field)) ? '$$NULL$$' : $field;\n\t\t\t\t$j++;\n\t\t}\n\t\t$j = 0;\n\t\t$i++;\n\t}\n\t/*\n\t$table_column = pnDBGetTables();\n\t$table_column = $table_column[$table.'_column'];\n\tforeach ($table_rows as $i => $row){\n\t\tforeach ($columns as $column){\n\t\t\t$key = array_keys($table_column,$column);\n\t\t\t$key = $key[count($key)-1];\n\t\t\tif($key != '')$table_content[$i][$key] = $row[$key];\n\t\t}\n\t}\n\t*/\n\n // create a new XML document\n $doc = new DomDocument('1.0');\n // create root node\n $root = $doc->createElement($table);\n $root = $doc->appendChild($root);\n\n // process one row at a time\n foreach($table_content as $row){\n // add node for each row\n $occ = $doc->createElement('row');\n $occ = $root->appendChild($occ);\n // add a child node for each field\n foreach ($row as $fieldname => $fieldvalue) {\n $child = $doc->createElement(utf8_encode($fieldname));\n $child = $occ->appendChild($child);\n $value = $doc->createTextNode(utf8_encode($fieldvalue));\n $value = $child->appendChild($value);\n }\n }\n\n $xml_string = $doc->saveXML();\n $file = fopen($path . $table . '.xml', \"w\");\n fwrite($file, $xml_string);\n fclose($file);\n}", "title": "" }, { "docid": "18916eb053d130d1cf49bf99f1832c1a", "score": "0.53470767", "text": "private function xml($data){\n\t\t\t\n\t\t\t$this->setContentType('application/xml');\n\n\t\t\tif(is_array($data)){\n\t\t\t\t$root = new SimpleXMLElement(\"<root></root>\");\n\n\t\t\t\t\tforeach ($data as $k => $v) {\n\n\t\t\t\t\t\tif (is_array($v)) {\n\n\t\t\t\t\t\t\t$item = $root->addChild('item');\n\t\t\t\t\t\t\t$item->addAttribute('id', $v['id']);\n\n\t\t\t\t\t\t\tforeach ($v as $kk => $vv) {\n\t\t\t\t\t\t\t\t$item->addChild($kk);\n\t\t\t\t\t\t\t\t$item->$kk = $vv;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$item = $root->addChild($k);\n\t\t\t\t\t\t\t$root->$k = $v;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\treturn $root->asXML();\n\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "5ab71bb5079f48dc17f387a5dbd38bcb", "score": "0.5346296", "text": "function generate(){\n global $elements, $xml, $columns, $group, $relations, $output_stream, $header_text, $columns_max;\n\n foreach ($xml->children() as $child) { // preskocim korenovy element\n recursive_load_elements($child, 0, \"\"); //zpracuje xml do $elements\n }\n\n if ($relations) // pokud -g tiskne xml s relacemi\n print_relations(create_relations($elements), $output_stream);\n else{ // jinak tiskne DDL tabulky\n if($columns_max != -1) check_max($elements, $columns_max); // proveri a opravi --etc\n print_tables($elements);\n }\n}", "title": "" }, { "docid": "249ab0f0c49a739e699e8134579d96d7", "score": "0.53461206", "text": "function XmlControlOnRender(&$xmlWriter) {\n DataFactory::GetStorage($this, \"FotoContestsTable\", \"contestStorage\");\n DataFactory::GetStorage($this, \"FotosTable\", \"fotoStorage\");\n\n\n $contest_id = $this->Page->Request->ToNumber(\"contest_id\", 0);\n $sort_order = $this->Page->Request->ToNumber(\"sort\", 0, 0, 1);\n $foto_id = $this->Page->Request->ToNumber(\"foto_id\", 0);\n\n $_contest = $this->contestStorage->Get(array(\"contest_id\" => $contest_id));\n\n $_contest[\"starts_from\"] = Component::dateconv($_contest[\"starts_from\"]);\n $_contest[\"ends_to\"] = Component::dateconv($_contest[\"ends_to\"]);\n\n $xmlWriter->WriteElementString(\"votes_enabled\", ($_contest[\"disable_voting\"] == 1 ? \"0\": \"1\"));\n $xmlWriter->WriteElementString(\"contest_finished\", $_contest[\"contest_finished\"]);\n\n $this->XmlTag = \"contest\";\n $this->data = DataManipulator::StripLanguageVersions($_contest, $this->Page->Kernel->Languages, $this->Page->Kernel->Language);\n RecordControl::StaticXmlControlOnRender(&$this, $xmlWriter);\n\n\n if(!empty($_contest)){\n\n $xmlWriter->WriteStartElement(\"result_list\");\n //prn(\"+++\".$_contest[\"show_results_count\"]);\n $_reader = $this->fotoStorage->GetList(array(\"contest_id\" => $contest_id, \"active\" => 1),\n array(\"votes_count\" => 0),\n $_contest[\"show_results_count\"], 0\n );\n\n $this->XmlTag = \"row\";\n for($i=0; $i<$_reader->RecordCount; $i++){\n $_tmp = DataManipulator::StripLanguageVersions($_reader->Read(), $this->Page->Kernel->Languages, $this->Page->Kernel->Language);\n $_tmp[\"date_posted\"] = Component::dateconv($_tmp[\"date_posted\"]);\n $this->data = $_tmp;\n RecordControl::StaticXmlControlOnRender(&$this, $xmlWriter);\n }\n\n\n $xmlWriter->WriteEndElement(\"result_list\");\n\n\n }\n\n }", "title": "" }, { "docid": "56de08575301d9a89abfbf67a555d2ff", "score": "0.53355426", "text": "function db_record_as_xml(&$aRow,$recordName,$strKeyCol,$dbTable,$intPFS = 0,$boolIncludeDisplayValue = false)\r\n\t{\r\n\t\tif(!$aRow)return\"\";\r\n\t\t$strDataOut = \"\";\r\n\t\t$strXMLRow = \"\";\r\n\t\t$counter = 1;\r\n\t\tforeach($aRow as $fieldName => $fieldValue)\r\n\t\t{\r\n\t\t\t//-- column seperator\r\n\t\t\t//$strLabel = swlbl($dbTable.\".\"$fieldName);\r\n\t\t\tif($boolIncludeDisplayValue)\r\n\t\t\t{\r\n\t\t\t\t$varUseDisplay = \"\";\r\n\t\t\t\t$strBinding = $dbTable.\".\".$fieldName;\r\n\t\t\t\t$varDisplay = datatable_conversion($fieldValue,$strBinding);\r\n\t\t\t\tif($varDisplay!=$fieldValue)$varUseDisplay = \"<display><![CDATA[\".$varDisplay.\"]]></display>\"; //-- only include display if it is different\r\n\r\n\t\t\t\t$strXMLRow .= \"<\".$fieldName.\"><value><![CDATA[\" . $fieldValue . \"]]></value>\".$varUseDisplay.\"</\".$fieldName.\">\";\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif(strpos($fieldName,\"count(\")!==false)\r\n\t\t\t\t{\r\n\t\t\t\t\t$fieldName = \"countvalue\" . $counter;\r\n\t\t\t\t\t$counter++;\r\n\t\t\t\t}\r\n\t\t\t\t$strXMLRow .= \"<\".$fieldName.\"><![CDATA[\" . $fieldValue . \"]]></\".$fieldName.\">\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t//-- row seperator / new line\r\n\t\t$strDataOut .= \"<\".$recordName.\" dbtable='\".$dbTable.\"' keycolumn='\".$strKeyCol.\"' pfs='\".$intPFS.\"' >\" . $strXMLRow . \"</\".$recordName.\">\";\r\n\t\treturn $strDataOut;\r\n\t}", "title": "" }, { "docid": "ecb971e6451a6e29e95ae6f83d12af2c", "score": "0.5335319", "text": "public function generar_xml(){ \n\n\t\t\t$db = new conexion();\n\t\t\t$link = $db->conexion();\n\n\t\t\tif($this->tipo_documento=='1'){\n\t\t\t\t$this->tipo_documento='03';\n\t\t\t}else if($this->tipo_documento=='2'){\n\t\t\t\t$this->tipo_documento='01';\n\t\t\t}\t\n\n\t\t\t$sqlalquiler = $link->query(\"select\n\t\t\tal_venta.idalquiler,\n\t\t\tal_venta.idhuesped,\n\t\t\tal_venta.idhabitacion,\n\t\t\tal_venta.nrohabitacion,\n\t\t\tal_venta.tipooperacion,\n\t\t\tal_venta.total,\n\t\t\t\n\t\t\tcliente.idhuesped,\n\t\t\tcliente.nombre,\n\t\t\tcliente.ciudad,\n\t\t\tcliente.tipo_documento,\n\t\t\tcliente.documento,\n\t\t\t\n\t\t\tal_venta.comentarios,\n\t\t\tal_venta.nroorden,\n\t\t\tal_venta.fecharegistro,\n\t\t\tal_venta.descuento\n\t\t\t\n\t\t\tfrom al_venta inner join cliente on cliente.idhuesped = al_venta.idhuesped\n\t\t\twhere al_venta.idalquiler = '$this->idalquiler' \n\t\t\t\");\t\t\n\t\t\t$xaFila = $sqlalquiler->fetch_row();\n\t\t\t\n\t\t\t\n\t\t\t//\n\t\t\tif($xaFila[9]==''){\n\t\t\t\t$RUCReceptor='00000000';\n\t\t\t\t$RznSoc= $xaFila[7];\n\t\t\t\t$Direccion=$xaFila[8];\n\t\t\t\t$TipoDocumento='1';\n\t\t\t}else{\n\n\t\t\t\t$RUCReceptor=$xaFila[10];\n\t\t\t\t$RznSoc= $xaFila[7];\n\t\t\t\t$Direccion=$xaFila[8];\n\t\t\t\t$TipoDocumento=$xaFila[9];\n\n\t\t\t}\n\n\t\t\t$array = [\n\t\t\t\t\t\t\t'Encabezado' => [\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t/*'Emisor' => [\n\t\t\t\t\t\t\t\t\t'RUCEmisor' => '20545756022',\n\t\t\t\t\t\t\t\t\t'RznSoc' => 'INVERSIONES INKA´S PALACE S.A.C.',\n\t\t\t\t\t\t\t\t\t'NomComercial' => '',\n\t\t\t\t\t\t\t\t\t'Ubigeo' => 150101,\n\t\t\t\t\t\t\t\t\t'Direccion'=>\"CAL.MANUEL DEL PINO NRO. 116 URB. SANTA BEATRIZ (ALT.CDRA.16 AV.ARENALES) LIMA - LIMA - LIMA\",\n\t\t\t\t\t\t\t\t\t'Urbanizacion' => '',\n\t\t\t\t\t\t\t\t\t'Departamento' => 'LIMA',\n\t\t\t\t\t\t\t\t\t'Provincia' => 'LIMA',\n\t\t\t\t\t\t\t\t\t'Distrito' => 'LIMA',\n\t\t\t\t\t\t\t\t],*/\n\t\t\t\t\t\t\t\t'Emisor' => [\n\t\t\t\t\t\t\t\t\t'RUCEmisor'\t\t=> APP_EMISOR_RUC,\n\t\t\t\t\t\t\t\t\t'RznSoc'\t\t=> APP_EMISOR_RAZONSOCIAL,\n\t\t\t\t\t\t\t\t\t'NomComercial'\t=> APP_EMISOR_NOMBRE,\n\t\t\t\t\t\t\t\t\t'Ubigeo'\t\t=> APP_EMISOR_UBIGUEO,\n\t\t\t\t\t\t\t\t\t'Direccion'\t\t=> APP_EMISOR_DIRECCION,\n\t\t\t\t\t\t\t\t\t'Urbanizacion' \t=> APP_EMISOR_URBANIZACION,\n\t\t\t\t\t\t\t\t\t'Departamento' \t=> APP_EMISOR_DEPARTAMENTO,\n\t\t\t\t\t\t\t\t\t'Provincia' \t=> APP_EMISOR_PROVINCIA,\n\t\t\t\t\t\t\t\t\t'Distrito' \t\t=> APP_EMISOR_DISTRITO,\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t'Receptor' => [\n\t\t\t\t\t\t\t\t\t'RUCReceptor' =>$RUCReceptor,\n\t\t\t\t\t\t\t\t\t'RznSoc' => $RznSoc,\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t'Direccion'=> $Direccion,\n\t\t\t\t\t\t\t\t\t'TipoDocumento'=>$TipoDocumento,\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t],\n\t\t\t\t\t];\n\n\t\t\t\n\n\t\t\t//Detalle Aquiler\n\t\t\t$sqldetalle = $link->query(\"select\n\t\t\t\tidalquilerdetalle,\n\t\t\t\tidalquiler,\n\t\t\t\ttipoalquiler,\t\n\t\t\t\tfechadesde,\t\n\t\t\t\tfechahasta,\t\n\t\t\t\tnrohoras,\t\n\t\t\t\tnrodias,\t\n\t\t\t\tcostohora,\t\n\t\t\t\tcostodia,\t\n\t\t\t\tformapago,\t\n\t\t\t\ttotalefectivo,\t\n\t\t\t\ttotalvisa,\t\n\t\t\t\testadopago,\t\n\t\t\t\tcostoingresoanticipado,\t\n\t\t\t\thoraadicional,\n\t\t\t\tcostohoraadicional,\t\n\t\t\t\thuespedadicional,\t\n\t\t\t\tcostohuespedadicional,\t\n\t\t\t\tpreciounitario,\t\n\t\t\t\tcantidad,\t\n\t\t\t\ttotal,\t\n\t\t\t\tidturno,\t\n\t\t\t\tidusuario\n\t\t\t\t\n\t\t\t\tfrom al_venta_detalle \n\t\t\t\twhere idalquiler = '$this->idalquiler' and estadopago !=2 order by idalquilerdetalle asc\n\t\t\t\t\");\n\t\t\t$descripcion=\"\";\n\t\t\t$items=array();\n\t\t\t$globalIGV=0; $globalTotalVenta=0; $globalGrabadas=0; $Descuento=0;\n\t\t\twhile ($tmpFila = $sqldetalle->fetch_row()){ $num++; \n\n\t\t\t\n\t\t\t\t\n\t\t\t\t$descripcion=tipoAlquiler($tmpFila['2']).' ('.$tmpFila['19'].')';\n\t\t\t\tif($tmpFila['2'] != 4 && $tmpFila['2'] != 5){\n\t\t\t\t\t$descripcion.= fechadesdehasta($tmpFila['3'],$tmpFila['4']);\n\t\t\t\t}\n\t\t\t\t//$pu=number_format($tmpFila[18] / 1.18,2);\t\t\t\t\t\t\t\t\n\t\t\t\t$pu=number_format($tmpFila[20] / 1.18,2);\t\t\t\t\t\t\t\t\n\t\t\t\t//$t=($pu * 1);\n\t\t\t\t$t=$tmpFila[20];\n\t\t\t\t$st=number_format($t / (1.18 ),2);\n\t\t\t\t$igv=number_format($t - $st,2);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$item [\"pro_id\"] = $num;\n\t $item [\"pro_desc\"] =str_replace('<br>', '', $descripcion) ;\n\t $item ['pro_cantidad'] = 1;\n\t $item [\"pro_unimedida\"] = 'NIU';\n\t $item [\"pro_preunitario\"] =$pu;\n\t $item ['pro_preref'] =number_format($pu,2);\n\t $item [\"pro_tipoprecio\"] = \"01\"; //Precio Incluye IGV\n\t $item [\"pro_igv\"] = $igv;\n\t $item ['pro_tipoimpuesto'] = \"10\"; //Gravado - Operación Onerosa\n\t $item [\"pro_isc\"] = number_format(0.00,2);\n\t $item [\"pro_otroimpuesto\"] = number_format(0.00,2);\n\t $item ['pro_subtotal'] = $st;\n\t $item ['pro_total'] =number_format($t,2);\n\n\t $globalIGV+=$igv;\n\t $globalTotalVenta+= $t;//$tmpFila[18];\n\t $globalGrabadas+=$st;\n\t \n\t array_push($items,$item);\n\n\t \n\t\t\t}\n\t\t\t//FIN DETALLE ALQUILER\n\t\t\t\n\t\t\t//INICIO DETALLE VENTAS\n\t\t\t$sqlventa = $link->query(\"select\n\t\t\tventa.idventa,\n\t\t\tventa.idalquiler,\n\t\t\tventadetalle.idventadetalle,\n\t\t\tventadetalle.idventa,\n\t\t\tventadetalle.nombre,\n\t\t\tventadetalle.cantidad,\n\t\t\tventadetalle.precio,\n\t\t\tventadetalle.importe\n\t\t\t\n\t\t\tfrom venta left join ventadetalle on ventadetalle.idventa = venta.idventa\n\t\t\twhere venta.idalquiler = '$this->idalquiler' order by ventadetalle.idventadetalle asc\");\n\n\t\t\t$detTotventa=0;\n\t\t\twhile($vFila = $sqlventa->fetch_row()){\n\n\t\t\t\t$pu2=number_format($vFila[6] / 1.18,2);\t\t\t\t\t\t\t\t\n\t\t\t\t$t2=($vFila[6] * $vFila[5]);\n\n\t\t\t\t$st2=number_format($t2 / (1.18 ),2);\n\t\t\t\t$igv2=number_format($t2 - $st2,2);\n\n\n\t\t\t\t//$st2=number_format($t2 * (18 / 100 ),2);\n\t\t\t\t//$igv2=number_format($vFila[7] - $t2,2);\n\n\t\t\t\t$item2 [\"pro_id\"] = rand();\n\t $item2 [\"pro_desc\"] =$vFila['4'] ;\n\t $item2 ['pro_cantidad'] = $vFila['5'];\n\t $item2 [\"pro_unimedida\"] = 'NIU';\n\t $item2 [\"pro_preunitario\"] =$pu2;\n\t $item2 ['pro_preref'] =number_format($pu2,2);\n\t $item2 [\"pro_tipoprecio\"] = \"01\"; //Precio Incluye IGV\n\t $item2 [\"pro_igv\"] = $igv2;\n\t $item2 ['pro_tipoimpuesto'] = \"10\"; //Gravado - Operación Onerosa\n\t $item2 [\"pro_isc\"] = number_format(0.00,2);\n\t $item2 [\"pro_otroimpuesto\"] = number_format(0.00,2);\n\t $item2 ['pro_subtotal'] = $st2;\n\t $item2 ['pro_total'] =number_format($t2,2);\n\t \n\t $globalIGV+=$igv2;\n\t $globalTotalVenta+=number_format($t2,2);\n\t $globalGrabadas+=$st2;\n\t \n\t if(count($item2)>0){\n\n\t \tarray_push($items,$item2);\n\n\t }\n\n\t\t\t}\n\n\t\t\t//Descuento Global\n\t\t\t$Descuento= $xaFila[16];\n\t\t\t//CORRELATIVO PARA LOS DOCUMENTOS\n\n\t\t\t$correlativo=$link->query(\"SELECT * FROM series WHERE codsunat='$this->tipo_documento' and estado=1\")->fetch_row();\n\n\t\t\t\n\t\t\t$date = new DateTime($xaFila[13]);\n\t\t\t//Validar si es boleta o factura\n\t\t\t$corre=$correlativo[3].'-'.str_pad($correlativo[4], 8, \"0\", STR_PAD_LEFT);;\n\t\t\t\n\t\t\t$this->setEncabezado($array);\t\t\t\n\t\t\t$this->setId($corre);\n\t\t\t$this->InvoiceTypeCode=\"03\"; //01 factura - 03 boleta\n\t\t\t$this->setIssueDate($date->format('Y-m-d')); //Fecha registro\n\n\t\t\t$this->DocumentCurrencyCode=\"PEN\"; //PEN SOLES - USD DOLARES\t\t\t\n\t\t\t$this->setInvoiceLine($items);\n\t\t\t//$this->ci->invoice->setDiscrepancia($discrepancia);\n\t\t\t//$this->ci->invoice->setDocRelacionado($relacionado);\n\t\t\t$this->setTotalIgv(number_format($globalIGV,2));\n\t\t\t$this->setTotalIsc(number_format(0.00,2));\n\t\t\t$this->setTotalOtrosTributos(number_format(0.00,2));\n\t\t\t$this->setTotalVenta(number_format($globalTotalVenta,2));\n\t\t\t$this->setGravadas(number_format($globalGrabadas,2));//Venta Grabada\n\t\t\t$this->setGratuitas(number_format(0.00,2));//Venta Gratuitas\n\t\t\t$this->setInafectas(number_format(0.00,2));//Venta Inafectas\n\t\t\t$this->setExoneradas(number_format(0.00,2));//Venta Exoneradas\n\t\t\t$this->setDescuentoGlobal(number_format($Descuento,2));//DescuentoGlobal\n\t\t\t$this->setMontoPercepcion(number_format(0.00,2));//MontoPercepcion\n\t\t\t$this->setTipoOperacion(\"01\");//TipoOperacion 01 Venta Interna\n\t\t\t$MontoLetras=num_to_letras($globalTotalVenta,\"PEN\");\n\t\t\t$this->setMontoEnLetras($MontoLetras);//Total Venta Letras\n\t\t\t\n\t\t\t//General XML\t\n\t\t\tswitch ($correlativo[1])\n\t {\n\t \n\t case \"07\":\n\t // $this->ci->invoice->_xmlCreditNote();\n\t break;\n\t case \"08\":\n\t //$this->ci->invoice->_xmlDebitNote();\n\t break;\n\t default: \n\t \t$this->_xml();\n\t \tbreak; \n\t \n\t }\n\t\t\t\t\n\t\t\t\n\t\t\t//FIN GENERA XML\n\t\t\t//Arreglo listo para enviar al firmado del XML\n\t $dato['TotIgv']=$globalIGV;\n\t $dato['TotVenta']=$globalTotalVenta;\n\t $dato['TotGravada']=$globalGrabadas ;\n\t $dato['TotGratuitas']=0.00;\n\t $dato['TotInafectas']=0.00;\n\t $dato['TotExoneradas']=0.00;\n\t $dato['DescuentoGlobal']=0.00;\n\t $dato['Moneda']='PEN'; \n\t $dato['tipo_documento']=trim($correlativo[1]); \n\t $dato['fecharegistro']=$date->format('Y-m-d');\n\n\t\t\t$arrayFirmado=array('NomDocXML'=>$this->getId(),\n\t\t\t\t'TipoDocumento'=>$this->InvoiceTypeCode,\n\t\t\t\t'RUCEmisor'=>$array['Encabezado']['Emisor']['RUCEmisor']);\n\t\t\t\n\t\t\t$firmado= new Firmado();\t\t\t\n\t\t\t\n\t\t\t//Firma XML - Devuelve Nombre de XML\n\t\t\t$result=$firmado->Firmar_xml($arrayFirmado); //Validar luego\t\t\t\n\t\t\t\n\t\t\t//Comprime XML .zip\t\n\t\t\t$zip = new ZipArchive();\n\n\t\t\t$nombreZip=substr($result, 0,-4).'.zip';\n\t\t\t$filename = './XMLENVIAR/'.$nombreZip;\t\t\t\n \n\t\t\tif($zip->open($filename,ZIPARCHIVE::CREATE)===true) {\n\t\t\t $zip->addFile('./XMLFIRMADOS/'.$result,$result);\t\t\t \n\t\t\t $zip->close();\n\t\t\t // echo 'Creado '.$filename;\n\t\t\t}\n\t\t\telse {\n\t\t\t //echo 'Error creando '.$filename;\n\t\t\t}\t\t\t\t\t\t\n\t\t\n\t\t\t@$cargaZip='./XMLENVIAR/'.$nombreZip;\n\t\t\t$zipEnviar=(file_get_contents($cargaZip));\n\n\t\t\t//Nombre para el archivo PDF ***** mejorar\n\t\t\t$nombre_archivo = utf8_decode($array['Encabezado']['Emisor']['RUCEmisor'].'-'.$date->format('Y-m-d').'-'.$corre);\n\t\t\t$this->generapdfinvoice($array,$corre,$dato,$items,$MontoLetras,$nombre_archivo,$firmado->firma,$xaFila[3]); //Genera PDF\n\t\t\t$Respuesta=$this->enviar_sunat($zipEnviar,$nombreZip,$nombre_archivo);\t\n\n\t\t\t\n\t\t\t$res=json_decode($Respuesta,TRUE);\n\t\t\techo $Respuesta; //Muestra Respuesta\n\t\t\t\n\t\t\tif($res['errors']==\"0\"):\t\t\t\t\t\n\t\t\t\t//if($res['success']['codRespuesta'][0]==0):\n\t\t\t\t\t//Aquí trabajar para guardar en BD\n\t\t\t\t\t$codigoRespuesta=$res['success']['codRespuesta'][0];\n\t\t\t\t\t$msgRespuesta=$res['success']['Description'][0];\n\t\t\t\t\t\n\t \t//Actualiza estado de envío de alquiler a SUNAT / Esto para cuando se agreguen nuevos productos solo se envíen los NO FACTURADOS\n\t \t\t $sqlactualiza = $link->query(\"UPDATE al_venta_detalle SET procesado=1 where idalquilerdetalle = '$tmpFila[0]'\");\n\t \t //Actualiza estado de envío de producto a SUNAT / Esto para cuando se agreguen nuevos productos solo se envíen los NO FACTURADOS\n\t \t$sqlDetalleVenta = $link->query(\"UPDATE ventadetalle SET procesado=1 where idventadetalle='$vFila[2]'\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t//endif;\t\n\t\t\telse:\n\t\t\t\t\t$codigoRespuesta=$res['errors']['getCode'];\n\t\t\t\t\t$msgRespuesta=$res['errors']['getMessage'];\t\t\n\t\t\tendif;\n\t\t\t\n\t\t\t\n\t\t\t$this->ActualizaCorrelativo($correlativo);\n\t\t\t$mensajeSunat=str_replace(\"'\",\"\",$msgRespuesta);\n\t\t\tif(trim($codigoRespuesta)=='WSDL'): $codigoRespuesta=-1; endif;\n\t\t\t$this->ActualizaVenta($correlativo,$codigoRespuesta,$mensajeSunat,$nombreZip,$nombre_archivo,$corre);\n\t\t\t\n\t\t\t\n\t\t}", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "abdf22082dde7a0829bba305916a71ea", "score": "0.0", "text": "public function store(Request $request)\n {\n $request->validate([\n 'title' => 'required',\n 'description' => 'required',\n 'start_date' => 'required|date',\n 'due_date' => 'required|date|after:start_date',\n 'assignees' => 'required|exists:users,id'\n ]);\n\n $task = Auth::user()->createTask($request->only([\n 'title', \n 'description', \n 'start_date', \n 'due_date'\n ]))->for($request->assignees);\n\n if ($request->has('attachments')) {\n foreach ($request->file('attachments') as $file) {\n $task->attachments()->save(Attachment::fromFile($file));\n }\n }\n \n return $task->load('assignees', 'attachments');\n }", "title": "" } ]
[ { "docid": "efa639da1b8f6cd79b8705d95edb8349", "score": "0.68727493", "text": "public function store(Request $request, storage $model)\n {\n \n Storage::create($request->all());\n\n return redirect()->route('storage.index')->withStatus(__('storage successfully created.'));\n }", "title": "" }, { "docid": "7f1b50bd5f058d4a055b1fd3805dc442", "score": "0.6826213", "text": "public function store(ResourceCreateRequest $request) {\n\n $resource = new Resource([\n 'title' => $request->title,\n 'slug' => $this->toSlug($request->title).'_'.uniqid(),\n 'review' => $request->review,\n 'category_id' => $request->category_id\n ]);\n\n Auth::user()->resources()->save($resource);\n return response()->json($resource);\n }", "title": "" }, { "docid": "39c00340e6c87bd36e30c00a6ef8a08c", "score": "0.64319444", "text": "public function store()\n\t{\n\t\t$rules = array(\n\t\t\t'name' \t=> \t'required',\n\t\t\t'route' =>\t'unique:resources,route',\n\t\t\t);\n\t\t$validator = Validator::make(Input::all(), $rules);\n\n\t\tif ($validator -> fails()) {\n\t\t\treturn Redirect::to('resource')\n\t\t\t\t->withErrors($validator)\n\t\t\t\t->withInput(Input::all());\n\t\t}\n\t\telse{\n\t\t\t$resource = new Resource;\n\t\t\t$resource->name \t= \tInput::get('name');\n\t\t\t$resource->route \t= \tInput::get('route');\n\t\t\t$resource->save();\n\n\t\t\tSession::flash('message', 'Successfully added');\n\t\t\treturn Redirect::to('resource');\n\n\t\t\t\n\n\t\t}\n\t}", "title": "" }, { "docid": "701667213f0c046b2658bd8d8db97d9d", "score": "0.63883317", "text": "public function store(StorageRequest $request)\n {\n $storage = new Storage;\n $storage->name = $request->name;\n $storage->company_id = $request->user()->id;\n $storage->save();\n\n return redirect()->to('/storage/'.$request->name);\n }", "title": "" }, { "docid": "c3f5dd47f337ee79762d2af65e90ef1b", "score": "0.6368418", "text": "public function store(Request $request)\n {\n //\n $this->authorize('create', Resource::class);\n $input=$request->all();\n $resource= Resource::create($input);\n return redirect('/resource/'.$resource->id);\n }", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "f9a45db12ffc582d34c4975c5c6686e9", "score": "0.6347347", "text": "public function store()\n\n\t{\n\n\t\t//\n\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
9563d94b27a7b94467b47be72067e9bc
Creates the generate action giving the dictionary in addition to the response helper.
[ { "docid": "365c7e878cac5e26abf513c93158da05", "score": "0.0", "text": "public function create(Injector $injector, array $options, string $class) : Generate\n {\n /* @var StreamFactoryInterface $factory */\n $factory = $injector->get(StreamFactoryInterface::class);\n return new Generate(\n $injector->get(HelperInterface::class),\n $factory->createStreamFromFile(\\dirname(__DIR__, 2) . '/data/dictionary.dic')\n );\n }", "title": "" } ]
[ { "docid": "5736003e4b04d796ace9e695a6906636", "score": "0.64426976", "text": "public function genAction()\n {\n $res = $this->response;\n $echo = (bool)$this->request->getQuery('echo', 0);\n\n $sTime = date('Y-m-d H:i:s');\n $swagger = $this->scanAndGenerate();\n $eTime = date('Y-m-d H:i:s');\n\n // Setting a header\n $res->setHeader('Content-Type', 'application/json');\n\n if ($echo) {\n $res->setContent($swagger);\n } else {\n $writeLen = file_put_contents($this->docPath, $swagger);\n\n $res->setJsonContent([\n 'start' => $sTime,\n 'done' => $eTime,\n 'writeLen' => $writeLen,\n ]);\n }\n\n return $res;\n }", "title": "" }, { "docid": "5fab3b1bb8482d79563af08da472e6d9", "score": "0.61104405", "text": "public function createAction() {\n \n }", "title": "" }, { "docid": "3f5f8192eb2923e0b0bed53bfcc2f2ca", "score": "0.6077834", "text": "public function generate()\n\t{\n\t\t$this->rep = new stdClass();\n\t\t$rep = &$this->rep;\n\t\t$rep->username\t= $this->BackendUser->username;\n\t\t$rep->isadmin\t= $this->BackendUser->isAdmin;\n\t\t$this->strTemplate = $this->actions[0][1];\n\t\t$this->compiler\t= $this->actions[0][2];\n\t\tforeach ($this->actions as &$act) {\n\t\t\tif ($act[0]!='') {\n\t\t\t\t$this->parameter = Input::get($act[0]);\n\t\t\t\tif ($this->parameter!='') {\n\t\t\t\t\t$this->action = $act[0];\n\t\t\t\t\t$this->strTemplate = $act[1];\n\t\t\t\t\t$this->compiler = $act[2];\n\t\t\t\t\tbreak;\n\t\t\t\t} // if\n\t\t\t} // if\n\t\t} // foreach\n\t\treturn str_replace(array('{{', '}}'), array('[{]', '[}]'), parent::generate());\n\t}", "title": "" }, { "docid": "60ab3dd2dd262de6c0b3c2c22f58c933", "score": "0.5928117", "text": "public function createAction()\n {\n }", "title": "" }, { "docid": "5066ddcc52b8c56475d919048ae9d77e", "score": "0.5912461", "text": "public function generateAction()\n {\n \n if ($this->getRequest()->isPost()) {\n $params = $this->getRequest()->getPost();\n $json = $params['data'];\n }\n \n $postParams = json_decode($json, true);\n if(empty($postParams)){\n return $this->jsonResponse(array('success' => 0, 'message' => 'Json has not been properly decoded'));\n }\n \n try {\n $mergeDefaultParamsWithModeleted = array_merge($this->getServiceLocator()->get('config')['VisioCrudModeler']['params'] , $postParams['params']);\n $params = Params::factory($this->getRequest(), $mergeDefaultParamsWithModeleted);\n $params->setParam('config', new Config($this->getServiceLocator()->get('config')['VisioCrudModeler']));\n $params->setParam('modeler' , $postParams);\n\n $generatorStrategy = new WebGenerator($params);\n $generatorStrategy->setServiceLocator($this->getServiceLocator());\n $generatorStrategy->generate();\n \n return $this->jsonResponse(array('success' => 1, 'message' => 'Structure has been generated'));\n \n } catch (\\Exception $e) {\n return $this->jsonResponse(array('success' => 0, 'message' => $e->getMessage()));\n }\n }", "title": "" }, { "docid": "15a1fe36cab8a523fd755d8a8e83f593", "score": "0.59092563", "text": "public function generateDynamicResponse(SFController\\Controller $Controller);", "title": "" }, { "docid": "c303df082b9bd1b9ec23d71a914aca74", "score": "0.5874298", "text": "final protected function generate()\n\t{\n\t\tforeach ($this->generables as $key => $value) {\n\t\t\tif (!$this->request->has($value)) {\n\n\t\t\t\t$this->runGenerableMethod($value);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "1bc9a206671b393f65f05ef1bcae6b2a", "score": "0.5869416", "text": "function generateActions()\n {\n return array();\n }", "title": "" }, { "docid": "479008bee7496bad667f815d78588a8b", "score": "0.58648044", "text": "public function createAction() {\n\n }", "title": "" }, { "docid": "3e4091a1d48b1f45c7e171cd4ee89b10", "score": "0.5863621", "text": "public function createAction()\n {\n //...\n }", "title": "" }, { "docid": "f671ff02e808fc2824f6ffcf0d584cf6", "score": "0.5845415", "text": "protected static function generateActionMap() {\n $map = [];\n foreach (static::getPHPFiles(getenv('APP_DIR') . '/actions') as $file) {\n $map[static::getActionByFile($file)] = $file;\n }\n App::writeJSON(config('common.action_map_file'), $map);\n }", "title": "" }, { "docid": "05184ed4a4f72eeaaeefbf6ddb069b54", "score": "0.5702757", "text": "public function assemble()\n {\n // based on parameters passed. This allows the user to write\n // generators in JSON only if needed. JSON is parsed sequentially\n // and each key will call a public method on generate.\n }", "title": "" }, { "docid": "5c26561f42800892e70bcffa88171d94", "score": "0.568193", "text": "public function generate(ActionSchema $action) {\n\t\treturn $this->doGenerate($action, 'html');\n\t}", "title": "" }, { "docid": "32e0c430ce6b9a745d97ba795f0b29d7", "score": "0.55440164", "text": "public function createActionRecord() {\n\t\tif(!empty($this->contactId)) {\n $this->createAssociatedAction ('contacts', $this->contactId);\n\t\t}\n\t\tif(!empty($this->accountName)) {\n $this->createAssociatedAction ('accounts', $this->accountId);\n\t\t}\n\t}", "title": "" }, { "docid": "6b7d150f853cf1278fceec1db0dc3316", "score": "0.55437243", "text": "function generate()\n {\n global $ingo_storage;\n\n $filters = $ingo_storage->retrieve(Ingo_Storage::ACTION_FILTERS);\n foreach ($filters->getFilterList() as $filter) {\n /* Check to make sure this is a valid rule and that the rule\n is not disabled. */\n if (!$this->_validRule($filter['action']) ||\n !empty($filter['disable'])) {\n continue;\n }\n\n $action = array();\n switch ($filter['action']) {\n case Ingo_Storage::ACTION_KEEP:\n if (!empty($filter['flags'])) {\n $action[] = new Sieve_Action_Addflag(array('flags' => $filter['flags']));\n }\n\n $action[] = new Sieve_Action_Keep();\n\n if (!empty($filter['flags'])) {\n $action[] = new Sieve_Action_RemoveFlag(array('flags' => $filter['flags']));\n }\n break;\n\n case Ingo_Storage::ACTION_DISCARD:\n $action[] = new Sieve_Action_Discard();\n break;\n\n case Ingo_Storage::ACTION_MOVE:\n if (!empty($filter['flags'])) {\n $action[] = new Sieve_Action_Addflag(array('flags' => $filter['flags']));\n }\n\n $action[] = new Sieve_Action_Fileinto(array_merge($this->_params, array('folder' => $filter['action-value'])));\n\n if (!empty($filter['flags'])) {\n $action[] = new Sieve_Action_RemoveFlag(array('flags' => $filter['flags']));\n }\n break;\n\n case Ingo_Storage::ACTION_REJECT:\n $action[] = new Sieve_Action_Reject(array('reason' => $filter['action-value']));\n break;\n\n case Ingo_Storage::ACTION_REDIRECT:\n $action[] = new Sieve_Action_Redirect(array('address' => $filter['action-value']));\n break;\n\n case Ingo_Storage::ACTION_REDIRECTKEEP:\n if (!empty($filter['flags'])) {\n $action[] = new Sieve_Action_Addflag(array('flags' => $filter['flags']));\n }\n\n $action[] = new Sieve_Action_Redirect(array('address' => $filter['action-value']));\n $action[] = new Sieve_Action_Keep();\n\n if (!empty($filter['flags'])) {\n $action[] = new Sieve_Action_RemoveFlag(array('flags' => $filter['flags']));\n }\n break;\n\n case Ingo_Storage::ACTION_MOVEKEEP:\n if (!empty($filter['flags'])) {\n $action[] = new Sieve_Action_Addflag(array('flags' => $filter['flags']));\n }\n\n $action[] = new Sieve_Action_Keep();\n $action[] = new Sieve_Action_Fileinto(array_merge($this->_params, array('folder' => $filter['action-value'])));\n\n if (!empty($filter['flags'])) {\n $action[] = new Sieve_Action_RemoveFlag(array('flags' => $filter['flags']));\n }\n break;\n\n case Ingo_Storage::ACTION_FLAGONLY:\n if (!empty($filter['flags'])) {\n $action[] = new Sieve_Action_Addflag(array('flags' => $filter['flags']));\n }\n break;\n\n case Ingo_Storage::ACTION_NOTIFY:\n $action[] = new Sieve_Action_Notify(array('address' => $filter['action-value'], 'name' => $filter['name']));\n break;\n\n case Ingo_Storage::ACTION_WHITELIST:\n $this->_addWhitelistBlocks();\n continue 2;\n\n case Ingo_Storage::ACTION_BLACKLIST:\n $this->_addBlacklistBlocks();\n continue 2;\n\n case Ingo_Storage::ACTION_VACATION:\n $this->_addVacationBlocks();\n continue 2;\n\n case Ingo_Storage::ACTION_FORWARD:\n $this->_addForwardBlocks();\n continue 2;\n\n case Ingo_Storage::ACTION_SPAM:\n $this->_addSpamBlocks();\n continue 2;\n }\n\n $this->_blocks[] = new Sieve_Comment($this->encode($filter['name']));\n\n if ($filter['stop']) {\n $action[] = new Sieve_Action_Stop();\n }\n\n $test = new Sieve_Test();\n if ($filter['combine'] == Ingo_Storage::COMBINE_ANY) {\n $test = new Sieve_Test_Anyof();\n } else {\n $test = new Sieve_Test_Allof();\n }\n\n foreach ($filter['conditions'] as $condition) {\n $tmp = '';\n switch ($condition['match']) {\n case 'equal':\n $tmp = new Sieve_Test_Relational(array('comparison' => 'eq', 'headers' => $condition['field'], 'value' => $condition['value']));\n $test->addTest($tmp);\n break;\n\n case 'not equal':\n $tmp = new Sieve_Test_Relational(array('comparison' => 'ne', 'headers' => $condition['field'], 'value' => $condition['value']));\n $test->addTest($tmp);\n break;\n\n case 'less than':\n if ($condition['field'] == 'Size') {\n /* Message Size Test. */\n $tmp = new Sieve_Test_Size(array('comparison' => ':under', 'size' => $condition['value']));\n } else {\n /* Relational Test. */\n $tmp = new Sieve_Test_Relational(array('comparison' => 'lt', 'headers' => $condition['field'], 'value' => $condition['value']));\n }\n $test->addTest($tmp);\n break;\n\n case 'less than or equal to':\n $tmp = new Sieve_Test_Relational(array('comparison' => 'le', 'headers' => $condition['field'], 'value' => $condition['value']));\n $test->addTest($tmp);\n break;\n\n case 'greater than':\n if ($condition['field'] == 'Size') {\n /* Message Size Test. */\n $tmp = new Sieve_Test_Size(array('comparison' => ':over', 'size' => $condition['value']));\n } else {\n /* Relational Test. */\n $tmp = new Sieve_Test_Relational(array('comparison' => 'gt', 'headers' => $condition['field'], 'value' => $condition['value']));\n }\n $test->addTest($tmp);\n break;\n\n case 'greater than or equal to':\n $tmp = new Sieve_Test_Relational(array('comparison' => 'ge', 'headers' => $condition['field'], 'value' => $condition['value']));\n $test->addTest($tmp);\n break;\n\n case 'exists':\n $tmp = new Sieve_Test_Exists(array('headers' => $condition['field']));\n $test->addTest($tmp);\n break;\n\n case 'not exist':\n $tmp = new Sieve_Test_Exists(array('headers' => $condition['field']));\n $test->addTest(new Sieve_Test_Not($tmp));\n break;\n\n case 'contains':\n case 'not contain':\n case 'is':\n case 'not is':\n case 'begins with':\n case 'not begins with':\n case 'ends with':\n case 'not ends with':\n case 'regex':\n case 'matches':\n case 'not matches':\n $comparator = (isset($condition['case']) &&\n $condition['case'])\n ? 'i;octet'\n : 'i;ascii-casemap';\n $vals = array('headers' => preg_replace('/(.)(?<!\\\\\\)\\,(.)/',\n \"$1\\n$2\",\n $condition['field']),\n 'comparator' => $comparator);\n $use_address_test = false;\n\n if ($condition['match'] != 'regex') {\n $condition['value'] = preg_replace('/(.)(?<!\\\\\\)\\,(.)/',\n \"$1\\n$2\",\n $condition['value']);\n }\n\n /* Do 'smarter' searching for fields where we know we have\n * e-mail addresses. */\n if (preg_match('/^(From|To|Cc|Bcc)/', $condition['field'])) {\n $vals['addresses'] = $condition['value'];\n $use_address_test = true;\n } else {\n $vals['strings'] = $condition['value'];\n }\n\n switch ($condition['match']) {\n case 'contains':\n $vals['match-type'] = ':contains';\n if ($use_address_test) {\n $tmp = new Sieve_Test_Address($vals);\n } elseif ($condition['field'] == 'Body') {\n $tmp = new Sieve_Test_Body($vals);\n } else {\n $tmp = new Sieve_Test_Header($vals);\n }\n $test->addTest($tmp);\n break;\n\n case 'not contain':\n $vals['match-type'] = ':contains';\n if ($use_address_test) {\n $tmp = new Sieve_Test_Address($vals);\n } elseif ($condition['field'] == 'Body') {\n $tmp = new Sieve_Test_Body($vals);\n } else {\n $tmp = new Sieve_Test_Header($vals);\n }\n $test->addTest(new Sieve_Test_Not($tmp));\n break;\n\n case 'is':\n $vals['match-type'] = ':is';\n if ($use_address_test) {\n $tmp = new Sieve_Test_Address($vals);\n } elseif ($condition['field'] == 'Body') {\n $tmp = new Sieve_Test_Body($vals);\n } else {\n $tmp = new Sieve_Test_Header($vals);\n }\n $test->addTest($tmp);\n break;\n\n case 'not is':\n $vals['match-type'] = ':is';\n if ($use_address_test) {\n $tmp = new Sieve_Test_Address($vals);\n } elseif ($condition['field'] == 'Body') {\n $tmp = new Sieve_Test_Body($vals);\n } else {\n $tmp = new Sieve_Test_Header($vals);\n }\n $test->addTest(new Sieve_Test_Not($tmp));\n break;\n\n case 'begins with':\n $vals['match-type'] = ':matches';\n if ($use_address_test) {\n $add_arr = preg_split('(\\r\\n|\\n|\\r)', $vals['addresses']);\n if (count($add_arr) > 1) {\n foreach ($add_arr as $k => $v) {\n $add_arr[$k] = $v . '*';\n }\n $vals['addresses'] = implode(\"\\r\\n\", $add_arr);\n } else {\n $vals['addresses'] .= '*';\n }\n $tmp = new Sieve_Test_Address($vals);\n } else {\n $add_arr = preg_split('(\\r\\n|\\n|\\r)', $vals['strings']);\n if (count($add_arr) > 1) {\n foreach ($add_arr as $k => $v) {\n $add_arr[$k] = $v . '*';\n }\n $vals['strings'] = implode(\"\\r\\n\", $add_arr);\n } else {\n $vals['strings'] .= '*';\n }\n if ($condition['field'] == 'Body') {\n $tmp = new Sieve_Test_Body($vals);\n } else {\n $tmp = new Sieve_Test_Header($vals);\n }\n }\n $test->addTest($tmp);\n break;\n\n case 'not begins with':\n $vals['match-type'] = ':matches';\n if ($use_address_test) {\n $add_arr = preg_split('(\\r\\n|\\n|\\r)', $vals['addresses']);\n if (count($add_arr) > 1) {\n foreach ($add_arr as $k => $v) {\n $add_arr[$k] = $v . '*';\n }\n $vals['addresses'] = implode(\"\\r\\n\", $add_arr);\n } else {\n $vals['addresses'] .= '*';\n }\n $tmp = new Sieve_Test_Address($vals);\n } else {\n $add_arr = preg_split('(\\r\\n|\\n|\\r)', $vals['strings']);\n if (count($add_arr) > 1) {\n foreach ($add_arr as $k => $v) {\n $add_arr[$k] = $v . '*';\n }\n $vals['strings'] = implode(\"\\r\\n\", $add_arr);\n } else {\n $vals['strings'] .= '*';\n }\n if ($condition['field'] == 'Body') {\n $tmp = new Sieve_Test_Body($vals);\n } else {\n $tmp = new Sieve_Test_Header($vals);\n }\n }\n $test->addTest(new Sieve_Test_Not($tmp));\n break;\n\n case 'ends with':\n $vals['match-type'] = ':matches';\n if ($use_address_test) {\n $add_arr = preg_split('(\\r\\n|\\n|\\r)', $vals['addresses']);\n if (count($add_arr) > 1) {\n foreach ($add_arr as $k => $v) {\n $add_arr[$k] = '*' . $v;\n }\n $vals['addresses'] = implode(\"\\r\\n\", $add_arr);\n } else {\n $vals['addresses'] = '*' . $vals['addresses'];\n }\n $tmp = new Sieve_Test_Address($vals);\n } else {\n $add_arr = preg_split('(\\r\\n|\\n|\\r)', $vals['strings']);\n if (count($add_arr) > 1) {\n foreach ($add_arr as $k => $v) {\n $add_arr[$k] = '*' . $v;\n }\n $vals['strings'] = implode(\"\\r\\n\", $add_arr);\n } else {\n $vals['strings'] = '*' . $vals['strings'];\n }\n if ($condition['field'] == 'Body') {\n $tmp = new Sieve_Test_Body($vals);\n } else {\n $tmp = new Sieve_Test_Header($vals);\n }\n }\n $test->addTest($tmp);\n break;\n\n case 'not ends with':\n $vals['match-type'] = ':matches';\n if ($use_address_test) {\n $add_arr = preg_split('(\\r\\n|\\n|\\r)', $vals['addresses']);\n if (count($add_arr) > 1) {\n foreach ($add_arr as $k => $v) {\n $add_arr[$k] = '*' . $v;\n }\n $vals['addresses'] = implode(\"\\r\\n\", $add_arr);\n } else {\n $vals['addresses'] = '*' . $vals['addresses'];\n }\n $tmp = new Sieve_Test_Address($vals);\n } else {\n $add_arr = preg_split('(\\r\\n|\\n|\\r)', $vals['strings']);\n if (count($add_arr) > 1) {\n foreach ($add_arr as $k => $v) {\n $add_arr[$k] = '*' . $v;\n }\n $vals['strings'] = implode(\"\\r\\n\", $add_arr);\n } else {\n $vals['strings'] = '*' . $vals['strings'];\n }\n if ($condition['field'] == 'Body') {\n $tmp = new Sieve_Test_Body($vals);\n } else {\n $tmp = new Sieve_Test_Header($vals);\n }\n }\n $test->addTest(new Sieve_Test_Not($tmp));\n break;\n\n case 'regex':\n $vals['match-type'] = ':regex';\n if ($use_address_test) {\n $tmp = new Sieve_Test_Address($vals);\n } elseif ($condition['field'] == 'Body') {\n $tmp = new Sieve_Test_Body($vals);\n } else {\n $tmp = new Sieve_Test_Header($vals);\n }\n $test->addTest($tmp);\n break;\n\n case 'matches':\n $vals['match-type'] = ':matches';\n if ($use_address_test) {\n $tmp = new Sieve_Test_Address($vals);\n } elseif ($condition['field'] == 'Body') {\n $tmp = new Sieve_Test_Body($vals);\n } else {\n $tmp = new Sieve_Test_Header($vals);\n }\n $test->addTest($tmp);\n break;\n\n case 'not matches':\n $vals['match-type'] = ':matches';\n if ($use_address_test) {\n $tmp = new Sieve_Test_Address($vals);\n } elseif ($condition['field'] == 'Body') {\n $tmp = new Sieve_Test_Body($vals);\n } else {\n $tmp = new Sieve_Test_Header($vals);\n }\n $test->addTest(new Sieve_Test_Not($tmp));\n break;\n }\n }\n }\n\n $if = new Sieve_If($test);\n $if->setActions($action);\n $this->_blocks[] = $if;\n }\n\n /* Add blocks that have to go to the end. */\n foreach ($this->_endBlocks as $block) {\n $this->_blocks[] = $block;\n }\n\n return $this->toCode();\n }", "title": "" }, { "docid": "8dcef520cd5fe2609c15c52be607cc82", "score": "0.55020756", "text": "public function actionGenerate() {\n\t\tif (!empty($_POST)) {\n\t\t\t$roles = $tasks = $operations = 0; // how many new items are generated\n\t\t\t$suffix = (!empty($_POST['suffix'])?\"!{$_POST['suffix']}\":'');\n\t\t\t\n\t\t\tforeach ($_POST['items'] as $index=>$item) {\n\t\t\t\t$item = str_replace(self::SPACE_IN_ID,' ',$item).$suffix;\n\t\t\t\t$type = $_POST['types'][$index];\n\n\t\t\t\tswitch ($type) {\n\t\t\t\t\tcase 'action':\n\t\t\t\t\t\t$operation = $this->authManager->getAuthItem($item);\n\t\t\t\t\t\tif (empty($operation)) {\n\t\t\t\t\t\t\t$operation = $this->authManager->createOperation($item);\n\t\t\t\t\t\t\t$operations++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (!$task->hasChild($item))\n\t\t\t\t\t\t\t\t$task->addChild($item);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'controller':\n\t\t\t\t\t\t$task = $this->authManager->getAuthItem($item);\n\t\t\t\t\t\tif (empty($task)) {\n\t\t\t\t\t\t\t$task = $this->authManager->createTask($item);\n\t\t\t\t\t\t\t$tasks++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!$role->hasChild($item))\n\t\t\t\t\t\t\t$role->addChild($item);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'module':\n\t\t\t\t\t\t$role = $this->authManager->getAuthItem($item);\n\t\t\t\t\t\tif (empty($role)) {\n\t\t\t\t\t\t\t$role = $this->authManager->createRole($item);\n\t\t\t\t\t\t\t$roles++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$pos = strpos($item,':');\n\t\t\t\t\t\tif ($pos===false)\n\t\t\t\t\t\t\t$parent = $root;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$parent = $this->authManager->getAuthItem(substr($item,0,$pos).$suffix);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!$parent->hasChild($item))\n\t\t\t\t\t\t\t$parent->addChild($item);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'root':\n\t\t\t\t\t\t$role = $this->authManager->getAuthItem($item);\n\t\t\t\t\t\tif (empty($role)) {\n\t\t\t\t\t\t\t$role = $this->authManager->createRole($item);\n\t\t\t\t\t\t\t$roles++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$root = $role;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->authManager->save(); // for CPhpAuthManager\n\t\t\t\n\t\t\t$response = array();\n\t\t\tif ($roles===0 && $tasks===0 && $operations===0) {\n\t\t\t\t$response['status'] = 0;\n\t\t\t\t$response['content'] = Yii::t('RbamModule.rbam','No new authorisation data generated.');\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$response['status'] = 1;\n\t\t\t\t$response['content'] = Yii::t('RbamModule.rbam','Generated {roles} roles, {tasks} tasks, and {operations} operations.', array(\n\t\t\t\t\t'{roles}'=>$roles,\n\t\t\t\t\t'{tasks}'=>$tasks,\n\t\t\t\t\t'{operations}'=>$operations\n\t\t\t\t));\n\t\t\t}\n\t\t\theader('Content-type: application/json');\n\t\t\techo CJSON::encode($response);\n\t \tYii::app()->end();\n\t\t}\n\t\t\n\t\t$analyser = $this->getModule()->getComponent('analyser');\n\t\t$root = $analyser->run();\n\t\t\n\t\t$data = array();\n\t\t$data[] = array(\n\t\t\t'data'=>$root->id,\n\t\t\t'attr'=>array('id'=>$this->toHtmlId($root->id),'rel'=>'root'),\n\t\t\t'children'=>array(\n\t\t\t\t(isset($root->controllers)?\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'data'=>'Controllers',\n\t\t\t\t\t\t'children'=>$this->_toTreeData($root->controllers, 'Controller')\n\t\t\t\t\t):array()),\n\t\t\t\t(isset($root->modules)?\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'data'=>'Modules',\n\t\t\t\t\t\t'children'=>$this->_toTreeData($root->modules, 'Module')\n\t\t\t\t\t):array())\n\t\t\t)\n\t\t);\n\t\t\n\t\t$authItems = $this->_getAuthItems();\n\t\t$this->pageTitle = $this->_pageTitle($this->action->id);\n\t\t$this->breadcrumbs = array(\n\t\t\t'RBAM'=>array('rbam/index'),\n\t\t\t$this->pageTitle\n\t\t);\n\t\t$this->render($this->action->id, compact('data', 'authItems'));\n\t}", "title": "" }, { "docid": "78956104106120b2ede4e355cc9894f9", "score": "0.54947877", "text": "public function createResponse();", "title": "" }, { "docid": "94f5140445fceb454dc247771f21f1c5", "score": "0.54923964", "text": "public function generateResponse(){\n\n switch ($this->requestMethod) {\n\n case 'GET':\n if(isset($this->userId)){\n\n $response = $this->getCreatorsById($this->userId);\n\n }else{\n\n $response = $this->getAllCreators();\n \n } \n \n break;\n\n case 'POST':\n\n $response = $this->createNewUser();\n \n break;\n \n case 'PUT':\n\n if($this->userAction === \"update_creator_info\"){\n $response = $this->updateUser($this->userId);\n }else if (($this->userAction === \"change_password\")){\n $response = self::updateUserPassword($this->userId);\n }else{\n $response = $this->notFoundResponse();\n }\n \n break;\n\n case 'DELETE':\n if($this->userAction == \"delete_creator_info\"){\n $response = self::deleteUser($this->userId);\n } \n \n break;\n \n default:\n $response = $this->invalidRoute();\n break;\n }\n \n echo $response['body'];\n\n }", "title": "" }, { "docid": "d7deb68739255fe96deab4252ab1759c", "score": "0.54554063", "text": "public function initializeCreateAction() {}", "title": "" }, { "docid": "4475e1a08d81103aaac48ad923c4163f", "score": "0.54519176", "text": "public function generate()\n {\n// $templateName = $this->commandData->getOption('repositoryPattern') ? 'controller' : 'model_api_controller';\n $templateName = 'model_api_controller';\n $templateData = get_template(\"api.controller.$templateName\", 'app-generator');\n\n// $paginate = $this->commandData->getOption('paginate');\n//\n// if ($paginate) {\n// $templateData = str_replace('$RENDER_TYPE$', 'paginate(' . $paginate . ')', $templateData);\n// } else {\n// $templateData = str_replace('$RENDER_TYPE$', 'all()', $templateData);\n// }\n\n $templateData = fill_template($this->commandData->dynamicVars, $templateData);\n $templateData = $this->fillDocs($templateData);\n\n FileUtil::createFile($this->path, $this->fileName, $templateData);\n\n $this->commandData->commandObj->line(\"- Controller created: <info>{$this->fileName}</info>\");\n }", "title": "" }, { "docid": "c8a5fad9de1a180f25290d33577da85a", "score": "0.545069", "text": "public function renderAction() {}", "title": "" }, { "docid": "c2aab8eeb4aa96c1ded091a345f9142b", "score": "0.5449983", "text": "public function createAction()\n {\n $this->config['newType'] = new TagType();\n $response = parent::createAction();\n\n return $response;\n }", "title": "" }, { "docid": "c783d121bccd9fe59a1c21461a61519c", "score": "0.541129", "text": "public function generate() {}", "title": "" }, { "docid": "c783d121bccd9fe59a1c21461a61519c", "score": "0.541129", "text": "public function generate() {}", "title": "" }, { "docid": "c783d121bccd9fe59a1c21461a61519c", "score": "0.541129", "text": "public function generate() {}", "title": "" }, { "docid": "c783d121bccd9fe59a1c21461a61519c", "score": "0.541129", "text": "public function generate() {}", "title": "" }, { "docid": "b3e4213cbc089be7b07970ee597139c0", "score": "0.53948003", "text": "public function generate()\n {\n }", "title": "" }, { "docid": "cfbaaa2be08495a956d6c726f5d8c215", "score": "0.53939503", "text": "public function generateResponse(){\n\n switch ($this->requestMethod) {\n\n case 'GET':\n if(isset($this->topicDescriptionId)){\n\n $response = $this->getDescriptionsById($this->topicDescriptionId);\n\n }else{\n\n $response = $this->getAllDescriptions();\n \n } \n \n break;\n\n case 'POST':\n\n $response = $this->createDescription();\n \n break;\n \n case 'PUT':\n\n if($this->userAction === \"update_description\"){\n $response = $this->updateDescription($this->topicDescriptionId);\n }else{\n\n $response = $this->notFoundResponse();\n }\n \n break;\n\n case 'DELETE':\n if(empty($this->userAction)){\n $response = self::incorrectRoute();\n }\n if($this->userAction == \"delete_description_info\"){\n $response = self::deleteDescription($this->topicDescriptionId);\n } \n \n break;\n \n default:\n $response = $this->invalidRoute();\n break;\n }\n \n echo $response['body'];\n\n }", "title": "" }, { "docid": "14d67548a2fc11d3a0527664457349f8", "score": "0.5384403", "text": "public function generatePayloadAction()\n {\n $providedPayload = json_decode($this->getRequest()->getContent(), true);\n\n $payload = $this->generateCompilerPayload($providedPayload);\n if (empty($payload)) {\n return new JsonResponse(['success' => false, 'message' => 'Invalid compilation payload provided.']);\n }\n\n $payload['success'] = true;\n $payload['additionalCode'] = $this->additionalCode;\n $this->additionalCode = [];\n\n return new JsonResponse($payload);\n }", "title": "" }, { "docid": "469263acf4f6cf7ffaacc389bf2b1262", "score": "0.53712016", "text": "public function generate()\n {\n }", "title": "" }, { "docid": "232ece080eb6bc084f5cd6efa7a54ead", "score": "0.5353903", "text": "public function template ($action)\r\n\t{\r\n\t}", "title": "" }, { "docid": "eeaddece0b116569abb1043a5fccf3e2", "score": "0.53524655", "text": "function create(&$dto)\n {\n \tif(!$dto->skeletonTemplateName)\n \t\t$dto->skeletonTemplateName = \"maple.ini\";\n \tif(!isset($dto->inifileName) || !$dto->inifileName)\n \t\t$dto->inifileName = $this->config->getValue('CONFIG_FILE');\n \t\t\n \tif(!isset($dto->Type) || !$dto->Type)\n \t\t$dto->Type = null;\n \t\n \t$pathList = explode(\"_\", $dto->actionName);\n \tif($pathList[1] == \"view\") {\n \t\t$action_type = \"view\";\n \t} else {\n \t\t$action_type = \"action\";\n \t}\n \t\n \tif(isset($pathList[2]) && $pathList[2] == \"edit\") {\n \t\t$second_name = \"edit\";\n \t} elseif(isset($pathList[2]) && $pathList[2] == \"main\") {\n \t\t$second_name = \"main\";\n \t} elseif(isset($pathList[2]) && $pathList[2] == \"admin\") {\n \t\t$second_name = \"admin\";\n \t} else {\n \t\t$second_name = \"\";\n \t}\n \t\n \tif(isset($pathList[3]) && $pathList[3] == \"init\") {\n \t\tif($second_name == \"edit\") {\n \t\t\t$third_name = \"edit\";\n \t\t} else {\n \t\t\t$third_name = \"init\";\n \t\t}\n \t} elseif(isset($pathList[3]) && $pathList[3] == \"style\") {\n \t\t$third_name = \"style\";\n \t} else {\n \t\t$third_name = \"\";\n \t}\n \t\t\n //list ($classname, $filename) = $this->actionChain->makeNames($dto->actionName);\n\n\t\t$filename = $this->config->getValue(\"WEBAPP_MODULE_DIR\");\n\t\tforeach($pathList as $path) {\n\t\t\t$filename .= \"/\".$path;\n\t\t}\n $filename .= \"/\".$dto->inifileName;\n //$filename = dirname(\n // $this->replaceWithConfig('MODULE_DIR', $filename)) . '/' .\n // $this->config->getValue('CONFIG_FILE');\n\n //$template = $this->viewConvention->getTemplate($dto->templateName);\n //$section = $this->viewConvention->getFilterName($dto->templateType);\n if(isset($dto->templateName))\n \t$template = $dto->templateName;\n else\n \t$template = null;\n\n $dir_name = $dto->moduleName;\n \n if(isset($dto->view_actionName))\n \t$view_actionName = $dto->view_actionName;\n else\n \t$view_actionName = \"\";\n\n return $this->output(\n $filename,\n array('dir_name'=> $dir_name,\n \t\t'view_action_name'=> $view_actionName,\n \t\t'action_type'=> $action_type,\n \t\t'type'=> $dto->Type,\n \t\t'second_name'=> $second_name,\n \t\t'third_name'=> $third_name,\n \t\t'moduleType'=> $dto->moduleType,\n\t\t\t\t\t'template'=> $template),\n 'CONFIG_CODE',\n $this->getTemplateFile($dto->skeletonTemplateName));\n }", "title": "" }, { "docid": "a31024937b8e1cd7e3101c44e94e06ee", "score": "0.5335879", "text": "private function createBody($action) {\n switch($action) {\n case 'Service':\n return new CreateServiceBody(\n \"description\", // REQUIRED\n 15, // duration REQUIRED\n \"name\", // REQUIRED\n NULL, // categories\n 15, // max_duration optional but will default to duration\n NULL, // price_model_id\n NULL, // services defaults to self Service\n \"short_name\",\n NULL // user_id defaults to self User\n );\n case 'Resource':\n return new CreateResourceBody(\n \"name\", // REQUIRED\n \"Staff\", // type REQUIRED\n NULL, // capacity\n \"description\",\n NULL, // gender\n NULL, // thing_type_id\n NULL // user_id detauls to self\n );\n }\n }", "title": "" }, { "docid": "02e0a1733df4f39cfdbe31148ec9649d", "score": "0.53139585", "text": "public function create(): Response {\n\t\t//\n\t}", "title": "" }, { "docid": "843bc2f1fe1d5103f7d713f7e93c03b1", "score": "0.53104943", "text": "private function create()\n {\n $creater = new Creater($this->arg);\n $this->response = $creater->response;\n }", "title": "" }, { "docid": "53712abfd8a3a0bb8dfa28c72c55d208", "score": "0.52894217", "text": "public function createDictionaryAction()\n {\n try {\n $this->getResponse()->setHeader('Content-type', 'application/json');\n $control = Mage::getModel('fastlycdn/control');\n\n $activeVersion = $this->getRequest()->getParam('active_version');\n $activateVcl = $this->getRequest()->getParam('activate_flag');\n $dictionaryName = $this->getRequest()->getParam('dictionary_name');\n $service = $control->checkServiceDetails();\n\n if(!$service) {\n $jsonData = Mage::helper('core')->jsonEncode(array('status' => false, 'msg' => 'Failed to check Service details.'));\n return $this->getResponse()->setBody($jsonData);\n }\n\n $currActiveVersion = Mage::helper('fastlycdn')->determineVersions($service->versions);\n\n if($currActiveVersion['active_version'] != $activeVersion) {\n $jsonData = Mage::helper('core')->jsonEncode(array('status' => false, 'msg' => 'Active versions mismatch.'));\n return $this->getResponse()->setBody($jsonData);\n }\n\n $clone = $control->cloneVersion($currActiveVersion['active_version']);\n\n if(!$clone) {\n $jsonData = Mage::helper('core')->jsonEncode(array('status' => false, 'msg' => 'Failed to clone active version.'));\n return $this->getResponse()->setBody($jsonData);\n }\n\n $status = $control->createDictionary($clone->number, $dictionaryName);\n\n if(!$status) {\n $jsonData = Mage::helper('core')->jsonEncode(array('status' => false, 'msg' => 'Failed to create Dictionary.'));\n return $this->getResponse()->setBody($jsonData);\n }\n\n $validate = $control->validateServiceVersion($clone->number);\n\n if($validate->status == 'error') {\n $jsonData = Mage::helper('core')->jsonEncode(array('status' => false, 'msg' => 'Failed to validate service version: '.$validate->msg));\n return $this->getResponse()->setBody($jsonData);\n }\n\n if($activateVcl === 'true') {\n $control->activateVersion($clone->number);\n }\n\n $jsonData = Mage::helper('core')->jsonEncode(\n array(\n 'status' => true,\n 'active_version' => $clone->number,\n 'dictionary_name' => $status->name,\n 'dictionary_id' => $status->id\n ));\n return $this->getResponse()->setBody($jsonData);\n\n } catch (\\Exception $e) {\n $jsonData = Mage::helper('core')->jsonEncode(array('status' => false, 'msg' => $e->getMessage()));\n return $this->getResponse()->setBody($jsonData);\n }\n }", "title": "" }, { "docid": "27f7c33c17daf3ebf154694e2156c5e1", "score": "0.5288507", "text": "public function generate($resource = null, array $params = array());", "title": "" }, { "docid": "9336d4624b8d3275b9692ff0b026e281", "score": "0.52772623", "text": "public function createAction($type,$data) {\n\n}", "title": "" }, { "docid": "b149b5c2c6f68c87c224c2b3659aec29", "score": "0.52686125", "text": "function generate() {\n\t}", "title": "" }, { "docid": "a28c3130b2bbe691833ad019baf053fa", "score": "0.5268175", "text": "public function tagGenerateAction($contact_form, $args = '')\n\t{\n\t\t$args = wp_parse_args( $args, array() );\n\t\t$type = 'gw_action';\n\t\t$description = \"Generate the GatewayAPI Action field. This field instructs GatewayAPI on what to do with the submission.\";\n\t\t?>\n\t\t<div class=\"control-box\">\n\t\t\t<fieldset>\n\t\t\t\t<legend><?=esc_html( __($description, 'gwapi') )?></legend>\n\n\t\t\t\t<table class=\"form-table\">\n\t\t\t\t\t<tbody>\n\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th scope=\"row\"><label for=\"<?php echo esc_attr( $args['content'] . '-action' ); ?>\"><?php _e('Triggered action', 'gwapi'); ?></label></th>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<label><input type=\"radio\" checked name=\"action\" class=\"option\" value=\"signup\" id=\"<?php echo esc_attr( $args['content'] . '-action-signup' ); ?>\"> <?php _e('Signup', 'gwapi'); ?></label>\n\t\t\t\t\t\t\t<p class=\"description\"style=\"margin-top: 0; margin-bottom: 10px\"><?php _e('Sign up a new subscriber. If a recipient with same phone number exists, the signup will fail.', 'gwapi'); ?></p>\n\n\t\t\t\t\t\t\t<label><input type=\"radio\" name=\"action\" class=\"option\" value=\"unsubscribe\"> <?php _e('Unsubscribe', 'gwapi'); ?></label>\n\t\t\t\t\t\t\t<p class=\"description\"style=\"margin-top: 0; margin-bottom: 10px\"><?php _e('Unsubscribe a subscriber, ie. move the recipient to the trash.', 'gwapi'); ?></p>\n\n\t\t\t\t\t\t\t<label><input type=\"radio\" name=\"action\" class=\"option\" value=\"update\"> <?php _e('Update', 'gwapi'); ?></label>\n\t\t\t\t\t\t\t<p class=\"description\" style=\"margin-top: 0;\"><?php _e('Update an existing subscriber, ie. a recipient with the given phone number must already exist.', 'gwapi'); ?></p>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th scope=\"row\">\n\t\t\t\t\t\t\t<label for=\"<?php echo esc_attr( $args['content'] . '-verify' ); ?>\"><?php _e('Require verification', 'gwapi'); ?></label>\n\t\t\t\t\t\t</th>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t<input type=\"radio\" checked name=\"verify\" class=\"option\" id=\"<?php echo esc_attr( $args['content'] . '-verify' ); ?>\" value=\"yes\" />\n\t\t\t\t\t\t\t\t<?php _e('Yes (recommended)', 'gwapi'); ?>\n\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t<input type=\"radio\" name=\"verify\" class=\"option\" id=\"<?php echo esc_attr( $args['content'] . '-verify' ); ?>\" value=\"no\" />\n\t\t\t\t\t\t\t\t<?php _e('No', 'gwapi'); ?>\n\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t<p class=\"description\">\n\t\t\t\t\t\t\t\t<?php _e('An SMS will be sent to confirm the ownership of the number with a one-time verification code.', 'gwapi'); ?><br />\n\t\t\t\t\t\t\t\t<?php _e('When updating, this triggers another flow: The user will have to enter mobile and country code, verify the number and only then will the rest of the form be presented.', 'gwapi'); ?>\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t</fieldset>\n\t\t</div>\n\n\t\t<div class=\"insert-box\">\n\t\t\t<input type=\"text\" name=\"<?php echo $type; ?>\" class=\"tag code\" readonly=\"readonly\" onfocus=\"this.select()\" />\n\n\t\t\t<div class=\"submitbox\">\n\t\t\t\t<input type=\"button\" class=\"button button-primary insert-tag\" value=\"<?php echo esc_attr( __( 'Insert Tag', 'contact-form-7' ) ); ?>\" />\n\t\t\t</div>\n\n\t\t\t<br class=\"clear\" />\n\t\t</div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "f0ea84fbe66444010a75d73216e8b9ee", "score": "0.526532", "text": "abstract protected function generateResponse(array $options, ResponseInterface $response);", "title": "" }, { "docid": "bf82efb7ba25ad76aff79fe6ece6fb89", "score": "0.5262624", "text": "public function generate()\n {\n $templateData = get_template('api.services.service', 'app-generator');\n\n $paginate = $this->commandData->getOption('paginate');\n $renderType = $paginate ? 'paginate(' . $paginate . ')' : 'all()';\n\n $templateData = str_replace('$RENDER_TYPE$', $renderType, $templateData);\n\n $relationships = [];\n $count = 1;\n foreach ($this->commandData->relations as $relation) {\n $relation->commandData = $this->commandData;\n $relationText = $relation->parseRelationFunctionName($relation);\n\n if (in_array($relationText, $relationships)) {\n $relationText .= '_' . $count;\n $count++;\n }\n\n $attributes = $relation->getRelationAttributes($relationText, $this->commandData->modelName);\n\n if (!empty($attributes)) {\n $relationships[] = \"'\" . $attributes['functionName'] . \"'\";\n }\n }\n\n $templateData = str_replace(\n '$RELATIONSHIPS$',\n implode(',' . generate_new_line_tab(1, 2), $relationships),\n $templateData\n );\n\n $templateData = fill_template($this->commandData->dynamicVars, $templateData);\n\n FileUtil::createFile($this->path, $this->fileName, $templateData);\n\n $this->commandData->commandObj->line(\"- Service created: <info>{$this->fileName}</info>\");\n }", "title": "" }, { "docid": "f292d22caef0e8360a5a754d5ee0207d", "score": "0.5252051", "text": "private function generateSkeleton($actionName) {\n\t\t$this->logger->info('Generate Skeleton Action: ' . $actionName);\n\t\t$input = $this->io->getInput();\n\n\t\t// generate action\n\t\t$action = $this->getAction($actionName);\n\n\t\t// title\n\t\tif (($title = $input->getOption('title')) !== null) {\n\t\t\t$action->setTitle($title);\n\t\t}\n\n\t\tif (Text::create($action->getTitle())->isEmpty()) {\n\t\t\tthrow new \\RuntimeException(sprintf('Cannot create action %s, because I am missing a title for it', $actionName));\n\t\t}\n\n\t\t// classname\n\t\tif (($classname = $input->getOption('classname')) !== null) {\n\t\t\t$action->setClass($classname);\n\t\t}\n\n\t\tif (Text::create($action->getClass())->isEmpty()) {\n\t\t\t$action->setClass($this->guessClassname($actionName));\n\t\t}\n\n// \t\t// guess title if there is none set yet\n// \t\tif (Text::create($action->getTitle())->isEmpty()\n// \t\t\t\t&& $this->modelService->isModelAction($action)\n// \t\t\t\t&& $this->modelService->isCrudAction($action)) {\n// \t\t\t$modelName = $this->modelService->getModelNameByAction($action);\n// \t\t\t$type = $this->modelService->getOperationByAction($action);\n// \t\t\t$action->setTitle($this->getActionTitle($modelName, $type));\n// \t\t}\n\n\t\t// acl\n\t\t$action->setAcl($this->getAcl($action));\n\n\t\t// generate code\n\t\t$generator = new SkeletonActionGenerator($this->service);\n\t\t$class = $generator->generate($action);\n\t\t$this->codeService->dumpStruct($class, $input->getOption('force'));\n\t}", "title": "" }, { "docid": "05916fb1ad86d370b6531e0c0dd826a2", "score": "0.5249062", "text": "function _CreateResponseRequest()\n\t\t{\n\t\t}", "title": "" }, { "docid": "a1e2459afd5fb105b37e7e868a6525d8", "score": "0.52456665", "text": "static function generate() {\n }", "title": "" }, { "docid": "a082d07c6624cc249e47d3e63c7bac93", "score": "0.5222588", "text": "public function generate()\r\n\t{\r\n\t\tadd_action ( \"admin_init\", array( &$this , \"w2p_generate\" ) );\r\n\t\tadd_action ( 'save_post', array( &$this , \"w2p_save_meta\" ) );\r\n\t}", "title": "" }, { "docid": "d6428d3354e7b930ada72d2e80686049", "score": "0.5213975", "text": "public function _generate() {\n $this->preGenerate();\n $this->validate();\n $this->generate();\n $this->postGenerate();\n\n return $this->deliver();\n }", "title": "" }, { "docid": "ae151c7113cfe9b52935c6fdf8fd6886", "score": "0.51913494", "text": "public abstract function generate();", "title": "" }, { "docid": "b9a5df2725a6ce09e640af1ba7566889", "score": "0.51748645", "text": "public function generate($request)\n {\n $menu = fn_get_schema('menu', 'menu', 'php');\n\n $this->_request = $request;\n $actions = array();\n\n foreach ($menu as $group => &$menu_data) {\n // Get static section\n foreach ($menu_data as $root => &$items) {\n $items['items'] = $this->_processItems($items['items'], $root, '');\n\n if (empty($items['items'])) {\n unset($menu[$group][$root]);\n continue;\n }\n }\n }\n\n unset($items, $menu_data);\n\n $menu['top'] = $this->_sort($menu['top']);\n $menu['central'] = $this->_sort($menu['central']);\n $menu = $this->_getSettingsSections($menu);\n\n LanguageHelper::preloadLangVars($this->_lang_cache);\n\n $selected = $this->_selected;\n\n /**\n * Changes generated menu items\n *\n * @param array $request request params\n * @param array $menu items\n * @param array $actions items Action value, if exists. See: fn_get_route\n * @param array $this->selected Menu item, selected by the dispatch\n */\n fn_set_hook('backend_menu_generate_post', $request, $menu, $actions, $this->_selected);\n\n return array($menu, $actions, $this->_selected);\n }", "title": "" }, { "docid": "17fa5b8dda9a3126eb5ed4c88e3c1fd0", "score": "0.51673317", "text": "public function actionGen()\n {\n /* @var $invoice Invoices */\n /* @var $operation Ops */\n\n //result\n $result = \"\";\n //get invoice id from request\n $id = Yii::app()->request->getParam('id');\n\n //find invoice from base\n $invoice = Invoices::model()->findByPk($id);\n\n //if invoice found\n if($invoice != null)\n {\n //generate pdf\n $pdf_filename = $this->GeneratePdf($invoice);\n\n //if pdf name not empty\n if($pdf_filename != '')\n {\n $invoice->file_name = $pdf_filename;\n $invoice->user_id = Yii::app()->user->id;\n $invoice->date = time();\n $invoice->update();\n\n $result = $invoice->file_name;\n }\n\n //try to find operation\n $operation = Ops::model()->findByPk($invoice->ops_id);\n\n //if operation found\n if($operation != null)\n {\n //set id of this invoice to operation\n $operation->invoice_id = $invoice->id;\n\n //update operation in base\n $operation->update();\n }\n }\n\n //exit and print filename\n exit($result);\n }", "title": "" }, { "docid": "654a84dd83ef8c3e1792f7061ad38dd7", "score": "0.51528937", "text": "public function generateAction ()\n {\n $format = $this->_getParam(\"format\", \"docx\");\n\n switch ($format)\n {\n case \"csv\" :\n throw new Exception(\"CSV Format not available through this page yet!\");\n break;\n case \"docx\" :\n $this->clearCacheForReport();\n $this->view->optimization = $this->getOptimizationViewModel();\n $this->view->phpword = new \\PhpOffice\\PhpWord\\PhpWord();\n $this->view->wordStyles = $this->getWordStyles();\n $this->view->graphs = $this->cachePNGImages($this->view->optimization->getCustomerCharts(), true);\n\n $this->_helper->layout->disableLayout();\n break;\n case \"pdf\" :\n throw new Exception(\"PDF Format not available through this page yet!\");\n break;\n default :\n throw new Exception(\"Invalid Format Requested!\");\n break;\n }\n\n $filename = $this->generateReportFilename($this->getHardwareOptimization()->getClient(), My_Brand::getDealerBranding()->customerOptimizationTitle) . \".$format\";\n\n $this->initReportVariables($filename);\n // Render early\n try\n {\n $this->render($format . \"/00_render\");\n }\n catch (Exception $e)\n {\n throw new Exception(\"Controller caught the exception!\", 0, $e);\n }\n }", "title": "" }, { "docid": "3e2a3cb299c327c3be18693fbb1920eb", "score": "0.51461536", "text": "public function generate(){\n\n }", "title": "" }, { "docid": "bf5905ae26b990d07bed7b7174707702", "score": "0.514356", "text": "public function generate()\n {\n $this->generateNamesDescription();\n $this->generateGroups();\n $this->generateFromGeneric();\n }", "title": "" }, { "docid": "4fa17c8bd9a87586617aea5abd4dc98e", "score": "0.5140765", "text": "public function create()\n {\n return $this->out(200, ['method' => 'create']);\n }", "title": "" }, { "docid": "8819df45018e17f16eec23cf228c38ea", "score": "0.513517", "text": "public function returnJsonAction()\n {\n return new MyResponse\\Api();\n }", "title": "" }, { "docid": "a0ef3a00b1fe1d12f6d945272c714385", "score": "0.51307744", "text": "public function generate() {\n require_once \"PtuGenerator.php\";\n\n // Only handle gets\n if ($this->method != 'GET') {\n return self::NOT_GET_RESPONSE;\n }\n\n $generator = new PtuGenerator(\n array_key_exists(\"type\", $_GET) ? $_GET['type'] : null,\n array_key_exists(\"habitat\", $_GET) ? $_GET['habitat'] : null,\n array_key_exists(\"generation\", $_GET) ? $_GET['generation'] : null,\n array_key_exists(\"specific\", $_GET) ? $_GET['specific'] : null,\n array_key_exists(\"legendary\", $_GET) ? $_GET['legendary'] : true,\n array_key_exists(\"min_level\", $_GET) ? $_GET['min_level'] : 0,\n array_key_exists(\"max_level\", $_GET) ? $_GET['max_level'] : 100,\n array_key_exists(\"nature\", $_GET) ? $_GET['nature'] : \"Random\",\n array_key_exists(\"location\", $_GET) ? $_GET['location'] : \"\",\n array_key_exists(\"gender\", $_GET) ? $_GET['gender'] : \"\",\n array_key_exists(\"stat_weights\", $_GET) ? json_decode($_GET['stat_weights'], true) :\n [\"HP\"=>1,\"Attack\"=>1,\"Defense\"=>1,\"SpecialAttack\"=>1,\"SpecialDefense\"=>1,\"Speed\"=>1],\n array_key_exists(\"min_tm\", $_GET) ? $_GET['min_tm'] : 0,\n array_key_exists(\"max_tm\", $_GET) ? $_GET['max_tm'] : 3,\n array_key_exists(\"min_em\", $_GET) ? $_GET['min_em'] : 0,\n array_key_exists(\"max_em\", $_GET) ? $_GET['max_em'] : 3,\n array_key_exists(\"top_percent\", $_GET) ? $_GET['top_percent'] : false,\n array_key_exists(\"level_caught\", $_GET) ? $_GET['level_caught'] : 0,\n array_key_exists(\"expand_horizons\", $_GET) ? $_GET['expand_horizons'] : false,\n array_key_exists(\"guidance\", $_GET) ? $_GET['guidance'] : false,\n array_key_exists(\"save_tp\", $_GET) ? $_GET['save_tp'] : 0,\n array_key_exists(\"enduring_soul\", $_GET) ? $_GET['enduring_soul'] : false,\n array_key_exists(\"stat_ace\", $_GET) ? json_decode($_GET['stat_ace'], true) : [],\n array_key_exists(\"september\", $_GET) ? $_GET['september'] : true\n );\n\n return $generator->start();\n }", "title": "" }, { "docid": "544e0b5bcdf66d29c2cbd25822b41e3c", "score": "0.5114854", "text": "abstract protected function generate();", "title": "" }, { "docid": "f5687233af5eba2d27c2d9eb823d91a7", "score": "0.5108744", "text": "function generate() {\n\t\t\n\t\t// prevent default translation and fake __() within string\n\t\tacf_update_setting('l10n_var_export', true);\n\t\t\n\t\t\n\t\t// vars\n\t\t$json = $this->get_json();\n\t\t\n\t\t\n\t\t// validate\n\t\tif( $json === false ) {\n\t\t\t\n\t\t\tacf_add_admin_notice( __(\"No field groups selected\", 'acf') , 'error');\n\t\t\treturn;\n\t\t\n\t\t}\n\t\t\n\t\t\t\t\n\t\t// update view\n\t\t$this->view = 'settings-tools-export';\n\t\t$this->data['field_groups'] = $json;\n\t\t\n\t}", "title": "" }, { "docid": "c0d97fe98cf3e75f23752dd2cad71fdc", "score": "0.5102703", "text": "public function templateGenerator($action, $messageVar, $tableData)\r\n {\r\n $this->table = $tableData;\r\n switch ($action) {\r\n case 'INSERT':{\r\n $arrays = get_object_vars($messageVar);\r\n $this->header = \"<h2>Insert New Record</h2>\";\r\n $this->message = \"Inserted New Record with Data: \";\r\n foreach ($arrays as $key => $value) {\r\n if($key!= \"id\"){\r\n $this->message .= \"$key = $value \";\r\n }\r\n }\r\n break;\r\n }\r\n case 'UPDATE':{\r\n $this->header = \"<h2>Update Record</h2>\";\r\n $this->message = \"Update Record with Id: $messageVar\";\r\n break;\r\n }\r\n case 'SELECTALL':{\r\n $this->header = \"<h2>Select All Records</h2>\";\r\n $this->message = \"Select ALL Records\";\r\n break;\r\n\r\n }\r\n case 'SELECT':{\r\n\r\n $this->header = \"<h2>Select One Record</h2>\";\r\n $this->message = \"Select Record with Id: $messageVar\";\r\n break;\r\n }\r\n case 'DELETE':{\r\n $this->header = \"<h2>Delete Record</h2>\";\r\n $this->message = \"Delete Record with Id: $messageVar\";\r\n }\r\n default:\r\n\r\n break;\r\n }\r\n\r\n }", "title": "" }, { "docid": "c517f2ff83ed88d7b6de93c87daacb6c", "score": "0.50753015", "text": "public function createAction(ServerRequestInterface $request, ResponseInterface $response)\n {\n // Under Construction\n }", "title": "" }, { "docid": "02c50ccb96c8322e6f0c182cb90e39ac", "score": "0.5063541", "text": "public function generate()\r\n\t{\r\n\t\treturn parent::generate();\r\n\t}", "title": "" }, { "docid": "92b100a1b5c109c4b6b1bb838ba526ea", "score": "0.5053027", "text": "public function actionCreate()\n\t{\n\n\t}", "title": "" }, { "docid": "b5e4424ddf4bea92c762d7534181b176", "score": "0.5050798", "text": "public static function createResponse()\r\n {\r\n $requested_route = processRequest::getRequestedRoute();\r\n \r\n //namespace is hardcoded here otherwise we would need to have a ton of use statements and always update this file\r\n $controller_name = \"controller\\\\\". $requested_route->controller;\r\n //this determines the method to call for the controller\r\n $controller_method = $requested_route->method;\r\n\r\n //controller is now in instance because it stores an instance of the request object for that controller\r\n $r = request::getRequestObject();\r\n \r\n $c = new $controller_name($r);\r\n $c->$controller_method();\r\n }", "title": "" }, { "docid": "0bc33e5482ffea87aea4fb06f013077f", "score": "0.5048092", "text": "public function generate()\n {\n $ahp_method_service = new AhpMethodService();\n $ahp_method_service->recalculateAhpValues();\n\n return redirect()->route('ahp');\n }", "title": "" }, { "docid": "a5d56dd0c39f824938e63fe61c3de312", "score": "0.504712", "text": "public function create()\n {\n //\n return \"create\";\n }", "title": "" }, { "docid": "ee4aaaa329d2c12dd0fe25500eb1fd1f", "score": "0.504681", "text": "private function buildOAResponse($fields){\n $template = file_get_contents(base_path().'/vendor/bramf/crud-generator/src/Templates/Controllers/OAResponse.temp');\n $buildParams = [\n 'ParamName' => $fields['name'],\n 'ParamType' => $fields['type']\n ];\n foreach($buildParams as $param => $value){\n $template = str_replace($param,$value,$template);\n }\n return $template;\n }", "title": "" }, { "docid": "27d941fe8566f198d2d84f9d0f77e49a", "score": "0.5046217", "text": "public function generateDataAction()\n {\n $this->clearData();\n $companies = $this->generateCompanies();\n $users = $this->generateUsers($companies);\n $this->generateTransfers($users);\n return $this->view(array('message' => 'Data generated.'), 200);\n }", "title": "" }, { "docid": "038d2be3aacb787480547cb3ba1b9c7f", "score": "0.50416225", "text": "public function create()\n {\n\n $page_title = $this->key_word;\n $info = new stdClass();\n $info->title = $this->key_word_plural;\n $info->first_button_title = 'All ' . $this->key_word;\n $info->first_button_route = $this->route_index;\n $info->form_route = $this->route_store;\n\n $info->form_inputs = $this->form_inputs;\n return view('admin._cruds._create', compact('page_title', 'info'));\n }", "title": "" }, { "docid": "5af6750803c418655267450f65742f8f", "score": "0.5027286", "text": "public function internalGeneration()\n\t{\n\t\t$this->load->library('form_validation');\t\n\t\t$token = $this->input->post( 'token', TRUE);\n\t\tparent::assign('token', $token);\n\t\t\n\t\t$this->load->model('logomodel');\n\t\t$resultInit = $this->logomodel->init($token);\n\t\t\n\t\t$return['code'] = 201;\n\t\t$return['message'] = 'Generating for '. $token;\n\n\t\t$csrf = array(\n\t\t\t'name' => $this->security->get_csrf_token_name(),\n\t\t\t'hash' => $this->security->get_csrf_hash()\n\t\t);\n\t\t\n\t\tparent::assign($return);\t\t\t\t\n\t\tparent::assign('csrf', $csrf);\n\t\tparent::view('logo-generation/generate');\n\t}", "title": "" }, { "docid": "c0582fa54ed72a06c384848e96acbe67", "score": "0.5023546", "text": "public function actionCreate() {\r\n\t\t\r\n\t}", "title": "" }, { "docid": "5187c81676c0bb28bc0961d726276cd2", "score": "0.50180924", "text": "public function create() {\n\t\treturn \"API Crete\";\n\t}", "title": "" }, { "docid": "9d58a38e41562c3d3bd9c08c299cee95", "score": "0.50108856", "text": "private function generateGenerateMethod()\n {\n return <<<'EOF'\n public function generate($name, $parameters = array(), $referenceType = self::ABSOLUTE_PATH)\n {\n $locale = $parameters['_locale'] ?? $this->context->getParameter('_locale');\n\n if (null !== $locale && ($localizedRoute = (self::$declaredRoutes[$name.'.'.$locale] ?? null)) && ($localizedRoute[1]['_canonical_route'] ?? null) === $name) {\n $name = $name.'.'.$locale;\n } elseif (!isset(self::$declaredRoutes[$name])) {\n throw new RouteNotFoundException(sprintf('Unable to generate a URL for the named route \"%s\" as such route does not exist.', $name));\n }\n\n list($variables, $defaults, $requirements, $tokens, $hostTokens, $requiredSchemes) = self::$declaredRoutes[$name];\n\n return $this->doGenerate($variables, $defaults, $requirements, $tokens, $parameters, $name, $referenceType, $hostTokens, $requiredSchemes);\n }\n \n protected function getDefaultLocale(array $routeData)\n {\n if (isset($routeData['_canonical_route']) && $route = (self::$declaredRoutes[$routeData['_canonical_route']] ?? null)) {\n return $route[1]['_locale'];\n }\n\n return null;\n }\nEOF;\n }", "title": "" }, { "docid": "c8cca2cc48f9791d456bbb2d022f31da", "score": "0.5008674", "text": "public function generate()\n\t{\n\t\treturn parent::generate();\n\t}", "title": "" }, { "docid": "ebde57ca1b929f0f3b2eb1bedde7463e", "score": "0.50052917", "text": "public function generate()\n {\n $response = \"\";\n $data = $this->data;\n\n if (!is_string($this->data) && (!empty($this->headers['Content-Type']) || !empty($this->request->headers['Accept']))) {\n $contentType = !empty($this->headers['Content-Type']) ? $this->headers['Content-Type'] : $this->request->headers['Accept'];\n $this->headers['Content-Type'] = $contentType;\n\n switch ($contentType) {\n case 'application/json':\n $data = json_encode($this->data);\n break;\n }\n }\n\n if (empty($this->headers['Content-Type'])) {\n $this->contentType = \"text/plain\";\n }\n\n if (empty($this->statusCode)) {\n $this->statusCode = 200;\n }\n\n if (!empty($data)) {\n $this->headers['Content-Length'] = strlen($data);\n } else {\n $this->headers['Content-Length'] = 0;\n }\n\n $response .= \"HTTP/1.1 \" . $this->statusCode . \" \" . self::STATUS_MESSAGES[$this->statusCode] . \"\\r\\n\";\n\n foreach ($this->headers as $name => $value) {\n $response .= $name . \": \" . $value . \"\\r\\n\";\n }\n\n if (!empty($data)) {\n $response .= \"\\r\\n\" . $data;\n }\n\n return $response;\n }", "title": "" }, { "docid": "9f23e40107b585789ea7d003e1a26470", "score": "0.50028783", "text": "public function generate_file()\n {\n }", "title": "" }, { "docid": "7189c56b68c6a82baa055ac82f6b9f04", "score": "0.50000286", "text": "public function actionCreate()\n {\n return $this->formAction(null);\n }", "title": "" }, { "docid": "ead353bc0c6c034dc617be19761ab126", "score": "0.49993312", "text": "public function actionCreate()\n {\n $this->output->startPrintf('Process');\n $tableOptions = $this->getOptions($this->table);\n $filterOptions = $this->getOptions($this->filter);\n\n $createTableInfo = Yii::t('dump', 'Create Table');\n $insertDataInfo = Yii::t('dump', 'Insert Data Of Table');\n $addKeyInfo = Yii::t('dump', 'Add Key Of Table');\n $addFKInfo = Yii::t('dump', 'Add Foreign Key Of Table');\n\n foreach ($this->db->getSchema()->getTableSchemas() as $table) {\n // filter some table -filter=... -table=...\n if ($this->filterTable($table->name, $filterOptions, $tableOptions)) {\n continue;\n }\n\n switch ($this->type) {\n case '0':\n $this->printf($table, 'table', $createTableInfo);\n break;\n\n case '1':\n $this->printf($table, 'tableData', $insertDataInfo);\n break;\n\n case '2':\n $this->printf($table, 'key', $addKeyInfo);\n break;\n\n case '3':\n $this->printf($table, 'FK', $addFKInfo); // foreign key\n break;\n\n default:\n $this->printf($table, 'table', $createTableInfo);\n $this->printf($table, 'tableData', $insertDataInfo);\n $this->printf($table, 'key', $addKeyInfo);\n $this->printf($table, 'FK', $addFKInfo); // foreign key\n break;\n }\n\n }\n\n $this->output->conclusion($this->generations, $this->filters);\n $this->output->endPrintf('Process');\n return 0;\n }", "title": "" }, { "docid": "690e170785463342f8f274cb87d0f0d8", "score": "0.49889925", "text": "public function getAction()\n {\n\n return new Response(\n '<html><body>hello wold</body></html>'\n );\n }", "title": "" }, { "docid": "f0ea083907dfaabfeff0938292a277f6", "score": "0.49875912", "text": "public function initializeAction() {\n\n\t\tif ($this->request->hasArgument('frameWork')) {\n\t\t\t$this->targetFrameWork = $this->request->getArgument('frameWork');\n\t\t} elseif (!isset($this->settings['codeGeneration']['frameWork']) OR $this->settings['codeGeneration']['frameWork'] == 'Flow') {\n\t\t\t$this->targetFrameWork = 'Flow';\n\t\t} else {\n\t\t\t$this->targetFrameWork = 'TYPO3';\n\t\t}\n\t\t$this->settings['codeGeneration'] = \\TYPO3\\Flow\\Utility\\Arrays::arrayMergeRecursiveOverrule(\n\t\t\t$this->settings['codeGeneration'],\n\t\t\t$this->settings['codeGeneration'][$this->targetFrameWork]\n\t\t);\n\t\tif (!empty($this->settings['extendIceSettings'])) {\n\t\t\t$this->settings = \\TYPO3\\Flow\\Utility\\Arrays::arrayMergeRecursiveOverrule(\n\t\t\t\t$this->configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'TYPO3.Ice'),\n\t\t\t\t$this->settings\n\t\t\t);\n\t\t}\n\t\t$this->logger = \\TYPO3\\Flow\\Log\\LoggerFactory::create('PackageBuilderLogger','\\\\TYPO3\\\\PackageBuilder\\\\Log\\\\FileLogger','\\\\TYPO3\\\\Flow\\\\Log\\\\Backend\\\\FileBackend', $this->settings['log']['backendOptions']);\n\n\t\tif($this->actionMethodName == 'createAction') {\n\t\t\tif(!class_exists('\\\\TYPO3\\\\PackageBuilder\\\\Service\\\\' . $this->targetFrameWork. '\\\\CodeGenerator')) {\n\t\t\t\tthrow new \\TYPO3\\PackageBuilder\\Exception\\MissingComponentException('No CodeGenerator class for target framework ' . $this->targetFrameWork . ' found');\n\t\t\t}\n\t\t\t$this->codeGenerator = $this->objectManager->get('\\\\TYPO3\\\\PackageBuilder\\\\Service\\\\' . $this->targetFrameWork. '\\\\CodeGenerator');\n\t\t\t$this->packageRepository = $this->objectManager->get('\\\\TYPO3\\\\PackageBuilder\\\\Domain\\\\Repository\\\\' . $this->targetFrameWork. '\\\\PackageRepository');\n\t\t\t$this->packageFactory = $this->objectManager->get('\\\\TYPO3\\\\PackageBuilder\\\\Service\\\\' . $this->targetFrameWork. '\\\\PackageFactory');\n\t\t\t$this->packageConfigurationManager = $this->objectManager->get('\\\\TYPO3\\\\PackageBuilder\\\\Configuration\\\\' . $this->targetFrameWork. '\\\\ConfigurationManager');\n\n\t\t\t$this->codeGenerator->injectLogger($this->logger);\n\t\t\t$this->packageRepository->injectLogger($this->logger);\n\t\t\t$this->packageFactory->injectLogger($this->logger);\n\t\t}\n\t}", "title": "" }, { "docid": "e8e34d2ee199f45e4ed47d0d6957d78e", "score": "0.49864706", "text": "public function helpAction() {\n\t\t$this->response->appendContent(\n\t\t\t'FLOW3 Kickstart Generator' . PHP_EOL .\n\t\t\t'Usage:' . PHP_EOL .\n\t\t\t' php Public/index.php kickstart generator generatePackage --package-key <package-key>' . PHP_EOL .\n\t\t\t' php Public/index.php kickstart generator generateController --package-key <package-key> [--controller-name <controller-name>]' . PHP_EOL .\n\t\t\t' php Public/index.php kickstart generator generateModel --package-key <package-key> [--model-name <model-name>]' . PHP_EOL .\n\t\t\t' php Public/index.php kickstart generator generateRepository --package-key <package-key> [--model-name <model-name>]' . PHP_EOL . PHP_EOL\n\t\t);\n\t}", "title": "" }, { "docid": "5b5a8a3cf73653fe24251a816f92952f", "score": "0.4984367", "text": "public function generate() {\n $this->generator->setDocBlock($this->describer->getGenerator());\n\n //does a _construct method exists?\n //if it does we always want this to be the first method\n if (isset($this->methods['__construct'])) {\n $this->generator->addMethodFromGenerator($this->methods['__construct']->getGenerator());\n // unset($this->methods['__construct']);\n }\n\n foreach ($this->properties as $name => $obj) {\n $this->generator->addPropertyFromGenerator($obj->getGenerator());\n }\n\n foreach ($this->methods as $name => $obj) {\n if ($name == '__construct') {\n continue;\n }\n $this->generator->addMethodFromGenerator($obj->getGenerator());\n }\n\n return $this->generator->generate();\n }", "title": "" }, { "docid": "ed0c8802fefb60d326f2d59d65542aa2", "score": "0.49719107", "text": "public function generate()\n {\n global $argv;\n\n $arguments = $this->parse_cmdline($argv);\n\n if($arguments === null)\n return;\n\n if(count($arguments) < 1)\n {\n $this->help();\n return;\n }\n\n $class = array_shift($arguments);\n $gc = $this->get_gadget_chain($class);\n\n $this->setup_enhancements();\n\n if(in_array('test-payload', $this->options))\n {\n if(count($arguments) > 0)\n $this->o(\n \"WARNING: Testing a payload ignores payload arguments.\"\n );\n $this->test_payload($gc);\n }\n else\n {\n $arguments = $this->get_type_arguments($gc, $arguments);\n $generated = $this->serialize($gc, $arguments);\n $this->output_payload($generated);\n }\n }", "title": "" }, { "docid": "0203f66b5d5164cd889e68114c2da9fb", "score": "0.49567705", "text": "public function generate(): GenerationResult;", "title": "" }, { "docid": "4a2b9c854363793b7cda1db09ffaa770", "score": "0.49505737", "text": "public function generateStubTemplate(){\n \t$template \t= new Template();\n \t$data \t\t= $template->createDefaultTemplate();\n\n \t// return response\n \treturn response()->json($data);\n }", "title": "" }, { "docid": "d384966f887dbb87bbc8568a7b1ec80c", "score": "0.49502182", "text": "public function action_create()\n {\n $this->page_title = \"Create \".$this->page_title;\n $view = View::factory(\"pages/admin/tag/create\");\n $this->_content = $view;\n\n if( ! $_POST)\n {\n $this->_content = $view;\n }\n else \n {\n $client = REST_client::instance('api_writer');\n $data = array();\n\n // @TODO: insert validation here...\n $response = $client->post('tag', $_POST); echo $response->data;\n\n $data = XML::factory(NULL, NULL, $response->data);\n\n if($response->status == '200')\n {\n Request::instance()->redirect(Request::instance()->uri(array('action' => 'index')));\n }\n else\n {\n //$out = 'Error creating Event<br/>Status code: '.$response->status.'<br/>Response:'.$response->data;\n $message = $data->status->value();\n $view->bind('message', $message);\n $this->_content = $view;\n }\n }\n }", "title": "" }, { "docid": "dd0e2d27691f5f9c15dc749e914f18a8", "score": "0.49446115", "text": "public function create(): Response\n {\n return response([\n 'entity' => [\n 'name' => '',\n 'abilities' => [],\n ]\n ]);\n }", "title": "" }, { "docid": "c26d8057542b3ffe28f242620e5fc519", "score": "0.49337903", "text": "abstract public function generate();", "title": "" }, { "docid": "c26d8057542b3ffe28f242620e5fc519", "score": "0.49337903", "text": "abstract public function generate();", "title": "" }, { "docid": "c26d8057542b3ffe28f242620e5fc519", "score": "0.49337903", "text": "abstract public function generate();", "title": "" }, { "docid": "c26d8057542b3ffe28f242620e5fc519", "score": "0.49337903", "text": "abstract public function generate();", "title": "" }, { "docid": "c26d8057542b3ffe28f242620e5fc519", "score": "0.49337903", "text": "abstract public function generate();", "title": "" }, { "docid": "130b92d8a066de92adbdf01ac08d3ff8", "score": "0.49322823", "text": "function generate() {\n\t\t$this -> schemaObject = $this -> envokeProperty($this -> jsonObject);\n\n\t\treturn json_encode($this -> schemaObject, JSON_PRETTY_PRINT);\n\t}", "title": "" }, { "docid": "f80b2a95371593f03ed37705431f6db2", "score": "0.49275845", "text": "public function create(): Response\n {\n //\n }", "title": "" }, { "docid": "f80b2a95371593f03ed37705431f6db2", "score": "0.49275845", "text": "public function create(): Response\n {\n //\n }", "title": "" }, { "docid": "74da5f096e1eb1e123778e1cec9a3d69", "score": "0.49188602", "text": "public function createWaAction() {\n $this->view->menu = \"MYWA\";\n }", "title": "" }, { "docid": "22d297f9a49b4ef1aeaf7b30a4481aaf", "score": "0.49172217", "text": "public function generate(MoufManager $moufManager, $controllerName, $instanceName, $namespace, $injectLogger = false,\n $injectTemplate = false, $actions = array())\n {\n $namespace = rtrim($namespace, '\\\\').'\\\\';\n\n $classNameMapper = ClassNameMapper::createFromComposerFile(__DIR__.'/../../../../../../../../composer.json');\n $possibleFileNames = $classNameMapper->getPossibleFileNames($namespace.$controllerName);\n if (!isset($possibleFileNames[0])) {\n throw new SplashException(\"The class '\".$namespace.$controllerName.\"' cannot be loaded using rules defined in composer autoload section\");\n }\n $fileName = $possibleFileNames[0];\n $controllerPhpDirectory = dirname($fileName);\n $errors = array();\n if (!preg_match('/^[a-z_]\\w*$/i', $controllerName)) {\n $errors['controllerNameError'] = 'This is not a valid PHP class name.';\n }\n if (!preg_match('/^[a-z_][\\w\\\\\\\\]*$/i', $namespace)) {\n $errors['namespaceError'] = 'This is not a valid PHP namespace.';\n }\n\n $namespace = trim($namespace, '\\\\');\n\n // Check that instance does not already exists\n if ($moufManager->has($instanceName)) {\n $errors['instanceError'] = 'This instance already exists.';\n }\n\n $injectTwig = false;\n $importJsonResponse = false;\n $importHtmlResponse = false;\n $importRedirectResponse = false;\n\n foreach ($actions as $key => $action) {\n // Check if the view file exists\n if ($injectTemplate && $action['view'] == 'twig') {\n $injectTwig = true;\n $importHtmlResponse = true;\n $twigFile = ltrim($action['twigFile'], '/\\\\');\n\n $viewDirName = ROOT_PATH.'../../../'.dirname($twigFile);\n $result = $this->createDirectory($viewDirName);\n if (!$result) {\n $errors['actions'][$key]['twigTemplateFileError'] = 'Unable to create directory \"'.$viewDirName.'\"';\n }\n }\n if ($injectTemplate && $action['view'] == 'php') {\n $importHtmlResponse = true;\n\n $phpFile = ltrim($action['phpFile'], '/\\\\');\n\n $viewDirName = ROOT_PATH.'../../../'.dirname($phpFile);\n $result = $this->createDirectory($viewDirName);\n if (!$result) {\n $errors['actions'][$key]['phpTemplateFileError'] = 'Unable to create directory \"'.$viewDirName.'\"';\n }\n }\n if ($action['view'] == 'redirect') {\n if (!isset($action['redirect']) || empty($action['redirect'])) {\n $errors['actions'][$key]['redirectError'] = 'Redirection URL cannot be empty.';\n }\n $importRedirectResponse = true;\n }\n if ($action['view'] == 'json') {\n $importJsonResponse = true;\n }\n }\n\n // TODO: check that URLs are not in error.\n\n\n if (!$errors) {\n $result = $this->createDirectory(ROOT_PATH.'../../../'.$controllerPhpDirectory);\n if (!$result) {\n $errors['namespaceError'] = 'Unable to create directory: \"'.$controllerPhpDirectory.'\"';\n } elseif (file_exists(ROOT_PATH.'../../../'.$controllerPhpDirectory.$controllerName.'.php')) {\n $errors['namespaceError'] = 'The file \"'.$controllerPhpDirectory.$controllerName.'.php already exists.\"';\n } elseif (!is_writable(ROOT_PATH.'../../../'.$controllerPhpDirectory)) {\n $errors['namespaceError'] = 'Unable to write file in directory: \"'.$controllerPhpDirectory.'\"';\n }\n\n if (!$errors) {\n ob_start();\n echo '<?php\n';\n ?>\nnamespace <?= $namespace ?>;\n\nuse TheCodingMachine\\Splash\\Annotations\\Get;\nuse TheCodingMachine\\Splash\\Annotations\\Post;\nuse TheCodingMachine\\Splash\\Annotations\\Put;\nuse TheCodingMachine\\Splash\\Annotations\\Delete;\nuse TheCodingMachine\\Splash\\Annotations\\URL;\n<?php if ($injectTemplate) {\n ?>\nuse Mouf\\Html\\Template\\TemplateInterface;\nuse Mouf\\Html\\HtmlElement\\HtmlBlock;\n<?php\n\n}\n ?>\n<?php if ($injectLogger) {\n ?>\nuse Psr\\Log\\LoggerInterface;\n<?php\n}\n?>\nuse Psr\\Http\\Message\\ResponseInterface;\n<?php if ($injectTwig) {\n ?>\nuse \\Twig_Environment;\nuse Mouf\\Html\\Renderer\\Twig\\TwigTemplate;\n<?php\n\n}\n ?>\n<?php if ($importJsonResponse) {\n ?>\nuse Laminas\\Diactoros\\Response\\JsonResponse;\n<?php\n\n}\n ?>\n<?php if ($importRedirectResponse) {\n ?>\nuse Laminas\\Diactoros\\Response\\RedirectResponse;\n<?php\n\n}\n ?>\n<?php if ($importHtmlResponse) {\n ?>\nuse Mouf\\Mvc\\Splash\\HtmlResponse;\n<?php\n\n}\n ?>\n\n/**\n * TODO: write controller comment\n */\nclass <?= $controllerName ?> {\n\n<?php if ($injectLogger) {\n ?>\n /**\n * The logger used by this controller.\n * @var LoggerInterface\n */\n private $logger;\n\n<?php\n\n}\n ?>\n<?php if ($injectTemplate) {\n ?>\n /**\n * The template used by this controller.\n * @var TemplateInterface\n */\n private $template;\n\n /**\n * The main content block of the page.\n * @var HtmlBlock\n */\n private $content;\n\n<?php\n\n}\n ?>\n<?php if ($injectTwig) {\n ?>\n /**\n * The Twig environment (used to render Twig templates).\n * @var Twig_Environment\n */\n private $twig;\n\n<?php\n\n}\n ?>\n\n /**\n * Controller's constructor.\n<?php\nif ($injectLogger) {\n echo \" * @param LoggerInterface \\$logger The logger\\n\";\n}\n if ($injectTemplate) {\n echo \" * @param TemplateInterface \\$template The template used by this controller\\n\";\n echo \" * @param HtmlBlock \\$content The main content block of the page\\n\";\n }\n if ($injectTwig) {\n echo \" * @param Twig_Environment \\$twig The Twig environment (used to render Twig templates)\\n\";\n }\n ?>\n */\n public function __construct(<?php\n$parameters = array();\n if ($injectLogger) {\n $parameters[] = 'LoggerInterface $logger';\n }\n if ($injectTemplate) {\n $parameters[] = 'TemplateInterface $template';\n $parameters[] = 'HtmlBlock $content';\n }\n if ($injectTwig) {\n $parameters[] = 'Twig_Environment $twig';\n }\n echo implode(', ', $parameters);\n ?>) {\n<?php if ($injectLogger) {\n ?>\n $this->logger = $logger;\n<?php\n\n}\n if ($injectTemplate) {\n ?>\n $this->template = $template;\n $this->content = $content;\n<?php\n\n }\n if ($injectTwig) {\n ?>\n $this->twig = $twig;\n<?php\n\n }\n ?>\n }\n\n<?php foreach ($actions as $action):\n\n\n?>\n /**\n * @URL(\"<?= addslashes($action['url']) ?>\")\n<?php if ($action['anyMethod'] == 'false') {\n if ($action['getMethod'] == 'true') {\n echo \" * @Get\\n\";\n }\n if ($action['postMethod'] == 'true') {\n echo \" * @Post\\n\";\n }\n if ($action['putMethod'] == 'true') {\n echo \" * @Put\\n\";\n }\n if ($action['deleteMethod'] == 'true') {\n echo \" * @Delete\\n\";\n }\n}\n // let's detect the {parameters} in the URL and add them if necessary\n if (isset($action['parameters'])) {\n $parameters = $action['parameters'];\n foreach ($parameters as $parameter) {\n echo ' * @param '.$parameter['type'].' $'.$parameter['name'].\"\\n\";\n }\n } else {\n $parameters = array();\n }\n ?>\n */\n public function <?= $action['method'] ?>(<?php\n$parametersCode = array();\n foreach ($parameters as $parameter) {\n $parameterCode = '$'.$parameter['name'];\n if ($parameter['optionnal'] == 'true') {\n if ($parameter['type'] == 'int') {\n $defaultValue = (int) $parameter['defaultValue'];\n } elseif ($parameter['type'] == 'number') {\n $defaultValue = (float) $parameter['defaultValue'];\n } else {\n $defaultValue = $parameter['defaultValue'];\n }\n $parameterCode .= ' = '.var_export($defaultValue, true);\n }\n $parametersCode[] = $parameterCode;\n }\n echo implode(', ', $parametersCode);\n ?>): ResponseInterface {\n // TODO: write content of action here\n\n<?php if ($injectTemplate && $action['view'] == 'twig'): ?>\n // Let's add the twig file to the template.\n $this->content->addHtmlElement(new TwigTemplate($this->twig, <?php var_export($action['twigFile']);\n ?>, array(\"message\"=>\"world\")));\n\n return new HtmlResponse($this->template);\n<?php elseif ($injectTemplate && $action['view'] == 'php'): ?>\n // Let's add the view to the content.\n // Note: $this is passed as the scope, so in the view file, you can refer to protected\n // and public variables and methods of this constructor using \"$this\".\n $this->content->addFile(ROOT_PATH.<?php var_export($action['phpFile']) ?>, $this);\n\n return new HtmlResponse($this->template);\n<?php elseif ($action['view'] == 'json'): ?>\n\n return new JsonResponse([ \"status\"=>\"ok\" ]);\n<?php elseif ($action['view'] == 'redirect'): ?>\n\n return new RedirectResponse(<?php var_export($action['redirect']);\n ?>);\n<?php endif;\n ?>\n }\n<?php endforeach;\n ?>\n}\n<?php\n $file = ob_get_clean();\n\n file_put_contents(ROOT_PATH.'../../../'.$fileName, $file);\n chmod(ROOT_PATH.'../../../'.$fileName, 0664);\n\n // Now, let's create the views files\n foreach ($actions as $action) {\n if ($injectTemplate && $action['view'] == 'twig') {\n $twigFile = ltrim($action['twigFile'], '/\\\\');\n if(!file_exists(ROOT_PATH.'../../../'.$twigFile)) {\n $twigTemplateFile = $this->generateTwigView();\n file_put_contents(ROOT_PATH.'../../../'.$twigFile, $twigTemplateFile);\n chmod(ROOT_PATH.'../../../'.$twigFile, 0664);\n }\n\n } elseif ($injectTemplate && $action['view'] == 'php') {\n $phpFile = ltrim($action['phpFile'], '/\\\\');\n if(!file_exists(ROOT_PATH.'../../../'.$phpFile)) {\n $phpTemplateFile = $this->generatePhpView($namespace.'\\\\'.$controllerName);\n file_put_contents(ROOT_PATH.'../../../'.$phpFile, $phpTemplateFile);\n chmod(ROOT_PATH.'../../../'.$phpFile, 0664);\n }\n }\n }\n\n // Now, let's create the instance\n $controllerInstance = $moufManager->createInstance($namespace.'\\\\'.$controllerName);\n $controllerInstance->setName($instanceName);\n if ($injectLogger) {\n if ($moufManager->has('psr.errorLogLogger')) {\n $controllerInstance->getProperty('logger')->setValue($moufManager->getInstanceDescriptor('psr.errorLogLogger'));\n }\n }\n if ($injectTemplate) {\n if ($moufManager->has('bootstrapTemplate')) {\n $controllerInstance->getProperty('template')->setValue($moufManager->getInstanceDescriptor('bootstrapTemplate'));\n }\n if ($moufManager->has('block.content')) {\n $controllerInstance->getProperty('content')->setValue($moufManager->getInstanceDescriptor('block.content'));\n }\n }\n if ($injectTwig) {\n if ($moufManager->has('twigEnvironment')) {\n $controllerInstance->getProperty('twig')->setValue($moufManager->getInstanceDescriptor('twigEnvironment'));\n }\n }\n\n $moufManager->rewriteMouf();\n\n // There is a new class, let's purge the cache\n $moufCache = new MoufCache();\n $moufCache->purgeAll();\n\n // TODO: purge cache\n }\n }\n\n if ($errors) {\n $exception = new SplashCreateControllerServiceException('Errors detected : '.var_export($errors, true));\n $exception->setErrors($errors);\n throw $exception;\n }\n }", "title": "" }, { "docid": "55bc1a6662a9b87e773a86272776cdb1", "score": "0.491676", "text": "public function generate($actionManager)\n {\n if ($actionManager instanceof ActionManagerInterface) {\n $this->actionManager = $actionManager;\n $this->actionManagerClass = get_class($this->actionManager);\n }\n\n if (is_string($actionManager) && class_exists($actionManager)) {\n $this->actionManager = new $actionManager();\n $this->actionManagerClass = $actionManager;\n }\n }", "title": "" }, { "docid": "9e5fa6456d0138cd1f1d3e67aad1cf3e", "score": "0.49138469", "text": "public function generateClassType(){\n\t\t$this->classGenerated->setExtends(\"ActionAbstract\");\n\t\t$this->classGenerated->addComment(\"Description of \".$this->classType.\" class from entity \".$this->tableName.\".\\n\\n\");\n\n\t\t// to generate PHP code simply cast to string or use echo:\n\t\treturn $this->classGenerated;\n\t}", "title": "" }, { "docid": "cf6e4c36eb93e2d16edfa3663807a6ea", "score": "0.49102002", "text": "public function getCreate()\n {\n $story_id = $this->inputId(\"story_id\");\n if($story_id)\n {\n $storys = [Story::find($story_id)];\n $this->share('story', $storys[0]);\n\n }\n else\n {\n $storys = Story::all();\n }\n\n $this->add_raw_enum_dict(\"story_name\", \"story_id\", $storys);\n $this->add_enum(\"test_case_type\");\n\n return parent::getCreate();\n }", "title": "" }, { "docid": "5244df2f7863c99c22f04d5d2712d320", "score": "0.4903937", "text": "public function actionDemo()\n {\n\t\t \n\t\t// print_r(Yii::$app->controller);\n\t\t// echo \"<pre>\";\n\t\t$prefix = '/' . $this->uniqueId . '/';\n\t\t$class = new \\ReflectionClass($this);\n\t\tforeach ($class->getMethods() as $method) {\n $name = $method->getName();\n if ($method->isPublic() && !$method->isStatic() && strpos($name, 'action') === 0 && $name !== 'actions') {\n $name = strtolower(preg_replace('/(?<![A-Z])[A-Z]/', ' \\0', substr($name, 6)));\n $id = $prefix . ltrim(str_replace(' ', '-', $name), '-');\n $result[$id] = $id;\n }\n }\n\t\t// print_r($result);\n\t\treturn $this->render(\"demo\",['result'=>$result]);\n\t\t\n }", "title": "" }, { "docid": "aca9b7b6df36b1aca41dae5a8dd07d5e", "score": "0.4902877", "text": "protected function _processActionCreate() {\r\n\t\t// log the entry of the method\r\n\t\t$this->_getLogger()->debug(\r\n\t\t\t\"Now in _processActionCreate method\",\r\n\t\t __LINE__\r\n\t\t);\r\n\t\t// load the ActionMapping\r\n\t\t$actionMapping = $this->_getActionMapping();\r\n // name of the ActionClass that should be instanciated\r\n $actionClass = $actionMapping->getType();\r\n // if a name was found, then try to instanciate the object\r\n if (empty($actionClass)) {\r\n // else throw an exception\r\n throw new TechDivision_Controller_Exceptions_EmptyActionClassTypeException(\r\n \t'Class type of action not specified in configuration file for mapping with path ' . $actionMapping->getPath()\r\n );\r\n }\n // instanciate and return a new object of Action class\n $reflectionClass = new ReflectionClass($actionClass);\n $this->_setAction(\r\n $reflectionClass->newInstance($this->getContext())\r\n );\r\n }", "title": "" } ]
bc7d7c503b7b3476843dd9c408a61cd6
Sets the content of the response.
[ { "docid": "ffcd72c2e31d15591b6c348961a4dbc4", "score": "0.6793684", "text": "public function setContent($content)\n {\n $this->content = $content;\n }", "title": "" } ]
[ { "docid": "ef1f2e0530daf3e37df54351c57b481b", "score": "0.70173794", "text": "function setContent($content)\n {\n $this->content = $content;\n }", "title": "" }, { "docid": "7c59d962f6c569d520a643a61078f870", "score": "0.6975011", "text": "function setContent($content){\n $this->content = $content;\n }", "title": "" }, { "docid": "d541398a3beed39b3cd7b961d6d92d86", "score": "0.69522166", "text": "protected function doSetContent($content){\n $this->content = $content;\n }", "title": "" }, { "docid": "a5a7f25bea12e51c7c12dc9cab5e6fb4", "score": "0.6943174", "text": "function setContent($content)\n {\n $this->content = $content;\n }", "title": "" }, { "docid": "83303d8ef32a8dfc7d911ed352633dfb", "score": "0.69288564", "text": "public function setContent($content){\n $this->_content = $content;\n }", "title": "" }, { "docid": "954ffaf0fec28a46892f1022c1ca70ca", "score": "0.68803877", "text": "public function setContent($content) {\r\n\t\t$this->content = $content;\r\n\t}", "title": "" }, { "docid": "46987e3e06b10d817c81c2b0809053c1", "score": "0.6860043", "text": "public function setContent($v){\n \n $this->content = $v;\n }", "title": "" }, { "docid": "900d7076ab4be87fe4065db56f867ee9", "score": "0.68497294", "text": "public function setContent($content) {}", "title": "" }, { "docid": "440e08af10d6fbb9eb59bdbb7c4f1df0", "score": "0.68454117", "text": "public function setContent($content)\n {\n $this->_content = $content;\n }", "title": "" }, { "docid": "db8ce6c06dec64cde9e927e8c4bdd169", "score": "0.6833547", "text": "public function setContent($content)\n {\n $this->rendered = $content;\n }", "title": "" }, { "docid": "25bbd867b05b794cddf5b2b071f834de", "score": "0.6800066", "text": "public function setContent($content){\n\t\t$this->content = $content;\n\t}", "title": "" }, { "docid": "10333522ef6be2d194fd1d553fe799e2", "score": "0.6796786", "text": "public function setContent( $content );", "title": "" }, { "docid": "7f2cf5119a5c51408cac63c7047bdff5", "score": "0.6785774", "text": "public function setContent($content)\n {\n if (null !== $content && !is_string($content) && !is_numeric(\n $content\n ) && !is_callable(array($content, '__toString'))) {\n throw new \\UnexpectedValueException(\n sprintf(\n 'The Response content must be a string or object implementing __toString(), \"%s\" given.',\n gettype($content)\n )\n );\n }\n\n $this->content = (string)$content;\n\n return $this;\n }", "title": "" }, { "docid": "9277eb0c4ed2cbbd998c01bc8a452445", "score": "0.67825747", "text": "public function setContent() {\n\t\tif (!empty($this->theParts['html']['content']) && empty($this->theParts['plain']['content'])){\n\t\t\t$this->add_header($this->html_text_header);\n\t\t\t$this->add_message($this->getContent('html'));\n\t\t} else {\n\t\t\tparent::setContent();\n\t\t}\n\t}", "title": "" }, { "docid": "f589405613a1fec87072762bfcececcf", "score": "0.6770381", "text": "public function setContent($content);", "title": "" }, { "docid": "f589405613a1fec87072762bfcececcf", "score": "0.6770381", "text": "public function setContent($content);", "title": "" }, { "docid": "f589405613a1fec87072762bfcececcf", "score": "0.6770381", "text": "public function setContent($content);", "title": "" }, { "docid": "f589405613a1fec87072762bfcececcf", "score": "0.6770381", "text": "public function setContent($content);", "title": "" }, { "docid": "f589405613a1fec87072762bfcececcf", "score": "0.6770381", "text": "public function setContent($content);", "title": "" }, { "docid": "f589405613a1fec87072762bfcececcf", "score": "0.6770381", "text": "public function setContent($content);", "title": "" }, { "docid": "f589405613a1fec87072762bfcececcf", "score": "0.6770381", "text": "public function setContent($content);", "title": "" }, { "docid": "2e37db665e50ecac024520b1e41e499e", "score": "0.67409134", "text": "protected function SetContent($content){\n\t\t$this->content=$content;\n\t}", "title": "" }, { "docid": "0affcb76328fe0cef18f01afa6991d13", "score": "0.6718817", "text": "public function setContent(mixed $content) : Response\n {\n $content = Jso::hay($content)->json()\n ? $content\n : $this->convertjson($content);\n\n return $this->setJson($content);\n }", "title": "" }, { "docid": "b90db133a1061dfcf49a373d75722c11", "score": "0.6716049", "text": "private function setResponseDefaultContent(Response $response) {\n\t\t// if content is empty\n\t\tif ($response->getContent() === '') {\n\t\t\t// if error\n\t\t\tif ($response->isClientError() || $response->isServerError()) {\n\t\t\t\t$code = $response->getStatusCode();\n\t\t\t\t$reason = $response->getReasonPhrase();\n\t\t\t\t$response->setContent(\"<h1>Error $code: $reason</h1>\");\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b345844c80d096c0d8f0a781cf295f86", "score": "0.6705309", "text": "public function setContent(string $content);", "title": "" }, { "docid": "1889d4c56a2b64ef0bebccebe78673b3", "score": "0.66814417", "text": "public function setResponse($response);", "title": "" }, { "docid": "cce2e4f46b6e469ddef511f403e5bfae", "score": "0.6630933", "text": "function setContent($content);", "title": "" }, { "docid": "65b1686a56a0b84d6f24dbbc975601a5", "score": "0.6627242", "text": "public function set_content( $content ) {\n\t\t$this->content = $content;\n\t}", "title": "" }, { "docid": "803c601087fdebeaca8579deadae5879", "score": "0.65864384", "text": "public function setContent(string $content): void\n {\n $this->content = $content;\n }", "title": "" }, { "docid": "803c601087fdebeaca8579deadae5879", "score": "0.65864384", "text": "public function setContent(string $content): void\n {\n $this->content = $content;\n }", "title": "" }, { "docid": "803c601087fdebeaca8579deadae5879", "score": "0.65864384", "text": "public function setContent(string $content): void\n {\n $this->content = $content;\n }", "title": "" }, { "docid": "c6888196ee51a73e8c6f07012abfe4c3", "score": "0.6573983", "text": "public function setContent($newContent){\n $this->content=$newContent;\n }", "title": "" }, { "docid": "112689511db234ee15b5b87a3a82e834", "score": "0.6568222", "text": "public function set_content($content)\n\t{\n\t\t$this->_content = $content;\n\t}", "title": "" }, { "docid": "051f8f9488173c05907a7ed702b85402", "score": "0.6538985", "text": "function setContent($a_content)\n\t{\n\t\t$this->content = $a_content;\n\t}", "title": "" }, { "docid": "ccbcfa7078512333e2274637f8d1bb6d", "score": "0.65199006", "text": "public function setResponse( $response ) {\n\t\t$this->_response = serialize($response);\n\t}", "title": "" }, { "docid": "a707993909f39f1717004a7323961a41", "score": "0.65042925", "text": "public function setResponse($response) {\n\t\t$this->response = $response;\n\t}", "title": "" }, { "docid": "ab4be36957191c801212a0661e1f5d35", "score": "0.64830816", "text": "function setContent( $content ) {\n $this->content=$content;\n return $this;\n }", "title": "" }, { "docid": "a048e96a34ef74c15e439cf7d0ea2cf5", "score": "0.6477813", "text": "public function setResponse($resp)\n {\n $this->response = $resp;\n }", "title": "" }, { "docid": "b337cb9d22b3882d8ff131a1843a187e", "score": "0.6473371", "text": "public function setResponseContent($responseContent)\n {\n ValidationUtility::ensureNullOrString('$responseContent', $responseContent);\n\n $this->responseContent = $responseContent;\n\n return $this;\n }", "title": "" }, { "docid": "9db43cd7ba1c3e75f32fd6a3acb4a26d", "score": "0.64652234", "text": "public function setResponse($response) {\n $this->response = $response;\n }", "title": "" }, { "docid": "4ed8c820d1a8f7a3d93b0f47dbd9b7dd", "score": "0.64385164", "text": "public function setResponse($response)\r\n {\r\n $this->response = $response;\r\n }", "title": "" }, { "docid": "761890231a02284a0a1d4bbbf44547ab", "score": "0.64268965", "text": "protected function _setHtml($content)\r\n {\r\n if(!is_string($content) && !is_numeric($content)) {\r\n throw new InvalidArgumentException('Please provide a string for HTML response content');\r\n }\r\n \r\n $this->_type = 'text/html'; \r\n $this->_body = $content;\r\n }", "title": "" }, { "docid": "7c46b58356345a41732084c9692d7b93", "score": "0.64247614", "text": "public function setResponse( $response )\n\t{\n\t\t$this->response = $response;\n\t}", "title": "" }, { "docid": "70598e755dff812d9fc4a0a517c8a8cb", "score": "0.6415944", "text": "public function setResponse( $response ){\n \n $this->response = $response;\n \n }", "title": "" }, { "docid": "0eb2fa5c23e7302ac2fb9cdf2e15641d", "score": "0.6407501", "text": "public function setContent($content)\n {\n if(!is_string($content)) // S'il ne s'agit pas d'une chaine de caractères\n {\n trigger_error('Le contenu du chapitre doit être une chaine de caractères', E_USER_WARNING);\n return;\n }\n\n $this->_content = $content;\n }", "title": "" }, { "docid": "87e7f96a821ef551e664d42ea8bc8ab7", "score": "0.63853294", "text": "protected function setResponse()\n\t{\n\n\t\tif ( $this->response==null ) \n\t\t{\n\t\t\t$params =& $this->params;\n\t\t\t$tumblr =& $this->api;\n\t\t\t$request = $tumblr->get('/blog/' . $params->get('blog') . '/posts');\n\t\t\t$this->response = $request;\n\t\t}\n\t}", "title": "" }, { "docid": "6e24b5bffb4c6fb9cd3ce768821cb1e5", "score": "0.63811105", "text": "function setContent($content) {\n\t\t$this->content = htmlspecialchars($content);\n\t}", "title": "" }, { "docid": "fd49c59b8fdc5d9602a55acbd64ded2b", "score": "0.63809496", "text": "public function setResponse($response)\n {\n $this->response = $response;\n }", "title": "" }, { "docid": "5712c16237cf625294a489c060db0bc9", "score": "0.63792175", "text": "function setResponse(Response $response);", "title": "" }, { "docid": "9e41221fe5b213568459ecd7dc16d5c2", "score": "0.6358316", "text": "public function setContent(string $content = null) {\n\t\t$this->content = $content;\n\t}", "title": "" }, { "docid": "d677333f724299338fba975bd48a45da", "score": "0.63344026", "text": "public function __construct() {\n $this->response = new Response(\n 'Content',\n Response::HTTP_OK,\n ['content-type' => 'text/html']\n );\n }", "title": "" }, { "docid": "4459265f9a3c86728b86234221fe2612", "score": "0.6310633", "text": "public function setResponse(Response $response)\n\t{\n\t\t$this->_response = $response;\n\t}", "title": "" }, { "docid": "fcb2f843162cb72609d769799fe0f217", "score": "0.63008547", "text": "private function setContentLength() {\n header('Content-Length: ' . strlen(strval($this->response)));\n }", "title": "" }, { "docid": "fc7e0f082b12f89cbbfdcc3854b9bef5", "score": "0.6290245", "text": "public function setContent($content){\n $this->content = $content;\n return $this;\n }", "title": "" }, { "docid": "4258e3bce2342de4b7e3e419068aacd3", "score": "0.6287108", "text": "private function parseContent() //: void\n {\n try {\n $contents = stream_get_contents($this->stream);\n\n if ($this->getContentType() == 'json') {\n $this->content = json_decode($contents, true);\n } else if ($this->getContentType() == 'text') {\n $this->content[0] = $contents;\n }\n } catch (Exception $e) {\n throw new HttpClientException('Invalid response format ' . $e->getMessage());\n }\n }", "title": "" }, { "docid": "ccca51949b76b617806bd503421455e1", "score": "0.6285763", "text": "public function setResponse(Response $response): void;", "title": "" }, { "docid": "43714d130ec6aba997e9eb6f1986d79a", "score": "0.6276294", "text": "public function sendContent() {\n $this->content = $this->getContent();\n return parent::sendContent();\n }", "title": "" }, { "docid": "642b98896d695a72f7e36f4cf8c8d9e3", "score": "0.62735736", "text": "public function set_response($response) {\n $this->set_header('Content-Length', strlen($response));\n $this->set_header('Content-MD5', base64_encode(md5($response)));\n $this->response = $response;\n return $this;\n }", "title": "" }, { "docid": "cb3660725af10bd44eb430cd1f7c71ba", "score": "0.62687755", "text": "public function setResponse($res)\n {\n $this->res = $res;\n }", "title": "" }, { "docid": "bd9bb315e0a72b00e9ad99e8122215e4", "score": "0.62616545", "text": "public function setResponse(Response $response)\n\t{\n\t\t$this->response = $response;\n\t}", "title": "" }, { "docid": "076a34de9004324ce922b18a82e45f8b", "score": "0.6252187", "text": "public function setResponseContentType()\n {\n $this->responseContentType = curl_getinfo($this->_curlConn, CURLINFO_CONTENT_TYPE);\n }", "title": "" }, { "docid": "720a3843f806b051149d63fa889796f6", "score": "0.6250835", "text": "private function setResponse(){\n if($this->status === 200){\n $validity = $this->checkValid();\n if($validity === true){\n $this->isValid = true;\n }else{\n $this->isValid = false;\n $this->invalid_reason = $validity;\n }\n }else{\n $this->error = $this->t_response ? $this->t_response->message : $this->t_response;\n }\n unset($this->t_response);\n }", "title": "" }, { "docid": "5337b9d5c8b1df2f7334e93fac56684e", "score": "0.6224866", "text": "public function sendResponse(){\n\t\t//Envia os headers\n\t\t$this->sendHeaders();\n\n\t\t//Imprime conteudo\n\t\tswitch ($this->contentType) {\n\t\t\tcase 'text/html':\n\t\t\t\techo $this->content;\n\t\t\texit;\n\t\t\tcase 'application/json':\n\t\t\t\techo json_encode($this->content, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "179dd72ece483a345b188d4843923e71", "score": "0.6217665", "text": "public function setContent(string $content)\r\n {\r\n $this->content = $content;\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "43abd4d83a953835bf0775d4d412e7af", "score": "0.62173337", "text": "protected function setContent($content)\n {\n if (!is_string($content)) {\n throw new IOException(sprintf(\n '%s: expects a string as argument; received \"%s\"',\n __METHOD__,\n (is_object($content) ? get_class($content) : gettype($content))\n ));\n }\n \n $this->content = $content;\n $this->charCount = strlen($content);\n }", "title": "" }, { "docid": "3a731e9c77af2299f6b03891d6c21bd0", "score": "0.6206", "text": "public function setContent($val)\n {\n $this->_propDict[\"content\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "a0e908784f7a613a473dffa6b6f0c5e9", "score": "0.6190324", "text": "public function setContent($html);", "title": "" }, { "docid": "8e2b34bfc5944f5f24fa876686fc2fc2", "score": "0.61885685", "text": "protected function setResponseData( $anything ){\n $this->responseObj->setData($anything);\n }", "title": "" }, { "docid": "85ed5c9d6ea8a767e5f3a7f9bd416a34", "score": "0.6171477", "text": "public function setContent($content)\n {\n $this->content = $content;\n\n return $this;\n }", "title": "" }, { "docid": "eff6ffe5f2907dad1464af7ee58e06bd", "score": "0.6161897", "text": "public function setResponse(Response $response)\n {\n $this->response = $response;\n }", "title": "" }, { "docid": "eff6ffe5f2907dad1464af7ee58e06bd", "score": "0.6161897", "text": "public function setResponse(Response $response)\n {\n $this->response = $response;\n }", "title": "" }, { "docid": "20d0ba13d6873e1f2f0dbbf04b243dbf", "score": "0.61602867", "text": "public function setContent($content)\n\t{\n\t\t$this->openFile(\"r+\");\n\t\tfwrite($this->fileResource, $content);\n\t}", "title": "" }, { "docid": "b0e965a1061c330f10e6ac24c459ba71", "score": "0.6158444", "text": "public function setContent ($content) {\n $this->mContent = $content;\n return $this;\n }", "title": "" }, { "docid": "6373c08d05a59e54388c03632ef45ec2", "score": "0.61405003", "text": "protected function response() {\n\t\theader( 'Content-Type', $this->content_type );\n\t\t$this->format( $this->data );\n\t\texit;\n\t}", "title": "" }, { "docid": "8fde6ddce79b95933d5eceddb41861e6", "score": "0.61386955", "text": "public function setContent($val)\n {\n $this->_propDict[\"content\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "a40917532a302b4b4791c35bf9c8fbf5", "score": "0.6136646", "text": "public function setContent($content)\n\t{\n\t\tif ($this->content !== $content) {\n\t\t\tLog::info(sprintf('Setting the content of %s%s', $this->data['name'], $this->id !== '' && $this->id !== null ? ' (' . $this->id . ')' : ''));\n\t\t\t$this->content = $content;\n\t\t}\n\t\treturn $this->content;\n\t}", "title": "" }, { "docid": "5a01ad717efe10a352985ab7864fa13c", "score": "0.61303747", "text": "public function setContent($content) {\n return file_put_contents($this->toString(), $content);\n }", "title": "" }, { "docid": "8b676b8331948e0ae8e18a41a86f096c", "score": "0.6124822", "text": "public function setContent(string $content)\n {\n $this->content = $content;\n\n return $this;\n }", "title": "" }, { "docid": "8b676b8331948e0ae8e18a41a86f096c", "score": "0.6124822", "text": "public function setContent(string $content)\n {\n $this->content = $content;\n\n return $this;\n }", "title": "" }, { "docid": "571f86fc70ae79d4a2e744737b870fe6", "score": "0.61226684", "text": "public function setContent($content){\n\t\t$this->content = $content;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "242c5a14ecf7ffd5a8335a120f003c01", "score": "0.61194766", "text": "public function setContent($content)\r\n {\r\n $this->content = $content;\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "210b805ab2c2defceffb24b302db849e", "score": "0.61109763", "text": "public function setContent($content) {\n\t\t$this->_content = $content;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "f866cfcd37adec350940bef2ca2e2d91", "score": "0.6097899", "text": "public function setResponse(Response $response)\n {\n $this->state = self::STATE_DONE;\n $this->response = $response;\n }", "title": "" }, { "docid": "559bc036b967d4cbffac668992db9638", "score": "0.6090978", "text": "public function setContent($content)\n {\n $this->content = $content;\n return $this;\n }", "title": "" }, { "docid": "559bc036b967d4cbffac668992db9638", "score": "0.6090978", "text": "public function setContent($content)\n {\n $this->content = $content;\n return $this;\n }", "title": "" }, { "docid": "559bc036b967d4cbffac668992db9638", "score": "0.6090978", "text": "public function setContent($content)\n {\n $this->content = $content;\n return $this;\n }", "title": "" }, { "docid": "74c49573d9d27ba462eb48588bf8a765", "score": "0.6086738", "text": "public function setContent($content) {\n\t\t$this->content = $content;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "17519d13454323839e07bce60c2f2499", "score": "0.608139", "text": "public function setContent($sContent) {\n $this->_sContent = & $sContent;\n }", "title": "" }, { "docid": "4ff3be34d0f9434133578611d12db27b", "score": "0.6075977", "text": "public function send()\r\n {\r\n\t $this->response->getHeaders();\r\n\t $this->response->getContent();\r\n }", "title": "" }, { "docid": "dc3b8a52165fde0649617b53c76a641d", "score": "0.60423124", "text": "public static function setResponse( $response )\n {\n self::$response = $response;\n }", "title": "" }, { "docid": "737a69a870fc791755c59a137b53dbf8", "score": "0.6026272", "text": "public function setFullResponse(\n $response);", "title": "" }, { "docid": "47bd9814a4822e476dacc3ee4cb8d670", "score": "0.6019138", "text": "public function setContent($content) {\r\n\t\t$this->content = new DOMDocument;\r\n\t\t$this->content->loadXML($content);\r\n\t}", "title": "" }, { "docid": "3d769e0cd4b50be6922220ee06dcff29", "score": "0.60186166", "text": "public function setContent($content){\r\n $this->template = $content;\r\n }", "title": "" }, { "docid": "75f0af322e8e5143d31ee223e7cecc4d", "score": "0.60043055", "text": "protected function setContent($content = null) {\n $this->content = $content;\n return $this;\n }", "title": "" }, { "docid": "75ea7648e117a8febb0f53a60100c249", "score": "0.5992163", "text": "public function setHttpResponse(\n HttpResponseInterface $response)\n {\n $this->httpResponse = $response;\n }", "title": "" } ]
afe20d9d033fef2be9f242e0ef59fff8
BulkUploadJob functions // ConvertJob functions // batch updateExclusiveConvertCollectionJobAction action updates a BatchJob of type CONVERT_PROFILE that was claimed using the getExclusiveConvertJobs
[ { "docid": "f915ad16373a7496286d1c7ad56bfe8e", "score": "0.6074735", "text": "function updateExclusiveConvertCollectionJobAction($id ,KalturaExclusiveLockKey $lockKey, KalturaBatchJob $job, KalturaConvertCollectionFlavorDataArray $flavorsData = null)\r\n\t{\r\n\t\t$dbBatchJob = BatchJobPeer::retrieveByPK($id);\r\n\t\t\r\n\t\t// verifies that the job is of the right type\r\n\t\tif($dbBatchJob->getJobType() != KalturaBatchJobType::CONVERT_COLLECTION)\r\n\t\t\tthrow new KalturaAPIException(APIErrors::UPDATE_EXCLUSIVE_JOB_WRONG_TYPE, $id, serialize($lockKey), serialize($job));\r\n\t\r\n\t\tif($flavorsData)\r\n\t\t\t$job->data->flavors = $flavorsData;\r\n\t\t\t\r\n\t\t$dbBatchJob = kBatchManager::updateExclusiveBatchJob($id, $lockKey->toObject(), $job->toObject($dbBatchJob));\r\n\t\t\t\t\r\n\t\t$batchJob = new KalturaBatchJob(); // start from blank\r\n\t\treturn $batchJob->fromBatchJob($dbBatchJob);\r\n\t}", "title": "" } ]
[ { "docid": "749506ad9690e0cd1c35e48ad14e6bd1", "score": "0.54439193", "text": "public function actionUpdate()\n {\n $model = $this->loadModel(Yii::app()->user->id);\n $model->scenario ='all';\n $email = $model->email;\n $profileJob = new ProfileJob;\n $profileJob->scenario = 'save';\n $userSkill = new UserSkill;\n $userSkill->scenario = 'save';\n $profile = Profile::model()->findByPk($model->profile_id);\n if(!$profile) {\n $profile = new Profile;\n }\n $type = '';\n if (isset($_POST['User']) || isset($_POST['Profile'])) {\n $model->scenario ='create';\n $model->attributes = $_POST['User'];\n $profile->scenario ='search';\n $profile->attributes = $_POST['Profile'];\n $profile->save(false);\n $photos = CUploadedFile::getInstances($model,'avatar');\n if($email != $model->email) {\n $model->scenario ='update';\n }\n if ($model->save()) {\n if (isset($photos) && count($photos) > 0) {\n foreach ($photos as $image => $pic) {\n $url = $pic->tempName;\n $ext = substr(strrchr($pic->name, \".\"), 1);\n if(!$ext) {\n $ext = 'png';\n }\n $image = 'avatar_' . $model->id . '.'.$ext;\n $model->avatar = $image;\n $destination = Yii::getPathOfAlias('webroot') . '/uploads/avatar/' . $model->id;\n if (!file_exists($destination)) {\n mkdir($destination);\n }\n $destination = $destination . '/' . $image;\n file_put_contents($destination, file_get_contents($url));\n Yii::import('application.extensions.EWideImage.EWideImage');\n $imgload = EWideImage::load($destination);\n $image = $imgload->resize(50,50,'fill');\n $tempname = Yii::getPathOfAlias('webroot') . '/uploads/avatar/' . $model->id.'/thumb';\n if (!file_exists($tempname)) {\n mkdir($tempname);\n }\n $tempname = $tempname . '/' . $model->avatar;\n file_put_contents($tempname, file_get_contents($url));\n $image->saveToFile($tempname);\n \n $image = $imgload->resize(150,150,'fill');\n $tempname = Yii::getPathOfAlias('webroot') . '/uploads/avatar/' . $model->id.'/profile';\n if (!file_exists($tempname)) {\n mkdir($tempname);\n }\n $tempname = $tempname . '/' . $model->avatar;\n file_put_contents($tempname, file_get_contents($url));\n $image->saveToFile($tempname);\n \n $image = $imgload->resize(171,174,'fill');\n $tempname = Yii::getPathOfAlias('webroot') . '/uploads/avatar/' . $model->id.'/user';\n if (!file_exists($tempname)) {\n mkdir($tempname);\n }\n $tempname = $tempname . '/' . $model->avatar;\n file_put_contents($tempname, file_get_contents($url));\n $image->saveToFile($tempname);\n \n $model->save(false);\n }\n }\n echo CJSON::encode(array(\n 'status' => 'success',\n 'message'=>'Profle saved successfully.'\n ));\n Yii::app()->end();\n } else {\n $error = CActiveForm::validate($model);\n if ($error != '[]') {\n echo $error;\n }\n Yii::app()->end();\n }\n }\n\n $this->render('update',compact('model','profileJob','userSkill','type','profile'));\n }", "title": "" }, { "docid": "e52928160c46809ed2d999bf6a39386a", "score": "0.52664024", "text": "private function process_update_batch(array $batch, array $ids_mapping) : void\n {\n }", "title": "" }, { "docid": "ce73a5c4969cf15d173a761f7f0e628a", "score": "0.5221054", "text": "public function actionBulkUpdate() {\r\n\t\t\r\n\t}", "title": "" }, { "docid": "db0aa910e5105822251ad367469f9e89", "score": "0.5175384", "text": "function retryConvertProfileAction($jobId)\r\n\t{\r\n\t\treturn $this->retryJobAction($jobId, KalturaBatchJobType::CONVERT_PROFILE);\r\n\t}", "title": "" }, { "docid": "6ca00327c75c901fcfecaa20c382f3cd", "score": "0.51304585", "text": "function addConvertProfileJobAction($entryId)\r\n\t{\r\n\t\t$entry = entryPeer::retrieveByPK($entryId);\r\n\t\tif(!$entry)\r\n\t\t\tthrow new KalturaAPIException(APIErrors::INVALID_ENTRY_ID, 'entry', $entryId);\r\n\t\t\t\r\n\t\t$flavorAsset = assetPeer::retrieveOriginalByEntryId($entryId);\r\n\t\tif(!$flavorAsset)\r\n\t\t\tthrow new KalturaAPIException(KalturaErrors::ORIGINAL_FLAVOR_ASSET_IS_MISSING);\r\n\t\t\r\n\t\t$syncKey = $flavorAsset->getSyncKey(flavorAsset::FILE_SYNC_FLAVOR_ASSET_SUB_TYPE_ASSET);\r\n\t\tif(!kFileSyncUtils::file_exists($syncKey, true))\r\n\t\t\tthrow new KalturaAPIException(APIErrors::NO_FILES_RECEIVED);\r\n\t\t\t\r\n\t\t$inputFileSyncLocalPath = kFileSyncUtils::getLocalFilePathForKey($syncKey);\r\n\t\t\r\n\t\t$batchJob = kJobsManager::addConvertProfileJob(null, $entry, $flavorAsset->getId(), $inputFileSyncLocalPath);\r\n\t\t\r\n\t\treturn $this->getStatusAction($batchJob->getId(), KalturaBatchJobType::CONVERT_PROFILE);\r\n\t}", "title": "" }, { "docid": "5d73f9aa9f78133b38a8843dc0c5f74c", "score": "0.51104283", "text": "public function testUpdateImportJob()\n {\n }", "title": "" }, { "docid": "f85906287c78886e3c860d927ff4b16a", "score": "0.5027007", "text": "public function addUpdatejob(array $job)\n {\n }", "title": "" }, { "docid": "7c01fd5b23120e1cc5d8e0d048168dd6", "score": "0.50116986", "text": "function updateExclusiveJobAction($id ,KalturaExclusiveLockKey $lockKey, KalturaBatchJob $job)\r\n\t{\r\n\t\t$dbBatchJob = BatchJobPeer::retrieveByPK($id);\r\n\t\t$dbBatchJob = kBatchManager::updateExclusiveBatchJob($id, $lockKey->toObject(), $job->toObject($dbBatchJob));\r\n\t\t\t\t\r\n\t\t$batchJob = new KalturaBatchJob(); // start from blank\r\n\t\treturn $batchJob->fromBatchJob($dbBatchJob);\r\n\t}", "title": "" }, { "docid": "648fa3b16f17647b20941bec110b0f5f", "score": "0.49971008", "text": "function abortConvertProfileAction($jobId)\r\n\t{\r\n\t\treturn $this->abortJobAction($jobId, KalturaBatchJobType::CONVERT_PROFILE);\r\n\t}", "title": "" }, { "docid": "600f2bad544d074b4f0d7de089c2d744", "score": "0.49068025", "text": "function retryConvertCollectionAction($jobId)\r\n\t{\r\n\t\treturn $this->retryJobAction($jobId, KalturaBatchJobType::CONVERT_COLLECTION);\r\n\t}", "title": "" }, { "docid": "538476ed1d507a355012f95664ffd910", "score": "0.48681447", "text": "public function testUpdateJobType()\n {\n }", "title": "" }, { "docid": "15259f9dd5133d5d76f3034469102cbd", "score": "0.4836665", "text": "function getConvertProfileStatusAction($jobId)\r\n\t{\r\n\t\treturn $this->getStatusAction($jobId, KalturaBatchJobType::CONVERT_PROFILE);\r\n\t}", "title": "" }, { "docid": "d87db1186aec27c4098292c7d08a92db", "score": "0.48310435", "text": "private function userProductBatchUpdate($Data){\n $UPID=$Data['UPID'] ?? \"\";\n $newBatchID = $Data['batchID'] ?? \"\";\n $newGroupID = $Data['groupID'] ?? \"\";\n $grade = $Data['grade'] ?? \"\";\n $section =$Data['section'] ?? \"\";\n $seacrhCondUP = [\"UPID\"=> $UPID];\n\n $activeBatch =[\"batchID\" => $newBatchID,\n\t\t\t\"grade\" => $grade ,\n\t\t\t\"section\" => $section,\n\t\t\t\"groupID\" => $newGroupID,\n \"rollNo\" => null\n ];\n \n // check all input parameters passed\n if(isset($UPID) && isset($newBatchID) && isset($newGroupID) && isset($grade) && isset($section) ){\n // make existing batch inactive and new batch active\n $UserProductObject = $this->mongoUserProductObject->find($seacrhCondUP); \n if(count($UserProductObject) > 0){ \n $updateValues = [];\n $updateValues['batch'][\"InActiveBatch\"][] = $UserProductObject['batch'][\"ActiveBatch\"];\n $updateValues['batch'][\"ActiveBatch\"] = $activeBatch;\n // update the existing doc \n $result = $this->mongoUserProductObject->update($seacrhCondUP,$updateValues);\n } else{\n $error[\"message\"] = \"no records found\";\n return false; }\n \n } else {\n $error[\"message\"]= \"Missing input arguments\";\n return false;\n }\n return $result;\n }", "title": "" }, { "docid": "e8a776538bfde8fae17567e3a7c75795", "score": "0.4821811", "text": "function retryConvertAction($jobId)\r\n\t{\r\n\t\treturn $this->retryJobAction($jobId, KalturaBatchJobType::CONVERT);\r\n\t}", "title": "" }, { "docid": "d215a6b7fd382d7cacf4b0f3dfd6c856", "score": "0.4821498", "text": "public function updateUsersBatch($usersBatchData = array()) {\n $users = array();\n\n foreach($usersBatchData as $userData) {\n if (is_null($userData)) {\n throw new Exception('Moesif UpdateUser with a null userData object');\n }\n \n if (!isset($userData['user_id'])) {\n throw new Exception('Moesif updateUser requires user_id field to be set');\n }\n $users[] = $userData;\n }\n \n $this->_sendProducer->updateUsersBatch($users);\n }", "title": "" }, { "docid": "9df0318d0c5c3e1eca0abd9680c06384", "score": "0.48177958", "text": "function deleteConvertProfileAction($jobId)\r\n\t{\r\n\t\treturn $this->deleteJobAction($jobId, KalturaBatchJobType::CONVERT_PROFILE);\r\n\t}", "title": "" }, { "docid": "175e0b4b1b61ec967ab8575eb050e1f3", "score": "0.4816132", "text": "public function batchActionEventUserUpdateRoles($scorers,$current_event_id,$role_scorer2_id){\n $error=false;\n \n foreach ($scorers as $scorer) {\n $event_user_id= $scorer->getId();\n $update_role = $this->get('request')->get(\"event_user_\".$event_user_id);\n \n $sql = \"UPDATE Nwp\\AssessmentBundle\\Entity\\EventUser eu set eu.role = \".$update_role.\" WHERE eu.id = \".$event_user_id; \n \n try {\n $em = $this->getDoctrine()->getManager();\n $q = $em->createQuery($sql);\n $numUpdated = $q->execute(); \n \n //update any papers with status \"Submitted\" to status \"Accepted\" if scorer 1 became scorer 2\n if ($update_role==$role_scorer2_id) {\n $status_submitted = $em->getRepository('NwpAssessmentBundle:ScoringItemStatus')->findOneBy(array('name' => 'Submitted'));\n \n $queryBuilder = $em->getRepository('NwpAssessmentBundle:EventScoringItemStatusList')\n ->createQueryBuilder('esu')\n ->select('esu')\n ->where('esu.createdBy='.$scorer->getUser()->getId()) \n ->AndWhere('esu.status='.$status_submitted->getId())\n ->andWhere('esu.event='.$current_event_id)\n ->andWhere('esu.gradeLevelId='.$scorer->getGradeLevel()->getId());\n \n $query = $queryBuilder->getQuery();\n $submitted_papers= $query->getResult();\n \n \n if (count($submitted_papers)>0) {\n $status_accepted = $em->getRepository('NwpAssessmentBundle:ScoringItemStatus')->findOneBy(array('name' => 'Accepted'));\n \n foreach ($submitted_papers as $sp) { \n $entity=$this->CreateEventScoringItemStatus($sp,$status_accepted); \n $post_processing=$this->EventScoringItemStatusPostProcessing($current_event_id,$entity,$status_accepted); \n }\n }\n \n }//finish updating papers from status \"Submitted\" to \"Accepted\"\n } catch(\\Doctrine\\DBAL\\DBALException $e) {\n $error = true;\n }\n }\n if ($error ==true) {\n $this->get('session')->getFlashBag()->add('error', 'One or more roles could not be updated.');\n } else {\n $this->get('session')->getFlashBag()->add('info', 'Status has been successfully updated.');\n }\n return $error;\n }", "title": "" }, { "docid": "1c9e02baee1f1a8887f637cf83c3144e", "score": "0.48135197", "text": "public function updateJobType()\n {\n $job = array(\n 'id' => $this->vars->job_id,\n 'name' => $this->vars->name,\n 'billable' => $this->vars->billable == 'on',\n 'enabled' => $this->vars->enabled == 'on',\n 'rate' => $this->vars->rate);\n try {\n $GLOBALS['injector']\n ->getInstance('Hermes_Driver')\n ->updateJobType($job);\n } catch (Hermes_Exception $e) {\n $GLOBALS['notification']->push($e->getMessage(), 'horde.error');\n return false;\n }\n $GLOBALS['notification']->push(_(\"Job type successfully updated.\"), 'horde.success');\n\n return true;\n }", "title": "" }, { "docid": "66ede7728793f776894c6d01e9d10ef3", "score": "0.47821513", "text": "function mic_profile_convert_form_submit(&$form, &$form_state) {\n $operations = array();\n $profiles = mic_profile_get_profiles();\n $file = drupal_get_path('module', 'mic_profile') . '/mic_profile.convert.inc';\n $finished = 'mic_profile_convert_batch_finished';\n $skip = FALSE;\n\n switch ($form_state['values']['choice']) {\n case 'body':\n $callback = 'mic_profile_convert_batch_import';\n break;\n case 'tags':\n $callback = 'mic_profile_convert_tags_import';\n break;\n default:\n drupal_set_message('Nothing to convert.');\n $skip = TRUE;\n break;\n }\n\n if (!$skip) {\n foreach ($profiles as $profile) {\n $operations[] = array($callback, array($profile));\n }\n $batch = array(\n 'operations' => $operations,\n 'finished' => $finished,\n 'file' => $file,\n );\n batch_set($batch);\n }\n}", "title": "" }, { "docid": "7dd29c5fb6c734c10e7fe40d76a2feb3", "score": "0.4765358", "text": "public function processIps(\\Components\\Cron\\Models\\Job $job)\n\t{\n\t\t// load needed libraries\n\t\trequire_once Component::path('com_newsletter') . DS . 'models' . DS . 'mailing' . DS . 'recipient' . DS . 'action.php';\n\n\t\t// get db\n\t\t$database = App::get('db');\n\n\t\t$params = $job->params;\n\t\t$limit = 100;\n\t\tif (is_object($params))\n\t\t{\n\t\t\t$limit = $params->get('newsletter_ips_limit', 100);\n\t\t}\n\n\t\t// get actions\n\t\t$unconvertedActions = \\Components\\Newsletter\\Models\\Mailing\\Recipient\\Action::all()\n\t\t\t->whereRaw(\"(ipLATITUDE = '' OR ipLATITUDE IS NULL OR ipLONGITUDE = '' OR ipLONGITUDE IS NULL)\")\n\t\t\t->order('id', 'desc')\n\t\t\t->limit($limit)\n\t\t\t->rows();\n\n\t\t// convert all unconverted actions\n\t\tforeach ($unconvertedActions as $action)\n\t\t{\n\t\t\t// attempt to locate\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$location = Hubzero\\Geocode\\Geocode::locate($action->ip);\n\t\t\t}\n\t\t\tcatch (Exception $e)\n\t\t\t{\n\t\t\t\tcontinue;\n\n\t\t\t\t/*$location = array(\n\t\t\t\t\t'countryCode' => '',\n\t\t\t\t\t'country' => '',\n\t\t\t\t\t'region' => '',\n\t\t\t\t\t'city' => '',\n\t\t\t\t\t'latitude' => 0.0,\n\t\t\t\t\t'longitude' => 0.0\n\t\t\t\t);*/\n\t\t\t}\n\n\t\t\t// if we got a valid result lets update our action with location info\n\t\t\tif (!empty($location) && $location['latitude'] != '' && $location['longitude'] != '-')\n\t\t\t{\n\t\t\t\t$sql = \"UPDATE `#__newsletter_mailing_recipient_actions`\n\t\t\t\t\t\tSET\n\t\t\t\t\t\t\tcountrySHORT=\" . $database->quote($location['countryCode']) . \",\n\t\t\t\t\t\t\tcountryLONG=\" . $database->quote($location['country']) . \",\n\t\t\t\t\t\t\tipREGION=\" . $database->quote($location['region']) . \",\n\t\t\t\t\t\t\tipCITY=\" . $database->quote($location['city']) . \",\n\t\t\t\t\t\t\tipLATITUDE=\" . $database->quote($location['latitude']) . \",\n\t\t\t\t\t\t\tipLONGITUDE=\" . $database->quote($location['longitude']) . \"\n\t\t\t\t\t\tWHERE id=\" . $database->quote($action->id);\n\t\t\t\t$database->setQuery($sql);\n\t\t\t\t$database->query();\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "bcbb9ddc82935da96e8c7034b20ec0c2", "score": "0.4753967", "text": "function abortConvertCollectionAction($jobId)\r\n\t{\r\n\t\treturn $this->abortJobAction($jobId, KalturaBatchJobType::CONVERT_COLLECTION);\r\n\t}", "title": "" }, { "docid": "b72ae84991a0097b82e2e2a8a5918879", "score": "0.4747363", "text": "public function testUpdateJobTypeCustomFields()\n {\n }", "title": "" }, { "docid": "8a9a2d3de2ce6bab3a2af1b3ec13c0e4", "score": "0.47275728", "text": "function getExclusiveFileSyncImportJobsAction(KalturaExclusiveLockKey $lockKey, $maxExecutionTime, $numberOfJobs, KalturaBatchJobFilter $filter = null)\r\n\t{\r\n\t\t$jobs = $this->getExclusiveJobsAction($lockKey, $maxExecutionTime, $numberOfJobs, $filter, BatchJobType::FILESYNC_IMPORT );\r\n\t\t\r\n\t\tif($jobs)\r\n\t\t{\r\n\t\t\t\r\n\t\t\tforeach ($jobs as $job)\r\n\t\t\t{\r\n\t\t\t\t$data = $job->data;\r\n\t\t\t\t// try to get destination path from file sync\r\n\t\t\t\t$fileSyncId = $data->filesyncId;\r\n\t\t\t\t\r\n\t\t\t\t$fileSync = FileSyncPeer::retrieveByPK($fileSyncId);\r\n\t\t\t\tif (!$fileSync) {\r\n\t\t\t\t\tthrow new KalturaAPIException(MultiCentersErrors::INVALID_FILESYNC_RECORD, $fileSyncId);\r\n\t\t\t\t}\r\n\t\t\t\t$fileSyncRoot = $fileSync->getFileRoot();\r\n\t\t\t\t$fileSyncPath = $fileSync->getFilePath();\r\n\t\t\t\t\r\n\t\t\t\tif ($fileSyncRoot && $fileSyncPath) {\r\n\t\t\t\t\t// destination path set on filesync\r\n\t\t\t\t\t$dest_path = $fileSyncRoot.$fileSyncPath;\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t// not set on filesync - get path from path manager\r\n\t\t\t\t\t$fileSyncKey = kFileSyncUtils::getKeyForFileSync($fileSync);\r\n\t\t\t\t\tlist($file_root, $real_path) = kPathManager::getFilePathArr($fileSyncKey);\r\n\t\t\t\t\t$dest_path = $file_root . $real_path;\r\n\t\t\t\t\t// update filesync on database\r\n\t\t\t\t\t$fileSync->setFileRoot($file_root);\r\n\t\t\t\t\t$fileSync->setFilePath($real_path);\r\n\t\t\t\t\t$fileSync->save();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// update job data with destination path if needed\r\n\t\t\t\tif (!$data->destFilePath) {\t\r\n\t\t\t\t\t$data->destFilePath = $dest_path;\r\n\t\t\t\t\t$job->data = $data;\r\n\t\t\t\t\tKalturaLog::log('Updating destination path for job id [$job->id]');\r\n\t\t\t\t\t$this->updateJob($job);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (!is_dir(dirname($dest_path)) && !@mkdir(dirname($dest_path), 0755, true)) {\r\n\t\t\t\t\tKalturaLog::ERR(\"Cannot create directory [$dest_path] - \".error_get_last());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\t\t\r\n\t\treturn $jobs;\r\n\t}", "title": "" }, { "docid": "0ab27c637781656586a66bd6dc38510b", "score": "0.47189474", "text": "public function BatchUpdateJobs(\\Google\\Cloud\\Talent\\V4\\BatchUpdateJobsRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.talent.v4.JobService/BatchUpdateJobs',\n $argument,\n ['\\Google\\LongRunning\\Operation', 'decode'],\n $metadata, $options);\n }", "title": "" }, { "docid": "05bccb6f0334ca7c7adbbb3f31b9d783", "score": "0.4696061", "text": "function bookcrossing_pathauto_bulk_update_batch_process(&$context) {\n\n if (!isset($context['sandbox']['current'])) {\n\n $context['sandbox']['count'] = 0;\n\n $context['sandbox']['current'] = 0;\n\n }\n\n\n\n $query = db_select('bookcrossing_books', 'b');\n\n $query->leftJoin('url_alias', 'ua', \"CONCAT('book/', b.bid) = ua.source\");\n\n $query->addField('b', 'bid');\n\n $query->isNull('ua.source');\n\n $query->condition('b.bid', $context['sandbox']['current'], '>');\n $query->condition('b.status', BOOKCROSSING_BOOK_STATUS_RESERVED, '<>');\n\n $query->orderBy('b.bid');\n\n $query->addTag('pathauto_bulk_update');\n\n\n\n // Get the total amount of items to process.\n\n if (!isset($context['sandbox']['total'])) {\n\n $context['sandbox']['total'] = $query->countQuery()->execute()->fetchField();\n\n\n\n // If there are no nodes to update, the stop immediately.\n\n if (!$context['sandbox']['total']) {\n\n $context['finished'] = 1;\n\n return;\n\n }\n\n }\n\n\n\n $query->range(0, 25);\n\n $bids = $query->execute()->fetchCol();\n\n\n\n bookcrossing_books_update_alias_multiple($bids, 'bulkupdate');\n\n $context['sandbox']['count'] += count($bids);\n\n $context['sandbox']['current'] = max($bids);\n\n $context['message'] = t('Updated alias for book @nid.', array('@nid' => end($bids)));\n\n\n\n if ($context['sandbox']['count'] != $context['sandbox']['total']) {\n\n $context['finished'] = $context['sandbox']['count'] / $context['sandbox']['total'];\n\n }\n\n}", "title": "" }, { "docid": "f3105323a684df7393450118d9935daa", "score": "0.4693424", "text": "function ApiExecuteJob($api_run_job_row){//runs all queued jobs in a single single api run until no more\n global $BULK_FOLDER;\n $skipCountries = [ //all regional WB aggregates shown; commented out = ingest!\n \"ARB\"=>\"Arab World\",\n \"CSS\"=>\"Caribbean small states\",\n \"CEB\"=>\"Central Europe and the Baltics\",\n //\"EAS\"=>\"East Asia & Pacific (all income levels)\",\n \"EAP\"=>\"East Asia & Pacific (developing only)\",\n \"CEA\"=>\"East Asia and the Pacific (IFC classification)\",\n \"EMU\"=>\"Euro area\",\n //\"ECS\"=>\"Europe & Central Asia (all income levels)\",\n \"ECA\"=>\"Europe & Central Asia (developing only)\",\n \"CEU\"=>\"Europe and Central Asia (IFC classification)\",\n //\"EUU\"=>\"European Union\",\n \"FCS\"=>\"Fragile and conflict affected situations\",\n \"HPC\"=>\"Heavily indebted poor countries (HIPC)\",\n \"HIC\"=>\"High income\",\n //\"NOC\"=>\"High income: nonOECD\",\n //\"OEC\"=>\"High income: OECD\",\n //\"LCN\"=>\"Latin America & Caribbean (all income levels)\",\n \"LAC\"=>\"Latin America & Caribbean (developing only)\",\n \"CLA\"=>\"Latin America and the Caribbean (IFC classification)\",\n \"LDC\"=>\"Least developed countries: UN classification\",\n \"LMY\"=>\"Low & middle income\",\n //\"LIC\"=>\"Low income\",\n //\"LMC\"=>\"Lower middle income\",\n //\"MEA\"=>\"Middle East & North Africa (all income levels)\",\n \"MNA\"=>\"Middle East & North Africa (developing only)\",\n \"CME\"=>\"Middle East and North Africa (IFC classification)\",\n \"MIC\"=>\"Middle income\",\n //\"NAC\"=>\"North America\",\n //\"OED\"=>\"OECD members\",\n \"OSS\"=>\"Other small states\",\n \"PSS\"=>\"Pacific island small states\",\n \"SST\"=>\"Small states\",\n //\"SAS\"=>\"South Asia\",\n \"CSA\"=>\"South Asia (IFC classification)\",\n //\"SSF\"=>\"Sub-Saharan Africa (all income levels)\",\n \"SSA\"=>\"Sub-Saharan Africa (developing only)\",\n \"CAA\"=>\"Sub-Saharan Africa (IFC classification)\",\n //\"UMC\"=>\"Upper middle income\",\n //\"WLD\"=>\"World\",\n ];\n\n $apidt = date(\"Y-m-d\");\n global $MAIL_HEADER, $db;\n $jobid = $api_run_job_row[\"jobid\"];\n $runid = $api_run_job_row[\"runid\"];\n $apiid = $api_run_job_row[\"apiid\"];\n $src = $api_run_job_row[\"name\"];\n\n $CountrySeriesFile_CountryCodeColumn=0; //column A\n $CountrySeriesFile_SetCodeColumn=1; //column B\n $CountrySeriesFile_SetDataMetaData=2; //column C\n\n\n// (a) create dataset root_cat\n $ROOT_WB_CATID = $api_run_job_row[\"rootcatid\"];\n $rawJobJson = $api_run_job_row['jobjson'];\n $sanitizedJobJson = str_replace(\"\\n\", \"\", $rawJobJson); //the lousy php encode throws leaves carriage return in string that its decoder can't handle\n $datasetInfo = json_decode($sanitizedJobJson, true);\n preprint($datasetInfo);\n $acronym = $datasetInfo[\"acronym\"];\n $datasetRootCatId = setCategoryById($api_run_job_row['apiid'], $acronym, $datasetInfo[\"category\"], $ROOT_WB_CATID);\n\n $DataFile_CountryNameColumn = $datasetInfo[\"DataFile_CountryNameColumn\"];\n $DataFile_CountryCodeColumn = $datasetInfo[\"DataFile_CountryCodeColumn\"];\n $DataFile_SeriesCodeColumn = $datasetInfo[\"DataFile_SeriesCodeColumn\"];\n $DataFile_DataColumn = $datasetInfo[\"DataFile_DataColumn\"];\n\n// (b) create theme\n $theme = getTheme($apiid, $datasetInfo[\"datasetName\"], $datasetInfo[\"themeMetadata\"], $acronym);\n $themeId = $theme[\"themeid\"];\n //reusable SQL statements\n $updateRunSql = \"update apiruns set finishdt=now() where runid=\".$runid;\n $updateJobSql = \"update apirunjobs set status = 'R', enddt=now() where jobid=$jobid\";\n\n //UPDATE THE RUN'S FINISH DATE\n runQuery($updateRunSql);\n\n// (c) loop through series and create sets, cats, and catsets\n\n //$result is a pointer to the job to run\n set_time_limit(60);\n\n $datasetName = $datasetInfo['datasetName'];\n $sets = []; //used to store set headers in memory until data file ingested to solve LCU series problem\n print(\"STARTING WB : $datasetName (job $jobid)<br>\\r\\n\");\n\n $seriesFilePointer=fopen($BULK_FOLDER.$datasetInfo[\"files\"][\"series\"], \"r\");\n $columns = fgetcsv($seriesFilePointer); //header line\n $initial = true;\n $opCount = 0;\n while(!feof($seriesFilePointer)){\n $opCount++;\n if($opCount == intval($opCount/100)*100){\n runQuery($updateRunSql);\n runQuery($updateJobSql);\n set_time_limit(60);\n }\n $values = fgetcsv($seriesFilePointer);\n if(count($values)>5){ //don't try to injest blank line(s) at bottom of file\n $catId = $datasetRootCatId;\n $subCats = explode(\":\", $values[array_search($datasetInfo[\"subcategories\"], $columns)]);\n foreach($subCats as $cat){\n if(strlen(trim($cat))>0){\n $catId = setCategoryByName($apiid, $cat, $catId);\n }\n }\n $setKey = $acronym.\":\".$values[$CountrySeriesFile_CountryCodeColumn];\n $setName = $values[array_search($datasetInfo[\"name\"], $columns)];\n $metaColumns = $datasetInfo[\"metaData\"];\n $setMeta = \"\";\n foreach($metaColumns as $metaColumn){\n $metaPart = $values[array_search($metaColumn, $columns)];\n if(strlen(trim($metaPart))>0 && strpos($setMeta, trim($metaPart))===false) $setMeta .= \" \".$metaPart;\n }\n $setMeta = trim($setMeta);\n preg_match_all(\"#\\(([^\\)]+)\\)#\", $setName, $matches);\n if(count($matches[0])>0){\n //var_dump($matches);\n $setUnits = $matches[1][count($matches[1])-1]; //last match, exclusive of parentheses\n $setName = str_replace($matches[0][count($matches[0])-1], \"\", $setName);\n //remove sources conflated with units and cleanup\n $setUnits = str_replace(\"FAO, \",\"\", $setUnits);\n $setUnits = str_replace(\"metric tons\",\"metric tonnes\", $setUnits);\n\n } else {\n $setUnits = \"\";\n }\n if(strpos($setUnits, \"LCU\")===false){\n $setId = saveSet($apiid, $setKey, $setName, $setUnits, $src, $datasetInfo[\"url\"], $setMeta, $datasetInfo[\"lastrevisiondate\"], $themeId);\n $sets[$setKey] = [\"setid\"=>$setId];\n setCatSet($catId, $setId);\n $sets[$setKey] = [\n \"setid\"=>$setId\n ];\n //printNow(\"$setId ($setKey): $setName\");\n } else {\n $sets[$setKey] = [\n \"name\"=>$setName,\n \"units\"=>$setUnits,\n \"src\"=>$src,\n \"meta\"=>$setMeta,\n \"catid\"=>$catId,\n \"setid\"=> false\n ];\n }\n }\n }\n fclose($seriesFilePointer);\n\n// (e) loop through series data and create / update setdata records\n\n print(\"INGEST WB DATA : $datasetName (job $jobid)<br>\\r\\n\");\n $status = array(\"updated\"=>0,\"failed\"=>0,\"skipped\"=>0, \"added\"=>0);\n $dataFilePath = $BULK_FOLDER.$datasetInfo[\"files\"][\"data\"];\n $dataFilePointer = fopen($dataFilePath, \"r\");\n $columns = fgetcsv($dataFilePointer); //header line\n $loggedCountryCodes = [];\n $loggedSetKeys = [];\n while(!feof($dataFilePointer)){\n $opCount++;\n if($opCount == intval($opCount/100)*100){ //don't update every time = too much unnecessary overhead\n runQuery($updateRunSql);\n runQuery($updateJobSql);\n }\n\n $values = fgetcsv($dataFilePointer);\n $countyCode = $values[$DataFile_CountryCodeColumn];\n $wbCountryName = $values[$DataFile_CountryNameColumn];\n if(!array_key_exists($countyCode, $skipCountries)){\n if($countyCode==\"ADO\" && $wbCountryName==\"Andorra\") $countyCode = \"AND\"; //Andorra's ISO code is wrong in\n if($countyCode==\"ZAR\" && ($wbCountryName==\"Dem. Rep. Congo\" || $wbCountryName==\"Congo, Dem. Rep.\")) $countyCode = \"COD\"; //WB still using old Zaire code\n if($countyCode==\"IMY\" && $wbCountryName==\"Isle of Man\") $countyCode = \"IMN\"; //proposed ISO\n if($countyCode==\"ROM\" && $wbCountryName==\"Romania\") $countyCode = \"ROU\"; //not sure why WB had wrong code...\n if($countyCode==\"TMP\" && $wbCountryName==\"Timor-Leste\") $countyCode = \"TLS\"; //Andorra's ISO code is wrong in\n if($countyCode==\"WBG\" && $wbCountryName==\"West Bank and Gaza\") $countyCode = \"PSE\"; //WB prob under pressure not to recognize Palestine ISO\n\n $setKey = $acronym . \":\" . $values[$DataFile_SeriesCodeColumn];\n $data = [];\n for($c=$DataFile_DataColumn;$c<count($values);$c++){\n if(is_numeric($values[$c])){\n $yearMatches = [];\n preg_match(\"#\\d{4}#\", $columns[$c], $yearMatches);\n $data[] = $yearMatches[0] .\":\". floatval($values[$c]); //TODO: monthly data may require formatting $column values\n }\n }\n if(count($data)>0){\n $geo = isoLookup($countyCode);\n if($geo){\n if(isset($sets[$setKey])){\n $geoId = $geo[\"geoid\"];\n if($sets[$setKey][\"setid\"]){\n $setId = $sets[$setKey][\"setid\"];\n } else {\n //LCU\n $lcuSetKey = $setKey . \":\" . $geo[\"currency\"];\n if(isset($sets[$lcuSetKey])){\n $setId = $sets[$lcuSetKey][\"setid\"];\n } else {\n $lcuSetUnits = str_replace(\"LCU\", $geo[\"currency\"], $sets[$setKey][\"units\"]);\n $setName = $sets[$setKey][\"name\"];\n $setMeta = $sets[$setKey][\"meta\"];\n $src = $sets[$setKey][\"src\"];\n $setId = saveSet($apiid, $lcuSetKey, $setName, $lcuSetUnits, $src, $datasetInfo[\"url\"], $sets[$setKey][\"meta\"], $datasetInfo[\"lastrevisiondate\"], $themeId);\n if($setId){\n setCatSet($sets[$setKey][\"catid\"], $setId);\n $sets[$lcuSetKey][\"setid\"] = $setId;\n }\n }\n }\n if($setId) {\n saveSetData($status, $setId, $apiid, null, $datasetInfo[\"freq\"], $geoId, \"\", $data);\n } else {\n print(\"unable to insert data for: \");\n var_dump($values);\n logEvent(\"WB ingest warning\", \"unable to find/insert World Bank Series for setkey $setKey in $acronym\");\n }\n } else {\n if(array_search($setKey, $loggedSetKeys)===false){\n array_push($loggedSetKeys, $setKey);\n logEvent(\"WB ingest warning\", \"missing series header for $setKey\");\n }\n }\n } else {\n if(array_search($countyCode, $loggedCountryCodes)===false){\n array_push($loggedCountryCodes, $countyCode);\n logEvent(\"WB ingest warning\", \"$countyCode ($wbCountryName) is not a recognized country code in $acronym\");\n }\n }\n }\n }\n\n }\n fclose($dataFilePointer);\n// (f) if exists, loop through country-series and update setdata.metadata\n\n if($datasetInfo[\"files\"][\"countrySeries\"] && file_exists($BULK_FOLDER.$datasetInfo[\"files\"][\"countrySeries\"])){\n $countrySeries_csv = fopen($BULK_FOLDER.$datasetInfo[\"files\"][\"countrySeries\"],\"r\");\n $columns = fgetcsv($countrySeries_csv); //header line\n while(!feof($countrySeries_csv)){\n $values = fgetcsv($countrySeries_csv);\n $CountrySeriesFile_CountryCodeColumn=0; //column A\n $CountrySeriesFile_SetCodeColumn=1; //column B\n $CountrySeriesFile_SetDataMetaData=2; //column C\n $setKey = $acronym . \":\" . $values[$CountrySeriesFile_SetCodeColumn];\n $countyCode = $values[$CountrySeriesFile_CountryCodeColumn];\n $geo = isoLookup($countyCode);\n if($geo){\n $geoId = $geo[\"geoid\"];\n if(isset($set[$setKey][\"setid\"])){\n updateSetdataMetadata($set[$setKey][\"setid\"], $datasetInfo[\"freq\"], $geoId, \"\", $values[$CountrySeriesFile_SetDataMetaData]);\n } elseif(isset($set[$setKey.\":\".$geo[\"currency\"]][\"setid\"])){\n updateSetdataMetadata($set[$setKey][\"setid\"], $datasetInfo[\"freq\"], $geoId, \"\", $values[$CountrySeriesFile_SetDataMetaData]);\n }\n }\n }\n fclose($countrySeries_csv);\n }\n\n $updatedJobJson = json_encode(array_merge($datasetInfo, $status));\n $sqlRevisionDate = safeStringSQL($datasetInfo[\"lastrevisiondate\"]);\n runQuery(\"update themes set apidt = $sqlRevisionDate where themeid = $themeId\");\n runQuery(\"update apirunjobs set status = 'S', jobjson=\".safeStringSQL($updatedJobJson). \", enddt=now() where jobid=$jobid\");\n runQuery($updateRunSql);\n /*runQuery( \"update apiruns set scanned=scanned+\".$status[\"skipped\"].\"+\".$status[\"added\"].\"+\".$status[\"failed\"].\"+\".$status[\"updated\"]\n .\", added=added+\".$status[\"added\"]\n .\", updated=updated+\".$status[\"updated\"]\n .\", failed=failed+\".$status[\"failed\"]\n .\" where runid=$runid\");*/\n\n print(\"ENDING WB: file=\".$BULK_FOLDER.$datasetInfo[\"filePrefix\"].\"_Series.csv\".\" (job $jobid)<br>\\r\\n\");\n return $status;\n}", "title": "" }, { "docid": "64ce85496c8aeead16925ec3cdbf991c", "score": "0.4691074", "text": "public function testIfBulkUpdateTaskFindsBackendUsersToBeUpdated() {}", "title": "" }, { "docid": "055fcb4a72e3326a06fb1ea5877260c2", "score": "0.4689756", "text": "function ApiExecuteJob($api_run_job_row){\n global $MAIL_HEADER, $db;\n $jobid = $api_run_job_row[\"jobid\"];\n $runid = $api_run_job_row[\"runid\"];\n $apiid = $api_run_job_row[\"apiid\"];\n\n //reusable SQL statements\n $updateRunSql = \"update apiruns set finishdt=now() where runid=$runid\";\n $updateJobSql = \"update apirunjobs set status = 'R', enddt=now() where jobid=$jobid\";\n\n //UPDATE THE RUN'S FINISH DATE\n runQuery($updateRunSql);\n $status = array(\"updated\"=>0,\"failed\"=>0,\"skipped\"=>0, \"added\"=>0);\n\n\n //$result is a pointer to the job to run\n set_time_limit(600);\n\n $HEADER = '\"CountryCode\",\"Country\",\"ItemCode\",\"Item\",\"ElementGroup\",\"ElementCode\",\"Element\",\"Year\",\"Unit\",\"Value\",\"Flag\"';\n $colCountryCode = 0;\n $colCountry = 1;\n $colItemCode = 2;\n $colItem = 3;\n $colElementGroup = 4;\n $colElementCode\t= 5;\n $colElement\t= 6;\n $colYear = 7;\n $colUnit = 8;\n $colValue = 9;\n $colFlag = 10;\n\n $branchInfo = json_decode($api_run_job_row['jobjson'], true);\n $branchName = $branchInfo['name'];\n $catid = $branchInfo['catid'];\n print(\"STARTING FAO : $branchName (job $jobid)<br>\\r\\n\");\n $time_start = microtime(true);\n $stats = []; //parse entire file into structured assoc. array (series not always ordered together in file!)\n $csv=fopen(\"bulkfiles/fao\".$branchInfo[\"file\"],\"r\");\n $header = fgets($csv); //throw away the header line\n $lastLine = false; //must have successfully read a line to merit the final saveFaoSeries\n if($HEADER==trim($header)){ //know file format\n $headers = json_decode(\"[\". $header . \"]\");\n $lineCounter = 0;\n while(!feof($csv)){\n $line = json_decode(\"[\". fgets($csv) . \"]\");\n if(count($line)==11){\n /*$lineCounter++;\n if(intval($lineCounter/1000)*1000==$lineCounter) {\n $time_elapsed = (microtime(true) - $time_start)*1000;\n printNow($time_elapsed .\"ms for last 1000 lines: \" . $lineCounter);\n $time_start = microtime(true);\n }*/\n $setKey = $line[$colElementCode].\"-\".$line[$colItemCode].\"-\". $line[$colUnit];\n if(!isset($stats[$setKey])){\n $setName = $line[$colElement] .\": \". $line[$colItem];\n //printNow(\"new set: $setName\");\n $stats[$setKey] = [\n \"name\" => $setName,\n \"item\" => $line[$colItem],\n \"units\" => $line[$colUnit],\n \"series\" => []\n ];\n }\n //special country cases\n if($line[$colCountry] == \"Ethiopia PDR\") $line[$colCountry] = \"Ethiopia\"; //combine the two into a single series under geoid=72\n\n\n if(faoCountryLookup($line[$colCountry])){\n if(!isset($stats[$setKey][\"series\"][$line[$colCountry]])){\n $stats[$setKey][\"series\"][$line[$colCountry]] = [];\n }\n $stats[$setKey][\"series\"][$line[$colCountry]][] = $line[$colYear].\":\".$line[$colValue];\n } //else printNow(\"not found $line[$colCountry]\");\n }\n }\n //finished reading file\n foreach($stats as $setKey => &$set){\n set_time_limit(600);\n foreach($set[\"series\"] as $country => &$data){\n if(count($data)>0 && strpos($set[\"units\"], \"LCU\")===false ){\n $geo = faoCountryLookup($country);\n if(!isset($set[\"setid\"])){\n //set with data & need to save/get the set from the db\n if(strpos($set[\"units\"], \"SLC\")!==false){\n $thisSetKey = $setKey . \":\" . $geo[\"currency\"];\n $thisSetName = str_ireplace(\"SLC\",$geo[\"currency\"], $set[\"name\"]);\n $thisSetName = str_ireplace(\"Standard Local Currency\",$geo[\"currency\"], $thisSetName);\n $thisSetUnits = str_replace(\"SLC\",$geo[\"currency\"], $set[\"units\"]);\n $thisSetId = saveSet($apiid, $thisSetKey, $thisSetName, $thisSetUnits, \"UNFAO\", \"http://faostat3.fao.org/home/E\", \"Data from \".$branchInfo[\"link\"]);\n //note: do not save setid for series in SLC because the set is actually multiple sets by currency\n } else {\n $thisSetId = saveSet($apiid, $setKey, $set[\"name\"], $set[\"units\"], \"UNFAO\", \"http://faostat3.fao.org/home/E\", \"Data from \".$branchInfo[\"link\"]);\n if(!$thisSetId) emailAdminFatal(\"error ingesting FAO\", \"unable to save set: $setKey $set[name] $set[units]\");\n $set[\"setid\"] = $thisSetId; //save to only call db once\n }\n } else {\n $thisSetId = $set[\"setid\"];\n }\n if(isset($set[\"series\"][\"catid\"])){\n $thisCatId = $set[\"series\"][\"catid\"];\n } else {\n $item = $set[\"item\"];\n $thisCatId = setCategoryByName($apiid, $item, $branchInfo[\"catid\"]);\n setCatSet($thisCatId, $thisSetId);\n }\n sort($data);\n saveSetData($status, $thisSetId, $apiid, null, \"A\", $geo[\"geoid\"], \"\", $data, date(\"Y-m-d\"));\n }\n }\n }\n unset($stats); //delete the massive assoc array from mem.\n $updatedJobJson = json_encode(array_merge($branchInfo, $status));\n runQuery( \"update apirunjobs set status = 'S', jobjson=\".safeStringSQL($updatedJobJson). \", enddt=now() where jobid=$jobid\");\n /* runQuery($updateRunSql);\n runQuery( \"update apiruns set scanned=scanned+\".$status[\"skipped\"].\"+\".$status[\"added\"].\"+\".$status[\"failed\"].\"+\".$status[\"updated\"]\n .\", added=added+\".$status[\"added\"]\n .\", updated=updated+\".$status[\"updated\"]\n .\", failed=failed+\".$status[\"failed\"]\n .\" where runid=$runid\");*/\n\n } else { //unknown file format\n print(\"mismatch between file header format and expected format<br>\".$header.\"X<br>\");\n print($HEADER.\"X<br>\");\n runQuery( \"update apirunjobs set status = 'F', enddt=now() where jobid=$jobid\");\n runQuery($updateRunSql);\n }\n print(\"ENDING FAO $branchName: \".$branchInfo[\"file\"].\" (job $jobid)<br>\\r\\n\");\n return $status;\n}", "title": "" }, { "docid": "3f12ae6281396574982ea3739e74f243", "score": "0.46854347", "text": "function user_pathauto_bulk_update_batch_process(&$context) {\n if (!isset($context['sandbox']['current'])) {\n $context['sandbox']['count'] = 0;\n $context['sandbox']['current'] = 0;\n }\n\n $query = db_select('users', 'u');\n $query->leftJoin('url_alias', 'ua', \"CONCAT('user/', u.uid) = ua.source\");\n $query->addField('u', 'uid');\n $query->isNull('ua.source');\n $query->condition('u.uid', $context['sandbox']['current'], '>');\n $query->orderBy('u.uid');\n $query->addTag('pathauto_bulk_update');\n $query->addMetaData('entity', 'user');\n\n // Get the total amount of items to process.\n if (!isset($context['sandbox']['total'])) {\n $context['sandbox']['total'] = $query->countQuery()->execute()->fetchField();\n\n // If there are no nodes to update, the stop immediately.\n if (!$context['sandbox']['total']) {\n $context['finished'] = 1;\n return;\n }\n }\n\n $query->range(0, 25);\n $uids = $query->execute()->fetchCol();\n\n pathauto_user_update_alias_multiple($uids, 'bulkupdate', array());\n $context['sandbox']['count'] += count($uids);\n $context['sandbox']['current'] = max($uids);\n $context['message'] = t('Updated alias for user @uid.', array('@uid' => end($uids)));\n\n if ($context['sandbox']['count'] != $context['sandbox']['total']) {\n $context['finished'] = $context['sandbox']['count'] / $context['sandbox']['total'];\n }\n}", "title": "" }, { "docid": "d0db69844102e2000e294641087c709c", "score": "0.46729863", "text": "function updateMany($collection_name,$filter,$values){\n $update = new MongoDB\\Driver\\BulkWrite;\n $writeConcern = new MongoDB\\Driver\\WriteConcern(MongoDB\\Driver\\WriteConcern::MAJORITY, 100);\n $update->update($filter,$values);\n $result = $this->conn->executeBulkWrite($this->database.'.'.$collection_name, $update,['multi'=>true,'upsert'=>false]);\n if($result->getModifiedCount() > 0){\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }", "title": "" }, { "docid": "faf4e46b8db7de1ed97d9b9ea4cf72a8", "score": "0.46531874", "text": "function ApiExecuteJob($api_run_job_row){\n\n global $jodi_codes, $HEADER, $COL_COUNTRY, $COL_PRODUCT, $COL_FLOW, $COL_UNIT, $COL_DATE, $COL_VALUE;\n static $MONTHS = array(\n \"JAN\"=>\"01\",\n \"FEB\"=>\"02\",\n \"MAR\"=>\"03\",\n \"APR\"=>\"04\",\n \"MAY\"=>\"05\",\n \"JUN\"=>\"06\",\n \"JUL\"=>\"07\",\n \"AUG\"=>\"08\",\n \"SEP\"=>\"09\",\n \"OCT\"=>\"10\",\n \"NOV\"=>\"11\",\n \"DEC\"=>\"12\"\n );\n $unrecognized = [];\n global $MAIL_HEADER, $db;\n $jobid = $api_run_job_row[\"jobid\"];\n $runid = $api_run_job_row[\"runid\"];\n $apiid = $api_run_job_row[\"apiid\"];\n $status = array(\"updated\"=>0,\"failed\"=>0,\"skipped\"=>0, \"added\"=>0);\n\n //reusable update SQL\n $timestamp_run_sql = \"update apiruns set finishdt=now() where runid = \" . $runid; //UPDATE THE RUN'S FINISH DATE\n $timestamp_job_sql = \"update apirunjobs set enddt=now(), status='R' where jobid =\".$jobid;\n runQuery($timestamp_run_sql);\n runQuery($timestamp_job_sql);\n\n set_time_limit(60);\n $jobInfo = json_decode($api_run_job_row[\"jobjson\"], true);\n\n $csv = fopen(\"bulkfiles/jodi/\".$jobInfo[\"filename\"].\".csv\", \"r\");\n $header = fgets($csv); //throw away the header line\n set_time_limit(300);\n if($HEADER==trim($header)){ //confirm file format\n runQuery(\"delete from temp_jodi where file = \" . $jobInfo[\"filenum\"], \"clear jodi processing table\");\n $initial = true;\n $series_header = explode(\",\", $header);\n $i=0;\n while(!feof($csv)){\n $line = fgets($csv); //double quotes not used\n $aryLine = explode(\",\", $line);\n if(count($aryLine)==8){\n $mdDate = substr($aryLine[$COL_DATE], 3) . $MONTHS[substr($aryLine[$COL_DATE], 0, 3)];\n $aryLine[$COL_DATE] = $mdDate;\n if($aryLine[$COL_COUNTRY]!=$series_header[$COL_COUNTRY] || $aryLine[$COL_PRODUCT]!=$series_header[$COL_PRODUCT] || $aryLine[$COL_FLOW]!=$series_header[$COL_FLOW] || $aryLine[$COL_UNIT]!=$series_header[$COL_UNIT]){ //series\n set_time_limit(600);\n if(!$initial){\n updateTempJodi($jobInfo[\"filenum\"], $series_header, $data);\n runQuery($timestamp_run_sql);\n runQuery($timestamp_job_sql);\n } else {\n $initial = false;\n }\n //start series\n $series_header = $aryLine;\n $data = $mdDate.\":\".($aryLine[$COL_VALUE]==\"\"?\"null\":$aryLine[$COL_VALUE]);\n } else { //another point in current series\n $data .= \",\" . $mdDate .\":\".($aryLine[$COL_VALUE]==\"\"?\"null\":$aryLine[$COL_VALUE]);\n }\n }\n $i++;\n if($i/100 == intval($i/100)){\n runQuery($timestamp_run_sql);\n runQuery($timestamp_job_sql);\n }\n }\n updateTempJodi($jobInfo[\"filenum\"], $series_header, $data);\n print(\"STARTING JODI JOBID \".$jobid.\"<br>\".\"\\r\\n\");\n\n\n $jodi_records = runQuery(\"select * from temp_jodi where file=\" . $jobInfo[\"filenum\"]);\n while ($aRow = $jodi_records->fetch_assoc()){\n set_time_limit(10);\n $line = $aRow[\"keypart\"]; //double quotes not used\n $aryLine = explode(\",\", $line);\n\n $i++;\n if($i/100 == intval($i/100)){\n runQuery($timestamp_run_sql);\n runQuery($timestamp_job_sql);\n }\n if(isset($jodi_codes[$jobInfo[\"name\"]][$aryLine[$COL_PRODUCT]][\"name\"])){\n $parentCatId = setCategoryByName($apiid, $jodi_codes[$jobInfo[\"name\"]][$aryLine[$COL_PRODUCT]][\"name\"], $jobInfo[\"catid\"]);\n } else {\n if(!isset($unrecognized[$aryLine[$COL_PRODUCT]])){\n $unrecognized[$aryLine[$COL_PRODUCT]] = true;\n logEvent(\"JODI ingest error\", \"unrecognized product code \".$aryLine[$COL_PRODUCT]);\n }\n $status[\"failed\"]++;\n $parentCatId = false;\n }\n\n\n if(isset($jodi_codes[$jobInfo[\"name\"]][$aryLine[$COL_FLOW]][\"name\"])){\n $flowCatId = setCategoryByName($apiid, $jodi_codes[$jobInfo[\"name\"]][$aryLine[$COL_FLOW]][\"name\"], $parentCatId);\n } else {\n if(!isset($unrecognized[$aryLine[$COL_FLOW]])){\n $unrecognized[$aryLine[$COL_FLOW]] = true;\n logEvent(\"JODI ingest error\", \"unrecognized flow code \".$aryLine[$COL_FLOW]);\n }\n $status[\"failed\"]++;\n $flowCatId = false;\n }\n if($flowCatId && $parentCatId){\n $countryRow = countryLookup($aryLine[$COL_COUNTRY]); //if country not found, processing terminates\n $setKey = $aryLine[$COL_PRODUCT].\"-\".$aryLine[$COL_FLOW].\"-\".$aryLine[$COL_UNIT];\n //$skey = $setKey.\":\".$countryRow[\"iso3166\"];\n $setName = $jodi_codes[$jobInfo[\"name\"]][$aryLine[$COL_PRODUCT]][\"name\"] .\": \". $jodi_codes[$jobInfo[\"name\"]][$aryLine[$COL_FLOW]][\"name\"];\n $setMeta = $jodi_codes[$jobInfo[\"name\"]][$aryLine[$COL_PRODUCT]][\"meta\"] .\" \". $jodi_codes[$jobInfo[\"name\"]][$aryLine[$COL_FLOW]][\"meta\"] .\" \". $jodi_codes[\"unit\"][$aryLine[$COL_UNIT]][\"meta\"];\n\n $aryData = explode(\",\", $aRow[\"data\"]);\n sort($aryData);\n $setId = saveSet($apiid, $setKey, $setName, $jodi_codes[\"unit\"][$aryLine[$COL_UNIT]][\"full\"], \"Joint Oil Data Initiative\",\"http://www.jodidata.org/oil/database/data-downloads.aspx\", $setMeta);\n\n saveSetData($status, $setId, $apiid, null, \"M\", $countryRow[\"geoid\"], \"\", $aryData, false, date(\"Y-m-d\"), false, \"JODI set save\");\n setCatSet($flowCatId, $setId);\n }\n }\n $updatedJobJson = json_encode(array_merge($status, $jobInfo));\n print(\"COMPLETE JODI JOBID \".$jobid.\"<br>\".\"\\r\\n\");\n\n } else { //unknown file format\n print(\"Header Format mismatch:<br>\");\n print(\"actual header:\".$header.\"<br>\");\n print(\"expected header:\".$HEADER.\"<br>\");\n runQuery(\"update apirunjobs set status = 'F', enddt=now() where jobid=$jobid\");\n runQuery($timestamp_run_sql);\n }\n return $status;\n}", "title": "" }, { "docid": "03437a1c322781c0facb63d7a571d443", "score": "0.4651197", "text": "public function update($collection, $data = [], $filter = [], $upsert = false, $multi = true, $arraize = false) {\n $bulk = new \\MongoDB\\Driver\\BulkWrite;\n\n if (isset($data['id'])) {\n unset($data['id']);\n }\n\n $bulk->update(\n $this->_handle_filter($filter), ['$set' => $this->_handle_data($data, $arraize)], ['multi' => $multi, 'upsert' => $upsert]\n );\n\n $result = $this->db->executeBulkWrite($this->dbname . '.' . $collection, $bulk);\n\n\n return $result;\n }", "title": "" }, { "docid": "29ce7a234c8b3bdc1516d035ab288a8c", "score": "0.4648133", "text": "public function process_bulk_action() \n {\n \n if( 'bulk-delete' === $this->current_action() ) {\n \n if( isset( $_POST['mpr_points_ids'] ) && !empty( $_POST['mpr_points_ids'] ))\n {\n $all_id = $_POST['mpr_points_ids'];\n foreach ($all_id as $key => $value) {\n \n delete_user_meta($value,'mwb_wpr_points');\n }\n }\n }\n }", "title": "" }, { "docid": "760e208ead4d26a8e9ed2ca437a64983", "score": "0.46420762", "text": "function retryPostConvertAction($jobId)\r\n\t{\r\n\t\treturn $this->retryJobAction($jobId, KalturaBatchJobType::POSTCONVERT);\r\n\t}", "title": "" }, { "docid": "df1bc65aaf7d333dc8affa1f88a857f5", "score": "0.46349135", "text": "public function updateBatchData()\n {\n\t\t$productArray = array();\n\t\t$getData = array();\n\t\t$funcName = array();\n\t\t$productArray = func_get_arg(0);\n\t\t$headerArray = func_get_arg(1);\n\t\tfor($data=0;$data<count($productArray);$data++)\n\t\t{\n\t\t\t$funcName[$data] = $productArray[$data][0]->getName();\n\t\t\t$getData[$data] = $productArray[$data][0]->$funcName[$data]();\n\t\t\t$keyName[$data] = $productArray[$data][0]->getkey();\n\t\t}\n\t\t$productId = $productArray[0][0]->getProductId();\n\t\t//data pass to the model object for update\n\t\t$productModel = new ProductModel();\n\t\t$status = $productModel->updateBatchData($getData,$keyName,$productId,$headerArray);\n\t\treturn $status;\n\t}", "title": "" }, { "docid": "1fef8eba21e3b9f6413d36afabc40076", "score": "0.46146014", "text": "public function bulkUpdate()\n {\n $profile = $this->Auth->user('profile_id');\n $branch = $this->Auth->user('branch_id');\n $user = $this->Auth->user('id');\n\n if ($this->request->is('post')) {\n $data = $this->request->getData();\n\n if ($branch === null){\n $branch = intval($data['branch_id']);\n }\n\n $file = $data['file'];\n\n // Get Sheet Data\n $sheetData = $this->getSheetData($file['tmp_name']);\n $conn = ConnectionManager::get('default');\n $conn->begin();\n\n // Insert Stock Details\n $saveDetails = $this->saveDetails($sheetData, $branch, $user);\n\n if($saveDetails === true){\n $conn->commit();\n $this->Flash->success(__('El stock fue actualizado correctamente.'));\n\n return $this->redirect(['action' => 'index']);\n } else {\n $conn->rollback();\n $this->Flash->error(__('Hubo un problema en tratando de actualizar el stock.'));\n }\n }\n\n\n\n if($profile !== 1){\n $branches = $this->SecondaryProducts->Branches->find('list', ['conditions' => ['id' => $branch]]);\n } else {\n $branches = $this->SecondaryProducts->Branches->find('list');\n }\n $this->set(compact('branches'));\n $this->set('title', \"Actualizar Masivamente\");\n }", "title": "" }, { "docid": "b963567bef5def0b8969b45fd0e1b798", "score": "0.45786887", "text": "function abortPostConvertAction($jobId)\r\n\t{\r\n\t\treturn $this->abortJobAction($jobId, KalturaBatchJobType::POSTCONVERT);\r\n\t}", "title": "" }, { "docid": "ba00cb0ec039319ca8555cdc054ad111", "score": "0.455033", "text": "public function testIfBulkUpdateTaskFindsFrontendUsersToBeUpdated() {}", "title": "" }, { "docid": "3b921891a00a2c2789c39a3edb7f9fb6", "score": "0.45495352", "text": "function abortConvertAction($jobId)\r\n\t{\r\n\t\treturn $this->abortJobAction($jobId, KalturaBatchJobType::CONVERT);\r\n\t}", "title": "" }, { "docid": "e377f49037497d6ac320e87f17a3d5df", "score": "0.4537048", "text": "function _kolab_lead_mass_update_batch_process($leads, $updates, &$context) {\n if (!isset($context['sandbox']['progress'])) {\n $context['sandbox']['progress'] = 0;\n $context['sandbox']['max'] = count($leads);\n $context['sandbox']['leads'] = $leads;\n }\n\n // Process leads by groups of 5.\n $count = min(5, count($context['sandbox']['leads']));\n for ($i = 1; $i <= $count; $i++) {\n // For each nid, load the lead, reset the values, and save it.\n $lid = array_shift($context['sandbox']['leads']);\n $lead = _kolab_lead_mass_update_helper($lid, $updates);\n\n // Store result for post-processing in the finished callback.\n $context['results'][] = l($lead->first_name . ' ' . $lead->surname . '\\'s lead', 'lead/' . $lead->lid);\n\n // Update our progress information.\n $context['sandbox']['progress']++;\n }\n\n // Inform the batch engine that we are not finished,\n // and provide an estimation of the completion level we reached.\n if ($context['sandbox']['progress'] != $context['sandbox']['max']) {\n $context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];\n }\n}", "title": "" }, { "docid": "6532b330a2a7e8be9851d8c68fecb7c1", "score": "0.4520768", "text": "function updateProcessTable($db, $remove_old_type_param)\n{\n $query_sql = 'select eid, task from tbl_process';\n $result = $db->query($query_sql);\n\n // STEP 2: for each process, get the task, change the type\n // and save the process with the new task\n $objects = array();\n while ($result && ($row = $result->fetch()))\n {\n $process_eid = $row['eid'];\n $process_task = json_decode($row['task'],true);\n\n if ($process_task === false)\n continue;\n\n // iterate through the process tasks array and change the type key\n // to \"op\" and the type value to the new job name; unset the old\n // \"type\" key\n foreach ($process_task as &$task_item)\n {\n $task_type = $task_item['type'] ?? false;\n if ($task_type === false)\n continue;\n\n $task_item['op'] = convertType($task_type);\n\n if ($remove_old_type_param === true)\n unset($task_item['type']);\n }\n\n $updated_process_task = json_encode($process_task);\n writeProcess($db, $process_eid, $updated_process_task);\n }\n}", "title": "" }, { "docid": "2d9927254781479693556bb9adaeaf59", "score": "0.45189747", "text": "public function updateCompaniesBatch($companiesBatchData = array()) {\n $companies = array();\n\n foreach($companiesBatchData as $companyData) {\n if (is_null($companyData)) {\n throw new Exception('Moesif UpdateCompany with a null companyData object');\n }\n \n if (!isset($companyData['company_id'])) {\n throw new Exception('Moesif updateCompany requires company_id field to be set');\n }\n $companies[] = $companyData;\n }\n \n $this->_sendProducer->updateCompaniesBatch($companies);\n }", "title": "" }, { "docid": "8bbe11f54f1624a6527483e39b6a772f", "score": "0.45051607", "text": "public function apply_job() \n\t\t{\n\t\t\t$this->loadModel ('JobsApply');\n\t\t\t$data['JobsApply']['job_id']\t\t\t\t\t\t=\t$_REQUEST['job_id'];\n\t\t\t$data['JobsApply']['user_id']\t\t\t\t\t\t=\t$_REQUEST['user_id'];\n\t\t\t$data['JobsApply']['cv']\t\t\t\t\t\t\t\t=\t$_REQUEST['cv'];\n\t\t\t$data['JobsApply']['certificate_degree']\t\t=\t$_REQUEST['certificate_degree'];\n\t\t\t$data['JobsApply']['date']\t\t\t\t\t\t\t=\tdate ('Y-m-d');\n\t\t\tif ($_REQUEST['job_id'] == '' or $_REQUEST['user_id'] == '' or $_REQUEST['cv'] == '' or $_REQUEST['certificate_degree'] == '') {\n\t\t\t\t$response[] = array('status'=>0,'msg'=>'Error: All fields are required.');\n\t\t\t\techo json_encode ($response);exit;\n\t\t\t} else {\n\t\t\t\tif($this->JobsApply->save ($data)) {\n\t\t\t\t\tif(@$_REQUEST['cv']!='') { \n\t\t\t\t\t\t$name\t\t\t\t\t= $user_id.\"cv.png\";\n\t\t\t\t\t\t$this->User->saveField('cv',$name);\n\t\t\t\t\t\t@$_REQUEST['cv']\t= str_replace('data:image/png;base64,', '', @$_REQUEST['image']);\n\t\t\t\t\t\t$_REQUEST['cv'] \t\t= str_replace(' ', '+',$_REQUEST['cv']);\n\t\t\t\t\t\t$unencodedData\t\t\t\t\t\t= base64_decode($_REQUEST['cv']);\n\t\t\t\t\t\t$pth \t\t\t\t\t\t\t\t\t\t\t= WWW_ROOT.'files' . DS . 'cv' . DS .$name;\n\t\t\t\t\t\tfile_put_contents($pth, $unencodedData);\n\t\t\t\t\t}\n\t\t\t\t\t$response[] = array('status'=>1,'msg'=>'success.');\n\t\t\t\t\techo json_encode ($response);exit;\n\t\t\t\t} else {\n\t\t\t\t\t$response[] = array('status'=>0,'msg'=>'error.');\n\t\t\t\t\techo json_encode ($response);exit;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "90a9fb9f4468b38107f59f82de09e1ed", "score": "0.45017776", "text": "public function update(Request $request, Job $job)\n {\n $this->validate($request,[\"action\" => \"required\"]);\n\n $where = [];\n\n $where[] = [\"sender_id\", Auth::user()->id ];\n $where[] = [\"job_id\", $job->id ];\n $where[] = [\"receiver_id\", $job->user_id];\n $where[] = [\"action\", \"apply\"];\n\n if(UserAction::Where($where)->count() == 0)\n {\n $job->userAction()\n ->attach( Auth::user()->id , [\n \"action\" => $request->action,\n \"receiver_id\" => $job->user_id ,\n \"educator_id\" => auth()->id() \n ]);\n \n if($request->action == 'apply')\n {\n $job = $job->load('user');\n $employer = $job->user;\n\n $employer->notify(new AppliedForJob(Auth()->user(), $job));\n \n }\n return 'true';\n }\n else\n {\n return 'false';\n }\n \n }", "title": "" }, { "docid": "f9cfccee0833f4fc52e3ec9f329984bd", "score": "0.4494493", "text": "public function process_bulk_action() {\n\t if( empty( $_REQUEST['_wpnonce'] ) ) {\n\t return;\n\t }\n\t\n\t if( ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'bulk-emails' ) ) {\n\t return;\n\t }\n\t\t\n\t\t$ids = isset( $_GET[ 'email' ] ) ? $_GET[ 'email' ] : false;\n\n\t\tif ( ! is_array( $ids ) )\n\t\t\t$ids = array( $ids );\n\n\t\tforeach ( $ids as $id ) {\n\t\t\tif ( 'delete' === $this->current_action() ) {\n\t\t\t\n\t\t\t\t// Clear instances of this email in the queue\n\t\t\t\tif ( false !== edd_pup_check_queue( $id ) ) {\n\t\t\t\t\tglobal $wpdb;\n\t\t\t\t\t$wpdb->delete( \"$wpdb->edd_pup_queue\", array( 'email_id' => $id ), array( '%d' ) );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Delete the email\n\t\t\t\t$goodbye = wp_delete_post( $id , true );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e514f7df00b410c0ee466a389a58bd52", "score": "0.44931918", "text": "function call_center_pathauto_bulk_update_batch_process(&$context) {\n if (!isset($context['sandbox']['current'])) {\n $context['sandbox']['count'] = 0;\n $context['sandbox']['current'] = 0;\n }\n\n $query = db_select('call_center', 'e');\n $query->leftJoin('url_alias', 'ua', \"CONCAT('call_center/', e.id) = ua.source\");\n $query->addField('e', 'id');\n $query->isNull('ua.source');\n $query->condition('e.id', $context['sandbox']['current'], '>');\n $query->orderBy('e.id');\n $query->addTag('pathauto_bulk_update');\n $query->addMetaData('entity', 'call_center');\n\n // Get the total amount of items to process.\n if (!isset($context['sandbox']['total'])) {\n $context['sandbox']['total'] = $query->countQuery()->execute()->fetchField();\n\n // If there are no nodes to update, the stop immediately.\n if (!$context['sandbox']['total']) {\n $context['finished'] = 1;\n return;\n }\n }\n\n $query->range(0, 25);\n $pids = $query->execute()->fetchCol();\n\n call_center_update_alias_multiple($pids, 'bulkupdate');\n $context['sandbox']['count'] += count($pids);\n $context['sandbox']['current'] = max($pids);\n $context['message'] = t('Updated alias for premise @pid.', array('@pid' => end($pids)));\n\n if ($context['sandbox']['count'] != $context['sandbox']['total']) {\n $context['finished'] = $context['sandbox']['count'] / $context['sandbox']['total'];\n }\n}", "title": "" }, { "docid": "bcccf1e96313c99f40ff45e398041799", "score": "0.4478778", "text": "public function smartSave() {\n if (!$this->job->validate()) {\n return false;\n }\n\n $project = $this->job->project;\n $projectVideo = $project->video;\n\n if ($projectVideo instanceof ProjectVideo) {\n $videoLanguageId = $projectVideo->video_lang_id;\n } else {\n $videoLanguageId = Language::getDefaultLangId();\n }\n\n switch ($this->job->job_type_id) {\n case JobType::TYPE_TRANSLATE:\n $transcribeJobCriteria = new CDbCriteria();\n $transcribeJobCriteria->compare('target_lang_id', $videoLanguageId);\n $transcribeJob = $project->getJobByType(JobType::TYPE_TRANSCRIBE, $transcribeJobCriteria);\n\n //If we don't have transcribe job - then we need to create it\n if (is_null($transcribeJob)) {\n $transcribeJob = $this->addIntermediateJob(array(\n 'project_id' => $project->id,\n 'job_type_id' => JobType::TYPE_TRANSCRIBE,\n 'source_lang_id' => $videoLanguageId,\n 'target_lang_id' => $videoLanguageId,\n ), new DateTime()\n );\n }\n\n if (!is_null($transcribeJob) && $this->job->is_cc == 1) {\n //check if we have conform CC job\n $conformJobCriteria = new CDbCriteria();\n $conformJobCriteria->compare('target_lang_id', $videoLanguageId);\n $conformJobCriteria->compare('is_cc', '1');\n $conformJob = $project->getJobByType(JobType::TYPE_CONFORM, $conformJobCriteria);\n\n if (is_null($conformJob)) {\n $conformJob = $this->addIntermediateJob(array(\n 'project_id' => $project->id,\n 'job_type_id' => JobType::TYPE_CONFORM,\n 'source_lang_id' => $videoLanguageId,\n 'target_lang_id' => $this->job->target_lang_id,\n ), new DateTime($transcribeJob->due_date)\n );\n }\n }\n\n //\n if ($this->job->is_cc == 1) {\n $jobStartDate = $conformJob->due_date;\n } else {\n $jobStartDate = $transcribeJob->due_date;\n }\n\n $this->job->status = PProjectJob::STATUS_NEW;\n\n if ($this->job->save()) {\n $jobPeriod = $this->calculateJobPeriod($this->job, new DateTime($jobStartDate));\n $jobPeriod->savePeriods(array($jobPeriod), $this->job->id);\n return $this->job->id;\n } else {\n return false;\n }\n\n\n break;\n }\n }", "title": "" }, { "docid": "51599bd7a52cb1ccf75b7de4a24c1d0c", "score": "0.4470602", "text": "function forum_pathauto_bulk_update_batch_process(&$context) {\n if (!isset($context['sandbox']['current'])) {\n $context['sandbox']['count'] = 0;\n $context['sandbox']['current'] = 0;\n }\n\n $query = db_select('taxonomy_term_data', 'td');\n $query->leftJoin('url_alias', 'ua', \"CONCAT('forum/', td.tid) = ua.source\");\n $query->addField('td', 'tid');\n $query->isNull('ua.source');\n $query->condition('td.tid', $context['sandbox']['current'], '>');\n $query->condition('td.vid', 'forums');\n $query->orderBy('td.tid');\n $query->addTag('pathauto_bulk_update');\n $query->addMetaData('entity', 'taxonomy_term');\n\n // Get the total amount of items to process.\n if (!isset($context['sandbox']['total'])) {\n $context['sandbox']['total'] = $query->countQuery()->execute()->fetchField();\n\n // If there are no nodes to update, the stop immediately.\n if (!$context['sandbox']['total']) {\n $context['finished'] = 1;\n return;\n }\n }\n\n $query->range(0, 25);\n $tids = $query->execute()->fetchCol();\n\n pathauto_taxonomy_term_update_alias_multiple($tids, 'bulkupdate');\n $context['sandbox']['count'] += count($tids);\n $context['sandbox']['current'] = max($tids);\n $context['message'] = t('Updated alias for forum @tid.', array('@tid' => end($tids)));\n\n if ($context['sandbox']['count'] != $context['sandbox']['total']) {\n $context['finished'] = $context['sandbox']['count'] / $context['sandbox']['total'];\n }\n}", "title": "" }, { "docid": "45fc9219c26d56151c19cb7262c73c1d", "score": "0.44670337", "text": "public function actionConversionJobByUid(){\r\n \t$start_time = date('Y-m-d H:i:s');\r\n \t\r\n \t$uid=1;\r\n \techo \"\\n cron service runnning for actionConversionJobByUid for uid:$uid at $start_time\";\r\n \t \r\n \tDashBoardHelper::initCountPlatformOrderStatus($uid);\r\n \tDashBoardHelper::initSalesCount($uid,365);\r\n \t\r\n \t//write the memery used into it as well.\r\n \t$memUsed = floor (memory_get_usage() / 1024 / 1024);\r\n \t$comment = \"\\n cron service stops for Hc Cdiscount Order Sing Shipped at \".date('Y-m-d H:i:s');\r\n \t$comment .= \" - RAM Used: \".$memUsed.\"M\";\r\n echo $comment;\r\n \\Yii::info(['Cdiscount',__CLASS__,__FUNCTION__,'Background',$comment],\"file\");\r\n }", "title": "" }, { "docid": "b2e88ee44a555a828c34e1b4b505d6c8", "score": "0.44638667", "text": "public function process_bulk_action() {\n\n\t\tif ( empty( $_REQUEST['_wpnonce'] ) ) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif ( ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'bulk-creatives' ) && ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'affwp-creative-nonce' ) ) {\n\t\t \treturn;\n\t\t}\n\n\t\t$ids = isset( $_GET['creative_id'] ) ? $_GET['creative_id'] : false;\n\n\t\tif ( ! is_array( $ids ) ) {\n\t\t\t$ids = array( $ids );\n\t\t}\n\n\t\t$ids = array_map( 'absint', $ids );\n\n\t\tif ( empty( $ids ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ( $ids as $id ) {\n\n\t\t\tif ( 'delete' === $this->current_action() ) {\n\t\t\t\taffiliate_wp()->creatives->delete( $id );\n\t\t\t}\n\n\t\t\tif ( 'activate' === $this->current_action() ) {\n\t\t\t\taffwp_set_creative_status( $id, 'active' );\n\t\t\t}\n\n\t\t\tif ( 'deactivate' === $this->current_action() ) {\n\t\t\t\taffwp_set_creative_status( $id, 'inactive' );\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Fires after a creative bulk action is performed.\n\t\t\t *\n\t\t\t * The dynamic portion of the hook name, `$this->current_action()` refers\n\t\t\t * to the current bulk action being performed.\n\t\t\t *\n\t\t\t * @since 2.1.7\n\t\t\t *\n\t\t\t * @param int $id The ID of the object.\n\t\t\t */\n\t\t\tdo_action( 'affwp_creatives_do_bulk_action_' . $this->current_action(), $id );\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "4c42451a2e2a3bb6d90f75e10e77d4dc", "score": "0.44573578", "text": "private function update_export( $export ) {\n\n\t\t$this->get_background_export_handler()->update_job( $export );\n\t}", "title": "" }, { "docid": "e4b1e5a76b33fcdcc458de606a93d42c", "score": "0.4441638", "text": "function updatePipeTable($db, $remove_old_type_param)\n{\n $query_sql = 'select eid, task from tbl_pipe';\n $result = $db->query($query_sql);\n\n // STEP 2: for each pipe, get the task, change the type\n // and save the pipe with the new task\n $objects = array();\n while ($result && ($row = $result->fetch()))\n {\n $pipe_eid = $row['eid'];\n $pipe_task = json_decode($row['task'],true);\n\n if ($pipe_task === false)\n continue;\n\n // iterate through the pipe tasks array and change the type key\n // to \"op\" and the type value to the new job name; unset the old\n // \"type\" key\n foreach ($pipe_task as &$task_item)\n {\n $task_type = $task_item['type'] ?? false;\n if ($task_type === false)\n continue;\n\n $task_item['op'] = convertType($task_type);\n\n if ($remove_old_type_param === true)\n unset($task_item['type']);\n }\n\n $updated_pipe_task = json_encode($pipe_task);\n writePipe($db, $pipe_eid, $updated_pipe_task);\n }\n}", "title": "" }, { "docid": "0e6e3d3301e61ae109472f6b48294055", "score": "0.4439369", "text": "public function customUserListingBulkAction( WWLC_User_Account $userProcessor , WWLC_Emails $emailProcessor ) {\n\n\t\t\tglobal $pagenow;\n\n\t\t\tif ( $pagenow == 'users.php' && ( current_user_can( 'manage_options' ) || current_user_can( 'manage_woocommerce' ) ) ) {\n\n\t\t\t\t// get the current action\n\t\t\t\t$wp_list_table = _get_list_table( 'WP_Users_List_Table' ); // depending on your resource type this could be WP_Users_List_Table, WP_Comments_List_Table, etc\n\t\t\t\t$action = $wp_list_table->current_action();\n\n\t\t\t\t// set allowed actions, and check if current action is in allowed actions\n\t\t\t\t$allowed_actions = array( \"wwlc_approve\" , \"wwlc_reject\" , \"wwlc_activate\" , \"wwlc_deactivate\" );\n\t\t\t\tif ( !in_array( $action , $allowed_actions ) ) return;\n\n\t\t\t\t// security check\n\t\t\t\tcheck_admin_referer('bulk-users');\n\n\t\t\t\t// make sure ids are submitted. depending on the resource type, this may be 'media' or 'ids' or 'users'\n\t\t\t\tif ( isset( $_REQUEST[ 'users' ] ) )\n\t\t\t\t\t$user_ids = $_REQUEST[ 'users' ];\n\n\t\t\t\tif ( empty( $user_ids ) ) return;\n\n\t\t\t\t// this is based on wp-admin/edit.php\n\t\t\t\t$sendback = remove_query_arg( array( 'wwlc_approve' , 'wwlc_reject' , 'wwlc_activate' , 'wwlc_deactivate' , 'untrashed' , 'deleted' , 'ids' ), wp_get_referer() );\n\t\t\t\tif ( ! $sendback )\n\t\t\t\t\t$sendback = admin_url( \"users.php\" );\n\n\t\t\t\t$pagenum = $wp_list_table->get_pagenum();\n\t\t\t\t$sendback = add_query_arg( 'paged', $pagenum, $sendback );\n\n\t\t\t\tswitch( $action ) {\n\n\t\t\t\t\tcase 'wwlc_approve':\n\n\t\t\t\t\t\t$users_activated = 0;\n\t\t\t\t\t\tforeach( $user_ids as $user_id ) {\n\n\t\t\t\t\t\t\tif ( get_current_user_id() != $user_id )\n\t\t\t\t\t\t\t\tif ( $userProcessor->approveUser( array( 'userID' => $user_id ) , $emailProcessor ) )\n\t\t\t\t\t\t\t\t\t$users_activated++;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$sendback = add_query_arg( array( 'users_approved' => $users_activated , 'ids' => join( ',' , $user_ids ) ), $sendback );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'wwlc_reject':\n\n\t\t\t\t\t\t$users_rejected = 0;\n\t\t\t\t\t\tforeach( $user_ids as $user_id ) {\n\n\t\t\t\t\t\t\tif ( get_current_user_id() != $user_id )\n\t\t\t\t\t\t\t\tif ( $userProcessor->rejectUser( array( 'userID' => $user_id ) , $emailProcessor ) )\n\t\t\t\t\t\t\t\t\t$users_rejected++;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$sendback = add_query_arg( array( 'users_rejected' => $users_rejected , 'ids' => join( ',' , $user_ids ) ), $sendback );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'wwlc_activate':\n\t\t\t\t\t\t// if we set up user permissions/capabilities, the code might look like:\n\t\t\t\t\t\t//if ( !current_user_can($post_type_object->cap->export_post, $post_id) )\n\t\t\t\t\t\t// wp_die( __('You are not allowed to export this post.') );\n\n\t\t\t\t\t\t$users_activated = 0;\n\t\t\t\t\t\tforeach( $user_ids as $user_id ) {\n\n\t\t\t\t\t\t\tif ( get_current_user_id() != $user_id )\n\t\t\t\t\t\t\t\tif ( $userProcessor->activateUser( array( 'userID' => $user_id ) ) )\n\t\t\t\t\t\t\t\t\t$users_activated++;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$sendback = add_query_arg( array( 'users_activated' => $users_activated , 'ids' => join( ',' , $user_ids ) ), $sendback );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'wwlc_deactivate':\n\n\t\t\t\t\t\t$users_deactivated = 0;\n\t\t\t\t\t\tforeach( $user_ids as $user_id ) {\n\n\t\t\t\t\t\t\tif ( get_current_user_id() != $user_id )\n\t\t\t\t\t\t\t\tif ( $userProcessor->deactivateUser( array( 'userID' => $user_id ) ) )\n\t\t\t\t\t\t\t\t\t$users_deactivated++;\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$sendback = add_query_arg( array( 'users_deactivated' => $users_deactivated , 'ids' => join( ',' , $user_ids) ), $sendback );\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault: return;\n\n\t\t\t\t}\n\n\t\t\t\t$sendback = remove_query_arg( array( 'action' , 'action2' , 'tags_input' , 'post_author' , 'comment_status', 'ping_status' , '_status', 'post', 'bulk_edit', 'post_view'), $sendback );\n\n\t\t\t\twp_redirect( $sendback );\n\t\t\t\texit();\n\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "7f8bd1efa6119547ead396cc7ef2fdc2", "score": "0.44295356", "text": "function updateBulkUploadResultsAction($bulkUploadJobId)\r\n\t{\r\n\t\t$unclosedEntriesCount = 0;\r\n\t\t$errorObjects = 0;\r\n\t\t$unclosedEntries = array();\r\n\t\t$bulkUploadResults = BulkUploadResultPeer::retrieveByBulkUploadId($bulkUploadJobId);\r\n\r\n\t\t$bulkUpload = BatchJobPeer::retrieveByPK($bulkUploadJobId);\r\n\t\tif($bulkUpload)\r\n\t\t{\r\n \t\tforeach($bulkUploadResults as $bulkUploadResult)\r\n \t\t{\r\n \t\t /* @var $bulkUploadResult BulkUploadResult */\r\n \t\t\t$status = $bulkUploadResult->updateStatusFromObject();\r\n \t\t\t\r\n \t\t\tif ($status == BulkUploadResultStatus::IN_PROGRESS )\r\n \t\t\t{\t\r\n \t\t\t$unclosedEntriesCount++;\r\n \t\t\t}\r\n \t\t\tif ($status == BulkUploadResultStatus::ERROR )\r\n \t\t\t{\r\n \t\t\t $errorObjects++;\r\n \t\t\t}\r\n \t\t}\r\n\t\t\t$data = $bulkUpload->getData();\r\n\t\t\tif($data && $data instanceof kBulkUploadJobData)\r\n\t\t\t{\r\n\t\t\t\t//TODO: find some better alternative, find out why the bulk upload result which reports error is \r\n\t\t\t\t// returning objectId \"null\" for failed entry assets, rather than the entryId to which they pertain.\r\n\t\t\t\t//$data->setNumOfEntries(BulkUploadResultPeer::countWithEntryByBulkUploadId($bulkUploadJobId));\r\n\t\t\t\t$data->setNumOfObjects(BulkUploadResultPeer::countWithObjectTypeByBulkUploadId($bulkUploadJobId, $data->getBulkUploadObjectType()));\r\n\t\t\t\t$data->setNumOfErrorObjects($errorObjects);\r\n\t\t\t\t$bulkUpload->setData($data);\r\n\t\t\t\t$bulkUpload->save();\r\n\t\t\t}\r\n\t\t}\t\t\t\r\n\t\t\r\n\t\treturn $unclosedEntriesCount;\r\n\t}", "title": "" }, { "docid": "c3effd85b24b3322694dfc8881549f9b", "score": "0.4424445", "text": "function getConvertStatusAction($jobId)\r\n\t{\r\n\t\treturn $this->getStatusAction($jobId, KalturaBatchJobType::CONVERT);\r\n\t}", "title": "" }, { "docid": "7920679eb35629acde0d1bd3503fa8a7", "score": "0.4414494", "text": "public function ajax_batch_change_status()\r\n {\r\n $res = array('status' => 'error', 'msg' => get_message('save_failed'), 'href' => '');\r\n $this->batch_id = $batch_id = intval($this->input->post('batch_id', true));\r\n $comment = trim($this->input->post('comment', true));\r\n $info['i_status'] = $st = intval($this->input->post('status')); \r\n //pr($info,1);\r\n \r\n $batchIdsArr = array();\r\n $file_info = $this->acs_model->fetch_data($this->tbl_batch_ascii_file, array('i_id' => $batch_id), 's_batch_ids'); \r\n $batchIdsArr = explode(',', $file_info[0][\"s_batch_ids\"]);\r\n \r\n $sql_t = \" UPDATE \".$this->tbl_batch_ascii_file.\" SET i_status= '\".$info['i_status'].\"' WHERE i_id = '\".addslashes($batch_id).\"' \";\r\n $this->acs_model->exc_query($sql_t, false);\r\n //pr($batchIdsArr,1);\r\n /*if($batch_id > 0)\r\n { \r\n\t\t\tunset($info, $comment, $batch_id, $status,$tmp);\r\n }*/\r\n if(!empty($batchIdsArr))\r\n {\r\n\t\t\t$res['status'] \t= 'success';\r\n\t\t\t$res['msg'] \t= get_message('save_success');\t\t\t\t\r\n\t\t\t$res['href'] \t= $this->pathtoclass.'show_list';\r\n\r\n\t\t\tforeach($batchIdsArr as $val)\r\n\t\t\t{\r\n\t\t\t\t#$sqry = \" UPDATE \".$this->tbl.\" SET i_status= '\".$info['i_status'].\"' WHERE s_batch_id = '\".addslashes($val).\"' \";\r\n\t\t\t\t$sqry = \" UPDATE \".$this->tbl.\" SET i_status= '\".$info['i_status'].\"', dt_change_status = '\".date(\"Y-m-d H:i:s\").\"' WHERE s_batch_id = '\".addslashes($val).\"' \";\r\n\t\t\t\t//if($this->acs_model->edit_data($this->tbl, $info, array('i_id' => $val)))\r\n\t\t\t\tif($this->acs_model->exc_query($sqry, false))\r\n\t\t\t\t{\r\n\t\t\t\t\t// Add batch history\r\n\t\t\t\t\t$logArr = array();\r\n\t\t\t\t\t$logArr[\"s_batch_id\"] \t= $val;\r\n\t\t\t\t\t//$logArr[\"s_action\"] \t= 'Batch status change to '._batchStatus($info['i_status']);\r\n\t\t\t\t\t$logArr[\"s_action\"] \t= _batchStatus($info['i_status']);\r\n\t\t\t\t\t$logArr[\"s_comment\"] \t= $comment;\r\n\t\t\t\t\t$logArr[\"i_status\"] \t= $info['i_status']; // first status\r\n\t\t\t\t\t$logArr[\"i_created_by\"] = $this->user_id ; // loggedin users id\r\n\t\t\t\t\t\r\n\t\t\t\t\t$this->acs_model->add_data($this->tbl_batch_status_history, $logArr);\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t//*********** send email to the customer sending him the batch number and current status 10 Nov, 2016 **********//\r\n\t\t\t\t\t// see @https://shieldwatch.teamwork.com/messages/568694?scrollTo=pmp1634382\r\n\t\t\t\t\t$user_email = '';\r\n\t\t\t\t\t//$batchInfo = $this->acs_model->fetch_data( $this->tbl, array('i_id' => $batch_id));\r\n\t\t\t\t\t$qry = \" SELECT * FROM \".$this->tbl.\" WHERE s_batch_id= '\".addslashes($val).\"' \";\r\n\t\t\t\t\t$batchInfo = $this->acs_model->exc_query($qry, true);\r\n\t\t\t\t\t$batchCode = $batchInfo[0][\"s_batch_id\"];\r\n\t\t\t\t\t$userInfo = _get_user_details($batchInfo[0][\"s_username\"]); // see@ common_helper.php\r\n\t\t\t\t\t$user_email = $userInfo[\"s_email\"];\r\n\t\t\t\t\t$auto_email_feature = $userInfo[\"i_auto_email\"];\r\n\t\t\t\t\t\r\n\t\t\t\t\tif($user_email!='' && $auto_email_feature==1)\r\n\t\t\t\t\t{\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t//$user_email = '[email protected]';\r\n\t\t\t\t\t\t$to = $user_email; // note the comma\r\n\t\t\t\t\t\t$from = '[email protected]';\r\n\t\t\t\t\t\t// subject\r\n\t\t\t\t\t\t$subject = 'Batch Status Updated';\r\n\r\n\t\t\t\t\t\t// message\r\n\t\t\t\t\t\t$message = '\r\n\t\t\t\t\t\t<html>\r\n\t\t\t\t\t\t<head>\r\n\t\t\t\t\t\t <title>Batch Status Updated</title>\r\n\t\t\t\t\t\t</head>\r\n\t\t\t\t\t\t<body>\r\n\t\t\t\t\t\t <p>Here are the details!</p>\r\n\t\t\t\t\t\t <table border=\"0\" cellspacing=\"2\" cellpading=\"2\" width=\"50%\">\r\n\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t <th>Batch Number</th><th>Current Status</th>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t <td align=\"center\">'.$batchCode.'</td><td align=\"center\">'._batchStatus($info['i_status']).'</td>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t </table>\r\n\t\t\t\t\t\t</body>\r\n\t\t\t\t\t\t</html>\r\n\t\t\t\t\t\t';\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t//if($_SERVER['SERVER_NAME']=='stagingapi.spiceandtea.com')\r\n\t\t\t\t\t\tif($_SERVER['SERVER_NAME']=='1099.codeuridea.net')\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$headers = 'MIME-Version: 1.0' . \"\\r\\n\";\r\n\t\t\t\t\t\t\t$headers .= 'Content-type: text/html; charset=utf-8' . \"\\r\\n\";\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t// Create email headers\r\n\t\t\t\t\t\t\t$headers .= 'From: '.$from.\"\\r\\n\".\r\n\t\t\t\t\t\t\t\t'Reply-To: '.$from.\"\\r\\n\" .\r\n\t\t\t\t\t\t\t\t'X-Mailer: PHP/' . phpversion();\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\r\n\t\t\t\t\t\t\t//@mail($to, $subject, $message);\r\n\t\t\t\t\t\t\t@mail($to, $subject, $message, $headers);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$i_sent = sendEmail($to, $subject, $message, $from);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\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//*********** end send email to the customer sending him the batch number and current status **********//\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 echo json_encode($res);\r\n }", "title": "" }, { "docid": "5bf886053ae0fd7025277d739f65da68", "score": "0.44082725", "text": "public function bulk(array $jobs, $data = '', ?string $queue = null);", "title": "" }, { "docid": "f49d48d8111fac01c433293af59413d4", "score": "0.4404595", "text": "function retryBulkUploadAction($jobId)\r\n\t{\r\n\t\treturn $this->retryJobAction($jobId, KalturaBatchJobType::BULKUPLOAD);\r\n\t}", "title": "" }, { "docid": "a48b7acec572127a434648ebd07f9f5a", "score": "0.43985724", "text": "function apply_MM_bundles($contactId, $emailAddress, $firstName, $lastName, $user_id, $userPass){\n\t\n\t$user_id = createMember($firstName, $lastName, $emailAddress, $userPass);\n\t\n\t$productIDs = getProductIDs($contactId);\n\t\n\t$connection = db_connect();\n\t\n\tforeach($productIDs as $productID){\n\t\t\n\t\t$MM_ProductID = get_MM_ProductID($productID);\n\t\t\n\t\t$user_email = mysqli_real_escape_string($connection, $emailAddress);\n\t\t$memberMouse_Bundle = mysqli_real_escape_string($connection, $MM_ProductID); \n\t\t\n\t\t$query = \"INSERT INTO `wp_twentyminute`.`mm_applied_bundles` (`access_type`, `access_type_id`, `bundle_id`, `days_calc_method`, `days_calc_value`, `status`, `pending_status`, `imported`, `status_updated`, `subscribed_provider_id`, `subscribed_list_id`,`cancellation_date`, `expiration_date`, `apply_date`) VALUES ('user', '$user_id', '$memberMouse_Bundle', 'join_date', '0', '1', '0', '0', CURRENT_DATE(), NULL, NULL, NULL, NULL, CURRENT_TIMESTAMP);\";\n\t\t\n\t\tif ($result = mysqli_query($connection, $query)) {\n\t\t\techo \"<p>Applied Bundles was successful.</p>\";\n\t\t}else{\n\t\t\t//LOG ERROR\n\t\t\t$errorDescription = \"apply_MM_bundles() FAILED. There was a problem with the database query or connection.\";\n\t\t\twriteError($errorDescription);\n\t\t\techo \"<p>$errorDescription</p>\";\n\t\t}\n\t}\n}", "title": "" }, { "docid": "36906f2d77ea6e0ca81a3abc504d7832", "score": "0.4397921", "text": "function deleteConvertAction($jobId)\r\n\t{\r\n\t\treturn $this->deleteJobAction($jobId, KalturaBatchJobType::CONVERT);\r\n\t}", "title": "" }, { "docid": "53a90791ab790a740bbd0bf1ab84a27b", "score": "0.43879294", "text": "public function updateToBulk($id) {\n\t\t$this->updateToType(1, $id);\n\t}", "title": "" }, { "docid": "a8ab4fdc3ff07651ed50104be93903f4", "score": "0.43837917", "text": "function handleMassUpdate() {\n\n require_once('include/formbase.php');\n global $current_user, $db;\n\n /*\n C.L. - Commented this out... not sure why it's here\n if(!is_array($this->sugarbean) && $this->sugarbean->bean_implements('ACL') && !ACLController::checkAccess($this->sugarbean->module_dir, 'edit', true))\n {\n\n }\n */\n\n foreach ($_POST as $post => $value) {\n if (empty($value)) {\n unset($_POST[$post]);\n }\n if (is_string($value)\n && isset($this->sugarbean->field_defs[$post]) &&\n ($this->sugarbean->field_defs[$post]['type'] == 'bool'\n || (!empty($this->sugarbean->field_defs[$post]['custom_type']) && $this->sugarbean->field_defs[$post]['custom_type'] == 'bool'\n ))) {\n\n\n if (strcmp($value, '2') == 0)\n $_POST[$post] = 0;\n if (!empty($this->sugarbean->field_defs[$post]['dbType']) && strcmp($this->sugarbean->field_defs[$post]['dbType'], 'varchar') == 0) {\n if (strcmp($value, '1') == 0)\n $_POST[$post] = 'on';\n if (strcmp($value, '2') == 0)\n $_POST[$post] = 'off';\n }\n }\n }\n\n if (!empty($_REQUEST['uid']))\n $_POST['mass'] = explode(',', $_REQUEST['uid']); // coming from listview\n elseif (isset($_REQUEST['entire']) && empty($_POST['mass'])) {\n if (empty($order_by))\n $order_by = '';\n $ret_array = create_export_query_relate_link_patch($_REQUEST['module'], $this->searchFields, $this->where_clauses);\n $query = $this->sugarbean->create_export_query($order_by, $ret_array['where'], $ret_array['join']);\n $result = $db->query($query, true);\n $new_arr = array();\n while ($val = $db->fetchByAssoc($result, -1, false)) {\n array_push($new_arr, $val['id']);\n }\n $_POST['mass'] = $new_arr;\n }\n\n if (isset($_POST['mass']) && is_array($_POST['mass']) && $_REQUEST['massupdate'] == 'true') {\n $count = 0;\n foreach ($_POST['mass'] as $id) {\n if (empty($id)) {\n continue;\n }\n if (isset($_POST['Delete'])) {\n $this->sugarbean->retrieve($id);\n if ($this->sugarbean->ACLAccess('Delete')) {\n //Martin Hu Bug #20872\n if ($this->sugarbean->object_name == 'EmailMan') {\n $query = \"DELETE FROM emailman WHERE id = '\" . $this->sugarbean->id . \"'\";\n $db->query($query);\n } else {\n if ($this->sugarbean->object_name == 'Team') {\n if ($this->sugarbean->private == 1) {\n die($GLOBALS['app_strings']['LBL_MASSUPDATE_DELETE_PRIVATE_TEAMS']);\n }\n if ($this->sugarbean->id == $this->sugarbean->global_team) {\n die($GLOBALS['app_strings']['LBL_MASSUPDATE_DELETE_GLOBAL_TEAM']);\n }\n }\n $this->sugarbean->mark_deleted($id);\n }\n }\n } else {\n if ($this->sugarbean->object_name == 'Contact' && isset($_POST['Sync'])) { // special for contacts module\n if ($_POST['Sync'] == 'true') {\n $this->sugarbean->retrieve($id);\n if ($this->sugarbean->ACLAccess('Save')) {\n if ($this->sugarbean->object_name == 'Contact') {\n\n $this->sugarbean->contacts_users_id = $current_user->id;\n $this->sugarbean->save(false);\n }\n }\n } elseif ($_POST['Sync'] == 'false') {\n $this->sugarbean->retrieve($id);\n if ($this->sugarbean->ACLAccess('Save')) {\n if ($this->sugarbean->object_name == 'Contact') {\n if (!isset($this->sugarbean->users)) {\n $this->sugarbean->load_relationship('user_sync');\n }\n $this->sugarbean->contacts_users_id = null;\n $this->sugarbean->user_sync->delete($this->sugarbean->id, $current_user->id);\n }\n }\n }\n } //end if for special Contact handling\n\n if ($count++ != 0) {\n //Create a new instance to clear values and handle additional updates to bean's 2,3,4...\n $className = get_class($this->sugarbean);\n $this->sugarbean = new $className();\n }\n\n $this->sugarbean->retrieve($id);\n\n foreach ($_POST as $field => $value) {\n if (isset($this->sugarbean->field_defs[$field])) {\n if ($this->sugarbean->field_defs[$field]['type'] == 'datetime') {\n $_POST[$field] = $this->date_to_dateTime($field, $value);\n }\n if ($this->sugarbean->field_defs[$field]['type'] == 'bool') {\n $this->checkClearField($field, $value);\n }\n }\n }\n\n\n\n\n\n\n\n\n\n\n\n if ($this->sugarbean->ACLAccess('Save')) {\n $_POST['record'] = $id;\n $_GET['record'] = $id;\n $_REQUEST['record'] = $id;\n $newbean = $this->sugarbean;\n //Call include/formbase.php, but do not call retrieve again\n populateFromPost('', $newbean, true);\n $newbean->save_from_post = false;\n if (!isset($_POST['parent_id']))\n $newbean->parent_type = null;\n\n $check_notify = FALSE;\n\n if (isset($this->sugarbean->assigned_user_id)) {\n $old_assigned_user_id = $this->sugarbean->assigned_user_id;\n if (!empty($_POST['assigned_user_id'])\n && ($old_assigned_user_id != $_POST['assigned_user_id'])\n && ($_POST['assigned_user_id'] != $current_user->id)) {\n $check_notify = TRUE;\n }\n }\n $email_address_id = '';\n if (!empty($_POST['optout_primary'])) {\n $optout_flag_value = 0;\n if ($_POST['optout_primary'] == 'true') {\n $optout_flag_value = 1;\n } // if\n if (isset($this->sugarbean->emailAddress)) {\n if (!empty($this->sugarbean->emailAddress->addresses)) {\n foreach ($this->sugarbean->emailAddress->addresses as $key => $emailAddressRow) {\n if ($emailAddressRow['primary_address'] == '1') {\n $email_address_id = $emailAddressRow['email_address_id'];\n break;\n } // if\n } // foreach\n } // if\n } // if\n } // if\n $newbean->save($check_notify);\n if (!empty($email_address_id)) {\n $query = \"UPDATE email_addresses SET opt_out = {$optout_flag_value} where id = '{$emailAddressRow['email_address_id']}'\";\n $GLOBALS['db']->query($query);\n } // if\n }\n }\n }\n }\n }", "title": "" }, { "docid": "5b81daa6c5ac0e6cd9f71f8581a68d35", "score": "0.43801892", "text": "public function update(Request $request, $id) {\n\n if(Auth::check())\n { \n $job = JobDetail::find($id);\n $userId = Auth::Id();\n $userToken = Session::token(); \n $formToken = $request->_token;\n\n if($userToken === $formToken)\n { \n /* validation for add skills */\n $selectedSkills = $request->job_skills;\n if($selectedSkills)\n {\n $checkSelectedSkills = count(array_filter($selectedSkills));\n\n if($checkSelectedSkills > 0){\n\n $skillsInJson = json_encode(array_filter($selectedSkills));\n\n } else {\n\n $skillsInJson = \"\";\n }\n\n } else {\n\n $skillsInJson = \"\";\n }\n\n /* Uploading Documents */\n $files = Input::file('documents'); \n $file_count = count($files);\n $documentsInJson = \"\";\n if($file_count > 0)\n {\n $uploadcount = 0; \n $job_documnets = array();\n foreach($files as $file)\n {\n $rules = array('file' => 'mimes:txt,pdf,doc,docx,xls,xlsx,odt|max:5120');\n $validator = Validator::make(array('file'=> $file), $rules);\n if($validator->passes())\n {\n $destinationPath = storage_path().'/jobDocuments/'; \n $timestamp = time(). uniqid();\n $filename = $timestamp. '_' .trim($file->getClientOriginalName());\n $upload_success = $file->move($destinationPath, $filename);\n $job_documnets[] = $filename;\n $uploadcount ++;\n }\n else\n {\n return Redirect::to('/admin/job/create')->withInput()->withErrors($validator);\n\n }\n }\n $documentsInJson = json_encode($job_documnets);\n }\n else\n {\n $documentsInJson = $job->job_documnets;\n }\n\n /* Uploading Images */\n $images = Input::file('job_images');\n $image_count = count($images); \n $imagesInJson = \"\";\n if($image_count > 0)\n { \n $uploadcount = 0; \n $job_images = array();\n foreach($images as $file)\n {\n $rules = array('file' => 'mimes:jpg,jpeg,png,gif|max:1024');\n $validator = Validator::make(array('file'=> $file), $rules);\n if($validator->passes())\n {\n $destinationPath = storage_path().'/jobImages/'; \n $timestamp = time(). uniqid();\n $filename = $timestamp. '_' .trim($file->getClientOriginalName());\n $upload_success = $file->move($destinationPath, $filename);\n $job_images[] = $filename;\n $uploadcount ++;\n }\n else\n {\n return Redirect::to('/admin/job/create')->withInput()->withErrors($validator);\n\n }\n }\n\n $imagesInJson = json_encode($$imagesInJson);\n }\n else\n {\n $imagesInJson = $imagesInJson;\n } \n\n $validator = Validator::make($request->all(), [ \n\n 'job_category' => 'required|integer',\n 'job_title' => 'required|max:255',\n 'job_subtitle' => 'required|max:255',\n 'job_keywords' => 'required|max:255',\n 'job_stage' => 'required',\n 'job_description' => 'required|max:255',\n 'job_comments' => 'required|max:255',\n 'job_cost_min' => 'required|integer',\n 'job_cost_max' => 'required|integer',\n 'job_stattime' => 'required',\n 'job_endtime' => 'required',\n 'job_skills' => 'required|max:255', \n 'job_visible_duration' => 'required',\n 'job_availble_for' => 'required|max:255',\n 'status' => 'required',\n 'terms_conditions' => 'required|integer',\n ]);\n\n if ($validator->fails()){\n return redirect('admin/job/' . $id . '/edit')\n ->withInput()\n ->withErrors($validator);\n }\n else\n { \n\n $job->user_id = $userId;\n $job->job_category = $request->job_category;\n $job->job_title = $request->job_title;\n $job->job_subtitle = $request->job_subtitle;\n $job->job_keywords = $request->job_keywords; \n $job->job_cost_min = $request->job_cost_min;\n $job->job_cost_max = $request->job_cost_max;\n $job->job_stattime = $request->job_stattime;\n $job->job_endtime = $request->job_endtime;\n $job->job_skills = $skillsInJson ;\n $job->job_visible_duration = $request->job_visible_duration;\n $job->job_description = $request->job_description;\n $job->job_comments = $request->job_comments;\n $job->job_availble_for = $request->job_availble_for;\n $job->status = $request->status;\n $job->job_documents = $documentsInJson;\n $job->job_images = $imagesInJson;\n $job->terms_conditions = $request->terms_conditions;\n $job->save();\n }\n\n\n if($job->save()) {\n\n Session::flash('success_msg', 'Job added successfully.');\n return redirect('/admin/job');\n\n } else {\n\n Session::flash('error_msg', 'Problem in form submission please try again.');\n return redirect('/admin/job');\n\n }\n\n Session::flash('error_msg', 'Job added successfully.');\n return redirect('/admin/job');\n\n } else {\n\n Session::flash('error_msg', 'you are not a authorized person for post job.');\n return redirect('/admin/login');\n\n }\n }\n else\n {\n Session::flash('error_msg', 'Yoo have to login as a admin for post the job.');\n return redirect('/admin/login');\n }\n }", "title": "" }, { "docid": "11eac02eb208d1fdf574eeb3e76e6fcd", "score": "0.43699378", "text": "public function changeUserProductBatchStatus($batchDetails){\n if($batchDetailsResult = $this->mongoBatchObject->findAll([\n 'orgID' => $batchDetails['orgID'],\n 'status' => 'A',\n 'name' => ['$ne' => $batchDetails['name']]\n ]) ?? false){\n foreach($batchDetailsResult as $dBatchDetails){\n $this->mongoBatchObject->update( ['batchID' => $dBatchDetails['batchID'] ], ['status' => 'D' ]);\n }\n }\n }", "title": "" }, { "docid": "7b258e25128dc54acf7940b1ce41c200", "score": "0.43667436", "text": "function getConvertCollectionStatusAction($jobId)\r\n\t{\r\n\t\treturn $this->getStatusAction($jobId, KalturaBatchJobType::CONVERT_COLLECTION);\r\n\t}", "title": "" }, { "docid": "ff7e837d3f912331ef4296c6d3c45851", "score": "0.4351965", "text": "function fn_searchanise_global_update_products($table, $field, $value, $type, $msg, $update_data)\n{\n if (!empty($update_data['product_ids'])) {\n foreach ($update_data['product_ids'] as $pid) {\n fn_se_add_action('update', (int) $pid);\n }\n } else {\n fn_se_queue_import();\n }\n}", "title": "" }, { "docid": "4c05c4c7f3dfbc6f9d18fc186203b772", "score": "0.43512893", "text": "public function testUpdateCouponBatch()\n {\n }", "title": "" }, { "docid": "826fd7600fe3a87384d8b92ba8f91770", "score": "0.43364727", "text": "public function assignToApplicant($job,$user_id)\n\t{\n\t\t$em = $this->getEntityManager();\n\n\t\t// Check if already assigned\n\t\t$chk = $em->getRepository('AppBundle:UsersJob')->findOneBy(['jobId'=>$job->getUniqueId(), 'userId'=>$user_id]);\n\t\tif($chk) return;\n\t\t\n\t\t// Assign\n\t\t$usersjob = new UsersJob();\n\t\t$usersjob->setJobId($job->getUniqueId());\n\t\t$usersjob->setUserId($user_id);\n\t\t$usersjob->setCheckablCount(0);\n\t\t$usersjob->setCheckablCompleted(0);\n\t\t$usersjob->setTestablCount(0);\n\t\t$usersjob->settestablCompleted(0);\n\t\t$usersjob->setPersonablCount(0);\n\t\t$usersjob->setPersonablCompleted(0);\n\t\t$usersjob->setCreatedOn(new \\DateTime('now'));\n\t\t$usersjob->setLastModified(new \\DateTime('now'));\n\t\t$em->persist($usersjob);\n\t\t$em->flush();\n\t\t// TODO: calculate count/completed figures\n\n\t}", "title": "" }, { "docid": "f62c13159b055f6039da6426a4274c76", "score": "0.43324685", "text": "private function userProductGroupUpdate($Data){ \n $UPID=$Data['UPID'] ?? \"\";\n $newBatchID = $Data['batchID'] ?? \"\";\n $newGroupID = $Data['groupID'] ?? \"\";\n \n $seacrhCondUP = [\"UPID\"=> $UPID];\n\n $activeGroup =[ \"groupID\" => $newGroupID,\n \"roll\" => \"regularStudent\",\n \"batchID\" => $newBatchID,\n\t\t\t\"status\" => \"A\"\t\t\t\n ];\n // check all input parameters passed\n if(isset($UPID) && isset($newBatchID) && isset($newGroupID)){\n // make existing batch inactive and new batch active\n $UserProductObjects = $this->mongoUserProductObject->findAll($seacrhCondUP); \n \n if(count($UserProductObjects) > 0){\n $UserProductObjects = $UserProductObjects[0];\n \n \n // check array and not empty records\n if(is_array($UserProductObjects[\"activeGroups\"]) && !empty($UserProductObjects[\"activeGroups\"])){\n \n // if teacher exclude having same batch\n if($UserProductObjects[\"category\"]== \"teacher\"){\n $UserProductObject[\"activeGroups\"]= array_filter($UserProductObjects[\"activeGroups\"], function ($var) {\t\n if($var['role'] == 'classTeacher' && $var[\"batchID\"] != $newBatchID ){\n return $var;\n }else{\n return $var;\n }\n });\n } else{\n $UserProductObject[\"activeGroups\"]= $UserProductObjects[\"activeGroups\"];\n }\n // if multiple groups make all deactive\n \n foreach($UserProductObject[\"activeGroups\"] as $key => $value){\n \n $UserProductObject[\"activeGroups\"][$key]['status']= \"D\";\n \n }\n }\n $updateValues = [];\n \n $updateValues['inactiveGroups'] = $UserProductObject[\"activeGroups\"] ?? [];\n $updateValues[\"activeGroups\"] = $activeGroup;\n \n // update the existing doc\n $result = $this->mongoUserProductObject->update($seacrhCondUP,$updateValues);\n } else{\n $error[\"message\"] = \"no records found\";\n return false; }\n \n } else {\n $error[\"message\"]= \"Missing input arguments\";\n return false;\n }\n return $result;\n\n }", "title": "" }, { "docid": "9782f03fb7049c34e8fb2a361d496641", "score": "0.43319783", "text": "function getPostConvertStatusAction($jobId)\r\n\t{\r\n\t\treturn $this->getStatusAction($jobId, KalturaBatchJobType::POSTCONVERT);\r\n\t}", "title": "" }, { "docid": "f1a5a0d731420670dd54cf6ba37cfedd", "score": "0.43295422", "text": "public function apply(Job $job)\n {\n \n }", "title": "" }, { "docid": "09cc8e8b6ab072195c98a4f35c85fe17", "score": "0.43215942", "text": "public function doPostUpdateAction()\n {\n $oppConfig = $this->getOpportunityConfig();\n if ($oppConfig['opps_view_by'] === 'RevenueLineItems') {\n $sql = \"SELECT opportunity_id AS opp_id,\n Sum(likely_case) AS likely,\n Sum(worst_case) AS worst,\n Sum(best_case) AS best\n FROM (SELECT rli.opportunity_id,\n (rli.likely_case/rli.base_rate) AS likely_case,\n (rli.worst_case/rli.base_rate) AS worst_case,\n (rli.best_case/rli.base_rate) AS best_case\n FROM revenue_line_items rli\n WHERE rli.deleted = 0) T\n GROUP BY opp_id\";\n $results = $this->db->query($sql);\n\n $stages = $this->getClosedStages();\n\n $queryParams = [];\n // skip closed opps\n while ($row = $this->db->fetchrow($results)) {\n $queryParams[] = [\n $row['likely'],\n $row['best'],\n $row['worst'],\n $row['opp_id'],\n $stages,\n ];\n }\n if (count($queryParams) < self::CHUNK_SIZE) {\n $sql = <<<SQL\nUPDATE opportunities\nSET amount = ? * base_rate,\n best_case = ? * base_rate,\n worst_case = ? * base_rate\nWHERE id = ?\n AND sales_status NOT IN (?)\nSQL;\n\n $conn = $this->db->getConnection();\n // do queries in this process\n foreach ($queryParams as $params) {\n $conn->executeUpdate(\n $sql,\n $params,\n [null, null, null, null, Connection::PARAM_STR_ARRAY]\n );\n }\n } else {\n // schedule queries to SQLRunner job scheduler\n $chunks = array_chunk($queryParams, self::CHUNK_SIZE);\n global $timedate, $current_user;\n foreach ($chunks as $chunk) {\n $job = BeanFactory::newBean('SchedulersJobs');\n $job->name = \"SugarJobOpportunitiesCurrencyRateBatchUpdate: \" . $timedate->getNow()->asDb();\n $job->target = \"class::SugarJobOpportunitiesCurrencyRateBatchUpdate\";\n $job->data = json_encode($chunk);\n $job->retry_count = 0;\n $job->assigned_user_id = $current_user->id;\n $jobQueue = new SugarJobQueue();\n $jobQueue->submitJob($job);\n }\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "944fcef676ab61448ec82c4866c79bb0", "score": "0.43088686", "text": "public function batchUpdateAction() {\n\t\t$info = $this->getPost(array('action', 'ids', 'sort'));\n\t\tif (!count($info['ids'])) $this->output(-1, '没有可操作的项.');\n\t\tif($info['action'] =='open'){\n\t\t\t$ret = Client_Service_Column::updateColumnStatus($info['ids'], 1);\n\t\t} else if($info['action'] =='close'){\n\t\t\t$ret = Client_Service_Column::updateColumnStatus($info['ids'], 2);\n\t\t} else if($info['action'] =='sort'){\n\t\t\t$ret = Client_Service_Column::updateColumnSort($info['sort']);\n\t\t}\n\t\tif (!$ret) $this->output('-1', '操作失败.');\n\t\t$this->_updateVersion();\n\t\t$this->output('0', '操作成功.');\n\t}", "title": "" }, { "docid": "2483b2f7fa5a90f5c7d46a6387a801fc", "score": "0.43041798", "text": "function mic_profile_convert_batch_import($profile, &$context) {\n $node = node_load($profile->nid, $profile->vid);\n $body = $node->body[LANGUAGE_NONE][0];\n $chunks = explode('<br>', $body['value']);\n $step = 2;\n if (count($chunks) <= 1) {\n $chunks = explode('<br />', $body['value']);\n $step = 3;\n }\n\n // Find question in chunk. Process answer.\n foreach (mic_profile_convert_mapping() as $mapping) {\n for ($i = 0; $i < count($chunks); $i += $step) {\n if (strpos($chunks[$i], $mapping['question']) !== FALSE) {\n $field = $mapping['field'];\n $text = strip_tags($chunks[$i+1]);\n if (!empty($text)) {\n $node->$field = array(\n LANGUAGE_NONE => array(\n array(\n 'value' => $text,\n ),\n ),\n );\n }\n break;\n }\n }\n }\n node_save($node);\n\n $context['message'] = t('Converted profile %title', array('%title' => $node->title));\n}", "title": "" }, { "docid": "92c387be4bbbfc54230a736ecd6ec0a1", "score": "0.43020982", "text": "function erp_hr_apply_policy_existing_employee( $policy_id ) {\n\n $apply_for_existing_users = ! empty( $_POST['apply-for-existing-users'] ) ? 1 : 0;\n\n if ( ! $apply_for_existing_users ) {\n return;\n }\n\n $policy = Leave_Policy::find( $policy_id );\n if ( ! $policy ) {\n return;\n }\n\n $employees = erp_hr_get_employees( array(\n 'department' => $policy->department_id,\n 'location' => $policy->location_id,\n 'designation' => $policy->designation_id,\n 'gender' => $policy->gender,\n 'marital_status' => $policy->marital,\n 'number' => '-1',\n 'no_object' => true,\n ) );\n\n if ( count( $employees ) === 0 ) {\n return;\n }\n\n $entitlement_bg = new \\WeDevs\\ERP\\HRM\\Leave_Entitlement_BG_Process();\n\n foreach ( $employees as $employee ) {\n $entitlement_bg->push_to_queue(\n array(\n 'user_id' => $employee->user_id,\n 'leave_id' => $policy->leave_id,\n 'created_by' => get_current_user_id(),\n 'trn_id' => $policy->id,\n 'trn_type' => 'leave_policies',\n 'day_in' => $policy->days,\n 'day_out' => 0,\n 'description' => $policy->description != '' ? $policy->description : 'Generated',\n 'f_year' => $policy->f_year,\n )\n );\n }\n\n $entitlement_bg->save();\n\n /**\n * Run the queue, starting with leave entitlements data\n */\n $entitlement_bg->dispatch();\n\n // erp_bulk_policy_assign( $policy_id );\n // erp_hr_apply_policy_to_employee( $policy );\n}", "title": "" }, { "docid": "f3ec6ae623992d62a3fb1a695d6a3b37", "score": "0.42988524", "text": "public function prepereSaveProjectPostJob($jobHash) {\n $projectJobs = Yii::app()->request->getPost('ProjectJob');\n $mainTaskEmployees = Yii::app()->request->getPost('main_task_employees');\n if (isset($projectJobs[$jobHash])) {\n $jobData = $projectJobs[$jobHash];\n\n if (!empty($jobData['employee_type']) && $jobData['employee_type'] == PProjectJob::EMPLOYEE_TYPE_PARTNER) {\n if (isset($mainTaskEmployees[$jobHash])) {\n $selectedEmployeesList = json_decode($mainTaskEmployees[$jobHash], true);\n if (isset($selectedEmployeesList[0]))\n $jobData['offload_partner_id'] = $selectedEmployeesList[0];\n }\n }\n\n if (isset($_POST['duration'][$jobHash]))\n $jobData['duration'] = $_POST['duration'][$jobHash];\n if (isset($_POST['custom_extensions'][$jobHash]))\n $jobData['custom_extensions'] = $_POST['custom_extensions'][$jobHash];\n\n if (!empty($jobData['has_custom_payment'])) {\n $jobData['projectJobCustomPayment'] = $_POST['projectJobCustomPayment'][$jobHash];\n }\n\n if (!$this->job->isNewRecordOrHasNotInvitation()){\n unset($jobData['with_invitation']);\n unset($jobData['show_all_users']);\n }\n\n if (!empty($_POST['is_editable_or_empty_'.$jobHash])){\n $jobData['start_hour'] = isset($jobData['start_date'])?PProjectJob::strToMysqlDate($jobData['start_date']):'';\n $jobData['due_date'] = isset($jobData['end_date'])?PProjectJob::strToMysqlDate($jobData['end_date']):'';\n }\n if (!empty($_POST['is_editable_or_empty_end_date_'.$jobHash])){\n $jobData['end_hour'] = isset($jobData['end_date'])?PProjectJob::strToMysqlDate($jobData['end_date']):'';\n }\n\n //added possibility to change job types for googleCC projects\n //in such case need to update job type service\n if (!empty($jobData['job_type_id'])){\n $jobTypeService = JobTypeService::model()->findByAttributes(['job_type_id'=>$jobData['job_type_id'],'service_id'=>$this->job->serviceId]);\n\n if ($jobTypeService) {\n $jobData['job_type_service_id'] = $jobTypeService->id;\n }\n }\n\n if(!empty($mainTaskEmployees[$jobHash]) && $this->job->isNewRecordOrHasNotInvitation()){\n $this->waitForUsersInvitation($jobHash, $_POST);\n }\n }\n $this->prepeareJob($jobData);\n\n return $this;\n }", "title": "" }, { "docid": "27c097fe36eb2cf743713a583aa52299", "score": "0.42943853", "text": "function _media_theplatform_mpx_process_batch_video_import($type) {\n // Log what type of operation we're performing.\n global $user;\n $log = array(\n 'uid' => $type == 'manual' ? $user->uid : 0,\n 'type' => 'video',\n 'type_id' => NULL,\n 'action' => 'batch',\n 'details' => $type,\n );\n media_theplatform_mpx_insert_log($log);\n\n // Get the parts for the batch url and construct it.\n $batch_url = media_theplatform_mpx_variable_get('proprocessing_batch_url', '');\n $batch_item_count = media_theplatform_mpx_variable_get('proprocessing_batch_item_count', 0);\n $current_batch_item = media_theplatform_mpx_variable_get('proprocessing_batch_current_item', 1);\n $feed_request_item_limit = media_theplatform_mpx_variable_get('cron_videos_per_run', 500);\n\n $url = $batch_url . '&range=' . $current_batch_item . '-' . ($current_batch_item + ($feed_request_item_limit-1));\n\n $result_data = _media_theplatform_mpx_retrieve_feed_data($url);\n if (!$result_data) {\n return false;\n }\n\n $processesing_success = _media_theplatform_mpx_process_video_import_feed_data($result_data);\n if (!$processesing_success) {\n return false;\n }\n\n $current_batch_item += $feed_request_item_limit;\n if ($current_batch_item < $batch_item_count) {\n media_theplatform_mpx_variable_set('proprocessing_batch_current_item', $current_batch_item);\n }\n else {\n // Reset the batch system variables.\n media_theplatform_mpx_variable_set('proprocessing_batch_url', '');\n media_theplatform_mpx_variable_set('proprocessing_batch_item_count', '');\n media_theplatform_mpx_variable_set('proprocessing_batch_current_item', '');\n // In case this is the end of the initial import batch, set the last\n // notification id.\n $last_update_notification = media_theplatform_mpx_variable_get('last_notification');\n if (!$last_update_notification) {\n media_theplatform_mpx_set_last_notification();\n }\n }\n}", "title": "" }, { "docid": "9282eebc622ed077b7666240fb8f3a51", "score": "0.4290541", "text": "public static function try_reupload_old_jobs(){\n $job_ids = static::existent_jobs();\n foreach ($job_ids as $job_id) {\n $job = new OCJob($job_id);\n echo \"Versuche Upload von '\".$job_id.\"'...\";\n $job->try_upload_to_opencast();\n echo \"Beende Upload von '\".$job_id.\"'...\";\n }\n }", "title": "" }, { "docid": "1827ddf0605d8f2f4b25deb62bcf78c8", "score": "0.42849606", "text": "function kolab_lead_mass_update($leads, $updates) {\n // We use batch processing to prevent timeout when updating a large number\n // of leads.\n if (count($leads) > 10) {\n $batch = array(\n 'operations' => array(\n array('_kolab_lead_mass_update_batch_process', array($leads, $updates))\n ),\n 'finished' => '_kolab_lead_mass_update_batch_finished',\n 'title' => t('Processing'),\n // We use a single multi-pass operation, so the default\n // 'Remaining x of y operations' message will be confusing here.\n 'progress_message' => '',\n 'error_message' => t('The update has encountered an error.'),\n // The operations do not live in the .module file, so we need to\n // tell the batch engine which file to load before calling them.\n 'file' => drupal_get_path('module', 'kolab_lead') . '/kolab_lead.admin.inc',\n );\n batch_set($batch);\n }\n else {\n foreach ($leads as $lid) {\n _kolab_lead_mass_update_helper($lid, $updates);\n }\n drupal_set_message(t('The update has been performed.'));\n }\n}", "title": "" }, { "docid": "87a8a1a7230fbb853b7d1c53a1fc2c26", "score": "0.42805043", "text": "public static function customer_edit_job($mysqli, $job_id, $location, $job_type, $job_category, $payrate, $start_date, $end_date) \r\n {\r\n\r\n\r\n $sql = \"UPDATE jobs SET location = '$location', job_type = '$job_type', job_category = '$job_category', payrate = '$payrate', start_date = '$start_date', end_date = '$end_date' WHERE id = '$job_id'\";\r\n $result = $mysqli->query($sql) or die($mysqli->error);\r\n if($result){\r\n return $result;\r\n }\r\n \r\n }", "title": "" }, { "docid": "33c1c21a7a233bf2e5a7fe63b30391d8", "score": "0.4272804", "text": "public function patchAsync($resourceGroupName, $jobCollectionName, $jobName, array $job, array $customHeaders = [])\n {\n if ($this->_client->getSubscriptionId() == null) {\n Validate::notNullOrEmpty($this->_client->getSubscriptionId(), '$this->_client->getSubscriptionId()');\n }\n if ($resourceGroupName == null) {\n Validate::notNullOrEmpty($resourceGroupName, '$resourceGroupName');\n }\n if ($jobCollectionName == null) {\n Validate::notNullOrEmpty($jobCollectionName, '$jobCollectionName');\n }\n if ($jobName == null) {\n Validate::notNullOrEmpty($jobName, '$jobName');\n }\n if ($this->_client->getApiVersion() == null) {\n Validate::notNullOrEmpty($this->_client->getApiVersion(), '$this->_client->getApiVersion()');\n }\n if ($job == null) {\n Validate::notNullOrEmpty($job, '$job');\n }\n\n $path = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Scheduler/jobCollections/{jobCollectionName}/jobs/{jobName}';\n $statusCodes = [200];\n $method = 'PATCH';\n\n $path = strtr($path, ['{subscriptionId}' => $this->_client->getSubscriptionId(), '{resourceGroupName}' => $resourceGroupName, '{jobCollectionName}' => $jobCollectionName, '{jobName}' => $jobName]);\n $queryParams = ['api-version' => $this->_client->getApiVersion()];\n $headers = $customHeaders;\n if ($this->_client->getAcceptLanguage() != null) {\n $headers['accept-language'] = $this->_client->getAcceptLanguage();\n }\n if ($this->_client->getGenerateClientRequestId()) {\n $headers[Resources::X_MS_REQUEST_ID] = Utilities::getGuid();\n }\n\n $headers['Content-Type'] = 'application/json; charset=utf-8';\n $body = $this->_client->getDataSerializer()->serialize($job);\n\n $response = HttpClient::send(\n $method,\n $headers,\n $queryParams,\n [],\n $this->_client->getUrl($path),\n $statusCodes,\n $body,\n $this->_client->getFilters()\n );\n\n return $response;\n }", "title": "" }, { "docid": "d21e2e606024cbef1ae05d6c488cbbf5", "score": "0.42706382", "text": "public function applyForJob () {\n $offer_id = request('offer_id');\n $offer = JobOffer::find($offer_id);\n $ch_id = auth()->user()->character->id;\n $exist = JobApplication::where('offer_id', $offer_id)->where('applied_by', $ch_id)->first();\n if ( !$exist) {\n JobApplication::create([\n 'offer_id' => $offer_id,\n 'applied_by' => $ch_id,\n 'job_id' => $offer->job_id,\n 'status' => 'applied',\n ]);\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "17a2ff2b3a8b8f45b6a265d3a7844b5a", "score": "0.4260697", "text": "public function update(Request $request, $id)\n {\n $job = new Job();\n $details = $job->jobAdminDetails($id);\n if(empty($details)){abort(404);}\n\n $data = $request->all();\n $zipCode = $this->getAddress($request->input('postal_code'));\n $data['postal_code'] = $zipCode;\n\n $data = $request->all();\n $location = explode('.', $request->input('job_location'));\n $businessMngr = explode('.', $request->input('business_manager'));\n $zipCode = $this->getAddress($request->input('postal_code'));\n $data['zip_code'] = $request->input('postal_code');\n $data['postal_code'] = $zipCode;\n $industry = explode('.', $request->input('industry'));\n //$age = explode('-', $request->input('age'));\n $employer = explode('.', $request->input('job_employer'));\n\n $split = [\n 'location_id' => $location[0],\n 'location' => $location[1],\n 'industry_id' => $industry[0],\n 'industry' => $industry[1],\n 'employer_id' => $employer[0],\n 'employer' => $employer[1],\n 'business_id' => $businessMngr[0],\n 'business' => $businessMngr[1]\n ];\n\n $validator = $this->rules($data,$details->job_image_path );\n\n if ($validator->fails()) {\n return redirect(route('job.edit', ['id' => $id]))\n ->withErrors($validator)\n ->withInput();\n } else {\n\n $data['address'] = $this->getFormattedAddress($data['postal_code']['lat'], $data['postal_code']['lng']);\n \n\n if ($request->hasFile('job_image')) {\n $profile['job_image'] = $request->file('job_image')->store('jobs');\n $mergeData = array_merge($data, $profile, $split);\n }else{\n $mergeData = array_merge($data, $split);\n // $merge = $data;\n\n }\n\n $this->deleteAge($mergeData, $id);\n $this->saveAge($id, $data);\n $this->deleteLanguage($mergeData, $id);\n $this->saveLanguage($id, $data);\n $this->updateData($mergeData);\n\n return redirect(route('job.details', ['id' => $id]));\n\n }\n }", "title": "" }, { "docid": "f6f01f83deb7748d697bafdc05631c60", "score": "0.42462212", "text": "public function update(Request $request, $id)\n {\n // dd($request->all());\n\n $request->validate([\n 'jobTitle' => 'required|max:60',\n 'category' => 'required',\n 'description' => 'required|min:10|max:5000',\n 'location' => 'required',\n 'job_type' => 'required',\n 'salary' => 'nullable|integer',\n 'salary_type' => 'nullable',\n 'image' => 'sometimes|image|max:2000'\n ]);\n // dd($request->all());\n\n if ($request->image) {\n\n $imgpath = $request->image->store('profile', 'public');\n $job = Job::find($id);\n\n $jobs = $job->update(array_merge(\n [\n 'title' => $request->jobTitle,\n 'category_id' => $request->category,\n 'description' => $request->description,\n 'city_id' => $request->location,\n 'jobtype_id' => $request->job_type,\n 'salary' => $request->salary,\n 'salarytype_id' => $request->salary_type,\n 'status' => 1,\n 'user_id' => Auth::user()->id,\n ],\n ['image' => $imgpath]\n ));\n // dd($jobs);\n // session()->flash('notification.message', 'Ads updated successfully');\n // session()->flash('notification.type', 'danger');\n return redirect()->route('my-ads')\n ->with('success', 'Ads updated successfully.');\n } else {\n $job = Job::find($id);\n // dd($job);\n\n $jobs = $job->update([\n 'title' => $request->jobTitle,\n 'category_id' => $request->category,\n 'description' => $request->description,\n 'city_id' => $request->location,\n 'jobtype_id' => $request->job_type,\n 'salary' => $request->salary,\n 'salarytype_id' => $request->salary_type,\n 'status' => 1,\n 'user_id' => Auth::user()->id,\n ]);\n // dd($users);\n return redirect()->route('my-ads')\n ->with('success', 'Ads updated successfully.');\n }\n }", "title": "" }, { "docid": "8049d355eb094596febf2f1c26503711", "score": "0.42420435", "text": "public function actionUpdate(){\n $session = Yii::$app->session;\n if(isset($session['userid'])){\n\n\n // $model = User::find($id);\n // $model->name = 'YII';\n // $model->email = '[email protected]';\n // $model->save(); // equivalent to $model->update();\n \n //Get the Data From Server\n $userProfileUpdate = UserProfile::findOne(['user_id' => $session['userid']]);\n $bankDetailsUpdate = UserBankDetail::findOne(['user_id' => $session['userid']]);\n\n \n \n \n \n $postArray=Yii::$app->request->post();\n \n // echo \"<pre>\";print_r($postArray); die;\n \n\n \n \n \n \n if(isset($postArray['UserProfile'],$postArray['UserBankDetail'],$postArray['app_submission'])){\n \n //Update User Profile\n $userProfileUpdate->attributes=Yii::$app->request->post('UserProfile');\n \n //Update Bank Details\n $bankDetailsUpdate->attributes=Yii::$app->request->post('UserBankDetail');\n\n //Update Application Subbmission Data\n $applicationDataUpdate = ApplicationSubmission::findOne(['user_id' => $session['userid']]);\n $application_data_Update_object = Yii::$app->request->post('app_submission');\n $application_data_Update_json = json_encode($application_data_Update_object); \n\n $applicationDataUpdate->field_value = $application_data_Update_json;\n echo \"<pre>\";print_r($applicationDataUpdate); \n \n \n \n \n \n // $application_submission = $this->populateApplicationSubmission($session['userid'],$application_data_json);\n $db = Yii::$app->db;\n $transaction = $db->beginTransaction();\n \n try{\n //echo \"<pre>\";\n if($userProfileUpdate->validate() && $bankDetailsUpdate->validate() && $applicationDataUpdate->validate()){\n $userProfileUpdate->save();\n $bankDetailsUpdate->save();\n $applicationDataUpdate->save();\n \n $transaction->commit();\n Yii::$app->getSession()->setFlash('success', 'Data Updated Successfully.');\n \n return $this->redirect(['index']);\n \n \n }\n else{\n $err=\"\";\n $userProfileError=$userProfile->geterrors();\n if(!empty($userProfileError))\n foreach($userProfileError as $errrs)\n foreach($errrs as $err)\n $err.=\"<li>$err</li>\";\n $bankDetails=$bankDetails->geterrors();\n if(!empty($bankDetails))\n foreach($bankDetails as $errrs)\n foreach($errrs as $err)\n $err.=\"<li>$err</li>\";\n \n $application_submission=$application_submission->geterrors();\n if(!empty($application_submission))\n foreach($application_submission as $errrs)\n foreach($errrs as $err)\n $err.=\"<li>$err</li>\";\n Yii::$app->getSession()->setFlash('danger', $err);\n $this->redirect(['index']);\n // exit;\n \n \n }\n \n \n }catch(Exception $e){\n $transaction->rollback();\n throw new HttpException(520,'Records can not be saved.'. $e);\n }\n \n }\n }\n \n }", "title": "" }, { "docid": "0004c4db37747b278349fd64794c48fd", "score": "0.42326248", "text": "function deletePostConvertAction($jobId)\r\n\t{\r\n\t\treturn $this->deleteJobAction($jobId, KalturaBatchJobType::POSTCONVERT);\r\n\t}", "title": "" }, { "docid": "eee934f22b7ffd5980180221ce4622a3", "score": "0.42278337", "text": "public function updateTask($job,$data)\n {\n if(\\Config::get('website.elasticsearch') === true)\n {\n if(isset($data['context']))\n {\n $this->UpdateEs($data);\n }\n else\n {\n \\Log::error('ElasticSearchHelper: No context set for the following dataset: '.json_encode($data));\n }\n }\n $job->delete();\n }", "title": "" }, { "docid": "21c349089be589f781b1806b042efc7e", "score": "0.42250925", "text": "private function updateMany($filter){\n\t\t$appended = '_ID';\n\t\t//make sure the parent name exist\n\t\tif (!isset($_POST['parent_generated'])) {\n\t\t\tthrow new Exception(\"is like you forgot to set a parent table for this form,kindly do and try again\", 1);\n\t\t}\n\t\t//first validate the model\n\t\t$parentName =$_POST['parent_generated'];//remove the appended from the back\n\t\tunset($_POST['parent_generated']);\n\t\tunset($_POST['MAX_FILE_SIZE']);\n\t\t$parent= $parentName.$appended;\n\t\t$prevCount = 0;\n\t\t$models =$this->validateModels('u',$message);//validate the models and return the model arrays on success of return false and return message\n\t\tif (!$models) {\n\t\t\techo createJsonMessage('status',false,'message',$message);\n\t\t\treturn;\n\t\t}\n\t\t// $inTable =array_key_exists($parentName, $models);\n\t\t$this->db->trans_begin();//start transaction\n\t\t$data = $this->input->post(null,$filter);\n\t\t$parentValue=isset($data[$parent])?$data[$parent]:false;\n\t\t$isFirst = true;\n\t\tforeach ($models as $model => $prop) {\n\t\t\tif (empty($prop) || !is_array($prop) || count($prop)!=2) {\n\t\t\t\t$this->db->trans_rollback();\n\t\t\t\tthrow new Exception(\"invalid model properties\");\n\t\t\t}\n\t\t\t//load the model\n\t\t\t$this->load->model(\"entities/$model\");\n\t\t\t// $parameter = subArrayAssoc($data,$prevCount,$prop[0]-$prevCount);\n\t\t\t$data = $this->processFormUpload($model,$data);\n\t\t\t$parameter = $this->extractSubset($data,$model);\n\t\t\tif (empty($parameter) || $this->validateModelData($model,'update',$parameter,$message)==false) {\n\t\t\t\t$this->db->trans_rollback();\n\t\t\t\tif (empty($message)) {\n\t\t\t\t\t$message ='error occured while performing operation';\n\t\t\t\t}\n\t\t\t\tthrow new Exception($message, 1);\n\n\t\t\t}\n\t\t\tif ($parentName==$model || $isFirst) {//this is the first transaction\n\t\t\t\t$this->$model->setArray($parameter);\n\t\t\t\n\t\t\t\t$this->$model->update($prop[1],$this->db);\n\t\t\t\t$prevCount=$prop[0];\n\t\t\t\t$isFirst= false;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ($model=='next_of_kin') {\n\t\t\t\t\n\t\t\t\t// print_r($parameter);\n\t\t\t\t// echo \"got here\";exit;\n\t\t\t\tunset($parameter['guardian_ID']);\n\t\t\t}\n\n\t\t\t$this->$model->setArray($parameter);\n\t\t\t$this->$model->update($prop[1],$this->db);\n\t\t\t$prevCount=$prop[0];\n\t\t}\n\n\t\tif ($this->db->trans_status() === FALSE) {\n\t\t\techo createJsonMessage('status',true,'message','error occured while updating record');\n\t\t\treturn false;\n\t\t}\n\t\tif($this->afterManyInserts(array_keys($models),'update',$data,$this->db)){\n\t\t\t$this->db->trans_commit();//end the transaction\n\t\t\techo createJsonMessage('status',true,'message','records updated successfully','data',$parentValue);\n\t\t\treturn true;\n\t\t}\n\t\t$this->db->trans_rollback();\n\t\techo createJsonMessage('status',false,'message','error occured while updating record');\n\t\treturn false;\n\t}", "title": "" }, { "docid": "bfb407d5920e8c353e01889325e36922", "score": "0.42228833", "text": "function producedby_batch_global_submit($action, $collection)\n{\n\t// If its our plugin that is called\n\tif ($action == 'produced_by')\n\t{\n\t\t$pbID = pwg_db_real_escape_string($_POST['producedbyID']);\n\n\t\t// Delete any previously assigned copyrights\n\t\tif (count($collection) > 0) {\n\t\t\t$query = sprintf(\n\t\t\t\t'DELETE\n\t\t\t\tFROM %s\n\t\t\t\tWHERE media_id IN (%s)\n\t\t\t\t;',\n\t\t\tPRODUCEDBY_MEDIA, implode(',', $collection));\n\t\t\tpwg_query($query);\n\t\t}\n\n\t\t// If you assign no copyright, dont put them in the table\n\t\tif ($pbID != '') {\n\t\t\t// Add the copyrights from the submit form to an array\n\t\t\t$edits = array();\n\t\t\tforeach ($collection as $image_id) {\n\t\t\t\tarray_push(\n\t\t\t\t\t$edits,\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'media_id' => $image_id,\n\t\t\t\t\t\t'pb_id' => $pbID,\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Insert the array into the database\n\t\t\tmass_inserts(\n\t\t\t\tPRODUCEDBY_MEDIA,\t\t// Table name\n\t\t\t\tarray_keys($edits[0]),\t// Columns\n\t\t\t\t$edits\t\t\t\t\t// Data\n\t\t\t);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "00fb2c0435a1aaaf05eba54c41fee624", "score": "0.4219915", "text": "function addBatchJobAction(KalturaBatchJob $batchJob)\r\n\t{\r\n\t\tkJobsManager::addJob($batchJob->toObject(), $batchJob->data, $batchJob->jobType, $batchJob->jobSubType);\t\r\n\t}", "title": "" }, { "docid": "f917d9c442bf4cfeae411e1de4085e0a", "score": "0.4216969", "text": "private function processBatch($bunch)\n {\n $mergedWithConfigurableParents = array_merge(\n $bunch,\n $this->parentFinder->getConfigurableParentsFromBunchOfProducts($bunch)\n );\n\n $productIds = $this->bunch->getProductIdsBySkuInBunch($mergedWithConfigurableParents);\n $existingProductIds = $this->getExistingProductIds($productIds);\n\n $newEntryIds = array_diff($productIds, $existingProductIds);\n $createdAt = $this->dateTime->formatDate(true);\n\n $newEntries = array_map(function ($id) use ($createdAt) {\n return [\n 'product_id' => $id,\n 'processed' => 0,\n 'created_at' => $createdAt\n ];\n }, $newEntryIds);\n\n if (!empty($newEntries)) {\n $this->catalogResource->bulkProductImport($newEntries);\n }\n\n if (!empty($existingProductIds)) {\n $this->catalogResource->setUnprocessedByIds($existingProductIds);\n }\n }", "title": "" }, { "docid": "29253f69af86d0e5b8897c5c2a0808e1", "score": "0.42148265", "text": "function tedx_bulk_quick_edit_save_bulk_edit() {\n\t$post_ids = ( isset( $_POST[ 'post_ids' ] ) && !empty( $_POST[ 'post_ids' ] ) ) ? $_POST[ 'post_ids' ] : NULL;\n\n\t// if we have post IDs\n\tif ( ! empty( $post_ids ) && is_array( $post_ids ) ) {\n\n\t\t// get the custom fields\n\t\t$custom_fields = array( 'talk_date2', 'talk_rating' );\n\n\t\tforeach( $custom_fields as $field ) {\n\n\t\t\t// if it has a value, doesn't update if empty on bulk\n\t\t\tif ( isset( $_POST[ $field ] ) && !empty( $_POST[ $field ] ) ) {\n\n\t\t\t\t// update for each post ID\n\t\t\t\tforeach( $post_ids as $post_id ) {\n\t\t\t\t\tupdate_post_meta( $post_id, $field, $_POST[ $field ] );\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}\n\n}", "title": "" }, { "docid": "9bbf7b4516871f3130beeb3f760e7215", "score": "0.42141545", "text": "function freeExclusiveJobAction($id ,KalturaExclusiveLockKey $lockKey, $jobType, $resetExecutionAttempts = false)\r\n\t{\r\n\t\t$jobType = kPluginableEnumsManager::apiToCore('BatchJobType', $jobType);\r\n\t\t\r\n\t\t$job = BatchJobPeer::retrieveByPK($id);\r\n\t\t\r\n\t\t// verifies that the job is of the right type\r\n\t\tif($job->getJobType() != $jobType)\r\n\t\t\tthrow new KalturaAPIException(APIErrors::UPDATE_EXCLUSIVE_JOB_WRONG_TYPE, $id, $lockKey, null);\r\n\t\t\t\r\n\t\t$job = kBatchManager::freeExclusiveBatchJob($id, $lockKey->toObject(), $resetExecutionAttempts);\r\n\t\t$batchJob = new KalturaBatchJob(); // start from blank\r\n\t\t$batchJob->fromBatchJob($job);\r\n\t\t\r\n\t\t// gets queues length\r\n\t\t$c = new Criteria();\r\n\t\t$c->add(BatchJobLockPeer::STATUS, array(KalturaBatchJobStatus::PENDING, KalturaBatchJobStatus::RETRY, KalturaBatchJobStatus::ALMOST_DONE), Criteria::IN);\r\n\t\t$c->add(BatchJobLockPeer::JOB_TYPE, $jobType);\r\n\t\t$c->add(BatchJobLockPeer::DC, kDataCenterMgr::getCurrentDcId());\r\n\t\t$queueSize = BatchJobLockPeer::doCount($c, false, myDbHelper::getConnection(myDbHelper::DB_HELPER_CONN_PROPEL2) );\r\n\t\t\r\n\t\tif(!$queueSize)\r\n\t\t{\r\n\t\t\t// gets queues length\r\n\t\t\t$c = new Criteria();\r\n\t\t\t$c->add(BatchJobLockPeer::BATCH_INDEX, null, Criteria::ISNOTNULL);\r\n\t\t\t$c->add(BatchJobLockPeer::EXPIRATION, time(), Criteria::GREATER_THAN);\r\n\t\t\t$c->add(BatchJobLockPeer::EXECUTION_ATTEMPTS, BatchJobLockPeer::getMaxExecutionAttempts($jobType), Criteria::LESS_THAN);\r\n\t\t\t$c->add(BatchJobLockPeer::DC, kDataCenterMgr::getCurrentDcId());\r\n\t\t\t$c->add(BatchJobLockPeer::JOB_TYPE, $jobType);\r\n\t\t\t$queueSize = BatchJobLockPeer::doCount($c, false, myDbHelper::getConnection(myDbHelper::DB_HELPER_CONN_PROPEL2) );\r\n\t\t}\r\n\t\t\r\n\t\t$response = new KalturaFreeJobResponse();\r\n\t\t$response->job = $batchJob;\r\n\t\t$response->jobType = $jobType;\r\n\t\t$response->queueSize = $queueSize;\r\n\t\t\r\n\t\treturn $response;\r\n\t}", "title": "" }, { "docid": "449a90d659f4644130f552e9bab4db62", "score": "0.4212451", "text": "function listBatchSubscribe($id, $batch, $double_optin=true, $update_existing=false, $replace_interests=true) {\n $params = array();\n $params[\"id\"] = $id;\n $params[\"batch\"] = $batch;\n $params[\"double_optin\"] = $double_optin;\n $params[\"update_existing\"] = $update_existing;\n $params[\"replace_interests\"] = $replace_interests;\n return $this->callServer(\"listBatchSubscribe\", $params);\n }", "title": "" }, { "docid": "54f04163c754aa76564a07f2a2e71d1e", "score": "0.4212341", "text": "public function update_batch()\n\t{\n\t\t$args = func_get_args();\n\t\t$table = array_shift($args);\n\t\t$field = array_shift($args);\n\t\t$field_values = array_shift($args);\n\t\tif(! is_array($field_values) || count($field_values) <= 0 ) return false;\n\n\t\t$condition = $this->prepare_query($args);\n\t\t\n\t\t$affected_rows = 0;\n\t\tforeach($field_values as $field_value){\n\t\t\tif(! is_array($field_value) || count($field_value) <= 0 ) continue;\n\t\t\t\n\t\t\t//Do not update if the key field does not exist\n\t\t\tif(! array_key_exists($field, $field_value)) continue;\n\t\t\t\n\t\t\t$cond = \"?n = ?s\";\n\t\t\tif(trim($condition) != '') $cond .= \" AND ?p\";\n\t\t\t$cond = $this->parse($cond, $field, $field_value[$field], $condition);\n\t\t\t\n\t\t\tunset($field_value[$field]);\n\n\t\t\t$sql = \"UPDATE ?n SET ?u\";\n\t\t\tif(trim($cond) != '') $sql .= \" WHERE ?p\";\n\t\t\t\n\t\t\t$query = $this->parse($sql, $table, $field_value, $cond);\n\t\t\t\n\t\t\tif ($res = $this->raw_query($query))\n\t\t\t{\n\t\t\t\t$affected_rows += $this->affected_rows();\n\t\t\t\t$this->free($res);\n\t\t\t}\t\t\n\t\t}\n\t\t\n\t\treturn $affected_rows;\n\t}", "title": "" }, { "docid": "9fc1013056acfebac1c838ec41fbcbb7", "score": "0.42100644", "text": "function mash_core_updatedb_batch_process($id) {\n mash_include_engine('magento', 'update', mash_magento_major_version());\n _update_batch_command($id);\n}", "title": "" }, { "docid": "882f81dd408bc1c83cc2854b09757285", "score": "0.4209999", "text": "public function update_job_postings($company_id, $job_postings, $first_scrape) {\n\tif(empty($job_postings)) return;\n\n\tforeach($job_postings as $job_posting){\n\n\t\t$pieces = explode(\" 9999x9999 \", $job_posting);\n\n\t\t$job_posting = $pieces[0];\n\t\t$job_description_link = $pieces[1];\n\n\t\techo 'Job: ' . $job_posting;\n\t\techo 'JD Link: ' . $job_description_link;\n\n\t\t$this_job = DB::table('rolesentry_jobs')->where('title', '=', $job_posting)->where('rolesentry_companies_id', '=',$company_id)->first();\n\n\t\t//var_dump($this_job);\n\t\n\t\tif (!$this_job) {\n\n\t\t\techo 'DIDNT SEE THIS JOB - ADDING';\n\n\t\t\t$last_job_id = DB::table('rolesentry_jobs')->insertGetId(\n\t\t\t ['rolesentry_companies_id' => $company_id, \n\t\t\t 'title' => $job_posting,\n\t\t\t 'job_description_link' => $job_description_link,\n\t\t\t 'created_at' => date('Y-m-d H:i:s')\n\t\t\t ]\n\t\t\t);\n\n\t\t\tvar_dump($last_job_id);\n\n\t\t\tif($first_scrape == 0){\n\n\t\t\t\techo \"not first scrape - alerting\";\n\n\t\t\t\t$last_alert_id = DB::table('rolesentry_alerts')->insertGetId(\n\t\t\t\t ['rolesentry_job_id' => $last_job_id, \n\t\t\t\t 'title' => $job_posting,\n\t\t\t\t 'updated_at' => date('Y-m-d H:i:s'),\n\t\t\t\t 'created_at' => date('Y-m-d H:i:s')\n\t\t\t\t ]\n\t\t\t\t);\n\n\t\t\t\t$send_email_url = config('app.url').'/send-preliminary-email/'.$last_alert_id;\n\n\t\t\t\techo $send_email_url;\n\n\t\t\t\t$ch = curl_init($send_email_url);\n\t\t\t\t\n\t\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t\t\t$response = json_decode(curl_exec($ch));\n\n\t\t\t}\n\t\t\n\t\t}else{\n\n\t\t\techo 'had this one updating last_seen';\n\t\t\tDB::table('rolesentry_jobs')->where('id',\"=\",$this_job->id)\n\t\t\t\t->update(['last_seen_at'=>date('Y-m-d H:i:s')]);\n\t\t}\n\n\t}\n\n\tDB::table('rolesentry_companies')\n ->where('id', $company_id)\n ->update(['first_scrape'=> 0]);\n\n }", "title": "" }, { "docid": "184332c0b25f9f15fe1f7a83dab723ca", "score": "0.42022774", "text": "public function batchSubscribe($listId, array $batch, $doubleOptin = false, $updateExisting = true, $replaceInterests = false)\n {\n $n = 0;\n $batches = [];\n $batchSize = $this->root->getBatchSize();\n foreach (array_values($batch) as $i => $record) {\n if (0 === $i % $batchSize) {\n $n++;\n }\n $batches[$n][] = $record;\n }\n\n $responses = [];\n foreach ($batches as $batch) {\n $body = [\n 'id' => $listId,\n 'batch' => $batch,\n 'double_optin' => $doubleOptin,\n 'update_existing' => $updateExisting,\n 'replace_interests' => $replaceInterests,\n ];\n\n $responses[] = $this->sendRequest('batch-subscribe', $body);\n }\n return $responses;\n }", "title": "" }, { "docid": "faf20090c648790a095cc6155dcc5ecd", "score": "0.4201025", "text": "public function waitForUsersPostInvitation($jobHash) {\n if (isset($_POST['main_task_employees'][$jobHash])) {\n $projectId = $_GET['projectId'];\n $project = Project::model()->findByPk($projectId);\n $postJob = $_POST['ProjectJob'][$jobHash];\n $mainTaskEmployees = Yii::app()->request->getPost('main_task_employees');\n\n //in case we edit project by add and assign\n if ($project->isEpisodic && empty($postJob['employee_type'])){\n return;\n }\n\n if (isset($postJob['employee_type']) && $postJob['employee_type'] == PProjectJob::EMPLOYEE_TYPE_PARTNER) {\n $selectedEmployeesList = json_decode($mainTaskEmployees[$jobHash], true);\n $selectedUsersList = array();\n if(!empty($selectedEmployeesList)){\n $selectedUsersList = PartnerSystem::model()->findByPk($selectedEmployeesList[0])->getUsersIDs();\n }\n } elseif (!empty($mainTaskEmployees[$jobHash])){\n $selectedUsersList = json_decode($mainTaskEmployees[$jobHash], true);\n }\n //auto assignment\n /*\n $startDate = new DateTime(date('Y-m-d', strtotime($postJob['start_date'])));\n $endDate = new DateTime(date('Y-m-d', strtotime($postJob['end_date'])));\n */\n $startDate = PProjectJob::strToDate($postJob['start_date']);\n $endDate = PProjectJob::strToDate($postJob['end_date']);\n\n $this->waitInvitationSendUserList = (!empty($selectedUsersList)) ? array(\n 'users' => array_values($selectedUsersList),\n //'duration' => new DateInterval('P0DT' . $_POST['duration'][$jobHash] . 'H'),\n 'duration' => $_POST['duration'][$jobHash],\n 'start_date' => $startDate,\n 'end_date' => $endDate,\n ) : array();\n }\n }", "title": "" }, { "docid": "5b9c5d8cae1f48eeb90e8b33a9b776d2", "score": "0.41976753", "text": "public function bulkAction(Request $request)\n {\n if (!$this->isAuthorized) {\n return prepareResult(false, [], [], \"User not authenticate\", $this->unauthorized);\n }\n\n // if (!checkPermission('item-group-bulk-action')) {\n // return prepareResult(false, [], [], \"You do not have the required authorization.\", $this->forbidden);\n // }\n\n $input = $request->json()->all();\n $validate = $this->validations($input, \"bulk-action\");\n\n if ($validate[\"error\"]) {\n return prepareResult(false, [], $validate['errors']->first(), \"Error while validating batch.\", $this->unprocessableEntity);\n }\n\n $action = $request->action;\n\n if (empty($action)) {\n return prepareResult(false, [], [], \"Please provide valid action parameter value.\", $this->unprocessableEntity);\n }\n\n if ($action == 'active' || $action == 'inactive') {\n $uuids = $request->batch_ids;\n\n foreach ($uuids as $uuid) {\n Batch::where('uuid', $uuid)->update([\n 'status' => ($action == 'active') ? 1 : 0\n ]);\n }\n\n $batch = $this->index();\n return prepareResult(true, $batch, [], \"Batch status updated\", $this->success);\n } else if ($action == 'delete') {\n $uuids = $request->batch_ids;\n foreach ($uuids as $uuid) {\n Batch::where('uuid', $uuid)->delete();\n }\n\n $batch = $this->index();\n return prepareResult(true, $batch, [], \"Batch deleted success\", $this->success);\n }\n }", "title": "" } ]
ecaed58df3fec96854865c6b35d02e89
/ end of uncategorized functions ///////////////////////////////////////////////////////////////// / Metaprogramming functions
[ { "docid": "6eac2f2d9132cd42f2396a2d0b9a7452", "score": "0.0", "text": "public static function code_safe_name($string)\n {\n // we want to take a string like \"Custom aspect test\"\n // and turn it into \"CustomAspectTest\"\n // so we can predictably use class names in later code.\n $output = ucwords($string);\n $output = preg_replace(\"/[^A-Za-z0-9 ]/\", '', $output);\n $output = preg_replace('/\\s+/', '', $output);\n return $output;\n }", "title": "" } ]
[ { "docid": "6a7d7c3446cad5e729cd84c69e177696", "score": "0.56766737", "text": "abstract protected function _compile();", "title": "" }, { "docid": "6fc7d75f3bf9b1341a101d94eac6d947", "score": "0.5667546", "text": "protected function p3() {}", "title": "" }, { "docid": "e05de29b156d7df7e241b325e7b91d73", "score": "0.5579847", "text": "public function fourTypesOfStdWrapHookObjectProcessorsDataProvider() {}", "title": "" }, { "docid": "78c5dc957ef49c245eae5af8513b1a79", "score": "0.5547995", "text": "abstract protected function operate();", "title": "" }, { "docid": "fe23e586c91b6a3cd89f466d121a31df", "score": "0.55391246", "text": "protected static function processor(){}", "title": "" }, { "docid": "544e0b5bcdf66d29c2cbd25822b41e3c", "score": "0.5452387", "text": "abstract protected function generate();", "title": "" }, { "docid": "81d801e485877d88fd0a5b1cdb3be3d6", "score": "0.5434756", "text": "abstract protected function transformer();", "title": "" }, { "docid": "015ab497bd7c03679202f408826b4107", "score": "0.5319661", "text": "protected static function createShortcutClasses(){\r\n eval('class CGroup extends '.static::getClass('Aco').'{}');\r\n eval('class RGroup extends '.static::getClass('Aro').'{}');\r\n }", "title": "" }, { "docid": "f500632000939cf52e029ef6e0625d47", "score": "0.5316616", "text": "abstract public function abstfunction();", "title": "" }, { "docid": "53cce417c3f65ec6c7af76efddf37e14", "score": "0.5297674", "text": "function meta( $out )\n\t{\n\t}", "title": "" }, { "docid": "107eb445d736e3b964aad59245e0ed2b", "score": "0.52727246", "text": "protected function determine() {}", "title": "" }, { "docid": "431a4b1402a1da12d1e66d691c7d5929", "score": "0.5258853", "text": "abstract protected function buildCodeCollector() : CodeCollector ;", "title": "" }, { "docid": "f0e9d4bc8b5bac55ff672409746c5cba", "score": "0.52527124", "text": "abstract public function operate();", "title": "" }, { "docid": "74cc79852a04ecb4c2e3fc8791a6fdbb", "score": "0.52454734", "text": "protected abstract function definition();", "title": "" }, { "docid": "eb2f1c36452f1cdf1e751a80e1b492e7", "score": "0.5230425", "text": "abstract protected function organize();", "title": "" }, { "docid": "8e351ba2e97dd6faba3544c1e8e1198b", "score": "0.52111006", "text": "abstract protected function _process();", "title": "" }, { "docid": "745ca1e22785c9b33e2411e2a9954ab7", "score": "0.51826316", "text": "abstract public function apply();", "title": "" }, { "docid": "58a3ab9c862a9d21bf2b0740ac837f09", "score": "0.5138897", "text": "abstract public function usage();", "title": "" }, { "docid": "0544e0ba27f35ce508f4ffe9bc3ae2c8", "score": "0.51363516", "text": "function generate_symb($xw, $order, $word_a)\n{\n $arg = \"arg\" . \"$order\";\n if (preg_match('/^(L|T|G)F@[[:alnum:]\\_\\-\\$\\&\\%\\*]+/', $word_a[$order]) !== 1) {\n $txt = explode (\"@\",$word_a[$order]);\n if (count($txt) == 1) {\n generate_arg($xw, $txt[0], $arg, \"\");\n }\n else {\n generate_arg($xw, $txt[0], $arg, $txt[1]);\n }\n //var_dump($txt);\n }\n else {\n generate_arg($xw, \"var\", $arg, $word_a[$order]);\n }\n}", "title": "" }, { "docid": "d35780b669dfc681f22a09334f272f6c", "score": "0.51309985", "text": "public function templateCustomFun()\n {\n }", "title": "" }, { "docid": "d03b26558f9e4c170f3480b574ee1e22", "score": "0.51254195", "text": "private function _compile_data()\n\t{\n\t\t$this->_set_platform();\n\n\t\tforeach (array('_set_robot', '_set_browser', '_set_mobile') as $function)\n\t\t{\n\t\t\tif ($this->$function() === TRUE)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "187d46eb36a9255a4e340095fc84987f", "score": "0.5112406", "text": "abstract protected function build();", "title": "" }, { "docid": "187d46eb36a9255a4e340095fc84987f", "score": "0.5112406", "text": "abstract protected function build();", "title": "" }, { "docid": "9a00c6a27181539927206972131f0d4b", "score": "0.5111045", "text": "function notation_parse_meta($mt){\n\n}", "title": "" }, { "docid": "5f9e46ccfa3011bb60b1171eeba27764", "score": "0.51084286", "text": "function process($start, $stop) {\n global $sinput, $soutput;\n for ($i = $start; $i <= $stop;) {\n $matches = array();\n $n = preg_match('/if_([^ \\n]*)/', $sinput, $matches, PREG_OFFSET_CAPTURE, $i);\n if ($n != 1) {\n break;\n }\n $occ = $matches[0][1];\n if ($occ > $stop) {\n break;\n }\n $npat = strlen($matches[0][0]); \n $key = $matches[1][0];\n if ($key == \"some_or_default\" || $key == \"empty_label\" || $key == \"any_or_throw\" || $key == \"empty\") {\n $i = $occ+1;\n continue;\n }\n //printf(\"in %d to %d, offset %d, found %s at %s\\n\", $start, $stop, $i, $key, $occ);\n //print_r($matches);\n $matches1 = $matches;\n $add = substr($sinput, $i, ($occ-1) - $i + 1);\n $soutput .= $add;\n\n $n = preg_match('/\\G\\s*(\\()/', $sinput, $matches, PREG_OFFSET_CAPTURE, $occ + $npat);\n if ($n != 1) {\n fail(\"no open parent for first arg of monad\", $occ);\n }\n $open = $matches[1][1];\n if ($open > $stop) {\n fail(\"no open parent for first arg of monad\", $occ);\n }\n $close = matching_parenthesis($open);\n //printf(\"-- first open from %d to %d\\n\", $open, $close);\n if ($close == -1 || $close > $stop) {\n fail(\"unclosed first parent\", $open);\n }\n\n $matches = array();\n $n = preg_match('/\\G\\s*(\\(fun(.*?)->[ ]*)/', $sinput, $matches, PREG_OFFSET_CAPTURE, $close+1);\n if ($n != 1) {\n printf(\"key = '%s'\\n\", $key);\n printf(\"when: %s\\n\", substr($sinput, $occ, 100));\n fail(\"no bopen parent for second arg of monad\", $close+1);\n }\n $bopen = $matches[1][1];\n if ($bopen > $stop) {\n fail(\"no bopen parent for second arg of monad\", $occ);\n }\n //print_r($matches);\n $bsize = strlen($matches[1][0]);\n $args = $matches[2][0];\n // printf(\"args=%s\\n\", $args);\n $args_pieces = preg_split('/\\s+/', $args, NULL, PREG_SPLIT_NO_EMPTY);\n // print_r($args_pieces);\n if (count($args_pieces) == 1) {\n $arg = $args_pieces[0];\n } else if (count($args_pieces) == 2) {\n $arg = \"(\" . $args_pieces[0] . \",\" . $args_pieces[1] . \")\";\n } else {\n printf(\"when: %s\\n\", substr($sinput, $i, 100));\n printf(\"added: %s\\n\", $add);\n print_r($matches1);\n print_r($matches);\n print_r($args_pieces);\n fail(\"invalid count for pieces: \" . count($args_pieces), $close);\n }\n\n $bclose = matching_parenthesis($bopen);\n if ($bclose == -1 || $bclose > $stop) {\n printf(\"bclose=%d, stop=%d\\n\", $bclose, $stop);\n printf(\"bopen: %s\\n\", substr($sinput, $bopen, 100));\n printf(\"when: %s\\n\", substr($sinput, $occ, 100));\n fail(\"unclosed second parent\", $bopen);\n }\n $sinput[$bclose] = \" \";\n // &(\"-- second from %d to %d\\n\", $bopen, $bclose);\n $len = ($close - 1) - ($open + 1) + 1;\n $def = substr($sinput, $open + 1, $len);\n $add = 'let%' . $key . \" \" . $arg . ' = ' . $def . \" in\\n\";\n // printf(\"-- add: %s\\n\", $add);\n $soutput .= $add;\n\n $sub = $bopen + $bsize;\n $n = preg_match('/\\G[ ]*(\\n)/', $sinput, $matches, PREG_OFFSET_CAPTURE, $sub);\n if ($n == 1) {\n $sub = $matches[1][1] + 1;\n }\n process($sub, $bclose - 1);\n $i = $bclose + 1;\n // printf(\"-- continue at offset: %d\\n\", $i);\n }\n if ($i <= $stop) {\n $add = substr($sinput, $i, $stop - $i);\n $soutput .= $add;\n }\n // printf(\"-- add rest: %s\\n\", $add);\n // printf(\"return %d to %d\\n\", $start, $stop);\n}", "title": "" }, { "docid": "27810853f4339f339eebcc4a6a77b4f6", "score": "0.5093986", "text": "abstract protected function processCalculation(): GeneratorAbstract;", "title": "" }, { "docid": "749265c216cde126d5b8b7c210748d4f", "score": "0.5089602", "text": "abstract protected function _build_input();", "title": "" }, { "docid": "9cfe34129f7c7da986a5f1bb9ea5d04c", "score": "0.50854707", "text": "function generate_symb($xw, $order, $word_a)\n{\n $arg = \"arg\" . \"$order\";\n if (preg_match('/^(L|T|G)F@[[:alnum:]\\_\\-\\$\\&\\%\\*]+/', $word_a[$order]) !== 1) {\n $txt = explode (\"@\",$word_a[$order]);\n if (count($txt) == 1) {\n gen_arg($xw, $txt[0], $arg, \"\");\n }\n else {\n gen_arg($xw, $txt[0], $arg, $txt[1]);\n }\n //var_dump($txt);\n }\n else {\n gen_arg($xw, \"var\", $arg, $word_a[$order]);\n }\n}", "title": "" }, { "docid": "072055598eeb2c4192a17da9d3df5edd", "score": "0.5070838", "text": "abstract protected function functionOne();", "title": "" }, { "docid": "85272d2def28c5c8087dd83e835d8eb0", "score": "0.5057273", "text": "function theme_meta()\n{\n \n $match = find_request(0);\n $param1 = find_request(1);\n $param2 = find_request(2);\n\n $meta_title = (!empty(app_info()['site_name'])) ? app_info()['site_name'] : $_SERVER['REQUEST_URI'];\n $theme_dir = theme_dir();\n\n switch ($match) {\n\n case 'post':\n \n meta_tag();\n title_tag($param2);\n \n break;\n\n case 'page':\n\n meta_tag();\n title_tag($param1);\n\n break;\n\n case 'blog':\n\n meta_tag();\n title_tag(\"Blog\");\n \n break;\n \n case 'category':\n \n meta_tag();\n title_tag($match.' | '.$param1);\n \n break;\n\n default:\n \n meta_tag();\n title_tag($meta_title);\n \n break;\n\n }\n \n}", "title": "" }, { "docid": "be8d09c17c08d0ca2857cfc9052e7f3f", "score": "0.5053099", "text": "abstract public function fieldsToTranslate();", "title": "" }, { "docid": "03477f211f20916366736a31b8de7cae", "score": "0.5043707", "text": "function AskImamConstructFunctions()\n\t{\t\n\t}", "title": "" }, { "docid": "8cbc3213717a56215eb636979a472fd3", "score": "0.50398153", "text": "protected function generateCode() {}", "title": "" }, { "docid": "9e4cf82a597f2f59f56bcb5e335dbe67", "score": "0.50290626", "text": "abstract public static function generate();", "title": "" }, { "docid": "aa86906c5f10c5e9c15d068b737ee8cb", "score": "0.5028382", "text": "function extraCodesProcessor(&$obj) {\r\n\t\tif (!strcmp($obj->theCode,'POPULAR')) {\r\n\t\t\t$curListOrderBy = $obj->config['orderBy'];\r\n\t\t\t$curLimit = $obj->config['limit'];\r\n\t\t\t$curAscDesc = $obj->config['ascDesc'];\r\n\t\t\t$obj->config['orderBy'] = 'tx_weckb_click_count';\r\n\t\t\t$obj->config['ascDesc'] = 'DESC';\r\n\t\t\t$obj->config['limit'] = $obj->conf['popularLimit'];\r\n\t\t\t$content .= $obj->displayList();\r\n\t\t\t$obj->config['orderBy'] = $curListOrderBy;\r\n\t\t\t$obj->config['limit'] = $curLimit;\r\n\t\t\t$obj->config['ascDesc'] = $curAscDesc;\r\n\t\t\treturn $content;\r\n\t\t}\r\n\t\telse if (!strcmp($obj->theCode,'CATDROPDOWN')) {\r\n\t\t\t$content = $this->displayCatDropdown($obj);\r\n\t\t\treturn $content;\r\n\t\t}\r\n\t\telse if (!strcmp($obj->theCode,'TUTORIAL_LIST')) {\r\n\t\t\t$content = $this->displayTutorialList($obj);\r\n\t\t\treturn $content;\r\n\t\t}\r\n\t\telse if (!strcmp($obj->theCode,'TUTORIALS_MENU')) {\r\n\t\t\t$content = $this->displayTutorialsMenu($obj);\r\n\t\t\treturn $content;\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}", "title": "" }, { "docid": "c6c1562c82b3e74517ca2b9de11b4234", "score": "0.50262314", "text": "public function customMetas(){\r\n\r\n\t}", "title": "" }, { "docid": "aefb32065ccc778e8bae3c12b3d89d6d", "score": "0.5019694", "text": "protected function setupCode($call)\r\n {\r\n return <<<EOF\r\nclass Helper\r\n{\r\n public function assets()\r\n {\r\n global \\$_call;\r\n \\$_call = func_get_args();\r\n }\r\n\r\n public function javascripts()\r\n {\r\n global \\$_call;\r\n \\$_call = func_get_args();\r\n }\r\n\r\n public function stylesheets()\r\n {\r\n global \\$_call;\r\n \\$_call = func_get_args();\r\n }\r\n\r\n public function image()\r\n {\r\n global \\$_call;\r\n \\$_call = func_get_args();\r\n }\r\n}\r\n\r\nclass Assetic\r\n{\r\n public function __construct(Helper \\$helper)\r\n {\r\n \\$this->helper = \\$helper;\r\n }\r\n\r\n public function assetic()\r\n {\r\n return \\$this->helper;\r\n }\r\n\r\n public function call()\r\n {\r\n $call\r\n }\r\n}\r\n\r\n\\$assetic = new Assetic(new Helper());\r\n\\$assetic->call();\r\n\r\nEOF;\r\n }", "title": "" }, { "docid": "4073e11b153d6f81338ed75edba12182", "score": "0.5008749", "text": "function S (& $mappedObject, & $nameOfHook,\n & $nameOfFunction, & $argumentsOfHook) {\n\t switch ($nameOfHook) {\n\t \t# Mapping's done here ...\n\t \tcase 'escapeCString':\n\t \tcase 'escapeString':\n\t \tcase 'toHex':\n\t \tcase 'toChunk':\n\t \tcase 'encryptIt':\n\t \tcase 'chrToASCII':\n\t \tcase 'convertCYR':\n\t \tcase 'uDecode':\n\t \tcase 'uEncode':\n\t \tcase 'countChar':\n\t \tcase 'toCRC32':\n\t \tcase 'toHebrew':\n\t \tcase 'toNLHebrew':\n\t \tcase 'entityDecode':\n\t \tcase 'entityEncode':\n\t \tcase 'charDecode':\n\t \tcase 'charEncode':\n\t \tcase 'trimLeft':\n\t \tcase 'trimRight':\n\t \tcase 'toMD5File':\n\t \tcase 'toMD5':\n\t \tcase 'toMetaphoneKey':\n\t \tcase 'toMoneyFormat':\n\t \tcase 'nL2BR':\n\t \tcase 'ordToASCII':\n\t \tcase 'qpDecode':\n\t \tcase 'qpEncode':\n\t \tcase 'toSHA1File':\n\t \tcase 'toSHA1':\n\t \tcase 'toSoundEx':\n\t \tcase 'doCSV':\n\t \tcase 'replaceIToken':\n\t \tcase 'doPad':\n\t \tcase 'doRepeat':\n\t \tcase 'doShuffle':\n\t \tcase 'toROT13':\n\t \tcase 'doSplit':\n\t \tcase 'toWordCount':\n\t \tcase 'compareCaseTo':\n\t \tcase 'compareNCaseTo':\n\t \tcase 'compareTo':\n\t \tcase 'compareNTo':\n\t \tcase 'stripTags':\n\t \tcase 'removeCStr':\n\t \tcase 'removeStr':\n\t \tcase 'findIPos':\n\t \tcase 'findPos':\n\t \tcase 'findILPos':\n\t \tcase 'findLPos':\n\t \tcase 'findIFirst':\n\t \tcase 'findFirst':\n\t \tcase 'findLast':\n\t \tcase 'doReverse':\n\t \tcase 'toLength':\n\t \tcase 'natCaseCmp':\n\t \tcase 'natCmp':\n\t \tcase 'charSearch':\n\t \tcase 'doTokenize':\n\t \tcase 'toLower':\n\t \tcase 'toUpper':\n\t \tcase 'doTranslate':\n\t \tcase 'doSubStr':\n\t \tcase 'doSubCompare':\n\t \tcase 'doSubCount':\n\t \tcase 'doSubReplace':\n\t \tcase 'doWrap':\n\t \tcase 'doBZCompress':\n\t \tcase 'doBZDecompress':\n\t \tcase 'doBZOpen':\n\t \tcase 'doLZFCompress':\n\t \tcase 'doLZFDecompress':\n\t \tcase 'changeDirectory':\n\t \tcase 'scanDirectory':\n\t \tcase 'getCWorkingDir':\n\t \tcase 'stripSlashes':\n\t \tcase 'fileGetContents':\n\t \tcase 'filePutContents':\n\t \t\tarray_unshift ($argumentsOfHook, $mappedObject);\n\t \tbreak;\n\t \tcase 'fromStringToArray':\n\t \t\tif (isset ($argumentsOfHook[1])) {\n\t \t\t\t# Push the explode, third parameter up one;\n\t \t\t\t$argumentsOfHook[2] = $argumentsOfHook[1];\n\t \t\t}\n\t \t\t# Make the second parameter, this object;\n\t \t\t$argumentsOfHook[1] = $mappedObject;\n\t \tbreak;\n\t \tcase 'fromArray':\n \t\tbreak;\n\t \tcase 'eregReplace':\n\t \t $argumentsOfHook[2] = $mappedObject;\n \t break;\n\t # ERROR:\n\t default:\n\t # Get the __CLASS__ as get_class ($this);\n\t throw new Exception (METHOD_NAME_NOT_MAPPED);\n\t break;\n\t }\n\n\t switch ($nameOfHook) {\n\t case 'entityEncode':\n\t case 'entityDecode':\n\t $argumentsOfHook[] = 'UTF-8';\n\t break;\n\t }\n\n\t # Return, based on TYPEs;\n\t switch (gettype ($savedObjRETURN = call_user_func_array ($nameOfFunction, $argumentsOfHook))) {\n\t default:\n\t case 'string':\n\t return $mappedObject->setString ($savedObjRETURN);\n\t break;\n\t case 'integer':\n\t return new I ($savedObjRETURN);\n\t break;\n\t case 'double':\n\t return new F ($savedObjRETURN);\n\t break;\n\t case 'array':\n\t return new A ($savedObjRETURN);\n\t break;\n\t case 'boolean':\n\t return new B ($savedObjRETURN);\n\t break;\n\t case 'resource':\n\t return new R ($savedObjRETURN);\n\t break;\n\t }\n }", "title": "" }, { "docid": "d8f812da7f1492d794202a0863605224", "score": "0.5006746", "text": "private function generateRules()\r\n \t{\r\n \t\treturn CMap::mergeArray($this->generateContentRules(), $this->generateCategoryRules());\r\n \t}", "title": "" }, { "docid": "20a5d0103ffa38892b0578b522970022", "score": "0.5003226", "text": "abstract protected function _real_prefix();", "title": "" }, { "docid": "f21058ecef1c3569bbe28e5854d8a57f", "score": "0.5000144", "text": "abstract protected function decorated();", "title": "" }, { "docid": "f21058ecef1c3569bbe28e5854d8a57f", "score": "0.5000144", "text": "abstract protected function decorated();", "title": "" }, { "docid": "3aa8ad432ce8af820d50c08e5d321dce", "score": "0.49998108", "text": "abstract protected function caster();", "title": "" }, { "docid": "d1b44d9f18d2ff1403c36f8fa1caf341", "score": "0.49968117", "text": "public function mezclar();", "title": "" }, { "docid": "cff6b2fc1663aa1ba9586b469489bf3c", "score": "0.49741715", "text": "private function generateFromGeneric()\n {\n $ctypes = $this->app['config']->get('contenttypes');\n\n $translatables = array_filter(\n array_keys($this->translatables),\n function ($key) {\n return substr($key, 0, 21) === 'contenttypes.generic.' && substr($key, 21, 6) !== 'group.';\n }\n );\n\n foreach ($translatables as $key) {\n foreach ($ctypes as $ctname => $ctype) {\n $setkey = 'contenttypes.' . $ctname . '.text.' . substr($key, 21);\n $this->translation[$setkey] = isset($this->saved[$setkey]) ? $this->saved[$setkey] : '';\n if ($this->translation[$setkey] === '') {\n $generic = Trans::__($key);\n // If not translated, add hint\n if ($generic !== $key) {\n $replacement = [];\n if (strpos($generic, '%contenttypes%') !== false) {\n $replacement['%contenttypes%'] = $ctname;\n } elseif (strpos($generic, '%contenttype%') !== false) {\n $replacement['%contenttype%'] = $ctname;\n }\n $this->hints[$setkey] = Trans::__($key, $replacement);\n }\n }\n }\n }\n }", "title": "" }, { "docid": "c520d7ac645b4e5562c2ad42b9a1670d", "score": "0.4973688", "text": "abstract function desc();", "title": "" }, { "docid": "6627858e3fc17d4ef80c195a2dc0d856", "score": "0.49553975", "text": "abstract protected function getDataGeneratorClass();", "title": "" }, { "docid": "c26d8057542b3ffe28f242620e5fc519", "score": "0.49547997", "text": "abstract public function generate();", "title": "" }, { "docid": "c26d8057542b3ffe28f242620e5fc519", "score": "0.49547997", "text": "abstract public function generate();", "title": "" }, { "docid": "c26d8057542b3ffe28f242620e5fc519", "score": "0.49547997", "text": "abstract public function generate();", "title": "" }, { "docid": "c26d8057542b3ffe28f242620e5fc519", "score": "0.49547997", "text": "abstract public function generate();", "title": "" }, { "docid": "c26d8057542b3ffe28f242620e5fc519", "score": "0.49547997", "text": "abstract public function generate();", "title": "" }, { "docid": "4109abd5b40d55fa273bcbf76813967f", "score": "0.49518996", "text": "abstract protected function rules();", "title": "" }, { "docid": "a7fbd496aee76e5158a09d608844f97e", "score": "0.4949688", "text": "abstract public function getFunctions();", "title": "" }, { "docid": "485cc019fa1cc7c38b455b89cfb59892", "score": "0.4941013", "text": "function prefix($type, $imp, $man)\n{\n\tif ($imp == \"cryo\")\n\t{\n\t\tif ($man == \"Bandit\") { return \"icee\"; }\n\t\telse { return \"Icy\"; }\n\t}\n\n\tswitch($type)\n\t{\n\tcase \"pistol\":\n\t\tswitch($man)\n\t\t{\n\t\t\tcase \"Bandit\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"aiming\":\n\t\t\t\t\tcase \"range\":\n\t\t\t\t\t\treturn \"misles\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"AP\":\n\t\t\t\t\tcase \"damage\":\n\t\t\t\t\tcase \"heavy weapon\":\n\t\t\t\t\t\treturn \"murduerer's\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bayonet\":\n\t\t\t\t\t\treturn \"baynaneted\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"clip capacity\":\n\t\t\t\t\t\treturn \"extendified\";\n\t\t\t\t\tcase \"corrosive\":\n\t\t\t\t\t\treturn \"crudy\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"incendiary\":\n\t\t\t\t\t\treturn \"fire fire\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shock\":\n\t\t\t\t\t\treturn \"zapper\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"slag\":\n\t\t\t\t\t\treturn \"slaged\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"barrels\":\n\t\t\t\t\t\treturn \"dubble\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shooting mode\":\n\t\t\t\t\t\treturn \"rapider\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"stability\":\n\t\t\t\t\t\treturn \"marxmans\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END BANDIT\n\t\t\tbreak;\n\t\t\tcase \"Dahl\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"aiming\":\n\t\t\t\t\tcase \"range\":\n\t\t\t\t\t\treturn \"Floated\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"AP\":\n\t\t\t\t\tcase \"damage\":\n\t\t\t\t\tcase \"heavy weapon\":\n\t\t\t\t\t\treturn \"Neutralizing\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bayonet\":\n\t\t\t\t\t\treturn \"Close Quarters\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"clip capacity\":\n\t\t\t\t\t\treturn \"Loaded\";\n\t\t\t\t\tcase \"corrosive\":\n\t\t\t\t\t\treturn \"Corrosive\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"incendiary\":\n\t\t\t\t\t\treturn \"Incendiary\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shock\":\n\t\t\t\t\t\treturn \"Sapping\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"slag\":\n\t\t\t\t\t\treturn \"Amped\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"barrels\":\n\t\t\t\t\t\treturn \"Twin\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shooting mode\":\n\t\t\t\t\t\treturn \"React\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"stability\":\n\t\t\t\t\t\treturn \"Tactical\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END DAHL\n\t\t\tbreak;\n\t\t\tcase \"Hyperion\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"aiming\":\n\t\t\t\t\tcase \"range\":\n\t\t\t\t\t\treturn \"Earnest\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"AP\":\n\t\t\t\t\tcase \"damage\":\n\t\t\t\t\tcase \"heavy weapon\":\n\t\t\t\t\t\treturn \"Win-Win\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bayonet\":\n\t\t\t\t\t\treturn \"Action\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"clip capacity\":\n\t\t\t\t\t\treturn \"Maximized\";\n\t\t\t\t\tcase \"corrosive\":\n\t\t\t\t\t\treturn \"Base\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"incendiary\":\n\t\t\t\t\t\treturn \"Hot Button\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shock\":\n\t\t\t\t\t\treturn \"Energizing\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"slag\":\n\t\t\t\t\t\treturn \"Amplified\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"barrels\":\n\t\t\t\t\t\treturn \"Redundant\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shooting mode\":\n\t\t\t\t\t\treturn \"Dynamic\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"stability\":\n\t\t\t\t\t\treturn \"Core\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END HYPERION\n\t\t\tbreak;\n\t\t\tcase \"Jakobs\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"aiming\":\n\t\t\t\t\tcase \"range\":\n\t\t\t\t\t\treturn \"Straight Shootin\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"AP\":\n\t\t\t\t\tcase \"damage\":\n\t\t\t\t\tcase \"heavy weapon\":\n\t\t\t\t\t\treturn \"Dastardly\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bayonet\":\n\t\t\t\t\t\treturn \"Bowie\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"clip capacity\":\n\t\t\t\t\t\treturn \"Loaded\";\n\t\t\t\t\tcase \"barrels\":\n\t\t\t\t\t\treturn \"Two Fer\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shooting mode\":\n\t\t\t\t\t\treturn \"Trick Shot\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"stability\":\n\t\t\t\t\t\treturn \"Gunstock\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END JAKOBS\n\t\t\tbreak;\n\t\t\tcase \"Maliwan\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"corrosive\":\n\t\t\t\t\t\treturn \"Trenchant\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"incendiary\":\n\t\t\t\t\t\treturn \"Inflammatory\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shock\":\n\t\t\t\t\t\treturn \"Electrified\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"slag\":\n\t\t\t\t\t\treturn \"Scoria\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END MALIWAN\n\t\t\tbreak;\n\t\t\tcase \"Tediore\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"aiming\":\n\t\t\t\t\tcase \"range\":\n\t\t\t\t\t\treturn \"Dependable\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"AP\":\n\t\t\t\t\tcase \"damage\":\n\t\t\t\t\tcase \"heavy weapon\":\n\t\t\t\t\t\treturn \"Super\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bayonet\":\n\t\t\t\t\t\treturn \"Permasharp\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"clip capacity\":\n\t\t\t\t\t\treturn \"Jam Packed\";\n\t\t\t\t\tcase \"corrosive\":\n\t\t\t\t\t\treturn \"Pine Fresh\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"incendiary\":\n\t\t\t\t\t\treturn \"Red Hot\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shock\":\n\t\t\t\t\t\treturn \"Energizing\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"slag\":\n\t\t\t\t\t\treturn \"Disinfecting\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"barrels\":\n\t\t\t\t\t\treturn \"Two-for-One\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shooting mode\":\n\t\t\t\t\t\treturn \"Peppy\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"Clean\":\n\t\t\t\t\t\treturn \"marxmans\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END TEDIORE\n\t\t\tbreak;\n\t\t\tcase \"Torgue\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"aiming\":\n\t\t\t\t\tcase \"range\":\n\t\t\t\t\t\treturn \"Explicit\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"AP\":\n\t\t\t\t\tcase \"damage\":\n\t\t\t\t\tcase \"heavy weapon\":\n\t\t\t\t\t\treturn \"Hard\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bayonet\":\n\t\t\t\t\t\treturn \"Thrusting\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"clip capacity\":\n\t\t\t\t\t\treturn \"Crammed\";\n\t\t\t\t\tcase \"barrels\":\n\t\t\t\t\t\treturn \"Double Penetrating\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shooting mode\":\n\t\t\t\t\t\treturn \"Intense\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"stability\":\n\t\t\t\t\t\treturn \"Stiff\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END TORGUE\n\t\t\tbreak;\n\t\t\tcase \"Vladof\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"aiming\":\n\t\t\t\t\tcase \"range\":\n\t\t\t\t\t\treturn \"Righteous\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"AP\":\n\t\t\t\t\tcase \"damage\":\n\t\t\t\t\tcase \"heavy weapon\":\n\t\t\t\t\t\treturn \"Purging\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bayonet\":\n\t\t\t\t\t\treturn \"Patriot's\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"clip capacity\":\n\t\t\t\t\t\treturn \"Unending\";\n\t\t\t\t\tcase \"corrosive\":\n\t\t\t\t\t\treturn \"Caustic\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"incendiary\":\n\t\t\t\t\t\treturn \"Burning\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shock\":\n\t\t\t\t\t\treturn \"Discharge\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"slag\":\n\t\t\t\t\t\treturn \"Slag\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"barrels\":\n\t\t\t\t\t\treturn \"Dva\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shooting mode\":\n\t\t\t\t\t\treturn \"Vengeful\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"stability\":\n\t\t\t\t\t\treturn \"Resolute\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END VLADOF\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn \"#\" . $imp . \"#\";\n\t\t} // END PISTOL\n\t\tbreak;\n\tcase (\"smg\"):\n\t\tswitch($man)\n\t\t{\n\t\t\tcase \"Bandit\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"aiming\":\n\t\t\t\t\tcase \"range\":\n\t\t\t\t\t\treturn \"akurate\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"AP\":\n\t\t\t\t\tcase \"damage\":\n\t\t\t\t\t\treturn \"murduring\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bayonet\":\n\t\t\t\t\t\treturn \"cuting\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"corrosive\":\n\t\t\t\t\t\treturn \"crudy\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"incendiary\":\n\t\t\t\t\t\treturn \"fire fire\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shock\":\n\t\t\t\t\t\treturn \"zapper\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"slag\":\n\t\t\t\t\t\treturn \"slaged\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"range\":\n\t\t\t\t\tcase \"shooting mode\":\n\t\t\t\t\t\treturn \"bulets-go-fasterified\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"rapid reload\":\n\t\t\t\t\t\treturn \"agresive\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"stability\":\n\t\t\t\t\t\treturn \"ballanced\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END BANDIT\n\t\t\tbreak;\n\t\t\tcase \"Dahl\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"aiming\":\n\t\t\t\t\tcase \"range\":\n\t\t\t\t\t\treturn \"Deft\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"AP\":\n\t\t\t\t\tcase \"damage\":\n\t\t\t\t\t\treturn \"Stopping\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bayonet\":\n\t\t\t\t\t\treturn \"Bladed\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"corrosive\":\n\t\t\t\t\t\treturn \"Corrosive\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"incendiary\":\n\t\t\t\t\t\treturn \"Incendiary\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shock\":\n\t\t\t\t\t\treturn \"Sapping\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"slag\":\n\t\t\t\t\t\treturn \"Amp\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"range\":\n\t\t\t\t\tcase \"shooting mode\":\n\t\t\t\t\t\treturn \"Flying\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"rapid reload\":\n\t\t\t\t\t\treturn \"Skirmish\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"stability\":\n\t\t\t\t\t\treturn \"Stoic\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END DAHL\n\t\t\tbreak;\n\t\t\tcase \"Hyperion\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"aiming\":\n\t\t\t\t\tcase \"range\":\n\t\t\t\t\t\treturn \"Analytical\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"AP\":\n\t\t\t\t\tcase \"damage\":\n\t\t\t\t\t\treturn \"Rightsizing\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bayonet\":\n\t\t\t\t\t\treturn \"Cutting Edge\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"corrosive\":\n\t\t\t\t\t\treturn \"Base\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"incendiary\":\n\t\t\t\t\t\treturn \"Hot Button\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shock\":\n\t\t\t\t\t\treturn \"Energizing\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"slag\":\n\t\t\t\t\t\treturn \"Amplified\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"range\":\n\t\t\t\t\tcase \"shooting mode\":\n\t\t\t\t\t\treturn \"Proactive\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"rapid reload\":\n\t\t\t\t\t\treturn \"Social\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"stability\":\n\t\t\t\t\t\treturn \"Corporate\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END HYPERION\n\t\t\tbreak;\n\t\t\tcase \"Maliwan\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"corrosive\":\n\t\t\t\t\t\treturn \"Caustic\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"incendiary\":\n\t\t\t\t\t\treturn \"Fervid\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shock\":\n\t\t\t\t\t\treturn \"Storming\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"slag\":\n\t\t\t\t\t\treturn \"Feculent\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END MALIWAN\n\t\t\tbreak;\n\t\t\tcase \"Tediore\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"aiming\":\n\t\t\t\t\tcase \"range\":\n\t\t\t\t\t\treturn \"Guaranteed\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"AP\":\n\t\t\t\t\tcase \"damage\":\n\t\t\t\t\t\treturn \"Hefty\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bayonet\":\n\t\t\t\t\t\treturn \"Perma-Sharp\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"corrosive\":\n\t\t\t\t\t\treturn \"Peppermint\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"incendiary\":\n\t\t\t\t\t\treturn \"Toasty\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shock\":\n\t\t\t\t\t\treturn \"Sparkling\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"slag\":\n\t\t\t\t\t\treturn \"Biodegradable\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"range\":\n\t\t\t\t\tcase \"shooting mode\":\n\t\t\t\t\t\treturn \"Brisk\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"rapid reload\":\n\t\t\t\t\t\treturn \"Refill\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"stability\":\n\t\t\t\t\t\treturn \"Quality\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END TEDIORE\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn \"#\" . $imp . \"#\";\n\t\t} // END SMG\n\t\tbreak;\n\tcase \"assault rifle\":\n\t\tswitch($man)\n\t\t{\n\t\t\tcase \"Bandit\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"aiming\":\n\t\t\t\t\t\treturn \"akurate\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"AP\":\n\t\t\t\t\tcase \"damage\":\n\t\t\t\t\tcase \"heavy weapon\":\n\t\t\t\t\t\treturn \"nassty\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bayonet\":\n\t\t\t\t\t\treturn \"nifed\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"clip capacity\":\n\t\t\t\t\t\treturn \"expandifide\";\n\t\t\t\t\tcase \"corrosive\":\n\t\t\t\t\t\treturn \"crudy\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"incendiary\":\n\t\t\t\t\t\treturn \"fire fire\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shock\":\n\t\t\t\t\t\treturn \"zapper\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"slag\":\n\t\t\t\t\t\treturn \"slaged\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"range\":\n\t\t\t\t\t\treturn \"fast bulets\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shooting mode\":\n\t\t\t\t\t\treturn \"wyld asss\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"stability\":\n\t\t\t\t\t\treturn \"taktikal\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END BANDIT\n\t\t\tbreak;\n\t\t\tcase \"Dahl\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"aiming\":\n\t\t\t\t\t\treturn \"Scout\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"AP\":\n\t\t\t\t\tcase \"damage\":\n\t\t\t\t\tcase \"heavy weapon\":\n\t\t\t\t\t\treturn \"Attack\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bayonet\":\n\t\t\t\t\t\treturn \"Breach\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"clip capacity\":\n\t\t\t\t\t\treturn \"Onslaught\";\n\t\t\t\t\tcase \"corrosive\":\n\t\t\t\t\t\treturn \"Corrosive\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"incendiary\":\n\t\t\t\t\t\treturn \"Incendiary\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shock\":\n\t\t\t\t\t\treturn \"Sapping\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"slag\":\n\t\t\t\t\t\treturn \"Amp\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"range\":\n\t\t\t\t\t\treturn \"Deep\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shooting mode\":\n\t\t\t\t\t\treturn \"Feral\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"stability\":\n\t\t\t\t\t\treturn \"Patrol\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END DAHL\n\t\t\tbreak;\n\t\t\tcase \"Jakobs\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"aiming\":\n\t\t\t\t\t\treturn \"Deadshot\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"AP\":\n\t\t\t\t\tcase \"damage\":\n\t\t\t\t\tcase \"heavy weapon\":\n\t\t\t\t\t\treturn \"Boss\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bayonet\":\n\t\t\t\t\t\treturn \"Razor\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"clip capacity\":\n\t\t\t\t\t\treturn \"Flush\";\n\t\t\t\t\tcase \"range\":\n\t\t\t\t\t\treturn \"Cowboy\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shooting mode\":\n\t\t\t\t\t\treturn \"Wild\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"stability\":\n\t\t\t\t\t\treturn \"Horse\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END JAKOBS\n\t\t\tbreak;\n\t\t\tcase \"Torgue\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"aiming\":\n\t\t\t\t\t\treturn \"Rigorous\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"AP\":\n\t\t\t\t\tcase \"damage\":\n\t\t\t\t\tcase \"heavy weapon\":\n\t\t\t\t\t\treturn \"Nasty\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bayonet\":\n\t\t\t\t\t\treturn \"Stabbing\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"clip capacity\":\n\t\t\t\t\t\treturn \"Plump\";\n\t\t\t\t\tcase \"range\":\n\t\t\t\t\t\treturn \"Slippery\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shooting mode\":\n\t\t\t\t\t\treturn \"Wild\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"stability\":\n\t\t\t\t\t\treturn \"Rhythmic\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END TORGUE\n\t\t\tbreak;\n\t\t\tcase \"Vladof\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"aiming\":\n\t\t\t\t\t\treturn \"Severe\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"AP\":\n\t\t\t\t\tcase \"damage\":\n\t\t\t\t\tcase \"heavy weapon\":\n\t\t\t\t\t\treturn \"Ferocious\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bayonet\":\n\t\t\t\t\t\treturn \"Skewering\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"clip capacity\":\n\t\t\t\t\t\treturn \"Expansive\";\n\t\t\t\t\tcase \"corrosive\":\n\t\t\t\t\t\treturn \"Corrosive\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"incendiary\":\n\t\t\t\t\t\treturn \"Hot\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shock\":\n\t\t\t\t\t\treturn \"Sapping\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"slag\":\n\t\t\t\t\t\treturn \"Slag\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"range\":\n\t\t\t\t\t\treturn \"Swift\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shooting mode\":\n\t\t\t\t\t\treturn \"Rabid\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"stability\":\n\t\t\t\t\t\treturn \"Resolute\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END VLADOF\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn \"#\" . $imp . \"#\";\n\t\t} // END ASSAULT RIFLE\n\t\tbreak;\n\tcase \"sniper rifle\":\n\t\tswitch($man)\n\t\t{\n\t\t\tcase \"Dahl\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"AP\":\n\t\t\t\t\tcase \"damage\":\n\t\t\t\t\tcase \"heavy weapon\":\n\t\t\t\t\t\treturn \"Pacifying\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bayonet\":\n\t\t\t\t\t\treturn \"Cartel\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"clip capacity\":\n\t\t\t\t\t\treturn \"Operational\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"critical\":\n\t\t\t\t\t\treturn \"Night\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"corrosive\":\n\t\t\t\t\t\treturn \"Nerve\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"incendiary\":\n\t\t\t\t\t\treturn \"Phosphor\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shock\":\n\t\t\t\t\t\treturn \"Shock\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"slag\":\n\t\t\t\t\t\treturn \"Slag\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"range\":\n\t\t\t\t\t\treturn \"Surgical\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shooting mode\":\n\t\t\t\t\t\treturn \"Suppressive\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"improved snapfire\":\n\t\t\t\t\tcase \"stability\":\n\t\t\t\t\t\treturn \"Liquid\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END DAHL\n\t\t\tbreak;\n\t\t\tcase \"Hyperion\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"AP\":\n\t\t\t\t\tcase \"damage\":\n\t\t\t\t\tcase \"heavy weapon\":\n\t\t\t\t\t\treturn \"Auditing\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bayonet\":\n\t\t\t\t\t\treturn \"Contingent\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"clip capacity\":\n\t\t\t\t\t\treturn \"Resource\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"critical\":\n\t\t\t\t\t\treturn \"Venture\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"corrosive\":\n\t\t\t\t\t\treturn \"Residual\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"incendiary\":\n\t\t\t\t\t\treturn \"Thermogenic\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shock\":\n\t\t\t\t\t\treturn \"Energy\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"slag\":\n\t\t\t\t\t\treturn \"Diffusion\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"range\":\n\t\t\t\t\t\treturn \"Longitudinal\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shooting mode\":\n\t\t\t\t\t\treturn \"Operational\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"improved snapfire\":\n\t\t\t\t\tcase \"stability\":\n\t\t\t\t\t\treturn \"Cohesion\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END HYPERION\n\t\t\tbreak;\n\t\t\tcase \"Jakobs\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"AP\":\n\t\t\t\t\tcase \"damage\":\n\t\t\t\t\tcase \"heavy weapon\":\n\t\t\t\t\t\treturn \"Skookum\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bayonet\":\n\t\t\t\t\t\treturn \"Tl'kope\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"clip capacity\":\n\t\t\t\t\t\treturn \"Hyiu\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"critical\":\n\t\t\t\t\t\treturn \"Tumtum\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"range\":\n\t\t\t\t\t\treturn \"Siah-Siah\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shooting mode\":\n\t\t\t\t\t\treturn \"Klook\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"improved snapfire\":\n\t\t\t\t\tcase \"stability\":\n\t\t\t\t\t\treturn \"Chikamin\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END JAKOBS\n\t\t\tbreak;\n\t\t\tcase \"Maliwan\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"corrosive\":\n\t\t\t\t\t\treturn \"Bumblebroth\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"incendiary\":\n\t\t\t\t\t\treturn \"Scarlet\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shock\":\n\t\t\t\t\t\treturn \"Zooks\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"slag\":\n\t\t\t\t\t\treturn \"Deuced\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END MALIWAN\n\t\t\tbreak;\n\t\t\tcase \"Vladof\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"AP\":\n\t\t\t\t\tcase \"damage\":\n\t\t\t\t\tcase \"heavy weapon\":\n\t\t\t\t\t\treturn \"Gromky\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bayonet\":\n\t\t\t\t\t\treturn \"Britva\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"clip capacity\":\n\t\t\t\t\t\treturn \"Bolshy\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"critical\":\n\t\t\t\t\t\treturn \"Razrez\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"corrosive\":\n\t\t\t\t\t\treturn \"Splodge\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"incendiary\":\n\t\t\t\t\t\treturn \"Phospher\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shock\":\n\t\t\t\t\t\treturn \"Strack\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"slag\":\n\t\t\t\t\t\treturn \"Bolnoy\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"range\":\n\t\t\t\t\t\treturn \"Zammechat\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shooting mode\":\n\t\t\t\t\t\treturn \"Skorry\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"improved snapfire\":\n\t\t\t\t\tcase \"stability\":\n\t\t\t\t\t\treturn \"Dobby\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END VLADOF\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn \"#\" . $imp . \"#\";\n\t\t} // END SNIPER RIFLE\n\t\tbreak;\n\tcase \"shotgun\":\n\t\tswitch($man)\n\t\t{\n\t\t\tcase \"Bandit\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"aiming\":\n\t\t\t\t\tcase \"range\":\n\t\t\t\t\t\treturn \"sketer\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"AP\":\n\t\t\t\t\tcase \"damage\":\n\t\t\t\t\tcase \"shooting mode\":\n\t\t\t\t\t\treturn \"assssult\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bayonet\":\n\t\t\t\t\t\treturn \"slising\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"clip capacity\":\n\t\t\t\t\t\treturn \"drumed\";\n\t\t\t\t\tcase \"critical\":\n\t\t\t\t\t\treturn \"critikal hit\";\n\t\t\t\t\tcase \"corrosive\":\n\t\t\t\t\t\treturn \"crudy\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"incendiary\":\n\t\t\t\t\t\treturn \"fire fire\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shock\":\n\t\t\t\t\t\treturn \"zapper\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"slag\":\n\t\t\t\t\t\treturn \"slaged\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"rapid reload\":\n\t\t\t\t\t\treturn \"quik loadeder\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"redy stedy\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END BANDIT\n\t\t\tbreak;\n\t\t\tcase \"Hyperion\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"aiming\":\n\t\t\t\t\tcase \"range\":\n\t\t\t\t\t\treturn \"Potential\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"AP\":\n\t\t\t\t\tcase \"damage\":\n\t\t\t\t\tcase \"shooting mode\":\n\t\t\t\t\t\treturn \"Practicable\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bayonet\":\n\t\t\t\t\t\treturn \"Restructuring\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"clip capacity\":\n\t\t\t\t\t\treturn \"Scalable\";\n\t\t\t\t\tcase \"critical\":\n\t\t\t\t\t\treturn \"Critical\";\n\t\t\t\t\tcase \"corrosive\":\n\t\t\t\t\t\treturn \"Industrial\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"incendiary\":\n\t\t\t\t\t\treturn \"Clement\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shock\":\n\t\t\t\t\t\treturn \"Conductive\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"slag\":\n\t\t\t\t\t\treturn \"Negative\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"rapid reload\":\n\t\t\t\t\t\treturn \"Reactive\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"Social\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END HYPERION\n\t\t\tbreak;\n\t\t\tcase \"Jakobs\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"aiming\":\n\t\t\t\t\tcase \"range\":\n\t\t\t\t\t\treturn \"Huntin\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"AP\":\n\t\t\t\t\tcase \"damage\":\n\t\t\t\t\tcase \"shooting mode\":\n\t\t\t\t\t\treturn \"Rustler's\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bayonet\":\n\t\t\t\t\t\treturn \"Barbed\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"clip capacity\":\n\t\t\t\t\t\treturn \"Sidewinder\";\n\t\t\t\t\tcase \"critical\":\n\t\t\t\t\t\treturn \"Doc's\";\n\t\t\t\t\tcase \"rapid reload\":\n\t\t\t\t\t\treturn \"Texas\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"Well Kept\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END JAKOBS\n\t\t\tbreak;\n\t\t\tcase \"Tediore\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"aiming\":\n\t\t\t\t\tcase \"range\":\n\t\t\t\t\t\treturn \"Original\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"AP\":\n\t\t\t\t\tcase \"damage\":\n\t\t\t\t\tcase \"shooting mode\":\n\t\t\t\t\t\treturn \"Gentle\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bayonet\":\n\t\t\t\t\t\treturn \"Swiss\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"clip capacity\":\n\t\t\t\t\t\treturn \"Extra Large\";\n\t\t\t\t\tcase \"critical\":\n\t\t\t\t\t\treturn \"Royal\";\n\t\t\t\t\tcase \"corrosive\":\n\t\t\t\t\t\treturn \"Spring Time\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"incendiary\":\n\t\t\t\t\t\treturn \"Sunny\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shock\":\n\t\t\t\t\t\treturn \"Blue Light\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"slag\":\n\t\t\t\t\t\treturn \"Boosted\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"rapid reload\":\n\t\t\t\t\t\treturn \"Basic\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"New and Improved\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END TEDIORE\n\t\t\tbreak;\n\t\t\tcase \"Torgue\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"aiming\":\n\t\t\t\t\tcase \"range\":\n\t\t\t\t\t\treturn \"Potent\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"AP\":\n\t\t\t\t\tcase \"damage\":\n\t\t\t\t\tcase \"shooting mode\":\n\t\t\t\t\t\treturn \"Casual\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bayonet\":\n\t\t\t\t\t\treturn \"Bad Touch\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"clip capacity\":\n\t\t\t\t\t\treturn \"Desperate\";\n\t\t\t\t\tcase \"critical\":\n\t\t\t\t\t\treturn \"Juicy\";\n\t\t\t\t\tcase \"rapid reload\":\n\t\t\t\t\t\treturn \"Impetuous\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"Sinewy\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END TORGUE\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn \"#\" . $imp . \"#\";\n\t\t} // END SHOTGUN\n\t\tbreak;\n\tcase \"rocket launcher\":\n\t\tswitch($man)\n\t\t{\n\t\t\tcase \"Bandit\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"aiming\":\n\t\t\t\t\tcase \"range\":\n\t\t\t\t\t\treturn \"snyper\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bayonet\":\n\t\t\t\t\t\treturn \"gratuitius\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"clip capacity\":\n\t\t\t\t\t\treturn \"roket pawket\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"damage\":\n\t\t\t\t\t\treturn \"big\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"corrosive\":\n\t\t\t\t\t\treturn \"corodoe\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"incendiary\":\n\t\t\t\t\t\treturn \"hunka burnin\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shock\":\n\t\t\t\t\t\treturn \"shoky\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"slag\":\n\t\t\t\t\t\treturn \"slaged\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"range\":\n\t\t\t\t\t\treturn \"speedee\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"barrels\":\n\t\t\t\t\t\treturn \"rappid\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"reduced weight\":\n\t\t\t\t\t\treturn \"quik drawler\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END BANDIT\n\t\t\tbreak;\n\t\t\tcase \"Maliwan\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"corrosive\":\n\t\t\t\t\t\treturn \"Paraquat\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"incendiary\":\n\t\t\t\t\t\treturn \"Pyroclastic\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shock\":\n\t\t\t\t\t\treturn \"Paraelectronomic\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"slag\":\n\t\t\t\t\t\treturn \"Purulence\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END MALIWAN\n\t\t\tbreak;\n\t\t\tcase \"Tediore\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"aiming\":\n\t\t\t\t\tcase \"range\":\n\t\t\t\t\t\treturn \"Ultraprecise\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bayonet\":\n\t\t\t\t\t\treturn \"Multi-Use\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"clip capacity\":\n\t\t\t\t\t\treturn \"Bonus\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"damage\":\n\t\t\t\t\t\treturn \"Large\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"corrosive\":\n\t\t\t\t\t\treturn \"Fungicide\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"incendiary\":\n\t\t\t\t\t\treturn \"Toasty\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shock\":\n\t\t\t\t\t\treturn \"Sparkling\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"slag\":\n\t\t\t\t\t\treturn \"Disinfecting\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"range\":\n\t\t\t\t\t\treturn \"Rocket Speed\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"barrels\":\n\t\t\t\t\t\treturn \"Bustling\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"reduced weight\":\n\t\t\t\t\t\treturn \"Swapper's\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END TEDIORE\n\t\t\tbreak;\n\t\t\tcase \"Torgue\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"aiming\":\n\t\t\t\t\tcase \"range\":\n\t\t\t\t\t\treturn \"Gaa Dunk Ga\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bayonet\":\n\t\t\t\t\t\treturn \"Pokee Doke\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"clip capacity\":\n\t\t\t\t\t\treturn \"Deep a\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"damage\":\n\t\t\t\t\t\treturn \"Derp\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"range\":\n\t\t\t\t\t\treturn \"Fidle Dee\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"barrels\":\n\t\t\t\t\t\treturn \"Dum Pa\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"reduced weight\":\n\t\t\t\t\t\treturn \"Fwap a\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END TORGUE\n\t\t\tbreak;\n\t\t\tcase \"Vladof\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"aiming\":\n\t\t\t\t\tcase \"range\":\n\t\t\t\t\t\treturn \"Victorious\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"bayonet\":\n\t\t\t\t\t\treturn \"Revolt\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"clip capacity\":\n\t\t\t\t\t\treturn \"Worker's\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"damage\":\n\t\t\t\t\t\treturn \"Rugged\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"corrosive\":\n\t\t\t\t\t\treturn \"Virulent\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"incendiary\":\n\t\t\t\t\t\treturn \"Red\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shock\":\n\t\t\t\t\t\treturn \"Shock\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"slag\":\n\t\t\t\t\t\treturn \"Opposing\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"range\":\n\t\t\t\t\t\treturn \"Partisan\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"barrels\":\n\t\t\t\t\t\treturn \"Turbulent\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"reduced weight\":\n\t\t\t\t\t\treturn \"Moscovite's\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END VLADOF\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn \"#\" . $imp . \"#\";\n\t\t} // END ROCKET LAUNCHER\n\t\tbreak;\n\tcase \"shield\":\n\t\tswitch($man)\n\t\t{\n\t\t\tcase \"Anshin\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"capacity\":\n\t\t\t\t\t\tswitch($GLOBALS['level'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase \"novice\":\n\t\t\t\t\t\t\t\treturn \"Terminal\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"seasoned\":\n\t\t\t\t\t\t\t\treturn \"Inferior\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"veteran\":\n\t\t\t\t\t\t\t\treturn \"Maximal\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"heroic\":\n\t\t\t\t\t\t\t\treturn \"Superior\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault: // legendary+\n\t\t\t\t\t\t\t\treturn \"Diagnostic\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"reactivity\":\n\t\t\t\t\t\tswitch($GLOBALS['level'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase \"novice\":\n\t\t\t\t\t\t\t\treturn \"Ligated\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"seasoned\":\n\t\t\t\t\t\t\t\treturn \"Occluded\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"veteran\":\n\t\t\t\t\t\t\t\treturn \"Patent\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"heroic\":\n\t\t\t\t\t\t\t\treturn \"Hyper\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault: // legendary+\n\t\t\t\t\t\t\t\treturn \"Vital\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"recharge rate\":\n\t\t\t\t\t\tswitch($GLOBALS['level'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase \"novice\":\n\t\t\t\t\t\t\t\treturn \"Anemic\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"seasoned\":\n\t\t\t\t\t\t\t\treturn \"Dilatory\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"veteran\":\n\t\t\t\t\t\t\t\treturn \"Augmented\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"heroic\":\n\t\t\t\t\t\t\t\treturn \"Intensified\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault: // legendary+\n\t\t\t\t\t\t\t\treturn \"Invasive\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"Stable\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END ANSHIN\n\t\t\tbreak;\n\t\t\tcase \"Bandit\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"capacity\":\n\t\t\t\t\t\tswitch($GLOBALS['level'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase \"novice\":\n\t\t\t\t\t\t\t\treturn \"meate\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"seasoned\":\n\t\t\t\t\t\t\t\treturn \"crumy\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"veteran\":\n\t\t\t\t\t\t\t\treturn \"tuff\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"heroic\":\n\t\t\t\t\t\t\t\treturn \"stoppiest\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault: // legendary+\n\t\t\t\t\t\t\t\treturn \"biger\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"reactivity\":\n\t\t\t\t\t\tswitch($GLOBALS['level'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase \"novice\":\n\t\t\t\t\t\t\t\treturn \"y so lonng\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"seasoned\":\n\t\t\t\t\t\t\t\treturn \"waite-ee\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"veteran\":\n\t\t\t\t\t\t\t\treturn \"qik startr\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"heroic\":\n\t\t\t\t\t\t\t\treturn \"go nowe\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault: // legendary+\n\t\t\t\t\t\t\t\treturn \"less waite\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"recharge rate\":\n\t\t\t\t\t\tswitch($GLOBALS['level'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase \"novice\":\n\t\t\t\t\t\t\t\treturn \"slo\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"seasoned\":\n\t\t\t\t\t\t\t\treturn \"whish fastr\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"veteran\":\n\t\t\t\t\t\t\t\treturn \"charje fasst\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"heroic\":\n\t\t\t\t\t\t\t\treturn \"spazz\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault: // legendary+\n\t\t\t\t\t\t\t\treturn \"gud charjer\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END BANDIT\n\t\t\tbreak;\n\t\t\tcase \"Dahl\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"capacity\":\n\t\t\t\t\t\tswitch($GLOBALS['level'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase \"novice\":\n\t\t\t\t\t\t\t\treturn \"Brigworthy\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"seasoned\":\n\t\t\t\t\t\t\t\treturn \"Improvised\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"veteran\":\n\t\t\t\t\t\t\t\treturn \"Bulletproof\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"heroic\":\n\t\t\t\t\t\t\t\treturn \"Phalanx\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault: // legendary+\n\t\t\t\t\t\t\t\treturn \"Roughneck\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"reactivity\":\n\t\t\t\t\t\tswitch($GLOBALS['level'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase \"novice\":\n\t\t\t\t\t\t\t\treturn \"Goat Rope\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"seasoned\":\n\t\t\t\t\t\t\t\treturn \"Thumbsucking\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"veteran\":\n\t\t\t\t\t\t\t\treturn \"Frosty\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"heroic\":\n\t\t\t\t\t\t\t\treturn \"Low Drag\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault: // legendary+\n\t\t\t\t\t\t\t\treturn \"Wide Eyed\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"recharge rate\":\n\t\t\t\t\t\tswitch($GLOBALS['level'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase \"novice\":\n\t\t\t\t\t\t\t\treturn \"No-Go\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"seasoned\":\n\t\t\t\t\t\t\t\treturn \"Slow Mover\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"veteran\":\n\t\t\t\t\t\t\t\treturn \"Double Time\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"heroic\":\n\t\t\t\t\t\t\t\treturn \"Blitz\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault: // legendary+\n\t\t\t\t\t\t\t\treturn \"PDQ\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"Doughboy\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END DAHL\n\t\t\tbreak;\n\t\t\tcase \"Hyperion\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"capacity\":\n\t\t\t\t\t\tswitch($GLOBALS['level'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase \"novice\":\n\t\t\t\t\t\t\t\treturn \"Downsized\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"seasoned\":\n\t\t\t\t\t\t\t\treturn \"Outsourced\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"veteran\":\n\t\t\t\t\t\t\t\treturn \"Commendable\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"heroic\":\n\t\t\t\t\t\t\t\treturn \"Maximized\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault: // legendary+\n\t\t\t\t\t\t\t\treturn \"Consolidated\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"reactivity\":\n\t\t\t\t\t\tswitch($GLOBALS['level'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase \"novice\":\n\t\t\t\t\t\t\t\treturn \"Tabled\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"seasoned\":\n\t\t\t\t\t\t\t\treturn \"Bureaucratic\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"veteran\":\n\t\t\t\t\t\t\t\treturn \"Efficient\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"heroic\":\n\t\t\t\t\t\t\t\treturn \"Incentivized\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault: // legendary+\n\t\t\t\t\t\t\t\treturn \"Competent\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"recharge rate\":\n\t\t\t\t\t\tswitch($GLOBALS['level'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase \"novice\":\n\t\t\t\t\t\t\t\treturn \"Recessive\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"seasoned\":\n\t\t\t\t\t\t\t\treturn \"Deliberate\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"veteran\":\n\t\t\t\t\t\t\t\treturn \"Expeditious\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"heroic\":\n\t\t\t\t\t\t\t\treturn \"Agile\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault: // legendary+\n\t\t\t\t\t\t\t\treturn \"Streamlined\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"Synergistic\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END HYPERION\n\t\t\tbreak;\n\t\t\tcase \"Maliwan\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"capacity\":\n\t\t\t\t\t\tswitch($GLOBALS['level'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase \"novice\":\n\t\t\t\t\t\t\t\treturn \"Frail\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"seasoned\":\n\t\t\t\t\t\t\t\treturn \"Feeble\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"veteran\":\n\t\t\t\t\t\t\t\treturn \"Unwavering\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"heroic\":\n\t\t\t\t\t\t\t\treturn \"Steadfast\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault: // legendary+\n\t\t\t\t\t\t\t\treturn \"Majestic\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"reactivity\":\n\t\t\t\t\t\tswitch($GLOBALS['level'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase \"novice\":\n\t\t\t\t\t\t\t\treturn \"Loitering\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"seasoned\":\n\t\t\t\t\t\t\t\treturn \"Dawdling\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"veteran\":\n\t\t\t\t\t\t\t\treturn \"Dashing\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"heroic\":\n\t\t\t\t\t\t\t\treturn \"Exigent\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault: // legendary+\n\t\t\t\t\t\t\t\treturn \"Ardent\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"recharge rate\":\n\t\t\t\t\t\tswitch($GLOBALS['level'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase \"novice\":\n\t\t\t\t\t\t\t\treturn \"Listless\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"seasoned\":\n\t\t\t\t\t\t\t\treturn \"Lethargic\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"veteran\":\n\t\t\t\t\t\t\t\treturn \"Winged\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"heroic\":\n\t\t\t\t\t\t\t\treturn \"Mercurial\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault: // legendary+\n\t\t\t\t\t\t\t\treturn \"Fleet\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"Cultured\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END MALIWAN\n\t\t\tbreak;\n\t\t\tcase \"Pangolin\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"capacity\":\n\t\t\t\t\t\tswitch($GLOBALS['level'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase \"novice\":\n\t\t\t\t\t\t\t\treturn \"Cracked\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"seasoned\":\n\t\t\t\t\t\t\t\treturn \"Brittle\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"veteran\":\n\t\t\t\t\t\t\t\treturn \"Chitinous\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"heroic\":\n\t\t\t\t\t\t\t\treturn \"Carapaced\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault: // legendary+\n\t\t\t\t\t\t\t\treturn \"Armored\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"reactivity\":\n\t\t\t\t\t\tswitch($GLOBALS['level'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase \"novice\":\n\t\t\t\t\t\t\t\treturn \"Dormant\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"seasoned\":\n\t\t\t\t\t\t\t\treturn \"Hibernating\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"veteran\":\n\t\t\t\t\t\t\t\treturn \"Snapping\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"heroic\":\n\t\t\t\t\t\t\t\treturn \"Pouncing\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault: // legendary+\n\t\t\t\t\t\t\t\treturn \"Anxious\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"recharge rate\":\n\t\t\t\t\t\tswitch($GLOBALS['level'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase \"novice\":\n\t\t\t\t\t\t\t\treturn \"Plodding\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"seasoned\":\n\t\t\t\t\t\t\t\treturn \"Sluggish\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"veteran\":\n\t\t\t\t\t\t\t\treturn \"Nimble\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"heroic\":\n\t\t\t\t\t\t\t\treturn \"Sprinting\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault: // legendary+\n\t\t\t\t\t\t\t\treturn \"Spry\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"Symmetrical\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END PANGOLIN\n\t\t\tbreak;\n\t\t\tcase \"Tediore\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"capacity\":\n\t\t\t\t\t\tswitch($GLOBALS['level'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase \"novice\":\n\t\t\t\t\t\t\t\treturn \"My First\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"seasoned\":\n\t\t\t\t\t\t\t\treturn \"Kiddie\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"veteran\":\n\t\t\t\t\t\t\t\treturn \"Supersized\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"heroic\":\n\t\t\t\t\t\t\t\treturn \"Jumbo\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault: // legendary+\n\t\t\t\t\t\t\t\treturn \"Expanded\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"reactivity\":\n\t\t\t\t\t\tswitch($GLOBALS['level'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase \"novice\":\n\t\t\t\t\t\t\t\treturn \"Leaden\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"seasoned\":\n\t\t\t\t\t\t\t\treturn \"Steady\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"veteran\":\n\t\t\t\t\t\t\t\treturn \"Quick\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"heroic\":\n\t\t\t\t\t\t\t\treturn \"Instant\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault: // legendary+\n\t\t\t\t\t\t\t\treturn \"Fast-Acting\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"recharge rate\":\n\t\t\t\t\t\tswitch($GLOBALS['level'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase \"novice\":\n\t\t\t\t\t\t\t\treturn \"Cut Rate\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"seasoned\":\n\t\t\t\t\t\t\t\treturn \"Leisurely\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"veteran\":\n\t\t\t\t\t\t\t\treturn \"Speedy\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"heroic\":\n\t\t\t\t\t\t\t\treturn \"Express\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault: // legendary+\n\t\t\t\t\t\t\t\treturn \"Quick Charge\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"Classic\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END TEDIORE\n\t\t\tbreak;\n\t\t\tcase \"Torgue\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"capacity\":\n\t\t\t\t\t\tswitch($GLOBALS['level'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase \"novice\":\n\t\t\t\t\t\t\t\treturn \"Wussified\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"seasoned\":\n\t\t\t\t\t\t\t\treturn \"Tore Up\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"veteran\":\n\t\t\t\t\t\t\t\treturn \"Macho\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"heroic\":\n\t\t\t\t\t\t\t\treturn \"Monster\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault: // legendary+\n\t\t\t\t\t\t\t\treturn \"Chiseled\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"reactivity\":\n\t\t\t\t\t\tswitch($GLOBALS['level'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase \"novice\":\n\t\t\t\t\t\t\t\treturn \"First Gear\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"seasoned\":\n\t\t\t\t\t\t\t\treturn \"Slow Lane\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"veteran\":\n\t\t\t\t\t\t\t\treturn \"Turbo\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"heroic\":\n\t\t\t\t\t\t\t\treturn \"Hi Octane\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault: // legendary+\n\t\t\t\t\t\t\t\treturn \"Supercharged\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"recharge rate\":\n\t\t\t\t\t\tswitch($GLOBALS['level'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase \"novice\":\n\t\t\t\t\t\t\t\treturn \"Elderly\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"seasoned\":\n\t\t\t\t\t\t\t\treturn \"Slow-Ass\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"veteran\":\n\t\t\t\t\t\t\t\treturn \"Acceleratin\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"heroic\":\n\t\t\t\t\t\t\t\treturn \"Screamin\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault: // legendary+\n\t\t\t\t\t\t\t\treturn \"Haulin\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"Totally Adequate\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END TORGUE\n\t\t\tbreak;\n\t\t\tcase \"Vladof\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"capacity\":\n\t\t\t\t\t\tswitch($GLOBALS['level'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase \"novice\":\n\t\t\t\t\t\t\t\treturn \"Traitorous\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"seasoned\":\n\t\t\t\t\t\t\t\treturn \"Meek\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"veteran\":\n\t\t\t\t\t\t\t\treturn \"Righteous\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"heroic\":\n\t\t\t\t\t\t\t\treturn \"Unyielding\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault: // legendary+\n\t\t\t\t\t\t\t\treturn \"Unbroken\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"reactivity\":\n\t\t\t\t\t\tswitch($GLOBALS['level'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase \"novice\":\n\t\t\t\t\t\t\t\treturn \"Apathetic\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"seasoned\":\n\t\t\t\t\t\t\t\treturn \"Torpid\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"veteran\":\n\t\t\t\t\t\t\t\treturn \"Ever-Alert\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"heroic\":\n\t\t\t\t\t\t\t\treturn \"Vigilant\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault: // legendary+\n\t\t\t\t\t\t\t\treturn \"Watchful\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"recharge rate\":\n\t\t\t\t\t\tswitch($GLOBALS['level'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase \"novice\":\n\t\t\t\t\t\t\t\treturn \"Cowardly\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"seasoned\":\n\t\t\t\t\t\t\t\treturn \"Timid\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"veteran\":\n\t\t\t\t\t\t\t\treturn \"Momentous\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase \"heroic\":\n\t\t\t\t\t\t\t\treturn \"Revolutionary\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault: // legendary+\n\t\t\t\t\t\t\t\treturn \"Mobilized\";\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturn \"\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END VLADOF\n\t\t\tbreak;\n\t\t} // END SHIELD\n\t\tbreak;\n\tcase \"melee weapon\":\n\t\tswitch($man)\n\t\t{\n\t\t\tcase \"Bandit\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"AP\":\n\t\t\t\t\tcase \"critical\":\n\t\t\t\t\tcase \"damage\":\n\t\t\t\t\tcase \"strength\":\n\t\t\t\t\t\treturn \"hurty\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"balance\":\n\t\t\t\t\tcase \"parry\":\n\t\t\t\t\t\treturn \"swushy\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"weight\":\n\t\t\t\t\tcase \"compact\":\n\t\t\t\t\tcase \"lightweight\":\n\t\t\t\t\t\treturn \"smol\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"reach\":\n\t\t\t\t\t\treturn \"lungass\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"corrosive\":\n\t\t\t\t\t\treturn \"asidy\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"explosive\":\n\t\t\t\t\t\treturn \"boomstik\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"incendiary\":\n\t\t\t\t\t\treturn \"burnee\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shock\":\n\t\t\t\t\t\treturn \"zzapin\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"slag\":\n\t\t\t\t\t\treturn \"perpul\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"heavy weapon\":\n\t\t\t\t\t\treturn \"can opunr\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END BANDIT\n\t\t\tbreak;\n\t\t\tcase \"Dahl\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"AP\":\n\t\t\t\t\tcase \"critical\":\n\t\t\t\t\tcase \"damage\":\n\t\t\t\t\tcase \"strength\":\n\t\t\t\t\t\treturn \"Vibroblade\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"balance\":\n\t\t\t\t\tcase \"parry\":\n\t\t\t\t\t\treturn \"Fencing\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"weight\":\n\t\t\t\t\tcase \"compact\":\n\t\t\t\t\tcase \"lightweight\":\n\t\t\t\t\t\treturn \"Holdout\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"reach\":\n\t\t\t\t\t\treturn \"Extendable\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"corrosive\":\n\t\t\t\t\t\treturn \"Corrosive\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"explosive\":\n\t\t\t\t\t\treturn \"Detonating\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"incendiary\":\n\t\t\t\t\t\treturn \"Incendiary\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shock\":\n\t\t\t\t\t\treturn \"Sapping\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"slag\":\n\t\t\t\t\t\treturn \"Amplified\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"heavy weapon\":\n\t\t\t\t\t\treturn \"Breaching\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END DAHL\n\t\t\tbreak;\n\t\t\tcase \"Maliwan\":\n\t\t\t{\n\t\t\t\tswitch($imp)\n\t\t\t\t{\n\t\t\t\t\tcase \"corrosive\":\n\t\t\t\t\t\treturn \"Caustic\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"incendiary\":\n\t\t\t\t\t\treturn \"Fervid\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"shock\":\n\t\t\t\t\t\treturn \"Storming\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"slag\":\n\t\t\t\t\t\treturn \"Feculent\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END MALIWAN\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn \"#\" . $imp . \"#\";\n\t\t} // END MELEE\n\t\tbreak;\n\tdefault:\n\t\treturn \"#\" . $imp . \"#\";\n\t\tbreak;\n\t} // END SWITCH(TYPE)\n}", "title": "" }, { "docid": "6e3471352a884737c0d3b94305c63345", "score": "0.48963773", "text": "public function testUsesCorrectExtractors()\n {\n // 1/ arrays\n $this->checkExtractionStopsWhenFound(fn(array $ext) => $ext);\n // 2/ iterators\n $this->checkExtractionStopsWhenFound(fn(array $ext) => new ArrayIterator($ext));\n // 3/ generators\n $this->checkExtractionStopsWhenFound(fn(array $ext) => (fn() => yield from $ext)());\n }", "title": "" }, { "docid": "6b66f48c0c72a373d09ae959d60e8f24", "score": "0.48943308", "text": "abstract protected function hitungLuas();", "title": "" }, { "docid": "18bb601c75de688907b4cdccc7ed53ba", "score": "0.4885936", "text": "function usage()\n{\nob_start(); \n?>\n{exp:low_random:item items=\"item1|item2|item3\"}\n\n{exp:low_random:items}\nitem 1\nitem 2\nitem 3\n{/exp:low_random:items}\n\n{exp:low_random:number from=\"1\" to=\"200\"}\n\n{exp:low_random:letter from=\"A\" to=\"F\"}\n\n{exp:low_random:file folder=\"images\" filter=\"masthead|.jpg\"}\n<?php\n$buffer = ob_get_contents();\n \nob_end_clean(); \n\nreturn $buffer;\n}", "title": "" }, { "docid": "0d54e07f2f85858e130b0a251146010f", "score": "0.48829612", "text": "abstract Public function Objets();", "title": "" }, { "docid": "2299b977682a34a9c435acc3f1185d46", "score": "0.4882104", "text": "abstract public function label();", "title": "" }, { "docid": "fb34c210a14ec01aeac93677a716ac07", "score": "0.4880866", "text": "public function generate()\n\t{\n\t\t// overwrite in parent classes\n\t}", "title": "" }, { "docid": "49374b285dc723df8a74a85d76357b18", "score": "0.48729706", "text": "abstract function __invoke();", "title": "" }, { "docid": "9f1d7786de2ef6081b07c511e5b4f518", "score": "0.48672897", "text": "abstract protected function compute();", "title": "" }, { "docid": "486cf24fdcd2961a2885b4446105b897", "score": "0.48650086", "text": "function the_meta()\n{\n}", "title": "" }, { "docid": "ec94f59b6adb197fca4f3f929a5e5e76", "score": "0.48637772", "text": "public function otherFunkyStuff()\n {\n }", "title": "" }, { "docid": "ffef0ea27bc985698faf63180e281840", "score": "0.48578805", "text": "abstract public function regulate();", "title": "" }, { "docid": "0b44c0bef9ac78c952094ee9d2dfcc2c", "score": "0.48568994", "text": "abstract protected function oembed();", "title": "" }, { "docid": "de94b38f89786cf1511b626d8d26db88", "score": "0.4855446", "text": "static function Generate(){\n\t\tself::GenFeed();\n\t\tself::GenGadget();\n\t\tself::GenCategoryGadget();\n\t\tself::GenArchiveGadget();\n\t}", "title": "" }, { "docid": "52a7e404cbe0085c69ecbcece4742afd", "score": "0.48512864", "text": "private function foobar(){\n\t \n\t}", "title": "" }, { "docid": "8cf1db5f5358f1a1f154de524ff48bc1", "score": "0.48498836", "text": "abstract public function transform();", "title": "" }, { "docid": "ada496cbaa1fc754d372b4221022a963", "score": "0.48481533", "text": "abstract protected function describe();", "title": "" }, { "docid": "d93eaa9d584e2766bb3f86ce9493332b", "score": "0.48471117", "text": "static function apply();", "title": "" }, { "docid": "fa8e1484822335993e8983e5c9f77ff3", "score": "0.4838577", "text": "abstract public function analyse();", "title": "" }, { "docid": "15558aa72afdff29de37754e6bad6b65", "score": "0.4817776", "text": "abstract protected function process();", "title": "" }, { "docid": "6aae490ba37eb256dd46b32481cb5e5d", "score": "0.4806569", "text": "abstract public static function getTypeGenerator(): string;", "title": "" }, { "docid": "bd0555c05cc9e181d8ac63b701562c17", "score": "0.4791826", "text": "function wc_generator_tag($gen, $type)\n {\n }", "title": "" }, { "docid": "4f848081b081a1a3b5e48a33ffa0bf59", "score": "0.47838834", "text": "abstract protected function processExtra();", "title": "" }, { "docid": "ded0f0f54f694335f2198270e0a1fa1b", "score": "0.4776411", "text": "abstract protected function analyze();", "title": "" }, { "docid": "0ddc5f2a9c5878d09a553a6a356268d1", "score": "0.4774436", "text": "abstract public function template();", "title": "" }, { "docid": "0ddc5f2a9c5878d09a553a6a356268d1", "score": "0.4774436", "text": "abstract public function template();", "title": "" }, { "docid": "0ddc5f2a9c5878d09a553a6a356268d1", "score": "0.4774436", "text": "abstract public function template();", "title": "" }, { "docid": "dcee7f307597dc8d3b3c9ca7624f9a73", "score": "0.47723377", "text": "function call_metabox() {\n global $cutom_metabox;\n foreach ($cutom_metabox as $key => $val) :\n $field_data1 = array();\n if (!empty($val)):\n foreach ($val as $keys => $vals) :\n if (!empty($vals)):\n $field_data = array(\n array(\n 'field_name' => $vals['field_name'],\n 'field_type' => $vals['field_type'],\n 'field_description' => $vals['field_description'],\n 'class' => $vals['class'],\n 'val' => $vals['val'],\n 'helper_text' => $vals['helper_text']\n )\n );\n\n if ($vals['metablock'] == 'One') :\n $field_data2 = array_merge($field_data1, $field_data);\n $field_data1 = $field_data2;\n $metabox_data1 = array(\n 'name' => $key . \"_\" . $keys,\n 'description' => $vals['description'],\n 'meta_type' => array($key)\n );\n elseif ($vals['metablock'] == 'Two') :\n $field_data3 = array_merge($field_data1, $field_data);\n $field_data1 = $field_data3;\n $metabox_data2 = array(\n 'name' => $key . \"_\" . $keys,\n 'description' => $vals['description'],\n 'meta_type' => array($key)\n );\n elseif ($vals['metablock'] === 'Three') :\n $field_data4 = array_merge($field_data1, $field_data);\n $field_data1 = $field_data4;\n $metabox_data3 = array(\n 'name' => $key . \"_\" . $keys,\n 'description' => $vals['description'],\n 'meta_type' => array($key)\n );\n elseif ($vals['metablock'] === 'Four') :\n $field_data5 = array_merge($field_data1, $field_data);\n $field_data1 = $field_data5;\n $metabox_data4 = array(\n 'name' => $key . \"_\" . $keys,\n 'description' => $vals['description'],\n 'meta_type' => array($key)\n );\n elseif ($vals['metablock'] === 'None'):\n $metabox_data = array(\n 'name' => $key . \"_\" . $keys,\n 'description' => $vals['description'],\n 'meta_type' => array($key)\n );\n new metabox($metabox_data, $field_data);\n endif;\n endif;\n endforeach;\n if (isset($metabox_data1)) :\n new metabox($metabox_data1, $field_data2);\n elseif (isset($metabox_data2)) :\n new metabox($metabox_data2, $field_data3);\n elseif (isset($metabox_data3)) :\n new metabox($metabox_data3, $field_data4);\n elseif (isset($metabox_data4)) :\n new metabox($metabox_data4, $field_data5);\n endif;\n endif;\n endforeach;\n}", "title": "" }, { "docid": "bf46066aafe2a5741cd114d042e2fd72", "score": "0.47699982", "text": "abstract public function beforeCompile();", "title": "" }, { "docid": "35580c41f52706f31d0f76c758f2b01e", "score": "0.47657135", "text": "function mm_label()\n{\n\n $args = array('ptable'=>null,'stable'=>null,'mmtable'=>null,'pcol'=>null,\n 'scol'=>null,'sdisplay'=>null,'label_class'=>'label-primary','pvalue'=>null);\n\n $nargs = func_get_args();\n $args_json = json_encode($nargs, true);\n extract(merge_args($nargs, $args));\n\n $arr = mm_array(merge_args($nargs, $args));\n\n $html = \"<span>\";\n\n if ($arr['error']) {\n $html .= \"<span class=\\\"label $label_class\\\">N/A</span> \";\n } else {\n foreach ($arr as $key => $value) {\n $html .= \"<span class=\\\"label $label_class\\\">\" . $value['display'] . \"</span> \";\n }\n }\n\n $html .= \"</span>\";\n\n return $html;\n}", "title": "" }, { "docid": "10e8463a4c7bcb95df3f4d735f303f73", "score": "0.47623453", "text": "abstract public function afterCompile();", "title": "" }, { "docid": "21198c06e850712d00e2c5c57bda8cc3", "score": "0.4761233", "text": "public function builtTemplate() {\n\t\t\n\t}", "title": "" }, { "docid": "d0d36575a91173fc88f8561747af4a7a", "score": "0.4756314", "text": "abstract public function formalize();", "title": "" }, { "docid": "f14f533fedcfa6e18addf89166317e59", "score": "0.4755124", "text": "public function extrainfo() {\n\n\t}", "title": "" }, { "docid": "3a5b4b199a43daf4133c3e39054ee3dd", "score": "0.4752023", "text": "function apply_prefix() {\n if (is_array($this->func)) { list($class, $func) = $this->func; }\n else { $func = $this->func; $class = \"\"; }\n if (is_object($class))\n return array(false, $this->func);\n if ($this->prefix)\n $class = $this->prefix . $class;\n\n if (strpos($class, \":\")) {\n list($file, $class) = explode(\":\", $class, 2);\n include $file;\n }\n return array($class, $func);\n }", "title": "" }, { "docid": "8dc7be2a9f07db680160a5d67f1d755e", "score": "0.4750366", "text": "protected function next() {}", "title": "" }, { "docid": "7338b1471616d486e10dfd4a03f58619", "score": "0.47476292", "text": "public function gather() {\n\t\t\n\t\t$aArgs = func_get_args();\n\t\t\n\t\t// $aArg[ 0 ] is a string that contains a bunch of patterns\n\t\t// $aArg[ 1 ] is an array of args to call for pattern 0\n\t\t// $aArg[ 2 ] for pattern 1, and so on\n\t\t\n\t\t$aRegs = array();\n\t\t$aRet = array();\n\t\t$bSimple = TRUE;\n\t\t\n\t\t$mPattern = array_shift( $aArgs );\n\t\t\n\t\tif ( is_array( $mPattern ) ) {\n\t\t\t$sPattern = $mPattern[ 0 ];\n\t\t} else {\n\t\t\t$sPattern = $mPattern;\n\t\t}\n\t\t\t\n\t\tif ( FALSE !== strpos( $sPattern, '%s' ) ) {\n\t\t\t$sPattern = sprintf( $sPattern, '##' . $this->_sDefaultField . '##' );\n\t\t}\n\t\t\n\t\tif ( preg_match_all( '/##([a-zA-Z0-9_]+)##/s', $sPattern, $aArgs ) ) {\n\t\t\t$aReplace = $aArgs[ 0 ];\n\t\t\t$aSuffixes = $aArgs[ 1 ];\n\t\t\t$bSimple = FALSE;\n\t\t}\n\t\t\n\t\t// gather\n\t\tforeach ( $this as $oEntity ) {\n\t\t\tif ( $bSimple ) {\n\t\t\t\tif ( method_exists( $oEntity, $this->_sDefaultField ) ) {\n\t\t\t\t\t$sOut = call_user_func_array(\n\t\t\t\t\t\tarray( $oEntity, $this->_sDefaultField ),\n\t\t\t\t\t\t$aArgs[ 0 ]\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\t$sOut = '';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$sOut = $sPattern;\n\t\t\t\tforeach ( $aSuffixes as $i => $sSuffix ) {\n\t\t\t\t\t\n\t\t\t\t\t$sMethod = 'get' . $sSuffix;\n\t\t\t\t\t$sEntityProperty = Geko_Inflector::underscore( $sSuffix );\n\t\t\t\t\t\n\t\t\t\t\t$bReplace = TRUE;\n\t\t\t\t\t\n\t\t\t\t\tif (\n\t\t\t\t\t\t( method_exists( $oEntity, $sMethod ) ) && \n\t\t\t\t\t\t( 'value' != $sEntityProperty )\n\t\t\t\t\t) {\n\t\t\t\t\t\t$sReplacement = call_user_func_array( array( $oEntity, $sMethod ), $aArgs[ $i ] );\n\t\t\t\t\t} elseif ( $oEntity->hasEntityProperty( $sEntityProperty ) ) {\n\t\t\t\t\t\t// see if a corresponding entity value can be found\n\t\t\t\t\t\t$sReplacement = $oEntity->getEntityPropertyValue( $sEntityProperty );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$bReplace = FALSE;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ( $bReplace ) {\n\t\t\t\t\t\t$aArgs[ $i ] = ( is_array( $aArgs[ $i ] ) ) ? $aArgs[ $i ] : array();\n\t\t\t\t\t\t$sOut = str_replace( $aReplace[ $i ], $sReplacement, $sOut );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t$aRet[] = $sOut;\n\t\t}\n\t\t\n\t\treturn $aRet;\n\t}", "title": "" }, { "docid": "8775162787468b682f775831b7de6a8a", "score": "0.47434083", "text": "protected function main(){}", "title": "" }, { "docid": "f43bc99a784574ee222c37e891dd9610", "score": "0.47430322", "text": "public function design();", "title": "" }, { "docid": "4cabbf902c078cec8478c890455c5bf4", "score": "0.4742459", "text": "function setup_preprocessing(&$default_values) {\n parent::setup_preprocessing($default_values);\n }", "title": "" }, { "docid": "1ad9dbc11303ac586ca8dfbb64b07bd7", "score": "0.47404253", "text": "function preprocess_data(){\n }", "title": "" }, { "docid": "8290a6dbe931b01bc3b0fc6de4912612", "score": "0.473843", "text": "abstract protected function getTransformation();", "title": "" }, { "docid": "6e2ef1adcc764c0a24a0d051c8e75308", "score": "0.4734392", "text": "function yy_r33(){ $this->_retvalue = $this->compiler->compileTag($this->yystack[$this->yyidx + -4]->minor,array_merge(array('object_methode'=>$this->yystack[$this->yyidx + -2]->minor),$this->yystack[$this->yyidx + -1]->minor)); }", "title": "" }, { "docid": "e6f68b7a8aff9bf7f4192c07384bf54d", "score": "0.47329146", "text": "protected function run() \r\n {\t\t\r\n while(list($key, $value) = each($this)) ${$key} = $value;\r\n include func_get_arg(0);\r\n }", "title": "" }, { "docid": "8a2e478c589ebe4561eb9f361855ebb7", "score": "0.473114", "text": "function generate(&$code)\r\n\t{ \r\n\t\t// By the time this is called we have already called generate\r\n\t\t// on all of our children.\r\n\t}", "title": "" }, { "docid": "c12a9f67008eab01c0e17a9fa2db5a01", "score": "0.4727195", "text": "abstract public function aire();", "title": "" }, { "docid": "e4db6274f9f197634a1d436712abe49a", "score": "0.47262007", "text": "abstract public function __invoke();", "title": "" } ]